Skip to content

Commit

Permalink
fixed unterminated JS statements + whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 17, 2010
1 parent 92f2e44 commit 8505d92
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
8 changes: 4 additions & 4 deletions enrol/yui/enrolmentmanager/enrolmentmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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="" />'))
)
)
)
Expand All @@ -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);
Expand Down Expand Up @@ -200,7 +200,7 @@ YUI.add('moodle-enrol-enrolmentmanager', function(Y) {
}
this.getAssignableRoles = function() {
this.fire('assignablerolesloaded');
}
};
this.getAssignableRoles();
}
},
Expand Down Expand Up @@ -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);
}
Expand Down
12 changes: 6 additions & 6 deletions enrol/yui/notification/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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) {
Expand All @@ -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');
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down
16 changes: 8 additions & 8 deletions enrol/yui/otherusersmanager/otherusersmanager.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -223,7 +223,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
}
this.getAssignableRoles = function() {
this.fire('assignablerolesloaded');
}
};
this.getAssignableRoles();
}
},
Expand All @@ -234,7 +234,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
NAME : OUMANAGERNAME,
ATTRS : {
courseId : {

},
ajaxUrl : {
validator : Y.Lang.isString
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -369,7 +369,7 @@ YUI.add('moodle-enrol-otherusersmanager', function(Y) {
NAME : OTHERUSERNAME,
ATTRS : {
userId : {

},
fullname : {
validator : Y.Lang.isString
Expand Down
16 changes: 8 additions & 8 deletions enrol/yui/quickcohortenrolment/quickcohortenrolment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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),
Expand Down Expand Up @@ -138,7 +138,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
}
this.getCohorts = function() {
this.fire('cohortsloaded');
}
};
this.getCohorts();
}
},
Expand Down Expand Up @@ -166,7 +166,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
}
this.getAssignableRoles = function() {
this.fire('assignablerolesloaded');
}
};
this.getAssignableRoles();
}
},
Expand All @@ -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),
Expand All @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -282,7 +282,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
NAME : COHORTNAME,
ATTRS : {
cohortid : {

},
name : {
validator : Y.Lang.isString
Expand Down
22 changes: 11 additions & 11 deletions enrol/yui/rolemanager/rolemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 : {
Expand Down Expand Up @@ -52,7 +52,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
otherusers : {
value : false
}
}
};
Y.extend(ROLE, Y.Base, {
users : [],
roleAssignmentPanel : null,
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -167,7 +167,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
}
this._loadAssignableRoles = function() {
this.fire('assignablerolesloaded');
}
};
this._loadAssignableRoles();
}
},
Expand All @@ -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 : {
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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;
},
Expand Down Expand Up @@ -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 : {
Expand All @@ -346,7 +346,7 @@ YUI.add('moodle-enrol-rolemanager', function(Y) {
manipulator : {
validator: Y.Lang.isObject
}
}
};
Y.extend(ROLEPANEL, Y.Base, {
user : null,
roles : [],
Expand Down Expand Up @@ -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']});

0 comments on commit 8505d92

Please sign in to comment.