assets/js/edge/edge.collect.js in edge_framework-0.6.0 vs assets/js/edge/edge.collect.js in edge_framework-0.6.1

- old
+ new

@@ -1,19 +1,19 @@ ;(function ($, window, document, undefined) { - 'use strict'; + "use strict"; Edge.libs.collect = { - name : 'collect', - version : '1.0', + name : "collect", + version : "1.0", settings : { ignoreIfBlank : true, debug : false, formula : {}, }, init: function( scope, method, options ) { - console.log('collect'); + console.log("collect"); // If scope isn't `document`, fetch the data if($(scope)[0] !== $(document)[0] ) { $.extend(true, this.settings, method); this.scope = scope; this.bundle = {}; @@ -23,30 +23,30 @@ } } }, fetch: function() { - console.log('fetch'); + console.log("fetch"); var self = this; - var $inputs = $(this.scope).find('input, select, textarea'); + var $inputs = $(this.scope).find("input, select, textarea"); $inputs.each(function( index ){ var $this = $(this); - var type = $this.attr('type'); - var name = $this.attr('name'); + var type = $this.attr("type"); + var name = $this.attr("name"); // Split the name and create the object - var table = name.split('_')[0]; - var column = name.split('_')[1].split(/(?=[A-Z])/); - column = column.join('_').toLowerCase(); + var table = name.split("_")[0]; + var column = name.split("_")[1].split(/(?=[A-Z])/); + column = column.join("_").toLowerCase(); // If doesn't exists, initialize it if(!self.bundle[table] ) { self.bundle[table] = {}; } // If checkbox or radio - if(type==='checkbox' || type==='radio') { - if($this.attr('checked') ) { + if(type==="checkbox" || type==="radio") { + if($this.attr("checked") ) { //console.log($this.val() ); } } else { self.bundle[table][column] = $this.val(); } \ No newline at end of file