fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [14235] validations


From: Saul
Subject: [Fmsystem-commits] [14235] validations
Date: Fri, 23 Oct 2015 21:00:32 +0000

Revision: 14235
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14235
Author:   psaul
Date:     2015-10-23 21:00:31 +0000 (Fri, 23 Oct 2015)
Log Message:
-----------
validations

Modified Paths:
--------------
    branches/dev-syncromind/phpgwapi/js/jquery/common.js

Modified: branches/dev-syncromind/phpgwapi/js/jquery/common.js
===================================================================
--- branches/dev-syncromind/phpgwapi/js/jquery/common.js        2015-10-23 
21:00:20 UTC (rev 14234)
+++ branches/dev-syncromind/phpgwapi/js/jquery/common.js        2015-10-23 
21:00:31 UTC (rev 14235)
@@ -720,11 +720,13 @@
 }
 
 
-function createTableSchedule (d,u,c,r,cl) {
+function createTableSchedule (d,u,c,r,cl,dt) {
     var container = document.getElementById(d);
     var xtable = document.createElement('table');
     var tableHead = document.createElement('thead');
     var tableHeadTr = document.createElement('tr');
+    var date = (dt) ? dt : "";
+
     restartColors ();
     r = (r) ? r : 'data';
     var tableClass = (cl) ? cl : "pure-table pure-table-striped";
@@ -794,7 +796,8 @@
                             if (vd[k]) {
                                 tableBodyTr.setAttribute('resource', 
vd['resource_id']);
                             }
-                            tableBodyTrTdText = (vd[k]) ? 
formatGenericLink(vd['resource'],vd['resource_link']) : "";
+                            var resourceLink = (date) ? vd['resource_link'] + 
"#date=" + date : vd['resource_link'];
+                            tableBodyTrTdText = (vd[k]) ? 
formatGenericLink(vd['resource'], resourceLink) : "";
                         }else{
                             if (vd[k]) {
                                 var id = vd[k]['id'];
@@ -802,7 +805,7 @@
                                 var type = vd[k]['type']; 
                                 if (vc['formatter'] == "seasonDateColumn"){
                                     tableBodyTrTdText = name;
-                                                                       
tableBodyTrTd.addEventListener('click', 
function(){schedule.newAllocationForm({'id':vd[k]['id']})});
+                                    tableBodyTrTd.addEventListener('click', 
function(){schedule.newAllocationForm({'id':vd[k]['id']})});
                                 }                                              
        
                                 if (vc['formatter'] == "scheduleDateColumn"){
                                     tableBodyTrTdText = 
formatGenericLink(name, null);
@@ -834,6 +837,9 @@
                                 if (vc['formatter'] == 
"frontendScheduleDateColumn") {
                                     tableBodyTrTd.addEventListener('dblclick', 
function(){schedule.newApplicationForm(vc['date'],vd['_from'],vd['_to'],tableBodyTr.getAttribute('resource'))});
                                 }
+                                if (vc['formatter'] == 
"backendScheduleDateColumn") {
+                                    tableBodyTrTd.addEventListener('dblclick', 
function(){schedule.newApplicationForm(vc['date'],vd['_from'],vd['_to'])});
+                                }
                                 if (vc['formatter'] == "seasonDateColumn") {
                                     tableBodyTrTd.addEventListener('dblclick', 
function(){schedule.newAllocationForm({'_from':vd['_from'], '_to':vd['_to'], 
'wday':vc['key']})});
                                 }                                              
                




reply via email to

[Prev in Thread] Current Thread [Next in Thread]