mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
Protect the initialization with a try ... catch, in order to protect that rest of the page in case of trouble.
SVN:2.0.1[3076]
This commit is contained in:
@@ -440,6 +440,8 @@ function sprintf(format, etc) {
|
||||
|
||||
return this.each(function() {
|
||||
|
||||
try
|
||||
{
|
||||
config = $.extend(this.config, $.tablesorterPager.defaults, settings);
|
||||
|
||||
var table = this, pager = config.container;
|
||||
@@ -447,6 +449,7 @@ function sprintf(format, etc) {
|
||||
this.ajax_request = null;
|
||||
|
||||
config.selectedSize = parseInt($(".pagesize",pager).val());
|
||||
|
||||
setPageSize(table,config.selectedSize, false);
|
||||
restoreParams(table, config);
|
||||
|
||||
@@ -491,6 +494,14 @@ function sprintf(format, etc) {
|
||||
$(table).bind('check_all', function() {
|
||||
checkAll(table, pager, true);
|
||||
});
|
||||
}
|
||||
catch(err)
|
||||
{
|
||||
if (console && console.log)
|
||||
{
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user