feat: Improve PDF preview with fullscreen button

Changes:
1. Increased PDF preview height
   - Detail panel: 400px → 600px
   - More space for document viewing

2. Added Fullscreen button
   - Opens PDF in full-screen overlay
   - 90vw × 85vh size (almost full screen)
   - Better reading experience

3. Removed sandbox restriction
   - sandbox='allow-same-origin' removed
   - Allows PDF plugins to work correctly
   - Better browser compatibility

4. Layout improvement
   - Fullscreen button at top
   - PDF iframe below
   - Clean vertical layout

Result:
- PDF files display correctly 
- Fullscreen viewing available 
- Works with browser PDF viewer 

Files:
- src/page.html (PDF preview height, fullscreen button, sandbox removed)
This commit is contained in:
Warren
2026-05-17 05:44:32 +08:00
parent 09f0cb7ae9
commit 3cfc5eeb54
3 changed files with 410 additions and 2 deletions

Binary file not shown.

View File

@@ -0,0 +1,403 @@
• GS
• Java
• Tools : JDK 目前以1.6 版本為主(不限平台)
• Lib : mail.jar, activation.jar (與 source 同目錄即可)
• Source : \\10.10.88.1\Evan\handover\GS\GS.111_3.6.4\Java_20151023
• 執行build.bat , 在class目錄下產生所需的檔案
• 每個平台都需要一份Java class
• Mac
• OS:10.6.8
• Tools : XCode 3.2.6
• Lib : 無特殊lib需要安裝
• Source : \\10.10.88.1\Evan\handover\GS\GS.111_3.6.4\MAC\__SourceCode
• Mac for 32bit, Mac_64 for 後續版本
• Method : Open file “DtrGuiSrv01.xcodeproj”
• “Build”->”Clean All Targets” , “Build”->”Build”
• Output : MAC\Build\Release\DtrGuiSrv01 , MAC_64\Build\Release\DtrGuiSrv01_64
• 改版號:MAC\cMain.c , MAC_64\cMain.c
• 改Customer(Accusys , mLogic , Symple) : 在MAC\hInband.h , MAC_64\hInband.h中define ACCUSYS_SIGNATURE, MLOGIC_SIGNATURE , SYMPLE_SIGNATURE
• Windows
• OS : 不要用太舊的就可
• Tools : Visual Studio 2013
• Lib : 無特殊lib需要安裝
• Source : \\10.10.88.1\Evan\handover\GS\GS.111_3.6.4\Windows\__Source (32bit 版本相容64bit)
• Method : Open file “WinGuiSrv.sln” and complied, OK.
• Output : .\Release\WinGuiSrv.exe
• 改版號 : __Source\Src\cMain.cpp , __Source\WinGuiSrv.cpp
• 改Customer(Accusys , mLogic , Symple) : 在src\hInband.h中define ACCUSYS_SIGNATURE, MLOGIC_SIGNATURE , SYMPLE_SIGNATURE
• 新增customer Icon : 圖片位置:__Source\Icon , define在WinGuiSrv.rc
• Linux
• OS : 不限
• Tools : gcc
• Lib : 無特殊lib需要安裝
• Source : \\10.10.88.1\Evan\handover\GS\GS.111_3.6.4\Linux\__SourceCode\Accusys
• Method : Run file “make.sh”, this file will include Makefile.linux, complied OK.
• Output : auto move to “AP_Accusys” directory.
• 改版號 : __SourceCode\Accusys\cMain.c
• 改Customer(Accusys , mLogic , Symple) : __SourceCode\Accusys , __SourceCode\mLogic , __SourceCode\Symple
• Liuux_SW (For SW08 and SW16 內的GS)
• OS : 10.10.8.152 (CROSS complie)
• Source : \\10.10.88.1\Evan\handover\GS\GS.111_3.6.4\Linux_SW\__SourceCode
• Method : make-sw08.sh for SW08, make-sw16.sh for SW16 (ALL)
• Output : AP_SW08, AP_SW16
• GC
• OS : 不限有JDK 1.6就可
• Tools : 目前以1.6 版本為主(不限平台) ; win JDK 1.6 : \\10.10.88.1\Evan\jdk-6u4-windows-i586-p.exe
• Source : \\10.10.88.1\Evan\handover\GC\GC.222_3.6.4\Accusys\RAIDGuardX\src
• Method : Run file “Application\Update.bat”. 須注意Script內的 keytool 動作‧
• Output : .\Application\RAIDGuardX.jar and .\ Application\RAIDGuard X.app\Contents\Resources\Java\RAIDGuardX.jar
• 改版號 : src\Info.txt , Application\RAIDGuard X.app\Contents\Resources\English.lproj\Credits.rtf
• 改Customer(Accusys , mLogic , Symple) : 分別在不同資料夾中 , 差別是PageDataDB.java : getCustomer()和Info.txt
• 新增MAC Icon : 替換Application\RAIDGuard X.app\Contents\Resources\about.icns
• Switch (SW16 V1, V2, V3)
• OS : 10.10.8.152
• Lib : 需安裝Lib(下面會註解)
• Tools : 基本 gcc and make
• Source : (V1~V3 差異點 : 分散在各自子目錄內,檔案格式有多種,須注意)
• V1 : \\10.10.8.152\root\Project\Evan\web_GUI\source\SW16\2.14\ACS
• V2 : \\10.10.8.152\root\Project\Evan\web_GUI\source\SW16\2.14\ACS_V2
• V3 : \\10.10.8.152\root\Project\Evan\web_GUI\source\SW16\2.14\ACS_V3
• ProStor : \\10.10.8.152\root\Project\Evan\web_GUI\source\SW16\2.14\ProStor
• mLogic : \\10.10.8.152\root\Project\Evan\web_GUI\source\SW16\2.14\mLogic
• 流程請參考 3.6~3.11
• Directory and files
• Generic/src: source file
• Generic/src/bin: Web GUI build directory
• Build Procedure
• Goto Generic/src
• execute make clean
• execute make
• the WebGUI binary will in Generic/src/bin
• The binary file format is as following
• entry.cgiraid.cgi
• copy *. cgi to Switchs web servers folder : home/httpd/htdocs/cgi-bin
• Note
• Lib Source : \\10.10.8.152\root\Project\Evan\web_GUI\source\SW16\LIB_INCLUDE, please reference “Memo.txt” in the folder.
• Need set include and lib folder at working host.Check Makefiles variable : LIBS
• Check Makefiles variable : INCLUDESCheck Makefiles variable : CCThe compiler must have the library and the header file : libdomc, libgui, libmba, lexpat
GC Sample :
新增廠商 需要的資料Ctrl-SymplyWorkspace.png , Ctrl-SymplyWorkspace_S.png , about_Symply.png, Symply.icns, help.zip, Symply.ico
        GC : Ctrl-SymplyWorkspace.png , Ctrl-SymplyWorkspace_S.png , about_Symply.png
                放在RAIDGuardX\src\raidguard_x\rs1
        GC MAC icon : Symply.icns
                改名about.icns , 放在Application\RAIDGuard X.app\Contents\Resources\
        GC help page : help.zip
                解壓縮放在Application\Help
        GS Windows icon : Symply.ico
                放在Windows\__Source\Icon
參考修正.java code
1. PageDataDB.java : update icon and path
2. dlgServer.java : 增加 add controler 視窗圖示(小圖 Ctrl-Symply_SymplyWorkspace_S.png)
From function "public void CtrlRefresh()"
3. imgCtrl_Symply_SymplyWorkspace : 修改大圖
4. dlgAboutBox.java: about 圖
From function: "private void jbInit() throws Exception"
1. PageDataDB.java : 更改Vender
public static enum CUSTOMER
{
Accusys,mLogic,Symply
}
public static CUSTOMER getCustomer()
{
// 0x01 : Accusys
// 0x02 : mLogic
// 0x03 : Symply
return CUSTOMER.Accusys;
}
PT: Product Type.
    Value      Product
   ---------------------------
0             undefined (old firmware)
1             A08S3-PS
2             A08S3-TS
3             B08S3-PS
4             A12S2-PS
5             A16S2-PS
6             A08S4-PS
7             A08S4-PS+
8             A12S3-PS
9             A12S3-PS+
10         A16S3-PS
11         Gamma 8
12         Gamma 8+
13         Gamma 12
14         Gamma 12+
15         A12T2-Share
16         A16T2-Share
17         A12T3-Share
18         A16T3-Share
19         A12T3-Share+
20        mSpeed PRO      /  Gamma LTO   
21        mSpeed PRO+   /    Gamma LTO  
22        MAX24           (R50) 
23        MAX32          (R50)
       24      ExaSAN LTO      (PCIe)
         
 
 
VT: Vendor Type
0            undefined (old firmware)
1             Accusys Standard(include ProSTOR and Actidata )
2             mLogic
       3     Symply 
Table 4.1: Page 0, Controller Information Page.
 
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
000
Production-ID
010
Model Name
020
Serial Number
030
Capability
WB
HCN
DCN
SN
MEM Size
BPR
RDY
LOG
BA
040
System Code Firmware Version No.
050
DC
DCS
Reg
Che
AAT
SD
LunM
Rev
DPge
RS
SW
NCQ
EQM
SM1
SM2
BP
060
PLS
PLL
EQL
SANL
SS
RT
RSN
 
PN
RE
BN
FD1
FD2
FD3
DS
070
Controller Nickname
080
LUN0Map
LUN1Map
LUN2Map
LUN3Map
LUN4Map
LUN5Map
LUN6Map
LUN7Map
090
LUN8Map
LUN9Map
LUN10Map
LUN11Map
LUN12Map
LUN13Map
LUN14Map
LUN15Map
0A0
LUN16Map
LUN17Map
LUN18Map
LUN19Map
LUN20Map
LUN21Map
LUN22Map
LUN23Map
0B0
LUN24Map
LUN25Map
LUN26Map
LUN27Map
LUN28Map
LUN29Map
LUN30Map
LUN31Map
0C0
LUN32Map
LUN33Map
LUN34Map
LUN35Map
LUN36Map
LUN37Map
LUN38Map
LUN39Map
0D0
LUN40Map
LUN41Map
LUN42Map
LUN43Map
LUN44Map
LUN45Map
LUN46Map
LUN47Map
0E0
LUN48Map
LUN49Map
LUN50Map
LUN51Map
LUN52Map
LUN53Map
LUN54Map
LUN55Map
0F0
LUN56Map
LUN57Map
LUN58Map
LUN59Map
LUN60Map
LUN61Map
LUN62Map
LUN63Map
100
HistroyIndexBegin
HistroyIndexEnd
PT
VT
Reserved
110
LS1 ~ LS16
120
LS17 ~ LS20
 
130
Reserved
140
Serial Number 19 (SN19)
150
SN19
 
160
Chassis Serial Number
170
Chassis SN
  Reserved
180
Boot Code Firmware Version No.
190
EFI Firmware Version No.
1A0
BIOS Firmware Version No.
1B0
Expander Firmware Version No.
1C0
Reserved
1D0
Reserved
1E0
E1ID
E1BN
E2ID
E2BN
E3ID
E3BN
E4ID
E4BN
E5ID
E5BN
E6ID
E6BN
E7ID
E7BN
E8ID
E8BN
1F0
Reserved
PS. GC build 可能會遇到keytool 重新登記問題
C:\Users\accusys\Desktop\ GS.111_3.6.4\Accusys\Application>keytool -genkey -keyalg rsa -alias Accusys
輸入 keystore 密碼:
重新輸入新密碼:
您的名字與姓氏為何?
[Unknown] Accusys
您的編制單位名稱為何?
[Unknown] RD
您的組織名稱為何?
[Unknown] accusys
您所在的城市或地區名稱為何?
[Unknown] taiwan
您所在的州及省份名稱為何?
[Unknown] taiwan
該單位的二字國碼為何
[Unknown] tw
CN=Accusys, OU=RD, O=accusys, L=taiwan, ST=taiwan, C=tw 正確嗎?
[否] 是 (使用中文)
輸入 <Accusys> 的主密碼
RETURN 如果和 keystore 密碼相同):
重新輸入新密碼:
C:\Users\accusys\Desktop\GS.111_3.6.4\Accusys\Application>Keytool -export -alias Accusys -file RAIDGuardX.crt
輸入 keystore 密碼:
認證儲存在檔案 <RAIDGuardX.crt>
C:\Users\accusys\Desktop\GS.111_3.6.4\Accusys\Application>jarsigner RAIDGuardX.jar Accusys
Enter Passphrase for keystore:
Warning:
The signer certificate will expire within six months.
C:\Users\accusys\Desktop\GS.111_3.6.4\Accusys\Application>cd ..\
C:\Users\accusys\Desktop\GS.111_3.6.4\Accusys>copy ".\Application\RAIDGuardX.jar" ".\Application\RAIDGuard X.app\Contents\Resources\Java"
複製了 1 個檔案。
C:\Users\accusys\Desktop\GS.111_3.6.4\Accusys>

View File

@@ -794,7 +794,12 @@ function showDetail(fuuid){
}else if(isDocImg){
h+="<img id=mb-preview-img src='"+src+"' style='max-width:100%;max-height:400px;border-radius:8px' onerror=\"this.onerror=null;this.alt='No preview'\">";
}else if(isDocPdf){
h+="<iframe sandbox='allow-same-origin' src='"+src+"' style='width:100%;height:400px;border:none;border-radius:8px;background:#fff'></iframe>";
h+="<div style='display:flex;flex-direction:column;width:100%'>";
h+="<div style='margin-bottom:8px'>";
h+="<button onclick=quickPreview('"+fuuid+"') style='background:#3b82f6;color:#fff;border:none;padding:6px 12px;border-radius:6px;cursor:pointer;font-size:14px'>Fullscreen 📺</button>";
h+="</div>";
h+="<iframe src='"+src+"' style='width:100%;height:600px;border:none;border-radius:8px;background:#fff'></iframe>";
h+="</div>";
}else{
h+="<div style='display:flex;flex-direction:column;align-items:center;width:100%'>";
h+="<div style='display:flex;gap:8px;margin-bottom:8px'>";
@@ -1103,7 +1108,7 @@ function quickPreview(fuuid){
}else if(isDocImg){
inner="<img src='"+src+"' style='max-width:90vw;max-height:85vh;border-radius:8px' onerror=\"this.onerror=null;this.alt='No preview'\">";
}else if(isDocPdf){
inner="<iframe sandbox='allow-same-origin' src='"+src+"' style='width:90vw;height:85vh;border:none;border-radius:8px;background:#fff'></iframe>";
inner="<iframe src='"+src+"' style='width:90vw;height:85vh;border:none;border-radius:8px;background:#fff'></iframe>";
}else{
inner="<img src='"+src+"' style='max-width:90vw;max-height:85vh;min-height:100px;min-width:100px;border-radius:8px' onerror=\"this.onerror=null;this.alt='No preview'\">";
}