[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15237]
From: |
nelson . guerra |
Subject: |
[Fmsystem-commits] [15237] |
Date: |
Wed, 1 Jun 2016 01:45:41 +0000 (UTC) |
Revision: 15237
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15237
Author: nelson224
Date: 2016-06-01 01:45:40 +0000 (Wed, 01 Jun 2016)
Log Message:
-----------
Modified Paths:
--------------
branches/dev-syncromind-2/property/inc/class.uilocation.inc.php
Modified: branches/dev-syncromind-2/property/inc/class.uilocation.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uilocation.inc.php
2016-06-01 01:45:18 UTC (rev 15236)
+++ branches/dev-syncromind-2/property/inc/class.uilocation.inc.php
2016-06-01 01:45:40 UTC (rev 15237)
@@ -2019,33 +2019,43 @@
}
$location_type_info =
$this->soadmin_location->read_single($type_id);
- $documents = array();
-
- /*if ($location_type_info['list_documents'])
+ $doc_type_filter = array();
+
+ if ($location_type_info['list_documents'])
{
- $objDocument =
CreateObject('property.sodocument');
- $documents =
$objDocument->get_files_at_location(array('location_code' => $location_code));
- }*/
+ $documents = 1;
+
+ $cats =
CreateObject('phpgwapi.categories', -1, 'property', '.document');
+ $cats->supress_info = true;
+ $categories =
$cats->formatted_xslt_list(array('format' => 'filter', 'selected' => 0,
+ 'globals' => true, 'use_acl' =>
true));
+ $default_value = array('cat_id' => '',
'name' => lang('no document type'));
+ array_unshift($categories['cat_list'],
$default_value);
- $cats = CreateObject('phpgwapi.categories', -1,
'property', '.document');
- $cats->supress_info = true;
- $categories =
$cats->formatted_xslt_list(array('format' => 'filter', 'selected' => 0,
- 'globals' => true, 'use_acl' => true));
- $default_value = array('cat_id' => '', 'name'
=> lang('no document type'));
- array_unshift($categories['cat_list'],
$default_value);
+ foreach ($categories['cat_list'] as &
$_category)
+ {
+ $_category['id'] =
$_category['cat_id'];
+ }
- foreach ($categories['cat_list'] as &
$_category)
- {
- $_category['id'] = $_category['cat_id'];
- }
-
- $doc_type_filter = $categories['cat_list'];
-
- //if (count($documents))
- //{
+ $doc_type_filter =
$categories['cat_list'];
+
$tabs['document'] = array('label' =>
lang('document'), 'link' => '#document');
- //$documents = json_encode($documents);
+ $documents_tabletools = array
+ (
+ 'my_name' => 'add',
+ 'text' => lang('add new
document'),
+ 'type' => 'custom',
+ 'className' => 'add',
+ 'custom_code' => "
+ var oArgs = " .
json_encode(array(
+
'menuaction' => 'property.uidocument.edit',
+
'location_code' => $location_code
+ )) . ";
+
newDocument(oArgs);
+ "
+ );
+
$documents_def = array
(
array('key' => 'document_name',
'label' => lang('name'), 'sortable' => false, 'resizeable' => true),
@@ -2057,12 +2067,13 @@
'container' =>
'datatable-container_0',
'requestUrl' =>
json_encode(self::link(array('menuaction' =>
'property.uilocation.get_documents', 'location_code' => $location_code,
'phpgw_return_as' => 'json'))),
'data' => "",
+ 'tabletools' =>
$documents_tabletools,
'ColumnDefs' => $documents_def,
'config' => array(
array('disableFilter'
=> true)
)
);
- //}
+ }
/*$_dirname = '';
@@ -2419,7 +2430,7 @@
'textareacols' =>
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'])
&& $GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'] ?
$GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'] : 40,
'textarearows' =>
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'])
&& $GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] ?
$GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] : 6,
'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, 'general'),
- //'documents' => $documents,
+ 'documents' => $documents,
//'file_tree' => $file_tree,
'lang_expand_all' => lang('expand all'),
'lang_collapse_all' => lang('collapse all'),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15237],
nelson . guerra <=