1/** 2 * 2007-2019 PrestaShop 3 * 4 * NOTICE OF LICENSE 5 * 6 * This source file is subject to the Academic Free License (AFL 3.0) 7 * that is bundled with this package in the file LICENSE.txt. 8 * It is also available through the world-wide-web at this URL: 9 * http://opensource.org/licenses/afl-3.0.php 10 * If you did not receive a copy of the license and are unable to 11 * obtain it through the world-wide-web, please send an email 12 * to [email protected] so we can send you a copy immediately. 13 * 14 * DISCLAIMER 15 * 16 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 17 * versions in the future. If you wish to customize PrestaShop for your 18 * needs please refer to http://www.prestashop.com for more information. 19 * 20 * @author DMConcept <[email protected]> 21 * @copyright 2015 DMConcept 22 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) 23 * International Registered Trademark & Property of PrestaShop SA 24 * 25 * Don't forget to prefix your containers with your own identifier 26 * to avoid any conflicts with others containers. 27 */ 28 29var CONFIGURATOR = CONFIGURATOR || {}; 30CONFIGURATOR.ELEMENTS = CONFIGURATOR.ELEMENTS || {}; 31CONFIGURATOR.ELEMENTS.CHOICE = CONFIGURATOR.ELEMENTS.CHOICE || {}; 32 33CONFIGURATOR.ELEMENTS.CHOICE.ChoiceMultiple = function(step, parent){ 34 35 var Super = Object.getPrototypeOf(this); 36 37 /** 38 * TRUE means checked as default on server side 39 * FALSE otherwise 40 */ 41 this.isDefaultOption; 42 43 this.init = function(step, parent) { 44 Super.init.call(this, step, parent); 45 46 // if state is ACTIVE during init, means element is a 47 // default option (selected in backoffice) 48 this.isDefaultOption = (this.state === this.STATE.ACTIVE); 49 }; 50 51 this.updateInternal = function(data) { 52 Super.updateInternal.call(this, data); 53 54 // 55 // if defaultOption and INACTIVE, element has to provide 56 // a 'remove' operation in order to cancel default option from server 57 // when leaving "INVISIBLE" state (case of conditionnal appearance) 58 if (this.isDefaultOption && 59 this.state === this.STATE.INACTIVE) { 60 var op = this.createOperationFromState(this.state); 61 this.addOperations(op); 62 } 63 }; 64 65 if (step) { 66 this.init(step, parent); 67 } 68}; 69 70 71CONFIGURATOR.ELEMENTS.dispatch.registerObject('choice_multiple', CONFIGURATOR.ELEMENTS.CHOICE.ChoiceMultiple); 72CONFIGURATOR.ELEMENTS.CHOICE.ChoiceMultiple.prototype = new CONFIGURATOR.ELEMENTS.CHOICE.BaseChoice;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.