Merge branch 'wip-MDL-33482-master' of git://github.com/danpoltawski/moodle

This commit is contained in:
Dan Poltawski 2012-06-07 18:11:10 +08:00
commit 620ecd38d2
5 changed files with 91 additions and 43 deletions

View file

@ -168,7 +168,7 @@ class core_course_renderer extends plugin_renderer_base {
// Add the header // Add the header
$header = html_writer::tag('div', get_string('addresourceoractivity', 'moodle'), $header = html_writer::tag('div', get_string('addresourceoractivity', 'moodle'),
array('id' => 'choosertitle', 'class' => 'hd')); array('class' => 'hd choosertitle'));
$formcontent = html_writer::start_tag('form', array('action' => new moodle_url('/course/jumpto.php'), $formcontent = html_writer::start_tag('form', array('action' => new moodle_url('/course/jumpto.php'),
'id' => 'chooserform', 'method' => 'post')); 'id' => 'chooserform', 'method' => 'post'));
@ -221,8 +221,8 @@ class core_course_renderer extends plugin_renderer_base {
// Put all of the content together // Put all of the content together
$content = $formcontent; $content = $formcontent;
$content = html_writer::tag('div', $content, array('id' => 'choosercontainer')); $content = html_writer::tag('div', $content, array('class' => 'choosercontainer'));
return $header . html_writer::tag('div', $content, array('id' => 'chooserdialogue')); return $header . html_writer::tag('div', $content, array('class' => 'chooserdialoguebody'));
} }
/** /**

View file

@ -21,13 +21,12 @@ YUI.add('moodle-course-modchooser', function(Y) {
jumplink : null, jumplink : null,
initializer : function(config) { initializer : function(config) {
var dialogue = Y.one('#chooserdialogue'); var dialogue = Y.one('.chooserdialoguebody');
var header = Y.one('#choosertitle'); var header = Y.one('.choosertitle');
var params = { var params = {
width: '540px' width: '540px'
}; };
this.setup_chooser_dialogue(dialogue, header, params); this.setup_chooser_dialogue(dialogue, header, params);
this.overlay.get('boundingBox').addClass('modchooser');
this.jumplink = this.container.one('#jump'); this.jumplink = this.container.one('#jump');

View file

@ -45,8 +45,11 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
this.overlay.render(); this.overlay.render();
// Set useful links // Set useful links
this.container = this.overlay.get('boundingBox').one('#choosercontainer'); this.container = this.overlay.get('boundingBox').one('.choosercontainer');
this.options = this.container.all('.option input[type=radio]'); this.options = this.container.all('.option input[type=radio]');
// Add the chooserdialogue class to the container for styling
this.overlay.get('boundingBox').addClass('chooserdialogue');
}, },
/** /**

Binary file not shown.

Before

Width:  |  Height:  |  Size: 892 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

@ -813,78 +813,120 @@ sup {vertical-align: super;}
* without javascript enabled * without javascript enabled
*/ */
/* Hide the dialog and it's title */ /* Hide the dialog and it's title */
#chooserdialogue, .chooserdialoguebody,
#choosertitle { .choosertitle {
display:none; display:none;
} }
.modchooser .moodle-dialogue-hd { .moodle-dialogue-base .moodle-dialogue {
text-align: center; background-color: transparent;
border: 0px solid transparent!important;
}
.chooserdialogue .moodle-dialogue-wrap {
height: auto;
background-color: #FFFFFF;
border: 1px solid #CCCCCC!important;
border-radius:10px;
box-shadow: 5px 5px 20px 0px #666666;
-webkit-box-shadow: 5px 5px 20px 0px #666666;
-moz-box-shadow: 5px 5px 20px 0px #666666;
}
.chooserdialogue .moodle-dialogue-hd {
font-size:12px!important;
font-weight: normal!important;
letter-spacing: 1px;
color:#333333!important;
text-align: center!important;
text-shadow: 1px 1px 1px #FFFFFF;
padding:5px 5px 5px 5px;
border-radius: 10px 10px 0px 0px;
border-bottom: 1px solid #BBBBBB!important;
background: #CCCCCC;
background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#CCCCCC));
background: -moz-linear-gradient(top, #FFFFFF, #CCCCCC);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#CCCCCC')!important;
filter: dropshadow(color=#FFFFFF, offx=1, offy=1);
}
.chooserdialogue .moodle-dialogue-bd {
font-size: 12px;
color: #555555;
overflow: auto;
padding: 0px;
background: #F2F2F2;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
} }
/* Center the submit buttons within the area */ /* Center the submit buttons within the area */
#choosercontainer #chooseform .submitbuttons { .choosercontainer #chooseform .submitbuttons {
margin: 0.7em 0; margin: 0.7em 0;
text-align: center; text-align: center;
} }
#choosercontainer #chooseform .submitbuttons input { .choosercontainer #chooseform .submitbuttons input {
min-width: 100px; min-width: 100px;
margin: 0px 0.5em; margin: 0px 0.5em;
} }
/* Various settings for the options area */ /* Various settings for the options area */
#choosercontainer #chooseform .options { .choosercontainer #chooseform .options {
position: relative; position: relative;
border-bottom: 1px solid grey; border-bottom: 1px solid #BBBBBB;
padding: 0.24em 0;
} }
/* Only set these options if we're showing the js container */ /* Only set these options if we're showing the js container */
.jsenabled #choosercontainer #chooseform .alloptions { .jsenabled .choosercontainer #chooseform .alloptions {
max-height: 530px; max-height: 550px;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
max-width: 18.15em; max-width: 18.5em;
box-shadow: inset 0px 0px 30px 0px #CCCCCC;
-webkit-box-shadow: inset 0px 0px 30px 0px #CCCCCC;
-moz-box-shadow: inset 0px 0px 30px 0px #CCCCCC;
} }
/* Settings for option rows and option subtypes */ /* Settings for option rows and option subtypes */
#choosercontainer #chooseform .moduletypetitle, .choosercontainer #chooseform .moduletypetitle,
#choosercontainer #chooseform .option, .choosercontainer #chooseform .option,
#choosercontainer #chooseform .nonoption { .choosercontainer #chooseform .nonoption {
margin-bottom: 0; margin-bottom: 0;
padding: 0 0 0 0.3em; padding: 0 1.6em 0 1.6em;
} }
#choosercontainer #chooseform .moduletypetitle { .choosercontainer #chooseform .moduletypetitle {
font-weight: bold; text-transform: uppercase;
text-align : center; padding-top: 1.2em;
padding-bottom: 0.4em;
} }
#choosercontainer #chooseform .subtype { .choosercontainer #chooseform .subtype {
margin-bottom: 0; margin-bottom: 0;
padding: 0 0 0 1em; padding: 0 0 0 1em;
} }
#choosercontainer #chooseform .option .typename, .choosercontainer #chooseform .option .typename,
#choosercontainer #chooseform .option span.modicon img.icon { .choosercontainer #chooseform .option span.modicon img.icon {
padding: 0 0 0 0.3em; padding: 0 0 0 0.5em;
} }
#choosercontainer #chooseform .option input[type=radio], .choosercontainer #chooseform .option input[type=radio],
#choosercontainer #chooseform .option span.typename, .choosercontainer #chooseform .option span.typename,
#choosercontainer #chooseform .option span.modicon { .choosercontainer #chooseform .option span.modicon {
vertical-align: middle; vertical-align: middle;
} }
#choosercontainer #chooseform .option label { .choosercontainer #chooseform .option label {
display: block; display: block;
padding: 0.2em 0 0.2em 0; padding: 0.3em 0 0.1em 0;
border-bottom: 1px solid #FFFFFF;
} }
/* The instruction/help area */ /* The instruction/help area */
#choosercontainer #chooseform .instruction, .choosercontainer #chooseform .instruction,
.jsenabled #choosercontainer #chooseform .typesummary { .jsenabled .choosercontainer #chooseform .typesummary {
display: none; display: none;
position: absolute; position: absolute;
top: 0px; top: 0px;
@ -892,20 +934,24 @@ sup {vertical-align: super;}
bottom: 0px; bottom: 0px;
left: 18.5em; left: 18.5em;
margin: 0; margin: 0;
border-left: 1px solid grey; padding: 2em 2em 2em 2.4em;
padding: 0.3em 0.5em;
background-color: white; background-color: white;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
max-height: 550px; max-height: 550px;
line-height: 2em;
} }
/* Selected option settings */ /* Selected option settings */
.jsenabled #choosercontainer #chooseform .instruction, .jsenabled .choosercontainer #chooseform .instruction,
#choosercontainer #chooseform .selected .typesummary { .choosercontainer #chooseform .selected .typesummary {
display: block; display: block;
} }
#choosercontainer #chooseform .selected {
background-color: #ddd; .choosercontainer #chooseform .selected {
background-color: #FFFFFF;
box-shadow: 0px 0px 10px 0px #CCCCCC;
-webkit-box-shadow: 0px 0px 10px 0px #CCCCCC;
-moz-box-shadow: 0px 0px 10px 0px #CCCCCC;
} }