Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

render_delete_dialog_JS()

Description

Render JavaScript for the dashboard tile delete dialog.

This function outputs JavaScript to create and display a jQuery UI dialog for deleting dashboard tiles.
Depending on the `$all_users` parameter, the dialog may include additional options for deleting default tiles
or managing default dashboard tiles.

accessible by all users. Default is `false`.

Parameters

ColumnTypeDefaultDescription
$all_users bool false (optional) If set to `true`, additional options are displayed for managing tiles that are

Return

void Outputs JavaScript directly to the page to render the dialog.

Location

include/dash_functions.php lines 1419 to 1440

Definition

 
function render_delete_dialog_JS($all_users=false)
    {
    global 
$baseurl$lang;
    
?>
    jQuery("#trash_bin_delete_dialog").dialog({
        title:' echo escape($lang["dashtiledelete"]); ?>',
        autoOpen: true,
        modal: true,
        resizable: false,
        dialogClass: 'delete-dialog no-close',
        buttons: {
            " echo escape($lang['confirmdashtiledelete']); ?>": function() {deleteDashTile(usertileid); jQuery(this).dialog( "close" );},
             if($all_users){
            
?>
            " echo escape($lang['confirmdefaultdashtiledelete']); ?>": function() {deleteDefaultDashTile(tileid,usertileid); jQuery(this).dialog( "close" );},
            " echo escape($lang['managedefaultdash']); ?>": function() {window.location = " echo $baseurl?>/pages/team/team_dash_tile.php"; return false;},
             ?>
            " echo escape($lang['cancel']); ?>":  function() { jQuery(this).dialog('close'); }
        }
    });
    
    
}

This article was last updated 4th December 2024 08:35 Europe/London time based on the source file dated 13th November 2024 15:50 Europe/London time.