fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16180] more on eventplanner


From: sigurdne
Subject: [Fmsystem-commits] [16180] more on eventplanner
Date: Sun, 22 Jan 2017 11:46:55 -0500 (EST)

Revision: 16180
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16180
Author:   sigurdne
Date:     2017-01-22 11:46:55 -0500 (Sun, 22 Jan 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.uievents.inc.php
    trunk/eventplanner/inc/class.uivendor.inc.php

Added Paths:
-----------
    trunk/eventplanner/js/portico/events.index.js

Modified: trunk/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uiapplication.inc.php  2017-01-22 11:29:43 UTC 
(rev 16179)
+++ trunk/eventplanner/inc/class.uiapplication.inc.php  2017-01-22 16:46:55 UTC 
(rev 16180)
@@ -38,6 +38,7 @@
                        'add' => true,
                        'index' => true,
                        'query' => true,
+                       'get_list'=> true,
                        'view' => true,
                        'edit' => true,
                        'save' => true,
@@ -82,6 +83,7 @@
                                'name' => 'vendor',
                                'app' => 'eventplanner',
                                'ui' => 'vendor',
+                               'function' => 'get_list',
                                'label_attr' => 'name',
                                'text' => lang('vendor') . ':',
                                'requestGenerator' => 'requestWithVendorFilter'

Modified: trunk/eventplanner/inc/class.uibooking.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uibooking.inc.php      2017-01-22 11:29:43 UTC 
(rev 16179)
+++ trunk/eventplanner/inc/class.uibooking.inc.php      2017-01-22 16:46:55 UTC 
(rev 16180)
@@ -38,6 +38,7 @@
                        'add' => true,
                        'index' => true,
                        'query' => true,
+                       'get_list'=> true,
                        'view' => true,
                        'edit' => true,
                        'save' => true,
@@ -47,7 +48,8 @@
                );
                protected
                        $fields,
-                       $permissions;
+                       $permissions,
+                       $currentapp;
 
                public function __construct()
                {
@@ -57,6 +59,7 @@
                        $this->bo = createObject('eventplanner.bobooking');
                        $this->fields = eventplanner_booking::get_fields();
                        $this->permissions = 
eventplanner_booking::get_instance()->get_permission_array();
+                       $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                }
 
                public function index()
@@ -83,8 +86,9 @@
                                                        array(
                                                                'type' => 
'autocomplete',
                                                                'name' => 
'application',
-                                                               'app' => 
'eventplanner',
+                                                               'app' => 
$this->currentapp,
                                                                'ui' => 
'application',
+                                                               'function' => 
'get_list',
                                                                'label_attr' => 
'title',
                                                                'text' => 
lang('application') . ':',
                                                                
'requestGenerator' => 'requestWithApplicationFilter'
@@ -101,7 +105,7 @@
                                ),
                                'datatable' => array(
                                        'source' => self::link(array(
-                                               'menuaction' => 
'eventplanner.uibooking.index',
+                                               'menuaction' => 
"{$this->currentapp}.uibooking.index",
                                                'phpgw_return_as' => 'json'
                                        )),
                                        'allrows' => true,
@@ -126,7 +130,7 @@
                                'text' => lang('show'),
                                'action' => 
$GLOBALS['phpgw']->link('/index.php', array
                                        (
-                                       'menuaction' => 
'eventplanner.uibooking.view'
+                                       'menuaction' => 
"{$this->currentapp}.uibooking.view"
                                )),
                                'parameters' => json_encode($parameters)
                        );
@@ -137,7 +141,7 @@
                                'text' => lang('edit'),
                                'action' => 
$GLOBALS['phpgw']->link('/index.php', array
                                        (
-                                       'menuaction' => 
'eventplanner.uibooking.edit'
+                                       'menuaction' => 
"{$this->currentapp}.uibooking.edit"
                                )),
                                'parameters' => json_encode($parameters)
                        );
@@ -229,7 +233,7 @@
 
                        $datatable_def[] = array(
                                'container' => 'datatable-container_1',
-                               'requestUrl' => 
json_encode(self::link(array('menuaction' => 
'eventplanner.uivendor_report.query',
+                               'requestUrl' => 
json_encode(self::link(array('menuaction' => 
"{$this->currentapp}.uivendor_report.query",
                                        'filter_booking_id' => $id,
                                        'filter_active' => 1,
                                        'phpgw_return_as' => 'json'))),
@@ -260,7 +264,7 @@
                        );
                        $datatable_def[] = array(
                                'container' => 'datatable-container_2',
-//                             'requestUrl' => 
json_encode(self::link(array('menuaction' => 
'eventplanner.uicustomer_report.query',
+//                             'requestUrl' => 
json_encode(self::link(array('menuaction' => 
"{$this->currentapp}.uicustomer_report.query",
 //                                     'filter_booking_id' => $id,
 //                                     'filter_active' => 1,
 //                                     'phpgw_return_as' => 'json'))),
@@ -301,14 +305,14 @@
 
                        $data = array(
                                'datatable_def' => $datatable_def,
-                               'form_action' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'eventplanner.uibooking.save')),
-                               'cancel_url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'eventplanner.uibooking.index',)),
+                               'form_action' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
"{$this->currentapp}.uibooking.save")),
+                               'cancel_url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
"{$this->currentapp}.uibooking.index",)),
                                'booking' => $booking,
                                'application' => $application,
                                'application_type_list' => 
$application_type_list,
-                               'new_customer_url' => 
self::link(array('menuaction' => 'eventplanner.uicustomer.add')),
-                               'application_url' => 
self::link(array('menuaction' => 'eventplanner.uiapplication.edit', 'id' => 
$booking->application_id)),
-                               'customer_url' => self::link(array('menuaction' 
=> 'eventplanner.uicustomer.edit', 'id' => $booking->customer_id)),
+                               'new_customer_url' => 
self::link(array('menuaction' => "{$this->currentapp}.uicustomer.add")),
+                               'application_url' => 
self::link(array('menuaction' => "{$this->currentapp}.uiapplication.edit", 'id' 
=> $booking->application_id)),
+                               'customer_url' => self::link(array('menuaction' 
=> "{$this->currentapp}.uicustomer.edit", 'id' => $booking->customer_id)),
                                'mode' => $mode,
                                'tabs' => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
                                'value_active_tab' => $active_tab

Modified: trunk/eventplanner/inc/class.uievents.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uievents.inc.php       2017-01-22 11:29:43 UTC 
(rev 16179)
+++ trunk/eventplanner/inc/class.uievents.inc.php       2017-01-22 16:46:55 UTC 
(rev 16180)
@@ -36,12 +36,13 @@
                public $public_functions = array(
                        'index' => true,
                        'query' => true,
-                       'edit' => true,
+                       'edit' => true
                );
 
                protected
                        $fields,
-                       $permissions;
+                       $permissions,
+                       $currentapp;
 
                public function __construct()
                {
@@ -52,6 +53,8 @@
                        $this->cats = & $this->bo->cats;
                        $this->fields = eventplanner_application::get_fields();
                        $this->permissions = 
eventplanner_application::get_instance()->get_permission_array();
+                       $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+
                }
 
                private function get_status_options( $selected = 0 )
@@ -76,8 +79,9 @@
                        $combos[] = array(
                                'type' => 'autocomplete',
                                'name' => 'vendor',
-                               'app' => 'eventplanner',
+                               'app' => $this->currentapp,
                                'ui' => 'vendor',
+                               'function' => 'get_list',
                                'label_attr' => 'name',
                                'text' => lang('vendor') . ':',
                                'requestGenerator' => 'requestWithVendorFilter'
@@ -118,7 +122,7 @@
 
                        phpgwapi_jquery::load_widget('autocomplete');
 
-                       $function_msg = lang('application');
+                       $function_msg = lang('events');
 
                        $data = array(
                                'datatable_name' => $function_msg,
@@ -130,7 +134,7 @@
                                ),
                                'datatable' => array(
                                        'source' => self::link(array(
-                                               'menuaction' => 
'eventplanner.uievents.index',
+                                               'menuaction' => 
"{$this->currentapp}.uievents.index",
                                                'phpgw_return_as' => 'json'
                                        )),
                                        'allrows' => true,
@@ -161,12 +165,12 @@
                                'text' => lang('show'),
                                'action' => 
$GLOBALS['phpgw']->link('/index.php', array
                                        (
-                                       'menuaction' => 
'eventplanner.uiapplication.view'
+                                       'menuaction' => 
"{$this->currentapp}.uievents.edit"
                                )),
                                'parameters' => json_encode($parameters)
                        );
 
-                       self::add_javascript('eventplanner', 'portico', 
'application.index.js');
+                       self::add_javascript('eventplanner', 'portico', 
'events.index.js');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::render_template_xsl('datatable_jquery', $data);
@@ -208,7 +212,7 @@
 
                        $datatable_def[] = array(
                                'container' => 'datatable-container_0',
-                               'requestUrl' => 
json_encode(self::link(array('menuaction' => 'eventplanner.uibooking.query',
+                               'requestUrl' => 
json_encode(self::link(array('menuaction' => 
"{$this->currentapp}.uibooking.query",
                                        'filter_application_id' => $id,
                        //              'filter_active' => 1,
                                        'phpgw_return_as' => 'json'))),
@@ -241,7 +245,7 @@
 
                        $data = array(
                                'datatable_def' => $datatable_def,
-                               'cancel_url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'eventplanner.uievents.index',)),
+                               'cancel_url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
"{$this->currentapp}.uievents.index",)),
                                'application' => $application,
                                'category_name' => $category[0]['name'],
                                'status_list' => array('options' => 
$this->get_status_options($application->status)),

Modified: trunk/eventplanner/inc/class.uivendor.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uivendor.inc.php       2017-01-22 11:29:43 UTC 
(rev 16179)
+++ trunk/eventplanner/inc/class.uivendor.inc.php       2017-01-22 16:46:55 UTC 
(rev 16180)
@@ -41,6 +41,7 @@
                        'view' => true,
                        'edit' => true,
                        'save' => true,
+                       'get_list' => true
                );
 
                protected

Added: trunk/eventplanner/js/portico/events.index.js
===================================================================
--- trunk/eventplanner/js/portico/events.index.js                               
(rev 0)
+++ trunk/eventplanner/js/portico/events.index.js       2017-01-22 16:46:55 UTC 
(rev 16180)
@@ -0,0 +1,4 @@
+function requestWithVendorFilter(request)
+{
+       return request +  '&organization_number=1';
+}




reply via email to

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