diff --git a/gulliver/js/maborak/core/maborak.js b/gulliver/js/maborak/core/maborak.js index c4096a993..8cc4f40d9 100644 --- a/gulliver/js/maborak/core/maborak.js +++ b/gulliver/js/maborak/core/maborak.js @@ -2,7 +2,7 @@ var maborak=function(forceCssLoad){this.info={version:"0.3",name:"maborak",file:"maborak"+((BROWSER_CACHE_FILES_UID!="")?"."+BROWSER_CACHE_FILES_UID:"")+".js"},this.forceCssLoad=forceCssLoad?true:false;this.make=function(options) {this.protoCore();this.module={debug:function(flag){this.flag=flag||false;this.log=function(v) {if(typeof console!='undefined'&&this.flag===true) -{console.log(v||'');}};return this;}}.expand(this);this.options={thisIsNotPM:false}.concat(options||{});this.report=new this.bitacora();this.loadMethods([this.checkBrowser],this);this.event=this.factory(this.mantis,true);this.tools=this.factory(this.extended.tools,true);this.file=this.factory(this.fileCore,true);this.dom=this.factory(this.extended.D0M,true);this.iphone=this.factory(this.iphoneBrowser,true);this.cookie=this.factory(this.extended.cookie,true);this.Package=new this.PackageCore(this,this.file.db);this.report.add("Class loaded.");this.info.base=this.tools.baseJS(this.info.file);this.info.images=this.info.base+"images/";this.path_root=this.tools.path_root(this.info.base)+"/";if(this.options.modules){this.Package.Load(this.options.modules,{Instance:this,Type:"module"});} +{console.log(v||'');}};return this;}}.expand(this);this.options={thisIsNotPM:false}.concatMaborak(options||{});this.report=new this.bitacora();this.loadMethods([this.checkBrowser],this);this.event=this.factory(this.mantis,true);this.tools=this.factory(this.extended.tools,true);this.file=this.factory(this.fileCore,true);this.dom=this.factory(this.extended.D0M,true);this.iphone=this.factory(this.iphoneBrowser,true);this.cookie=this.factory(this.extended.cookie,true);this.Package=new this.PackageCore(this,this.file.db);this.report.add("Class loaded.");this.info.base=this.tools.baseJS(this.info.file);this.info.images=this.info.base+"images/";this.path_root=this.tools.path_root(this.info.base)+"/";if(this.options.modules){this.Package.Load(this.options.modules,{Instance:this,Type:"module"});} if(this.options.files){this.Package.Load(this.options.files,{Type:"file"});} this.exec(this.fix.memoryLeak);if(this.forceCssLoad===true){var st=$dce('link');st.rel='stylesheet';st.type='text/css';st.href=this.info.base+'stylesheet/default.css';this.dom.capture("tag.head 0").appendChild(st);} this.expand(this);return this;};this.factory=function(Class,create) @@ -75,7 +75,7 @@ return this;};Array.prototype.toSelect=function() {var s=[];for(var i=0;i0;i--) {this.name=this.toLoad[this.toLoad.length-i];if(!this.isset()){tl.push(this.name);this.write(false);}}} @@ -367,7 +367,7 @@ return[pageWidth,pageHeight];};this.serializer=this.parent.factory(function(DOM, {};this.rake=function(val) {if(!val){return val;} if(typeof val==="object") -{this.serialized.concat(val);} +{this.serialized.concatMaborak(val);} else {this.serialized+=val;} return true;};this.form=function() diff --git a/gulliver/js/maborak/core/maborak.loader.js b/gulliver/js/maborak/core/maborak.loader.js index b87e81c97..7d0e7242b 100644 --- a/gulliver/js/maborak/core/maborak.loader.js +++ b/gulliver/js/maborak/core/maborak.loader.js @@ -1,7 +1,7 @@ leimnud.Package.Public({info:{Class:"maborak",File:"module.panel.js",Name:"panel",Type:"module",Version:"1.0.5"},content:function(options) {this.uid=this.parent.tools.createUID();this.zIndex=0;this.stepZindex=5;this.controlSize={w:15,h:15};this.elements={};this.setStyle={};this.events={};this.tab={};this.showing={};this.make=function() -{this.makeTmpDB();this.options={statusBar:false,titleBar:true,cursorToDrag:"default",elementToDrag:"title",strict_position:true}.concat(this.options||{});this.options.fx={blinkToFront:true,shadow:true,opacity:true,modal:false,fadeIn:false,fadeOut:false,drag:true}.concat(this.options.fx||{});this.options.control={resize:false,close:true,drag:true}.concat(this.options.control||{});this.options.statusBar=(this.options.statusBarButtons||this.options.control.resize)?true:this.options.statusBar;this.options.size={w:200,h:200}.concat(this.options.size||{});this.options.position={x:20,y:20}.concat(this.options.position||{});this.makeTheme();this.elements.containerWindow=$dce("div");this.elements.containerWindow.className="panel_containerWindow___"+this.getTheme("containerWindow");this.styles.containerWindow();if(this.options.fx.fadeIn===true) +{this.makeTmpDB();this.options={statusBar:false,titleBar:true,cursorToDrag:"default",elementToDrag:"title",strict_position:true}.concatMaborak(this.options||{});this.options.fx={blinkToFront:true,shadow:true,opacity:true,modal:false,fadeIn:false,fadeOut:false,drag:true}.concatMaborak(this.options.fx||{});this.options.control={resize:false,close:true,drag:true}.concatMaborak(this.options.control||{});this.options.statusBar=(this.options.statusBarButtons||this.options.control.resize)?true:this.options.statusBar;this.options.size={w:200,h:200}.concatMaborak(this.options.size||{});this.options.position={x:20,y:20}.concatMaborak(this.options.position||{});this.makeTheme();this.elements.containerWindow=$dce("div");this.elements.containerWindow.className="panel_containerWindow___"+this.getTheme("containerWindow");this.styles.containerWindow();if(this.options.fx.fadeIn===true) {this.parent.dom.opacity(this.elements.containerWindow,0);} this.target().appendChild(this.elements.containerWindow);this.elements.frontend=$dce("div");this.elements.frontend.className="panel_frontend___"+this.getTheme("frontend");this.styles.frontend();this.elements.containerWindow.appendChild(this.elements.frontend);this.elements.titleBar=$dce("div");this.elements.titleBar.className="panel_titleBar___"+this.getTheme("titleBar");this.parent.exec(this.styles.titleBar,false,false,this);this.elements.frontend.appendChild(this.elements.titleBar);this.elements.title=$dce("div");this.elements.title.className="panel_title___"+this.getTheme("title");this.parent.exec(this.styles.title,false,false,this);this.elements.title.innerHTML=this.options.title||"";this.elements.titleBar.appendChild(this.elements.title);this.elements.headerBar=$dce("div");this.elements.headerBar.className="panel_headerBar___"+this.getTheme("headerBar");this.styles.headerBar();this.elements.frontend.appendChild(this.elements.headerBar);this.elements.tab=$dce("div");this.elements.tab.className="panel_tab___"+this.getTheme("tab");this.elements.content=$dce("div");this.elements.content.className="panel_content___"+this.getTheme("content");this.elements.loader=$dce("div");this.elements.loader.className="panel_loader___"+this.getTheme("loader");this.elements.frontend.appendChild(this.elements.content);this.elements.frontend.appendChild(this.elements.tab);this.elements.frontend.appendChild(this.elements.loader);this.elements.statusBar=$dce("div");this.elements.statusBar.className="panel_statusBar___"+this.getTheme("statusBar");this.styles.statusBar();this.elements.frontend.appendChild(this.elements.statusBar);this.elements.statusButtons=$dce("div");this.elements.statusButtons.className="panel_statusButtons___"+this.getTheme("statusButtons");this.styles.statusButtons();this.elements.statusBar.appendChild(this.elements.statusButtons);this.elements.status=$dce("div");this.elements.status.innerHTML=" ";this.elements.status.className="panel_status___"+this.getTheme("status");this.parent.exec(this.styles.status,false,false,this);this.elements.statusBar.appendChild(this.elements.status);this.elements.resize=$dce("div");this.elements.resize.className="panel_resize___"+this.getTheme("resize");this.styles.resize();this.elements.statusBar.appendChild(this.elements.resize);this.makeStatusButtons();this.parent.exec(this.styles.loader,false,false,this);this.parent.exec(this.styles.tab,false,false,this);this.parent.exec(this.styles.content,false,false,this);this.elements.backend=$dce("div");this.elements.backend.className="panel_backend___"+this.getTheme("backend");this.parent.exec(this.styles.backend,false,false,this);this.elements.containerWindow.appendChild(this.elements.backend);if(this.parent.browser.isIE) {this.elements.iframe=$dce("iframe");this.elements.iframe.className="panel_iframe___"+this.getTheme("iframe");this.elements.iframe.frameBorder="no";this.elements.iframe.scrolling="no";this.elements.iframe.src="about:blank";this.parent.exec(this.styles.iframe,false,false,this);this.elements.backend.appendChild(this.elements.iframe);} @@ -26,7 +26,7 @@ if(this.options.fx.rolled) {var b=new button(t[i].value||"Button");this.elements.statusBarButtons.push(b);this.elements.statusButtons.appendChild(b);}}};this.blink=function(){if(this.zIndexthis.options.images.length-1)?0:index;index=(index<0)?this.options.images.length-1:index;this.current=index;this.setLoad();var image=new Image();image.onload=this.show.args(image);image.src=this.options.images[index];if(this.options.counter) {this.domCounter.innerHTML=""+(index+1)+" de "+(this.options.images.length-1)+"";}};this.show=function(evt,image) @@ -353,7 +353,7 @@ this.inPlay=!this.inPlay;},next:function(){this.load(this.current+1);},previous: {this.load(0);},last:function() {this.load(this.options.images.length-1);}}.expand(this);this.expand(this);},slide:function() {this.inPlay=false;this.last=false;this.elements={};this.stopped=false;this.inM=0;this.make=function(options) -{this.options={initIn:0,counter:true,playTimeOut:3,tactil:false,target:document.body,resize:true,size:{w:522,h:363},position:{x:0,y:30,centerX:true},skin_images:this.parent.info.base+"images/app.slide/",images:[]}.concat(options||{});this.options.thumbnail={show:4,size:{w:90,h:55},images:[]}.concat(options.thumbnail||{});this.windowImage();this.toolbarImage();this.image=$dce("img");this.panel.elements.content.appendChild(this.image);this.load(this.options.initIn);this.current=this.options.initIn;};this.windowImage=function() +{this.options={initIn:0,counter:true,playTimeOut:3,tactil:false,target:document.body,resize:true,size:{w:522,h:363},position:{x:0,y:30,centerX:true},skin_images:this.parent.info.base+"images/app.slide/",images:[]}.concatMaborak(options||{});this.options.thumbnail={show:4,size:{w:90,h:55},images:[]}.concatMaborak(options.thumbnail||{});this.windowImage();this.toolbarImage();this.image=$dce("img");this.panel.elements.content.appendChild(this.image);this.load(this.options.initIn);this.current=this.options.initIn;};this.windowImage=function() {this.panel=new this.parent.module.panel();this.panel.options={size:this.options.size,position:this.options.position,target:this.options.target,statusBar:false,titleBar:false,limit:true,control:{drag:false,close:false},fx:{shadow:false,modal:true,opacity:true,rolled:false,rollWidth:150}};this.panel.events={remove:function(){var el=[this.domNext,this.domPlay,this.domPrev,this.buttonNext,this.domCounter,this.domTitle,this.domClose,this.toolbar,this.footer];if(this.options.banner) {el.push(this.banner);} new this.parent.module.fx.fade().make({duration:200,end:0,dom:el,onFinish:function(el){this.parent.dom.remove(el);}.extend(this,el)});}.extend(this)};this.panel.setStyle={content:{overflow:"hidden",textAlign:"center",verticalAlign:"center",margin:10,marginBottom:40,border:"1px solid #fff"},containerWindow:{border:"0px solid black",backgroundColor:"transparent"},modal:{backgroundColor:"black"},shadow:{backgroundColor:"black"},frontend:{background:"",backgroundColor:"#ECECEC"},backend:{backgroundColor:"transparent"},titleBar:{background:"transparent"},title:{textAlign:"left",color:"white"}};this.panel.styles.fx.opacityModal.Static=90;this.panel.make();if(this.options.tactil) @@ -407,19 +407,19 @@ else {this.Null=true;new this.parent.module.fx.algorithm().make({transition:"sineInOut",duration:1000,begin:this.toolbar.scrollLeft,end:this.toolbar.scrollLeft+((this.options.thumbnail.size.w*4)+(4*4)),onTransition:function(fx){this.toolbar.scrollLeft=fx.result;}.extend(this),onFinish:function(fx){this.toolbar.scrollLeft=fx.options.end;var t=this.current+1;this.load(t);this.Null=false;}.extend(this)});}}.expand(this);this.expand(this);},box:function() {this.panel=new this.parent.module.panel();this.panel.options={size:{w:300,h:200},title:"Prueba panel",headerBar:true,titleBar:false,elementToDrag:"backend",position:{x:5,y:5,center:true},fx:{shadow:false,modal:true,opacity:false}};this.panel.setStyle={containerWindow:{border:"0px solid red"},frontend:{backgroundColor:"transparent"},content:{margin:0,border:"0px solid red",borderLeft:"1px solid #DADADA",borderRight:"1px solid #DADADA",backgroundColor:"white"},headerBar:{display:''},statusBar:{}};this.panel.styles.fx.opacityModal.Static=0;this.panel.make();this.panel.elements.headerBar.className="boxTopPanel";this.panel.elements.headerBar.innerHTML="
 
 
 
";this.panel.elements.statusBar.className="boxBottom";this.panel.elements.statusBar.innerHTML="
 
 
 
";return this.panel;},confirm:function() {this.make=function(options) -{var lb=(typeof G_STRINGS!=='undefined')?G_STRINGS:{};var label={accept:lb.ACCEPT||"Aceptar",cancel:lb.CANCEL||"Cancelar"};this.panel=new this.parent.module.panel();this.options={action:function(){}}.concat(options||{});this.panel.options={statusBarButtons:[{value:label.accept},{value:label.cancel}],position:{center:true},size:{w:(typeof(options.width)!='undefined')?options.width:350,h:(typeof(options.height)!='undefined')?options.height:100},control:{close:true,resize:false},fx:{modal:true}};this.panel.setStyle={content:{padding:10,paddingBottom:2,textAlign:"left",paddingLeft:50,background:"url("+this.parent.info.images+"question.png)",backgroundRepeat:"no-repeat",backgroundPosition:"10 50%",backgroundColor:"transparent",borderWidth:0}};this.panel.make();this.panel.addContent(this.options.label||"");this.panel.fixContent();this.panel.elements.statusBarButtons[0].onmouseup=function() +{var lb=(typeof G_STRINGS!=='undefined')?G_STRINGS:{};var label={accept:lb.ACCEPT||"Aceptar",cancel:lb.CANCEL||"Cancelar"};this.panel=new this.parent.module.panel();this.options={action:function(){}}.concatMaborak(options||{});this.panel.options={statusBarButtons:[{value:label.accept},{value:label.cancel}],position:{center:true},size:{w:(typeof(options.width)!='undefined')?options.width:350,h:(typeof(options.height)!='undefined')?options.height:100},control:{close:true,resize:false},fx:{modal:true}};this.panel.setStyle={content:{padding:10,paddingBottom:2,textAlign:"left",paddingLeft:50,background:"url("+this.parent.info.images+"question.png)",backgroundRepeat:"no-repeat",backgroundPosition:"10 50%",backgroundColor:"transparent",borderWidth:0}};this.panel.make();this.panel.addContent(this.options.label||"");this.panel.fixContent();this.panel.elements.statusBarButtons[0].onmouseup=function() {this.options.action();this.panel.remove();return false;}.extend(this);this.panel.elements.statusBarButtons[1].onmouseup=function() {if(this.options.cancel) {this.options.cancel();} this.panel.remove();return false;}.extend(this);this.panel.events={remove:function(){}.extend(this)};};},alert:function() {this.make=function(options) -{var lb=(typeof G_STRINGS!=='undefined')?G_STRINGS:{};var label={accept:lb.ACCEPT||"Aceptar"};this.panel=new this.parent.module.panel();this.options={action:function(){},target:document.body}.concat(options||{});this.panel.options={statusBarButtons:[{value:label.accept}],target:this.options.target,position:{center:true},size:{w:(typeof(options.width)!='undefined')?options.width:300,h:(typeof(options.height)!='undefined')?options.height:110},control:{close:true,resize:false},fx:{modal:true}};this.panel.setStyle={content:{padding:10,paddingBottom:2,textAlign:"left",paddingLeft:65,background:"url("+this.parent.info.images+"warning.png)",backgroundRepeat:"no-repeat",backgroundPosition:"10 50%",backgroundColor:"transparent",borderWidth:0}};this.panel.make();this.panel.addContent(this.options.label||"");this.panel.fixContent();this.panel.elements.statusBarButtons[0].onmouseup=function() +{var lb=(typeof G_STRINGS!=='undefined')?G_STRINGS:{};var label={accept:lb.ACCEPT||"Aceptar"};this.panel=new this.parent.module.panel();this.options={action:function(){},target:document.body}.concatMaborak(options||{});this.panel.options={statusBarButtons:[{value:label.accept}],target:this.options.target,position:{center:true},size:{w:(typeof(options.width)!='undefined')?options.width:300,h:(typeof(options.height)!='undefined')?options.height:110},control:{close:true,resize:false},fx:{modal:true}};this.panel.setStyle={content:{padding:10,paddingBottom:2,textAlign:"left",paddingLeft:65,background:"url("+this.parent.info.images+"warning.png)",backgroundRepeat:"no-repeat",backgroundPosition:"10 50%",backgroundColor:"transparent",borderWidth:0}};this.panel.make();this.panel.addContent(this.options.label||"");this.panel.fixContent();this.panel.elements.statusBarButtons[0].onmouseup=function() {this.options.action();this.panel.remove();return false;}.extend(this);return this;};},info:function() {this.make=function(options) -{var lb=(typeof G_STRINGS!=='undefined')?G_STRINGS:{};var label={accept:lb.ACCEPT||"Aceptar"};this.panel=new this.parent.module.panel();this.options={action:function(){},target:document.body}.concat(options||{});this.panel.options={statusBarButtons:[{value:label.accept}],target:this.options.target,position:{center:true},size:{w:(typeof(options.width)!='undefined')?options.width:300,h:(typeof(options.height)!='undefined')?options.height:110},control:{close:true,resize:false},fx:{modal:true}};this.panel.setStyle={content:{padding:10,paddingBottom:2,textAlign:"left",paddingLeft:65,background:"url("+this.parent.info.images+"info.png)",backgroundRepeat:"no-repeat",backgroundPosition:"10 50%",backgroundColor:"transparent",borderWidth:0}};this.panel.make();this.panel.addContent(this.options.label||"");this.panel.fixContent();this.panel.elements.statusBarButtons[0].onmouseup=function() +{var lb=(typeof G_STRINGS!=='undefined')?G_STRINGS:{};var label={accept:lb.ACCEPT||"Aceptar"};this.panel=new this.parent.module.panel();this.options={action:function(){},target:document.body}.concatMaborak(options||{});this.panel.options={statusBarButtons:[{value:label.accept}],target:this.options.target,position:{center:true},size:{w:(typeof(options.width)!='undefined')?options.width:300,h:(typeof(options.height)!='undefined')?options.height:110},control:{close:true,resize:false},fx:{modal:true}};this.panel.setStyle={content:{padding:10,paddingBottom:2,textAlign:"left",paddingLeft:65,background:"url("+this.parent.info.images+"info.png)",backgroundRepeat:"no-repeat",backgroundPosition:"10 50%",backgroundColor:"transparent",borderWidth:0}};this.panel.make();this.panel.addContent(this.options.label||"");this.panel.fixContent();this.panel.elements.statusBarButtons[0].onmouseup=function() {this.options.action();this.panel.remove();return false;}.extend(this);return this;};},prompt:function() {this.make=function(options) -{var lb=(typeof G_STRINGS!=='undefined')?G_STRINGS:{};var label={accept:lb.ACCEPT||"Aceptar",cancel:lb.CANCEL||"Cancelar"};this.panel=new this.parent.module.panel();this.options={action:function(){},value:""}.concat(options||{});this.panel.options={statusBarButtons:[{value:label.accept},{value:label.cancel}],position:{center:true},size:{w:300,h:110},control:{close:true,resize:false},fx:{modal:true}};this.panel.setStyle={content:{padding:10,paddingBottom:2,textAlign:"left",paddingLeft:50,background:"url("+this.parent.info.images+"question.png)",backgroundRepeat:"no-repeat",backgroundPosition:"10 50%",backgroundColor:"transparent",borderWidth:0}};this.panel.events={remove:this.functionOnFALSE};this.panel.make();this.panel.addContent(this.options.label||"");this.panel.addContent("
");this.input=$dce("input");this.input.type="text" +{var lb=(typeof G_STRINGS!=='undefined')?G_STRINGS:{};var label={accept:lb.ACCEPT||"Aceptar",cancel:lb.CANCEL||"Cancelar"};this.panel=new this.parent.module.panel();this.options={action:function(){},value:""}.concatMaborak(options||{});this.panel.options={statusBarButtons:[{value:label.accept},{value:label.cancel}],position:{center:true},size:{w:300,h:110},control:{close:true,resize:false},fx:{modal:true}};this.panel.setStyle={content:{padding:10,paddingBottom:2,textAlign:"left",paddingLeft:50,background:"url("+this.parent.info.images+"question.png)",backgroundRepeat:"no-repeat",backgroundPosition:"10 50%",backgroundColor:"transparent",borderWidth:0}};this.panel.events={remove:this.functionOnFALSE};this.panel.make();this.panel.addContent(this.options.label||"");this.panel.addContent("
");this.input=$dce("input");this.input.type="text" this.parent.dom.setStyle(this.input,{font:"normal 8pt Tahoma,MiscFixed",color:"#000",width:"100%",marginTop:3,backgroundColor:"white",border:"1px solid #919B9C"});this.panel.addContent(this.input);this.input.value=this.options.value;this.input.focus();this.input.onkeyup=function(evt) {var evt=(window.event)?window.event:evt;var key=(evt.which)?evt.which:evt.keyCode;if(key==13) {this.functionOnTRUE();} @@ -500,7 +500,7 @@ this.open();return true;};this.open=function() {for(var i=0;i