fixed size and selection of viewer

This commit is contained in:
coderaiser 2012-08-17 07:35:14 -04:00
parent 9aa97dd8f2
commit f3f3d380ae

View file

@ -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();
}