Index: t3lib/js/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js =================================================================== --- t3lib/js/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js (revision 039c4473805b62700a28202c23c04404e26b116d) +++ t3lib/js/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js (revision ) @@ -48,9 +48,9 @@ beforeexpandnode:function(n) { if (this.isRestoringState) { return; - } + } - - this.stateHash[n.id] = n.getPath(); + var saveID = n.id; + this.stateHash[saveID.substr(1)] = 1; }, // delete path and all subpaths of collapsed node from stateHash @@ -59,15 +59,8 @@ return; } - delete this.stateHash[n.id]; - var cPath = n.getPath(); - for(var p in this.stateHash) { - if(this.stateHash.hasOwnProperty(p)) { - if(this.stateHash[p].indexOf(cPath) !== -1) { - delete this.stateHash[p]; - } - } - } + var deleteID = n.id; + delete this.stateHash[deleteID.substr(1)]; }, beforeclick: function(node) { @@ -85,16 +78,27 @@ // add state related props to the tree Ext.apply(tree, { // keeps expanded nodes paths keyed by node.ids - stateHash:{}, + stateHash:{}, restoreState: function() { this.isRestoringState = true; - for(var p in this.stateHash) { - if(this.stateHash.hasOwnProperty(p)) { - this.expandPath(this.stateHash[p]); + // get last selected node + + for(var pageID in this.stateHash) { + var pageNode = this.getNodeById('p' + pageID); + if(pageNode) { + pageNode.on({ + expand: { + single:true, + scope:this, + fn: this.restoreState - } + } + }); + if(pageNode.expanded === false) { + pageNode.expand(); - } + } - // get last selected node + } + } if (this.stateHash['lastSelectedNode']) { var node = this.getNodeById(this.stateHash['lastSelectedNode']); if (node) { Index: t3lib/js/extjs/ExtDirect.StateProvider.js =================================================================== --- t3lib/js/extjs/ExtDirect.StateProvider.js (revision 039c4473805b62700a28202c23c04404e26b116d) +++ t3lib/js/extjs/ExtDirect.StateProvider.js (revision ) @@ -118,11 +118,11 @@ initState: function(state) { if (Ext.isArray(state)) { Ext.each(state, function(item) { - this.state[item.name] = this.decodeValue(item[this.paramNames.value]); + this.state[item.name] = item[this.paramNames.value]; }, this); } else if (Ext.isObject(state)) { Ext.iterate(state, function(key, value){ - this.state[key] = this.decodeValue(value); + this.state[key] = value; }, this); } else { this.state = {}; @@ -172,14 +172,14 @@ var lastValue = this.state[name]; for (i = 0; i < this.queue.length; i++) { if (this.queue[i].name === name) { - lastValue = this.decodeValue(this.queue[i].value); + lastValue = this.queue[i].value; } } var changed = undefined === lastValue || lastValue !== value; if (changed) { o[this.paramNames.name] = name; - o[this.paramNames.value] = this.encodeValue(value); + o[this.paramNames.value] = value; for (i = 0; i < this.queue.length; i++) { if (this.queue[i].name === o.name) { this.queue[i] = o; @@ -260,7 +260,7 @@ return; } var name = item[this.paramNames.name]; - var value = this.decodeValue(item[this.paramNames.value]); + var value = item[this.paramNames.value]; if (value === undefined || value === null) { TYPO3.state.ExtDirectProvider.superclass.clear.call(this, name); @@ -281,7 +281,7 @@ break; } } - if (found && this.encodeValue(response.params.queue[i].value) === this.encodeValue(this.queue[j].value)) { + if (found && response.params.queue[i].value === this.queue[j].value) { this.queue.remove(this.queue[j]); } } @@ -330,7 +330,7 @@ } else { data = o[this.paramNames.data]; Ext.iterate(data, function(key, value) { - this.state[key] = this.decodeValue(value); + this.state[key] = value; }, this); this.queue = []; this.dirty = false; Index: t3lib/stddb/tables.sql =================================================================== --- t3lib/stddb/tables.sql (revision 039c4473805b62700a28202c23c04404e26b116d) +++ t3lib/stddb/tables.sql (revision ) @@ -72,7 +72,7 @@ realName varchar(80) DEFAULT '' NOT NULL, userMods varchar(255) DEFAULT '' NOT NULL, allowed_languages varchar(255) DEFAULT '' NOT NULL, - uc text, + uc mediumtext, file_mountpoints varchar(255) DEFAULT '' NOT NULL, fileoper_perms tinyint(4) DEFAULT '0' NOT NULL, workspace_perms tinyint(3) DEFAULT '1' NOT NULL, Index: t3lib/tree/pagetree/class.t3lib_tree_pagetree_node.php =================================================================== --- t3lib/tree/pagetree/class.t3lib_tree_pagetree_node.php (revision 039c4473805b62700a28202c23c04404e26b116d) +++ t3lib/tree/pagetree/class.t3lib_tree_pagetree_node.php (revision ) @@ -306,7 +306,7 @@ public function toArray() { $arrayRepresentation = parent::toArray(); - $arrayRepresentation['id'] = 'mp-' . $this->getMountPoint() . '-' . $this->getId(); + $arrayRepresentation['id'] = 'p' . dechex($this->getId()) . ($this->getMountPoint() ? '-' . dechex($this->getMountPoint()) : ''); $arrayRepresentation['realId'] = $this->getId(); $arrayRepresentation['nodeData']['id'] = $this->getId();