fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14750] Merge 14745:14749 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [14750] Merge 14745:14749 from trunk
Date: Wed, 17 Feb 2016 14:26:52 +0000

Revision: 14750
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14750
Author:   sigurdne
Date:     2016-02-17 14:26:29 +0000 (Wed, 17 Feb 2016)
Log Message:
-----------
Merge 14745:14749 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/phpgwapi/inc/class.jquery.inc.php
    branches/Version-2_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php
    branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
    branches/Version-2_0-branch/property/inc/class.bobudget.inc.php
    branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
    branches/Version-2_0-branch/property/inc/class.bolookup.inc.php
    branches/Version-2_0-branch/property/inc/class.boproject.inc.php
    branches/Version-2_0-branch/property/inc/class.soinvoice.inc.php
    branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php
    branches/Version-2_0-branch/property/inc/class.uientity.inc.php
    branches/Version-2_0-branch/property/inc/class.uilocation.inc.php
    branches/Version-2_0-branch/property/inc/class.uilookup.inc.php
    branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
    branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
    branches/Version-2_0-branch/property/js/portico/invoice.index.js
    branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php

Added Paths:
-----------
    branches/Version-2_0-branch/phpgwapi/js/contextMenu/
    branches/Version-2_0-branch/phpgwapi/js/jszip/

Property Changed:
----------------
    branches/Version-2_0-branch/


Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744
   + /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.jquery.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.jquery.inc.php       
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.jquery.inc.php       
2016-02-17 14:26:29 UTC (rev 14750)
@@ -1,56 +1,56 @@
 <?php
        /**
- * phpGroupWare jQuery wrapper class
- *
- * @author Sigurd Nes
- * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
- * @license http://www.fsf.org/licenses/gpl.html GNU General Public License
- * @package phpgroupware
- * @subpackage phpgwapi
+        * phpGroupWare jQuery wrapper class
+        *
+        * @author Sigurd Nes
+        * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * @license http://www.fsf.org/licenses/gpl.html GNU General Public 
License
+        * @package phpgroupware
+        * @subpackage phpgwapi
         * @version $Id$
- */
+        */
        /*
-  This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 2 of the License, or
-  (at your option) any later version.
+         This program is free software: you can redistribute it and/or modify
+         it under the terms of the GNU General Public License as published by
+         the Free Software Foundation, either version 2 of the License, or
+         (at your option) any later version.
 
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+         This program is distributed in the hope that it will be useful,
+         but WITHOUT ANY WARRANTY; without even the implied warranty of
+         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+         GNU General Public License for more details.
 
-  You should have received a copy of the GNU General Public License
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
+         You should have received a copy of the GNU General Public License
+         along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
 
        /**
- * phpGroupWare jQuery wrapper class
- *
- * @package phpgroupware
- * @subpackage phpgwapi
- * @category gui
- */
+        * phpGroupWare jQuery wrapper class
+        *
+        * @package phpgroupware
+        * @subpackage phpgwapi
+        * @category gui
+        */
        class phpgwapi_jquery
        {
 
-       /**
-        * @var int $counter the widget id counter
-        */
-       private static $counter = 0;
+               /**
+                * @var int $counter the widget id counter
+                */
+               private static $counter = 0;
 
-       /**
+               /**
                 * Load all the dependencies for a jQuery widget
-        *
-        * @param string $widget the name of the widget to load, such as 
autocomplete
-        *
-        * @return string yahoo namespace for widget - empty string on failure
-        *
-        * @internal this does not render the widget it only includes the 
header js files
-        */
-               public static function load_widget($widget)
+                *
+                * @param string $widget the name of the widget to load, such 
as autocomplete
+                *
+                * @return string yahoo namespace for widget - empty string on 
failure
+                *
+                * @internal this does not render the widget it only includes 
the header js files
+                */
+               public static function load_widget( $widget )
                {
-                       if(preg_match('/MSIE (6|7|8)/', 
$_SERVER['HTTP_USER_AGENT']))
+                       if (preg_match('/MSIE (6|7|8)/', 
$_SERVER['HTTP_USER_AGENT']))
                        {
                                $_jquery_core = 'jquery-1.11.3'; // In case we 
need IE 6–8 support.
                        }
@@ -59,10 +59,10 @@
                                $_jquery_core = 'jquery-2.1.4';
                        }
 
-                       $_jquery_ui      = 'jquery-ui-1.11.4';
-               $_type = '.min'; // save some download
+                       $_jquery_ui = 'jquery-ui-1.11.4';
+                       $_type = '.min'; // save some download
 
-                       if($GLOBALS['phpgw_info']['flags']['currentapp'] == 
'bookingfrontend')
+                       if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 
'bookingfrontend')
                        {
                                $theme = 'humanity';
                        }
@@ -70,157 +70,166 @@
                        {
                                $theme = 'ui-lightness';
                        }
-               $load = array();
-                       switch($widget)
+                       $load = array();
+                       switch ($widget)
                        {
-                       case 'core':
-                               $load = array
-                                       (
+                               case 'core':
+                                       $load = array
+                                               (
                                                "js/{$_jquery_core}{$_type}",
-                               );
-                               break;
+                                       );
+                                       break;
 
-                       case 'datepicker':
-                               $load = array
-                                       (
+                               case 'datepicker':
+                                       $load = array
+                                               (
                                                "js/{$_jquery_core}{$_type}",
                                                "js/{$_jquery_ui}{$_type}",
-                                       
"development-bundle/ui/i18n/jquery.ui.datepicker-{$GLOBALS['phpgw_info']['user']['preferences']['common']['lang']}",
-                               );
+                                               
"development-bundle/ui/i18n/jquery.ui.datepicker-{$GLOBALS['phpgw_info']['user']['preferences']['common']['lang']}",
+                                       );
                                        
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/css/{$theme}/jquery-ui-1.10.4.custom.css");
                                        
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/css/jquery-ui-timepicker-addon.css");
-                               break;
+                                       break;
 
-                       case 'validator':
-                               $load = array
-                                       (
+                               case 'validator':
+                                       $load = array
+                                               (
                                                "js/{$_jquery_core}{$_type}",
-                                       
"validator/jquery.form-validator{$_type}"
+                                               
"validator/jquery.form-validator{$_type}"
 //                                     "validator/jquery.form-validator"
-                               );
+                                       );
                                        
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/validator/theme-default.css");
-                               break;
-                       
-                       case 'menu':
-                       case 'autocomplete':
-                               $load = array
-                                       (
+                                       break;
+
+                               case 'menu':
+                               case 'autocomplete':
+                                       $load = array
+                                               (
                                                "js/{$_jquery_core}{$_type}",
                                                "js/{$_jquery_ui}{$_type}",
-                               );
+                                       );
 
                                        
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/css/{$theme}/jquery-ui-1.10.4.custom.css");
 
-                               break;
+                                       break;
 
-                       case 'tabview':
-                               $load = array
-                                       (
+                               case 'tabview':
+                                       $load = array
+                                               (
                                                "js/{$_jquery_core}{$_type}",
-                               //      "tabs/jquery.responsiveTabs{$_type}",
-                                       "tabs/jquery.responsiveTabs",
-                                       'common'
-                               );
+                                               //      
"tabs/jquery.responsiveTabs{$_type}",
+                                               "tabs/jquery.responsiveTabs",
+                                               'common'
+                                       );
 
-                               
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/tabs/css/responsive-tabs.css");
-                               
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/tabs/css/style.css");
+                                       
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/tabs/css/responsive-tabs.css");
+                                       
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/tabs/css/style.css");
 
-                               break;
-                       case 'mmenu':
-                               $load = array
-                                       (
+                                       break;
+                               case 'mmenu':
+                                       $load = array
+                                               (
                                                "js/{$_jquery_core}{$_type}",
-                                       "mmenu/src/js/jquery.mmenu.min.all"
-                               );
+                                               
"mmenu/src/js/jquery.mmenu.min.all"
+                                       );
 
-                               
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/mmenu/src/css/jquery.mmenu.all.css");
+                                       
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/mmenu/src/css/jquery.mmenu.all.css");
 
-                               break;
+                                       break;
 
-                       case 'treeview':
-                               $load = array
-                                       (
+                               case 'treeview':
+                                       $load = array
+                                               (
                                                "js/{$_jquery_core}{$_type}",
-                                       "treeview/jstree{$_type}"
-                               );
+                                               "treeview/jstree{$_type}"
+                                       );
 
-                               
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/treeview/themes/default/style.min.css");
+                                       
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/jquery/treeview/themes/default/style.min.css");
 
-                               break;
-                       
-                       case 'numberformat':
-                               $load = array
-                                       (
+                                       break;
+
+                               case 'numberformat':
+                                       $load = array
+                                               (
                                                "js/{$_jquery_core}{$_type}",
-                                       "number-format/jquery.number{$_type}"
-                               );
+                                               
"number-format/jquery.number{$_type}"
+                                       );
 
-                               break;
-                       case 'layout':
-                               $load = array
-                               (
+                                       break;
+                               case 'layout':
+                                       $load = array
+                                               (
                                                "js/{$_jquery_core}{$_type}",
                                                "js/{$_jquery_ui}{$_type}",
                                                'layout' => 
array("jquery.layout{$_type}", "plugins/jquery.layout.state")
-                               );
-                               break;
-                       
-                       default:
-                               $err = "Unsupported jQuery widget '%1' supplied 
to phpgwapi_jquery::load_widget()";
-                               trigger_error(lang($err, $widget), 
E_USER_WARNING);
-                               return '';
-               }
-                       foreach($load as $key => $scripts)
-               {
+                                       );
+                                       break;
 
-                       $package = 'jquery';
+                               case 'contextMenu':
+                                       $load = array
+                                               (
+                                               "js/{$_jquery_core}{$_type}",
+                                               'contextMenu' => 
array("jquery.contextMenu{$_type}")
+                                       );
+                                               
$GLOBALS['phpgw']->css->add_external_file("phpgwapi/js/contextMenu/jquery.contextMenu.min.css");
+                                       break;
 
-                       if(!$key == intval($key))
-                       {
-                               $package = $key;
+                               default:
+                                       $err = "Unsupported jQuery widget '%1' 
supplied to phpgwapi_jquery::load_widget()";
+                                       trigger_error(lang($err, $widget), 
E_USER_WARNING);
+                                       return '';
                        }
-
-                       if(!is_array($scripts))
+                       foreach ($load as $key => $scripts)
                        {
-                               $scripts = array($scripts);
-                       }
 
-                       foreach($scripts as $script)
-                       {
-                               $test = 
$GLOBALS['phpgw']->js->validate_file($package, $script);
-                                       if(!$test)
+                               $package = 'jquery';
+
+                               if (!$key == intval($key))
                                {
-                                       $err = "Unable to load jQuery script 
'%1' when attempting to load widget: '%2'";
-                                       trigger_error(lang($err, $script, 
$widget), E_USER_WARNING);
-                                       return '';
+                                       $package = $key;
                                }
+
+                               if (!is_array($scripts))
+                               {
+                                       $scripts = array($scripts);
+                               }
+
+                               foreach ($scripts as $script)
+                               {
+                                       $test = 
$GLOBALS['phpgw']->js->validate_file($package, $script);
+                                       if (!$test)
+                                       {
+                                               $err = "Unable to load jQuery 
script '%1' when attempting to load widget: '%2'";
+                                               trigger_error(lang($err, 
$script, $widget), E_USER_WARNING);
+                                               return '';
+                                       }
+                               }
                        }
+                       return "phpgroupware.{$widget}" . ++self::$counter;
                }
-               return "phpgroupware.{$widget}" . ++self::$counter;
-       }
 
-       public static function formvalidator_generate($modules = array(), 
$form_id = 'form', $errorMessagePosition_id = '')
-       {
-               // keep track of number of times loaded per pageload
-               static $times_loaded = 0;
+               public static function formvalidator_generate( $modules = 
array(), $form_id = 'form', $errorMessagePosition_id = '' )
+               {
+                       // keep track of number of times loaded per pageload
+                       static $times_loaded = 0;
 
-               self::load_widget('validator');
-               $modules_js = '"' . implode(',', $modules) . '"';
+                       self::load_widget('validator');
+                       $modules_js = '"' . implode(',', $modules) . '"';
 
-               if($errorMessagePosition_id)
-               {
-                       $errorMessagePosition = 
"$('#{$errorMessagePosition_id}')";
-               }
-               else
-               {
-                       $errorMessagePosition = "'top'";
-               }
+                       if ($errorMessagePosition_id)
+                       {
+                               $errorMessagePosition = 
"$('#{$errorMessagePosition_id}')";
+                       }
+                       else
+                       {
+                               $errorMessagePosition = "'top'";
+                       }
 
-               $translation = '';
-               if(!$times_loaded)//first time only
-               {
+                       $translation = '';
+                       if (!$times_loaded)//first time only
+                       {
                                //TODO: use translations from the package
-                               
if($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] == 'no')
+                               if 
($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] == 'no')
                                {
                                        $translation = <<<JS
 
@@ -274,7 +283,7 @@
                                else
                                {
 
-                       $translation = <<<JS
+                                       $translation = <<<JS
 
                        var validateLanguage = {
                                 errorTitle : 'Form submission failed!',
@@ -308,10 +317,10 @@
                                 groupCheckedEnd : ' item(s)'
                           };
 JS;
-               }
+                               }
                        }
 
-               $js = <<<JS
+                       $js = <<<JS
 
                        {$translation}
 
@@ -327,67 +336,67 @@
                                });
                        });
 JS;
-               $GLOBALS['phpgw']->js->add_code('', $js);
-               $times_loaded ++;
-       }
+                       $GLOBALS['phpgw']->js->add_code('', $js);
+                       $times_loaded ++;
+               }
 
-       /**
-        * Add the events required for tabs to work
-        *
-        * @param array $tabs
-        * @param string $selection active tab
-        * @param string $tab_set indentificator of tabset
-        * @return string HTML definition of the tabs
-        */
-       public static function tabview_generate($tabs, $selection, $tab_set = 
'tab-content')
-       {
-               self::load_widget('tabview');
-               $output = <<<HTML
+               /**
+                * Add the events required for tabs to work
+                *
+                * @param array $tabs
+                * @param string $selection active tab
+                * @param string $tab_set indentificator of tabset
+                * @return string HTML definition of the tabs
+                */
+               public static function tabview_generate( $tabs, $selection, 
$tab_set = 'tab-content' )
+               {
+                       self::load_widget('tabview');
+                       $output = <<<HTML
                                        <ul>
 HTML;
-               $disabled = array();
-               $tab_map = array();
-               $i = 0;
-                       foreach($tabs as $id => $tab)
+                       $disabled = array();
+                       $tab_map = array();
+                       $i = 0;
+                       foreach ($tabs as $id => $tab)
                        {
-                       $tab_map[$id] = $i;
+                               $tab_map[$id] = $i;
 
-                       $label = $tab['label'];
-                       $_function = '';
-                               if(isset($tab['function']))
+                               $label = $tab['label'];
+                               $_function = '';
+                               if (isset($tab['function']))
                                {
-                               $_function = " onclick=\"javascript: 
{$tab['function']};\"";
-                       }
+                                       $_function = " onclick=\"javascript: 
{$tab['function']};\"";
+                               }
 
-                       //Set disabled tabs
-                       //if (empty($tab['link']) && empty($tab['function'])) {
-                               if($tab['disable'] == 1)
+                               //Set disabled tabs
+                               //if (empty($tab['link']) && 
empty($tab['function'])) {
+                               if ($tab['disable'] == 1)
                                {
-                               $disabled[] = $i;
-                       }
+                                       $disabled[] = $i;
+                               }
 
-                       if($tab['link'] && !preg_match('/(^#)/i', $tab['link']))
-                       {
-                                 $_function =  " onclick=\"javascript: 
window.location = '{$tab['link']}';\"";
-                                 $tab['link'] = "#{$id}";
-                       }
-                       
-                       
-                       $output .= <<<HTML
+                               if ($tab['link'] && !preg_match('/(^#)/i', 
$tab['link']))
+                               {
+                                       $_function = " onclick=\"javascript: 
window.location = '{$tab['link']}';\"";
+                                       $tab['link'] = "#{$id}";
+                               }
+
+
+                               $output .= <<<HTML
                                <li><a 
href="{$tab['link']}"{$_function}>{$label}</a></li>
 HTML;
 
-                       $i++;
-               }
+                               $i++;
+                       }
 
                        $selected = array_key_exists($selection, $tab_map) ? 
(int)$tab_map[$selection] : 0;
 
-               $disabled_js = '[' . implode(',', $disabled) . ']';
+                       $disabled_js = '[' . implode(',', $disabled) . ']';
 
-               $output .= <<<HTML
+                       $output .= <<<HTML
                                        </ul>
 HTML;
-               $js = <<<JS
+                       $js = <<<JS
                $(document).ready(function ()
                {
                        /*if(typeof(JqueryPortico.inlineTablesDefined) == 
'undefined' || JqueryPortico.inlineTablesDefined == 0)
@@ -416,23 +425,23 @@
 
                        };
 JS;
-               $GLOBALS['phpgw']->js->add_code('', $js);
-               return $output;
-       }
+                       $GLOBALS['phpgw']->js->add_code('', $js);
+                       return $output;
+               }
 
-       public static function init_ckeditor($target)
-       {
-               self::load_widget('core');
-               $GLOBALS['phpgw']->js->validate_file('ckeditor', 'ckeditor');
-               $GLOBALS['phpgw']->js->validate_file('ckeditor', 
'adapters/jquery');
+               public static function init_ckeditor( $target )
+               {
+                       self::load_widget('core');
+                       $GLOBALS['phpgw']->js->validate_file('ckeditor', 
'ckeditor');
+                       $GLOBALS['phpgw']->js->validate_file('ckeditor', 
'adapters/jquery');
                        $userlang = 
isset($GLOBALS['phpgw_info']['server']['default_lang']) && 
$GLOBALS['phpgw_info']['server']['default_lang'] ? 
$GLOBALS['phpgw_info']['server']['default_lang'] : 'en';
-                       
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['lang']))
-               {
-                       $userlang = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
-               }
+                       if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['lang']))
+                       {
+                               $userlang = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
+                       }
 
 
-               $js = <<<JS
+                       $js = <<<JS
 
                $( document ).ready( function() {
                        $( 'textarea#{$target}' ).ckeditor(
@@ -443,6 +452,6 @@
                        );
                } );
 JS;
-               $GLOBALS['phpgw']->js->add_code('', $js);
-       }
+                       $GLOBALS['phpgw']->js->add_code('', $js);
+               }
        }
\ No newline at end of file

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php      
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php      
2016-02-17 14:26:29 UTC (rev 14750)
@@ -76,14 +76,18 @@
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($currentapp);
 
                        phpgwapi_jquery::load_widget('core');
+                       phpgwapi_jquery::load_widget('contextMenu');
+
                        self::add_javascript('phpgwapi', 'DataTables', 
'media/js/jquery.dataTables.min.js');
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Responsive/js/dataTables.responsive.js');
                        //Buttons
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Buttons/js/dataTables.buttons.min.js');
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Buttons/js/buttons.colVis.min.js');
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Buttons/js/buttons.flash.js');
-//                     self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Buttons/js/buttons.html5.js');
+                       self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Buttons/js/buttons.html5.js');
+                       self::add_javascript('phpgwapi', 'jszip', 
'jszip.min.js');
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Select/js/dataTables.select.min.js');
+//                     self::add_javascript('phpgwapi', 'DataTables', 
'extensions/ColReorder/js/dataTables.ColReorder.min.js');
 
                        self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.jeditable.js');
                        self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.dataTables.editable.js');

Modified: 
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
2016-02-17 14:26:29 UTC (rev 14750)
@@ -489,7 +489,7 @@
                var columns = [
                <xsl:for-each select="//datatable/field">
                        {
-                       data:                   "<xsl:value-of select="key"/>",
+                       data: "<xsl:value-of select="key"/>",
                        <xsl:if test="className">
                                <xsl:choose>
                                        <xsl:when test="className='right' or 
className='center'">
@@ -531,10 +531,12 @@
                                return ret;
                                },
                        </xsl:if>
-                       <xsl:if test="dir">
-                               dir: "<xsl:value-of select="dir"/>",
-                       </xsl:if>
                        <xsl:choose>
+                               <xsl:when test="dir !=''">
+                                       dir: "<xsl:value-of select="dir"/>",
+                               </xsl:when>
+                       </xsl:choose>
+                       <xsl:choose>
                                <xsl:when test="editor">
                                        <xsl:if test="editor =0">
                                                editor: false,
@@ -578,7 +580,9 @@
                var disablePagination = '<xsl:value-of 
select="disablePagination"/>';
                var select_all = '<xsl:value-of select="select_all"/>';
                var initial_search = {"search": "<xsl:value-of 
select="query"/>" };
-                       
+               var action_def = null;
+               var contextMenuItems={};
+               var InitContextMenu=false
 
                <xsl:choose>
                        <xsl:when test="//datatable/actions">
@@ -638,9 +642,9 @@
 //                             text: "<xsl:value-of 
select="php:function('lang', 'copy')"/>"
 //                             },
 //                             'csvHtml5',
-//                             'excelHtml5',
+                               'excelHtml5',
 //                             'pdfHtml5'
-                               'excelFlash',
+//                             'excelFlash',
                                <xsl:choose>
                                        <xsl:when test="download">
                                                ,{
@@ -671,127 +675,128 @@
                                                                        
document.body.appendChild( iframe );
                                                                }
                                                                ]]>
-                                               }
+                                                       }
 
                                                }
                                        </xsl:when>
                                </xsl:choose>
+                               ];
                                <xsl:choose>
                                        <xsl:when test="//datatable/actions != 
''">
-                                               <xsl:for-each 
select="//datatable/actions">
+                                       var action_def = [
+                                       <xsl:for-each 
select="//datatable/actions">
                                                        <xsl:choose>
                                                                <xsl:when 
test="type = 'custom'">
-                                                                       ,{
-                                                                       text: 
"<xsl:value-of select="text"/>",
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="className">
-                                                                               
        className: "<xsl:value-of select="className"/>",
-                                                                               
</xsl:when>
-                                                                               
<xsl:otherwise>
-                                                                               
        enabled: false,
-                                                                               
        className: 'record',
-                                                                               
</xsl:otherwise>
-                                                                       
</xsl:choose>
-                                                                       action: 
function (e, dt, node, config)
                                                                        {
-                                                                       <xsl:if 
test="confirm_msg">
-                                                                               
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
-                                                                               
var r = confirm(confirm_msg);
-                                                                               
if (r != true) {
-                                                                               
return false;
+                                                                               
text: "<xsl:value-of select="text"/>",
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="className">
+                                                                               
                className: "<xsl:value-of select="className"/>",
+                                                                               
        </xsl:when>
+                                                                               
        <xsl:otherwise>
+                                                                               
                enabled: false,
+                                                                               
                className: 'record',
+                                                                               
        </xsl:otherwise>
+                                                                               
</xsl:choose>
+                                                                               
action: function (e, dt, node, config)
+                                                                               
{
+                                                                               
<xsl:if test="confirm_msg">
+                                                                               
        var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
+                                                                               
        var r = confirm(confirm_msg);
+                                                                               
        if (r != true) {
+                                                                               
        return false;
+                                                                               
        }
+                                                                               
</xsl:if>
+                                                                               
<xsl:value-of select="custom_code"/>
                                                                                
}
-                                                                       
</xsl:if>
-                                                                       
<xsl:value-of select="custom_code"/>
-                                                                       }
-
-                                                                       }
+                                                                       
}<xsl:value-of select="phpgw:conditional(not(position() = last()), ',', '')"/>
                                                                </xsl:when>
                                                                <xsl:otherwise>
-                                                                       ,{
-                                                                       text: 
"<xsl:value-of select="text"/>",
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="className">
-                                                                               
        className: "<xsl:value-of select="className"/>",
-                                                                               
</xsl:when>
-                                                                               
<xsl:otherwise>
-                                                                               
        enabled: false,
-                                                                               
        className: 'record',
-                                                                               
</xsl:otherwise>
-                                                                       
</xsl:choose>
-                                                                       action: 
function (e, dt, node, config) {
-                                                                       var 
receiptmsg = [];
-                                                                       var 
selected = fnGetSelected();
-                                                                       var 
numSelected =       selected.length;
+                                                                       {
+                                                                               
text: "<xsl:value-of select="text"/>",
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="className">
+                                                                               
                className: "<xsl:value-of select="className"/>",
+                                                                               
        </xsl:when>
+                                                                               
        <xsl:otherwise>
+                                                                               
                enabled: false,
+                                                                               
                className: 'record',
+                                                                               
        </xsl:otherwise>
+                                                                               
</xsl:choose>
+                                                                               
action: function (e, dt, node, config) {
+                                                                               
        var receiptmsg = [];
+                                                                               
        var selected = fnGetSelected();
+                                                                               
        var numSelected =       selected.length;
 
-                                                                       if 
(numSelected ==0){
-                                                                       
alert('None selected');
-                                                                       return 
false;
-                                                                       }
+                                                                               
        if (numSelected ==0){
+                                                                               
                alert('None selected');
+                                                                               
                return false;
+                                                                               
        }
 
-                                                                       <xsl:if 
test="confirm_msg">
-                                                                               
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
-                                                                               
var r = confirm(confirm_msg);
-                                                                               
if (r != true) {
-                                                                               
return false;
-                                                                               
}
-                                                                       
</xsl:if>
+                                                                               
        <xsl:if test="confirm_msg">
+                                                                               
                var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
+                                                                               
                var r = confirm(confirm_msg);
+                                                                               
                if (r != true) {
+                                                                               
                return false;
+                                                                               
                }
+                                                                               
        </xsl:if>
 
-                                                                       var 
target = "<xsl:value-of select="target"/>";
-                                                                       
if(!target)
-                                                                       {
-                                                                       target 
= '_self';
-                                                                       }
+                                                                               
        var target = "<xsl:value-of select="target"/>";
+                                                                               
        if(!target)
+                                                                               
        {
+                                                                               
                target = '_self';
+                                                                               
        }
 
-                                                                       if 
(numSelected &gt; 1){
-                                                                       target 
= '_blank';
-                                                                       }
+                                                                               
        if (numSelected &gt; 1){
+                                                                               
                target = '_blank';
+                                                                               
        }
 
-                                                                       var n = 
0;
-                                                                       for (; 
n &lt; numSelected; ) {
-                                                                       //      
                        console.log(selected[n]);
-                                                                       var 
aData = oTable.fnGetData( selected[n] ); //complete dataset from json returned 
from server
-                                                                       //      
                        console.log(aData);
+                                                                               
        var n = 0;
+                                                                               
        for (; n &lt; numSelected; ) {
+                                                                               
                //                              console.log(selected[n]);
+                                                                               
                        var aData = oTable.fnGetData( selected[n] ); //complete 
dataset from json returned from server
+                                                                               
                //                              console.log(aData);
 
-                                                                       
//delete stuff comes here
-                                                                       var 
action = "<xsl:value-of select="action"/>";
-                                                                       var 
my_name = "<xsl:value-of select="my_name"/>";
+                                                                               
                //delete stuff comes here
+                                                                               
                var action = "<xsl:value-of select="action"/>";
+                                                                               
                var my_name = "<xsl:value-of select="my_name"/>";
 
-                                                                       <xsl:if 
test="parameters">
-                                                                               
var parameters = <xsl:value-of select="parameters"/>;
-                                                                               
//                                              
console.log(parameters.parameter);
-                                                                               
var i = 0;
-                                                                               
len = parameters.parameter.length;
-                                                                               
for (; i &lt; len; ) {
-                                                                               
action += '&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
-                                                                               
i++;
+                                                                               
                <xsl:if test="parameters">
+                                                                               
                        var parameters = <xsl:value-of select="parameters"/>;
+                                                                               
                        //                                              
console.log(parameters.parameter);
+                                                                               
                        var i = 0;
+                                                                               
                        len = parameters.parameter.length;
+                                                                               
                        for (; i &lt; len; ) {
+                                                                               
                        action += '&amp;' + parameters.parameter[i]['name'] + 
'=' + aData[parameters.parameter[i]['source']];
+                                                                               
                        i++;
+                                                                               
                        }
+                                                                               
                </xsl:if>
+
+                                                                               
                // look for the word "DELETE" in URL and my_name
+                                                                               
                if(substr_count(action,'delete')>0 || 
substr_count(my_name,'delete')>0)
+                                                                               
                {
+                                                                               
                        action += "&amp;confirm=yes&amp;phpgw_return_as=json";
+                                                                               
                        execute_ajax(action, function(result){
+                                                                               
                                document.getElementById("message").innerHTML += 
'<br/>' + result;
+                                                                               
                                oTable.fnDraw();
+                                                                               
                        });
+                                                                               
                }
+                                                                               
                else if (target == 'ajax')
+                                                                               
                {
+                                                                               
                        action += "&amp;phpgw_return_as=json";
+                                                                               
                        execute_ajax(action, function(result){
+                                                                               
                                document.getElementById("message").innerHTML += 
'<br/>' + result;
+                                                                               
                                oTable.fnDraw();
+                                                                               
                        });
+                                                                               
                }
+                                                                               
                else
+                                                                               
                {
+                                                                               
                        window.open(action,target);
+                                                                               
                }
+                                                                               
                n++;
+                                                                               
        }
                                                                                
}
-                                                                       
</xsl:if>
-
-                                                                       // look 
for the word "DELETE" in URL and my_name
-                                                                       
if(substr_count(action,'delete')>0 || substr_count(my_name,'delete')>0)
-                                                                       {
-                                                                       action 
+= "&amp;confirm=yes&amp;phpgw_return_as=json";
-                                                                       
execute_ajax(action, function(result){
-                                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                                       
oTable.fnDraw();
-                                                                       });
-                                                                       }
-                                                                       else if 
(target == 'ajax')
-                                                                       {
-                                                                       action 
+= "&amp;phpgw_return_as=json";
-                                                                       
execute_ajax(action, function(result){
-                                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                                       
oTable.fnDraw();
-                                                                       });
-                                                                       }
-                                                                       else
-                                                                       {
-                                                                       
window.open(action,target);
-                                                                       }
-                                                                       n++;
-                                                                       }
-                                                                       }
-                                                                       }
+                                                                       
}<xsl:value-of select="phpgw:conditional(not(position() = last()), ',', '')"/>
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                </xsl:for-each>
@@ -806,29 +811,41 @@
                                                var group_buttons = false;
                                        </xsl:otherwise>
                                </xsl:choose>
+       <![CDATA[
 
+                       var item_name = '';
+                       var contextMenuItem = {};
+                       for(i=0;i < action_def.length;i++)
+                       {
+                               button_def.push(action_def[i]);
+                               if( typeof(action_def[i]['className']) != 
'undefined' && action_def[i]['className'] == 'record')
+                               {
+                                       contextMenuItems[i] = 
{name:action_def[i]['text'], callback:action_def[i]['action']};
+                                       InitContextMenu = true;
+                               }
+                       }
+       ]]>
                                if($(document).width() &lt; 1000)
                                {
-                               group_buttons = true;
+                                       group_buttons = true;
                                }
                                $.fn.dataTable.Buttons.swfPath = 
"phpgwapi/js/DataTables/extensions/Buttons/swf/flashExport.swf";
 
 
                                if(group_buttons === true)
                                {
-                               JqueryPortico.buttons = [
-                               {
-                               extend: 'collection',
-                               text: "<xsl:value-of 
select="php:function('lang', 'collection')"/>",
-                               collectionLayout: 'three-column',
-                               buttons: button_def
+                                       JqueryPortico.buttons = [
+                                               {
+                                                       extend: 'collection',
+                                                       text: "<xsl:value-of 
select="php:function('lang', 'collection')"/>",
+                                                       collectionLayout: 
'three-column',
+                                                       buttons: button_def
+                                               }
+                                       ];
                                }
-                               ];
-
-                               }
                                else
                                {
-                               JqueryPortico.buttons = button_def;
+                                       JqueryPortico.buttons = button_def;
                                }
                        </xsl:when>
                        <xsl:otherwise>
@@ -859,7 +876,7 @@
                        var order_def = [];
                        for(i=0;i < JqueryPortico.columns.length;i++)
                        {
-                               if (JqueryPortico.columns[i]['orderable'] === 
true)
+                               if (JqueryPortico.columns[i]['orderable'] === 
true && typeof(JqueryPortico.columns[i]['dir']) != 'undefined')
                                {
                                        var dir = 
JqueryPortico.columns[i]['dir'] || "desc";
                                        order_def.push([i, dir]);
@@ -877,7 +894,7 @@
                        {
                                var sDom_def = '<"clear">lfrtip';
                        }
-       
+
                $(document).ready(function() {
                        oTable = $('#datatable-container').dataTable({
                                paginate:               disablePagination ? 
false : true,
@@ -889,7 +906,7 @@
                                ajax:                   {
                                        url: ajax_url,
                                        data: {},
-                                                       type: 'POST'
+                                       type: 'POST'
                                },
                                fnServerParams: function ( aoData ) {
                                        if(typeof(aoData.order[0]) != 
'undefined')
@@ -902,13 +919,13 @@
                                                aoData.columns[column] = 
column_to_keep;
                                        }
                                 },
+                               fnCreatedRow  : function( nRow, aData, 
iDataIndex ){
+                               },
                                fnRowCallback: function(nRow, aData, 
iDisplayIndex, iDisplayIndexFull) {
-                                                               
if(typeof(aData['priority'])!= undefined && aData['priority'] > 0)
-                                                               {
-                                                               // 
nRow.addClass(''),
-                                                               //      
console.log(nRow),
-                                                                       $('td', 
nRow).addClass('priority' + aData['priority']);
-                                                               }
+                                                       
if(typeof(aData['priority'])!= undefined && aData['priority'] > 0)
+                                                       {
+                                                               $('td', 
nRow).addClass('priority' + aData['priority']);
+                                                       }
                 },
                                fnDrawCallback: function () {
                                        oTable.makeEditable({
@@ -979,10 +996,18 @@
                                        }
                           } );
 
-                         if(number_of_toolbar_items < 4)
-                         {
+                       if(InitContextMenu === true)
+                       {
+                               $('#datatable-container').contextMenu({
+                                         selector: 'tr',
+                                          items: contextMenuItems,
+                               });
+                       }
+
+                       if(number_of_toolbar_items < 4)
+                       {
                                $('#header1').prop("checked", true);
-                         }
+                       }
                });
        ]]>
 
@@ -1022,33 +1047,34 @@
                        <xsl:if test="type = 'filter'">
                                $('select#<xsl:value-of 
select="name"/>').change( function()
                                {
-                               <xsl:value-of select="extra"/>
-                               filterData('<xsl:value-of select="name"/>', 
$(this).val());
+                                       <xsl:value-of select="extra"/>
+                                       filterData('<xsl:value-of 
select="name"/>', $(this).val());
                                });
                        </xsl:if>
                        <xsl:if test="type = 'date-picker'">
                                var previous_<xsl:value-of select="id"/>;
                                $("#filter_<xsl:value-of 
select="id"/>").on('keyup change', function ()
                                {
-                               if ( $.trim($(this).val()) != 
$.trim(previous_<xsl:value-of select="id"/>) )
-                               {
-                               filterData('<xsl:value-of select="id"/>', 
$(this).val());
-                               previous_<xsl:value-of select="id"/> = 
$(this).val();
-                               }
+                                       if ( $.trim($(this).val()) != 
$.trim(previous_<xsl:value-of select="id"/>) )
+                                       {
+                                               filterData('<xsl:value-of 
select="id"/>', $(this).val());
+                                               previous_<xsl:value-of 
select="id"/> = $(this).val();
+                                       }
                                });
                        </xsl:if>
                        <xsl:if test="type = 'autocomplete'">
                                $(document).ready(function() {
-                               
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('autocompleteselect', function(event, ui){
-                               filterData('filter_<xsl:value-of 
select="name"/>_id', ui.item.value);
+                                       
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('autocompleteselect', function(event, ui){
+                                               
filterData('filter_<xsl:value-of select="name"/>_id', ui.item.value);
+                                       });
+                                       
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('keyup', function(){
+                                               if ($(this).val() == '')
+                                               {
+                                                       
$('#filter_<xsl:value-of select="name"/>_id').val('');
+                                                       
filterData('filter_<xsl:value-of select="name"/>_id', $(this).val());
+                                               }
+                                       });
                                });
-                               
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('keyup', function(){
-                               if ($(this).val() == ''){
-                               $('#filter_<xsl:value-of 
select="name"/>_id').val('');
-                               filterData('filter_<xsl:value-of 
select="name"/>_id', $(this).val());
-                               }
-                               });
-                               });
                        </xsl:if>
                </xsl:for-each>
        <![CDATA[

Modified: branches/Version-2_0-branch/property/inc/class.bobudget.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bobudget.inc.php     
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.bobudget.inc.php     
2016-02-17 14:26:29 UTC (rev 14750)
@@ -115,7 +115,7 @@
                        $this->month = isset($month) && $month ? $month : 0;
                        $this->details = $details;
 
-                       if (isset($year) && !$this->year == $year && 
!$GLOBALS['phpgw_info']['menuaction'] == 'property.uibudget.obligations')
+                       if (isset($year) && $this->year != $year && 
$GLOBALS['phpgw_info']['menuaction'] != 'property.uibudget.obligations')
                        {
                                $this->grouping = '';
                                $this->revision = '';

Modified: branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bolocation.inc.php   
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.bolocation.inc.php   
2016-02-17 14:26:29 UTC (rev 14750)
@@ -721,18 +721,6 @@
                function read( $data = array() )
                {
 //_debug_array($data);
-                       /* $type_id = isset($data['type_id']) && 
$data['type_id'] ? $data['type_id'] : $this->type_id;
-                         $allrows = isset($data['allrows']) && 
$data['allrows'] ? $data['allrows'] : $this->allrows;
-
-                         $locations = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                         'filter' => $this->filter,'cat_id' => 
$this->cat_id,'type_id' => $type_id,
-                         
'lookup_tenant'=>$data['lookup_tenant'],'lookup'=>$data['lookup'],
-                         'district_id'=>$this->district_id,'allrows'=>$allrows,
-                         
'status'=>$this->status,'part_of_town_id'=>$this->part_of_town_id,'dry_run'=>$data['dry_run'],
-                         'location_code' => $this->location_code, 
'filter_role_on_contact' => $data['filter_role_on_contact'], 'role_id' => 
$data['role_id'],
-                         'results' => $data['results'],'control_registered' => 
$data['control_registered'],
-                         'control_id' => $data['control_id'])); */
-
                        if ($data['lookup'] && $data['location_code'])
                        {
                                $data['query'] = $data['query'] ? 
$data['query'] : $data['location_code'];

Modified: branches/Version-2_0-branch/property/inc/class.bolookup.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bolookup.inc.php     
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.bolookup.inc.php     
2016-02-17 14:26:29 UTC (rev 14750)
@@ -252,7 +252,7 @@
                                        {
                                                if ($field['name'] == 
'member_of')
                                                {
-                                                       $filter[$field['name']] 
= phpgw::get_var('cat_id');
+                                                       $filter[$field['name']] 
= $this->cat_id;
                                                }
                                                else
                                                {

Modified: branches/Version-2_0-branch/property/inc/class.boproject.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.boproject.inc.php    
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.boproject.inc.php    
2016-02-17 14:26:29 UTC (rev 14750)
@@ -360,13 +360,13 @@
                                        'id' => '5',
                                        'name' => lang('title')
                                ),
+//                             array
+//                                     (
+//                                     'id' => '6',
+//                                     'name' => lang('module')
+//                             ),
                                array
                                        (
-                                       'id' => '6',
-                                       'name' => lang('module')
-                               ),
-                               array
-                                       (
                                        'id' => '7',
                                        'name' => lang('accounting dim b')
                                ),

Modified: branches/Version-2_0-branch/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soinvoice.inc.php    
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.soinvoice.inc.php    
2016-02-17 14:26:29 UTC (rev 14750)
@@ -1676,7 +1676,7 @@
                                                        $local_error = true;
                                                }
 
-                                               if 
(!($check_count['kostra_count'] == $values['invoice_count'][$n]))
+                                               if 
($check_count['kostra_count'] != $values['invoice_count'][$n])
                                                {
                                                        $receipt['error'][] = 
array('msg' => 'Tjenestekode mangler for undebilag: ' . " " . 
$values['voucher_id'][$n]);
                                                        $local_error = true;
@@ -1819,7 +1819,7 @@
                                                $transfer_sign_field = 
'utbetalingid=';
                                                $transfer_date_field = 
'utbetalingsigndato=';
 
-                                               if 
(!($values['num_days_orig'][$n] == $values['num_days'][$n]))
+                                               if 
($values['num_days_orig'][$n] != $values['num_days'][$n])
                                                {
                                                        $payment_date = 
date($this->db->date_format(), $values['timestamp_voucher_date'][$n] + (24 * 
3600 * $values['num_days'][$n]));
                                                        
$GLOBALS['phpgw']->db->query("UPDATE fm_ecobilag set forfallsdato= 
'$payment_date' where bilagsnr='$voucher_id'");
@@ -2053,19 +2053,19 @@
 
                                if ($global_check)
                                {
-                                       if (!($check_count['dima_count'] == 
$check_count['invoice_count']))
+                                       if ($check_count['dima_count'] != 
$check_count['invoice_count'])
                                        {
                                                
phpgwapi_cache::message_set(lang('Dima is missing from sub invoice in:') . " " 
. $data['voucher_id'], 'error');
                                                $local_error = true;
                                        }
 
-                                       if 
(!($check_count['spbudact_code_count'] == $check_count['invoice_count']))
+                                       if ($check_count['spbudact_code_count'] 
!= $check_count['invoice_count'])
                                        {
                                                
phpgwapi_cache::message_set(lang('Budget code is missing from sub invoice in 
:') . " " . $data['voucher_id'], 'error');
                                                $local_error = true;
                                        }
 
-                                       if (!($check_count['kostra_count'] == 
$check_count['invoice_count']))
+                                       if ($check_count['kostra_count'] != 
$check_count['invoice_count'])
                                        {
                                                
phpgwapi_cache::message_set('Tjenestekode mangler for undebilag: ' . " " . 
$data['voucher_id'], 'error');
                                                $local_error = true;

Modified: branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php  
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php  
2016-02-17 14:26:29 UTC (rev 14750)
@@ -2331,7 +2331,7 @@
                                }
 
                                //override if periode is closed
-                               if (!isset($active_period[$period]) || 
!$active_period[$period] == 1)
+                               if (!isset($active_period[$period]) || 
$active_period[$period] != 1)
                                {
                                        $_sum_oblications = 0;
                                }

Modified: branches/Version-2_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uientity.inc.php     
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.uientity.inc.php     
2016-02-17 14:26:29 UTC (rev 14750)
@@ -417,7 +417,7 @@
                        $combos[] = array('type' => 'filter',
                                'name' => 'criteria_id',
                                'extra' => '',
-                               'text' => lang('criteria'),
+                               'text' => lang('search criteria'),
                                'list' => $values_combo_box[$count]
                        );
 
@@ -1087,11 +1087,9 @@
                                        'perm' => 1, 'acl_location' => 
$this->acl_location));
                        }
 
-                       $second_display = phpgw::get_var('second_display', 
'bool');
-
                        $default_district = 
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])
 ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'] : 
'');
 
-                       if ($default_district && !$second_display && 
!$this->district_id)
+                       if ($default_district && ! 
isset($_REQUEST['district_id']))
                        {
                                $this->bo->district_id = $default_district;
                                $this->district_id = $default_district;
@@ -1178,7 +1176,6 @@
                                'datatable' => array(
                                        'source' => self::link(array(
                                                'menuaction' => 
'property.uientity.index',
-                                               'second_display' => 
$second_display,
                                                'entity_id' => $this->entity_id,
                                                'cat_id' => $this->cat_id,
                                                'type' => $this->type,
@@ -1188,7 +1185,6 @@
                                        )),
                                        'download' => self::link(array(
                                                'menuaction' => 
'property.uientity.download',
-                                               'second_display' => 
$second_display,
                                                'entity_id' => $this->entity_id,
                                                'cat_id' => $this->cat_id,
                                                'type' => $this->type,

Modified: branches/Version-2_0-branch/property/inc/class.uilocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uilocation.inc.php   
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.uilocation.inc.php   
2016-02-17 14:26:29 UTC (rev 14750)
@@ -772,15 +772,20 @@
                                return;
                        }
 
-                       $second_display = phpgw::get_var('second_display', 
'bool');
+
                        $default_district = 
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])
 ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'] : 
'');
 
-                       if ($default_district && !$second_display && 
!$this->district_id)
+                       if ($default_district && ! 
isset($_REQUEST['district_id']))
                        {
                                $this->bo->district_id = $default_district;
                                $this->district_id = $default_district;
                        }
 
+                       if (phpgw::get_var('phpgw_return_as') == 'json')
+                       {
+                               return $this->query();
+                       }
+
                        $location_id = 
$GLOBALS['phpgw']->locations->get_id('property', $this->acl_location);
                        $custom_config = CreateObject('admin.soconfig', 
$location_id);
                        $_config = isset($custom_config->config_data) && 
$custom_config->config_data ? $custom_config->config_data : array();
@@ -876,10 +881,6 @@
                                }
                        }
 
-                       if (phpgw::get_var('phpgw_return_as') == 'json')
-                       {
-                               return $this->query();
-                       }
 
                        self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.jeditable.js');
                        self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.dataTables.editable.js');
@@ -1313,10 +1314,9 @@
                                return;
                        }
 
-                       $second_display = phpgw::get_var('second_display', 
'bool');
                        $default_district = 
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])
 ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'] : 
'');
 
-                       if ($default_district && !$second_display && 
!$this->district_id)
+                       if ($default_district && ! 
isset($_REQUEST['district_id']))
                        {
                                $this->bo->district_id = $default_district;
                                $this->district_id = $default_district;

Modified: branches/Version-2_0-branch/property/inc/class.uilookup.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uilookup.inc.php     
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.uilookup.inc.php     
2016-02-17 14:26:29 UTC (rev 14750)
@@ -158,7 +158,7 @@
 
                        $default_category = 
$GLOBALS['phpgw_info']['user']['preferences']['addressbook']['default_category'];
 
-                       if ($default_category && !$second_display)
+                       if ($default_category && !isset($_REQUEST['cat_id']))
                        {
                                $this->bo->cat_id = $default_category;
                                $this->cat_id = $default_category;
@@ -306,7 +306,7 @@
 
                        $default_category = 
$GLOBALS['phpgw_info']['user']['preferences']['addressbook']['default_category'];
 
-                       if ($default_category && !$second_display)
+                       if ($default_category && !isset($_REQUEST['cat_id']))
                        {
                                $this->bo->cat_id = $default_category;
                                $this->cat_id = $default_category;
@@ -410,7 +410,7 @@
                {
                        $default_category = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_vendor_category'];
 
-                       if ($default_category)
+                       if ($default_category && !isset($_REQUEST['cat_id']))
                        {
                                $this->bo->cat_id = $default_category;
                                $this->cat_id = $default_category;
@@ -517,7 +517,9 @@
                                'name' => array('id', 'org_name', 'status'),
                                'formatter' => array('', '', ''),
                                'descr' => array(lang('ID'), lang('Name'), 
lang('status')),
-                               'sortable' => array(true, true, false)
+                               'sortable' => array(true, true, false),
+                               'dir' => array(false, "asc", false)
+
                        );
 
                        $count_uicols_name = count($uicols['name']);
@@ -528,7 +530,8 @@
                                        'key' => $uicols['name'][$k],
                                        'label' => $uicols['descr'][$k],
                                        'sortable' => $uicols['sortable'][$k],
-                                       'hidden' => false
+                                       'hidden' => false,
+                                       'dir' => $uicols['dir'][$k] ? 
$uicols['dir'][$k] : '',
                                );
 
                                array_push($data['datatable']['field'], 
$params);
@@ -958,10 +961,9 @@
                        $this->location_code = $boentity->location_code;
                        $this->criteria_id = $boentity->criteria_id;
 
-                       $second_display = phpgw::get_var('second_display', 
'bool');
                        $default_district = 
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])
 ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'] : 
'');
 
-                       if ($default_district && !$second_display && 
!$this->district_id)
+                       if ($default_district && ! 
isset($_REQUEST['district_id']))
                        {
                                $this->bo->district_id = $default_district;
                                $this->district_id = $default_district;
@@ -1044,7 +1046,6 @@
                                                'container' => 
'datatable-container',
                                                'requestUrl' => 
self::link(array(
                                                        'menuaction' => 
'property.uilookup.entity',
-                                                       'second_display' => 
$second_display,
                                                        'cat_id' => 
$this->cat_id,
                                                        'entity_id' => 
$this->entity_id,
                                                        'district_id' => 
$this->district_id,
@@ -1136,7 +1137,7 @@
                        array_unshift($values_combo_box[2], array('id' => '', 
'name' => lang('no criteria')));
                        $filters[2] = array('type' => 'filter',
                                'name' => 'criteria_id',
-                               'text' => lang('criteria'),
+                               'text' => lang('search criteria'),
                                'list' => $values_combo_box[2]
                        );
 

Modified: branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiproject.inc.php    
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.uiproject.inc.php    
2016-02-17 14:26:29 UTC (rev 14750)
@@ -238,7 +238,7 @@
                        $values_combo_box[2] = array();
                        foreach ($_cats as $_cat)
                        {
-                               if ($_cat['level'] == 0 && !$_cat['active'] == 
2)
+                               if ($_cat['level'] == 0 && $_cat['active'] != 2)
                                {
                                        $values_combo_box[2][] = $_cat;
                                }
@@ -284,7 +284,7 @@
                                (
                                'type' => 'filter',
                                'name' => 'criteria_id',
-                               'text' => lang('Criteria'),
+                               'text' => lang('search criteria'),
                                'list' => $values_combo_box[5]
                        );
 
@@ -332,10 +332,9 @@
                        $lookup = phpgw::get_var('lookup', 'bool');
                        $from = phpgw::get_var('from');
 
-                       $second_display = phpgw::get_var('second_display', 
'bool');
                        $default_district = 
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])
 ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'] : 
'');
 
-                       if ($default_district && !$second_display && 
!$this->district_id)
+                       if ($default_district && ! 
isset($_REQUEST['district_id']))
                        {
                                $this->bo->district_id = $default_district;
                                $this->district_id = $default_district;

Modified: branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php  
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php  
2016-02-17 14:26:29 UTC (rev 14750)
@@ -292,7 +292,7 @@
                                'type' => 'filter',
                                'name' => 'criteria_id',
                                'extra' => '',
-                               'text' => lang('Criteria'),
+                               'text' => lang('search criteria'),
                                'list' => $values_combo_box[4]
                        );
 
@@ -381,10 +381,9 @@
 
                        $lookup = '';
 
-                       $second_display = phpgw::get_var('second_display', 
'bool');
                        $default_district = 
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])
 ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'] : 
'');
 
-                       if ($default_district && !$second_display && 
!$this->district_id)
+                       if ($default_district && ! 
isset($_REQUEST['district_id']))
                        {
                                $this->bo->district_id = $default_district;
                                $this->district_id = $default_district;
@@ -1035,7 +1034,7 @@
                                if (isset($receipt['notice_owner']) && 
is_array($receipt['notice_owner']) && $config->config_data['mailnotification'])
 //                                             && 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['notify_project_owner'])
 && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['notify_project_owner'])
                                {
-                                       if (!$this->account == 
$project['coordinator'] && $config->config_data['notify_project_owner'])
+                                       if ($this->account != 
$project['coordinator'] && $config->config_data['notify_project_owner'])
                                        {
                                                $prefs_coordinator = 
$this->bocommon->create_preferences('property', $project['coordinator']);
                                                if 
(isset($prefs_coordinator['email']) && $prefs_coordinator['email'])

Modified: branches/Version-2_0-branch/property/js/portico/invoice.index.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/invoice.index.js    
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/property/js/portico/invoice.index.js    
2016-02-17 14:26:29 UTC (rev 14750)
@@ -181,7 +181,7 @@
        values['timestamp_voucher_date'] = {};
 
        var sign = $('.signClass');
-       //var janitor = $('.janitorClass');
+       var janitor = $('.janitorClass');
        var supervisor = $('.supervisorClass');
        var budget_responsible = $('.budget_responsibleClass');
        var kreditnota_tmp = $('.kreditnota_tmp');
@@ -204,6 +204,10 @@
                {
                        values['sign'][i] = sign[i].value;
                }
+               else if (typeof(janitor[i]) != 'undefined' && (janitor[i].name 
!= "") && (janitor[i].value != d.sign_orig) && (janitor[i].checked))
+               {
+                       values['sign'][i] = janitor[i].value;
+               }
                else if (typeof(supervisor[i]) != 'undefined' && 
(supervisor[i].name != "") && (supervisor[i].value != d.sign_orig) && 
(supervisor[i].checked))
                {
                        values['sign'][i] = supervisor[i].value;

Modified: branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php        
2016-02-17 14:17:34 UTC (rev 14749)
+++ branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php        
2016-02-17 14:26:29 UTC (rev 14750)
@@ -511,6 +511,7 @@
                                'my_name' => 'download_agresso',
                                'text' => lang('Download Agresso import file'),
                                'type' => 'custom',
+                               'className'     => 'download', // If there is a 
className - the button is not per record, but global for the table
                                'custom_code' => "
                                        var oArgs = " . json_encode(array(
                                        'menuaction' => 
'rental.uiparty.download_agresso',




reply via email to

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