Sindbad~EG File Manager

Current Path : /var/www/html/ceade.tocsa.com.py/user/amd/build/
Upload File :
Current File : /var/www/html/ceade.tocsa.com.py/user/amd/build/unified_filter.min.js.map

{"version":3,"file":"unified_filter.min.js","sources":["../src/unified_filter.js"],"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 * Unified filter page JS module for the course participants page.\n *\n * @deprecated since Moodle 3.9 MDL-68612 - user unified filter replaced by participants filter.\n * @module     core_user/unified_filter\n * @copyright  2017 Jun Pataleta\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/form-autocomplete', 'core/str', 'core/notification'],\n        function($, Autocomplete, Str, Notification) {\n\n    /**\n     * Selectors.\n     *\n     * @access private\n     * @type {{UNIFIED_FILTERS: string}}\n     */\n    var SELECTORS = {\n        UNIFIED_FILTERS: '#unified-filters'\n    };\n\n    /**\n     * Init function.\n     *\n     * @deprecated since Moodle 3.9 MDL-68612 - user unified filter replaced by participants filter.\n     * @method init\n     * @private\n     */\n    var init = function() {\n        var stringkeys = [\n            {\n                key: 'userfilterplaceholder',\n                component: 'moodle'\n            },\n            {\n                key: 'nofiltersapplied',\n                component: 'moodle'\n            }\n        ];\n\n        M.util.js_pending('unified_filter_datasource');\n        Str.get_strings(stringkeys).done(function(langstrings) {\n            var placeholder = langstrings[0];\n            var noSelectionString = langstrings[1];\n            Autocomplete.enhance(SELECTORS.UNIFIED_FILTERS, true, 'core_user/unified_filter_datasource', placeholder,\n                false, true, noSelectionString, true)\n            .then(function() {\n                M.util.js_complete('unified_filter_datasource');\n\n                return;\n            })\n            .fail(Notification.exception);\n        }).fail(Notification.exception);\n\n        var last = $(SELECTORS.UNIFIED_FILTERS).val();\n        $(SELECTORS.UNIFIED_FILTERS).on('change', function() {\n            var current = $(this).val();\n            var listoffilters = [];\n            var textfilters = [];\n            var updatedselectedfilters = false;\n\n            $.each(current, function(index, catoption) {\n                var catandoption = catoption.split(':', 2);\n                if (catandoption.length !== 2) {\n                    textfilters.push(catoption);\n                    return true; // Text search filter.\n                }\n\n                var category = catandoption[0];\n                var option = catandoption[1];\n\n                // The last option (eg. 'Teacher') out of a category (eg. 'Role') in this loop is the one that was last\n                // selected, so we want to use that if there are multiple options from the same category. Eg. The user\n                // may have chosen to filter by the 'Student' role, then wanted to filter by the 'Teacher' role - the\n                // last option in the category to be selected (in this case 'Teacher') will come last, so will overwrite\n                // 'Student' (after this if). We want to let the JS know that the filters have been updated.\n                if (typeof listoffilters[category] !== 'undefined') {\n                    updatedselectedfilters = true;\n                }\n\n                listoffilters[category] = option;\n                return true;\n            });\n\n            // Check if we have something to remove from the list of filters.\n            if (updatedselectedfilters) {\n                // Go through and put the list into something we can use to update the list of filters.\n                var updatefilters = [];\n                for (var category in listoffilters) {\n                    updatefilters.push(category + \":\" + listoffilters[category]);\n                }\n                updatefilters = updatefilters.concat(textfilters);\n                $(this).val(updatefilters);\n            }\n\n            // Prevent form from submitting unnecessarily, eg. on blur when no filter is selected.\n            if (last.join(',') != current.join(',')) {\n                this.form.submit();\n            }\n        });\n    };\n\n    /**\n     * Return the unified user filter form.\n     *\n     * @deprecated since Moodle 3.9 MDL-68612 - user unified filter replaced by participants filter.\n     * @method getForm\n     * @return {DOMElement}\n     */\n    var getForm = function() {\n        return $(SELECTORS.UNIFIED_FILTERS).closest('form');\n    };\n\n    return /** @alias module:core/form-autocomplete */ {\n        /**\n         * Initialise the unified user filter.\n         *\n         * @method init\n         */\n        init: function() {\n            init();\n        },\n\n        /**\n         * Return the unified user filter form.\n         *\n         * @method getForm\n         * @return {DOMElement}\n         */\n        getForm: function() {\n            return getForm();\n        }\n    };\n});\n"],"names":["define","$","Autocomplete","Str","Notification","SELECTORS","init","M","util","js_pending","get_strings","key","component","done","langstrings","placeholder","noSelectionString","enhance","then","js_complete","fail","exception","last","val","on","current","this","listoffilters","textfilters","updatedselectedfilters","each","index","catoption","catandoption","split","length","push","category","option","updatefilters","concat","join","form","submit","getForm","closest"],"mappings":";;;;;;;;AAuBAA,kCAAO,CAAC,SAAU,yBAA0B,WAAY,sBAChD,SAASC,EAAGC,aAAcC,IAAKC,kBAQ/BC,0BACiB,yBA+F8B,CAM/CC,KAAM,YA3FC,WAYPC,EAAEC,KAAKC,WAAW,6BAClBN,IAAIO,YAZa,CACb,CACIC,IAAK,wBACLC,UAAW,UAEf,CACID,IAAK,mBACLC,UAAW,YAKSC,MAAK,SAASC,iBAClCC,YAAcD,YAAY,GAC1BE,kBAAoBF,YAAY,GACpCZ,aAAae,QAAQZ,2BAA2B,EAAM,sCAAuCU,aACzF,GAAO,EAAMC,mBAAmB,GACnCE,MAAK,WACFX,EAAEC,KAAKW,YAAY,gCAItBC,KAAKhB,aAAaiB,cACpBD,KAAKhB,aAAaiB,eAEjBC,KAAOrB,EAAEI,2BAA2BkB,MACxCtB,EAAEI,2BAA2BmB,GAAG,UAAU,eAClCC,QAAUxB,EAAEyB,MAAMH,MAClBI,cAAgB,GAChBC,YAAc,GACdC,wBAAyB,KAE7B5B,EAAE6B,KAAKL,SAAS,SAASM,MAAOC,eACxBC,aAAeD,UAAUE,MAAM,IAAK,MACZ,IAAxBD,aAAaE,cACbP,YAAYQ,KAAKJ,YACV,MAGPK,SAAWJ,aAAa,GACxBK,OAASL,aAAa,eAOa,IAA5BN,cAAcU,YACrBR,wBAAyB,GAG7BF,cAAcU,UAAYC,QACnB,KAIPT,uBAAwB,KAEpBU,cAAgB,OACf,IAAIF,YAAYV,cACjBY,cAAcH,KAAKC,SAAW,IAAMV,cAAcU,WAEtDE,cAAgBA,cAAcC,OAAOZ,aACrC3B,EAAEyB,MAAMH,IAAIgB,eAIZjB,KAAKmB,KAAK,MAAQhB,QAAQgB,KAAK,WAC1BC,KAAKC,YAuBdrC,IASJsC,QAAS,kBAnBF3C,EAAEI,2BAA2BwC,QAAQ"}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists