/// <reference path="~/Scripts/_references.js" />

function KB_Create() {
    LoadWHSIWYG();
}

function KB_Edit(modelID) {
    LoadWHSIWYG();
    Generic_List_LoadDataTable("ListKbCommentDataTable", 0, 3, "KB", "", "Delete", "ListComment/" + modelID, false, false, false, null, false, false, null, null);
}


function KB_List() {
    Generic_List_LoadDataTable("ListKbDataTable", 0, 2, "KB", "Edit", "Delete", "List", true, true, false, null, true, true, null, null);
}


function LoadWHSIWYG()
{
    tinymce.init({
        height: 400,
        mode: "exact",
        elements: "Description",
        theme: "modern",
        valid_children: "+body[style]",
        convert_urls: false,
        plugins: [
            "advlist autolink lists link image charmap print preview hr anchor pagebreak fullpage",
            "searchreplace wordcount visualblocks visualchars code fullscreen",
            "insertdatetime media nonbreaking save table contextmenu directionality",
            "emoticons template paste textcolor colorpicker textpattern imagetools"
        ],
        toolbar1: "insertfile undo redo | styleselect | sizeselect fontselect fontsizeselect bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print | forecolor backcolor",

    });
}