Sindbad~EG File Manager

Current Path : /var/www/html/ch.sumar.com.py/cursos/theme/snap/amd/build/
Upload File :
Current File : /var/www/html/ch.sumar.com.py/cursos/theme/snap/amd/build/model_view.min.js.map

{"version":3,"file":"model_view.min.js","sources":["../src/model_view.js"],"sourcesContent":["/**\n * 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 * @package\n * @copyright Copyright (c) 2016 Open LMS (https://www.openlms.net)\n * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * Model view handling.\n */\ndefine(['jquery', 'core/notification', 'core/templates', 'core/log'], function($, notification, templates, log) {\n    return function(element, templateName, model) {\n\n        /**\n         * Make the target's attributes identical to the sources.\n         * @param {jQuery} src\n         * @param {jQuery} target\n         * @param {bool} skipid\n         */\n        var cloneAttributes = function(src, target, skipid) {\n            var srcKeys = [];\n            $.each($(src)[0].attributes, function() {\n                if (this.name == 'data-model') {\n                    return true;\n                }\n                if (skipid && this.name == 'id') {\n                    return true;\n                }\n                srcKeys.push(this.name);\n                $(target).attr(this.name, this.value);\n                return true;\n            });\n            $.each($(target)[0].attributes, function() {\n                if (srcKeys.indexOf(this.name) == -1) {\n                    $(target).removeAttr(this.name);\n                }\n            });\n        };\n\n        /**\n         * Update element with new model.\n         * @param {null|object} newModel\n         * @param {null|function} callback\n         */\n        var updateModel = function(newModel, callback) {\n            if (!newModel) {\n                log.debug('Using data element for model');\n                newModel = $(element).data('model');\n            } else {\n                log.debug('Using object for model');\n            }\n\n            // Update model.\n            for (var m in newModel) {\n                model[m] = newModel[m];\n            }\n\n            $(element).data('model', model);\n\n            // Update element.\n            templates.render(templateName, model)\n                .done(function(result) {\n                    // Using replaceWith can be jerky as you are taking the element out of the dom instead of replacing\n                    // its content. So instead of $(cardEl).replaceWith(result); we parse the html from the template and\n                    // update the html of the card.\n                    var tempEl = $($.parseHTML(result));\n                    $(element).html(tempEl.html());\n                    cloneAttributes(tempEl, $(element), true);\n                    if (typeof (callback) === 'function') {\n                        callback();\n                    }\n                    $(element).trigger('modelUpdated');\n                }).fail(notification.exception);\n        };\n\n        /**\n         * Main initialising function - create custom modelUpdate function on element.\n         */\n        var init = function() {\n            if (!model && $(element).data('model')) {\n                model = $(element).data('model');\n            }\n            if ($(element).data('modelInitialised') != 1) {\n                $(element).on(\"modelUpdate\", function(event, newModel, callback) {\n                    updateModel(newModel, callback);\n                });\n            }\n            $(element).data('modelInitialised', 1);\n        };\n\n        init();\n    };\n});\n"],"names":["define","$","notification","templates","log","element","templateName","model","updateModel","newModel","callback","m","debug","data","render","done","result","src","target","skipid","srcKeys","tempEl","parseHTML","html","each","attributes","this","name","push","attr","value","indexOf","removeAttr","trigger","fail","exception","on","event"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBAA,+BAAO,CAAC,SAAU,oBAAqB,iBAAkB,aAAa,SAASC,EAAGC,aAAcC,UAAWC,YAChG,SAASC,QAASC,aAAcC,WAiC/BC,YAAc,SAASC,SAAUC,cAS5B,IAAIC,KARJF,SAIDL,IAAIQ,MAAM,2BAHVR,IAAIQ,MAAM,gCACVH,SAAWR,EAAEI,SAASQ,KAAK,UAMjBJ,SACVF,MAAMI,GAAKF,SAASE,GAGxBV,EAAEI,SAASQ,KAAK,QAASN,OAGzBJ,UAAUW,OAAOR,aAAcC,OAC1BQ,MAAK,SAASC,YA1CQC,IAAKC,OAAQC,OACpCC,QA6CQC,OAASpB,EAAEA,EAAEqB,UAAUN,SAC3Bf,EAAEI,SAASkB,KAAKF,OAAOE,QA/CJN,IAgDHI,OA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