summaryrefslogtreecommitdiffstats
path: root/codebase/sources/ext/dhtmlxscheduler_quick_info.js
diff options
context:
space:
mode:
authorAlexKlimenkov <shurick.klimenkov@gmail.com>2014-11-12 12:31:30 +0300
committerAlexKlimenkov <shurick.klimenkov@gmail.com>2014-11-12 12:31:30 +0300
commitb43931167c3a3229c89608fe0cac8cc6f28db9d5 (patch)
treea21af26a5b6fb026be2210d20263ae820337f99e /codebase/sources/ext/dhtmlxscheduler_quick_info.js
parent18d5b85296811c84235763e3b39eb6f7715e8d19 (diff)
downloadscheduler-b43931167c3a3229c89608fe0cac8cc6f28db9d5.zip
scheduler-b43931167c3a3229c89608fe0cac8cc6f28db9d5.tar.gz
scheduler-b43931167c3a3229c89608fe0cac8cc6f28db9d5.tar.bz2
[update] version 4.2.0
Diffstat (limited to 'codebase/sources/ext/dhtmlxscheduler_quick_info.js')
-rw-r--r--codebase/sources/ext/dhtmlxscheduler_quick_info.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/codebase/sources/ext/dhtmlxscheduler_quick_info.js b/codebase/sources/ext/dhtmlxscheduler_quick_info.js
index 08fc7bb..33f351a 100644
--- a/codebase/sources/ext/dhtmlxscheduler_quick_info.js
+++ b/codebase/sources/ext/dhtmlxscheduler_quick_info.js
@@ -1,5 +1,5 @@
/*
-dhtmlxScheduler v.4.1.0 Stardard
+dhtmlxScheduler v.4.2.0 Stardard
This software is covered by GPL license. You also can obtain Commercial or Enterprise license to use it in non-GPL project - please contact sales@dhtmlx.com. Usage without proper license is prohibited.
@@ -7,6 +7,7 @@ This software is covered by GPL license. You also can obtain Commercial or Enter
*/
scheduler.config.icons_select = ["icon_details", "icon_delete"];
scheduler.config.details_on_create = true;
+scheduler.config.show_quick_info = true;
scheduler.xy.menu_width = 0;
scheduler.attachEvent("onClick", function(id){
@@ -34,7 +35,7 @@ scheduler.templates.quick_info_date = function(start, end, ev){
};
scheduler.showQuickInfo = function(id){
- if (id == this._quick_info_box_id) return;
+ if (id == this._quick_info_box_id || !this.config.show_quick_info) return;
this.hideQuickInfo(true);
var pos = this._get_event_counter_part(id);
@@ -53,13 +54,14 @@ scheduler.hideQuickInfo = function(forced){
this._quick_info_box_id = 0;
if (qi && qi.parentNode){
+ var width = qi._offsetWidth;
if (scheduler.config.quick_info_detached)
return qi.parentNode.removeChild(qi);
if (qi.style.right == "auto")
- qi.style.left = "-350px";
+ qi.style.left = -width + "px";
else
- qi.style.right = "-350px";
+ qi.style.right = -width + "px";
if (forced)
qi.parentNode.removeChild(qi);
@@ -72,33 +74,31 @@ dhtmlxEvent(window, "keydown", function(e){
scheduler._show_quick_info = function(pos){
var qi = scheduler._quick_info_box;
+ scheduler._obj.appendChild(qi);
+ var width = qi.offsetWidth;
+ var height = qi.offsetHeight;
if (scheduler.config.quick_info_detached){
- scheduler._obj.appendChild(qi);
- var width = qi.offsetWidth;
- var height = qi.offsetHeight;
-
qi.style.left = pos.left - pos.dx*(width - pos.width) + "px";
qi.style.top = pos.top - (pos.dy?height:-pos.height) + "px";
} else {
qi.style.top = this.xy.scale_height+this.xy.nav_height + 20 + "px";
if (pos.dx == 1){
qi.style.right = "auto";
- qi.style.left = "-300px";
+ qi.style.left = -width + "px";
setTimeout(function(){
qi.style.left = "-10px";
},1);
} else {
qi.style.left = "auto";
- qi.style.right = "-300px";
+ qi.style.right = -width + "px";
setTimeout(function(){
qi.style.right = "-10px";
},1);
}
- qi.className = qi.className.replace("dhx_qi_left","").replace("dhx_qi_left","")+" dhx_qi_"+(pos==1?"left":"right");
- scheduler._obj.appendChild(qi);
+ qi.className = qi.className.replace("dhx_qi_left","").replace("dhx_qi_right","")+" dhx_qi_"+(pos==1?"left":"right");
}
};
scheduler.attachEvent("onTemplatesReady", function(){