fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9427] frontend: fixes


From: Sigurd Nes
Subject: [Fmsystem-commits] [9427] frontend: fixes
Date: Wed, 23 May 2012 09:46:50 +0000

Revision: 9427
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9427
Author:   sigurdne
Date:     2012-05-23 09:46:50 +0000 (Wed, 23 May 2012)
Log Message:
-----------
frontend: fixes

Modified Paths:
--------------
    trunk/frontend/inc/class.uientity.inc.php
    trunk/frontend/inc/class.uihelpdesk.inc.php
    trunk/frontend/js/yahoo/helpdesk.list.js
    trunk/frontend/templates/base/helpdesk.xsl
    trunk/property/js/yahoo/property.js

Modified: trunk/frontend/inc/class.uientity.inc.php
===================================================================
--- trunk/frontend/inc/class.uientity.inc.php   2012-05-23 09:45:30 UTC (rev 
9426)
+++ trunk/frontend/inc/class.uientity.inc.php   2012-05-23 09:46:50 UTC (rev 
9427)
@@ -52,7 +52,7 @@
                        $location_arr                           = explode('.', 
$this->acl_location);
 
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];
-                       $this->bo                                       = 
CreateObject('property.boentity',true);
+                       $this->bo                                       = 
CreateObject('property.boentity');
                        $this->bocommon                         = & 
$this->bo->bocommon;
                        $this->soadmin_entity           = & 
$this->bo->soadmin_entity;
 

Modified: trunk/frontend/inc/class.uihelpdesk.inc.php
===================================================================
--- trunk/frontend/inc/class.uihelpdesk.inc.php 2012-05-23 09:45:30 UTC (rev 
9426)
+++ trunk/frontend/inc/class.uihelpdesk.inc.php 2012-05-23 09:46:50 UTC (rev 
9427)
@@ -55,7 +55,7 @@
                {
                        $GLOBALS['phpgw_info']['apps']['manual']['section'] = 
'helpdesk.index';
                        $this->insert_links_on_header_state();
-                       $bo     = CreateObject('property.botts',true);
+                       $bo     = CreateObject('property.botts');
 
                        $dry_run = false;
                        $second_display = phpgw::get_var('second_display', 
'bool');
@@ -356,6 +356,8 @@
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('frontend') . ' - ' . $appname . ': ' . $function_msg;
 
+                       
$GLOBALS['phpgw']->css->add_external_file('property/js/tinybox2/style.css');
+                       $GLOBALS['phpgw']->js->validate_file('tinybox2', 
'packed' , 'property');
                        $GLOBALS['phpgw']->js->validate_file('yahoo', 
'helpdesk.list' , 'frontend');
 
                        $msglog = 
phpgwapi_cache::session_get('frontend','msgbox');
@@ -370,7 +372,6 @@
 
                        $GLOBALS['phpgw']->xslttpl->add_file(array('frontend', 
'helpdesk', 'datatable'));
                        $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
array('app_data' => $data));
-                       //print_r( $GLOBALS['phpgw']->xslttpl->get_vars());
                }
 
                private function cmp($a, $b)
@@ -518,28 +519,15 @@
 
                public function add_ticket()
                {
-
                        $values         = phpgw::get_var('values');
+                       $p_entity_id    = phpgw::get_var('p_entity_id', 'int');
+                       $p_cat_id               = phpgw::get_var('p_cat_id', 
'int');
+                       $p_num                  = phpgw::get_var('p_num');
+                       $origin                 = phpgw::get_var('origin');
 
-                       $bypass                 = phpgw::get_var('bypass', 
'bool');
-                       if($bypass)
+                       if($p_entity_id && $p_cat_id && $p_num)
                        {
-                               $boadmin_entity         = 
CreateObject('property.boadmin_entity');
-                               $p_entity_id            = 
phpgw::get_var('p_entity_id', 'int');
-                               $p_cat_id                       = 
phpgw::get_var('p_cat_id', 'int');
-                               $values['p'][$p_entity_id]['p_entity_id']       
= $p_entity_id;
-                               $values['p'][$p_entity_id]['p_cat_id']          
= $p_cat_id;
-                               $values['p'][$p_entity_id]['p_num']             
= phpgw::get_var('p_num');
-
-                               if($p_entity_id && $p_cat_id)
-                               {
-                                       $entity_category = 
$boadmin_entity->read_single_category($p_entity_id,$p_cat_id);
-                                       
$values['p'][$p_entity_id]['p_cat_name'] = $entity_category['name'];
-
-                                       $id = phpgw::get_var('p_num');
-                                       $item = 
execMethod('property.boentity.read_single',(array('id' => $id, 'entity_id' => 
$p_entity_id, 'cat_id' => $p_cat_id, 'view' => true)));
-                               }
-
+                               $item = 
execMethod('property.boentity.read_single',(array('id' => $p_num, 'entity_id' 
=> $p_entity_id, 'cat_id' => $p_cat_id, 'view' => true)));
                        }
 
                        $bo     = CreateObject('property.botts',true);
@@ -596,24 +584,24 @@
                                                $default_group = 0;
                                        }
 
-                                       $ticket = array(
-                                               'origin'    => null,
-                                               'origin_id' => null,
-                                               'cat_id'    => $cat_id,
-                                               'group_id'  => ($default_group 
? $default_group : null),
-                                               'assignedto'=> $assignedto,
-                                               'priority'  => 3,
-                                               'status'    => 'O', // O = Open
-                                               'subject'   => $values['title'],
-                                               'details'   => 
$values['locationdesc'].":\n\n".$values['description'],
-                                               'apply'     => lang('Apply'),
-                                               'contact_id'=> 0,
-                                               'location'  => $location,
-                                               'location_code' => 
$this->location_code,
-                                               'street_name'   => 
$location_details['street_name'],
-                                               'street_number' => 
$location_details['street_number'],
-                                               'location_name' => 
$location_details['loc1_name'],
-                                               //'locationdesc'  => 
$values['locationdesc']
+                                       $ticket = array
+                                       (
+                                               'origin_id'                     
=> $GLOBALS['phpgw']->locations->get_id('property', $origin),
+                                               'origin_item_id'        => 
$p_num,
+                                               'cat_id'                        
=> $cat_id,
+                                               'group_id'                      
=> ($default_group ? $default_group : null),
+                                               'assignedto'            => 
$assignedto,
+                                               'priority'                      
=> 3,
+                                               'status'                        
=> 'O', // O = Open
+                                               'subject'                       
=> $values['title'],
+                                               'details'                       
=> $values['locationdesc'].":\n\n".$values['description'],
+                                               'apply'                         
=> lang('Apply'),
+                                               'contact_id'            => 0,
+                                               'location'                      
=> $location,
+                                               'location_code'         => 
$this->location_code,
+                                               'street_name'           => 
$location_details['street_name'],
+                                               'street_number'         => 
$location_details['street_number'],
+                                               'location_name'         => 
$location_details['loc1_name'],
                                        );
 
                                        $result = $bo->add($ticket);
@@ -622,7 +610,6 @@
                                                $msglog['message'][] = 
array('msg' => lang('Ticket added'));
                                                $noform = true;
 
-
                                                // Files
                                                $values['file_name'] = 
@str_replace(' ','_',$_FILES['file']['name']);
                                                if($values['file_name'] && 
$result['id'])
@@ -685,10 +672,20 @@
                                }
                        }
 
+                       $form_action_data = array
+                       (
+                               'menuaction'    => 
'frontend.uihelpdesk.add_ticket',
+                               'noframework'   => '1',
+                               'origin'        => $origin,
+                               'p_entity_id'   => $p_entity_id,
+                               'p_cat_id'              => $p_cat_id,
+                               'p_num'                 => $p_num,
+                       );
+
                        $data = array(
                                'redirect'                      => 
isset($redirect) ? $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'frontend.uihelpdesk.index')) : null,
                                'msgbox_data'           => 
$GLOBALS['phpgw']->common->msgbox($GLOBALS['phpgw']->common->msgbox_data($msglog)),
-                               'form_action'           => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction' => 
'frontend.uihelpdesk.add_ticket', 'noframework' => '1')),
+                               'form_action'           => 
$GLOBALS['phpgw']->link('/index.php',$form_action_data),
                                'title'                 => $values['title'],
                                'locationdesc'          => 
$values['locationdesc'],
                                'description'           => 
$values['description'],

Modified: trunk/frontend/js/yahoo/helpdesk.list.js
===================================================================
--- trunk/frontend/js/yahoo/helpdesk.list.js    2012-05-23 09:45:30 UTC (rev 
9426)
+++ trunk/frontend/js/yahoo/helpdesk.list.js    2012-05-23 09:46:50 UTC (rev 
9427)
@@ -73,7 +73,20 @@
        {
                var oArgs = {menuaction:'frontend.uihelpdesk.add_ticket', 
noframework:'1'};
                var sUrl = phpGWLink('index.php', oArgs);
-
+/*
+               TINY.box.show({
+               iframe:sUrl,
+               boxid:'frameless',
+               width:750,
+               height:450,
+               fixed:false,
+               maskid:'darkmask',
+               maskopacity:40,
+               mask:true,
+               animate:true,
+               close: true
+               });
+*/
                var onDialogShow = function(e, args, o)
                {
                        var frame = document.createElement('iframe');

Modified: trunk/frontend/templates/base/helpdesk.xsl
===================================================================
--- trunk/frontend/templates/base/helpdesk.xsl  2012-05-23 09:45:30 UTC (rev 
9426)
+++ trunk/frontend/templates/base/helpdesk.xsl  2012-05-23 09:46:50 UTC (rev 
9427)
@@ -130,10 +130,9 @@
                   <td>
                   </td>
                   <td >
-                                       <li>
+
                                                <xsl:apply-templates 
select="custom_attributes/attributes"/>
-                                               <hr/>
-                               </li>
+
                     </td>
                 </tr>
 

Modified: trunk/property/js/yahoo/property.js
===================================================================
--- trunk/property/js/yahoo/property.js 2012-05-23 09:45:30 UTC (rev 9426)
+++ trunk/property/js/yahoo/property.js 2012-05-23 09:46:50 UTC (rev 9427)
@@ -1489,8 +1489,7 @@
                maskopacity:40,
                mask:true,
                animate:true,
-               close: true,
-       //      closejs:function(){closeJS_local()}
+               close: true
                });
        }
 




reply via email to

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