Does the code hilite work?
September9
this is gonna be some php code ready fools?
and this should be javascript
ProcessButton= new Class({
Extends : Widget.Button,
initialize : function(element, click, options) {
this.parent(element, click);
this.options = $extend({
ready : 'btn.add',
processing : 'btn.close',
done : 'btn.done'
},options);
this._setText(ProcessButton.States.ready);
},
setState : function(state, text) {
this._setText(state, text);
},
_setText : function(state, text) {
this.state = state;
if (text) this.options[this.state] = text;
this.setText(this.options[this.state].localize());
},
click : function() {
if (this.state == ProcessButton.States.done) return;
var states = ProcessButton.States;
this._setText(states[((this.state == states.ready)?'processing':'ready')]);
this.clickAction(this);
},
done : function() {
this._setText(ProcessButton.States.done);
this.select();
}
});