Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn committed Oct 12, 2012
1 parent 5af20ba commit 2f44988
Showing 1 changed file with 27 additions and 42 deletions.
69 changes: 27 additions & 42 deletions js/flexigrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,8 @@
this.rePosDrag();
this.fixHeight();
this.colresize = false;
if ($.cookie) {
var name = p.colModel[n].name; // Store the widths in the cookies
$.cookie('flexiwidths/'+name, nw);
}
var name = p.colModel[n].name; // Store the widths in the cookies
$.cookie('flexiwidths/'+name, nw);
} else if (this.vresize) {
this.vresize = false;
} else if (this.colCopy) {
Expand Down Expand Up @@ -538,39 +536,28 @@
if (p.page > p.pages) {
p.page = p.pages;
}
var param;
if ($.isPlainObject(p.params)) {
param = p.params;
param.page = p.newp;
param.rp = p.rp;
param.sortname = p.sortname;
param.sortorder = p.sortorder;
param.query = p.query;
param.qtype = p.qtype;
} else {
param = [{
name: 'page',
value: p.newp
}, {
name: 'rp',
value: p.rp
}, {
name: 'sortname',
value: p.sortname
}, {
name: 'sortorder',
value: p.sortorder
}, {
name: 'query',
value: p.query
}, {
name: 'qtype',
value: p.qtype
}];
if (p.params.length) {
for (var pi = 0; pi < p.params.length; pi++) {
param[param.length] = p.params[pi];
}
var param = [{
name: 'page',
value: p.newp
}, {
name: 'rp',
value: p.rp
}, {
name: 'sortname',
value: p.sortname
}, {
name: 'sortorder',
value: p.sortorder
}, {
name: 'query',
value: p.query
}, {
name: 'qtype',
value: p.qtype
}];
if (p.params.length) {
for (var pi = 0; pi < p.params.length; pi++) {
param[param.length] = p.params[pi];
}
}
$.ajax({
Expand Down Expand Up @@ -824,11 +811,9 @@
var th = document.createElement('th');
$(th).attr('axis', 'col' + i);
if( cm ) { // only use cm if its defined
if ($.cookie) {
var cookie_width = 'flexiwidths/'+cm.name; // Re-Store the widths in the cookies
if( $.cookie(cookie_width) != undefined ) {
cm.width = $.cookie(cookie_width);
}
var cookie_width = 'flexiwidths/'+cm.name; // Re-Store the widths in the cookies
if( $.cookie(cookie_width) != undefined ) {
cm.width = $.cookie(cookie_width);
}
if( cm.display != undefined ) {
th.innerHTML = cm.display;
Expand Down

0 comments on commit 2f44988

Please sign in to comment.