1+ <!DOCTYPE html>
2+ < html >
3+
4+ < head >
5+ < meta charset ="utf-8 " />
6+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge " />
7+ < title > SpreadJS Designer</ title >
8+ < link href ="./SpreadJS/css/gc.spread.sheets.excel2013white.css " rel ="stylesheet " type ="text/css " />
9+ < link href ="./ui/ribbon/lib/css/gc.spread.sheets.designer.min.css " rel ="stylesheet " type ="text/css ">
10+ < link href ="./ui/ribbon/custom.css " rel ="stylesheet " type ="text/css ">
11+ </ head >
12+
13+ < body unselectable ="on ">
14+ < div class ="loading-placeholder background-mask-layer "> </ div >
15+ < span class ="loading-placeholder loading-pic "> </ span >
16+ < div id ="gc-designer-container "> </ div >
17+
18+ <!-- run sources -->
19+ < script src ="./scripts/getTimezoneOffset.js "> </ script >
20+ ___SPREAD_JS_INCLUDES___
21+ <!-- -->
22+
23+ <!-- Load localized resource file -->
24+ < script type ="application/javascript "
25+ src ="./___LOCALIZATION___.lproj/gc.spread.sheets.resources.___LOCALIZATION___.min.js "> </ script >
26+ < script type ="application/javascript "
27+ src ="./___LOCALIZATION___.lproj/designer_localization_resources.___LOCALIZATION___.js "> </ script >
28+ < script type ="application/javascript " src ="./___LOCALIZATION___.lproj/contextMenu.js "> </ script >
29+ < script >
30+ var vp_localizedFolder = '___LOCALIZATION___.lproj' ;
31+ let vp_fonts = ___FONTS___ ;
32+
33+ ( function ( ) {
34+ // call the language package to translate the command names
35+ let lang = vp_localizedFolder . substring ( 0 , 2 ) ;
36+ if ( ( lang != '' ) && ( lang != 'en' ) ) {
37+ GC . Spread . CalcEngine . LanguagePackages . languagePackages ( lang ) ;
38+ }
39+
40+ if ( vp_localizedFolder === 'ja.lproj' ) {
41+ GC . Spread . Common . CultureManager . culture ( "ja-jp" ) ;
42+ } else if ( vp_localizedFolder === 'fr.lproj' ) {
43+ GC . Spread . Common . CultureManager . culture ( "fr-FR" ) ;
44+ } else if ( vp_localizedFolder === 'de.lproj' ) {
45+ GC . Spread . Common . CultureManager . culture ( "de-DE" ) ;
46+ } else if ( vp_localizedFolder === 'es.lproj' ) {
47+ GC . Spread . Common . CultureManager . culture ( "es-ES" ) ;
48+ } else if ( vp_localizedFolder === 'cs.lproj' ) {
49+ GC . Spread . Common . CultureManager . culture ( "cs-CZ" ) ;
50+ } else if ( vp_localizedFolder === 'pt.lproj' ) {
51+ GC . Spread . Common . CultureManager . culture ( "pt-PT" ) ;
52+ }
53+ } ) ( ) ;
54+ //# sourceURL=init_language.js
55+ </ script >
56+
57+ < script src ="./scripts/custom-designer-functions.js "> </ script >
58+
59+ <!-- -------------- -->
60+ <!-- run -->
61+ ___DESIGNER_LOCALIZATION_JS_INCLUDES___
62+ < script >
63+ var vp_insertFunctionDialogTemplate = null ; // capture function from designer.js (designer has been modified for that)
64+ ( function ( ) {
65+ // we must inject the system fonts now after initializing designer resources
66+ // and before initializing designer code, if we did it later then the font list is not upddated in the ribbon
67+ if ( vp_fonts . length > 0 ) {
68+ let ff_fonts = { } ;
69+ let font_list = { } ;
70+
71+ for ( let i = 0 ; i < vp_fonts . length ; i ++ ) {
72+ var value = vp_fonts [ i ] . replace ( / " / g, '' ) ;
73+ ff_fonts [ "ff" + ( i + 1 ) ] = { name : vp_fonts [ i ] , text : value } ;
74+ font_list [ vp_fonts [ i ] ] = vp_fonts [ i ] ;
75+ }
76+
77+ GC . Spread . Sheets . Designer . DR . res . fontPicker . fontFamilies = font_list ; // {Arial:"Arial",Times:"Times",...}
78+ GC . Spread . Sheets . Designer . DR . res . ribbon . fontFamilies = ff_fonts ; // {ff1:{name:'Arial',text:'Arial'},ff2... }
79+ }
80+ let custom = vp_designerResources . ribbon . formulas . custom ;
81+ GC . Spread . Sheets . Designer . DR . res . insertFunctionDialog . functionCategorys += ( "," + custom ) ;
82+
83+ if ( vp_designerResources . insertFunctionDialog != null ) {
84+ GC . Spread . Sheets . Designer . DR . res . insertFunctionDialog . title = vp_designerResources . insertFunctionDialog . title ;
85+ GC . Spread . Sheets . Designer . DR . res . insertFunctionDialog . functionCategory = vp_designerResources . insertFunctionDialog . functionCategory ;
86+ GC . Spread . Sheets . Designer . DR . res . insertFunctionDialog . functionList = vp_designerResources . insertFunctionDialog . functionList ;
87+ GC . Spread . Sheets . Designer . DR . res . insertFunctionDialog . formula = vp_designerResources . insertFunctionDialog . formula ;
88+ }
89+
90+ GC . Spread . Sheets . Designer . DR . res . ribbon . formulas . custom = custom ;
91+ } ) ( ) ;
92+ //# sourceURL=init_fonts.js
93+ </ script >
94+ ___DESIGNER_JS_INCLUDES___
95+ < script >
96+ ( function ( ) {
97+ function mergeResources ( res1 , res2 ) {
98+
99+ for ( var propertyName in res1 ) {
100+ if ( res2 [ propertyName ] != null ) {
101+ if ( ( typeof ( res1 [ propertyName ] ) == "object" )
102+ && ( typeof ( res2 [ propertyName ] ) == "object" ) )
103+ mergeResources ( res1 [ propertyName ] , res2 [ propertyName ] ) ;
104+ else
105+ res1 [ propertyName ] = res2 [ propertyName ] ;
106+ }
107+ }
108+ }
109+ if ( GC . Spread . Sheets . Designer . getResources == null ) {
110+ console . log ( "Cannot modify designer resources. Must have an issue when loading the libraries." )
111+ return ;
112+ }
113+ let res = GC . Spread . Sheets . Designer . getResources ( ) ;
114+ mergeResources ( res , vp_designerResources ) ;
115+ GC . Spread . Sheets . Designer . setResources ( res ) ;
116+ } ) ( ) ;
117+ //# sourceURL=init_resources.js
118+ </ script >
119+
120+ <!-- -------------- -->
121+
122+ <!-- View Pro specific -->
123+ < script src ="./scripts/init.js "> </ script >
124+ < script src ="./scripts/utils.js "> </ script >
125+ < script src ="./scripts/custom-types.js "> </ script >
126+ < script src ="./scripts/custom-function-helpers.js "> </ script >
127+ < script src ="./scripts/custom-functions.js "> </ script >
128+
129+ < script src ="./4dviewpro.js "> </ script >
130+
131+ <!-- View Pro Commands -->
132+ ___COMMAND_JS_INCLUDES___
133+
134+ < script type ="text/javascript ">
135+ var designer = null ;
136+
137+ window . onload = function ( ) {
138+
139+ //Apply License
140+ GC . Spread . Sheets . LicenseKey = "___LICENSE_KEY___" ;
141+ GC . Spread . Sheets . Designer . LicenseKey = "___DESIGNER_LICENSE_KEY___" ;
142+
143+ let config = GC . Spread . Sheets . Designer . DefaultConfig ;
144+ if ( config == null ) {
145+ console . log ( "Failed to get default configuration of designer. Cannot create it. Must have an issue when loading the libraries." ) ;
146+ return ;
147+ }
148+
149+ config . contextMenu = config . contextMenu . concat ( [
150+ "separator" ,
151+ "DesignerInsertPageBreak" ,
152+ "DesignerInsertColPageBreak" ,
153+ "DesignerInsertRowPageBreak" ,
154+ "DesignerRemovePageBreak" ,
155+ "DesignerRemoveColPageBreak" ,
156+ "DesignerRemoveRowPageBreak"
157+ ] ) ;
158+
159+ designer = new GC . Spread . Sheets . Designer . Designer ( document . getElementById ( "gc-designer-container" ) , config ) ;
160+ spread = designer . Spread ; // declared in init.js
161+ }
162+ //# sourceURL=designerInit.js
163+ </ script >
164+ </ body >
165+
166+ </ html >
0 commit comments