summaryrefslogtreecommitdiffstats
path: root/codebase/ext/dhtmlxscheduler_quick_info.js
diff options
context:
space:
mode:
authorAlexKlimenkov <shurick.klimenkov@gmail.com>2014-06-10 20:50:30 +0300
committerAlexKlimenkov <shurick.klimenkov@gmail.com>2014-06-10 20:50:30 +0300
commitb5a0589955460a44c5428c4cb5429fcfce265d23 (patch)
tree87db58400a3e036de646fb630cbb358beeac3bc1 /codebase/ext/dhtmlxscheduler_quick_info.js
parente2aaaef8540fabd0b5200a4959c269d6f1ae352e (diff)
downloadscheduler-b5a0589955460a44c5428c4cb5429fcfce265d23.zip
scheduler-b5a0589955460a44c5428c4cb5429fcfce265d23.tar.gz
scheduler-b5a0589955460a44c5428c4cb5429fcfce265d23.tar.bz2
[update] version 4.1.0
Diffstat (limited to 'codebase/ext/dhtmlxscheduler_quick_info.js')
-rw-r--r--codebase/ext/dhtmlxscheduler_quick_info.js27
1 files changed, 15 insertions, 12 deletions
diff --git a/codebase/ext/dhtmlxscheduler_quick_info.js b/codebase/ext/dhtmlxscheduler_quick_info.js
index 7eb6c6e..b8c7fa6 100644
--- a/codebase/ext/dhtmlxscheduler_quick_info.js
+++ b/codebase/ext/dhtmlxscheduler_quick_info.js
@@ -1,14 +1,17 @@
/*
-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.
*/
-scheduler.config.icons_select=["icon_details","icon_delete"];scheduler.config.details_on_create=!0;scheduler.xy.menu_width=0;scheduler.attachEvent("onClick",function(b){scheduler.showQuickInfo(b);return!0});(function(){for(var b=["onEmptyClick","onViewChange","onLightbox","onBeforeEventDelete","onBeforeDrag"],a=function(){scheduler._hideQuickInfo();return!0},c=0;c<b.length;c++)scheduler.attachEvent(b[c],a)})();scheduler.templates.quick_info_title=function(b,a,c){return c.text.substr(0,50)};
-scheduler.templates.quick_info_content=function(b,a,c){return c.details||c.text};scheduler.templates.quick_info_date=function(b,a,c){return scheduler.isOneDayEvent(c)?scheduler.templates.day_date(b,a,c)+" "+scheduler.templates.event_header(b,a,c):scheduler.templates.week_date(b,a,c)};scheduler.showQuickInfo=function(b){if(b!=this._quick_info_box_id){this.hideQuickInfo(!0);var a=this._get_event_counter_part(b);if(a)this._quick_info_box=this._init_quick_info(a),this._fill_quick_data(b),this._show_quick_info(a)}};
-scheduler._hideQuickInfo=function(){scheduler.hideQuickInfo()};scheduler.hideQuickInfo=function(b){var a=this._quick_info_box;this._quick_info_box_id=0;if(a&&a.parentNode){if(scheduler.config.quick_info_detached)return a.parentNode.removeChild(a);a.style.right=="auto"?a.style.left="-350px":a.style.right="-350px";b&&a.parentNode.removeChild(a)}};dhtmlxEvent(window,"keydown",function(b){b.keyCode==27&&scheduler.hideQuickInfo()});
-scheduler._show_quick_info=function(b){var a=scheduler._quick_info_box;if(scheduler.config.quick_info_detached){scheduler._obj.appendChild(a);var c=a.offsetWidth,e=a.offsetHeight;a.style.left=b.left-b.dx*(c-b.width)+"px";a.style.top=b.top-(b.dy?e:-b.height)+"px"}else a.style.top=this.xy.scale_height+this.xy.nav_height+20+"px",b.dx==1?(a.style.right="auto",a.style.left="-300px",setTimeout(function(){a.style.left="-10px"},1)):(a.style.left="auto",a.style.right="-300px",setTimeout(function(){a.style.right=
-"-10px"},1)),a.className=a.className.replace("dhx_qi_left","").replace("dhx_qi_left","")+" dhx_qi_"+(b==1?"left":"right"),scheduler._obj.appendChild(a)};
-scheduler._init_quick_info=function(){if(!this._quick_info_box){var b=scheduler.xy,a=this._quick_info_box=document.createElement("div");a.className="dhx_cal_quick_info";scheduler.$testmode&&(a.className+=" dhx_no_animate");var c='<div class="dhx_cal_qi_title" style="height:'+b.quick_info_title+'px"><div class="dhx_cal_qi_tcontent"></div><div class="dhx_cal_qi_tdate"></div></div><div class="dhx_cal_qi_content"></div>';c+='<div class="dhx_cal_qi_controls" style="height:'+b.quick_info_buttons+'px">';
-for(var e=scheduler.config.icons_select,d=0;d<e.length;d++)c+='<div class="dhx_qi_big_icon '+e[d]+'" title="'+scheduler.locale.labels[e[d]]+"\"><div class='dhx_menu_icon "+e[d]+"'></div><div>"+scheduler.locale.labels[e[d]]+"</div></div>";c+="</div>";a.innerHTML=c;dhtmlxEvent(a,"click",function(a){a=a||event;scheduler._qi_button_click(a.target||a.srcElement)});scheduler.config.quick_info_detached&&dhtmlxEvent(scheduler._els.dhx_cal_data[0],"scroll",function(){scheduler.hideQuickInfo()})}return this._quick_info_box};
-scheduler._qi_button_click=function(b){var a=scheduler._quick_info_box;if(b&&b!=a){var c=b.className;if(c.indexOf("_icon")!=-1){var e=scheduler._quick_info_box_id;scheduler._click.buttons[c.split(" ")[1].replace("icon_","")](e)}else scheduler._qi_button_click(b.parentNode)}};
-scheduler._get_event_counter_part=function(b){for(var a=scheduler.getRenderedEvent(b),c=0,e=0,d=a;d&&d!=scheduler._obj;)c+=d.offsetLeft,e+=d.offsetTop-d.scrollTop,d=d.offsetParent;if(d){var f=c+a.offsetWidth/2>scheduler._x/2?1:0,g=e+a.offsetHeight/2>scheduler._y/2?1:0;return{left:c,top:e,dx:f,dy:g,width:a.offsetWidth,height:a.offsetHeight}}return 0};
-scheduler._fill_quick_data=function(b){var a=scheduler.getEvent(b),c=scheduler._quick_info_box;scheduler._quick_info_box_id=b;var e=c.firstChild.firstChild;e.innerHTML=scheduler.templates.quick_info_title(a.start_date,a.end_date,a);var d=e.nextSibling;d.innerHTML=scheduler.templates.quick_info_date(a.start_date,a.end_date,a);var f=c.firstChild.nextSibling;f.innerHTML=scheduler.templates.quick_info_content(a.start_date,a.end_date,a)};
+scheduler.config.icons_select=["icon_details","icon_delete"],scheduler.config.details_on_create=!0,scheduler.xy.menu_width=0,scheduler.attachEvent("onClick",function(e){return scheduler.showQuickInfo(e),!0}),function(){for(var e=["onEmptyClick","onViewChange","onLightbox","onBeforeEventDelete","onBeforeDrag"],t=function(){return scheduler._hideQuickInfo(),!0},s=0;s<e.length;s++)scheduler.attachEvent(e[s],t)}(),scheduler.templates.quick_info_title=function(e,t,s){return s.text.substr(0,50)},scheduler.templates.quick_info_content=function(e,t,s){return s.details||s.text
+},scheduler.templates.quick_info_date=function(e,t,s){return scheduler.isOneDayEvent(s)?scheduler.templates.day_date(e,t,s)+" "+scheduler.templates.event_header(e,t,s):scheduler.templates.week_date(e,t,s)},scheduler.showQuickInfo=function(e){if(e!=this._quick_info_box_id){this.hideQuickInfo(!0);var t=this._get_event_counter_part(e);t&&(this._quick_info_box=this._init_quick_info(t),this._fill_quick_data(e),this._show_quick_info(t))}},scheduler._hideQuickInfo=function(){scheduler.hideQuickInfo()},scheduler.hideQuickInfo=function(e){var t=this._quick_info_box;
+if(this._quick_info_box_id=0,t&&t.parentNode){if(scheduler.config.quick_info_detached)return t.parentNode.removeChild(t);"auto"==t.style.right?t.style.left="-350px":t.style.right="-350px",e&&t.parentNode.removeChild(t)}},dhtmlxEvent(window,"keydown",function(e){27==e.keyCode&&scheduler.hideQuickInfo()}),scheduler._show_quick_info=function(e){var t=scheduler._quick_info_box;if(scheduler.config.quick_info_detached){scheduler._obj.appendChild(t);var s=t.offsetWidth,r=t.offsetHeight;t.style.left=e.left-e.dx*(s-e.width)+"px",t.style.top=e.top-(e.dy?r:-e.height)+"px"
+}else t.style.top=this.xy.scale_height+this.xy.nav_height+20+"px",1==e.dx?(t.style.right="auto",t.style.left="-300px",setTimeout(function(){t.style.left="-10px"},1)):(t.style.left="auto",t.style.right="-300px",setTimeout(function(){t.style.right="-10px"},1)),t.className=t.className.replace("dhx_qi_left","").replace("dhx_qi_left","")+" dhx_qi_"+(1==e?"left":"right"),scheduler._obj.appendChild(t)},scheduler.attachEvent("onTemplatesReady",function(){if(scheduler.hideQuickInfo(),this._quick_info_box){var e=this._quick_info_box;
+e.parentNode&&e.parentNode.removeChild(e),this._quick_info_box=null}}),scheduler._quick_info_onscroll_handler=function(){scheduler.hideQuickInfo()},scheduler._init_quick_info=function(){if(!this._quick_info_box){var e=scheduler.xy,t=this._quick_info_box=document.createElement("div");t.className="dhx_cal_quick_info",scheduler.$testmode&&(t.className+=" dhx_no_animate");var s='<div class="dhx_cal_qi_title" style="height:'+e.quick_info_title+'px"><div class="dhx_cal_qi_tcontent"></div><div class="dhx_cal_qi_tdate"></div></div><div class="dhx_cal_qi_content"></div>';
+s+='<div class="dhx_cal_qi_controls" style="height:'+e.quick_info_buttons+'px">';for(var r=scheduler.config.icons_select,a=0;a<r.length;a++)s+='<div class="dhx_qi_big_icon '+r[a]+'" title="'+scheduler.locale.labels[r[a]]+"\"><div class='dhx_menu_icon "+r[a]+"'></div><div>"+scheduler.locale.labels[r[a]]+"</div></div>";s+="</div>",t.innerHTML=s,dhtmlxEvent(t,"click",function(e){e=e||event,scheduler._qi_button_click(e.target||e.srcElement)}),scheduler.config.quick_info_detached&&(scheduler._detachDomEvent(scheduler._els.dhx_cal_data[0],"scroll",scheduler._quick_info_onscroll_handler),dhtmlxEvent(scheduler._els.dhx_cal_data[0],"scroll",scheduler._quick_info_onscroll_handler))
+}return this._quick_info_box},scheduler._qi_button_click=function(e){var t=scheduler._quick_info_box;if(e&&e!=t){var s=e.className;if(-1!=s.indexOf("_icon")){var r=scheduler._quick_info_box_id;scheduler._click.buttons[s.split(" ")[1].replace("icon_","")](r)}else scheduler._qi_button_click(e.parentNode)}},scheduler._get_event_counter_part=function(e){for(var t=scheduler.getRenderedEvent(e),s=0,r=0,a=t;a&&a!=scheduler._obj;)s+=a.offsetLeft,r+=a.offsetTop-a.scrollTop,a=a.offsetParent;if(a){var n=s+t.offsetWidth/2>scheduler._x/2?1:0,i=r+t.offsetHeight/2>scheduler._y/2?1:0;
+return{left:s,top:r,dx:n,dy:i,width:t.offsetWidth,height:t.offsetHeight}}return 0},scheduler._fill_quick_data=function(e){var t=scheduler.getEvent(e),s=scheduler._quick_info_box;scheduler._quick_info_box_id=e;var r=s.firstChild.firstChild;r.innerHTML=scheduler.templates.quick_info_title(t.start_date,t.end_date,t);var a=r.nextSibling;a.innerHTML=scheduler.templates.quick_info_date(t.start_date,t.end_date,t);var n=s.firstChild.nextSibling;n.innerHTML=scheduler.templates.quick_info_content(t.start_date,t.end_date,t)
+};
+//# sourceMappingURL=../sources/ext/dhtmlxscheduler_quick_info.js.map \ No newline at end of file