提交 06307e56 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'feature/taskItem_close_all' into 'wrdp'

首页tab增加全部关闭、关闭其他等操作功能

See merge request o2oa/o2oa!2984
......@@ -148,6 +148,11 @@ o2.LP.desktop = {
"say": "",
"clearMessage": "清除消息",
"refresh": "刷新",
"close": "关闭",
"closeAll": "全部关闭",
"closeOther": "关闭其他",
"lnkAppTitle": "常用应用",
"deleteLnk": "删除常用应用快捷方式",
"addLnk": "添加常用应用快捷方式",
......
......@@ -35,6 +35,7 @@
"cursor": "pointer",
"color": "#333333",
"font-family": "Microsoft YaHei",
"text-align": "left",
"font-size": "12px"
},
......
......@@ -41,6 +41,7 @@
<div class="layout_content_taskbar_area_tabs_action_up icon_up_gray" data-o2-element="taskActionUp" data-o2-events="click:toolbarUp"></div>
<div class="layout_content_taskbar_area_tabs_action_down icon_down" data-o2-element="taskActionDown" data-o2-events="click:toolbarDown"></div>
</div>
<div class="layout_content_taskbar_area_tabs_contentArea" data-o2-element="taskContentAreaNode">
<div class="layout_content_taskbar_area_tabs_content" data-o2-element="taskContentNode" data-o2-events="mouseover:showRefresh"></div>
</div>
......
......@@ -296,7 +296,7 @@
overflow: hidden;
cursor: pointer;
float: left;
padding: 0 10px;
padding: 0 10px 0 10px;
margin-left: 10px;
}
.layout_content_taskbar_item_icon {
......@@ -314,8 +314,16 @@
float: left;
background-position: center;
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -173,6 +173,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #4A90E2 !important;
......@@ -278,4 +281,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #4A90E2 !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -316,6 +316,14 @@
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -131,6 +131,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/cyan/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #30BFBF !important;
......@@ -233,4 +236,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #30BFBF !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -316,6 +316,14 @@
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -130,7 +130,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/darkgreen/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #4D6240 !important;
border-bottom: 2px solid #4D6240 !important;
......@@ -232,4 +234,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #4D6240 !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -316,6 +316,14 @@
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -129,6 +129,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/gray/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #666666 !important;
border-bottom: 2px solid #666666 !important;
......@@ -230,4 +233,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #666666 !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -316,6 +316,14 @@
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -129,6 +129,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/green/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #60BF78 !important;
border-bottom: 2px solid #60BF78 !important;
......@@ -230,4 +233,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #60BF78 !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -316,6 +316,14 @@
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -130,7 +130,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/navy/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #323159 !important;
border-bottom: 2px solid #323159 !important;
......@@ -232,4 +234,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #323159 !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -316,6 +316,14 @@
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -129,6 +129,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/orange/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #ED8824 !important;
border-bottom: 2px solid #ED8824 !important;
......@@ -230,4 +233,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #ED8824 !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -316,6 +316,14 @@
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -129,6 +129,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/purple/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #BF3995 !important;
border-bottom: 2px solid #BF3995 !important;
......@@ -230,4 +233,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #BF3995 !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -316,6 +316,14 @@
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -129,6 +129,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/red/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #D94141 !important;
border-bottom: 2px solid #D94141 !important;
......@@ -230,4 +233,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #D94141 !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -316,6 +316,14 @@
background-repeat: no-repeat;
background-size: 16px;
}
.layout_content_taskbar_item_action {
width: 8px;
height: 25px;
margin-right: 3px;
float: left;
background-position: center left;
background-repeat: no-repeat;
}
.layout_content_taskbar_item_text {
height: 28px;
float: left;
......
......@@ -130,7 +130,9 @@
.icon_refresh{
background-image: url(../o2_core/o2/xDesktop/$Default/tan/icons/icon_shuaxin.png) !important;
}
.icon_taskitem_down {
background-image: url(../o2_core/o2/xDesktop/$Default/blue/icons/icon_taskitem_down.png) !important;
}
.o2_process_AppExp_All_current {
color: #995E2E !important;
border-bottom: 2px solid #995E2E !important;
......@@ -232,4 +234,4 @@
div:hover>.o2_profile_emPower_Btntext{
color: #995E2E !important;
}
/*个人设置---end*/
\ No newline at end of file
/*个人设置---end*/
......@@ -1753,6 +1753,8 @@ o2.xDesktop.Default.TaskItem = new Class({
this.refreshNode.addClass("icon_refresh");
this.refreshNode.addClass("animation_taskItemLoading");
this.actionNode = new Element("div.layout_content_taskbar_item_action").inject(this.node);;
this.actionNode.addClass("icon_taskitem_down");
this.textNode = new Element("div.layout_content_taskbar_item_text").inject(this.node);;
this.setText(this.app.options.title);
......@@ -1809,8 +1811,60 @@ o2.xDesktop.Default.TaskItem = new Class({
}.bind(this)
});
this.loadTaskItemMenu();
if (this.desktop && this.desktop.checkTaskBarSize) this.desktop.checkTaskBarSize();
},
loadTaskItemMenu: function(){
if (!this.taskitemMenu){
this.taskitemMenu = new o2.xDesktop.Menu(this.actionNode, {
"event": "click", "style": "flatUser", "offsetX": -10, "offsetY":6, "container": this.node
});
this.taskitemMenu.load();
this.loadTaskItemMenuItems();
}
},
loadTaskItemMenuItems: function(){
var img = this.desktop.path+this.desktop.options.style+"/icons/menu_refresh.png";
this.taskitemMenu.addMenuItem(o2.LP.desktop.refresh, "click", function(e){this.app.refresh(e);}.bind(this), img);
this.taskitemMenu.addMenuLine();
//img = this.path+this.options.style+"/icons/logout.png";
if (this.app.options.appId!==this.desktop.options.index){
img = this.desktop.path+this.desktop.options.style+"/icons/menu_close.png";
this.taskitemMenu.addMenuItem(o2.LP.desktop.close, "click", function(){
if (!this.app.window){
this.desktop.apps[this.app.options.appId] = null;
delete this.desktop.apps[this.app.options.appId];
this.destroy();
}else{
this.app.close();
}
}.bind(this), img);
}
img = this.desktop.path+this.desktop.options.style+"/icons/menu_closeall.png";
this.taskitemMenu.addMenuItem(o2.LP.desktop.closeAll, "click", function(){
var keys = Array.clone(Object.keys(this.desktop.apps));
keys.each(function(key){
if (!this.desktop.apps[key].isIndex && !this.desktop.apps[key].options.isIndex) this.desktop.apps[key].close();
}.bind(this));
keys = null;
}.bind(this), img);
img = this.desktop.path+this.desktop.options.style+"/icons/menu_closeother.png";
this.taskitemMenu.addMenuItem(o2.LP.desktop.closeOther, "click", function(){
var keys = Array.clone(Object.keys(this.desktop.apps));
keys.each(function(key){
if (!this.desktop.apps[key].isIndex &&
!this.desktop.apps[key].options.isIndex &&
this.desktop.apps[key].options.appId!=this.app.options.appId) this.desktop.apps[key].close();
}.bind(this));
keys = null;
}.bind(this), img);
},
setText: function(str){
this.textNode.set("text", str || this.app.options.title);
},
......@@ -1821,7 +1875,8 @@ o2.xDesktop.Default.TaskItem = new Class({
this.closeNode.removeClass("icon_close_focus");
//this.closeNode.hide();
}
this.refreshNode.hide();
if (this.refreshNode) this.refreshNode.hide();
if (this.actionNode) this.actionNode.hide();
},
selected: function(){
this.node.addClass("mainColor_bg");
......@@ -1832,11 +1887,15 @@ o2.xDesktop.Default.TaskItem = new Class({
}
this.desktop.checkTaskBarScrollTo(this.app);
//this.refreshNode.show();
if (this.actionNode) this.actionNode.show();
},
destroy: function(){
this.iconNode.destroy();
this.node.destroy();
if (this.desktop && this.desktop.checkTaskBarSize) this.desktop.checkTaskBarSize();
if (this.app.options && this.app.options.appId) delete this.desktop.apps[this.app.options.appId];
o2.release(this);
},
setTaskitemSize: function(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册