ref: master
plugins/exchange/public/javascripts/exchange.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
exchange = { updateField: function (self, url, options) { jQuery.post(url, options); //FIXME show loading }, }; formSubmit = { submitingForm: null, disable: function (form, disable_text) { formSubmit.submitingForm = jQuery(form); var input = formSubmit.submitingForm.find(':submit'); input.attr('originalValue', input.val()); input.val(disable_text); input.attr('disabled', 'disabled'); }, enable: function (form) { var input = formSubmit.submitingForm.find(':submit'); input.val(input.attr('originalValue')); input.attr('originalValue', ''); input.attr('disabled', null); formSubmit.submitingForm = null; }, }; |