[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10035] controller: remove component_id and location_
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10035] controller: remove component_id and location_id from control |
Date: |
Thu, 27 Sep 2012 07:37:27 +0000 |
Revision: 10035
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10035
Author: sigurdne
Date: 2012-09-27 07:37:25 +0000 (Thu, 27 Sep 2012)
Log Message:
-----------
controller: remove component_id and location_id from control
Modified Paths:
--------------
trunk/logistic/inc/class.uiproject.inc.php
trunk/logistic/templates/base/datatable.xsl
Modified: trunk/logistic/inc/class.uiproject.inc.php
===================================================================
--- trunk/logistic/inc/class.uiproject.inc.php 2012-09-27 07:33:32 UTC (rev
10034)
+++ trunk/logistic/inc/class.uiproject.inc.php 2012-09-27 07:37:25 UTC (rev
10035)
@@ -45,7 +45,8 @@
'view_project_type' => true,
'edit_project_type' => true,
'add' => true,
- 'edit' => true
+ 'edit' => true,
+ 'edit_something' =>true
);
public function __construct() {
@@ -160,7 +161,8 @@
if(phpgw::get_var('phpgw_return_as') == 'json') {
return $this->query();
}
- self::add_javascript('logistic', 'yahoo',
'datatable.js');
+// self::add_javascript('logistic', 'yahoo',
'datatable.js');
+ self::add_javascript('phpgwapi', 'yahoo',
'datatable.js');
phpgwapi_yui::load_widget('datatable');
phpgwapi_yui::load_widget('paginator');
@@ -195,6 +197,7 @@
),
'datatable' => array(
'source' =>
self::link(array('menuaction' => 'logistic.uiproject.index', 'phpgw_return_as'
=> 'json')),
+ 'editor_action' =>
'logistic.uiproject.edit_something',
'field' => array(
array(
'key' => 'name',
@@ -210,7 +213,8 @@
array(
'key' => 'description',
'label' =>
lang('Project description'),
- 'sortable' => false
+ 'sortable' =>
false,
+ 'editor' => 'new
YAHOO.widget.TextboxCellEditor({disableBtns:true})'
),
array(
'key' =>
'project_type_label',
@@ -228,13 +232,20 @@
self::render_template_xsl(array( 'project_datatable',
'datatable' ), $data);
}
+
+ public function edit_something()
+ {
+ return 'kvittering';
+ }
+
public function project_types()
{
$GLOBALS['phpgw_info']['flags']['menu_selection'] =
"admin::logistic::project_types";
if(phpgw::get_var('phpgw_return_as') == 'json') {
return $this->query();
}
- self::add_javascript('logistic', 'yahoo',
'datatable.js');
+// self::add_javascript('logistic', 'yahoo',
'datatable.js');
+ self::add_javascript('phpgwapi', 'yahoo',
'datatable.js');
phpgwapi_yui::load_widget('datatable');
phpgwapi_yui::load_widget('paginator');
@@ -474,4 +485,3 @@
}
}
}
-?>
Modified: trunk/logistic/templates/base/datatable.xsl
===================================================================
--- trunk/logistic/templates/base/datatable.xsl 2012-09-27 07:33:32 UTC (rev
10034)
+++ trunk/logistic/templates/base/datatable.xsl 2012-09-27 07:37:25 UTC (rev
10035)
@@ -210,6 +210,7 @@
</xsl:template>
<xsl:template match="datatable">
+ <div id="message"/>
<div id="paginator"/>
<div id="datatable-container"/>
<xsl:call-template name="datasource-definition" />
@@ -227,9 +228,33 @@
</xsl:if>
</xsl:if>
+ <xsl:choose>
+ <xsl:when test="//datatable/actions">
+ YAHOO.portico.actions = [
+ <xsl:for-each
select="//datatable/actions">
+ {
+ my_name:
"<xsl:value-of select="my_name"/>",
+ text:
"<xsl:value-of select="text"/>",
+ <xsl:if
test="parameters">
+
parameters: <xsl:value-of select="parameters"/>,
+ </xsl:if>
+ action:
"<xsl:value-of select="action"/>"
+ }<xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/>
+ </xsl:for-each>
+ ];
+ </xsl:when>
+ <xsl:otherwise>
+ YAHOO.portico.actions = [];
+ </xsl:otherwise>
+ </xsl:choose>
+
+ YAHOO.portico.editor_action = "<xsl:value-of
select="//datatable/editor_action"/>";
+ YAHOO.portico.disable_left_click = "<xsl:value-of
select="//datatable/disable_left_click"/>";
+
YAHOO.portico.columnDefs = [
<xsl:for-each select="//datatable/field">
{
+ resizeable: true,
key: "<xsl:value-of
select="key"/>",
<xsl:if test="label">
label: "<xsl:value-of
select="label"/>",
@@ -241,12 +266,15 @@
<xsl:if test="formatter">
formatter: <xsl:value-of
select="formatter"/>,
</xsl:if>
+ <xsl:if test="editor">
+ editor: <xsl:value-of
select="editor"/>,
+ </xsl:if>
className: "<xsl:value-of
select="className"/>"
}<xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/>
</xsl:for-each>
];
}
-
+<!--
<xsl:choose>
<xsl:when test="//actions != ''">
var actions = <xsl:value-of select="//actions"
disable-output-escaping="yes" />;
@@ -255,6 +283,6 @@
var actions = new Array();
</xsl:otherwise>
</xsl:choose>
-
+-->
</script>
</xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10035] controller: remove component_id and location_id from control,
Sigurd Nes <=