Your IP : 192.168.165.1


Current Path : C:/xampp/htdocs/moodle/mod/assign/amd/build/
Upload File :
Current File : C:/xampp/htdocs/moodle/mod/assign/amd/build/grading_form_change_checker.min.js.map

{"version":3,"sources":["../src/grading_form_change_checker.js"],"names":["define","$","saveFormState","selector","trigger","data","serialize","checkFormForChanges","previousdata"],"mappings":"AAwBAA,OAAM,0CAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAE3B,MAAmE,CAO/DC,aAAa,CAAE,uBAASC,CAAT,CAAmB,CAC9BF,CAAC,CAACE,CAAD,CAAD,CAAYC,OAAZ,CAAoB,iBAApB,EACA,GAAIC,CAAAA,CAAI,CAAGJ,CAAC,CAACE,CAAD,CAAD,CAAYG,SAAZ,EAAX,CACAL,CAAC,CAACE,CAAD,CAAD,CAAYE,IAAZ,CAAiB,kBAAjB,CAAqCA,CAArC,CACH,CAX8D,CAoB/DE,mBAAmB,CAAE,6BAASJ,CAAT,CAAmB,CAEpCF,CAAC,CAACE,CAAD,CAAD,CAAYC,OAAZ,CAAoB,iBAApB,EAEA,GAAIC,CAAAA,CAAI,CAAGJ,CAAC,CAACE,CAAD,CAAD,CAAYG,SAAZ,EAAX,CACIE,CAAY,CAAGP,CAAC,CAACE,CAAD,CAAD,CAAYE,IAAZ,CAAiB,kBAAjB,CADnB,CAGA,GAA4B,WAAxB,QAAOG,CAAAA,CAAX,CAAyC,CACrC,QACH,CACD,MAAQA,CAAAA,CAAY,EAAIH,CAC3B,CA/B8D,CAiCtE,CAnCK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Simple method to check for changes to a form between two points in time.\n *\n * @module     mod_assign/grading_form_change_checker\n * @package    mod_assign\n * @copyright  2016 Damyon Wiese <damyon@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since      3.1\n */\ndefine(['jquery'], function($) {\n\n    return /** @alias module:mod_assign/grading_form_change_checker */ {\n        /**\n         * Save the values in the form to a data attribute so they can be compared later for changes.\n         *\n         * @method saveFormState\n         * @param {String} selector The selector for the form element.\n         */\n        saveFormState: function(selector) {\n            $(selector).trigger('save-form-state');\n            var data = $(selector).serialize();\n            $(selector).data('saved-form-state', data);\n        },\n\n        /**\n         * Compare the current values in the form to the previously saved state.\n         *\n         * @method checkFormForChanges\n         * @param {String} selector The selector for the form element.\n         * @return {Boolean} True if there are changes to the form data.\n         */\n        checkFormForChanges: function(selector) {\n\n            $(selector).trigger('save-form-state');\n\n            var data = $(selector).serialize(),\n                previousdata = $(selector).data('saved-form-state');\n\n            if (typeof previousdata === 'undefined') {\n                return false;\n            }\n            return (previousdata != data);\n        }\n    };\n});\n"],"file":"grading_form_change_checker.min.js"}