diff options
author | AlexKlimenkov <shurick.klimenkov@gmail.com> | 2014-06-10 20:50:30 +0300 |
---|---|---|
committer | AlexKlimenkov <shurick.klimenkov@gmail.com> | 2014-06-10 20:50:30 +0300 |
commit | b5a0589955460a44c5428c4cb5429fcfce265d23 (patch) | |
tree | 87db58400a3e036de646fb630cbb358beeac3bc1 /codebase/ext/dhtmlxscheduler_tooltip.js | |
parent | e2aaaef8540fabd0b5200a4959c269d6f1ae352e (diff) | |
download | scheduler-b5a0589955460a44c5428c4cb5429fcfce265d23.zip scheduler-b5a0589955460a44c5428c4cb5429fcfce265d23.tar.gz scheduler-b5a0589955460a44c5428c4cb5429fcfce265d23.tar.bz2 |
[update] version 4.1.0
Diffstat (limited to 'codebase/ext/dhtmlxscheduler_tooltip.js')
-rw-r--r-- | codebase/ext/dhtmlxscheduler_tooltip.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/codebase/ext/dhtmlxscheduler_tooltip.js b/codebase/ext/dhtmlxscheduler_tooltip.js index aeeeb8b..b2f738e 100644 --- a/codebase/ext/dhtmlxscheduler_tooltip.js +++ b/codebase/ext/dhtmlxscheduler_tooltip.js @@ -1,13 +1,15 @@ /* -This software is allowed to use under GPL or you need to obtain Commercial or Enterise License -to use it in non-GPL project. Please contact sales@dhtmlx.com for details +dhtmlxScheduler v.4.1.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. + +(c) Dinamenta, UAB. */ -window.dhtmlXTooltip=scheduler.dhtmlXTooltip=window.dhtmlxTooltip={};dhtmlXTooltip.config={className:"dhtmlXTooltip tooltip",timeout_to_display:50,timeout_to_hide:50,delta_x:15,delta_y:-20};dhtmlXTooltip.tooltip=document.createElement("div");dhtmlXTooltip.tooltip.className=dhtmlXTooltip.config.className; -dhtmlXTooltip.show=function(b,d){if(!scheduler.config.touch||scheduler.config.touch_tooltip){var c=dhtmlXTooltip,g=this.tooltip,a=g.style;c.tooltip.className=c.config.className;var h=this.position(b),i=b.target||b.srcElement;if(!this.isTooltip(i)){var e=h.x+(c.config.delta_x||0),f=h.y-(c.config.delta_y||0);a.visibility="hidden";a.removeAttribute?(a.removeAttribute("right"),a.removeAttribute("bottom")):(a.removeProperty("right"),a.removeProperty("bottom"));a.left="0";a.top="0";this.tooltip.innerHTML= -d;document.body.appendChild(this.tooltip);var j=this.tooltip.offsetWidth,k=this.tooltip.offsetHeight;document.body.offsetWidth-e-j<0?(a.removeAttribute?a.removeAttribute("left"):a.removeProperty("left"),a.right=document.body.offsetWidth-e+2*(c.config.delta_x||0)+"px"):a.left=e<0?h.x+Math.abs(c.config.delta_x||0)+"px":e+"px";document.body.offsetHeight-f-k<0?(a.removeAttribute?a.removeAttribute("top"):a.removeProperty("top"),a.bottom=document.body.offsetHeight-f-2*(c.config.delta_y||0)+"px"):a.top= -f<0?h.y+Math.abs(c.config.delta_y||0)+"px":f+"px";a.visibility="visible";scheduler.callEvent("onTooltipDisplayed",[this.tooltip,this.tooltip.event_id])}}};dhtmlXTooltip._clearTimeout=function(){this.tooltip._timeout_id&&window.clearTimeout(this.tooltip._timeout_id)};dhtmlXTooltip.hide=function(){if(this.tooltip.parentNode){var b=this.tooltip.event_id;this.tooltip.event_id=null;this.tooltip.parentNode.removeChild(this.tooltip);scheduler.callEvent("onAfterTooltip",[b])}this._clearTimeout()}; -dhtmlXTooltip.delay=function(b,d,c,g){this._clearTimeout();this.tooltip._timeout_id=setTimeout(function(){var a=b.apply(d,c);b=d=c=null;return a},g||this.config.timeout_to_display)};dhtmlXTooltip.isTooltip=function(b){var d=!1;for(b.className.split(" ");b&&!d;)d=b.className==this.tooltip.className,b=b.parentNode;return d}; -dhtmlXTooltip.position=function(b){b=b||window.event;if(b.pageX||b.pageY)return{x:b.pageX,y:b.pageY};var d=window._isIE&&document.compatMode!="BackCompat"?document.documentElement:document.body;return{x:b.clientX+d.scrollLeft-d.clientLeft,y:b.clientY+d.scrollTop-d.clientTop}}; -scheduler.attachEvent("onMouseMove",function(b,d){var c=window.event||d,g=c.target||c.srcElement,a=dhtmlXTooltip,h=a.isTooltip(g),i=a.isTooltipTarget&&a.isTooltipTarget(g);if(b||h||i){var e;if(b||a.tooltip.event_id){var f=scheduler.getEvent(b)||scheduler.getEvent(a.tooltip.event_id);if(!f)return;a.tooltip.event_id=f.id;e=scheduler.templates.tooltip_text(f.start_date,f.end_date,f);if(!e)return a.hide()}i&&(e="");var j=void 0;_isIE&&(j=document.createEventObject(c));scheduler.callEvent("onBeforeTooltip", -[b])&&e&&a.delay(a.show,a,[j||c,e])}else a.delay(a.hide,a,[],a.config.timeout_to_hide)});scheduler.attachEvent("onBeforeDrag",function(){dhtmlXTooltip.hide();return!0});scheduler.attachEvent("onEventDeleted",function(){dhtmlXTooltip.hide();return!0});scheduler.templates.tooltip_date_format=scheduler.date.date_to_str("%Y-%m-%d %H:%i"); -scheduler.templates.tooltip_text=function(b,d,c){return"<b>Event:</b> "+c.text+"<br/><b>Start date:</b> "+scheduler.templates.tooltip_date_format(b)+"<br/><b>End date:</b> "+scheduler.templates.tooltip_date_format(d)}; +window.dhtmlXTooltip=scheduler.dhtmlXTooltip=window.dhtmlxTooltip={},dhtmlXTooltip.config={className:"dhtmlXTooltip tooltip",timeout_to_display:50,timeout_to_hide:50,delta_x:15,delta_y:-20},dhtmlXTooltip.tooltip=document.createElement("div"),dhtmlXTooltip.tooltip.className=dhtmlXTooltip.config.className,dhtmlXTooltip.show=function(e,t){if(!scheduler.config.touch||scheduler.config.touch_tooltip){var r=dhtmlXTooltip,s=this.tooltip,a=s.style;r.tooltip.className=r.config.className;var i=this.position(e),n=e.target||e.srcElement; +if(!this.isTooltip(n)){var d=i.x+(r.config.delta_x||0),l=i.y-(r.config.delta_y||0);a.visibility="hidden",a.removeAttribute?(a.removeAttribute("right"),a.removeAttribute("bottom")):(a.removeProperty("right"),a.removeProperty("bottom")),a.left="0",a.top="0",this.tooltip.innerHTML=t,document.body.appendChild(this.tooltip);var o=this.tooltip.offsetWidth,_=this.tooltip.offsetHeight;document.body.offsetWidth-d-o<0?(a.removeAttribute?a.removeAttribute("left"):a.removeProperty("left"),a.right=document.body.offsetWidth-d+2*(r.config.delta_x||0)+"px"):a.left=0>d?i.x+Math.abs(r.config.delta_x||0)+"px":d+"px",document.body.offsetHeight-l-_<0?(a.removeAttribute?a.removeAttribute("top"):a.removeProperty("top"),a.bottom=document.body.offsetHeight-l-2*(r.config.delta_y||0)+"px"):a.top=0>l?i.y+Math.abs(r.config.delta_y||0)+"px":l+"px",a.visibility="visible",this.tooltip.onmouseleave=function(e){for(var t=scheduler.dhtmlXTooltip,r=e.relatedTarget;r!=scheduler._obj&&r;)r=r.parentNode; +r!=scheduler._obj&&t.delay(t.hide,t,[],t.config.timeout_to_hide)},scheduler.callEvent("onTooltipDisplayed",[this.tooltip,this.tooltip.event_id])}}},dhtmlXTooltip._clearTimeout=function(){this.tooltip._timeout_id&&window.clearTimeout(this.tooltip._timeout_id)},dhtmlXTooltip.hide=function(){if(this.tooltip.parentNode){var e=this.tooltip.event_id;this.tooltip.event_id=null,this.tooltip.onmouseleave=null,this.tooltip.parentNode.removeChild(this.tooltip),scheduler.callEvent("onAfterTooltip",[e])}this._clearTimeout() +},dhtmlXTooltip.delay=function(e,t,r,s){this._clearTimeout(),this.tooltip._timeout_id=setTimeout(function(){var s=e.apply(t,r);return e=t=r=null,s},s||this.config.timeout_to_display)},dhtmlXTooltip.isTooltip=function(e){var t=!1;for("dhtmlXTooltip"==e.className.split(" ")[0];e&&!t;)t=e.className==this.tooltip.className,e=e.parentNode;return t},dhtmlXTooltip.position=function(e){if(e=e||window.event,e.pageX||e.pageY)return{x:e.pageX,y:e.pageY};var t=window._isIE&&"BackCompat"!=document.compatMode?document.documentElement:document.body; +return{x:e.clientX+t.scrollLeft-t.clientLeft,y:e.clientY+t.scrollTop-t.clientTop}},scheduler.attachEvent("onMouseMove",function(e,t){var r=window.event||t,s=r.target||r.srcElement,a=dhtmlXTooltip,i=a.isTooltip(s),n=a.isTooltipTarget&&a.isTooltipTarget(s);if(e||i||n){var d;if(e||a.tooltip.event_id){var l=scheduler.getEvent(e)||scheduler.getEvent(a.tooltip.event_id);if(!l)return;if(a.tooltip.event_id=l.id,d=scheduler.templates.tooltip_text(l.start_date,l.end_date,l),!d)return a.hide()}n&&(d="");var o; +if(_isIE){o={pageX:void 0,pageY:void 0,clientX:void 0,clientY:void 0,target:void 0,srcElement:void 0};for(var _ in o)o[_]=r[_]}if(!scheduler.callEvent("onBeforeTooltip",[e])||!d)return;a.delay(a.show,a,[o||r,d])}else a.delay(a.hide,a,[],a.config.timeout_to_hide)}),scheduler.attachEvent("onBeforeDrag",function(){return dhtmlXTooltip.hide(),!0}),scheduler.attachEvent("onEventDeleted",function(){return dhtmlXTooltip.hide(),!0}),scheduler.templates.tooltip_date_format=scheduler.date.date_to_str("%Y-%m-%d %H:%i"),scheduler.templates.tooltip_text=function(e,t,r){return"<b>Event:</b> "+r.text+"<br/><b>Start date:</b> "+scheduler.templates.tooltip_date_format(e)+"<br/><b>End date:</b> "+scheduler.templates.tooltip_date_format(t) +}; +//# sourceMappingURL=../sources/ext/dhtmlxscheduler_tooltip.js.map
\ No newline at end of file |