fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [13815] Syncromind: Merge 13801:13814 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [13815] Syncromind: Merge 13801:13814 from trunk
Date: Mon, 31 Aug 2015 12:29:37 +0000

Revision: 13815
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13815
Author:   sigurdne
Date:     2015-08-31 12:29:36 +0000 (Mon, 31 Aug 2015)
Log Message:
-----------
Syncromind: Merge 13801:13814 from trunk

Modified Paths:
--------------
    branches/dev-syncromind/controller/inc/class.socase.inc.php
    branches/dev-syncromind/controller/setup/phpgw_no.lang
    branches/dev-syncromind/phpgwapi/inc/sso/include_login.inc.php
    branches/dev-syncromind/phpgwapi/js/jquery/common.js
    branches/dev-syncromind/phpgwapi/templates/base/login.tpl
    branches/dev-syncromind/property/inc/class.uientity.inc.php
    branches/dev-syncromind/property/inc/class.uiproject.inc.php
    branches/dev-syncromind/property/js/portico/entity.edit.js
    branches/dev-syncromind/property/js/portico/project.edit.js
    branches/dev-syncromind/property/js/portico/workorder.edit.js
    branches/dev-syncromind/property/templates/base/entity.xsl
    branches/dev-syncromind/property/templates/base/project.xsl
    branches/dev-syncromind/property/templates/base/select_location.xsl
    branches/dev-syncromind/property/templates/base/workorder.xsl

Property Changed:
----------------
    branches/dev-syncromind/
    branches/dev-syncromind/controller/


Property changes on: branches/dev-syncromind
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13731-13773,13775,13778-13791,13793-13800
   + /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13731-13773,13775,13778-13791,13793-13800,13802-13811


Property changes on: branches/dev-syncromind/controller
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/stavangerkommune/controller:12743-12875,12986
/trunk/controller:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13728-13729,13731-13773
   + /branches/stavangerkommune/controller:12743-12875,12986
/trunk/controller:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13728-13729,13731-13773,13802-13811

Modified: branches/dev-syncromind/controller/inc/class.socase.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.socase.inc.php 2015-08-31 
12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/controller/inc/class.socase.inc.php 2015-08-31 
12:29:36 UTC (rev 13815)
@@ -177,6 +177,7 @@
                                        'id'                    => 
$this->db->f('id'),
                                        'check_list_id' => 
$this->db->f('check_list_id'),
                                        'descr'                 => 
$this->db->f('descr', true),
+                                       'measurement'   => 
$this->db->f('measurement', true),
                                        'user_id'               => 
$this->db->f('user_id'),
                                        'status'                => 
$this->db->f('status'),
                                        'modified_date' => 
$this->db->f('modified_date')

Modified: branches/dev-syncromind/controller/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind/controller/setup/phpgw_no.lang      2015-08-31 
12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/controller/setup/phpgw_no.lang      2015-08-31 
12:29:36 UTC (rev 13815)
@@ -2,6 +2,7 @@
 Please enter billable hours    controller      no      Angi egne timer
 my assigned controls   controller      no      Mine kontroller
 add case       controller      no      Registrer sak
+cases  common  no      Registrerte saker
 add ticket     controller      no      Registrer melding
 add_check_list_to_location     controller      no      Registrer kontroll for 
bygg
 added  controller      no      Lagt til

Modified: branches/dev-syncromind/phpgwapi/inc/sso/include_login.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/sso/include_login.inc.php      
2015-08-31 12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/phpgwapi/inc/sso/include_login.inc.php      
2015-08-31 12:29:36 UTC (rev 13815)
@@ -208,6 +208,7 @@
                {
                        // If the lastloginid cookies isn't set, we will 
default to default_lang - then to english.
                        // Change this if you need.
+                       $lightbox       = isset($_REQUEST['lightbox']) && 
$_REQUEST['lightbox'] ? true : false;
 
                        
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = 
isset($GLOBALS['phpgw_info']['server']['default_lang']) && 
$GLOBALS['phpgw_info']['server']['default_lang']? 
$GLOBALS['phpgw_info']['server']['default_lang'] : 'en';
                        if (isset($_COOKIE['last_loginid']))
@@ -555,9 +556,13 @@
                        $this->tmpl->set_var('rounded_css', $rounded_css);
                        $this->tmpl->set_var('flag_no', $flag_no);
                        $this->tmpl->set_var('flag_en', $flag_en);
+                       $this->tmpl->set_var('lightbox', $lightbox);
 
-                       $this->tmpl->set_var('login_left_message', 
$GLOBALS['phpgw_info']['login_left_message']);
-                       $this->tmpl->set_var('login_right_message', 
$GLOBALS['phpgw_info']['login_right_message']);
+                       if(!$lightbox)
+                       {
+                               $this->tmpl->set_var('login_left_message', 
$GLOBALS['phpgw_info']['login_left_message']);
+                               $this->tmpl->set_var('login_right_message', 
$GLOBALS['phpgw_info']['login_right_message']);
+                       }
 
                        $autocomplete = '';
                        if ( 
isset($GLOBALS['phpgw_info']['server']['autocomplete_login'])

Modified: branches/dev-syncromind/phpgwapi/js/jquery/common.js
===================================================================
--- branches/dev-syncromind/phpgwapi/js/jquery/common.js        2015-08-31 
12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/phpgwapi/js/jquery/common.js        2015-08-31 
12:29:36 UTC (rev 13815)
@@ -82,7 +82,7 @@
 
 JqueryPortico.formatLinkGenericLlistAttribute = function(key, oData) {
         
-       var link = oData['link'];
+               var link = oData['link'];
         var type = oData['link'].split(".");
         
         var resort = '';
@@ -95,10 +95,11 @@
             resort = 'down';
         }
         
-        if(type[2] == 'uiadmin_entity')
+        if(type[2] == 'uiadmin_entity' || type[2] == 'ui_custom')
         {
             var url = "'"+ link +'&resort='+ resort +"'";
-        }else
+        }
+               else
         {
             var url = "'"+ link +'&resort='+ resort +"',''";
         }

Modified: branches/dev-syncromind/phpgwapi/templates/base/login.tpl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/login.tpl   2015-08-31 
12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/phpgwapi/templates/base/login.tpl   2015-08-31 
12:29:36 UTC (rev 13815)
@@ -82,8 +82,8 @@
        
        <div id="content-box">
                <div class="rawimages">
-                       <span><a href="login.php?lang=no"><img src="{flag_no}" 
alt="Norsk (Norway)" title="Norsk (Norway)" ></a></span>
-                       <span><a href="login.php?lang=en"><img src="{flag_en}" 
alt="English (United Kingdom)" title="English (United Kingdom)" ></a></span>
+                       <span><a 
href="login.php?lang=no&lightbox={lightbox}"><img src="{flag_no}" alt="Norsk 
(Norway)" title="Norsk (Norway)" ></a></span>
+                       <span><a 
href="login.php?lang=en&lightbox={lightbox}"><img src="{flag_en}" alt="English 
(United Kingdom)" title="English (United Kingdom)" ></a></span>
                </div>
 
                <div class="padding">

Modified: branches/dev-syncromind/property/inc/class.uientity.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uientity.inc.php 2015-08-31 
12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/property/inc/class.uientity.inc.php 2015-08-31 
12:29:36 UTC (rev 13815)
@@ -47,6 +47,7 @@
                var $part_of_town_id;
                var $sub;
                var $currentapp;
+               var $cases_time_span = array();
 
                var $public_functions = array
                        (
@@ -73,7 +74,8 @@
                                'edit_inventory'                        => true,
                                'inventory_calendar'            => true,
                                'get_controls_at_component'     => true,
-                               'get_assigned_history'          => true
+                               'get_assigned_history'          => true,
+                               'get_cases'                                     
=> true
 
                        );
 
@@ -2116,61 +2118,9 @@
                                        )
                                );
 
-                               $lang_controller = 
$GLOBALS['phpgw']->translation->translate('controller', array(),false , 
'controller');
-                               $socase                         = 
CreateObject('controller.socase');
-                               $controller_cases       = 
$socase->get_cases_by_component($location_id, $id);
-                               $_statustext = array();
-                               $_statustext[0] = lang('open');
-                               $_statustext[1] = lang('closed');
-                               $_statustext[2] = lang('pending');
+                               $_cases = $this->get_cases($location_id, $id, 
date('Y'));
+                               $cases_time_span = $this->cases_time_span;
 
-                               $_cases = array();
-                               foreach ($controller_cases as $case)
-                               {
-                                       $socheck_list   = 
CreateObject('controller.socheck_list');
-                                       $control_id     = 
$socheck_list->get_single($case['check_list_id'])->get_control_id();
-                                       foreach($_controls as $_control)
-                                       {
-                                               if($_control['control_id'] == 
$control_id)
-                                               {
-                                                       $_control_name = 
$_control['title'];
-                                                       break;
-                                               }
-                                       }
-//                                             _debug_array($check_list);die();
-
-                                       switch ($case['status'])
-                                       {
-                                               case 0:
-                                               case 2:
-                                                       $_method = 
'view_open_cases';
-                                                       break;
-                                               case 1:
-                                                       $_method = 
'view_closed_cases';
-                                                       break;
-                                               default:
-                                                       $_method = 
'view_open_cases';
-                                       }
-
-                                       $_link = 
$GLOBALS['phpgw']->link('/index.php',array
-                                               (
-                                                       'menuaction' => 
"controller.uicase.{$_method}",
-                                                       'check_list_id' => 
$case['check_list_id']
-                                               )
-                                       );
-
-                                       $_cases[] = array
-                                       (
-                                               'url'           => "<a 
href=\"{$_link}\" > {$case['check_list_id']}</a>",
-                                               'type'          => 
$_control_name,
-                                               'title'         => 
$case['descr'],
-                                               'status'        => 
$_statustext[$case['status']],
-                                               'user'          => 
$GLOBALS['phpgw']->accounts->get($case['user_id'])->__toString(),
-                                               'entry_date'=> 
$GLOBALS['phpgw']->common->show_date($case['modified_date'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
-                                       );
-                                       unset($_link);
-                               }
-
                                $_case_def = array
                                (
                                        array('key' => 
'url','label'=>lang('id'),'sortable'=>false,'resizeable'=>true),
@@ -2237,6 +2187,7 @@
                                        'datatable_def'                         
        => $datatable_def,
                                        'repeat_types'                          
        => array('options' => $repeat_types),
                                        'controller'                            
        => $_enable_controller,
+                                       'cases_time_span'                       
        => array('options' => $cases_time_span),
                                        'cancel_url'                            
        => $GLOBALS['phpgw']->link('/index.php',$link_index),
                                        'enable_bulk'                           
        => $category['enable_bulk'],
                                        'org_unit'                              
                => $category['org_unit'],
@@ -3184,7 +3135,7 @@
                        $GLOBALS['phpgw']->common->phpgw_exit();
                }
 
-               public function get_controls_at_component( $location_id = 0, 
$id = 0 )
+               public function get_controls_at_component( $location_id = 0, 
$id = 0, $skip_json = false )
                {
                        if(!$location_id)
                        {
@@ -3254,7 +3205,7 @@
 //                             $entry['select'] = "<input type='checkbox' 
class='mychecks' value='{$entry['serie_id']}'></input>";
                        }
 
-                       if (phpgw::get_var('phpgw_return_as') != 'json')
+                       if( phpgw::get_var('phpgw_return_as') == 'json' && 
!$skip_json)
                        {
                                return $controls;
                        }
@@ -3268,4 +3219,120 @@
 
                        return $this->jquery_results($result_data);
                }
+
+               /**
+                * Get controller cases related to this item.
+                * @param integer $location_id
+                * @param integer $id
+                * @param integer $year
+                * @return string
+                */
+               public function get_cases($location_id = 0, $id = 0,$year = 0)
+               {
+                       if(!$location_id)
+                       {
+                               $location_id = phpgw::get_var('location_id', 
'int');
+                       }
+                       if(!$id)
+                       {
+                               $id = phpgw::get_var('id', 'int');
+                       }
+                       if(!$year)
+                       {
+                               $year = phpgw::get_var('year', 'int');
+                       }
+
+//                     $year = $year ? $year : -1; //all
+
+                       $_controls = 
$this->get_controls_at_component($location_id, $id, $skip_json = true);
+
+                       $socase                         = 
CreateObject('controller.socase');
+                       $controller_cases       = 
$socase->get_cases_by_component($location_id, $id);
+                       $_statustext = array();
+                       $_statustext[0] = lang('open');
+                       $_statustext[1] = lang('closed');
+                       $_statustext[2] = lang('pending');
+
+                       $_case_years = array();
+                       $_cases = array();
+                       foreach ($controller_cases as $case)
+                       {
+                               $_case_year = date('Y', $case['modified_date']);
+                               $_case_years[] = $_case_year;
+
+                               if($_case_year != $year && $year != -1)
+                               {
+                                       continue;
+                               }
+
+                               $socheck_list   = 
CreateObject('controller.socheck_list');
+                               $control_id     = 
$socheck_list->get_single($case['check_list_id'])->get_control_id();
+                               foreach($_controls as $_control)
+                               {
+                                       if($_control['control_id'] == 
$control_id)
+                                       {
+                                               $_control_name = 
$_control['title'];
+                                               break;
+                                       }
+                               }
+//                                             _debug_array($check_list);die();
+
+                               switch ($case['status'])
+                               {
+                                       case 0:
+                                       case 2:
+                                               $_method = 'view_open_cases';
+                                               break;
+                                       case 1:
+                                               $_method = 'view_closed_cases';
+                                               break;
+                                       default:
+                                               $_method = 'view_open_cases';
+                               }
+
+                               $_link = 
$GLOBALS['phpgw']->link('/index.php',array
+                                       (
+                                               'menuaction' => 
"controller.uicase.{$_method}",
+                                               'check_list_id' => 
$case['check_list_id']
+                                       )
+                               );
+
+                               $_cases[] = array
+                               (
+                                       'url'           => "<a 
href=\"{$_link}\" > {$case['check_list_id']}</a>",
+                                       'type'          => $_control_name,
+                                       'title'         => $case['descr'],
+                                       'value'         => $case['measurement'],
+                                       'status'        => 
$_statustext[$case['status']],
+                                       'user'          => 
$GLOBALS['phpgw']->accounts->get($case['user_id'])->__toString(),
+                                       'entry_date'=> 
$GLOBALS['phpgw']->common->show_date($case['modified_date'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
+                               );
+                               unset($_link);
+                               unset($_case_year);
+                       }
+                       $_case_years = array_unique($_case_years);
+                       $cases_time_span= array();
+
+                       foreach($_case_years as $_case_year)
+                       {
+                               $cases_time_span[] = array('id' => $_case_year, 
'name' => $_case_year, 'selected' => $_case_year == date('Y') ? 1: 0);
+                       }
+
+                       $this->cases_time_span = $cases_time_span;
+
+                       if( phpgw::get_var('phpgw_return_as') == 'json' )
+                       {
+
+                               if(count($_cases))
+                               {
+                                       return json_encode($_cases);
+                               }
+                               else
+                               {
+                                       return "";
+                               }
+                       }
+                       return $_cases;
+
+               }
        }

Modified: branches/dev-syncromind/property/inc/class.uiproject.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiproject.inc.php        
2015-08-31 12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/property/inc/class.uiproject.inc.php        
2015-08-31 12:29:36 UTC (rev 13815)
@@ -1307,7 +1307,7 @@
                                }
                        }
 
-                       if ($values['save'])
+                       if ( $save= phpgw::get_var('save', 'bool'))
                        {
                                $mode = 'edit';
                                
@@ -1344,7 +1344,7 @@
                                        $values['origin'] = '';
                                }
 
-                               if(!isset($values['workorder_budget']) && 
$values['save'] && !$_transfer_new_project && !$values['project_type_id']==3)
+                               if(!isset($values['workorder_budget']) && $save 
&& !$_transfer_new_project && !$values['project_type_id']==3)
                                {
                                        
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'property.uiworkorder.edit', 'project_id'=> $id));
                                }

Modified: branches/dev-syncromind/property/js/portico/entity.edit.js
===================================================================
--- branches/dev-syncromind/property/js/portico/entity.edit.js  2015-08-31 
12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/property/js/portico/entity.edit.js  2015-08-31 
12:29:36 UTC (rev 13815)
@@ -256,3 +256,11 @@
 });
 
 
+$(document).ready(function(){
+
+       $("#cases_time_span").change(function(){
+               var oArgs = {menuaction:'property.uientity.get_cases', 
location_id:location_id,  id:item_id, year:$(this).val()};
+               var requestUrl = phpGWLink('index.php', oArgs, true);
+               JqueryPortico.updateinlineTableHelper('datatable-container_5', 
requestUrl);
+       });
+});

Modified: branches/dev-syncromind/property/js/portico/project.edit.js
===================================================================
--- branches/dev-syncromind/property/js/portico/project.edit.js 2015-08-31 
12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/property/js/portico/project.edit.js 2015-08-31 
12:29:36 UTC (rev 13815)
@@ -161,4 +161,60 @@
        var api2 = oTable2.api();
        api2.on( 'draw', sum_columns_table_invoice );
        
-});
\ No newline at end of file
+});
+
+       function check_and_submit_valid_session()
+       {
+               var oArgs = {menuaction:'property.bocommon.confirm_session'};
+               var strURL = phpGWLink('index.php', oArgs, true);
+
+               $.ajax({
+                       type: 'POST',
+                       dataType: 'json',
+                       url: strURL,
+                       success: function(data) {
+                               if( data != null)
+                               {
+                                       if(data['sessionExpired'] == true)
+                                       {
+                                               window.alert('sessionExpired - 
please log in');
+                                               
JqueryPortico.lightboxlogin();//defined in common.js
+                                       }
+                                       else
+                                       {
+                                               
document.getElementsByName("save")[0].value = 1;
+                                               document.form.submit();
+                                       }
+                               }
+                       },
+                       failure: function(o)
+                       {
+                               window.alert('failure - try again - once');
+                       },
+                       timeout: 5000
+               });
+       }
+
+       this.validate_form = function()
+       {
+               conf = {
+                               modules : 'location, date, security, file',
+                               validateOnBlur : false,
+                               scrollToTopOnError : true,
+                               errorMessagePosition : 'top',
+                               language : validateLanguage
+                       };
+               return $('form').validateForm(validateLanguage, conf);
+       }
+
+       $(document).ready(function(){
+          $('form[name=form]').submit(function(e) {
+                  e.preventDefault();
+
+                       if(!validate_form())
+                       {
+                               return;
+                       }
+                       check_and_submit_valid_session();
+         });
+  });

Modified: branches/dev-syncromind/property/js/portico/workorder.edit.js
===================================================================
--- branches/dev-syncromind/property/js/portico/workorder.edit.js       
2015-08-31 12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/property/js/portico/workorder.edit.js       
2015-08-31 12:29:36 UTC (rev 13815)
@@ -1,6 +1,49 @@
 
        var vendor_id;
 
+       $(document).ready(function(){
+          $('form[name=form]').submit(function(e) {
+                  e.preventDefault();
+
+                       if(!validate_form())
+                       {
+                               return;
+                       }
+                       check_and_submit_valid_session();
+         });
+  });
+
+       function check_and_submit_valid_session()
+       {
+               var oArgs = {menuaction:'property.bocommon.confirm_session'};
+               var strURL = phpGWLink('index.php', oArgs, true);
+
+               $.ajax({
+                       type: 'POST',
+                       dataType: 'json',
+                       url: strURL,
+                       success: function(data) {
+                               if( data != null)
+                               {
+                                       if(data['sessionExpired'] == true)
+                                       {
+                                               window.alert('sessionExpired - 
please log in');
+                                               
JqueryPortico.lightboxlogin();//defined in common.js
+                                       }
+                                       else
+                                       {
+                                               document.form.submit();
+                                       }
+                               }
+                       },
+                       failure: function(o)
+                       {
+                               window.alert('failure - try again - once');
+                       },
+                       timeout: 5000
+               });
+       }
+
        this.validate_form = function()
        {
                conf = {
@@ -19,7 +62,7 @@
                {
                        return;
                }
-               document.form.submit();
+               check_and_submit_valid_session();
        }
 
        function calculate_workorder()
@@ -29,7 +72,7 @@
                        return;
                }
                document.getElementsByName("calculate_workorder")[0].value = 1;
-               document.form.submit();
+               check_and_submit_valid_session();
        }
        function send_workorder()
        {
@@ -38,7 +81,7 @@
                        return;
                }
                document.getElementsByName("send_workorder")[0].value = 1;
-               document.form.submit();
+               check_and_submit_valid_session();
        }
        function set_tab(tab)
        {

Modified: branches/dev-syncromind/property/templates/base/entity.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/entity.xsl  2015-08-31 
12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/property/templates/base/entity.xsl  2015-08-31 
12:29:36 UTC (rev 13815)
@@ -614,6 +614,16 @@
                                                                <label>
                                                                        
<xsl:value-of select="php:function('lang', 'cases')" />
                                                                </label>
+                                                               <select id = 
"cases_time_span" name="cases_time_span">
+                                                                       
<xsl:attribute name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'select')"/>
+                                                                       
</xsl:attribute>
+                                                                       <option 
value="0">
+                                                                       
<xsl:value-of select="php:function('lang', 'select')"/>
+                                                                       
</option>
+                                                                       
<xsl:apply-templates select="cases_time_span/options"/>
+                                                               </select>
+
                                                                <xsl:for-each 
select="datatable_def">
                                                                        <xsl:if 
test="container = 'datatable-container_5'">
                                                                                
<xsl:call-template name="table_setup">

Modified: branches/dev-syncromind/property/templates/base/project.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/project.xsl 2015-08-31 
12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/property/templates/base/project.xsl 2015-08-31 
12:29:36 UTC (rev 13815)
@@ -24,7 +24,7 @@
                var project_type_id = '<xsl:value-of 
select="project_type_id"/>';
                var project_id = '<xsl:value-of select="value_project_id"/>';
                var base_java_notify_url = <xsl:value-of 
select="base_java_notify_url"/>;
-               var base_java_url = <xsl:value-of select="base_java_url"/>; 
+               var base_java_url = <xsl:value-of select="base_java_url"/>;
    </script>
        <xsl:choose>
                <xsl:when test="msgbox_data != ''">
@@ -756,7 +756,8 @@
                                        <xsl:variable name="lang_save">
                                                <xsl:value-of 
select="lang_save"/>
                                        </xsl:variable>
-                                       <input type="submit" class="pure-button 
pure-button-primary" name="values[save]" value="{$lang_save}" 
onMouseout="window.status='';return true;">
+                                       <input type="hidden" name='save'  
value=""/>
+                                       <input type="submit" class="pure-button 
pure-button-primary" name="values[save]" value="{$lang_save}">
                                                <xsl:attribute name="title">
                                                        <xsl:value-of 
select="lang_save_statustext"/>
                                                </xsl:attribute>

Modified: branches/dev-syncromind/property/templates/base/select_location.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/select_location.xsl 
2015-08-31 12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/property/templates/base/select_location.xsl 
2015-08-31 12:29:36 UTC (rev 13815)
@@ -1,34 +1,40 @@
-  <!-- $Id$ -->
-       <xsl:template name="select_location">
-               <xsl:variable name="select_name_location">
-                       <xsl:value-of select="select_name_location"/>
-               </xsl:variable>
-               <select name="{$select_name_location}" 
onMouseout="window.status='';return true;">
-                       <xsl:attribute name="title">
-                               <xsl:value-of 
select="lang_location_statustext"/>
+<!-- $Id$ -->
+<xsl:template name="select_location" xmlns:php="http://php.net/xsl";>
+       <xsl:variable name="select_name_location">
+               <xsl:value-of select="select_name_location"/>
+       </xsl:variable>
+       <select name="{$select_name_location}" 
onMouseout="window.status='';return true;">
+               <xsl:attribute name="title">
+                       <xsl:value-of select="lang_location_statustext"/>
+               </xsl:attribute>
+               <xsl:if test="select_location_required = '1'">
+                       <xsl:attribute name="data-validation">
+                               <xsl:text>required</xsl:text>
                        </xsl:attribute>
-                       <option value="">
-                               <xsl:value-of select="lang_no_location"/>
+                       <xsl:attribute name="data-validation-error-msg">
+                               <xsl:value-of select="php:function('lang', 
'Please enter a location !')"/>
+                       </xsl:attribute>
+
+               </xsl:if>
+
+               <option value="">
+                       <xsl:value-of select="lang_no_location"/>
+               </option>
+               <xsl:apply-templates select="location_list"/>
+       </select>
+</xsl:template>
+
+<xsl:template match="location_list">
+       <xsl:choose>
+               <xsl:when test="selected">
+                       <option value="{id}" selected="selected">
+                               <xsl:value-of disable-output-escaping="yes" 
select="descr"/>
                        </option>
-                       <xsl:apply-templates select="location_list"/>
-               </select>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="location_list">
-               <xsl:variable name="id">
-                       <xsl:value-of select="id"/>
-               </xsl:variable>
-               <xsl:choose>
-                       <xsl:when test="selected = 'selected'">
-                               <option value="{$id}" selected="selected">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="descr"/>
-                               </option>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <option value="{$id}">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="descr"/>
-                               </option>
-                       </xsl:otherwise>
-               </xsl:choose>
-       </xsl:template>
+               </xsl:when>
+               <xsl:otherwise>
+                       <option value="{id}">
+                               <xsl:value-of disable-output-escaping="yes" 
select="descr"/>
+                       </option>
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>

Modified: branches/dev-syncromind/property/templates/base/workorder.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/workorder.xsl       
2015-08-31 12:18:04 UTC (rev 13814)
+++ branches/dev-syncromind/property/templates/base/workorder.xsl       
2015-08-31 12:29:36 UTC (rev 13815)
@@ -941,7 +941,7 @@
                                <xsl:choose>
                                        <xsl:when test="mode='edit'">
                                                <input type="hidden" 
name="values[save]" value="1"/>
-                                               <input type="submit" 
class="pure-button pure-button-primary" name="save" value="{$lang_save}" 
onMouseout="window.status='';return true;">
+                                               <input type="submit" 
class="pure-button pure-button-primary" name="save" value="{$lang_save}">
                                                        <xsl:attribute 
name="title">
                                                                <xsl:value-of 
select="lang_save_statustext"/>
                                                        </xsl:attribute>




reply via email to

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