Moved all the vendor css & js code into webroot. Although it technically was working fine, cake apparently steps on the fact that the file doesn't change between requests, leading the browser to re-download the code with every hit. Under the webroot directory, cake returns code 304 if the browser already has a copy cached.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@110 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
64
site/webroot/js/jqGrid/js/grid.postext.js
Normal file
64
site/webroot/js/jqGrid/js/grid.postext.js
Normal file
@@ -0,0 +1,64 @@
|
||||
;(function($){
|
||||
/**
|
||||
* jqGrid extension
|
||||
* Paul Tiseo ptiseo@wasteconsultants.com
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
**/
|
||||
$.fn.extend({
|
||||
getPostData : function(){
|
||||
var $t = this[0];
|
||||
if(!$t.grid) { return; }
|
||||
return $t.p.postData;
|
||||
},
|
||||
setPostData : function( newdata ) {
|
||||
var $t = this[0];
|
||||
if(!$t.grid) { return; }
|
||||
// check if newdata is correct type
|
||||
if ( typeof(newdata) === 'object' ) {
|
||||
$t.p.postData = newdata;
|
||||
}
|
||||
else {
|
||||
alert("Error: cannot add a non-object postData value. postData unchanged.");
|
||||
}
|
||||
},
|
||||
appendPostData : function( newdata ) {
|
||||
var $t = this[0];
|
||||
if(!$t.grid) { return; }
|
||||
// check if newdata is correct type
|
||||
if ( typeof(newdata) === 'object' ) {
|
||||
$.extend($t.p.postData, newdata);
|
||||
}
|
||||
else {
|
||||
alert("Error: cannot append a non-object postData value. postData unchanged.");
|
||||
}
|
||||
},
|
||||
setPostDataItem : function( key, val ) {
|
||||
var $t = this[0];
|
||||
if(!$t.grid) { return; }
|
||||
$t.p.postData[key] = val;
|
||||
},
|
||||
getPostDataItem : function( key ) {
|
||||
var $t = this[0];
|
||||
if(!$t.grid) { return; }
|
||||
return $t.p.postData[key];
|
||||
},
|
||||
removePostDataItem : function( key ) {
|
||||
var $t = this[0];
|
||||
if(!$t.grid) { return; }
|
||||
delete $t.p.postData[key];
|
||||
},
|
||||
getUserData : function(){
|
||||
var $t = this[0];
|
||||
if(!$t.grid) { return; }
|
||||
return $t.p.userData;
|
||||
},
|
||||
getUserDataItem : function( key ) {
|
||||
var $t = this[0];
|
||||
if(!$t.grid) { return; }
|
||||
return $t.p.userData[key];
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user