refactor(view) mv css to view.css

This commit is contained in:
coderaiser 2014-04-24 07:06:39 -04:00
parent 587906a0dc
commit 527758b9e9
2 changed files with 35 additions and 41 deletions

26
css/view.css Normal file
View file

@ -0,0 +1,26 @@
.view {
font-size: 16px;
white-space :pre;
outline: 0;
}
.view::selection {
background: #b3d4fc;
text-shadow: none;
}
#fancybox-loading div {
background: none;
width: 0;
height: 0;
}
.view-overlay {
background: rgb(255, 255, 255);
background: rgba(255, 255, 255, 0.1);
display: block;
}
.fancybox-wrap {
/*
* when search element with
* document.elementFromPoint
*/
z-index: 1
}

View file

@ -61,7 +61,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
Config.parent = Overlay = DOM.anyload({
id : 'js-view',
name : 'div',
className : 'fancybox-overlay fancybox-overlay-fixed'
className : 'view-overlay fancybox-overlay fancybox-overlay-fixed'
});
Events.addClick(Util.bind(onOverLayClick, Overlay), Overlay);
@ -76,7 +76,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
config = {};
if (!Loading) {
Element = $('<div id=view tabindex=0>');
Element = $('<div class="view" tabindex=0>');
if (data) {
element = $(Element).append(data);
@ -200,53 +200,21 @@ var CloudCmd, Util, DOM, CloudFunc, $;
* @callback - executes, when everything loaded
*/
function load(callback) {
var dir = CloudCmd.LIBDIRCLIENT + 'view/fancyBox/source/',
files = [
var dir = CloudCmd.LIBDIRCLIENT + 'view/fancyBox/source/',
js = dir + 'jquery.fancybox.js',
cssFiles = [
dir + 'jquery.fancybox.css',
dir + 'jquery.fancybox.js'
];
'/css/view.css'
],
css = CloudFunc.getJoinURL(cssFiles);
Util.time(Name + ' load');
DOM.anyLoadOnLoad([files], function() {
DOM.anyLoadOnLoad([js, css], function() {
Util.timeEnd(Name + ' load');
Loading = false;
Util.exec(callback);
})
.cssSet({id:'view-css',
inner : '#view {' +
'font-size: 16px;' +
'white-space :pre;' +
'outline: 0;' +
'}' +
'#view::selection {' +
/*
'background: #fe57a1;'
'color: #fff;'
*/
'background: #b3d4fc;' +
'text-shadow: none;' +
'}' +
'#fancybox-loading div {' +
'background: none;' +
'width: 0;' +
'height: 0' +
'}' +
'.fancybox-overlay {' +
'background: rgba(255, 255, 255, 0.1);' +
'display: block;' +
'}' +
'.fancybox-lock .fancybox-overlay {' +
'overflow-y: hidden' +
'}' +
'.fancybox-wrap {' +
/* when search element with
* document.elementFromPoint
*/
'z-index: 1' +
'}'
});
}
function onOverLayClick(overlay) {