Commit 3db6dbf00fdb01df9c98c3ddfd4a03d72bfe4e96

Authored by Fabio Teixeira
Committed by Gabriela Navarro
1 parent fbc0dde9

Add 'use strict'

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