Permalink
Browse files

Allow dynamic Application parameters to be used with the DataTable (f…

…ixes multiple page set levels within the same Application (ie, Countries->Zones))
  • Loading branch information...
1 parent 2b90332 commit 6caf922bae25d606e5a817576c28f63a6e384495 @haraldpdl haraldpdl committed Aug 3, 2010
@@ -58,16 +58,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'administratorsDataTable';
@@ -59,16 +59,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'entries_page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'configurationDataTable';
@@ -53,16 +53,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'configurationDataTable';
@@ -60,16 +60,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'countryDataTable';
@@ -59,16 +59,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule + '_zones';
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'zones_page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'countryZonesDataTable';
@@ -59,16 +59,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'ccDataTable';
@@ -60,16 +60,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'currenciesDataTable';
@@ -52,16 +52,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'errorLogDataTable';
@@ -59,16 +59,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule + '_definitions';
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'definitions_page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'defsDataTable';
@@ -52,16 +52,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule + '_groups';
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'groups_page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'langDefGroupDataTable';
@@ -60,16 +60,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'langDataTable';
@@ -56,16 +56,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule + '_install';
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'install_page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'paymentModulesDataTable';
@@ -57,16 +57,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'paymentModulesDataTable';
@@ -60,16 +60,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'entries_page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'taxClassEntriesDataTable';
@@ -58,16 +58,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'taxClassDataTable';
@@ -59,16 +59,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'entries_page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'zoneGroupEntriesDataTable';
@@ -58,16 +58,15 @@
</div>
<script type="text/javascript">
- var moduleParamsCookieName = 'oscadmin_module_' + pageModule;
+ var moduleParamsCookieName = 'oscom_admin_' + pageModule;
+ var dataTablePageSetName = 'page';
var moduleParams = new Object();
- moduleParams.page = 1;
- moduleParams.search = '';
+ moduleParams[dataTablePageSetName] = 1;
+ moduleParams['search'] = '';
if ( $.cookie(moduleParamsCookieName) != null ) {
- var p = $.secureEvalJSON($.cookie(moduleParamsCookieName));
- moduleParams.page = parseInt(p.page);
- moduleParams.search = String(p.search);
+ moduleParams = $.secureEvalJSON($.cookie(moduleParamsCookieName));
}
var dataTableName = 'zoneGroupsDataTable';
Oops, something went wrong.

0 comments on commit 6caf922

Please sign in to comment.