Project

General

Profile

Bug #24884 » 24884.diff

Jo Hasenau, 2011-07-21 14:48

View differences:

t3lib/js/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js (revision )
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
......
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) {
......
// 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) {
t3lib/js/extjs/ExtDirect.StateProvider.js (revision )
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 = {};
......
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;
......
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);
......
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]);
}
}
......
} 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;
t3lib/stddb/tables.sql (revision )
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,
t3lib/tree/pagetree/class.t3lib_tree_pagetree_node.php (revision )
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();
(3-3/3)