/// <reference path="jquery-1.10.2.min.js" />
var editor;
$(function () {
    editor = CKEDITOR.replace('Workbody',
{
    filebrowserImageUploadUrl: "/ajax/Admin_AjaxUpImage.ashx?cmd=uploadImage"
});
    $("#Work_btn").click(function (e) {
        e.preventDefault();
        var order = $.trim($("#order").val());
        var text = editor.getData();
        if (text == "") {
            alert("工单回复内容不能为空");
            return;
        } else {
            $.post("/ajax/Admin_WorkBase.ashx", { "type": "WorkType", "order": order, "text": text }, function (data) {
                var data = eval('(' + data + ')');
                if (data.Success = true) {
                    alert("回复成功");
                    location.reload();
                } else {
                    alert("回复失败");
                    return;
                }
            })

        }

    })
})