docs/default.css
[roojs1] / roojs-bootstrap.js
index eaab2aa..c28904d 100644 (file)
@@ -1075,7 +1075,7 @@ i+=1){c=J[i];if(c==='\u0000'){break;}K+=c;}return K;}return J;}});Roo.apply(Roo.
 },size:4},10:{getValue:function(A,B,C){return A.getInt32(B,C)/A.getInt32(B+4,C);},size:8}},footer:{STANDARD:[{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-left',action:'rotate-left',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-undo"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-picture',action:'picture',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-picture-o"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-right',action:'rotate-right',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-repeat"></i>'}]}],DOCUMENT:[{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-left',action:'rotate-left',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-undo"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-download',action:'download',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-download"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-crop',action:'crop',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-crop"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-trash',action:'trash',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-trash"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-right',action:'rotate-right',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-repeat"></i>'}]}],ROTATOR:[{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-left',action:'rotate-left',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-undo"></i>'}]},{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-right',action:'rotate-right',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-repeat"></i>'}]}]}});
 
 // Roo/bootstrap/DocumentManager.js
-Roo.bootstrap.DocumentManager=function(A){Roo.bootstrap.DocumentManager.superclass.constructor.call(this,A);this.addEvents({"initial":true,"inspect":true,"exception":true,"prepare":true,"remove":true,"refresh":true,"click":true,"edit":true,"beforeselectfile":true});
+Roo.bootstrap.DocumentManager=function(A){Roo.bootstrap.DocumentManager.superclass.constructor.call(this,A);this.addEvents({"initial":true,"inspect":true,"exception":true,"prepare":true,"remove":true,"refresh":true,"click":true,"edit":true,"beforeselectfile":true,"process":true});
 };Roo.extend(Roo.bootstrap.DocumentManager,Roo.bootstrap.Component,{boxes:0,inputName:'',thumbSize:300,multiple:true,files:[],method:'POST',url:'',paramName:'imageUpload',fieldLabel:'',labelWidth:4,labelAlign:'left',editable:true,delegates:[],getAutoCreate:function(){var A={tag:'div',cls:'roo-document-manager',cn:[{tag:'input',cls:'roo-document-manager-selector',type:'file'},{tag:'div',cls:'roo-document-manager-uploader',cn:[{tag:'div',cls:'roo-document-manager-upload-btn',html:'<i class="fa fa-plus"></i>'}]}]};
 var B=[{tag:'div',cls:'column col-md-12',cn:A}];if(this.fieldLabel.length){B=[{tag:'div',cls:'column col-md-12',html:this.fieldLabel},{tag:'div',cls:'column col-md-12',cn:A}];if(this.labelAlign=='left'){B=[{tag:'div',cls:'column col-md-'+this.labelWidth,html:this.fieldLabel},{tag:'div',cls:'column col-md-'+(12-this.labelWidth),cn:A}];
 }}var C={tag:'div',cls:'row clearfix',cn:B};return C;},initEvents:function(){this.managerEl=this.el.select('.roo-document-manager',true).first();this.managerEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.selectorEl=this.el.select('.roo-document-manager-selector',true).first();
@@ -1093,11 +1093,11 @@ this.progressBar.update(this.progressBar.aria_valuemax-this.delegates.length);A(
 },clear:function(){Roo.each(this.files,function(A){if(!A.target){return;}A.target.remove();},this);this.files=[];this.refresh();},onClick:function(e,el,o){e.preventDefault();this.fireEvent('click',this,o);},closable:function(A){Roo.each(this.managerEl.select('.roo-document-manager-preview > button.close',true).elements,function(el){el.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';
 if(A){el.show();return;}el.hide();},this);},xhrOnLoad:function(A){Roo.each(this.managerEl.select('.roo-document-manager-loading',true).elements,function(el){el.remove();},this);if(A.readyState!==4){this.arrange();this.fireEvent('exception',this,A);return;
 }var B=Roo.decode(A.responseText);if(!B.success){this.arrange();this.fireEvent('exception',this,A);return;}var C=this.renderPreview(B.data);this.files.push(C);this.arrange();},xhrOnError:function(){Roo.log('xhr on error');var A=Roo.decode(xhr.responseText);
-Roo.log(A);this.arrange();},process:function(A){if(this.editable&&A.type.indexOf('image')!=-1){this.fireEvent('edit',this,A);return;}this.uploadStart(A,false);return;},uploadStart:function(A,B){this.xhr=new XMLHttpRequest();if(typeof(A.id)!='undefined'&&A.id*1>0){this.arrange();
-return;}A.xhr=this.xhr;this.managerEl.createChild({tag:'div',cls:'roo-document-manager-loading',cn:[{tag:'div',tooltip:A.name,cls:'roo-document-manager-thumb',html:'<i class="fa fa-circle-o-notch fa-spin"></i>'}]});this.xhr.open(this.method,this.url,true);
-var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);};this.xhr.onerror=function(){F.xhrOnError(F.xhr);
-};var G=new FormData();G.append('returnHTML','NO');if(B){G.append('crop',B);}G.append(this.paramName,A,A.name);if(this.fireEvent('prepare',this,G)!=false){this.xhr.send(G);};},uploadCancel:function(){this.xhr.abort();this.delegates=[];Roo.each(this.managerEl.select('.roo-document-manager-loading',true).elements,function(el){el.remove();
-},this);this.arrange();},renderPreview:function(A){if(typeof(A.target)!='undefined'&&A.target){return A;}var B=this.managerEl.createChild({tag:'div',cls:'roo-document-manager-preview',cn:[{tag:'div',tooltip:A.filename,cls:'roo-document-manager-thumb',html:'<img src="'+baseURL+'/Images/Thumb/'+this.thumbSize+'/'+A.id+'/'+A.filename+'">'},{tag:'button',cls:'close',html:'<i class="fa fa-times-circle"></i>'}]});
+Roo.log(A);this.arrange();},process:function(A){if(this.fireEvent('process',this,A)!==false){if(this.editable&&A.type.indexOf('image')!=-1){this.fireEvent('edit',this,A);return;}this.uploadStart(A,false);return;}},uploadStart:function(A,B){this.xhr=new XMLHttpRequest();
+if(typeof(A.id)!='undefined'&&A.id*1>0){this.arrange();return;}A.xhr=this.xhr;this.managerEl.createChild({tag:'div',cls:'roo-document-manager-loading',cn:[{tag:'div',tooltip:A.name,cls:'roo-document-manager-thumb',html:'<i class="fa fa-circle-o-notch fa-spin"></i>'}]});
+this.xhr.open(this.method,this.url,true);var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);
+};this.xhr.onerror=function(){F.xhrOnError(F.xhr);};var G=new FormData();G.append('returnHTML','NO');if(B){G.append('crop',B);}G.append(this.paramName,A,A.name);if(this.fireEvent('prepare',this,G)!=false){this.xhr.send(G);};},uploadCancel:function(){this.xhr.abort();
+this.delegates=[];Roo.each(this.managerEl.select('.roo-document-manager-loading',true).elements,function(el){el.remove();},this);this.arrange();},renderPreview:function(A){if(typeof(A.target)!='undefined'&&A.target){return A;}var B=this.managerEl.createChild({tag:'div',cls:'roo-document-manager-preview',cn:[{tag:'div',tooltip:A.filename,cls:'roo-document-manager-thumb',html:'<img src="'+baseURL+'/Images/Thumb/'+this.thumbSize+'/'+A.id+'/'+A.filename+'">'},{tag:'button',cls:'close',html:'<i class="fa fa-times-circle"></i>'}]});
 var C=B.select('button.close',true).first();C.on('click',this.onRemove,this,A);A.target=B;var D=B.select('img',true).first();var E=this;D.dom.addEventListener("load",function(){E.onPreviewLoad(A,D);});D.on('click',this.onClick,this,A);return A;},onPreviewLoad:function(A,B){if(typeof(A.target)=='undefined'||!A.target){return;
 }var C=B.dom.naturalWidth||B.dom.width;var D=B.dom.naturalHeight||B.dom.height;if(C>D){A.target.addClass('wide');return;}A.target.addClass('tall');return;},uploadFromSource:function(A,B){this.xhr=new XMLHttpRequest();this.managerEl.createChild({tag:'div',cls:'roo-document-manager-loading',cn:[{tag:'div',tooltip:A.name,cls:'roo-document-manager-thumb',html:'<i class="fa fa-circle-o-notch fa-spin"></i>'}]});
 this.xhr.open(this.method,this.url,true);var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);