Skip to content
Snippets Groups Projects
Commit 634c52b9 authored by xamgore's avatar xamgore Committed by PavelBegunkov
Browse files

Move auxiliary functions to main js module

parent 12dd9429
Branches
Tags
No related merge requests found
......@@ -11,6 +11,16 @@ $.postJSON = function (url, data, callback) {
return $.post(url, data, callback, 'json');
};
$.fn.extend({
turnOn: function () {
return $(this).prop('disabled', false)
},
turnOff: function () {
return $(this).prop('disabled', true)
},
});
var Auth = (function () {
var allowRequest = true;
......
......@@ -22,15 +22,7 @@ $(document).ready(function () {
sum += parseInt(0 + ( asText ? $(this).text() : $(this).val() ))
});
return sum;
},
turnOn: function () {
return $(this).prop('disabled', false)
},
turnOff: function () {
return $(this).prop('disabled', true)
},
}
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment