[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8983] property: link to edit from tables
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [8983] property: link to edit from tables |
Date: |
Thu, 15 Mar 2012 19:49:40 +0000 |
Revision: 8983
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8983
Author: sigurdne
Date: 2012-03-15 19:49:40 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
property: link to edit from tables
Modified Paths:
--------------
trunk/property/inc/class.soentity.inc.php
trunk/property/inc/class.soproject.inc.php
trunk/property/inc/class.sorequest.inc.php
trunk/property/inc/class.soworkorder.inc.php
trunk/property/js/yahoo/entity.index.js
trunk/property/js/yahoo/project.index.js
trunk/property/js/yahoo/request.index.js
trunk/property/js/yahoo/workorder.index.js
Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php 2012-03-15 14:47:10 UTC (rev
8982)
+++ trunk/property/inc/class.soentity.inc.php 2012-03-15 19:49:40 UTC (rev
8983)
@@ -310,6 +310,39 @@
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
+ $uicols['input_type'][] = 'hidden';
+ $uicols['name'][] =
'entity_id';
+ $uicols['descr'][] = false;
+ $uicols['statustext'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['sortable'][] = false;
+ $uicols['exchange'][] = false;
+ $uicols['formatter'][] = '';
+ $uicols['classname'][] = '';
+
+ $uicols['input_type'][] = 'hidden';
+ $uicols['name'][] =
'cat_id';
+ $uicols['descr'][] = false;
+ $uicols['statustext'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['sortable'][] = false;
+ $uicols['exchange'][] = false;
+ $uicols['formatter'][] = '';
+ $uicols['classname'][] = '';
+
+ $uicols['input_type'][] = 'hidden';
+ $uicols['name'][] =
'_type';
+ $uicols['descr'][] = false;
+ $uicols['statustext'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['sortable'][] = false;
+ $uicols['exchange'][] = false;
+ $uicols['formatter'][] = '';
+ $uicols['classname'][] = '';
+
if($lookup)
{
$cols .= ',num as entity_num_' .
$entity_id;
@@ -762,6 +795,26 @@
$dataset[$j]['num']['value'] =
$dataset[$j]['id']['value'];
+ $dataset[$j]['entity_id'] = array
+ (
+ 'value' => $entity_id,
+ 'datatype' => false,
+ 'attrib_id' => false
+ );
+ $dataset[$j]['cat_id'] = array
+ (
+ 'value' => $cat_id,
+ 'datatype' => false,
+ 'attrib_id' => false
+ );
+ $dataset[$j]['_type'] = array
+ (
+ 'value' => $this->type,
+ 'datatype' => false,
+ 'attrib_id' => false
+ );
+
+
if($lookup)
{
$dataset[$j]["entity_cat_name_{$entity_id}"] = array
@@ -877,7 +930,7 @@
$uicols['datatype'][] = '';
$uicols['sortable'][] = true;
$uicols['exchange'][] = false;
- $uicols['formatter'][] = '';
+ $uicols['formatter'][] =
'linktToEntity';
$uicols['classname'][] = '';
$cols_return[] = 'id';
@@ -892,6 +945,40 @@
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
+ $uicols['input_type'][] = 'hidden';
+ $uicols['name'][] =
'entity_id';
+ $uicols['descr'][] = false;
+ $uicols['statustext'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['sortable'][] = false;
+ $uicols['exchange'][] = false;
+ $uicols['formatter'][] = '';
+ $uicols['classname'][] = '';
+
+ $uicols['input_type'][] = 'hidden';
+ $uicols['name'][] =
'cat_id';
+ $uicols['descr'][] = false;
+ $uicols['statustext'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['sortable'][] = false;
+ $uicols['exchange'][] = false;
+ $uicols['formatter'][] = '';
+ $uicols['classname'][] = '';
+
+ $uicols['input_type'][] = 'hidden';
+ $uicols['name'][] =
'_type';
+ $uicols['descr'][] = false;
+ $uicols['statustext'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['sortable'][] = false;
+ $uicols['exchange'][] = false;
+ $uicols['formatter'][] = '';
+ $uicols['classname'][] = '';
+
+
if($lookup)
{
$cols .= ',num as entity_num_' .
$entity_id;
@@ -1304,6 +1391,25 @@
'attrib_id' =>
$uicols['cols_return_extra'][$key]['attrib_id']
);
}
+ $dataset[$j]['entity_id'] = array
+ (
+ 'value' => $entity_id,
+ 'datatype' => false,
+ 'attrib_id' => false
+ );
+ $dataset[$j]['cat_id'] = array
+ (
+ 'value' => $cat_id,
+ 'datatype' => false,
+ 'attrib_id' => false
+ );
+ $dataset[$j]['_type'] = array
+ (
+ 'value' => $this->type,
+ 'datatype' => false,
+ 'attrib_id' => false
+ );
+
if($lookup)
{
$dataset[$j]["entity_cat_name_{$entity_id}"] = array
Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php 2012-03-15 14:47:10 UTC (rev
8982)
+++ trunk/property/inc/class.soproject.inc.php 2012-03-15 19:49:40 UTC (rev
8983)
@@ -136,7 +136,7 @@
$uicols['exchange'][] = false;
$uicols['align'][] = '';
$uicols['datatype'][] = '';
- $uicols['formatter'][] = '';
+ $uicols['formatter'][] =
'linktToProject';
$uicols['classname'][] = '';
$uicols['sortable'][] = true;
Modified: trunk/property/inc/class.sorequest.inc.php
===================================================================
--- trunk/property/inc/class.sorequest.inc.php 2012-03-15 14:47:10 UTC (rev
8982)
+++ trunk/property/inc/class.sorequest.inc.php 2012-03-15 19:49:40 UTC (rev
8983)
@@ -567,7 +567,7 @@
array_unshift($this->uicols['exchange'],'');
array_unshift($this->uicols['align'],'');
array_unshift($this->uicols['datatype'],'');
- array_unshift($this->uicols['formatter'],'');
+
array_unshift($this->uicols['formatter'],'linktToRequest');
array_unshift($this->uicols['classname'],'');
array_unshift($this->uicols['sortable'],true);
Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php 2012-03-15 14:47:10 UTC
(rev 8982)
+++ trunk/property/inc/class.soworkorder.inc.php 2012-03-15 19:49:40 UTC
(rev 8983)
@@ -158,7 +158,10 @@
$uicols['name'][] =
'project_id';
$uicols['descr'][] =
lang('Project');
$uicols['statustext'][] = lang('Project
ID');
- $uicols['formatter'][] = '';
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['formatter'][] =
'linktToProject';
$uicols['classname'][] = '';
$uicols['sortable'][] = true;
@@ -168,7 +171,10 @@
$uicols['name'][] =
'workorder_id';
$uicols['descr'][] =
lang('Workorder');
$uicols['statustext'][] =
lang('Workorder ID');
- $uicols['formatter'][] = '';
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
+ $uicols['formatter'][] =
'linktToOrder';
$uicols['classname'][] = '';
$uicols['sortable'][] = true;
@@ -178,6 +184,9 @@
$uicols['name'][] =
'title';
$uicols['descr'][] =
lang('Title');
$uicols['statustext'][] =
lang('Workorder title');
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
$uicols['sortable'][] = '';
@@ -188,6 +197,9 @@
$uicols['name'][] =
'status';
$uicols['descr'][] =
lang('Status');
$uicols['statustext'][] =
lang('Workorder status');
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
$uicols['sortable'][] = '';
@@ -207,6 +219,9 @@
$uicols['name'][] =
'entry_date';
$uicols['descr'][] =
lang('Entry date');
$uicols['statustext'][] =
lang('Workorder entry date');
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
*/
@@ -216,6 +231,9 @@
$uicols['name'][] =
'user_lid';
$uicols['descr'][] =
lang('User');
$uicols['statustext'][] =
lang('Workorder User');
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
$uicols['sortable'][] = '';
@@ -226,6 +244,9 @@
$uicols['name'][] =
'vendor_id';
$uicols['descr'][] =
lang('Vendor ID');
$uicols['statustext'][] = lang('Vendor
ID');
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
$uicols['sortable'][] = '';
@@ -237,6 +258,9 @@
$uicols['name'][] =
'loc1_name';
$uicols['descr'][] = '';
$uicols['statustext'][] = '';
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
$uicols['sortable'][] = '';
@@ -255,6 +279,9 @@
$uicols['name'][] =
'org_name';
$uicols['descr'][] =
lang('Vendor name');
$uicols['statustext'][] = lang('Vendor
name');
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
$uicols['sortable'][] = '';
@@ -265,6 +292,9 @@
$uicols['name'][] =
'combined_cost';
$uicols['descr'][] =
lang('Cost');
$uicols['statustext'][] = lang('Cost -
either budget or calculation');
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
$uicols['formatter'][] =
'myFormatCount2';
$uicols['classname'][] = 'rightClasss';
$uicols['sortable'][] = true;
@@ -275,6 +305,9 @@
$uicols['name'][] =
'actual_cost';
$uicols['descr'][] =
lang('Actual cost');
$uicols['statustext'][] = lang('Actual
cost - paid so far');
+ $uicols['exchange'][] = false;
+ $uicols['align'][] = '';
+ $uicols['datatype'][] = '';
$uicols['formatter'][] =
'myFormatCount2';
$uicols['classname'][] = 'rightClasss';
$uicols['sortable'][] = true;
Modified: trunk/property/js/yahoo/entity.index.js
===================================================================
--- trunk/property/js/yahoo/entity.index.js 2012-03-15 14:47:10 UTC (rev
8982)
+++ trunk/property/js/yahoo/entity.index.js 2012-03-15 19:49:40 UTC (rev
8983)
@@ -120,6 +120,15 @@
}
}
+ var oArgs_entity = {menuaction:'property.uientity.edit'};
+ var sUrl_entity = phpGWLink('index.php', oArgs_entity);
+
+ var linktToEntity = function(elCell, oRecord, oColumn, oData)
+ {
+ elCell.innerHTML = "<a
href="+sUrl_entity+"&entity_id="+oRecord.getData('entity_id')+"&cat_id="+oRecord.getData('cat_id')+"&id="+oRecord.getData('id')+"&type="+oRecord.getData('_type')+">"
+ oData + "</a>";
+ };
+
+
/****************************************************************************************/
this.myParticularRenderEvent = function()
Modified: trunk/property/js/yahoo/project.index.js
===================================================================
--- trunk/property/js/yahoo/project.index.js 2012-03-15 14:47:10 UTC (rev
8982)
+++ trunk/property/js/yahoo/project.index.js 2012-03-15 19:49:40 UTC (rev
8983)
@@ -9,13 +9,13 @@
{order:2,
var_URL:'status_id',name:'btn_status_id',style:'districtbutton',dependiente:''},
{order:3,
var_URL:'wo_hour_cat_id',name:'btn_hour_category_id',style:'partOFTownbutton',dependiente:''},
{order:4, var_URL:'filter',
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
- {order:5, var_URL:'criteria_id',
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
+ {order:5, var_URL:'criteria_id',
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
];
// define buttons
var oNormalButton_0, oNormalButton_1, oNormalButton_2, oNormalButton_3;
var normalButtons = [
- {order:0, name:'btn_date_search', funct:"onDateSearchClick"},
+ {order:0, name:'btn_date_search', funct:"onDateSearchClick"},
{order:1, name:'btn_search', funct:"onSearchClick"},
{order:2, name:'btn_new', funct:"onNewClick"},
{order:3, name:'btn_export', funct:"onDownloadClick"}
@@ -28,7 +28,7 @@
var toolTips =
[
- {name:'loc1', title:'',
description:'',ColumnDescription:'loc1_name'},
+ {name:'loc1', title:'',
description:'',ColumnDescription:'loc1_name'},
{name:'btn_export', title:'download', description:'Download
table to your browser', ColumnDescription:''}
]
@@ -43,6 +43,15 @@
date_search : 1 //if search has link "Data search"
}
+ var oArgs_project = {menuaction:'property.uiproject.edit'};
+ var sUrl_project = phpGWLink('index.php', oArgs_project);
+
+ var linktToProject = function(elCell, oRecord, oColumn, oData)
+ {
+ elCell.innerHTML = "<a href="+sUrl_project+"&id="+oData+">" +
oData + "</a>";
+ };
+
+
/********************************************************************************/
this.myFormatNum2 = function(Data)
{
@@ -53,53 +62,53 @@
{
elCell.innerHTML = myFormatNum2(oData);
}
-
+
this.particular_setting = function()
{
if(flag_particular_setting=='init')
{
- //district
+ //district
index =
locate_in_array_options(0,"value",path_values.district_id);
- if(index)
- {
- oMenuButton_0.set("label", ("<em>" +
array_options[0][index][1] + "</em>"));
- }
-
+ if(index)
+ {
+ oMenuButton_0.set("label", ("<em>" +
array_options[0][index][1] + "</em>"));
+ }
+
//category
index =
locate_in_array_options(1,"value",path_values.cat_id);
- if(index)
- {
- oMenuButton_1.set("label", ("<em>" +
array_options[1][index][1] + "</em>"));
+ if(index)
+ {
+ oMenuButton_1.set("label", ("<em>" +
array_options[1][index][1] + "</em>"));
}
-
- //status
+
+ //status
index =
locate_in_array_options(2,"value",path_values.status_id);
- if(index)
- {
- oMenuButton_2.set("label", ("<em>" +
array_options[2][index][1] + "</em>"));
- }
-
- //wo_hour_cat_id
+ if(index)
+ {
+ oMenuButton_2.set("label", ("<em>" +
array_options[2][index][1] + "</em>"));
+ }
+
+ //wo_hour_cat_id
index =
locate_in_array_options(3,"value",path_values.wo_hour_cat_id);
- if(index)
- {
- oMenuButton_3.set("label", ("<em>" +
array_options[3][index][1] + "</em>"));
- }
-
- //user
+ if(index)
+ {
+ oMenuButton_3.set("label", ("<em>" +
array_options[3][index][1] + "</em>"));
+ }
+
+ //user
index =
locate_in_array_options(4,"value",path_values.user_id);
- if(index)
- {
- oMenuButton_4.set("label", ("<em>" +
array_options[4][index][1] + "</em>"));
- }
-
- //criteria
+ if(index)
+ {
+ oMenuButton_4.set("label", ("<em>" +
array_options[4][index][1] + "</em>"));
+ }
+
+ //criteria
index =
locate_in_array_options(5,"value",path_values.criteria_id);
- if(index)
- {
- oMenuButton_5.set("label", ("<em>" +
array_options[5][index][1] + "</em>"));
- }
-
+ if(index)
+ {
+ oMenuButton_5.set("label", ("<em>" +
array_options[5][index][1] + "</em>"));
+ }
+
//focus initial
//--focus for txt_query---
YAHOO.util.Dom.get(textImput[0].id).focus();
@@ -109,7 +118,7 @@
{
}
}
-
+
/****************************************************************************************/
this.myParticularRenderEvent = function()
@@ -118,7 +127,7 @@
}
/****************************************************************************************/
-
+
//----------------------------------------------------------
YAHOO.util.Event.addListener(window, "load", function()
{
Modified: trunk/property/js/yahoo/request.index.js
===================================================================
--- trunk/property/js/yahoo/request.index.js 2012-03-15 14:47:10 UTC (rev
8982)
+++ trunk/property/js/yahoo/request.index.js 2012-03-15 19:49:40 UTC (rev
8983)
@@ -44,6 +44,15 @@
};
/****************************************************************************************/
+ var oArgs_request = {menuaction:'property.uirequest.edit'};
+ var sUrl_request = phpGWLink('index.php', oArgs_request);
+
+ var linktToRequest = function(elCell, oRecord, oColumn, oData)
+ {
+ elCell.innerHTML = "<a href="+sUrl_request+"&id="+oData+">" +
oData + "</a>";
+ };
+
+
var FormatterRight = function(elCell, oRecord, oColumn, oData)
{
elCell.innerHTML = "<div
align=\"right\">"+YAHOO.util.Number.format(oData, {thousandsSeparator:"
"})+"</div>";
Modified: trunk/property/js/yahoo/workorder.index.js
===================================================================
--- trunk/property/js/yahoo/workorder.index.js 2012-03-15 14:47:10 UTC (rev
8982)
+++ trunk/property/js/yahoo/workorder.index.js 2012-03-15 19:49:40 UTC (rev
8983)
@@ -1,14 +1,14 @@
//--------------------------------------------------------
// Declaration of workorder.index vars
-//--------------------------------------------------------
+//--------------------------------------------------------
//define SelectButton
var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3,
oMenuButton_4, oMenuButton_5;
var selectsButtons = [
- {order:0,
var_URL:'district_id',name:'btn_district_id',style:'districtbutton',dependiente:''},
+ {order:0,
var_URL:'district_id',name:'btn_district_id',style:'districtbutton',dependiente:''},
{order:1,
var_URL:'cat_id',name:'btn_cat_id',style:'categorybutton',dependiente:''},
{order:2,
var_URL:'status_id',name:'btn_status_id',style:'districtbutton',dependiente:''},
{order:3,
var_URL:'wo_hour_cat_id',name:'btn_wo_hour_cat_id',style:'partOFTownbutton',dependiente:''},
- {order:4, var_URL:'filter',
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
+ {order:4, var_URL:'filter',
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
{order:5, var_URL:'criteria_id',
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
]
@@ -27,8 +27,8 @@
var toolTips =
[
- {name:'loc1', title:'',
description:'',ColumnDescription:'loc1_name'},
- {name:'vendor_id', title:'',
description:'',ColumnDescription:'org_name'},
+ {name:'loc1', title:'',
description:'',ColumnDescription:'loc1_name'},
+ {name:'vendor_id', title:'',
description:'',ColumnDescription:'org_name'},
{name:'btn_export', title:'Download', description:'Download
table to your browser',ColumnDescription:''}
]
@@ -42,6 +42,23 @@
date_search : 1 //if search has link "Data search"
};
+ var oArgs_project = {menuaction:'property.uiproject.edit'};
+ var sUrl_project = phpGWLink('index.php', oArgs_project);
+
+ var linktToProject = function(elCell, oRecord, oColumn, oData)
+ {
+ elCell.innerHTML = "<a href="+sUrl_project+"&id="+oData+">" +
oData + "</a>";
+ };
+
+ var oArgs_order = {menuaction:'property.uiworkorder.edit'};
+ var sUrl_order = phpGWLink('index.php', oArgs_order);
+
+ var linktToOrder = function(elCell, oRecord, oColumn, oData)
+ {
+ elCell.innerHTML = "<a href="+sUrl_order+"&id="+oData+">" +
oData + "</a>";
+ };
+
+
/********************************************************************************/
this.myFormatNum2 = function(Data)
{
@@ -52,53 +69,53 @@
{
elCell.innerHTML = myFormatNum2(oData);
}
-
+
this.particular_setting = function()
{
if(flag_particular_setting=='init')
{
- //district
+ //district
index =
locate_in_array_options(0,"value",path_values.district_id);
- if(index)
- {
- oMenuButton_0.set("label", ("<em>" +
array_options[0][index][1] + "</em>"));
- }
-
+ if(index)
+ {
+ oMenuButton_0.set("label", ("<em>" +
array_options[0][index][1] + "</em>"));
+ }
+
//category
index =
locate_in_array_options(1,"value",path_values.cat_id);
- if(index)
- {
- oMenuButton_1.set("label", ("<em>" +
array_options[1][index][1] + "</em>"));
+ if(index)
+ {
+ oMenuButton_1.set("label", ("<em>" +
array_options[1][index][1] + "</em>"));
}
-
- //status
+
+ //status
index =
locate_in_array_options(2,"value",path_values.status_id);
- if(index)
- {
- oMenuButton_2.set("label", ("<em>" +
array_options[2][index][1] + "</em>"));
- }
-
- //wo_hour_cat_id
+ if(index)
+ {
+ oMenuButton_2.set("label", ("<em>" +
array_options[2][index][1] + "</em>"));
+ }
+
+ //wo_hour_cat_id
index =
locate_in_array_options(3,"value",path_values.wo_hour_cat_id);
- if(index)
- {
- oMenuButton_3.set("label", ("<em>" +
array_options[3][index][1] + "</em>"));
- }
-
- //user
+ if(index)
+ {
+ oMenuButton_3.set("label", ("<em>" +
array_options[3][index][1] + "</em>"));
+ }
+
+ //user
index =
locate_in_array_options(4,"value",path_values.filter);
- if(index)
- {
- oMenuButton_4.set("label", ("<em>" +
array_options[4][index][1] + "</em>"));
- }
-
- //criteria
+ if(index)
+ {
+ oMenuButton_4.set("label", ("<em>" +
array_options[4][index][1] + "</em>"));
+ }
+
+ //criteria
index =
locate_in_array_options(5,"value",path_values.criteria_id);
- if(index)
- {
- oMenuButton_5.set("label", ("<em>" +
array_options[5][index][1] + "</em>"));
- }
-
+ if(index)
+ {
+ oMenuButton_5.set("label", ("<em>" +
array_options[5][index][1] + "</em>"));
+ }
+
//focus initial
//--focus for txt_query---
YAHOO.util.Dom.get(textImput[0].id).focus();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8983] property: link to edit from tables,
Sigurd Nes <=