Sha256: 2dc2b0a5fdb7bf5fff9e65bff464f8ce4e12ba918e1af250db02ece03fd89c33

Contents?: true

Size: 777 Bytes

Versions: 9

Compression:

Stored size: 777 Bytes

Contents

// Overrides that implement netzkeSetReadonlyMode for form fields.
//

Ext.form.field.Base.override({
  netzkeSetReadonlyMode: function(onOff){
    if (this.hidden) return;

    if (!this.initialConfig.readOnly) {
      this.setReadOnly(onOff);
    }

    if (onOff) {
      this.addCls("readonly");
      if (this.label) this.label.addCls("readonly");
    } else {
      this.removeCls("readonly");
      if (this.label) this.label.removeCls("readonly");
    }
  }
});

// Also the FieldContainer
Ext.form.FieldContainer.override({
  netzkeSetReadonlyMode: function(onOff){
    this.items.each(function(i){
      i.netzkeSetReadonlyMode(onOff);
    });
  }
});

Ext.form.field.Checkbox.override({
  netzkeSetReadonlyMode: function(onOff){
    this.setDisabled(onOff);
  }
});

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
netzke-basepack-6.5.0.0 lib/netzke/form/base/client/readonly_mode.js
netzke-basepack-6.5.0.0.rc2 lib/netzke/form/base/client/readonly_mode.js
netzke-basepack-6.5.0.0.rc1 lib/netzke/form/base/client/readonly_mode.js
netzke-basepack-1.0.1.0 lib/netzke/form/base/client/readonly_mode.js
netzke-basepack-1.0.0.1 lib/netzke/form/base/client/readonly_mode.js
netzke-basepack-1.0.0.0 lib/netzke/form/base/client/readonly_mode.js
netzke-basepack-1.0.0.0.pre3 lib/netzke/form/base/client/readonly_mode.js
netzke-basepack-1.0.0.0.pre2 lib/netzke/form/base/client/readonly_mode.js
netzke-basepack-1.0.0.0.pre lib/netzke/form/base/client/readonly_mode.js