mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 05:28:44 +02:00
Protect the initialization with a try ... catch, in order to protect that rest of the page in case of trouble.
SVN:trunk[3074]
This commit is contained in:
@@ -449,6 +449,8 @@ function sprintf(format, etc) {
|
||||
|
||||
return this.each(function() {
|
||||
|
||||
try
|
||||
{
|
||||
config = $.extend(this.config, $.tablesorterPager.defaults, settings);
|
||||
|
||||
var table = this, pager = config.container;
|
||||
@@ -456,6 +458,7 @@ function sprintf(format, etc) {
|
||||
this.ajax_request = null;
|
||||
|
||||
config.selectedSize = parseInt($(".pagesize",pager).val());
|
||||
|
||||
setPageSize(table,config.selectedSize, false);
|
||||
restoreParams(table, config);
|
||||
|
||||
@@ -500,6 +503,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