/**
 * 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) {
    $(elmentId).load("operation-select.html", function() {
        OperationSelect.init();
        I18N.initi18n();
    }); 
}


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