24884_revert.patch

Stefan Galinski, 2012-04-18 15:13

Download (6.45 KB)

View differences:

t3lib/js/extjs/ExtDirect.StateProvider.js
118 118
	initState: function(state) {
119 119
		if (Ext.isArray(state)) {
120 120
			Ext.each(state, function(item) {
121
				this.state[item.name] = this.decodeValue(item[this.paramNames.value]);
121
				this.state[item.name] = item[this.paramNames.value];
122 122
			}, this);
123 123
		} else if (Ext.isObject(state)) {
124 124
			Ext.iterate(state, function(key, value){
125
				this.state[key] = this.decodeValue(value);
125
				this.state[key] = value;
126 126
			}, this);
127 127
		} else {
128 128
			this.state = {};
......
172 172
		var lastValue = this.state[name];
173 173
		for (i = 0; i < this.queue.length; i++) {
174 174
			if (this.queue[i].name === name) {
175
				lastValue = this.decodeValue(this.queue[i].value);
175
				lastValue = this.queue[i].value;
176 176
			}
177 177
		}
178 178
		var changed = undefined === lastValue || lastValue !== value;
179 179

  
180 180
		if (changed) {
181 181
			o[this.paramNames.name] = name;
182
			o[this.paramNames.value] = this.encodeValue(value);
182
			o[this.paramNames.value] = value;
183 183
			for (i = 0; i < this.queue.length; i++) {
184 184
				if (this.queue[i].name === o.name) {
185 185
					this.queue[i] = o;
......
260 260
					return;
261 261
				}
262 262
				var name = item[this.paramNames.name];
263
				var value = this.decodeValue(item[this.paramNames.value]);
263
				var value = item[this.paramNames.value];
264 264

  
265 265
				if (value === undefined  || value === null) {
266 266
					TYPO3.state.ExtDirectProvider.superclass.clear.call(this, name);
......
281 281
							break;
282 282
						}
283 283
					}
284
					if (found && this.encodeValue(response.params.queue[i].value) === this.encodeValue(this.queue[j].value)) {
284
					if (found && response.params.queue[i].value === this.queue[j].value) {
285 285
						this.queue.remove(this.queue[j]);
286 286
					}
287 287
				}
......
330 330
		} else {
331 331
			data = o[this.paramNames.data];
332 332
			Ext.iterate(data, function(key, value) {
333
				this.state[key] = this.decodeValue(value);
333
				this.state[key] = value;
334 334
			}, this);
335 335
			this.queue = [];
336 336
			this.dirty = false;
t3lib/js/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js
49 49
				if (this.isRestoringState) {
50 50
					return;
51 51
				}
52

  
53
				this.stateHash[n.id] = n.getPath();
52
				var saveID = n.id;
53
				this.stateHash[saveID.substr(1)] = 1;
54 54
			},
55 55

  
56 56
			// delete path and all subpaths of collapsed node from stateHash
......
59 59
					return;
60 60
				}
61 61

  
62
				delete this.stateHash[n.id];
63
				var cPath = n.getPath();
64
				for(var p in this.stateHash) {
65
					if(this.stateHash.hasOwnProperty(p)) {
66
						if(this.stateHash[p].indexOf(cPath) !== -1) {
67
							delete this.stateHash[p];
68
						}
69
					}
70
				}
62
				var deleteID = n.id;
63
				delete this.stateHash[deleteID.substr(1)];
71 64
			},
72 65

  
73 66
			beforeclick: function(node) {
......
85 78
		// add state related props to the tree
86 79
		Ext.apply(tree, {
87 80
			// keeps expanded nodes paths keyed by node.ids
88
			 stateHash:{},
81
			stateHash:{},
89 82

  
90 83
			restoreState: function() {
91 84
				this.isRestoringState = true;
92
				for(var p in this.stateHash) {
93
					if(this.stateHash.hasOwnProperty(p)) {
94
						this.expandPath(this.stateHash[p]);
85
					// get last selected node
86
				for (var pageID in this.stateHash) {
87
					var pageNode = this.getNodeById('p' + pageID);
88
					if (pageNode) {
89
						pageNode.on({
90
							expand: {
91
								single:true,
92
								scope:this,
93
								fn: this.restoreState
94
							}
95
						});
96
						if (pageNode.expanded === false) {
97
							pageNode.expand();
98
						}
95 99
					}
96 100
				}
97
					// get last selected node
98 101

  
99 102
				if (this.stateHash['lastSelectedNode']) {
100 103
					var node = this.getNodeById(this.stateHash['lastSelectedNode']);
t3lib/stddb/tables.sql
74 74
  realName varchar(80) DEFAULT '' NOT NULL,
75 75
  userMods varchar(255) DEFAULT '' NOT NULL,
76 76
  allowed_languages varchar(255) DEFAULT '' NOT NULL,
77
  uc text,
77
  uc mediumtext,
78 78
  file_mountpoints varchar(255) DEFAULT '' NOT NULL,
79 79
  fileoper_perms tinyint(4) DEFAULT '0' NOT NULL,
80 80
  workspace_perms tinyint(3) DEFAULT '1' NOT NULL,
t3lib/tree/pagetree/class.t3lib_tree_pagetree_node.php
306 306
	public function toArray() {
307 307
		$arrayRepresentation = parent::toArray();
308 308

  
309
		$arrayRepresentation['id'] = 'mp-' . $this->getMountPoint() . '-' . $this->getId();
309
		$arrayRepresentation['id'] = 'p' . dechex($this->getId()) . ($this->getMountPoint() ? '-' . dechex($this->getMountPoint()) : '');
310 310
		$arrayRepresentation['realId'] = $this->getId();
311 311
		$arrayRepresentation['nodeData']['id'] = $this->getId();
312 312

  
313
-