enrol MDL-22854 Re-jigged the enrolment dialogue putting the role and options up the top

This commit is contained in:
samhemelryk 2010-07-28 09:11:03 +00:00
parent e3b9156c46
commit 4a370785b6
2 changed files with 19 additions and 15 deletions

View File

@ -43,6 +43,7 @@ Structure of the user enroller panel
.user-enroller-panel .uep-header .close {width:25px;height:15px;position:absolute;top:2px;right:1em;cursor:pointer;background:url("sprite.png") no-repeat scroll 0 0 transparent;}
.user-enroller-panel .uep-content {text-align:center;position:relative;width:100%;border-top:1px solid #999;border-bottom:1px solid #999;}
.user-enroller-panel .uep-content .uep-controls {margin:0;padding:3px;background-color:#ddd;text-align:left;border-bottom:1px solid #BBB;}
.user-enroller-panel .uep-ajax-content {height:375px;overflow:auto;}
.user-enroller-panel .uep-search-results .totalusers {background-color:#eee;padding:5px;border-bottom:1px solid #BBB;font-size:7pt;font-weight: bold;}
.user-enroller-panel .uep-search-results .user {width:100%;text-align:left;font-size:9pt;border-bottom:1px solid #ddd;border-top:1px solid #eee;}
@ -51,7 +52,7 @@ Structure of the user enroller panel
.user-enroller-panel .uep-search-results .user .picture {width:45px;float:left;margin:3px;}
.user-enroller-panel .uep-search-results .user .details {width:250px;float:left;margin:3px;}
.user-enroller-panel .uep-search-results .user .options {padding-right:7px;font-size:8pt;margin:3px;}
.user-enroller-panel .uep-search-results .user .options .enrol {margin:3px;float:right;border:1px outset #ddd;background-color:#EEE;padding:3px;-moz-border-radius:3px;cursor:pointer;}
.user-enroller-panel .uep-search-results .user .options .enrol {margin:3px;float:right;cursor:pointer;}
.user-enroller-panel .uep-search-results .user.enrolled .count {width:40px;color:#eee;}
.user-enroller-panel .uep-search-results .uep-more-results {background-color:#eee;padding:5px;border-top:1px solid #BBB;}

View File

@ -52,6 +52,7 @@ YUI.add('moodle-enrol-enrolmentmanager', function(Y) {
COLLAPSIBLEHEADING : 'collapsibleheading',
COLLAPSIBLEAREA : 'collapsiblearea',
SEARCHOPTION : 'uep-enrolment-option',
SEARCHCONTROLS : 'uep-controls',
ROLE : 'role',
STARTDATE : 'startdate',
DURATION : 'duration',
@ -74,6 +75,20 @@ YUI.add('moodle-enrol-enrolmentmanager', function(Y) {
.append(Y.Node.create('<div class="'+CSS.CLOSE+'"></div>'))
.append(Y.Node.create('<h2>'+M.str.enrol.enrolusers+'</h2>')))
.append(Y.Node.create('<div class="'+CSS.CONTENT+'"></div>')
.append(Y.Node.create('<div class="'+CSS.SEARCHCONTROLS+'"></div>')
.append(Y.Node.create('<div class="'+CSS.SEARCHOPTION+' '+CSS.ROLE+'">'+M.str.role.assignroles+'</div>')
.append(Y.Node.create('<select><option value="">'+M.str.enrol.none+'</option></select>'))
)
.append(Y.Node.create('<div class="'+CSS.SEARCHOPTIONS+'"></div>')
.append(Y.Node.create('<div class="'+CSS.COLLAPSIBLEHEADING+'"><img alt="" />'+M.str.enrol.enrolmentoptions+'</div>'))
.append(Y.Node.create('<div class="'+CSS.COLLAPSIBLEAREA+' '+CSS.HIDDEN+'"></div>')
.append(Y.Node.create('<div class="'+CSS.SEARCHOPTION+' '+CSS.STARTDATE+'">'+M.str.moodle.startingfrom+'</div>')
.append(Y.Node.create('<select></select>')))
.append(Y.Node.create('<div class="'+CSS.SEARCHOPTION+' '+CSS.DURATION+'">'+M.str.enrol.enrolperiod+'</div>')
.append(Y.Node.create('<select><option value="0" selected="selected">'+M.str.enrol.unlimitedduration+'</option></select>')))
)
)
)
.append(Y.Node.create('<div class="'+CSS.AJAXCONTENT+'"></div>'))
.append(Y.Node.create('<div class="'+CSS.LIGHTBOX+' '+CSS.HIDDEN+'"></div>')
.append(Y.Node.create('<img alt="loading" class="'+CSS.LOADINGICON+'" />')
@ -81,19 +96,7 @@ YUI.add('moodle-enrol-enrolmentmanager', function(Y) {
.setStyle('opacity', 0.5)))
.append(Y.Node.create('<div class="'+CSS.FOOTER+'"></div>')
.append(Y.Node.create('<div class="'+CSS.SEARCH+'"><label>'+M.str.enrol.usersearch+'</label></div>')
.append(Y.Node.create('<input type="text" id="enrolusersearch" value="" />'))
.append(Y.Node.create('<div class="'+CSS.SEARCHOPTION+' '+CSS.ROLE+'">'+M.str.role.assignroles+'</div>')
.append(Y.Node.create('<select><option value="">'+M.str.enrol.none+'</option></select>'))
)
)
.append(Y.Node.create('<div class="'+CSS.SEARCHOPTIONS+'"></div>')
.append(Y.Node.create('<div class="'+CSS.COLLAPSIBLEHEADING+'"><img alt="" />'+M.str.enrol.enrolmentoptions+'</div>'))
.append(Y.Node.create('<div class="'+CSS.COLLAPSIBLEAREA+' '+CSS.HIDDEN+'"></div>')
.append(Y.Node.create('<div class="'+CSS.SEARCHOPTION+' '+CSS.STARTDATE+'">'+M.str.moodle.startingfrom+'</div>')
.append(Y.Node.create('<select></select>')))
.append(Y.Node.create('<div class="'+CSS.SEARCHOPTION+' '+CSS.DURATION+'">'+M.str.enrol.enrolperiod+'</div>')
.append(Y.Node.create('<select><option value="0" selected="selected">'+M.str.enrol.unlimitedduration+'</option></select>')))
)
.append(Y.Node.create('<input type="text" id="enrolusersearch" value="" />'))
)
)
)
@ -326,7 +329,7 @@ YUI.add('moodle-enrol-enrolmentmanager', function(Y) {
.append(Y.Node.create('<div class="'+CSS.FULLNAME+'">'+user.fullname+'</div>'))
.append(Y.Node.create('<div class="'+CSS.EMAIL+'">'+user.email+'</div>')))
.append(Y.Node.create('<div class="'+CSS.OPTIONS+'"></div>')
.append(Y.Node.create('<div class="'+CSS.ENROL+'">'+M.str.enrol.enrol+'</div>')))
.append(Y.Node.create('<input type="button" class="'+CSS.ENROL+'" value="'+M.str.enrol.enrol+'" />')))
);
}
this.set(UEP.USERCOUNT, count);