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",
"LatestSessionContent": {
"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": [
"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"
}

View File

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

View File

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

View File

@ -210,10 +210,12 @@ var wide = {
});
},
_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);
$(".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 () {
this.bottomWindowTab = new Tabs({
@ -294,10 +296,34 @@ var wide = {
console.log('[output onerror] ' + e);
};
},
init: function () {
this._initWS();
_initFullscreen: function () {
$(".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();
@ -318,6 +344,8 @@ var wide = {
});
this._initDialog();
this._initLayout();
},
_save: function () {
var request = newWideRequest();

View File

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