mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fixed size and selection of viewer
This commit is contained in:
parent
9aa97dd8f2
commit
f3f3d380ae
1 changed files with 34 additions and 10 deletions
|
|
@ -20,22 +20,34 @@ CloudCommander.Viewer.FancyBox.dir = CloudCommander.Viewer.dir +
|
|||
* different objects)
|
||||
*/
|
||||
CloudCommander.Viewer.FancyBox.getConfig = (function(){
|
||||
var lThis = this;
|
||||
return{
|
||||
beforeShow : (function(){
|
||||
CloudCommander.keyBinded = false;
|
||||
}),
|
||||
beforeClose: (function(){
|
||||
/* function do her work
|
||||
* before FauncyBox shows
|
||||
*/
|
||||
beforeShow : function(){
|
||||
CloudCommander.keyBinded = false;
|
||||
},
|
||||
|
||||
afterShow : function(){
|
||||
var lEditor = lThis.getById('CloudViewer');
|
||||
if(lEditor)
|
||||
lEditor.focus();
|
||||
},
|
||||
|
||||
beforeClose : function(){
|
||||
CloudCommander.keyBinded = true;
|
||||
}),
|
||||
|
||||
openEffect : 'none',
|
||||
closeEffect : 'none',
|
||||
},
|
||||
|
||||
openEffect : 'none',
|
||||
closeEffect : 'none',
|
||||
autoSize : false,
|
||||
height : window.innerHeight,
|
||||
helpers : {
|
||||
overlay : {
|
||||
opacity: 0.1,
|
||||
css : {
|
||||
'background-color' : '#fff'
|
||||
'background-color' : '#fff'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -55,6 +67,18 @@ CloudCommander.Viewer.FancyBox.load = (function(pThis, pCallBack){
|
|||
});
|
||||
};
|
||||
|
||||
pThis.cssSet({id:'viewer',
|
||||
inner : '#CloudViewer{' +
|
||||
'font-size: 16px;' +
|
||||
'white-space :pre' +
|
||||
'}' +
|
||||
'#CloudViewer::selection{' +
|
||||
'background: #fe57a1;' +
|
||||
'color: #fff;' +
|
||||
'text-shadow: none;' +
|
||||
'}'
|
||||
});
|
||||
|
||||
var lSrc = pThis.dir +'jquery.fancybox.pack.css';
|
||||
pThis.cssLoad({
|
||||
src : lSrc,
|
||||
|
|
@ -83,7 +107,7 @@ CloudCommander.Viewer.FancyBox.loadData = (function(pA){
|
|||
if(typeof data === 'object')
|
||||
data = JSON.stringify(data, null, 4);
|
||||
|
||||
$.fancybox('<div>' + data + '</div>', lConfig);
|
||||
$.fancybox('<div id=CloudViewer tabindex=0>' + data + '</div>', lConfig);
|
||||
|
||||
lThis.Images.hideLoad();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue