Jam.py documentation

safe_mode

safe_mode

domain: client

language: javascript

class Task

Description

Check the safe_mode attribute to determine if the safe mode parameter of the project is set.

Example

function on_page_loaded(task) {

    $("#title").html(task.item_caption);
    if (task.safe_mode) {
        $("#user-info").text(task.user_info.role_name + ' ' + task.user_info.user_name);
        $('#log-out')
        .show()
        .click(function(e) {
            e.preventDefault();
            task.logout();
        });
    }

    task.tasks.view($("#content"));
}