rem: var oldval = this[id]; var el = this.element; if (oldval != newval) { switch (id) { case "enabled": if (newval) { HTMLArea._removeClass(el, "buttonDisabled"); el.disabled = false; } else { HTMLArea._addClass(el, "buttonDisabled"); el.disabled = true; } break; case "active": if (newval) { HTMLArea._addClass(el, "buttonPressed"); } else { HTMLArea._removeClass(el, "buttonPressed"); } break; } this[id] = newval; } }; 
add: var oldval = this[id]; var el = this.element; if (oldval != newval) { switch (id) { case "enabled": if (newval) { HTMLArea._removeClass(el, "buttonDisabled"); el.disabled = false; } else { HTMLArea._addClass(el, "buttonDisabled"); el.disabled = true; } break; case "active": if (newval) { HTMLArea._addClass(el, "buttonPressed"); } else { HTMLArea._removeClass(el, "buttonPressed"); } break; } this[id] = newval; } }; 
context:   function setButtonStatus(id, newval) {    var oldval = this[id];    var el = this.element;    if (oldval != newval) {      switch (id) {          case "enabled":        if (newval) {          HTMLArea._removeClass(el, "buttonDisabled");          el.disabled = false;        } else {          HTMLArea._addClass(el, "buttonDisabled");          el.disabled = true;        }        break;          case "active":        if (newval) {          HTMLArea._addClass(el, "buttonPressed");        } else {          HTMLArea._removeClass(el, "buttonPressed");        }        break;      }      this[id] = newval;    }  }; // END of function: setButtonStatus
meta: 7119	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7119/4d968a51f578e3361a382d6fa8372e519c47ba55/htmlarea.js/clean/phpgwapi/js/htmlarea/htmlarea.js