fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15318] booking: fix delete link


From: sigurdne
Subject: [Fmsystem-commits] [15318] booking: fix delete link
Date: Thu, 23 Jun 2016 07:30:19 +0000 (UTC)

Revision: 15318
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15318
Author:   sigurdne
Date:     2016-06-23 07:30:18 +0000 (Thu, 23 Jun 2016)
Log Message:
-----------
booking: fix delete link

Modified Paths:
--------------
    trunk/booking/inc/class.uidocument.inc.php
    trunk/booking/inc/class.uidocumentation.inc.php
    trunk/booking/inc/class.uipermission.inc.php
    trunk/booking/templates/base/building.xsl
    trunk/phpgwapi/js/jquery/common.js

Modified: trunk/booking/inc/class.uidocument.inc.php
===================================================================
--- trunk/booking/inc/class.uidocument.inc.php  2016-06-23 01:08:14 UTC (rev 
15317)
+++ trunk/booking/inc/class.uidocument.inc.php  2016-06-23 07:30:18 UTC (rev 
15318)
@@ -171,13 +171,13 @@
                                                        'label' => 
lang('Category'),
                                                ),
                                                array(
-                                                       'key' => 'opcion_edit',
+                                                       'key' => 'option_edit',
                                                        'label' => lang('Edit'),
                                                        'formatter' => 
'JqueryPortico.formatLinkGeneric',
                                                        'sortable' => false
                                                ),
                                                array(
-                                                       'key' => 
'opcion_delete',
+                                                       'key' => 
'option_delete',
                                                        'label' => 
lang('Delete'),
                                                        'formatter' => 
'JqueryPortico.formatLinkGeneric',
                                                        'sortable' => false
@@ -214,9 +214,13 @@
 //                             $document['actions'] = $document_actions;
 
                                if ($this->bo->allow_write($document))
-                                       $document['opcion_edit'] = 
$this->get_owner_typed_link('edit', array('id' => $document['id']));
+                               {
+                                       $document['option_edit'] = 
$this->get_owner_typed_link('edit', array('id' => $document['id']));
+                               }
                                if ($this->bo->allow_delete($document))
-                                       $document['opcion_delete'] = 
$this->get_owner_typed_link('delete', array('id' => $document['id']));
+                               {
+                                       $document['option_delete'] = 
$this->get_owner_typed_link('delete', array('id' => $document['id']));
+                               }
                        }
                        if (phpgw::get_var('no_images'))
                        {

Modified: trunk/booking/inc/class.uidocumentation.inc.php
===================================================================
--- trunk/booking/inc/class.uidocumentation.inc.php     2016-06-23 01:08:14 UTC 
(rev 15317)
+++ trunk/booking/inc/class.uidocumentation.inc.php     2016-06-23 07:30:18 UTC 
(rev 15318)
@@ -62,13 +62,13 @@
                                                        'label' => 
lang('Category'),
                                                ),
                                                array(
-                                                       'key' => 'opcion_edit',
+                                                       'key' => 'option_edit',
                                                        'label' => lang('Edit'),
                                                        'formatter' => 
'JqueryPortico.formatLinkGeneric',
                                                        'sortable' => false
                                                ),
                                                array(
-                                                       'key' => 
'opcion_delete',
+                                                       'key' => 
'option_delete',
                                                        'label' => 
lang('Delete'),
                                                        'formatter' => 
'JqueryPortico.formatLinkGeneric',
                                                        'sortable' => false
@@ -101,9 +101,9 @@
 //                             $document_actions[] = 
 //                             $document_actions[] = 
 
-                               $document['opcion_edit'] = 
self::link(array('menuaction' => $this->module . '.uidocumentation.edit',
+                               $document['option_edit'] = 
self::link(array('menuaction' => $this->module . '.uidocumentation.edit',
                                                'id' => $document['id']));
-                               $document['opcion_delete'] = 
self::link(array('menuaction' => $this->module . '.uidocumentation.delete',
+                               $document['option_delete'] = 
self::link(array('menuaction' => $this->module . '.uidocumentation.delete',
                                                'id' => $document['id']));
                        }
                        return $this->jquery_results($documents);

Modified: trunk/booking/inc/class.uipermission.inc.php
===================================================================
--- trunk/booking/inc/class.uipermission.inc.php        2016-06-23 01:08:14 UTC 
(rev 15317)
+++ trunk/booking/inc/class.uipermission.inc.php        2016-06-23 07:30:18 UTC 
(rev 15318)
@@ -157,13 +157,13 @@
                                                        'label' => lang('Role'),
                                                ),
                                                array(
-                                                       'key' => 'opcion_edit',
+                                                       'key' => 'option_edit',
                                                        'label' => lang('Edit'),
                                                        'formatter' => 
'JqueryPortico.formatLinkGeneric',
                                                        'sortable' => false
                                                ),
                                                array(
-                                                       'key' => 
'opcion_delete',
+                                                       'key' => 
'option_delete',
                                                        'label' => 
lang('Delete'),
                                                        'formatter' => 
'JqueryPortico.formatLinkGeneric',
                                                        'sortable' => false
@@ -203,10 +203,14 @@
 
                                $permission_actions = array();
                                if ($this->bo->allow_write($permission))
-                                       $permission['opcion_edit'] = 
$this->get_object_typed_link('edit', array('id' => $permission['id']));
+                               {
+                                       $permission['option_edit'] = 
$this->get_object_typed_link('edit', array('id' => $permission['id']));
+                               }
                                if ($this->bo->allow_delete($permission))
-                                       $permission['opcion_delete'] = 
$this->get_object_typed_link('delete', array(
+                               {
+                                       $permission['option_delete'] = 
$this->get_object_typed_link('delete', array(
                                                'id' => $permission['id']));
+                               }
 
                                $account_id = 
$GLOBALS['phpgw']->accounts->name2id($permission['subject_name']);
                                if($account_id)

Modified: trunk/booking/templates/base/building.xsl
===================================================================
--- trunk/booking/templates/base/building.xsl   2016-06-23 01:08:14 UTC (rev 
15317)
+++ trunk/booking/templates/base/building.xsl   2016-06-23 07:30:18 UTC (rev 
15318)
@@ -192,8 +192,8 @@
         var permissionsURL   = 
'index.php?menuaction=booking.uipermission_building.index&sort=name&filter_object_id='
 + building_id + '&phpgw_return_as=json&';
         ]]>
                var colDefsResources = [{key: 'sort', label: lang['Sort 
order']},{key: 'name', label: lang['Name'], formatter: genericLink}, {key: 
'type', label: lang['Resource Type']}];
-               var colDefsDocuments = [{key: 'name', label: lang['Name'], 
formatter: genericLink}, {key: 'category', label: lang['Category']}, {key: 
'actions', label: lang['Actions'], formatter: genericLink(lang['Edit'], 
lang['Delete'])}];
-               var colDefsPermissions = [{key: 'subject_name', label: 
lang['Account']}, {key: 'role', label: lang['Role']}, {key: 'actions', label: 
lang['Actions'], formatter: genericLink({name: 'edit', label: 'Edit'}, 
lang['Delete'])}];
+               var colDefsDocuments = [{key: 'name', label: lang['Name'], 
formatter: genericLink}, {key: 'category', label: lang['Category']}, {key: 
'actions', label: lang['Actions'], formatter: genericLink({name: 'edit', 
label:lang['Edit']}, {name: 'delete', label:lang['Delete']})}];
+               var colDefsPermissions = [{key: 'subject_name', label: 
lang['Account']}, {key: 'role', label: lang['Role']}, {key: 'actions', label: 
lang['Actions'], formatter: genericLink({name: 'edit', label: 'Edit'}, {name: 
'delete', label:lang['Delete']})}];
 
                
createTable('resources_container',resourcesURL,colDefsResources);
                
createTable('documents_container',documentsURL,colDefsDocuments);

Modified: trunk/phpgwapi/js/jquery/common.js
===================================================================
--- trunk/phpgwapi/js/jquery/common.js  2016-06-23 01:08:14 UTC (rev 15317)
+++ trunk/phpgwapi/js/jquery/common.js  2016-06-23 07:30:18 UTC (rev 15318)
@@ -86,12 +86,12 @@
        }
 
        var data = oData[key];
-       if (key == 'opcion_edit')
+       if (key == 'option_edit')
        {
                var link = data;
                var name = 'Edit';
        }
-       else if (key == 'opcion_delete')
+       else if (key == 'option_delete')
        {
                var link = data;
                var name = 'Delete';
@@ -1124,11 +1124,11 @@
                                                                }
                                                                if (label_name 
== 'Edit' || label_name == 'edit')
                                                                {
-                                                                       vcfLink 
= 'opcion_edit';
+                                                                       vcfLink 
= 'option_edit';
                                                                }
                                                                else if 
(label_name == 'Delete' || label_name == 'delete')
                                                                {
-                                                                       vcfLink 
= 'opcion_delete';
+                                                                       vcfLink 
= 'option_delete';
                                                                }
                                                                else if 
(label_name == 'dellink')
                                                                {
@@ -1611,4 +1611,4 @@
        {
                return "<a onclick='return confirm(\"Er du sikker på at du vil 
slette denne?\")' href='" + link + "'>" + name + "</a>";
        }
-}
\ No newline at end of file
+}




reply via email to

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