Commit 3db6dbf00fdb01df9c98c3ddfd4a03d72bfe4e96
Committed by
Gabriela Navarro
1 parent
fbc0dde9
Exists in
master
and in
56 other branches
Add 'use strict'
Showing
6 changed files
with
18 additions
and
1 deletions
Show diff stats
public/initializer.js
| @@ -5,6 +5,9 @@ var dependencies = [ | @@ -5,6 +5,9 @@ var dependencies = [ | ||
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | modulejs.define('Initializer', dependencies, function(cp, es) { | 7 | modulejs.define('Initializer', dependencies, function(cp, es) { |
| 8 | + 'use strict'; | ||
| 9 | + | ||
| 10 | + | ||
| 8 | return { | 11 | return { |
| 9 | init: function() { | 12 | init: function() { |
| 10 | if( cp.isControlPanel() ) { | 13 | if( cp.isControlPanel() ) { |
public/lib/auto-complete.js
| 1 | modulejs.define('AutoComplete', ['jquery'], function($) { | 1 | modulejs.define('AutoComplete', ['jquery'], function($) { |
| 2 | + 'use strict'; | ||
| 3 | + | ||
| 4 | + | ||
| 2 | function get_hidden_description_field(autocomplete_field, klass) { | 5 | function get_hidden_description_field(autocomplete_field, klass) { |
| 3 | var field = $(autocomplete_field); | 6 | var field = $(autocomplete_field); |
| 4 | field = field.parent().parent().find(klass); | 7 | field = field.parent().parent().find(klass); |
public/lib/noosfero-root.js
| 1 | modulejs.define('NoosferoRoot', function() { | 1 | modulejs.define('NoosferoRoot', function() { |
| 2 | + 'use strict'; | ||
| 3 | + | ||
| 4 | + | ||
| 2 | function url_with_subdirectory(url) { | 5 | function url_with_subdirectory(url) { |
| 3 | return noosfero_root() + url; | 6 | return noosfero_root() + url; |
| 4 | } | 7 | } |
| 5 | 8 | ||
| 9 | + | ||
| 6 | return { | 10 | return { |
| 7 | urlWithSubDirectory: url_with_subdirectory | 11 | urlWithSubDirectory: url_with_subdirectory |
| 8 | } | 12 | } |
public/lib/select-element.js
| 1 | modulejs.define('SelectElement', function() { | 1 | modulejs.define('SelectElement', function() { |
| 2 | + 'use strict'; | ||
| 3 | + | ||
| 4 | + | ||
| 2 | function SelectElement(name, id) { | 5 | function SelectElement(name, id) { |
| 3 | this.select = document.createElement("select"); | 6 | this.select = document.createElement("select"); |
| 4 | } | 7 | } |
public/views/control-panel.js
| 1 | modulejs.define('ControlPanel', ['jquery'], function($) { | 1 | modulejs.define('ControlPanel', ['jquery'], function($) { |
| 2 | + 'use strict'; | ||
| 3 | + | ||
| 2 | function hide_infos(){ | 4 | function hide_infos(){ |
| 3 | $(".language-info").hide(); | 5 | $(".language-info").hide(); |
| 4 | $(".database-info").hide(); | 6 | $(".database-info").hide(); |
public/views/edit-software.js
| 1 | modulejs.define('EditSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete'], function($, NoosferoRoot, AutoComplete) { | 1 | modulejs.define('EditSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete'], function($, NoosferoRoot, AutoComplete) { |
| 2 | + 'use strict'; | ||
| 3 | + | ||
| 2 | var AJAX_URL = { | 4 | var AJAX_URL = { |
| 3 | get_field_data: | 5 | get_field_data: |
| 4 | NoosferoRoot.urlWithSubDirectory("/plugin/software_communities/get_field_data"), | 6 | NoosferoRoot.urlWithSubDirectory("/plugin/software_communities/get_field_data"), |
| @@ -70,7 +72,7 @@ modulejs.define('EditSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete'], func | @@ -70,7 +72,7 @@ modulejs.define('EditSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete'], func | ||
| 70 | 72 | ||
| 71 | 73 | ||
| 72 | function display_another_license_fields(selected) { | 74 | function display_another_license_fields(selected) { |
| 73 | - if( selected == "Another" ) { | 75 | + if( selected === "Another" ) { |
| 74 | $("#another_license").removeClass("hide-field"); | 76 | $("#another_license").removeClass("hide-field"); |
| 75 | $("#version_link").addClass("hide-field"); | 77 | $("#version_link").addClass("hide-field"); |
| 76 | console.log($("#version_link")); | 78 | console.log($("#version_link")); |