Secret value change events handler
427853
def _secret_event_value_changed_cb(conn, secret, opaque):
    '''
    
    '''
    _salt_send_event(opaque, conn, {
        'secret': {
            'uuid': secret.UUIDString()
        },
        'event': opaque['event']
    })
254488
function onChange(changedPath, event) {
       var _ref = path.extname(changedPath),
           action = cssExtensions.indexOf(_ref) >= 0 ? 'updateCSS' : 'reload';
       //first change is with delayTime delay , thereafter only once there has been no further changes for guardTime seconds

       //validate the change
       if (customOnChange.validate) {
           if (!customOnChange.validate(changedPath, event,action)) { return ;} //ignore changes if the app says-so
       }

       //avoid multiple rapid changes
       var delay=delayTime;
       if (lastRun[action].guardTime) { clearTimeout(lastRun[action].guardTime); delay=guardTime;}
       if (lastRun[action].delayTime) { clearTimeout(lastRun[action].delayTime); delay=delayTime;}
       lastRun[action].delayTime = setTimeout(function(){
           onChangeFiltered(changedPath, event, action);
           lastRun[action].guardTime = setTimeout(function(){
               lastRun[action].guardTime=null;
               }, delay);
            lastRun[action].delayTime=null;
           }, delay);

       return Date.now();
     }
323694
@UiHandler("m_everyDay")
    void onEveryDayValueChange(ValueChangeEvent<String> event) {

        if (handleChange()) {
            m_controller.setDayOfMonth(event.getValue());
        }

    }
923136
@UiHandler("m_seriesCheckBox")
    void onSeriesChange(ValueChangeEvent<Boolean> event) {

        if (handleChange()) {
            m_controller.setIsSeries(event.getValue());
        }
    }
778311
function stopWatchingForValueChange() {
	  if (!activeElement) {
	    return;
	  }

	  // delete restores the original property definition
	  delete activeElement.value;

	  if (activeElement.detachEvent) {
	    activeElement.detachEvent('onpropertychange', handlePropertyChange);
	  } else {
	    activeElement.removeEventListener('propertychange', handlePropertyChange, false);
	  }

	  activeElement = null;
	  activeElementInst = null;
	  activeElementValue = null;
	  activeElementValueProp = null;
	}
163647
function(key, value, options) {
            var attrs, subattrs, scope, changes, newattributes, diffs;

            // Handle both `"key", value` and `{key: value}` -style arguments.
            if (typeof key === 'object') {
                attrs = key;
                options = value;
            } else {
                attrs = {};
                scope = key.split(".");
                subattrs = attrs;
                for (var i in scope) {
                    var key = scope[i];
                    if (i == (scope.length - 1)) {
                        subattrs[key] = value;
                    } else {
                        subattrs[key] = {};
                        subattrs = subattrs[key];
                    }
                }
            }

            // Define options
            options = _.defaults(options || {}, {
                silent: false
            });

            // Calcul new attributes
            newattributes = _.deepExtend({}, this.attributes || {}, attrs);
            if (!options.silent) {
                diffs = jsondiffpatch.diff(this._prevAttributes || {}, newattributes);
            }
            this.attributes = newattributes;
            this._prevAttributes = _.deepClone(this.attributes);

            // New unique id
            var oldId = this.id;
            if (this.idAttribute in this.attributes) {
                this.id = this.attributes[this.idAttribute];
            } else {
                this.id = this.cid;
            }
            if (oldId != this.id) this.trigger("id", this.id, oldId);

            // Calcul diffs
            if (!options.silent) {
                diffs = _.diffkeys(diffs);
                _.each(diffs, function(tag) {
                    this.trigger("change:"+tag, tag);
                }, this);
                if (diffs.length > 0) this.trigger("set", diffs);
            }

            return this;
        }
847811
function(value, fn) {
        if(value.constructor === Function ) {
            this.default_handler = value;
        } else if(value.constructor === Number) {
            this.on_args[value] = fn;
        } else {
            this.on_switches[value] = fn;
        }
    }
1177022
def getChanges(self, request):
        
        expected_secret = isinstance(self.options, dict) and self.options.get('secret')
        if expected_secret:
            received_secret = request.getHeader(_HEADER_GITLAB_TOKEN)
            received_secret = bytes2unicode(received_secret)

            p = Properties()
            p.master = self.master
            expected_secret_value = yield p.render(expected_secret)

            if received_secret != expected_secret_value:
                raise ValueError("Invalid secret")
        try:
            content = request.content.read()
            payload = json.loads(bytes2unicode(content))
        except Exception as e:
            raise ValueError("Error loading JSON: " + str(e))
        event_type = request.getHeader(_HEADER_EVENT)
        event_type = bytes2unicode(event_type)
        # newer version of gitlab have a object_kind parameter,
        # which allows not to use the http header
        event_type = payload.get('object_kind', event_type)
        codebase = request.args.get(b'codebase', [None])[0]
        codebase = bytes2unicode(codebase)
        if event_type in ("push", "tag_push", "Push Hook"):
            user = payload['user_name']
            repo = payload['repository']['name']
            repo_url = payload['repository']['url']
            changes = self._process_change(
                payload, user, repo, repo_url, event_type, codebase=codebase)
        elif event_type == 'merge_request':
            changes = self._process_merge_request_change(
                payload, event_type, codebase=codebase)
        else:
            changes = []
        if changes:
            log.msg("Received {} changes from {} gitlab event".format(
                len(changes), event_type))
        return (changes, 'git')
176704
function(key, value, options) {
      var attrs, attr, val;

      // Handle both `"key", value` and `{key: value}` -style arguments.
      if (_.isObject(key) || key == null) {
        attrs = key;
        options = value;
      } else {
        attrs = {};
        attrs[key] = value;
      }

      // Extract attributes and options.
      options || (options = {});
      if (!attrs) return this;
      if (attrs instanceof Model) attrs = attrs.attributes;
      if (options.unset) for (attr in attrs) attrs[attr] = void 0;

      // Run validation.
      if (!this._validate(attrs, options)) return false;

      // Check for changes of `id`.
      if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];

      var changes = options.changes = {};
      var now = this.attributes;
      var escaped = this._escapedAttributes;
      var prev = this._previousAttributes || {};

      // For each `set` attribute...
      for (attr in attrs) {
        val = attrs[attr];

        // If the new and current value differ, record the change.
        if (!_.isEqual(now[attr], val) || (options.unset && _.has(now, attr))) {
          delete escaped[attr];
          (options.silent ? this._silent : changes)[attr] = true;
        }

        // Update or delete the current value.
        options.unset ? delete now[attr] : now[attr] = val;

        // If the new and previous value differ, record the change.  If not,
        // then remove changes for this attribute.
        if (!_.isEqual(prev[attr], val) || (_.has(now, attr) != _.has(prev, attr))) {
          this.changed[attr] = val;
          if (!options.silent) this._pending[attr] = true;
        } else {
          delete this.changed[attr];
          delete this._pending[attr];
        }
      }

      // Fire the `"change"` events.
      if (!options.silent) this.change(options);
      return this;
    }
1201362
function (oEvent) {
			var sValue = oEvent.getParameter("value"),
				oControl = oEvent.getSource();
			this._storage.put(this._LOCAL_STORAGE_KEYS.CUSTOM_URL, sValue);
			try {
				this._validateValue(oControl.getValue());
				this._resetValueState(oControl);
			} catch (oException) {
				this._showError(oControl, oException.message);
			}
		}
705179
function getValueChangeOption(objectBody, keyChange, changeOption, objectReturn) {
    let value = objectBody[keyChange] ? objectBody[keyChange] : changeOption.$default;
    if (changeOption.$get) {
        return isJsonString(value) ? JSON.parse(value) : value;
    }
    if (changeOption.$update) {
        return changeOption.$update(value, objectReturn)
    }
    if (changeOption.$set) {
        return changeOption.$set;
    }
}
763023
function(){
      if (this.locked)
      {
        this.locked--;

        if (!this.locked)
        {
          var lockedValue = this.lockedValue_;

          this.lockedValue_ = null;

          if (this.value !== lockedValue)
            this.emit_change(lockedValue);
        }
      }
    }
199479
function(key, oldval, value) {
    if (store._changed_keys.indexOf(key) === -1) {
      store._changed_keys.push(key)
    }

    // suppress active timeout (if any)
    if (store._debounce_timeout) {
      store._clearDebounceTimeout()
    }

    if (store.options.debounce_ms) {
      // delay event emission and set new timeout id
      store._debounce_timeout = setTimeout(store._publish, store.options.debounce_ms)
    } else {
      // publish immediately
      store._publish()
    }
  }
308471
function SecretSubkey(date=new Date()) {
  secretKey.call(this, date);
  this.tag = enums.packet.secretSubkey;
}
1015230
function _handleKeyEvent(event) {
        var i, handled = false;
        for (i = _globalKeydownHooks.length - 1; i >= 0; i--) {
            if (_globalKeydownHooks[i](event)) {
                handled = true;
                break;
            }
        }
        _detectAltGrKeyDown(event);
        if (!handled && _handleKey(_translateKeyboardEvent(event))) {
            event.stopPropagation();
            event.preventDefault();
        }
    }
483988
function(value, silent) {
			var events = silent ? [] : ['change'];
	
			debounce_events(this, events, function() {
				this.clear();
				this.addItems(value, silent);
			});
		}
308935
public void onValueChange(ValueChangeEvent<String> event) {

        String message = null;
        boolean enableOk = true;
        if (m_isCreateNew) {
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_fileName.getFormValueAsString())) {
                enableOk = false;
                message = Messages.get().key(Messages.GUI_EDIT_LINK_NO_FILE_NAME_0);
            } else if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_linkContent.getFormValueAsString())) {
                enableOk = false;
                message = Messages.get().key(Messages.GUI_EDIT_LINK_NO_LINK_0);
            }
        } else {
            if ((m_linkContent.getFormValueAsString().equals(m_previousLink)
                && (m_linkTitle.getFormValueAsString().equals(m_previousTitle)))) {
                enableOk = false;
                message = Messages.get().key(Messages.GUI_EDIT_LINK_NO_CHANGES_0);
            } else if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_linkContent.getFormValueAsString())) {
                enableOk = false;
                message = Messages.get().key(Messages.GUI_EDIT_LINK_NO_LINK_0);
            }
        }
        setOkEnabled(enableOk, message);
    }