<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Wf_Add.aspx.cs" Inherits="TotCms.Web.Office.Wf.Wf_Add" ValidateRequest="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>发起流程</title>
    <link href="../style/global.css" rel="stylesheet" type="text/css" />
    <link href="../../swfupload/swfupload.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/common.js"></script>
    <script src="../../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../ckeditor/ckeditor.js" type="text/javascript"></script> 
    <script src="../../swfupload/swfupload.js" type="text/javascript"></script>
    <script src="js/handlers.js" type="text/javascript"></script>
    <script type="text/javascript">
    var swfu;
    window.onload = function () {
      //swf upload
      swfu = new SWFUpload({
        // Backend Settings
        upload_url: "../Upload/UploadFiles.aspx",
        post_params: {
          "ASPSESSID": "<%=Session.SessionID %>"
        },

        // File Upload Settings
        file_size_limit: "200 MB",
        file_types: "*.*",
        file_types_description: "files",
        file_upload_limit: "0",    // Zero means unlimited

        // Event Handler Settings - these functions as defined in Handlers.js
        //  The handlers are not part of SWFUpload but are part of my website and control how
        //  my website reacts to the SWFUpload events.
        file_queue_error_handler: fileQueueError,
        file_dialog_complete_handler: fileDialogComplete,
        upload_progress_handler: uploadProgress,
        upload_error_handler: uploadError,
        upload_success_handler: uploadSuccess,
        upload_complete_handler: uploadComplete,

        // Button settings
        button_image_url: "../Upload/Images/XPButtonUploadText_61x22.png",
        button_placeholder_id: "spanButtonPlaceholder",
        button_width: 61,
        button_height: 22,
        button_text: '<span class="button"></span>',
        button_text_style: '.button { font-family: 宋体; font-size: 14px; } .buttonSmall { font-size: 12px; }',
        button_text_top_padding: 1,
        button_text_left_padding: 5,

        // Flash Settings
        flash_url: "../../swfupload/swfupload.swf", // Relative to this file

        custom_settings: {
          upload_target: "divFileProgressContainer",
          upload_returnobjid: "tbAttachment"
        },

        // Debug Settings
        debug: false
      });
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table style="width:100%;" border="0" cellpadding="0" cellspacing="1" 
      class="border">
      <tr class="suphead">
        <td colspan="2">发起流程
        </td>
    </tr>
    <tr>
      <td class="fields_text">
          选择流程类别：</td>
      <td class="fields_input">
        <asp:DropDownList ID="ddFlowId" runat="server">
        </asp:DropDownList>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          标题：</td>
      <td class="fields_input">
        <asp:TextBox ID="tbTitle" runat="server" CssClass="input_middle"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
          ControlToValidate="tbTitle" ErrorMessage="标题不能为空" SetFocusOnError="True"></asp:RequiredFieldValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          内容：</td>
      <td class="fields_input">
      <asp:TextBox ID="Content" runat="server" TextMode="MultiLine"></asp:TextBox>
          <script type="text/javascript">
		      //<![CDATA[
            // Replace the <textarea id="Content"> with an CKEditor instance.
            var editor = CKEDITOR.replace('Content',
			      {
			        filebrowserBrowseUrl: '../../ckfinder/ckfinder.html', //启用浏览功能
			        filebrowserImageBrowseUrl: '../../ckfinder/ckfinder.html?Type=Images',
			        filebrowserFlashBrowseUrl: '../../ckfinder/ckfinder.html?Type=Flash',
			        filebrowserUploadUrl: '../../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
			        filebrowserImageUploadUrl: '../../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
			        filebrowserFlashUploadUrl: '../../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
			      }
            );
		      //]]>
		      </script>
      </td>
    </tr>
    <tr>
      <td class="fields_text">
          附件：</td>
      <td class="fields_input">     
      <div id="swfu_container" style="margin: 0px 0px;">
        <asp:TextBox ID="tbAttachment" runat="server" CssClass="input_middle"></asp:TextBox>
        <span id="spanButtonPlaceholder"></span>
        <div id="divFileProgressContainer"></div>
      </div>      
      </td>
    </tr>
    
    <tr>
      <td colspan="2" align="center">
        <asp:Button ID="Button1" runat="server" Text="确定" onclick="Button1_Click" />
        <input id="Button2" type="reset" value="取 消" onclick="javascript:history.back();" /></td>
    </tr>
  </table>
    </form>
</body>
</html>
