diff --git a/admin/javascript/jquery-changetracker/lib/jquery.changetracker.js b/admin/javascript/jquery-changetracker/lib/jquery.changetracker.js index 3c570dbb2..40306b5ff 100644 --- a/admin/javascript/jquery-changetracker/lib/jquery.changetracker.js +++ b/admin/javascript/jquery-changetracker/lib/jquery.changetracker.js @@ -90,7 +90,7 @@ * @param DOMElement field */ this.resetField = function(field) { - return $(field).removeData('changetracker.origVal'); + return $(field).removeData('changetracker.origVal').removeClass('changed'); }; /** @@ -99,7 +99,16 @@ this.getFields = function() { return this.find(options.fieldSelector).not(options.ignoreFieldSelector); }; - - return this.initialize(); + + // Support invoking "public" methods as string arguments + if (typeof arguments[0] === 'string') { + var property = arguments[1]; + var args = Array.prototype.slice.call(arguments); + args.splice(0, 1); + return this[arguments[0]].apply(this, args); + } else { + return this.initialize(); + } + }; }(jQuery)); \ No newline at end of file diff --git a/admin/javascript/jquery-changetracker/spec/.tmp_spec.html.49538~ b/admin/javascript/jquery-changetracker/spec/.tmp_spec.html.49538~ deleted file mode 100644 index 3b96db712..000000000 --- a/admin/javascript/jquery-changetracker/spec/.tmp_spec.html.49538~ +++ /dev/null @@ -1,31 +0,0 @@ - -
- - - - - - - - - - - - - -' + escape(suite.description) + ' | |||||
' + escape(spec.description) + ' | ' : + (spec.passed() && !failuresOnly) ? + '' + escape(spec.description)+ ' | ' + spec.assertionsGraph() + ' | ' : + !spec.passed() ? + '' + escape(spec.description) + + map(spec.failures(), function(a){ return '' + escape(a.message) + '' }).join('') + + ' | ' + spec.assertionsGraph() + ' | ' : + '') + + '|
' + bodyContents(spec.body) + ' |
t |