MDL-55071 theme_boost: Fix relevant JS warnings

Part of MDL-55071
This commit is contained in:
Damyon Wiese 2016-09-22 09:23:17 +08:00 committed by Dan Poltawski
parent 841d25a984
commit e8272e748c
3 changed files with 15 additions and 14 deletions

View File

@ -553,10 +553,10 @@ M.form_dndupload.init = function(Y, options) {
this.msg_dlg_node.generateID(); this.msg_dlg_node.generateID();
this.msg_dlg = new M.core.dialogue({ this.msg_dlg = new M.core.dialogue({
bodyContent : this.msg_dlg_node, bodyContent: this.msg_dlg_node,
centered : true, centered: true,
modal : true, modal: true,
visible : false visible: false
}); });
this.msg_dlg.plug(Y.Plugin.Drag,{handles:['#'+this.msg_dlg_node.get('id')+' .yui3-widget-hd']}); this.msg_dlg.plug(Y.Plugin.Drag,{handles:['#'+this.msg_dlg_node.get('id')+' .yui3-widget-hd']});
this.msg_dlg_node.one('.fp-msg-butok').on('click', function(e) { this.msg_dlg_node.one('.fp-msg-butok').on('click', function(e) {
@ -710,11 +710,11 @@ M.form_dndupload.init = function(Y, options) {
var node = process_dlg_node; var node = process_dlg_node;
node.generateID(); node.generateID();
var process_dlg = new M.core.dialogue({ var process_dlg = new M.core.dialogue({
bodyContent : node, bodyContent: node,
headerContent: M.util.get_string('fileexistsdialogheader', 'repository'), headerContent: M.util.get_string('fileexistsdialogheader', 'repository'),
centered : true, centered: true,
modal : true, modal: true,
visible : false visible: false
}); });
process_dlg.plug(Y.Plugin.Drag,{handles:['#'+node.get('id')+' .yui3-widget-hd']}); process_dlg.plug(Y.Plugin.Drag,{handles:['#'+node.get('id')+' .yui3-widget-hd']});

View File

@ -277,7 +277,8 @@ if (typeof M.form.dependencyManager === 'undefined') {
isFilePicker: function(el) { isFilePicker: function(el) {
if (!this._fileinputs) { if (!this._fileinputs) {
var fileinputs = {}; var fileinputs = {};
var els = this.get('form').all('.fitem [data-fieldtype="filepicker"] input,.fitem [data-fieldtype="filemanager"] input'); var selector = '.fitem [data-fieldtype="filepicker"] input,.fitem [data-fieldtype="filemanager"] input';
var els = this.get('form').all(selector);
els.each(function(node) { els.each(function(node) {
fileinputs[node.getAttribute('name')] = true; fileinputs[node.getAttribute('name')] = true;
}); });

View File

@ -1,11 +1,11 @@
YUI.add('moodle-mod_feedback-dragdrop', function(Y) { YUI.add('moodle-mod_feedback-dragdrop', function(Y) {
var DRAGDROPNAME = 'mod_feedback_dragdrop'; var DRAGDROPNAME = 'mod_feedback_dragdrop';
var CSS = { var CSS = {
DRAGAREA : '#feedback_dragarea', DRAGAREA: '#feedback_dragarea',
DRAGITEMCLASS : 'feedback_itemlist', DRAGITEMCLASS: 'feedback_itemlist',
DRAGITEM : 'div.feedback_itemlist', DRAGITEM: 'div.feedback_itemlist',
DRAGLIST : '#feedback_dragarea form', DRAGLIST: '#feedback_dragarea form',
DRAGHANDLE : 'itemhandle' DRAGHANDLE: 'itemhandle'
}; };
var DRAGDROP = function() { var DRAGDROP = function() {