diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js
index 063bed7bf..6e3249300 100644
--- a/apps/common/main/lib/component/Window.js
+++ b/apps/common/main/lib/component/Window.js
@@ -152,6 +152,7 @@ define([
alias: 'Window',
cls: '',
toolclose: 'close',
+ help: false,
maxwidth: undefined,
maxheight: undefined,
minwidth: 0,
@@ -162,9 +163,14 @@ define([
var template = '
<%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' +
'<% if (header==true) { %>' +
'' +
'<% } %>' +
@@ -284,7 +290,7 @@ define([
/* window drag's functions */
function _dragstart(event) {
- if ( $(event.target).hasClass('close') ) return;
+ if ( $(event.target).hasClass('close') || $(event.target).hasClass('help') ) return;
Common.UI.Menu.Manager.hideAll();
var zoom = (event instanceof jQuery.Event) ? Common.Utils.zoom() : 1;
this.dragging.enabled = true;
@@ -635,8 +641,13 @@ define([
else
(this.initConfig.toolclose=='hide') ? this.hide() : this.close();
};
+ var dohelp = function() {
+ if ( this.$window.find('.tool.help').hasClass('disabled') ) return;
+ this.fireEvent('help',this);
+ };
this.$window.find('.header').on('mousedown', this.binding.dragStart);
this.$window.find('.tool.close').on('click', _.bind(doclose, this));
+ this.$window.find('.tool.help').on('click', _.bind(dohelp, this));
if (!this.initConfig.modal)
Common.Gateway.on('processmouse', _.bind(_onProcessMouse, this));
diff --git a/apps/common/main/resources/less/window.less b/apps/common/main/resources/less/window.less
index afb367b6a..5a47e07ca 100644
--- a/apps/common/main/resources/less/window.less
+++ b/apps/common/main/resources/less/window.less
@@ -59,6 +59,12 @@
cursor: move;
+ .tools {
+ position: absolute;
+ right: 0;
+ padding-right: 6px;
+ }
+
.tool {
float: right;
width: 16px;
@@ -80,6 +86,25 @@
cursor: default;
}
}
+
+ &.help {
+ width: 20px;
+ margin-right:0;
+ line-height: 14px;
+ font-size: 14px;
+ font-weight: bold;
+ color: #444;
+ opacity: 0.7;
+
+ &:hover {
+ opacity: 1;
+ }
+
+ &.disabled {
+ opacity: 0.3;
+ cursor: default;
+ }
+ }
}
&.resizing {