fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14155]


From: Nelson Guerra
Subject: [Fmsystem-commits] [14155]
Date: Tue, 13 Oct 2015 00:10:52 +0000

Revision: 14155
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14155
Author:   nelson224
Date:     2015-10-13 00:10:51 +0000 (Tue, 13 Oct 2015)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/booking/js/booking/season.wtemplate.js

Modified: branches/dev-syncromind/booking/js/booking/season.wtemplate.js
===================================================================
--- branches/dev-syncromind/booking/js/booking/season.wtemplate.js      
2015-10-12 17:53:35 UTC (rev 14154)
+++ branches/dev-syncromind/booking/js/booking/season.wtemplate.js      
2015-10-13 00:10:51 UTC (rev 14155)
@@ -6,40 +6,47 @@
        var values = {};
 
        values['cost']  = $('#cost').val();
-       values['from_'] = $('#from_').val();
+       var from_ = $('#from_h').val() +':'+ $('#from_m').val();
+       values['from_'] = from_;
        values['id']    = $('#id').val();
        values['organization_id'] = $('#organization_id').val();
-       values['to_']   = $('#to_').val();
+       var to_ = $('#to_h').val() +':'+ $('#to_m').val();
+       values['to_']   = to_;
        values['wday']  = $('#wday').val();
        values['season_id'] = parent.season_id;
+       values['resources'] = {};
        
+       var n = 0;
        resources_checks.each(function(i, obj) {
                if (obj.checked) 
                {
-                       values['resources'][i] = obj.value;
+                       values['resources'][n] = obj.value;
+                       n++;
                }
        });
                
-       var oArgs = {menuaction:'booking.uiseason.wtemplate_alloc_json'};
+       var oArgs = {menuaction:'booking.uiseason.wtemplate_alloc'};
        var requestUrl = phpGWLink('index.php', oArgs, true);   
                                        
-       var data = {"values": values};
+       var data = values;
        JqueryPortico.execute_ajax(requestUrl, function(result){
 
-            /*var weekUrl = 
'index.php?menuaction=booking.uiseason.wtemplate_json&id=' + season_id + 
'&phpgw_return_as=json&';
+               parent.createTableSchedule('schedule_container', 
parent.weekUrl, parent.colDefs, parent.r, 'pure-table' );
+               parent.TINY.box.hide();
 
-            var colDefs = [
-                {key: 'time', label: 'Time'}, 
-                {key: 'resource', label: 'Resources', formatter: 
'scheduleResourceColumn'},
-                {key: '1', label: 'Monday', formatter: 'seasonDateColumn'},
-                {key: '2', label: 'Tuesday', formatter: 'seasonDateColumn'},
-                {key: '3', label: 'Wednesday', formatter: 'seasonDateColumn'},
-                {key: '4', label: 'Thursday, formatter: 'seasonDateColumn'},
-                {key: '5', label: 'Friday')', formatter: 'seasonDateColumn'},
-                {key: '6', label: 'Saturday, formatter: 'seasonDateColumn'},
-                {key: '7', label: 'Sunday', formatter: 'seasonDateColumn'}];
-            
-            createTableSchedule('schedule_container', weekUrl, colDefs, r, 
'pure-table' );*/
+       }, data, "POST", "JSON");
+};
 
+deleteTemplateAlloc = function(){
+               
+       var oArgs = {menuaction:'booking.uiseason.delete_wtemplate_alloc'};
+       var requestUrl = phpGWLink('index.php', oArgs, true);   
+                                       
+       var data = {'id': $('#id').val()};
+       JqueryPortico.execute_ajax(requestUrl, function(result){
+
+               parent.createTableSchedule('schedule_container', 
parent.weekUrl, parent.colDefs, parent.r, 'pure-table' );
+               parent.TINY.box.hide();
+
        }, data, "POST", "JSON");
 };
\ No newline at end of file




reply via email to

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