N°4400 - Move inline JS functions to corresponding JS file

This commit is contained in:
Molkobain
2021-10-25 19:51:07 +02:00
parent 5540988001
commit 32dae59b9b

View File

@@ -24,6 +24,13 @@ function ShowAboutBox()
});
return false;
}
function ShowDebug()
{
if ($('#rawOutput > div').html() != '')
{
$('#rawOutput').dialog( {autoOpen: true, modal:false, width: '80%'});
}
}
function ArchiveMode(bEnable)
{
var sPrevUrl = StripArchiveArgument(window.location.search);
@@ -41,6 +48,31 @@ function StripArchiveArgument(sUrl)
var res = sUrl.replace(/&with-archive=[01]/g, '');
return res;
}
function goBack()
{
window.history.back();
}
function BackToDetails(sClass, id, sDefaultUrl, sOwnershipToken)
{
window.bInCancel = true;
if (id > 0)
{
sToken = '';
if (sOwnershipToken != undefined)
{
sToken = '&token='+sOwnershipToken;
}
window.location.href = AddAppContext(GetAbsoluteUrlAppRoot()+'pages/UI.php?operation=release_lock_and_details&class='+sClass+'&id='+id+sToken);
}
else
{
window.location.href = sDefaultUrl; // Already contains the context...
}
}
function BackToList(sClass)
{
window.location.href = AddAppContext(GetAbsoluteUrlAppRoot()+'pages/UI.php?operation=search_oql&oql_class='+sClass+'&oql_clause=WHERE id=0');
}
/**
* A toolbox for common JS operations in the backoffice. Meant to be used by Combodo developers and the community.