Permalink
Browse files

MDL-33482 Replaced modchooser with chooserdialogue

  • Loading branch information...
1 parent 89e00e9 commit 255dd8d1e215c999fde28bc2fd9d79666c450bb9 @andrewnicols andrewnicols committed with danpoltawski Jun 1, 2012
View
@@ -168,7 +168,7 @@ public function course_modchooser($modules, $course) {
// Add the header
$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'),
'id' => 'chooserform', 'method' => 'post'));
@@ -221,8 +221,8 @@ public function course_modchooser($modules, $course) {
// Put all of the content together
$content = $formcontent;
- $content = html_writer::tag('div', $content, array('id' => 'choosercontainer'));
- return $header . html_writer::tag('div', $content, array('id' => 'chooserdialogue'));
+ $content = html_writer::tag('div', $content, array('class' => 'choosercontainer'));
+ return $header . html_writer::tag('div', $content, array('class' => 'chooserdialoguebody'));
}
/**
@@ -21,13 +21,12 @@ YUI.add('moodle-course-modchooser', function(Y) {
jumplink : null,
initializer : function(config) {
- var dialogue = Y.one('#chooserdialogue');
- var header = Y.one('#choosertitle');
+ var dialogue = Y.one('.chooserdialoguebody');
+ var header = Y.one('.choosertitle');
var params = {
width: '540px'
};
this.setup_chooser_dialogue(dialogue, header, params);
- this.overlay.get('boundingBox').addClass('modchooser');
this.jumplink = this.container.one('#jump');
@@ -45,8 +45,11 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
this.overlay.render();
// 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]');
+
+ // Add the chooserdialogue class to the container for styling
+ this.overlay.get('boundingBox').addClass('chooserdialogue');
},
/**
@@ -813,8 +813,8 @@ sup {vertical-align: super;}
* without javascript enabled
*/
/* Hide the dialog and it's title */
-#chooserdialogue,
-#choosertitle {
+.chooserdialoguebody,
+.choosertitle {
display:none;
}
@@ -823,21 +823,21 @@ sup {vertical-align: super;}
border: 0px solid transparent!important;
}
-.modchooser .moodle-dialogue-wrap {
+.chooserdialogue .moodle-dialogue-wrap {
background-color: #FFFFFF;
border: 1px solid #CCCCCC!important;
height: auto;
border-radius:10px;
-webkit-box-shadow: 5px 5px 20px 0px #666666;-moz-box-shadow: 5px 5px 20px 0px #666666;box-shadow: 5px 5px 20px 0px #666666;
}
-.modchooser .moodle-dialogue-hd {
+.chooserdialogue .moodle-dialogue-hd {
font-weight: normal;
border-radius: 10px 10px 0px 0px;border-bottom: 1px solid #BBBBBB!important;padding:5px 5px 5px 5px;text-align: center!important;font-size:12px;letter-spacing: 1px;color:#333333; text-shadow: 1px 1px 1px #FFFFFF;filter: dropshadow(color=#FFFFFF, offx=1, offy=1);
background: #CCCCCC;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#CCCCCC');background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#CCCCCC));background: -moz-linear-gradient(top, #FFFFFF, #CCCCCC);
}
-.modchooser .moodle-dialogue-bd {
+.chooserdialogue .moodle-dialogue-bd {
overflow: auto;
padding: 0px;
background: #F2F2F2;
@@ -848,24 +848,24 @@ sup {vertical-align: super;}
}
/* Center the submit buttons within the area */
-#choosercontainer #chooseform .submitbuttons {
+.choosercontainer #chooseform .submitbuttons {
margin: 0.7em 0;
text-align: center;
}
-#choosercontainer #chooseform .submitbuttons input {
+.choosercontainer #chooseform .submitbuttons input {
min-width: 100px;
margin: 0px 0.5em;
}
/* Various settings for the options area */
-#choosercontainer #chooseform .options {
+.choosercontainer #chooseform .options {
position: relative;
border-bottom: 1px solid #BBBBBB;
}
/* Only set these options if we're showing the js container */
-.jsenabled #choosercontainer #chooseform .alloptions {
+.jsenabled .choosercontainer #chooseform .alloptions {
max-height: 550px;
overflow-x: hidden;
overflow-y: auto;
@@ -874,43 +874,43 @@ sup {vertical-align: super;}
}
/* Settings for option rows and option subtypes */
-#choosercontainer #chooseform .moduletypetitle,
-#choosercontainer #chooseform .option,
-#choosercontainer #chooseform .nonoption {
+.choosercontainer #chooseform .moduletypetitle,
+.choosercontainer #chooseform .option,
+.choosercontainer #chooseform .nonoption {
margin-bottom: 0;
padding: 0 1.6em 0 1.6em;
}
-#choosercontainer #chooseform .moduletypetitle {
+.choosercontainer #chooseform .moduletypetitle {
text-transform: uppercase;
padding: 1em 0 .3em 0;
}
-#choosercontainer #chooseform .subtype {
+.choosercontainer #chooseform .subtype {
margin-bottom: 0;
padding: 0 0 0 1em;
}
-#choosercontainer #chooseform .option .typename,
-#choosercontainer #chooseform .option span.modicon img.icon {
+.choosercontainer #chooseform .option .typename,
+.choosercontainer #chooseform .option span.modicon img.icon {
padding: 0 0 0 0.5em;
}
-#choosercontainer #chooseform .option input[type=radio],
-#choosercontainer #chooseform .option span.typename,
-#choosercontainer #chooseform .option span.modicon {
+.choosercontainer #chooseform .option input[type=radio],
+.choosercontainer #chooseform .option span.typename,
+.choosercontainer #chooseform .option span.modicon {
vertical-align: middle;
}
-#choosercontainer #chooseform .option label {
+.choosercontainer #chooseform .option label {
display: block;
padding: 0.3em 0 0.1em 0;
border-bottom: 1px solid #FFFFFF;
}
/* The instruction/help area */
-#choosercontainer #chooseform .instruction,
-.jsenabled #choosercontainer #chooseform .typesummary {
+.choosercontainer #chooseform .instruction,
+.jsenabled .choosercontainer #chooseform .typesummary {
display: none;
position: absolute;
top: 0px;
@@ -927,11 +927,12 @@ sup {vertical-align: super;}
}
/* Selected option settings */
-.jsenabled #choosercontainer #chooseform .instruction,
-#choosercontainer #chooseform .selected .typesummary {
+.jsenabled .choosercontainer #chooseform .instruction,
+.choosercontainer #chooseform .selected .typesummary {
display: block;
}
-#choosercontainer #chooseform .selected {
+
+.choosercontainer #chooseform .selected {
background-color: #FFFFFF;
-webkit-box-shadow: 0px 0px 10px 0px #CCCCCC;-moz-box-shadow: 0px 0px 10px 0px #CCCCCC;box-shadow: 0px 0px 10px 0px #CCCCCC;
}

0 comments on commit 255dd8d

Please sign in to comment.