fixed unterminated JS statements + whitespace
This commit is contained in:
+4
-4
@@ -96,7 +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('<input type="text" id="enrolusersearch" value="" />'))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -115,7 +115,7 @@ YUI.add('moodle-enrol-enrolmentmanager', function(Y) {
|
||||
this.set(UEP.PARAMS, params);
|
||||
|
||||
Y.on('key', this.preSearch, this.get(UEP.SEARCH), 'down:13', this);
|
||||
|
||||
|
||||
Y.one(document.body).append(this.get(UEP.BASE));
|
||||
|
||||
var base = this.get(UEP.BASE);
|
||||
@@ -200,7 +200,7 @@ YUI.add('moodle-enrol-enrolmentmanager', function(Y) {
|
||||
}
|
||||
this.getAssignableRoles = function() {
|
||||
this.fire('assignablerolesloaded');
|
||||
}
|
||||
};
|
||||
this.getAssignableRoles();
|
||||
}
|
||||
},
|
||||
@@ -238,7 +238,7 @@ YUI.add('moodle-enrol-enrolmentmanager', function(Y) {
|
||||
y = parseInt(base.get('winHeight'))*0.1;
|
||||
}
|
||||
base.setXY([x,y]);
|
||||
|
||||
|
||||
if (this.get(UEP.USERS)===null) {
|
||||
this.search(e, false);
|
||||
}
|
||||
|
||||
+6
-6
@@ -43,7 +43,7 @@ var DIALOGUE = function(config) {
|
||||
config.center = config.centered || true;
|
||||
config.centered = false;
|
||||
DIALOGUE.superclass.constructor.apply(this, [config]);
|
||||
}
|
||||
};
|
||||
Y.extend(DIALOGUE, Y.Overlay, {
|
||||
initializer : function(config) {
|
||||
this.set(NODELIGHTBOX, this.get(BASE).one('.'+CSS.LIGHTBOX).setStyle('opacity', 0.5));
|
||||
@@ -116,7 +116,7 @@ Y.extend(DIALOGUE, Y.Overlay, {
|
||||
var ALERT = function(config) {
|
||||
config.closeButton = false;
|
||||
ALERT.superclass.constructor.apply(this, [config]);
|
||||
}
|
||||
};
|
||||
Y.extend(ALERT, DIALOGUE, {
|
||||
_enterKeypress : null,
|
||||
initializer : function(config) {
|
||||
@@ -132,7 +132,7 @@ Y.extend(ALERT, DIALOGUE, {
|
||||
this.after('destroyedChange', function(){this.get(BASE).remove();}, this);
|
||||
this._enterKeypress = Y.on('key', this.submit, window, 'down:13', this);
|
||||
yes.on('click', this.submit, this);
|
||||
},
|
||||
},
|
||||
submit : function(e, outcome) {
|
||||
this._enterKeypress.detach();
|
||||
this.fire('complete');
|
||||
@@ -166,7 +166,7 @@ Y.extend(ALERT, DIALOGUE, {
|
||||
|
||||
var CONFIRM = function(config) {
|
||||
CONFIRM.superclass.constructor.apply(this, [config]);
|
||||
}
|
||||
};
|
||||
Y.extend(CONFIRM, DIALOGUE, {
|
||||
_enterKeypress : null,
|
||||
_escKeypress : null,
|
||||
@@ -230,7 +230,7 @@ var EXCEPTION = function(config) {
|
||||
config.width = config.width || (M.cfg.developerdebug)?Math.floor(Y.one(document.body).get('winWidth')/3)+'px':null;
|
||||
config.closeButton = true;
|
||||
EXCEPTION.superclass.constructor.apply(this, [config]);
|
||||
}
|
||||
};
|
||||
Y.extend(EXCEPTION, DIALOGUE, {
|
||||
_hideTimeout : null,
|
||||
_keypress : null,
|
||||
@@ -302,7 +302,7 @@ var AJAXEXCEPTION = function(config) {
|
||||
config.name = config.name || 'Error';
|
||||
config.closeButton = true;
|
||||
AJAXEXCEPTION.superclass.constructor.apply(this, [config]);
|
||||
}
|
||||
};
|
||||
Y.extend(AJAXEXCEPTION, DIALOGUE, {
|
||||
_keypress : null,
|
||||
initializer : function(config) {
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
YUI.add('moodle-enrol-otherusersmanager', function(Y) {
|
||||
|
||||
|
||||
var OUMANAGERNAME = 'Other users manager',
|
||||
OTHERUSERNAME = 'Other user (not enroled in course)',
|
||||
COURSEID = 'courseId',
|
||||
@@ -49,7 +49,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
|
||||
|
||||
var OUMANAGER = function(config) {
|
||||
OUMANAGER.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
Y.extend(OUMANAGER, Y.Base, {
|
||||
_loadingNode : null,
|
||||
_escCloseEvent : null,
|
||||
@@ -82,7 +82,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
|
||||
this._loadingNode = this.get(BASE).one('.'+CSS.CONTENT+' .'+CSS.LIGHTBOX);
|
||||
Y.on('key', this.getUsers, this.get(SEARCH), 'down:13', this);
|
||||
Y.one(document.body).append(this.get(BASE));
|
||||
|
||||
|
||||
var base = this.get(BASE);
|
||||
base.plug(Y.Plugin.Drag);
|
||||
base.dd.addHandle('.'+CSS.HEADER+' h2');
|
||||
@@ -137,7 +137,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
|
||||
params['action'] = 'searchotherusers';
|
||||
params['search'] = this.get(SEARCH).get('value');
|
||||
params['page'] = this.get(PAGE);
|
||||
|
||||
|
||||
Y.io(M.cfg.wwwroot+this.get(AJAXURL), {
|
||||
method:'POST',
|
||||
data:build_querystring(params),
|
||||
@@ -223,7 +223,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
|
||||
}
|
||||
this.getAssignableRoles = function() {
|
||||
this.fire('assignablerolesloaded');
|
||||
}
|
||||
};
|
||||
this.getAssignableRoles();
|
||||
}
|
||||
},
|
||||
@@ -234,7 +234,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
|
||||
NAME : OUMANAGERNAME,
|
||||
ATTRS : {
|
||||
courseId : {
|
||||
|
||||
|
||||
},
|
||||
ajaxUrl : {
|
||||
validator : Y.Lang.isString
|
||||
@@ -290,7 +290,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
|
||||
this._count = count;
|
||||
this._manager = manager;
|
||||
OTHERUSER.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
Y.extend(OTHERUSER, Y.Base, {
|
||||
_count : 0,
|
||||
_manager : null,
|
||||
@@ -369,7 +369,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
|
||||
NAME : OTHERUSERNAME,
|
||||
ATTRS : {
|
||||
userId : {
|
||||
|
||||
|
||||
},
|
||||
fullname : {
|
||||
validator : Y.Lang.isString
|
||||
|
||||
+8
-8
@@ -32,7 +32,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
|
||||
var CONTROLLER = function(config) {
|
||||
CONTROLLER.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
Y.extend(CONTROLLER, Y.Base, {
|
||||
_preformingAction : false,
|
||||
initializer : function(config) {
|
||||
@@ -41,7 +41,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
this.publish('cohortsloaded');
|
||||
this.publish('performingaction');
|
||||
this.publish('actioncomplete');
|
||||
|
||||
|
||||
var close = Y.Node.create('<div class="close"></div>');
|
||||
var panel = new Y.Overlay({
|
||||
headerContent : Y.Node.create('<div></div>').append(Y.Node.create('<h2>'+M.str.enrol.enrolcohort+'</h2>')).append(close),
|
||||
@@ -138,7 +138,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
}
|
||||
this.getCohorts = function() {
|
||||
this.fire('cohortsloaded');
|
||||
}
|
||||
};
|
||||
this.getCohorts();
|
||||
}
|
||||
},
|
||||
@@ -166,7 +166,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
}
|
||||
this.getAssignableRoles = function() {
|
||||
this.fire('assignablerolesloaded');
|
||||
}
|
||||
};
|
||||
this.getAssignableRoles();
|
||||
}
|
||||
},
|
||||
@@ -185,7 +185,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
cohortid : cohort.get(COHORTID),
|
||||
action : (usersonly)?'enrolcohortusers':'enrolcohort',
|
||||
sesskey : M.cfg.sesskey
|
||||
}
|
||||
};
|
||||
Y.io(M.cfg.wwwroot+this.get(AJAXURL), {
|
||||
method:'POST',
|
||||
data:build_querystring(params),
|
||||
@@ -205,7 +205,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
.append(Y.Node.create('<img alt="loading" />').setAttribute('src', M.cfg.loadingicon)));
|
||||
window.location.href = redirecturl;
|
||||
}
|
||||
}
|
||||
};
|
||||
if (result.response && result.response.message) {
|
||||
new M.core.alert(result.response).on('complete', redirect, this);
|
||||
} else {
|
||||
@@ -251,7 +251,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
|
||||
var COHORT = function(config) {
|
||||
COHORT.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
Y.extend(COHORT, Y.Base, {
|
||||
toHTML : function(supportmanualenrolment){
|
||||
var button, result, name, users, syncbutton, usersbutton;
|
||||
@@ -282,7 +282,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
NAME : COHORTNAME,
|
||||
ATTRS : {
|
||||
cohortid : {
|
||||
|
||||
|
||||
},
|
||||
name : {
|
||||
validator : Y.Lang.isString
|
||||
|
||||
Vendored
+11
-11
@@ -19,7 +19,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
|
||||
var ROLE = function(config) {
|
||||
ROLE.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
ROLE.NAME = MOD_NAME;
|
||||
ROLE.ATTRS = {
|
||||
containerId : {
|
||||
@@ -52,7 +52,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
otherusers : {
|
||||
value : false
|
||||
}
|
||||
}
|
||||
};
|
||||
Y.extend(ROLE, Y.Base, {
|
||||
users : [],
|
||||
roleAssignmentPanel : null,
|
||||
@@ -64,7 +64,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
var container = Y.one('#'+this.get(CONTAINERID));
|
||||
container.addClass('ajaxactive');
|
||||
this.set(CONTAINER, container);
|
||||
|
||||
|
||||
var userids = this.get(USERIDS);
|
||||
for (i in userids) {
|
||||
this.users[userids[i]] = new ROLEUSER({userId:userids[i],manipulator:this}).wire();
|
||||
@@ -117,7 +117,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
question : s.confirmunassign,
|
||||
yesLabel : s.confirmunassignyes,
|
||||
noLabel : s.confirmunassignno
|
||||
}
|
||||
};
|
||||
new M.core.confirm(confirmation).on('complete-yes', this.removeRoleCallback, this, user.get(USERID), roleid);
|
||||
}, this);
|
||||
this._loadAssignableRoles();
|
||||
@@ -167,7 +167,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
}
|
||||
this._loadAssignableRoles = function() {
|
||||
this.fire('assignablerolesloaded');
|
||||
}
|
||||
};
|
||||
this._loadAssignableRoles();
|
||||
}
|
||||
},
|
||||
@@ -185,7 +185,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
|
||||
var ROLEUSER = function(config) {
|
||||
ROLEUSER.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
ROLEUSER.NAME = MOD_USER;
|
||||
ROLEUSER.ATTRS = {
|
||||
userId : {
|
||||
@@ -233,7 +233,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
value : '.unassignrolelink',
|
||||
validator : Y.Lang.isString
|
||||
}
|
||||
}
|
||||
};
|
||||
Y.extend(ROLEUSER, Y.Base, {
|
||||
initializer : function() {
|
||||
var container = this.get(MANIPULATOR).get(CONTAINER).one('#user_'+this.get(USERID));
|
||||
@@ -263,7 +263,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
container.all('.role.unchangeable').each(function(node){
|
||||
currentroles[node.getAttribute('rel')] = true;
|
||||
}, this);
|
||||
|
||||
|
||||
this.set(CURRENTROLES, currentroles);
|
||||
return this;
|
||||
},
|
||||
@@ -322,7 +322,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
|
||||
var ROLEPANEL = function(config) {
|
||||
ROLEPANEL.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
ROLEPANEL.NAME = MOD_PANEL;
|
||||
ROLEPANEL.ATTRS = {
|
||||
elementNode : {
|
||||
@@ -346,7 +346,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
manipulator : {
|
||||
validator: Y.Lang.isObject
|
||||
}
|
||||
}
|
||||
};
|
||||
Y.extend(ROLEPANEL, Y.Base, {
|
||||
user : null,
|
||||
roles : [],
|
||||
@@ -415,5 +415,5 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
|
||||
return M.enrol.rolemanager.instance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}, '@VERSION@', {requires:['base','node','io','json-parse','test','moodle-enrol-notification']});
|
||||
Reference in New Issue
Block a user