fullscreen

This commit is contained in:
Van 2014-09-24 16:25:26 +08:00
parent f3da865383
commit 2bff023550
5 changed files with 123 additions and 78 deletions

View File

@ -16,10 +16,14 @@
"Workspace": "{pwd}/data/user_workspaces/admin", "Workspace": "{pwd}/data/user_workspaces/admin",
"LatestSessionContent": { "LatestSessionContent": {
"FileTree": [ "FileTree": [
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest" "E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest",
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\time",
"D:\\go\\src\\pkg",
"D:\\go\\src\\pkg\\archive"
], ],
"Files": [ "Files": [
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\1123" "E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\1123",
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\time\\main.go"
], ],
"CurrentFile": "E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\1123" "CurrentFile": "E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\1123"
} }

View File

@ -153,43 +153,31 @@ ul {
/* end tabs */ /* end tabs */
/* start framework */ /* start framework */
.menu {
background-color: #F0F0F0;
border-bottom: 1px solid #A5A5A5;
height: 25px;
}
.content { .content {
position: relative; position: relative;
} }
.side { .side {
background-color: #FFF;
width: 20%; width: 20%;
position: absolute; position: absolute;
border-right: 1px solid #9B9B9B; border-right: 1px solid #9B9B9B;
height: 100%; height: 100%;
} }
.ztree { .side-fullscreen {
position: absolute;
overflow: auto;
width: 100%; width: 100%;
padding: 0; z-index: 1000;
}
.main {
width: 80%;
position: absolute;
left: 20%;
}
.footer {
border-top: 1px solid #919191;
background-color: #F0F0F0;
} }
/* end framework */ /* end framework */
/* start menu */ /* start menu */
.menu {
background-color: #F0F0F0;
border-bottom: 1px solid #A5A5A5;
height: 25px;
}
.menu > ul > li { .menu > ul > li {
float: left; float: left;
} }
@ -218,8 +206,12 @@ ul {
/* start editor */ /* start editor */
.edit-panel { .edit-panel {
width: 80%;
position: absolute;
left: 20%;
background-color: #D7D7D7; background-color: #D7D7D7;
width: 100% width: 80%;
height: 70%;
} }
.edit-header .ico { .edit-header .ico {
@ -238,6 +230,24 @@ ul {
/* end editor */ /* end editor */
/* start bottom-window-group */ /* start bottom-window-group */
.bottom-window-group {
width: 80%;
position: absolute;
left: 20%;
width: 80%;
height: 30%;
top: 70%;
background-color: #fff;
}
.bottom-window-group-fullscreen {
height: 100%;
left: 0;
top: -1px;
width: 100%;
z-index: 1000;
}
.bottom-window-group .tabs { .bottom-window-group .tabs {
background-color: #E6E6E6; background-color: #E6E6E6;
border-top: 1px solid #A4A4A4; border-top: 1px solid #A4A4A4;
@ -256,22 +266,15 @@ ul {
color: #FFF; color: #FFF;
} }
.bottom-window-group .tabs-panel {
height: 133px;
}
.bottom-window-group textarea.output { .bottom-window-group textarea.output {
border-width: 0; border-width: 0;
background-color: #FFF; background-color: #FFF;
color: #555555; color: #555555;
width: 100%; width: 100%;
height: 132px;
} }
.bottom-window-group .notification, .bottom-window-group .notification,
.bottom-window-group .search, .bottom-window-group .search {
.bottom-window-group .output {
height: 133px;
overflow: auto; overflow: auto;
} }
@ -292,6 +295,11 @@ ul {
/* end bottom-window-group */ /* end bottom-window-group */
/* start footer */ /* start footer */
.footer {
border-top: 1px solid #919191;
background-color: #F0F0F0;
}
.notification-count { .notification-count {
float: right; float: right;
display: none; display: none;

View File

@ -1,4 +1,11 @@
/* start tree */ /* start tree */
.ztree {
position: absolute;
overflow: auto;
width: 100%;
padding: 0;
}
.ztree li a.curSelectedNode { .ztree li a.curSelectedNode {
background-color: #3875d7; background-color: #3875d7;
border-width: 0; border-width: 0;

View File

@ -210,10 +210,12 @@ var wide = {
}); });
}, },
_initLayout: function () { _initLayout: function () {
var mainH = $(window).height() - $(".menu").height() - $(".footer").height() - 2; var mainH = $(window).height() - $(".menu").height() - $(".footer").height() - 2,
bottomH = Math.floor(mainH * 0.3);
$(".content, .ztree").height(mainH); $(".content, .ztree").height(mainH);
$(".edit-panel").height(mainH - $(".bottom-window-group").height()); $(".bottom-window-group .output, notification").height(bottomH - 23);
$(".bottom-window-group .notification, .bottom-window-group .search").height(bottomH - 20);
}, },
_initBottomWindowGroup: function () { _initBottomWindowGroup: function () {
this.bottomWindowTab = new Tabs({ this.bottomWindowTab = new Tabs({
@ -294,10 +296,34 @@ var wide = {
console.log('[output onerror] ' + e); console.log('[output onerror] ' + e);
}; };
}, },
init: function () { _initFullscreen: function () {
this._initWS(); $(".bottom-window-group .tabs").dblclick(function () {
var $it = $(".bottom-window-group");
if ($it.hasClass("bottom-window-group-fullscreen")) {
$(".bottom-window-group").removeClass("bottom-window-group-fullscreen");
this._initLayout(); } else {
var bottomH = $(".content, .ztree").height();
$(".bottom-window-group .output, notification").height(bottomH - 22);
$(".bottom-window-group .notification, .bottom-window-group .search").height(bottomH - 19);
$(".bottom-window-group").addClass("bottom-window-group-fullscreen");
}
});
$(".side").dblclick(function () {
var $it = $(this);
if ($it.hasClass("side-fullscreen")) {
$it.removeClass("side-fullscreen");
} else {
$it.addClass("side-fullscreen");
}
});
},
init: function () {
this._initFullscreen();
this._initWS();
this._initBottomWindowGroup(); this._initBottomWindowGroup();
@ -318,6 +344,8 @@ var wide = {
}); });
this._initDialog(); this._initDialog();
this._initLayout();
}, },
_save: function () { _save: function () {
var request = newWideRequest(); var request = newWideRequest();

View File

@ -128,36 +128,34 @@
</div> </div>
</div> </div>
<div class="main"> <div class="edit-panel">
<div class="edit-panel"> <div class="edit-header fn-clear">
<div class="edit-header fn-clear"> <div class="tabs fn-left"></div>
<div class="tabs fn-left"></div>
</div>
<div class="tabs-panel"></div>
</div> </div>
<div class="tabs-panel"></div>
</div>
<div class="bottom-window-group"> <div class="bottom-window-group">
<div class="tabs"> <div class="tabs">
<div class="current" data-index="output"> <div class="current" data-index="output">
<span title="Output">Output</span> <span title="Output">Output</span>
</div>
<div data-index="search">
<span title="Search">Search</span>
</div>
<div data-index="notification">
<span title="Notification">Notification</span>
</div>
</div> </div>
<div class="tabs-panel"> <div data-index="search">
<div data-index="output"> <span title="Search">Search</span>
<textarea class="output"></textarea> </div>
</div> <div data-index="notification">
<div class="fn-none" data-index="search"> <span title="Notification">Notification</span>
<div class="search" tabindex="-1"></div> </div>
</div> </div>
<div class="fn-none" data-index="notification"> <div class="tabs-panel">
<div tabindex="-1" class="notification"><table cellpadding="0" cellspacing="0"></table></div> <div data-index="output">
</div> <textarea class="output"></textarea>
</div>
<div class="fn-none" data-index="search">
<div class="search" tabindex="-1"></div>
</div>
<div class="fn-none" data-index="notification">
<div tabindex="-1" class="notification"><table cellpadding="0" cellspacing="0"></table></div>
</div> </div>
</div> </div>
</div> </div>
@ -185,20 +183,20 @@
<script> <script>
var config = { var config = {
"latestSessionContent": {{.latestSessionContent}}, "latestSessionContent": {{.latestSessionContent}},
"label": { "label": {
"delete": "{{.i18n.delete}}", "delete": "{{.i18n.delete}}",
"cancel": "{{.i18n.cancel}}", "cancel": "{{.i18n.cancel}}",
"input_no_empty": "{{.i18n.input_no_empty}}", "input_no_empty": "{{.i18n.input_no_empty}}",
"goto_line": "{{.i18n.goto_line}}", "goto_line": "{{.i18n.goto_line}}",
"goto": "{{.i18n.goto}}", "goto": "{{.i18n.goto}}",
"create": "{{.i18n.create}}", "create": "{{.i18n.create}}",
"create_file": "{{.i18n.create_file}}", "create_file": "{{.i18n.create_file}}",
"create_dir": "{{.i18n.create_dir}}", "create_dir": "{{.i18n.create_dir}}",
"tip": "{{.i18n.tip}}", "tip": "{{.i18n.tip}}",
"confirm": "{{.i18n.confirm}}", "confirm": "{{.i18n.confirm}}",
"build_n_run": "{{.i18n.build_n_run}}", "build_n_run": "{{.i18n.build_n_run}}",
"stop": "{{.i18n.stop}}" "stop": "{{.i18n.stop}}"
}, },
"channel": { "channel": {
"editor": '{{.conf.EditorChannel}}', "editor": '{{.conf.EditorChannel}}',
"shell": '{{.conf.ShellChannel}}', "shell": '{{.conf.ShellChannel}}',