mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
refactor(css) mv style from js
This commit is contained in:
parent
48106b93d4
commit
11860f300a
2 changed files with 9 additions and 20 deletions
|
|
@ -30,7 +30,7 @@
|
|||
<button id=contact class=cmd-button>contact</button>
|
||||
</div>
|
||||
<script>
|
||||
(function() {
|
||||
!(function() {
|
||||
'use strict';
|
||||
|
||||
var script,
|
||||
|
|
@ -45,7 +45,6 @@
|
|||
url = getJoinURL(files);
|
||||
|
||||
window.addEventListener('load', createScript);
|
||||
setHeight();
|
||||
|
||||
function createScript() {
|
||||
script = document.createElement('script');
|
||||
|
|
@ -69,24 +68,6 @@
|
|||
CloudCmd.init();
|
||||
script.removeEventListener('load', scriptLoad);
|
||||
}
|
||||
|
||||
function setHeight() {
|
||||
var style, height;
|
||||
/* устанавливаем размер высоты таблицы файлов
|
||||
* исходя из размеров разрешения экрана
|
||||
*/
|
||||
|
||||
height = screen.height;
|
||||
height -= (height / 2.5);
|
||||
|
||||
style = document.createElement('style');
|
||||
style.innerText = '.files {' +
|
||||
'height:' + height +'px;' +
|
||||
'}';
|
||||
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue