Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

{"version":3,"file":"message_notification_preference.min.js","sources":["../src/message_notification_preference.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 * Controls the preference for an individual notification type on the\n * message preference page.\n *\n * @module     core_message/message_notification_preference\n * @copyright  2016 Ryan Wyllie <ryan@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core_message/notification_preference'],\n        function($, NotificationPreference) {\n\n    var SELECTORS = {\n        PREFERENCE_KEY: '[data-preference-key]',\n    };\n\n    /**\n     * Constructor for the Preference.\n     *\n     * @class\n     * @param {object} element jQuery object root element of the preference\n     * @param {int} userId The current user id\n     */\n    var MessageNotificationPreference = function(element, userId) {\n        NotificationPreference.call(this, element, userId);\n    };\n\n    /**\n     * Clone the parent prototype.\n     */\n    MessageNotificationPreference.prototype = Object.create(NotificationPreference.prototype);\n\n    /**\n     * Set constructor.\n     */\n    MessageNotificationPreference.prototype.constructor = MessageNotificationPreference;\n\n    /**\n     * Get the unique prefix key that identifies this user preference.\n     *\n     * @method getPreferenceKey\n     * @return {string}\n     */\n    MessageNotificationPreference.prototype.getPreferenceKey = function() {\n        return this.root.find(SELECTORS.PREFERENCE_KEY).attr('data-preference-key');\n    };\n\n    return MessageNotificationPreference;\n});\n"],"names":["define","$","NotificationPreference","SELECTORS","MessageNotificationPreference","element","userId","call","this","prototype","Object","create","constructor","getPreferenceKey","root","find","attr"],"mappings":";;;;;;;;AAuBAA,sDAAO,CAAC,SAAU,yCACV,SAASC,EAAGC,4BAEZC,yBACgB,wBAUhBC,8BAAgC,SAASC,QAASC,QAClDJ,uBAAuBK,KAAKC,KAAMH,QAASC,gBAM/CF,8BAA8BK,UAAYC,OAAOC,OAAOT,uBAAuBO,YAKvCG,YAAcR,8BAQtDA,8BAA8BK,UAAUI,iBAAmB,kBAChDL,KAAKM,KAAKC,KAAKZ,0BAA0Ba,KAAK,wBAGlDZ"}