From d3067516950e1ea8502413b81fea171f4f98a5f0 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sat, 18 Sep 2010 10:37:19 +0000 Subject: [PATCH] fixed unterminated JS statements --- lib/form/filemanager.js | 12 ++++++------ lib/form/form.js | 20 ++++++++++---------- lib/form/searchableselector.js | 2 +- lib/form/url.js | 4 ++-- lib/form/yui/dateselector/dateselector.js | 8 ++++---- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lib/form/filemanager.js b/lib/form/filemanager.js index a1a3b24bc5a..8d12718ef83 100644 --- a/lib/form/filemanager.js +++ b/lib/form/filemanager.js @@ -42,7 +42,7 @@ M.form_filemanager = {}; M.form_filemanager.init = function(Y, options) { var FileManagerHelper = function(options) { FileManagerHelper.superclass.constructor.apply(this, arguments); - } + }; FileManagerHelper.NAME = "FileManager"; FileManagerHelper.ATTRS = { options: {}, @@ -427,7 +427,7 @@ M.form_filemanager.init = function(Y, options) { this.refresh(file.filepath); }, create_filemenu: function(e, data) { - e.preventDefault(); + e.preventDefault(); var options = this.options; var node = e.currentTarget; var file = data[node.get('id')]; @@ -459,7 +459,7 @@ M.form_filemanager.init = function(Y, options) { this.create_menu(e, 'filemenu', menuitems, file, data); }, create_foldermenu: function(e, data) { - e.preventDefault(); + e.preventDefault(); var scope = this; var node = e.currentTarget; var fileinfo = data[node.get('id')]; @@ -483,7 +483,7 @@ M.form_filemanager.init = function(Y, options) { this.create_menu(e, 'foldermenu', menuitems, fileinfo, data); }, create_zipmenu: function(e, data) { - e.preventDefault(); + e.preventDefault(); var scope = this; var node = e.currentTarget; var fileinfo = data[node.get('id')]; @@ -546,7 +546,7 @@ M.form_filemanager.init = function(Y, options) { } } }); - } + }; M.util.show_confirm_dialog(ev, dialog_options); } function rename (type, ev, obj) { @@ -580,7 +580,7 @@ M.form_filemanager.init = function(Y, options) { scope.rename_dialog.hide(); } }); - } + }; var dialog = Y.one('#fm-rename-dlg'); if (!dialog) { diff --git a/lib/form/form.js b/lib/form/form.js index ad361a80152..42b9316ae2a 100644 --- a/lib/form/form.js +++ b/lib/form/form.js @@ -19,7 +19,7 @@ M.form.initShowAdvanced = function(Y, config) { } var showAdvanced = function(config) { showAdvanced.superclass.constructor.apply(this, arguments); - } + }; showAdvanced.prototype = { _advButtons : [], _advAreas : [], @@ -48,14 +48,14 @@ M.form.initShowAdvanced = function(Y, config) { this._advAreas.removeClass('hide'); } } - } + }; // Extend it with the YUI widget fw. Y.extend(showAdvanced, Y.Base, showAdvanced.prototype, { NAME : 'mform-showAdvanced' - }) + }); M.form.showAdvanced = new showAdvanced(config); return M.form.showAdvanced; -} +}; /** * Initialises a manager for a forms dependencies. @@ -84,7 +84,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) { M.form.dependencyManager = M.form.dependencyManager || (function(){ var dependencyManager = function(config) { dependencyManager.superclass.constructor.apply(this, arguments); - } + }; dependencyManager.prototype = { _form : null, _depElements : [], @@ -138,7 +138,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) { if (this.getAttribute('name') == name) { elements.push(this); } - }) + }); this._nameCollections[name] = new Y.NodeList(elements); } return this._nameCollections[name]; @@ -146,7 +146,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) { /** * Checks the dependencies the form has an makes any changes to the * form that are required. - * + * * Changes are made by functions title _dependency_{dependencytype} * and more can easily be introduced by defining further functions. */ @@ -292,13 +292,13 @@ M.form.initFormDependencies = function(Y, formid, dependencies) { hide : false } } - } + }; Y.extend(dependencyManager, Y.Base, dependencyManager.prototype, { NAME : 'mform-dependency-manager' }); - + return dependencyManager; })(); return new M.form.dependencyManager(); -} \ No newline at end of file +}; \ No newline at end of file diff --git a/lib/form/searchableselector.js b/lib/form/searchableselector.js index 71db14e4bf5..06c08e1e78c 100644 --- a/lib/form/searchableselector.js +++ b/lib/form/searchableselector.js @@ -80,5 +80,5 @@ selector = { } -} +}; diff --git a/lib/form/url.js b/lib/form/url.js index cf6047e9dfa..b37f36c957b 100644 --- a/lib/form/url.js +++ b/lib/form/url.js @@ -3,7 +3,7 @@ M.form_url = {}; M.form_url.init = function(Y, options) { options.formcallback = M.form_url.callback; if (!M.core_filepicker.instances[options.client_id]) { - M.core_filepicker.init(Y, options); + M.core_filepicker.init(Y, options); } Y.on('click', function(e, client_id) { e.preventDefault(); @@ -14,4 +14,4 @@ M.form_url.init = function(Y, options) { M.form_url.callback = function (params) { document.getElementById('id_externalurl').value = params.url; -} +}; diff --git a/lib/form/yui/dateselector/dateselector.js b/lib/form/yui/dateselector/dateselector.js index 77e63f82d77..c116687c55f 100644 --- a/lib/form/yui/dateselector/dateselector.js +++ b/lib/form/yui/dateselector/dateselector.js @@ -71,7 +71,7 @@ YUI.add('moodle-form-dateselector', function(Y) { } } return ret; - } + }; /** * Calendar class @@ -80,7 +80,7 @@ YUI.add('moodle-form-dateselector', function(Y) { */ var CALENDAR = function(config) { CALENDAR.superclass.constructor.apply(this, arguments); - } + }; CALENDAR.prototype = { panel : null, yearselect : null, @@ -186,7 +186,7 @@ YUI.add('moodle-form-dateselector', function(Y) { M.form.dateselector.currentowner = null; M.form.dateselector.calendar.selectEvent.unsubscribe(this.set_selects_from_date, this); } - } + }; Y.extend(CALENDAR, Y.Base, CALENDAR.prototype, { NAME : 'Date Selector', ATTRS : { @@ -284,5 +284,5 @@ YUI.add('moodle-form-dateselector', function(Y) { } } } - + }, '@VERSION@', {requires:['base','node','overlay', 'yui2-calendar', 'moodle-form-dateselector-skin']}); \ No newline at end of file