* upgrade: fix js error on click btn to loadCurrentPage.
This commit is contained in:
@@ -48,7 +48,7 @@ div
|
||||
setClass('text-center'),
|
||||
btn
|
||||
(
|
||||
on::click('loadCurrentPage'),
|
||||
on::click('loadCurrentPage()'),
|
||||
set::type('primary'),
|
||||
setClass('px-10'),
|
||||
$lang->refresh
|
||||
|
||||
@@ -87,7 +87,7 @@ div
|
||||
$lang->upgrade->moveEXTFileFail,
|
||||
btn
|
||||
(
|
||||
on::click('loadCurrentPage'),
|
||||
on::click('loadCurrentPage()'),
|
||||
setClass('px-6 ml-4'),
|
||||
set::text($lang->refresh)
|
||||
)
|
||||
|
||||
@@ -897,6 +897,11 @@
|
||||
|
||||
function loadCurrentPage(options)
|
||||
{
|
||||
if(options instanceof Event || options instanceof HTMLElement)
|
||||
{
|
||||
options = {};
|
||||
if(DEBUG) console.warn('[APP] ', 'loadCurrentPage() should not be called with an event or element.');
|
||||
}
|
||||
if(typeof options === 'string') options = {selector: options};
|
||||
return loadPage(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user