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/sources/ext/dhtmlxscheduler_url.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/sources/ext/dhtmlxscheduler_url.js')
-rw-r--r-- | codebase/sources/ext/dhtmlxscheduler_url.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/codebase/sources/ext/dhtmlxscheduler_url.js b/codebase/sources/ext/dhtmlxscheduler_url.js new file mode 100644 index 0000000..2a98978 --- /dev/null +++ b/codebase/sources/ext/dhtmlxscheduler_url.js @@ -0,0 +1,37 @@ +/* +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.attachEvent("onTemplatesReady",function(){ + var first = true; + var s2d = scheduler.date.str_to_date("%Y-%m-%d"); + var d2s = scheduler.date.date_to_str("%Y-%m-%d"); + scheduler.attachEvent("onBeforeViewChange",function(om,od,m,d){ + if (first){ + first = false; + var p={}; + var data=(document.location.hash||"").replace("#","").split(","); + for (var i=0; i < data.length; i++) { + var s = data[i].split("="); + if (s.length==2) + p[s[0]]=s[1]; + } + + if (p.date || p.mode){ + try{ + this.setCurrentView((p.date?s2d(p.date):null),(p.mode||null)); + } catch(e){ + //assuming that mode is not available anymore + this.setCurrentView((p.date?s2d(p.date):null),m); + } + return false; + } + } + var text = "#date="+d2s(d||od)+",mode="+(m||om); + document.location.hash = text; + return true; + }); +});
\ No newline at end of file |