~openerp-dev/openerp-web/trunk-customfilter-jir

« back to all changes in this revision

Viewing changes to addons/web_calendar/static/lib/dhtmlxScheduler/sources/ext/dhtmlxscheduler_active_links.js

  • Committer: Vidhin Mehta (OpenERP)
  • Date: 2014-04-21 05:26:17 UTC
  • mfrom: (3747.2.239 trunk)
  • Revision ID: vme@tinyerp.com-20140421052617-spns3fo5ryybbwhx
[MERGE]Trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
3
 
to use it in non-GPL project. Please contact sales@dhtmlx.com for details
4
 
*/
5
 
scheduler.config.active_link_view = "day";
6
 
scheduler.attachEvent("onTemplatesReady", function() {
7
 
        var s_d = scheduler.date.str_to_date(scheduler.config.api_date);
8
 
        var d_s = scheduler.date.date_to_str(scheduler.config.api_date);
9
 
 
10
 
        var month_x = scheduler.templates.month_day;
11
 
        scheduler.templates.month_day = function(date) {
12
 
                return "<a jump_to='" + d_s(date) + "' href='#'>" + month_x(date) + "</a>";
13
 
        };
14
 
        var week_x = scheduler.templates.week_scale_date;
15
 
        scheduler.templates.week_scale_date = function(date) {
16
 
                return "<a jump_to='" + d_s(date) + "' href='#'>" + week_x(date) + "</a>";
17
 
        };
18
 
        dhtmlxEvent(this._obj, "click", function(e) {
19
 
                var start = e.target || event.srcElement;
20
 
                var to = start.getAttribute("jump_to");
21
 
                if (to) {
22
 
                        scheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);
23
 
                        if (e && e.preventDefault)
24
 
                                e.preventDefault();
25
 
                        return false;
26
 
                }
27
 
        })
28
 
});
 
 
b'\\ No newline at end of file'