206 lines
12 KiB
Plaintext
206 lines
12 KiB
Plaintext
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PdfBookView.aspx.cs" Inherits="FineUIPro.Web.HSSE.PDFDOC.PdfBookView" ValidateRequest="false" %>
|
||
|
|
|
||
|
|
<!DOCTYPE html>
|
||
|
|
|
||
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
|
<head runat="server">
|
||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
|
<title>PDF 书籍阅读</title>
|
||
|
|
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||
|
|
<style type="text/css">
|
||
|
|
/* ============ PdfBookView 页面局部样式(pdfb- 前缀,仅本页生效) ============ */
|
||
|
|
|
||
|
|
/* 本页为全幅框架布局,去掉 common.css 的 body 15px 内边距 */
|
||
|
|
body.f-body { padding: 0; }
|
||
|
|
|
||
|
|
/* ---- 顶部标题栏 ---- */
|
||
|
|
.pdfb-topbar .f-panel-body { background: transparent !important; }
|
||
|
|
.pdfb-hero {
|
||
|
|
display: flex; align-items: center; height: 100%; box-sizing: border-box;
|
||
|
|
padding: 0 20px 0 18px;
|
||
|
|
background: linear-gradient(115deg, #143d59 0%, #1f5f8b 55%, #2e86ab 100%);
|
||
|
|
box-shadow: inset 0 -1px 0 rgba(255,255,255,.12), 0 2px 6px rgba(16, 42, 67, .35);
|
||
|
|
}
|
||
|
|
.pdfb-hero-mark {
|
||
|
|
flex: none; width: 38px; height: 38px; margin-right: 12px;
|
||
|
|
display: flex; align-items: center; justify-content: center;
|
||
|
|
background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
|
||
|
|
border-radius: 9px;
|
||
|
|
}
|
||
|
|
.pdfb-hero-mark svg { width: 22px; height: 22px; fill: #ffffff; display: block; }
|
||
|
|
.pdfb-hero-text { flex: 1 1 auto; min-width: 0; }
|
||
|
|
.pdfb-hero-title {
|
||
|
|
font-size: 17px; font-weight: 600; color: #ffffff; letter-spacing: 1px;
|
||
|
|
text-shadow: 0 1px 2px rgba(0,0,0,.25);
|
||
|
|
}
|
||
|
|
.pdfb-hero-sub { margin-top: 3px; font-size: 12px; color: rgba(255,255,255,.78); letter-spacing: .5px; }
|
||
|
|
.pdfb-hero-tip {
|
||
|
|
flex: none; margin-left: 16px; padding: 5px 12px;
|
||
|
|
font-size: 12px; color: #d8ecf8;
|
||
|
|
border: 1px dashed rgba(255,255,255,.35); border-radius: 12px;
|
||
|
|
background: rgba(255,255,255,.07);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* ---- 左栏目录 ---- */
|
||
|
|
.pdfb-left .f-panel-header .f-panel-title-text { font-weight: 600; }
|
||
|
|
.pdfb-tree .f-tree-bodyct { padding: 3px 0 8px 0; }
|
||
|
|
|
||
|
|
/* ---- 中部内容区:纯白画布,编辑器与下方留白同色 ---- */
|
||
|
|
.pdfb-center { background: #ffffff; }
|
||
|
|
.pdfb-center .f-panel-body,
|
||
|
|
.pdfb-center .f-field-htmleditor-wrap { background: #ffffff !important; }
|
||
|
|
.pdfb-status { color: #6b7f93; font-size: 12px; }
|
||
|
|
|
||
|
|
/* 主操作按钮(保存内容)强调色 */
|
||
|
|
a.pdfb-btn-primary, .pdfb-btn-primary {
|
||
|
|
background: linear-gradient(#33739c, #22557a) !important;
|
||
|
|
border: 1px solid #1b4562 !important;
|
||
|
|
}
|
||
|
|
.pdfb-btn-primary .f-btn-text { color: #ffffff !important; }
|
||
|
|
.pdfb-btn-primary:hover { background: linear-gradient(#3c82b0, #28618c) !important; }
|
||
|
|
.pdfb-btn-primary .f-btn-icon { color: #ffffff !important; }
|
||
|
|
|
||
|
|
/* 树节点行高与悬停(若类名匹配则生效,不匹配自动忽略) */
|
||
|
|
.pdfb-tree .f-tree-row td { padding-top: 3px; padding-bottom: 3px; }
|
||
|
|
.pdfb-tree .f-tree-row:hover > td { background: #e3f1fa !important; }
|
||
|
|
|
||
|
|
/* ---- 弹窗 ---- */
|
||
|
|
.pdfb-window .f-panel-body { padding-top: 6px; }
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<form id="form1" runat="server">
|
||
|
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||
|
|
<f:HiddenField ID="hfCurrentChapterId" runat="server"></f:HiddenField>
|
||
|
|
<f:HiddenField ID="hfEditChapterId" runat="server"></f:HiddenField>
|
||
|
|
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||
|
|
<Items>
|
||
|
|
<%-- 左栏:书籍选择 + 目录树 --%>
|
||
|
|
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||
|
|
EnableCollapse="true" Width="300" Title="书籍目录" TitleToolTip="书籍目录(多级章节)"
|
||
|
|
IconFont="Book" CssClass="pdfb-left"
|
||
|
|
ShowBorder="true" ShowHeader="true" AutoScroll="true" BodyPadding="0px">
|
||
|
|
<Toolbars>
|
||
|
|
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||
|
|
<Items>
|
||
|
|
<f:DropDownList ID="drpBook" runat="server" Label="书籍" LabelWidth="60px" Width="200px"
|
||
|
|
EnableEdit="false" AutoPostBack="true" OnSelectedIndexChanged="drpBook_SelectedIndexChanged">
|
||
|
|
</f:DropDownList>
|
||
|
|
<f:Button ID="btnAddBook" runat="server" Text="新增" IconFont="PlusCircle" ToolTip="手动新增一本书籍"
|
||
|
|
OnClick="btnAddBook_Click">
|
||
|
|
</f:Button>
|
||
|
|
</Items>
|
||
|
|
</f:Toolbar>
|
||
|
|
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
||
|
|
<Items>
|
||
|
|
<f:Button ID="btnAddChapter" runat="server" Text="新增章节" IconFont="PlusCircle"
|
||
|
|
ToolTip="在选中节点下新增章节(未选中则为顶级)" OnClick="btnAddChapter_Click">
|
||
|
|
</f:Button>
|
||
|
|
<f:Button ID="btnEditChapter" runat="server" Text="编辑" IconFont="Pencil"
|
||
|
|
ToolTip="修改选中章节名称" OnClick="btnEditChapter_Click">
|
||
|
|
</f:Button>
|
||
|
|
<f:Button ID="btnDelChapter" runat="server" Text="删除" IconFont="TrashO"
|
||
|
|
ToolTip="删除选中章节及其子章节" ConfirmText="将删除选中章节及其全部子章节,确定删除?"
|
||
|
|
ConfirmTarget="Top" OnClick="btnDelChapter_Click">
|
||
|
|
</f:Button>
|
||
|
|
</Items>
|
||
|
|
</f:Toolbar>
|
||
|
|
</Toolbars>
|
||
|
|
<Items>
|
||
|
|
<f:Tree ID="trCatalog" EnableCollapse="true" ShowHeader="false" EnableIcons="true"
|
||
|
|
AutoLeafIdentification="true" OnNodeCommand="trCatalog_NodeCommand" runat="server"
|
||
|
|
CssClass="pdfb-tree">
|
||
|
|
</f:Tree>
|
||
|
|
</Items>
|
||
|
|
</f:Panel>
|
||
|
|
<%-- 中部:章节内容编辑 --%>
|
||
|
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="false"
|
||
|
|
Layout="Fit" ShowHeader="false" CssClass="pdfb-center" BodyPadding="10px" AutoScroll="true">
|
||
|
|
<Toolbars>
|
||
|
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||
|
|
<Items>
|
||
|
|
<f:Button ID="btnSaveContent" runat="server" Text="保存内容" IconFont="Save" CssClass="pdfb-btn-primary"
|
||
|
|
ToolTip="保存当前章节的富文本内容(文字+图片)" OnClick="btnSaveContent_Click">
|
||
|
|
</f:Button>
|
||
|
|
<f:ToolbarFill ID="ToolbarFill2" runat="server"></f:ToolbarFill>
|
||
|
|
<f:Label ID="lblProgress" runat="server" Text="" CssClass="pdfb-status">
|
||
|
|
</f:Label>
|
||
|
|
</Items>
|
||
|
|
</f:Toolbar>
|
||
|
|
</Toolbars>
|
||
|
|
<Items>
|
||
|
|
<f:HtmlEditor ID="htmlContent" runat="server" ShowLabel="false" Editor="UMEditor"
|
||
|
|
BasePath="~/res/umeditor/" ToolbarSet="Full" LabelAlign="Right" Height="780">
|
||
|
|
</f:HtmlEditor>
|
||
|
|
</Items>
|
||
|
|
</f:Panel>
|
||
|
|
</Items>
|
||
|
|
</f:Panel>
|
||
|
|
<f:Window ID="WindowBook" Title="新增书籍" Icon="BookAdd" Hidden="true" IsModal="true" EnableMaximize="false"
|
||
|
|
Target="Parent" Width="440px" Height="190px" CssClass="pdfb-window" runat="server">
|
||
|
|
<Items>
|
||
|
|
<f:Form ID="formBook" ShowBorder="false" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
|
||
|
|
LabelAlign="Right" runat="server">
|
||
|
|
<Rows>
|
||
|
|
<f:FormRow>
|
||
|
|
<Items>
|
||
|
|
<f:TextBox ID="txtBookTitle" runat="server" Label="书名" Width="340px" MaxLength="200"
|
||
|
|
EmptyText="请输入书名" ShowRedStar="true" Required="true">
|
||
|
|
</f:TextBox>
|
||
|
|
</Items>
|
||
|
|
</f:FormRow>
|
||
|
|
</Rows>
|
||
|
|
<Toolbars>
|
||
|
|
<f:Toolbar ID="ToolbarBook" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||
|
|
<Items>
|
||
|
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||
|
|
<f:Button ID="btnSaveBook" Icon="SystemSave" Text="保存" runat="server" ValidateForms="formBook"
|
||
|
|
OnClick="btnSaveBook_Click">
|
||
|
|
</f:Button>
|
||
|
|
<f:Button ID="btnCloseBook" Icon="SystemClose" Text="关闭" runat="server" OnClick="btnCloseBook_Click">
|
||
|
|
</f:Button>
|
||
|
|
</Items>
|
||
|
|
</f:Toolbar>
|
||
|
|
</Toolbars>
|
||
|
|
</f:Form>
|
||
|
|
</Items>
|
||
|
|
</f:Window>
|
||
|
|
<f:Window ID="WindowChapter" Title="新增章节" Icon="Bookmark" Hidden="true" IsModal="true" EnableMaximize="false"
|
||
|
|
Target="Parent" Width="440px" Height="210px" CssClass="pdfb-window" runat="server">
|
||
|
|
<Items>
|
||
|
|
<f:Form ID="formChapter" ShowBorder="false" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
|
||
|
|
LabelAlign="Right" runat="server">
|
||
|
|
<Rows>
|
||
|
|
<f:FormRow>
|
||
|
|
<Items>
|
||
|
|
<f:TextBox ID="txtChapterTitle" runat="server" Label="章节名称" Width="340px" MaxLength="200"
|
||
|
|
EmptyText="请输入章节名称" ShowRedStar="true" Required="true">
|
||
|
|
</f:TextBox>
|
||
|
|
</Items>
|
||
|
|
</f:FormRow>
|
||
|
|
<f:FormRow>
|
||
|
|
<Items>
|
||
|
|
<f:Label ID="lblParentChapter" runat="server" Label="位置" Text="顶级章节">
|
||
|
|
</f:Label>
|
||
|
|
</Items>
|
||
|
|
</f:FormRow>
|
||
|
|
</Rows>
|
||
|
|
<Toolbars>
|
||
|
|
<f:Toolbar ID="ToolbarChapter" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||
|
|
<Items>
|
||
|
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||
|
|
<f:Button ID="btnSaveChapter" Icon="SystemSave" Text="保存" runat="server" ValidateForms="formChapter"
|
||
|
|
OnClick="btnSaveChapter_Click">
|
||
|
|
</f:Button>
|
||
|
|
<f:Button ID="btnCloseChapter" Icon="SystemClose" Text="关闭" runat="server" OnClick="btnCloseChapter_Click">
|
||
|
|
</f:Button>
|
||
|
|
</Items>
|
||
|
|
</f:Toolbar>
|
||
|
|
</Toolbars>
|
||
|
|
</f:Form>
|
||
|
|
</Items>
|
||
|
|
</f:Window>
|
||
|
|
</form>
|
||
|
|
</body>
|
||
|
|
</html>
|