{{{ onQuickFormEvent()
325453
function onQuickFormEvent($event, $arg, &$caller)
    {
        if ('updateValue' == $event) {
            $value = $this->_findValue($caller->_constantValues);
            if (null === $value) {
                $value = $this->_findValue($caller->_submitValues);
                // Fix for bug #4465 & #5269
                // XXX: should we push this to element::onQuickFormEvent()?
                if (null === $value && (!$caller->isSubmitted() || !$this->getMultiple())) {
                    $value = $this->_findValue($caller->_defaultValues);
                }
            }
            if (null !== $value) {
                $this->setValue($value);
            }
            return true;
        } else {
            return parent::onQuickFormEvent($event, $arg, $caller);
        }
    }
1255608
function (cfg) {
            var listeners = cfg.on;

            this._chainListener(listeners, "tapstart", {
                fn : this._manageEvents,
                scope : this
            });

            this._chainListener(listeners, "tapcancel", {
                fn : this._manageEvents,
                scope : this
            });

            this._chainListener(listeners, "tap", {
                fn : this._manageEvents,
                scope : this
            });
        }
1325697
function deferFormSubmit(evt, form, callback){
  var timeout = 500;
  // Fire listener and catch possible response (return false)
  var cbResponse = callback(evt);

  // If prevented within callback, bail
  if (('boolean' === typeof cbResponse && cbResponse === false) || evt.defaultPrevented || evt.returnValue === false) {
    if (evt.preventDefault) {
      evt.preventDefault();
    }
    evt.returnValue = false;
    return false;
  }
  // Defer and replay event
  else {
    if (evt.preventDefault) {
      evt.preventDefault();
    }
    evt.returnValue = false;
    if (typeof cbResponse !== 'undefined') {
      if (navigator && navigator.sendBeacon) {
        form.submit();
        return;
      }
      // promise
      cbResponse.then(() => {
        form.submit();
      }).catch(err => {
        // submit form anyway - to not let user hanging
        form.submit();
      });
    } else {
      setTimeout(function(){
        form.submit();
      }, timeout);
    }
  }

  return false;
}
304985
function onActivateEvent() {
         if (this.animatedTilesets === undefined) {
           this.animatedTilesets = [];
         }

         if (this.tilesets) {
           var tileset = this.tilesets.tilesets;

           for (var i = 0; i < tileset.length; i++) {
             if (tileset[i].isAnimated) {
               this.animatedTilesets.push(tileset[i]);
             }
           }
         }

         this.isAnimated = this.animatedTilesets.length > 0; // Force pre-render off when tileset animation is used

         if (this.isAnimated) {
           this.preRender = false;
         } // Resize the bounding rect


         this.getBounds().resize(this.width, this.height);
       }
568525
function () {
                var eventListeners = this._cfg.on, hasListeners = false, listArray;
                var delegateManager = ariaUtilsDelegate;
                var delegateFallbackEvents = [];

                for (var listener in eventListeners) {
                    if (eventListeners.hasOwnProperty(listener)) {
                        hasListeners = true;
                        if (!delegateManager.isDelegated(listener)) {
                            delegateFallbackEvents.push(listener);
                        }
                        listArray = eventListeners[listener];
                        if (!ariaUtilsType.isArray(listArray)) {
                            listArray = [listArray];
                        }
                        for (var i = 0, listCount = listArray.length; i < listCount; i++) {
                            listArray[i] = this.$normCallback.call(this._context._tpl, listArray[i]);
                        }
                        eventListeners[listener] = listArray;
                    }
                }

                if (hasListeners) {
                    this.__delegateId = delegateManager.add({
                        fn : this._delegate,
                        scope : this
                    });
                    this.__delegateFallbackEvents = delegateFallbackEvents;
                }
            }
180060
function() {
    // Get new value
    var inputValue = this.getInputValue();
    var validValue = inputValue;
    
    // Validate new value
    if(this.validator) {
        validValue = this.validator.call(this.getDataTable(), inputValue, this.value, this);
        if(validValue === undefined ) {
            if(this.resetInvalidData) {
                this.resetForm();
            }
            this.fireEvent("invalidDataEvent",
                    {editor:this, oldData:this.value, newData:inputValue});
            return;
        }
    }
        
    var oSelf = this;
    var finishSave = function(bSuccess, oNewValue) {
        var oOrigValue = oSelf.value;
        if(bSuccess) {
            // Update new value
            oSelf.value = oNewValue;
            oSelf.getDataTable().updateCell(oSelf.getRecord(), oSelf.getColumn(), oNewValue);
            
            // Hide CellEditor
            oSelf.getContainerEl().style.display = "none";
            oSelf.isActive = false;
            oSelf.getDataTable()._oCellEditor =  null;
            
            oSelf.fireEvent("saveEvent",
                    {editor:oSelf, oldData:oOrigValue, newData:oSelf.value});
        }
        else {
            oSelf.resetForm();
            oSelf.fireEvent("revertEvent",
                    {editor:oSelf, oldData:oOrigValue, newData:oNewValue});
        }
        oSelf.unblock();
    };
    
    this.block();
    if(lang.isFunction(this.asyncSubmitter)) {
        this.asyncSubmitter.call(this, finishSave, validValue);
    } 
    else {   
        finishSave(true, validValue);
    }
}
1213452
function(event){
        if (typeof event == "string"){
            event = { type: event };
        }
        if (!event.target){
            event.target = this;
        }

        if (!event.type){
            throw new Error("Event object missing 'type' property.");
        }

        if (this._handlers[event.type] instanceof Array){
            var handlers = this._handlers[event.type];
            for (var i=0, len=handlers.length; i < len; i++){
                handlers[i].call(this, event);
            }
        }
    }
1313158
function onQuickFormEvent($event, $arg, &$caller)
    {
        switch ($event) {
            case 'updateValue':
                $this->_createElementsIfNotExist();
                foreach (array_keys($this->_elements) as $key) {
                    if ($this->_appendName) {
                        $elementName = $this->_elements[$key]->getName();
                        if (is_null($elementName)) {
                            $this->_elements[$key]->setName($this->getName());
                        } elseif ('' === $elementName) {
                            $this->_elements[$key]->setName($this->getName() . '[' . $key . ']');
                        } else {
                            $this->_elements[$key]->setName($this->getName() . '[' . $elementName . ']');
                        }
                    }
                    $this->_elements[$key]->onQuickFormEvent('updateValue', $arg, $caller);
                    if ($this->_appendName) {
                        $this->_elements[$key]->setName($elementName);
                    }
                }
                break;

            default:
                parent::onQuickFormEvent($event, $arg, $caller);
        }
        return true;
    }
1019567
private void formMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseClicked
        streamPanel.setHighlightedOutlierPanel(this);
        showInfo();
        streamPanel.setHighlightedOutlierPanel(null);
    }
393573
function onQuickFormEvent($event, $arg, &$caller)
    {
        switch ($event) {
            case 'createElement':
                $caller->setType($arg[0], PARAM_TAGLIST);
                break;
        }
        return parent::onQuickFormEvent($event, $arg, $caller);
    }
766081
function onModEnter(
    event: *,
    change: Change,
    editor: *,
    opts: Options
): void | Change {
    const { value } = change;
    if (!value.isCollapsed) {
        return undefined;
    }

    event.preventDefault();

    const exitBlock = Block.create({
        type: opts.exitBlockType,
        nodes: [Text.create('')]
    });

    const table = TablePosition.create(opts, value.document, value.startKey)
        .table;
    const tableParent = value.document.getParent(table.key);
    const insertionIndex = tableParent.nodes.indexOf(table) + 1;

    return change
        .insertNodeByKey(tableParent.key, insertionIndex, exitBlock)
        .collapseToStartOf(exitBlock);
}
79885
function onQuickFormEvent($event, $arg, &$caller) {
        $this->setMoodleForm($caller);
        switch ($event) {
            case 'updateValue':
                // constant values override both default and submitted ones
                // default values are overriden by submitted
                $value = $this->_findValue($caller->_constantValues);
                if (null === $value) {
                    // if no boxes were checked, then there is no value in the array
                    // yet we don't want to display default value in this case
                    if ($caller->isSubmitted()) {
                        $value = $this->_findValue($caller->_submitValues);
                    } else {
                        $value = $this->_findValue($caller->_defaultValues);
                    }
                }
                if (!is_array($value)) {
                    list($number, $unit) = $this->seconds_to_unit($value);
                    $value = array('number' => $number, 'timeunit' => $unit);
                    // If optional, default to off, unless a date was provided
                    if ($this->_options['optional']) {
                        $value['enabled'] = $number != 0;
                    }
                } else {
                    $value['enabled'] = isset($value['enabled']);
                }
                if (null !== $value){
                    $this->setValue($value);
                }
                break;

            case 'createElement':
                if ($arg[2]['optional']) {
                    $caller->disabledIf($arg[0], $arg[0] . '[enabled]');
                }
                $caller->setType($arg[0] . '[number]', PARAM_FLOAT);
                return parent::onQuickFormEvent($event, $arg, $caller);
                break;

            default:
                return parent::onQuickFormEvent($event, $arg, $caller);
        }
    }
452427
function on(evt, handler) {
            var _this = this;

            var thisArg = arguments[2] === undefined ? null : arguments[2];

            // if multiple events are passed, call our utility method `eachEvt` to deal with this.
            // if it returns `true`, we should exit, because we're actually being called recursively.
            // If it returns `false`, we're not being called with multiple parameters (this time, anyway),
            // and so can continue processing.
            if (eachEvt(evt, handler, thisArg, function () {
                for (var _len2 = arguments.length, _ = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
                    _[_key2] = arguments[_key2];
                }

                return _this.on.apply(_this, _);
            })) {
                return this;
            } // simplify typing; eH = eventHandlers
            var eH = this[_eventHandlers];

            if (!eH.has(evt)) {
                // if we don't have an event category already in the map, create it as a new map
                // this map will be of the form bindingObject:methods.
                eH.set(evt, new core.Map());
            }

            // simplify typing; objMap == objectMap (bindingObject:methods)
            var objMap = eH.get(evt);

            if (!objMap.has(thisArg)) {
                // if we don't have `thisArg` in the map, make a set for it. The set is the set of functions
                // and we use a set so as to prevent duplicates automatically.
                objMap.set(thisArg, new core.Set());
            }
            var handlerSet = objMap.get(thisArg);

            if (typeof handler === "function") {
                // add the handler
                handlerSet.add(handler);
            } else {
                // a little error checking!
                throw new TypeError("Event handler must be a function.");
            }

            return this;
        }
25945
function() {

		this.Element$informInDOM();

		var input_element = this.getDOMElement();
		Firestorm.Element.addListener(input_element, "onpropertychange", this._OldIE_property_change_callback);
		Firestorm.Element.addListener(input_element, "selectionchange", this._OldIE_refresh_callback);
		Firestorm.Element.addListener(input_element, "keyup", this._OldIE_refresh_callback);
		Firestorm.Element.addListener(input_element, "keydown", this._OldIE_refresh_callback);

	}
879924
function onQuickFormEvent($event, $arg, &$caller)
    {
        switch ($event) {
            case 'createElement':
                $choices=array();
                $choices[0] = get_string('no');
                $choices[1] = get_string('yes');
                $this->load($choices);
                break;
        }
        return parent::onQuickFormEvent($event, $arg, $caller);
    }
562029
function initJQueryEvents(){
    $('#searchDiv').parent().scroll(function() {
        if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight - 100) {
            globalFunc.addNodesInList();
        }
    });

    $('#toggleLayout').click(function() {
        toggleLayout();
    });

    $("#sliderText").html("Context with <strong>2</strong> hops");

    $("#slider").slider({
        range: "max",
        min: 0,
        max: 10,
        value: 2,
        slide: function (event, ui){
            var strHops = " hop";
            if (ui.value > 1){
                strHops = " hops";
            }
            $("#sliderText").html("Context with <strong>" + ui.value + "</strong>" + strHops);
            NB_HOPS = ui.value;
        }
    });
}
975647
function () {
                this.$InputElement.initWidget.call(this);

                var bindings = this._cfg.bind;
                if (bindings.value) {
                    var newValue = this._transform(bindings.value.transform, bindings.value.inside[bindings.value.to], "toWidget");
                    if (newValue != null) {
                        this._domElt.value = newValue;
                    }
                } else {
                    this.$logWarn(this.BINDING_NEEDED, [this.$class, "value"]);
                }
                this._setPlaceholder();
            }