leimnud.Package.Public({ info :{ Class :"maborak", File :"module.dom.js", Name :"dom", Type :"module", Version :"0.1" }, content :{ button:function(label,go,style,prop) { this.make=function(label,go,style,prop) { this.button = (label && label.tagName)?$(label):(new this.parent.module.dom.create("input",{ className:"module_app_button___gray", type :"button", value :label || "Button" }.concatMaborak(prop || {}),style || {})); /* this.button = $dce("input"); this.button.className="module_app_button___gray"; this.button.type="button"; this.button.value=label || "Button";*/ this.button.disable=function() { this.button.disabled=true; this.button.className="module_app_buttonjs___gray module_app_buttonDisabled___gray"; return this.button; }.extend(this); this.button.enable=function() { this.button.disabled=false; this.button.className="module_app_buttonjs___gray"; return this.button; }.extend(this); this.button.onmouseover =this.mouseover; this.button.onmouseout =this.mouseout; //this.parent.event.add(this.button,"mouseover",this.mouseover); //this.parent.event.add(this.button,"mouseout",this.mouseout); this.parent.dom.setStyle(this.button,style || {}); if(typeof go==="function"){ this.button.onmouseup=go.args(this.button); } return this.button; }; this.mouseover=function() { if(this.button.disabled==true){return false;} this.button.className="module_app_buttonjs___gray module_app_buttonHover___gray"; return false; }; this.mouseout=function() { if(this.button.disabled==true){return false;} this.button.className="module_app_buttonjs___gray"; return false; }; this.expand(); return this.make(label,go,style,prop); }, input:function(options) { this.make=function(options) { this.input = (options && options.tagName)?$(options):(new this.parent.module.dom.create("input",{ className:"module_app_input___gray", type :"text", value :options.label || "", maxLength :options.maxlength || "30" }.concatMaborak(options.properties || {}),(options.style || {}))); this.input.disable=function() { this.input.disabled=true; this.input.className=this.input.className+" module_app_inputDisabled___gray"; return this.input; }.extend(this); this.input.enable=function() { this.input.disabled=false; this.input.className=this.input.className.split(" ")[0]; return this.input; }.extend(this); this.input.passed=function() { if ('\v'=='v') //verify if is internet explorer this.input.className="module_app_inputPassed_ie___gray "+((this.input.className.split(' ')[1]) || ''); else this.input.className="module_app_inputPassed___gray "+((this.input.className.split(' ')[1]) || ''); return this.input; }.extend(this); this.input.normal=function() { this.input.className=this.input.className+" "+((this.input.className.split(' ')[1]) || ''); return this.input; }.extend(this); this.input.failed=function() { if ('\v'=='v') //verify if is internet explorer this.input.className="module_app_inputFailed_ie___gray "+((this.input.className.split(' ')[1]) || ''); else this.input.className="module_app_inputFailed___gray "+((this.input.className.split(' ')[1]) || ''); return this.input; }.extend(this); // this.parent.event.add(this.input,"mouseover",this.mouseover); // this.parent.event.add(this.input,"mouseout",this.mouseout); //this.parent.dom.setStyle(this.input,style || {}); return this.input; }; this.mouseover=function() { this.input.className="module_app_input___gray module_app_inputHover___gray"; return false; }; this.mouseout=function() { this.input.className="module_app_input___gray"; return false; }; this.expand(); return this.make(options || {}); }, select:function(options) { this.options = { data:[], selected:0, properties:{}, style:{} }.concatMaborak(options || {}); this.make=function() { this.select = new this.parent.module.dom.create("select",this.options.properties,this.options.style); this.select.className="module_app_select___gray"; this.makeData(); this.select.selected=function() { return this.select.options[this.select.selectedIndex]; }.extend(this); this.select.clear=function() { var a = this.select.options; var b = a.length; for(var i=0;i