summaryrefslogtreecommitdiffstats
path: root/codebase/strategy.php
diff options
context:
space:
mode:
authorDmitry <dmitry@dhtmlx.com>2012-05-10 18:04:27 +0200
committerDmitry <dmitry@dhtmlx.com>2012-05-10 18:04:27 +0200
commitc9fcb91534cb423ec47e1b403c6a1786d6a7cd59 (patch)
tree8df957c75bf110dde727c19dfae288e57ed46d2a /codebase/strategy.php
parentc6f8ad6c0b6a5c6d7c512805dcc93a0f7bc52146 (diff)
downloadconnector-php-c9fcb91534cb423ec47e1b403c6a1786d6a7cd59.zip
connector-php-c9fcb91534cb423ec47e1b403c6a1786d6a7cd59.tar.gz
connector-php-c9fcb91534cb423ec47e1b403c6a1786d6a7cd59.tar.bz2
fix different separator for treegrid
Diffstat (limited to 'codebase/strategy.php')
-rw-r--r--codebase/strategy.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/codebase/strategy.php b/codebase/strategy.php
index e09d82f..3caeaeb 100644
--- a/codebase/strategy.php
+++ b/codebase/strategy.php
@@ -156,6 +156,10 @@ class MultitableTreeRenderStrategy extends TreeRenderStrategy {
$conn->event->attach("afterProcessing", Array($this, 'id_translate_after'));
}
+ public function set_separator($sep) {
+ $this->sep = $sep;
+ }
+
public function render_set($res, $name, $dload, $sep){
$output="";
$index=0;
@@ -238,7 +242,7 @@ class MultitableTreeRenderStrategy extends TreeRenderStrategy {
$this->max_level = $max_level;
}
public function parse_id($id, $set_level = true) {
- $parts = explode($this->sep, urldecode($id));
+ $parts = explode('#', urldecode($id));
if (count($parts) === 2) {
$level = $parts[0] + 1;
$id = $parts[1];
@@ -285,6 +289,12 @@ class GroupRenderStrategy extends RenderStrategy {
private $id_postfix = '__{group_param}';
+ public function __construct($conn) {
+ parent::__construct($conn);
+ $conn->event->attach("beforeProcessing", Array($this, 'check_id'));
+ $conn->event->attach("onInit", Array($this, 'replace_postfix'));
+ }
+
public function render_set($res, $name, $dload, $sep){
$output="";
$index=0;