- loadSpinner.remove();
-
- $( mw ).trigger( 'LivePreviewDone', [copyElements] );
- } );
-};
-
-// Shamelessly stolen from the jQuery form plugin, which is licensed under the GPL.
-// http://jquery.malsup.com/form/#download
-$.fn.formToArray = function() {
- var a = [];
- if (this.length == 0) return a;
-
- var form = this[0];
- var els = form.elements;
- if (!els) return a;
- for(var i=0, max=els.length; i < max; i++) {
- var el = els[i];
- var n = el.name;
- if (!n) continue;
-
- var v = $.fieldValue(el, true);
- if (v && v.constructor == Array) {
- for(var j=0, jmax=v.length; j < jmax; j++)
- a.push({name: n, value: v[j]});
- }
- else if (v !== null && typeof v != 'undefined')
- a.push({name: n, value: v});
- }
-
- if (form.clk) {
- // input type=='image' are not found in elements array! handle it here
- var $input = $(form.clk), input = $input[0], n = input.name;
- if (n && !input.disabled && input.type == 'image') {
- a.push({name: n, value: $input.val()});
- a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+ $( mw ).trigger( 'LivePreviewDone', [copyElements] );
+ } );
+ };
+
+ // Shamelessly stolen from the jQuery form plugin, which is licensed under the GPL.
+ // http://jquery.malsup.com/form/#download
+ $.fn.formToArray = function() {
+ var a = [];
+ if (this.length == 0) return a;
+
+ var form = this[0];
+ var els = form.elements;
+ if (!els) return a;
+ for(var i=0, max=els.length; i < max; i++) {
+ var el = els[i];
+ var n = el.name;
+ if (!n) continue;
+
+ var v = $.fieldValue(el, true);
+ if (v && v.constructor == Array) {
+ for(var j=0, jmax=v.length; j < jmax; j++)
+ a.push({name: n, value: v[j]});
+ }
+ else if (v !== null && typeof v != 'undefined')
+ a.push({name: n, value: v});