Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
* Fixed #1525, fixed #1513, fixed #1509
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed May 17, 2011
1 parent c1a6364 commit fe60941
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
17 changes: 15 additions & 2 deletions app/modules/AppKit/models/Ext/ApplicationStateModel.class.php
Expand Up @@ -22,12 +22,25 @@ public function readState() {
}

public function writeState($data) {
$merge = array();
if ($this->stateAvailable()) {
$existing = json_decode($this->readState());
$data = array_merge((is_array($existing)) ? $existing : array (), json_decode(($data)));
if (is_array($existing)) foreach ($existing as $v) {
$merge[$v->name] = $v->value;
}
foreach (json_decode($data) as $v) {
$merge[$v->name] = $v->value;
}
$data = array();
foreach ($merge as $k => $v) {
$data[] = (object) array(
'name' => $k,
'value' => $v
);
}
$this->getContext()->getUser()->setPref(self::PREFNS, json_encode($data), true, true);
}
}
}

?>
?>
16 changes: 14 additions & 2 deletions app/modules/Cronks/lib/js/CronkTabpanel.js
Expand Up @@ -90,8 +90,20 @@ Ext.extend(Cronk.util.Tabpanel, Ext.TabPanel, {
}, this);

if(this.URLTabData) {
var index = this.add(this.plugins.createURLCronk(this.URLTabData));
this.setActiveTab(index);

var tabPlugin = this.plugins;
if(Ext.isArray(this.plugins)) {
tabPlugin = null;
for(var i=0;i<this.plugins.length;i++)
if(this.plugins[i].createURLCronk) {
tabPlugin = this.plugins[i];
break;
}
}
if(tabPlugin) {
var index = this.add(tabPlugin.createURLCronk(this.URLTabData));
this.setActiveTab(index);
}
}
else {
this.setActiveTab(state.active || 0);
Expand Down
Expand Up @@ -300,7 +300,7 @@ Cronk.util.GridFilterWindow = function() {
});

if (oGrid.filter_params) {
this.applyFilters(oGrid.filter_params);
oGrid.on("render",this.applyFilters.createDelegate(this,oGrid.filter_params));
}
},

Expand Down Expand Up @@ -353,6 +353,7 @@ Cronk.util.GridFilterWindow = function() {
// console.log(data);
// console.log('APPLY');
// console.log(oGrid.getStore().baseParams);


oGrid.getStore().reload();
// oGrid.fireEvent('activate');
Expand Down

0 comments on commit fe60941

Please sign in to comment.