fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16415] more on eventplanner


From: sigurdne
Subject: [Fmsystem-commits] [16415] more on eventplanner
Date: Thu, 9 Mar 2017 05:32:04 -0500 (EST)

Revision: 16415
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16415
Author:   sigurdne
Date:     2017-03-09 05:32:04 -0500 (Thu, 09 Mar 2017)
Log Message:
-----------
more on eventplanner

Modified Paths:
--------------
    trunk/eventplanner/inc/class.uiapplication.inc.php
    trunk/eventplanner/inc/class.uibooking.inc.php
    trunk/eventplanner/inc/class.uicustomer.inc.php
    trunk/eventplanner/inc/class.uicustomer_report.inc.php
    trunk/eventplanner/inc/class.uievents.inc.php
    trunk/eventplanner/inc/class.uivendor.inc.php
    trunk/eventplanner/inc/class.uivendor_report.inc.php
    trunk/phpgwapi/inc/class.uicommon.inc.php
    trunk/phpgwapi/inc/class.uicommon_jquery.inc.php

Added Paths:
-----------
    trunk/eventplanner/js/portico/vendor.edit.js

Modified: trunk/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uiapplication.inc.php  2017-03-08 03:16:36 UTC 
(rev 16414)
+++ trunk/eventplanner/inc/class.uiapplication.inc.php  2017-03-09 10:32:04 UTC 
(rev 16415)
@@ -197,7 +197,7 @@
                                'parameters' => json_encode($parameters)
                        );
 
-                       self::add_javascript('eventplannerfrontend', 'portico', 
'application.index.js');
+                       self::add_javascript($this->currentapp, 'portico', 
'application.index.js');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::render_template_xsl('datatable_jquery', $data);
@@ -420,7 +420,7 @@
                        );
                        phpgwapi_jquery::formvalidator_generate(array('date', 
'security', 'file'));
                        phpgwapi_jquery::load_widget('autocomplete');
-                       self::add_javascript('eventplannerfrontend', 'portico', 
'application.edit.js');
+                       self::add_javascript($this->currentapp, 'portico', 
'application.edit.js');
                        self::render_template_xsl(array('application', 
'datatable_inline'), array($mode => $data));
                }
 

Modified: trunk/eventplanner/inc/class.uibooking.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uibooking.inc.php      2017-03-08 03:16:36 UTC 
(rev 16414)
+++ trunk/eventplanner/inc/class.uibooking.inc.php      2017-03-09 10:32:04 UTC 
(rev 16415)
@@ -147,7 +147,7 @@
                                'parameters' => json_encode($parameters)
                        );
 
-                       self::add_javascript('eventplanner', 'portico', 
'booking.index.js');
+                       self::add_javascript($this->currentapp, 'portico', 
'booking.index.js');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::render_template_xsl('datatable_jquery', $data);

Modified: trunk/eventplanner/inc/class.uicustomer.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uicustomer.inc.php     2017-03-08 03:16:36 UTC 
(rev 16414)
+++ trunk/eventplanner/inc/class.uicustomer.inc.php     2017-03-09 10:32:04 UTC 
(rev 16415)
@@ -161,7 +161,7 @@
                                'parameters' => json_encode($parameters)
                        );
 
-                       self::add_javascript('eventplanner', 'portico', 
'customer.index.js');
+                       self::add_javascript($this->currentapp, 'portico', 
'customer.index.js');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::render_template_xsl('datatable_jquery', $data);

Modified: trunk/eventplanner/inc/class.uicustomer_report.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uicustomer_report.inc.php      2017-03-08 
03:16:36 UTC (rev 16414)
+++ trunk/eventplanner/inc/class.uicustomer_report.inc.php      2017-03-09 
10:32:04 UTC (rev 16415)
@@ -153,7 +153,7 @@
                                'parameters' => json_encode($parameters)
                        );
 
-                       self::add_javascript('eventplanner', 'portico', 
'customer_report.index.js');
+                       self::add_javascript($this->currentapp, 'portico', 
'customer_report.index.js');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::render_template_xsl('datatable_jquery', $data);
@@ -250,7 +250,7 @@
                        );
                        phpgwapi_jquery::formvalidator_generate(array('date', 
'security', 'file'));
                        phpgwapi_jquery::load_widget('autocomplete');
-               //      self::add_javascript('eventplanner', 'portico', 
'customer_report.edit.js');
+               //      self::add_javascript($this->currentapp, 'portico', 
'customer_report.edit.js');
                        
self::render_template_xsl(array('report','application_info', 
'datatable_inline', 'attributes_form'), array($mode => $data));
                }
 

Modified: trunk/eventplanner/inc/class.uievents.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uievents.inc.php       2017-03-08 03:16:36 UTC 
(rev 16414)
+++ trunk/eventplanner/inc/class.uievents.inc.php       2017-03-09 10:32:04 UTC 
(rev 16415)
@@ -173,7 +173,7 @@
                                'parameters' => json_encode($parameters)
                        );
 
-                       self::add_javascript('eventplanner', 'portico', 
'events.index.js');
+                       self::add_javascript($this->currentapp, 'portico', 
'events.index.js');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::render_template_xsl('datatable_jquery', $data);

Modified: trunk/eventplanner/inc/class.uivendor.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uivendor.inc.php       2017-03-08 03:16:36 UTC 
(rev 16414)
+++ trunk/eventplanner/inc/class.uivendor.inc.php       2017-03-09 10:32:04 UTC 
(rev 16415)
@@ -162,7 +162,7 @@
                                'parameters' => json_encode($parameters)
                        );
 
-                       self::add_javascript('eventplanner', 'portico', 
'vendor.index.js');
+                       self::add_javascript('eventplannerfrontend', 'portico', 
'vendor.index.js');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::render_template_xsl('datatable_jquery', $data);
@@ -278,7 +278,7 @@
                        );
                        phpgwapi_jquery::formvalidator_generate(array());
                        self::add_javascript('eventplannerfrontend', 'portico', 
'validate.js');
-                       self::add_javascript('eventplannerfrontend', 'portico', 
'vendor.edit.js');
+                       self::add_javascript($this->currentapp, 'portico', 
'vendor.edit.js');
                        self::render_template_xsl(array('vendor', 
'datatable_inline'), array($mode => $data));
                }
                

Modified: trunk/eventplanner/inc/class.uivendor_report.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uivendor_report.inc.php        2017-03-08 
03:16:36 UTC (rev 16414)
+++ trunk/eventplanner/inc/class.uivendor_report.inc.php        2017-03-09 
10:32:04 UTC (rev 16415)
@@ -153,7 +153,7 @@
                                'parameters' => json_encode($parameters)
                        );
 
-                       self::add_javascript('eventplanner', 'portico', 
'vendor_report.index.js');
+                       self::add_javascript($this->currentapp, 'portico', 
'vendor_report.index.js');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::render_template_xsl('datatable_jquery', $data);
@@ -250,7 +250,7 @@
                        );
                        phpgwapi_jquery::formvalidator_generate(array('date', 
'security', 'file'));
                        phpgwapi_jquery::load_widget('autocomplete');
-               //      self::add_javascript('eventplanner', 'portico', 
'vendor_report.edit.js');
+               //      self::add_javascript($this->currentapp, 'portico', 
'vendor_report.edit.js');
                        
self::render_template_xsl(array('report','application_info', 
'datatable_inline', 'attributes_form'), array($mode => $data));
                }
 

Added: trunk/eventplanner/js/portico/vendor.edit.js
===================================================================
--- trunk/eventplanner/js/portico/vendor.edit.js                                
(rev 0)
+++ trunk/eventplanner/js/portico/vendor.edit.js        2017-03-09 10:32:04 UTC 
(rev 16415)
@@ -0,0 +1,37 @@
+function set_tab(tab)
+{
+       $("#active_tab").val(tab);
+       if (tab === 'application')
+       {
+               $("#submit_group_bottom").hide();
+       }
+       else
+       {
+               $("#submit_group_bottom").show();
+       }
+}
+
+add_application = function (app, menuaction, vendor_id)
+{
+       if (!vendor_id)
+       {
+               return;
+       }
+
+       oArgs = {
+               menuaction: menuaction,
+               vendor_id: vendor_id
+       };
+
+       var requestUrl;
+       if (app === 'eventplannerfrontend')
+       {
+               requestUrl = phpGWLink('eventplannerfrontend/', oArgs);
+       }
+       else
+       {
+               requestUrl = phpGWLink('index.php', oArgs);
+       }
+       alert(requestUrl);
+       window.location = requestUrl;
+};

Modified: trunk/phpgwapi/inc/class.uicommon.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.uicommon.inc.php   2017-03-08 03:16:36 UTC (rev 
16414)
+++ trunk/phpgwapi/inc/class.uicommon.inc.php   2017-03-09 10:32:04 UTC (rev 
16415)
@@ -49,12 +49,14 @@
                        $composite_types,
                        $payment_methods,
                        $permissions,
-                       $called_class_arr;
+                       $called_class_arr,
+                       $currentapp;
 
                public function __construct()
                {
                        parent::__construct();
                        $called_class = get_called_class();
+                       $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->called_class_arr = explode('_', $called_class, 
2);
                }
 
@@ -122,8 +124,6 @@
 
                public function save($ajax = false)
                {
-                       $called_class = get_called_class();
-
                        if (empty($this->permissions[PHPGW_ACL_ADD]))
                        {
                                phpgw::no_access();
@@ -160,7 +160,7 @@
                                        {
                                                
phpgwapi_cache::message_set(lang('messages_saved_form'), 'message');
                                                self::redirect(array(
-                                                       'menuaction' => 
"{$this->called_class_arr[0]}.{$this->called_class_arr[1]}.edit",
+                                                       'menuaction' => 
"{$this->currentapp}.{$this->called_class_arr[1]}.edit",
                                                        'id'            => 
$object->get_id(),
                                                        'active_tab' => 
$active_tab
                                                        )
@@ -230,7 +230,7 @@
                public function query($relaxe_acl = false)
                {
                        $values = $this->get_data($relaxe_acl);
-                       array_walk($values["results"], array($this, 
"_add_links"), 
"{$this->called_class_arr[0]}.{$this->called_class_arr[1]}.edit");
+                       array_walk($values["results"], array($this, 
"_add_links"), "{$this->currentapp}.{$this->called_class_arr[1]}.edit");
 
                        return $this->jquery_results($values);
                }

Modified: trunk/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.uicommon_jquery.inc.php    2017-03-08 03:16:36 UTC 
(rev 16414)
+++ trunk/phpgwapi/inc/class.uicommon_jquery.inc.php    2017-03-09 10:32:04 UTC 
(rev 16415)
@@ -182,8 +182,10 @@
                        $this->add_js_event('load', $js);
                }
 
-               public function link( $data )
+               function get_link_base()
                {
+                       $base = '/index.php';
+
                        switch ($GLOBALS['phpgw_info']['flags']['currentapp'])
                        {
                                case 'bookingfrontend':
@@ -199,28 +201,19 @@
                                        $base = '/index.php';
                                        break;
                        }
+                       return $base;
+               }
 
+               public function link( $data )
+               {
+                       $base = self::get_link_base();
                        return $GLOBALS['phpgw']->link($base, $data);
-
-/*
-                       if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 
'bookingfrontend')
-                       {
-                               return 
$GLOBALS['phpgw']->link('/bookingfrontend/', $data);
-                       }
-                       else if ($GLOBALS['phpgw_info']['flags']['currentapp'] 
== 'activitycalendarfrontend')
-                       {
-                               return 
$GLOBALS['phpgw']->link('/activitycalendarfrontend/', $data);
-                       }
-                       else
-                       {
-                               return $GLOBALS['phpgw']->link('/index.php', 
$data);
-                       }
- */
                }
 
                public function redirect( $link_data )
                {
-                       $GLOBALS['phpgw']->redirect_link('/index.php', 
$link_data);
+                       $base = self::get_link_base();
+                       $GLOBALS['phpgw']->redirect_link($base, $link_data);
                }
 
                public function flash( $msg, $type = 'success' )




reply via email to

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