diff --git a/public/initializer.js b/public/initializer.js index d9fbc47..20b50d8 100644 --- a/public/initializer.js +++ b/public/initializer.js @@ -5,6 +5,9 @@ var dependencies = [ modulejs.define('Initializer', dependencies, function(cp, es) { + 'use strict'; + + return { init: function() { if( cp.isControlPanel() ) { diff --git a/public/lib/auto-complete.js b/public/lib/auto-complete.js index 0db1ac3..f96c04b 100644 --- a/public/lib/auto-complete.js +++ b/public/lib/auto-complete.js @@ -1,4 +1,7 @@ modulejs.define('AutoComplete', ['jquery'], function($) { + 'use strict'; + + function get_hidden_description_field(autocomplete_field, klass) { var field = $(autocomplete_field); field = field.parent().parent().find(klass); diff --git a/public/lib/noosfero-root.js b/public/lib/noosfero-root.js index 80eb793..cd3c8bf 100644 --- a/public/lib/noosfero-root.js +++ b/public/lib/noosfero-root.js @@ -1,8 +1,12 @@ modulejs.define('NoosferoRoot', function() { + 'use strict'; + + function url_with_subdirectory(url) { return noosfero_root() + url; } + return { urlWithSubDirectory: url_with_subdirectory } diff --git a/public/lib/select-element.js b/public/lib/select-element.js index 8f0691a..26880ae 100644 --- a/public/lib/select-element.js +++ b/public/lib/select-element.js @@ -1,4 +1,7 @@ modulejs.define('SelectElement', function() { + 'use strict'; + + function SelectElement(name, id) { this.select = document.createElement("select"); } diff --git a/public/views/control-panel.js b/public/views/control-panel.js index deb2910..b3cabdb 100644 --- a/public/views/control-panel.js +++ b/public/views/control-panel.js @@ -1,4 +1,6 @@ modulejs.define('ControlPanel', ['jquery'], function($) { + 'use strict'; + function hide_infos(){ $(".language-info").hide(); $(".database-info").hide(); diff --git a/public/views/edit-software.js b/public/views/edit-software.js index 022d37b..d920747 100644 --- a/public/views/edit-software.js +++ b/public/views/edit-software.js @@ -1,4 +1,6 @@ modulejs.define('EditSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete'], function($, NoosferoRoot, AutoComplete) { + 'use strict'; + var AJAX_URL = { get_field_data: NoosferoRoot.urlWithSubDirectory("/plugin/software_communities/get_field_data"), @@ -70,7 +72,7 @@ modulejs.define('EditSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete'], func function display_another_license_fields(selected) { - if( selected == "Another" ) { + if( selected === "Another" ) { $("#another_license").removeClass("hide-field"); $("#version_link").addClass("hide-field"); console.log($("#version_link")); -- libgit2 0.21.2