/**
 * template js 
 * @since cms:1.4.3.2&1.4.3.3 web:1.0
 */
var TEMPLATE = {};

/** template load header */
TEMPLATE.loadHearder = function(elmentId) {
    $(elmentId).load("../common/header.html" , function() {
        I18N.initi18n();
    }); 
}

/**
 * template load dashboard setting 
 * @param {string} elmentId - element to load setting html
 * @param {*} changeCallback - callback when setting changed
 */
TEMPLATE.loadDashboardSetting = function(elmentId, changeCallback) {
    $(elmentId).load("dashboard-setting.html", function() {
        DashboardSetting.init(changeCallback);
        I18N.initi18n();
    }); 
}

/** Template load confirm model */
TEMPLATE.loadConfirmModal = function(elmentId) {
    $(elmentId).load("../common/confirm-modal.html", function() {
        I18N.initi18n();
    }); 
}

/** Template load operation select */
TEMPLATE.loadOperationSelect = function(elmentId, selectCallback) {
    $(elmentId).load("operation-select.html", function() {
        OperationSelect.init(selectCallback);
        I18N.initi18n();
    }); 
}

/** Template load display menu */
TEMPLATE.loadDisplaymenu = function(elmentId) {
    $(elmentId).load("display-menu.html", function() {
        I18N.initi18n();
    }); 
}

/**
 * show confirm model
 */
 TEMPLATE.showModalConfirm = function () {
    $("#showConfirm").click(function(){
        $("#confirm-modal").modal();
    });
};

/** Template load notification content*/
TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
    $(elmentId).load("notification-content.html", function() {
        NotificationSelect.init(selectCallback);
        I18N.initi18n();
    }); 
}
