PageSourceSearch

https://files.appinobiggs.com/ui/core/vendor/celljs/CellUiLoader.js

js appinobiggs.com collected 2026-10-05 21:35:39 UTC 35,340 bytes, 640 lines download raw bytes

1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId])
10/******/ 			return installedModules[moduleId].exports;
11
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			exports: {},
15/******/ 			id: moduleId,
16/******/ 			loaded: false
17/******/ 		};
18
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
22/******/ 		// Flag the module as loaded
23/******/ 		module.loaded = true;
24
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28
29
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35
36/******/ 	// __webpack_public_path__
37/******/ 	__webpack_require__.p = "";
38
39/******/ 	// Load entry module and return exports
40/******/ 	return __webpack_require__(0);
41/******/ })
42/************************************************************************/
43/******/ ({
44
45/***/ 0:
46/***/ (function(module, exports, __webpack_require__) {
47
48	module.exports = __webpack_require__(144);
49
50
51/***/ }),
52
53/***/ 144:
54/***/ (function(module, exports, __webpack_require__) {
55
56	var CellUI = __webpack_require__(145);
57
58	window.createCellJS = function(){
59	    var cellJS = new CellJS();
60	    cellJS.setUI(new CellUI());
61
62	    return cellJS;
63	};
64
65	window.cellParser = function(file, successFn, errorFn){
66	    window.cellJS.parse(file, successFn, errorFn);
67	};
68
69	window.cellAfterRender = function(element, callBackFn, sheetId) {
70	    window.cellJS.render(element, callBackFn, sheetId);
71	};
72
73/***/ }),
74
75/***/ 145:
76/***/ (function(module, exports, __webpack_require__) {
77
78	// var MobileUI = require('./MobileUI');
79	// var DesktopUI = require('./DesktopUI');
80
81	var MobileUI = __webpack_require__(146);
82	var DesktopUI = MobileUI;
83
84	function UI() {
85	    this.mobileUI = null;
86	    this.desktopUI = null;
87	}
88
89	UI.prototype.initialize = function(loaderInstance) {
90	    this.loaderInstance = loaderInstance;
91
92	    if ($.browser && $.browser.mobile) {
93	        this.mobileUI = new MobileUI(this.loaderInstance);
94	    } else {
95	        this.desktopUI = new DesktopUI(this.loaderInstance);
96	    }
97	};
98
99	UI.prototype.getMobileUIInstance = function() {
100	    return this.mobileUI;
101	};
102
103	UI.prototype.getDesktopUIInstance = function() {
104	    return this.desktopUI;
105	};
106
107	UI.prototype.destroy = function(callback) {
108	    if (this.mobileUI) {
109	        if (this.mobileUI.destroy) {
110	            this.mobileUI.destroy(callback);
111	        }
112	    }
113
114	    if (this.desktopUI) {
115	        if (this.desktopUI.destroy) {
116	            this.desktopUI.destroy(callback);
117	        }
118	    }
119
120	    this.mobileUI = null;
121	    this.desktopUI = null;
122	};
123
124
125	module.exports = UI;
126
127/***/ }),
128
129/***/ 146:
130/***/ (function(module, exports) {
131
132	var themeColor = '#323639';
133
134	function DesktopUI(instance) {
135	    this.jsViewer = instance;
136	    this.jsElement = this.jsViewer.getElement();
137	    this.fileInfo = this.jsViewer.getFileInfo();
138
139	    this.$jsElement = $(this.jsElement);
140	    this.isDesktop = this.jsElement.getBoundingClientRect().width >= 760;
141
142	    this.createTemplate();
143	    this.setEvent();
144	}
145
146	DesktopUI.prototype = {
147	    Config: {
148	        logoTitle: "KUKUDOCS",
149	        logoSubTitle: "Js Document Viewer",
150	        class: {
151	            modal: {
152	                inner: "kuku-modal",
153	                header: "kuku-modal-header",
154	                body: "kuku-modal-body",
155	                closeBtn: "kuku-modal-close-btn"
156	            }
157	        },
158
159	        styles: {
160	            header: {
161	                wrapper: "z-index: 1000; display: block; width: 100%; height: 41px; position: relative; margin: 0; padding: 0; background: " + themeColor + "; font-family: Arial; transform: translate3d(0px, 0px, 0px); -webkit-transform: translate3d(0px, 0px, 0px); -ms-transform: translate3d(0px, 0px, 0px);",
162	                logo: "float: left; width: 152px; height: 31px; padding: 5px 10px 5px 18px; background-color: " + themeColor + "; text-align: center;",
163	                logoText: "font-weight: 600; font-size: 16px; color: #fff; margin: 0; padding: 0;",
164	                logoSubText: "font-size: 10px; font-weight: normal; font-style: italic; color: #fff; margin: 0; padding: 0;",
165
166	                rightMenu: "float: right !important; position: absolute; top: 0; right: 0; font-size: 10px; padding: 0 5px; color: #ffffff;",
167
168	                buttonGroup: "float: left; margin: 0; padding-left: 0; list-style: none; border: none !important;",
169	                buttonGroupItem: "float: left; display: block; position: relative; cursor: pointer;",
170	                btnA: "cursor: pointer; display: block; float: left; width: 40px; height: 40px; text-align: center; margin-left: 0px; overflow: hidden; white-space: nowrap;",
171	                icon: "width:20px; height:20px; margin: 10px;"
172	            },
173
174	            footer: {
175	                wrapper: "z-index: 1000; display: block; position: absolute; width: 100%; height: 25px; background: " + themeColor + "; bottom: 0; margin: 0; padding: 0; font-family: Arial; ",
176	                floatButton: "position: absolute; cursor: pointer; width: 40px; height: 40px; background-color: " + themeColor + "; font-size: 35px; color: #FFFFFF; text-align: center; border-radius: 50%; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; z-index: 1001; right: 20px; bottom: 50px;",
177	                icon: "width:16px; height:16px; margin: 12px;"
178	            },
179
180
181	            sheetInfo: {
182	                wrapper: "position:relative; display:inline-block; width: 70%; height: 100%; font-size: 10px;  color: #ffffff; overflow: hidden;",
183	                select: "position:relative; display:inline-block; width: 70%; height: 100%; font-size: 10px;  color: #ffffff; overflow: hidden;",
184	                fileName: "display:inline-block; position:absolute; width: 30%; font-size: 10px; color: #ffffff; text-align: right; overflow: hidden;",
185
186	                sheetName: {
187	                    wrapper: "position:absolute; top: 0; left:-100000px; margin:0; padding:0; list-style: none; left:65px;",
188	                    item: "float: left; display: block; position: relative; cursor: pointer;",
189	                    itemA: "cursor: pointer;display: block;float: left;min-width: 60px;height: 13px;text-align: center;margin-left: 0;overflow: hidden;white-space: nowrap;border: 1px solid #969696;background: #ffffff;color: #000000;font-size: 10px;padding: 3px;border-radius: 0 0 3px 3px; border-bottom: 3px solid #00B48C;box-sizing: content-box;",
190	                    activeA: "border-bottom: 3px solid #00B48C;"
191	                },
192
193	                sheetMoveNode: {
194	                    wrapper : "width:60px;",
195	                    ul: "padding:0;list-style: none; margin:0;",
196	                    li: "float: left; display: block; position: relative; cursor: pointer; margin: 0px;",
197	                    btn: "cursor: pointer;display: block;float: left; width: 25px;height: 15px;text-align: center; overflow: hidden;white-space: nowrap; color: #ffffff;font-size: 12px; margin-left:3px; padding-top: 5px;"
198	                }
199	            },
200
201	            modal: {
202	                wrapper: "position: fixed; width: 100%; height: 100%; top: 0; left: 0; background-color: rgba(0,0,0,0.75); z-index: 10000;",
203	                inner: "position: relative; margin: 0 auto; top: 10%; min-width: 500px; max-width:700px; min-height: 300px; background: #ffffff;",
204	                closeBtn: "position: absolute; top: -12.5px; right: -12.5px; cursor:pointer; display: block; width: 30px; height: 30px; text-indent: -9999px; background-size: contain; background-repeat: no-repeat; background-position: center center; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9
204XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==');",
205	                body: 'padding: 50px; font-size:12px; height:400px; overflow:auto;'
206	            }
207	        }
208	    },
209	    createTemplate: function () {
210	        this.$header = $('<div style="' + this.Config.styles.header.wrapper + '"></div>');
211	        this.$logo = ''; /*//FileCloud changes $('' +
212	            '<div style="' + this.Config.styles.header.logo + '">' +
213	            '<p style="' + this.Config.styles.header.logoText + '">' + this.Config.logoTitle + '</p>' +
214	            '<p style="' + this.Config.styles.header.logoSubText + '">' + this.Config.logoSubTitle + '</p>' +
215	            '</div>');*/
216
217	        this.$menuBtns = {
218	            header: {
219	                fullscreen: $('' +
220	                    '<li style="' + this.Config.styles.header.buttonGroupItem + '">' +
221	                        '<a style="' + this.Config.styles.header.btnA + '">' +
222	                            '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 63 63" xml:space="preserve"  preserveAspectRatio="xMinYMin meet" style="' + this.Config.styles.header.icon + '">' +
223	                                '<g fill="#ffffff">' +
224	                                    '<path d="M18.796842008225546,12.51633946062611 l2.8179575342658323,-2.6678772754275046 c1.8829356299311009,-1.8525303911064799 1.3959653249159782,-3.9422216450450005 -1.0851021631730577,-4.522840085639954 H8.594546552057071 C6.615773609350767,5.397378463184758 5.291564648060893,5.995267079432097 5.356996722011477,8.611090585991851 L5.339483304448495,20.559376476425335 c0.5022945453827311,2.4635540705260555 2.2222580952138657,2.944200085865656 3.8269249794220395,1.0697779228054491 l3.167982643614863,-2.9940646775380335 l10.013053249724036,10.00867489533329 c0.8698330722947447,0.8676438950993718 2.2808793956677347,0.8698330722947447 3.1485232907671064,0.004378354390745358 l3.1463341135717338,-3.1463341135717338 c0.8676438950993718,-0.8654547179039992 0.8654547179039992,-2.278690218472362 -0.002189177195372681,-3.1463341135717338 C28.6401124043529,22.35547474427332 18.796842008225546,12.51633946062611 18.796842008225546,12.51633946062611 zM25.4351569903273,36.43018141714546 c-0.8632655407086263,-0.8654547179039992 -2.2721226868862443,-0.8654547179039992 -3.137577404790243,0.004378354390745358 l-9.982648010899416,9.973891302117925 l-3.1594691767439698,-2.9896863231472883 c-1.5980993526220568,-1.8700438086694622 -3.3136845480624446,-1.3893977933298605 -3.815979093445177,1.0653995684147037 L5.358942657296253,56.40423414772579 c-0.0629996548446138,2.6004992661921453 1.2524525976637693,3.2049554140256022 3.229036363174701,3.272333423260961 h11.906934765632002 c2.4701216021121724,-0.5849967949856996 2.957091907127295,-2.665688098232132 1.0807238087823123,-4.507515845272345 l-2.8092008254843406,-2.659363808556611 l9.806540867627213,-9.81091922201796 c0.8654547179039992,-0.8654547179039992 0.8676438950993718,-2.2743118640816165 0.002189177195372681,-3.13538822759487 C28.574923572312915,39.56338046754496 25.4351569903273,36.43018141714546 25.4351569903273,36.43018141714546 zM39.56216067397779,28.645953794221413 c0.8632655407086263,0.8654547179039992 2.2743118640816165,0.8632655407086263 3.139766581985615,-0.004378354390745358 l9.984837188094787,-10.00867489533329 l3.1594691767439698,2.9940646775380335 c1.59372099823131,1.8744221630602074 3.3093061936717003,1.3937761477206059 3.8116007390544313,-1.0697779228054491 l-0.017513417562981446,-11.948285890433484 C59.703563839048826,5.993077902236724 58.3834899902391,5.395189285989386 56.411771062940105,5.323432922363281 h-11.915691474413492 c-2.4723107793075454,0.5828076177903275 -2.9463892630610284,2.6722556298182503 -1.0697779228054491,4.522840085639954 l2.813579179875086,2.670066452622878 L36.42677244638293,22.351096389882574 c-0.8654547179039992,0.8676438950993718 -0.8654547179039992,2.2808793956677347 0,3.1463341135717338 C36.42677244638293,25.497430503454307 39.56216067397779,28.645953794221413 39.56216067397779,28.645953794221413 zM55.85499032958366,43.416575573311476 l-3.150712467962479,2.9896863231472883 l-9.950053594879423,-9.973891302117925 c-0.8654547179039992,-0.8698330722947447 -2.2721226868862443,-0.8698330722947447 -3.1310098732041247,-0.004378354390745358 l-3.1288206960087517,3.1331990503994978 c-0.8610763635132533,0.8610763635132533 -0.8588871863178806,2.270176751601468 0.004378354390745358,3.13538822759487 l9.778081564087367,9.806540867627213 l-2.807011648288968,2.663742162947357 c-1.8678546314740898,1.845962859520362 -1.3893977933298605,3.929086581872763 1.0741562771961946,4.507515845272345 h11.878718704002752 c1.967827056
2247294416,-0.06737800923535912 3.2898468408239423,-0.6718341570688162 3.220279654393211,-3.272333423260961 l0.017513417562981446,-11.920069828804237 C59.15772899166924,42.02912371526639 57.44652215061959,41.54872094183738 55.85499032958366,43.416575573311476 z"></path>' +
225	                                '</g>' +
226	                            '</svg>' +
227	                        '</a>' +
228	                    '</li>')
229	            },
230
231	            footer: {
232	                main: $('' +
233	                    '<div style="' + this.Config.styles.footer.floatButton + '">' +
234	                        '<a style="' + this.Config.styles.header.btnA + '">' +
235	                            '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 63 63" xml:space="preserve" style="' + this.Config.styles.footer.icon + '">' +
236	                                '<g fill="#ffffff">' +
237	                                    '<path d="M56.588499999999996,25 H40 H25 H8.4115 C4.336,25 1,28.423000000000002 1,32.5 s3.3360000000000003,7.5 7.4115,7.5 H25 h15 h16.5885 C60.664,40 64,36.577 64,32.5 S60.664,25 56.588499999999996,25 z" stroke-dasharray="none" stroke="null"></path>' +
238	                                    '<path d="M56.588499999999996,3 H40 H25 H8.4115 C4.336,3 1,6.423000000000002 1,10.5 s3.3360000000000003,7.5 7.4115,7.5 H25 h15 h16.5885 C60.664,18 64,14.576999999999998 64,10.5 S60.664,3 56.588499999999996,3 z" stroke-dasharray="none" stroke="null"></path>' +
239	                                    '<path d="M56.588499999999996,47 H40 H25 H8.4115 C4.336,47 1,50.423 1,54.5 s3.3360000000000003,7.5 7.4115,7.5 H25 h15 h16.5885 C60.664,62 64,58.577 64,54.5 S60.664,47 56.588499999999996,47 z" stroke-dasharray="none" stroke="null"></path>' +
240	                                '</g>' +
241	                            '</svg>' +
242	                        '</a>' +
243	                    '</div>'),
244
245	                zoomOut: $('' +
246	                    '<div style="' + this.Config.styles.footer.floatButton + '">' +
247	                        '<a style="' + this.Config.styles.header.btnA + '">' +
248	                            '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 65 65" xml:space="preserve" style="' + this.Config.styles.footer.icon + '">' +
249	                                '<g fill="#ffffff">' +
250	                                    '<path d="M56.97085819470882,24.880952835083008 H40.11904835700989 V8.02914299738407 C40.11904835700989,3.8889524440765384 36.64171495890617,0.5 32.50000059604645,0.5 s-7.61904776096344,3.3889524440765384 -7.61904776096344,7.529142997384071 V24.880952835083008 H8.02914299738407 C3.8889524440765384,24.880952835083008 0.5,28.35828623318672 0.5,32.50000059604645 s3.3889524440765384,7.61904776096344 7.529142997384071,7.61904776096344 H24.880952835083008 v16.851809837698934 C24.880952835083008,61.111048748016366 28.35828623318672,64.5000011920929 32.50000059604645,64.5000011920929 s7.61904776096344,-3.3889524440765384 7.61904776096344,-7.529142997384071 V40.11904835700989 h16.851809837698934 C61.111048748016366,40.11904835700989 64.5000011920929,36.64171495890617 64.5000011920929,32.50000059604645 S61.111048748016366,24.880952835083008 56.97085819470882,24.880952835083008 z"></path>' +
251	                                '</g>' +
252	                            '</svg>' +
253	                        '</a>' +
254	                    '</div>'),
255
256	                zoomIn: $('' +
257	                    '<div style="' + this.Config.styles.footer.floatButton + '">' +
258	                        '<a style="' + this.Config.styles.header.btnA + '">' +
259	                            '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 63 63" xml:space="preserve" style="' + this.Config.styles.footer.icon + '">' +
260	                                '<g fill="#ffffff">' +
261	                                    '<path d="M56.588499999999996,25 H40 H25 H8.4115 C4.336,25 1,28.423000000000002 1,32.5 s3.3360000000000003,7.5 7.4115,7.5 H25 h15 h16.5885 C60.664,40 64,36.577 64,32.5 S60.664,25 56.588499999999996,25 z"></path>' +
262	                                '</g>' +
263	                            '</svg>' +
264	                        '</a>' +
265	                    '</div>')
266	            }
267	        };
268
269	        this.$modal = $('' +
270	            '<div style="'+this.Config.styles.modal.wrapper+'">' +
271	                '<div class="'+this.Config.class.modal.inner+'" style="'+this.Config.styles.modal.inner+'">' +
272	                    '<div class="'+this.Config.class.modal.header+'">' +
273	                        '<a class="'+this.Config.class.modal.closeBtn+'" style="'+this.Config.styles.modal.closeBtn+'"></a>' +
274	                    '</div>' +
275	                    '<div class="'+this.Config.class.modal.body+'" style="'+this.Config.styles.modal.body+'"></div>' +
276	                '</div>' +
277	            '</div>');
278
279
280
281	        /** Header Menu Setting **/
282	        var _this = this;
283	        if (this.$logo) {
284	            this.$header.append(this.$logo);
285	        }
286
287	        var $menuWrapper = $('<div></div>');
288	        var $menu = $('<div style="' + this.Config.styles.header.rightMenu + '"></div>');
289	        var $menuGroup = $('<ul style="' + this.Config.styles.header.buttonGroup + '"></ul>');
290	        $.each(this.$menuBtns.header, function () {
291	            $menuGroup.append(this);
292	        });
293	        $menu.append($menuGroup);
294	        $menuWrapper.append($menu);
295
296	        this.$header.append($menu);
297
298
299	        /** Footer Menu Setting **/
300	        this.$footer = $('<div style="' + this.Config.styles.footer.wrapper + '"></div>');
301	        var $fileName = $('<div style="'+this.Config.styles.sheetInfo.fileName+'"><span style="margin:5px;">' + this.fileInfo.fileName + '</span></div>');
302	        this.$pageInfo = $('<div style="' + this.Config.styles.header.rightMenu + '"></div>');
303
304	        /** Sheet Select Menu Setting **/
305	        if (this.isDesktop) {
306	            var sheetNameStr = '';
307	            var isFirst = true;
308	            if (this.fileInfo.sheetNames) {
309	                $.each(this.fileInfo.sheetNames, function () {
310	                    if (this.name && this.state !== 'hidden') {
311	                        sheetNameStr += '' +
312	                            '<li style="'+_this.Config.styles.sheetInfo.sheetName.item +'">' +
313	                            '<a style="'+_this.Config.styles.sheetInfo.sheetName.itemA + ( (isFirst) ? _this.Config.styles.sheetInfo.sheetName.activeA : "") + '" data-sheet-id="' + this.sheetId + '">' +
314	                            '<span>' + this.name + '</span>' +
315	                            '</a>' +
316	                            '</li>';
317
318	                        isFirst = false;
319	                    }
320	                });
321	            }
322
323	            this.$sheetMoveNode = $('' +
324	                '<div style="'+this.Config.styles.sheetInfo.sheetMoveNode.wrapper+'">' +
325	                    '<ul style="'+this.Config.styles.sheetInfo.sheetMoveNode.ul+'">' +
326	                        '<li style="'+this.Config.styles.sheetInfo.sheetMoveNode.li+'"><a style="'+this.Config.styles.sheetInfo.sheetMoveNode.btn+'" data-action="prev"><span>◀</span></a></li>' +
327	                        '<li style="'+this.Config.styles.sheetInfo.sheetMoveNode.li+'"><a style="'+this.Config.styles.sheetInfo.sheetMoveNode.btn+'" data-action="next"><span>▶</span></a></li>' +
328	                    '</ul>' +
329	                '</div>' +
330	                '');
331
332
333	            this.$sheetNameNode = $('<ul style="'+this.Config.styles.sheetInfo.sheetName.wrapper+'">' + sheetNameStr + '</ul>');
334	            this.$sheetInfo = $('<div style="' + this.Config.styles.sheetInfo.wrapper + '"></div>');
335
336	            this.$sheetInfo.append(this.$sheetMoveNode);
337	            this.$sheetInfo.append(this.$sheetNameNode);
338	            this.$footer.append(this.$sheetInfo);
339	        } else {
340	            var selectHTML = '<optgroup>';
341	            if (this.fileInfo.sheetNames) {
342	                $.each(this.fileInfo.sheetNames, function () {
343	                    if (this.name && this.state !== 'hidden') {
344	                        selectHTML += '<option value="' + this.sheetId + '">' + this.name + '</option>'
345	                    }
346	                });
347	            }
348	            selectHTML += '</optgroup>';
349	            this.$sheetNameSelect = $('<select style="' + _this.Config.styles.sheetInfo.select + '">' + selectHTML + '</select>');
350	            this.$footer.append(this.$sheetNameSelect);
351	        }
352
353	        this.$footer.append($fileName);
354	        this.$footer.append(this.$pageInfo);
355	        $.each(this.$menuBtns.footer, function (key, value) {
356	            if (value) {
357	                if (key !== 'main') {
358	                    value.hide();
359	                }
360	                _this.$footer.append(value);
361	            }
362	        });
363
364
365	        this.$modal.find('.' + this.Config.class.modal.closeBtn).click(function(){
366	            _this.$modal.hide();
367	        });
368	        this.$modal.hide();
369
370
371	        this.$jsElement.parent().before(this.$header);
372	        this.$jsElement.parent().after(this.$footer);
373
374	        $('body').append(this.$modal);
375	    },
376
377	    setEvent: function () {
378	        var _this = this;
379	        $.each(this.$menuBtns.header, function (key) {
380	            $(this).children('a').on('touchstart mousedown', (function (_key) {
381	                return function (e) {
382	                    e.stopPropagation();
383	                    e.preventDefault();
384
385	                    _this._clickButton(this, _key);
386
387	                }
388	            })(key));
389	        });
390	        $.each(this.$menuBtns.footer, function (key) {
391	            $(this).children('a').on('touchstart mousedown', (function (_key) {
392	                return function (e) {
393	                    e.stopPropagation();
394	                    e.preventDefault();
395
396	                    _this._clickButton(this, _key);
397
398	                }
399	            })(key));
400	        });
401
402	        if (this.$sheetNameSelect) {
403	            this.$sheetNameSelect.on('change', function () {
404	                var val = _this.$sheetNameSelect.val();
405	                _this.jsViewer.gotoPage(val);
406	            });
407	        }
408
409	        if (this.$sheetInfo) {
410	            var sheetInfoWidth = this.$sheetInfo.width() - 65;
411	            var sheetNameNodeWidth = this.$sheetNameNode.width() + 1;
412	            var $sheets = $(this.$sheetNameNode).find('li');
413	            var $sheetButtons = $sheets.find('a');
414	            $sheetButtons.on('touchstart mousedown', function () {
415	                var $this = $(this);
416	                if ($this.hasClass('active')) {
417	                    return;
418	                }
419
420	                $sheetButtons.removeClass('active');
421	                $sheetButtons.css({
422	                    'height': '15px',
423	                    'border-bottom': '1px solid #969696'
424	                });
425
426	                var val = this.getAttribute('data-sheet-id');
427	                $this.css({
428	                    'height': '13px',
429	                    'border-bottom': '3px solid #00B48C'
430	                });
431	                $this.addClass('active');
432	                _this.jsViewer.gotoPage(val);
433	            });
434
435	            if (sheetInfoWidth < sheetNameNodeWidth) {
436	                var sheetNameWidthInfo = [];
437	                $sheets.each(function (i) {
438	                    sheetNameWidthInfo[i] = $(this).width();
439	                });
440
441	                var _width = 0, lastIndex = 0;
442	                for (var length = sheetNameWidthInfo.length, i = length - 1; i >= 0; i--) {
443	                    _width += sheetNameWidthInfo[i];
444	                    if (sheetInfoWidth < _width) {
445	                        lastIndex = i + 1;
446	                        break;
447	                    }
448	                }
449
450	                this.currentIndex = 0;
451	                this.$sheetMoveNode.find('a').on('touchstart mousedown', function () {
452	                    var action = this.getAttribute('data-action');
453	                    if (action === 'prev') {
454	                        _this.currentIndex--;
455	                    } else {
456	                        _this.currentIndex++;
457	                    }
458
459	                    if (_this.currentIndex < 0) {
460	                        _this.currentIndex = 0;
461	                    } else if (_this.currentIndex > lastIndex) {
462	                        _this.currentIndex = lastIndex
463	                    }
464
465	                    $sheets.each(function (i) {
466	                        if (i < _this.currentIndex) {
467	                            this.style.display = 'none';
468	                        } else {
469	                            this.style.display = 'block';
470	                        }
471	                    });
472	                });
473	            }
474	        }
475	    },
476
477	    _clickButton: function (element, type) {
478	        switch (type) {
479	            case 'fullscreen' :
480	                this.fullscreen();
481	                break;
482	            case 'main' :
483	                this.mainButtonTouch();
484	                break;
485	            case 'zoomOut' :
486	                this.zoomOut();
487	                break;
488	            case 'zoomIn' :
489	                this.zoomIn();
490	                break;
491	        }
492	    },
493
494	    setPageInfo: function (index) {
495	        this.$pageInfo.html('<span>' + (index + 1) + '/' + this.totalPage + '</span>');
496	    },
497
498	    fullscreen: function (e) {
499	        var elem = this.jsElement;
500
501	        if (this.isFullScreen()) {
502	            if (document.exitFullscreen) {
503	                document.exitFullscreen();
504
505	            } else if (document.webkitExitFullscreen) {
506	                document.webkitExitFullscreen();
507
508	            } else if (document.webkitCancelFullScreen) {
509	                document.webkitCancelFullScreen();
510
511	            } else if (document.mozCancelFullScreen) {
512	                document.mozCancelFullScreen();
513
514	            } else if (document.msExitFullscreen) {
515	                document.msExitFullscreen();
516	            }
517	        } else {
518	            if (elem.requestFullscreen) {
519	                elem.requestFullscreen();
520
521	            } else if (elem.mozRequestFullScreen) {
522	                elem.mozRequestFullScreen()
523
524	            } else if (elem.webkitRequestFullscreen) {
525	                elem.webkitRequestFullscreen();
526
527	            } else if (elem.msRequestFullscreen) {
528	                elem.msRequestFullscreen();
529
530	            } else {
531	                //console.log("Not Support FullScreen");
532	            }
533	        }
534	    },
535
536	    isFullScreen: function () {
537	        return !!(document.fullscreenElement || document.webkitFullscreenElement || document.webkitCurrentFullScreenElement || document.mozFullScreenElement || document.msFullscreenElement);
538	    },
539
540	    zoomOut: function () {
541	        var currentZoom = this.jsViewer.getZoom();
542	        this.jsViewer.setZoom(currentZoom + 0.5);
543	    },
544
545	    zoomIn: function () {
546	        var currentZoom = this.jsViewer.getZoom();
547	        this.jsViewer.setZoom(currentZoom - 0.5);
548	    },
549
550	    mainButtonTouch: function () {
551	        var action = 'change';
552	        if (this.$menuBtns.footer.main.hasClass('open')) {
553	            action = '';
554	            this.moveButtons(this.$menuBtns.footer.next, 50, action);
555	            this.moveButtons(this.$menuBtns.footer.prev, 50, action);
556	            this.moveButtons(this.$menuBtns.footer.zoomOut, 50, action);
557	            this.moveButtons(this.$menuBtns.footer.zoomIn, 50, action);
558
559	            this.$menuBtns.footer.main.find('g').html(
560	                '<path d="M56.588499999999996,25 H40 H25 H8.4115 C4.336,25 1,28.423000000000002 1,32.5 s3.3360000000000003,7.5 7.4115,7.5 H25 h15 h16.5885 C60.664,40 64,36.577 64,32.5 S60.664,25 56.588499999999996,25 z" stroke-dasharray="none" stroke="null"></path>' +
561	                '<path d="M56.588499999999996,3 H40 H25 H8.4115 C4.336,3 1,6.423000000000002 1,10.5 s3.3360000000000003,7.5 7.4115,7.5 H25 h15 h16.5885 C60.664,18 64,14.576999999999998 64,10.5 S60.664,3 56.588499999999996,3 z" stroke-dasharray="none" stroke="null"></path>' +
562	                '<path d="M56.588499999999996,47 H40 H25 H8.4115 C4.336,47 1,50.423 1,54.5 s3.3360000000000003,7.5 7.4115,7.5 H25 h15 h16.5885 C60.664,62 64,58.577 64,54.5 S60.664,47 56.588499999999996,47 z" stroke-dasharray="none" stroke="null"></path>'
563	            );
564
565	            this.$menuBtns.footer.main.removeClass('open');
566	        } else {
567	            $.each(this.$menuBtns.footer, function (key, value) {
568	                if (value && key !== 'main') {
569	                    value.show();
570	                }
571	            });
572
573	            this.moveButtons(this.$menuBtns.footer.next, 250, action);
574	            this.moveButtons(this.$menuBtns.footer.prev, 200, action);
575	            this.moveButtons(this.$menuBtns.footer.zoomOut, 150, action);
576	            this.moveButtons(this.$menuBtns.footer.zoomIn, 100, action);
577
578	            this.$menuBtns.footer.main.find('g').html(
579	                '<path d="M45.361877472758295,32.50024811834097 l13.902431874096393,-13.902431874096393 c0.8831252442598347,-0.8822971073091034 1.3240253568291664,-1.9540719489455225 1.3240253568291664,-3.2154901522994046 c0,-1.2610869485735894 -0.442059504300356,-2.3326961628198624 -1.3240253568291664,-3.2154901522994046 L52.83349466964603,5.73535875287652 C51.95086630755663,4.852896018177271 50.87925709331035,4.4114990234375 49.618501399517065,4.4114990234375 c-1.2615838307440281,0 -2.3328617902100093,0.4413969947397711 -3.215987034469843,1.3238597294390204 L32.50024811834097,19.637790626972915 L18.59765061685443,5.73535875287652 C17.715519136935473,4.852896018177271 16.64374429529905,4.4114990234375 15.382160464555025,4.4114990234375 c-1.2605900664031504,0 -2.3325305354297163,0.4413969947397711 -3.2154901522994046,1.3238597294390204 L5.735524380266666,12.166835939645768 C4.8532272729575645,13.048967419564724 4.4114990234375,14.121239143371582 4.4114990234375,15.38232609194517 c0,1.261418203353882 0.44123136734962487,2.3326961628198624 1.3240253568291664,3.2154901522994046 l13.902266246706247,13.902431874096393 L5.735524380266666,46.402679992437356 C4.8532272729575645,47.28563960930705 4.4114990234375,48.35691756877303 4.4114990234375,49.618667026907204 c0,1.2604244390130044 0.44123136734962487,2.3323649080395703 1.3240253568291664,3.214827642738819 l6.4313115593791,6.430980304598809 c0.882793989479542,0.8831252442598347 1.9549000858962535,1.3240253568291664 3.2154901522994046,1.3240253568291664 c1.261418203353882,0 2.3326961628198624,-0.442059504300356 3.2154901522994046,-1.3240253568291664 l13.90259750148654,-13.902431874096393 l13.903425638437271,13.902431874096393 c0.8824627346992493,0.8831252442598347 1.953243811994791,1.3240253568291664 3.215987034469843,1.3240253568291664 c1.2605900664031504,0 2.3323649080395703,-0.442059504300356 3.2149932701289656,-1.3240253568291664 l6.429655285477638,-6.430980304598809 c0.8831252442598347,-0.8818002251386644 1.3240253568291664,-1.954403203725815 1.3240253568291664,-3.214827642738819 c0,-1.2617494581341744 -0.4409001125693322,-2.333027417600155 -1.3240253568291664,-3.215987034469843 L45.361877472758295,32.50024811834097 z"></path>'
580	            );
581
582	            this.$menuBtns.footer.main.addClass('open');
583	        }
584	    },
585	    viewButton: function (action) {
586	        this.moveButtons(this.$menuBtns.footer.next, 250, action);
587	        this.moveButtons(this.$menuBtns.footer.prev, 200, action);
588	        this.moveButtons(this.$menuBtns.footer.zoomOut, 150, action);
589	        this.moveButtons(this.$menuBtns.footer.zoomIn, 100, action);
590	    },
591
592	    moveButtons: function ($button, position, action) {
593	        if (!$button) {
594	            return;
595	        }
596	        if (action === 'change') {
597	            $button.animate({
598	                bottom: position,
599	                opacity: 1
600	            }, "fast");
601	        } else {
602	            $button.animate({
603	                bottom: position,
604	                opacity: 0
605	            }, "fast");
606
607	            $button.fadeOut('fast');
608	        }
609	    },
610
611	    destroy : function(callback){
612	        this.$logo.remove();
613	        this.$header.remove();
614	        this.$footer.remove();
615	        this.$modal.remove();
616
617	        this.$logo = null;
618	        this.$header = null;
619	        this.$footer = null;
620	        this.$modal = null;
621	        this.fileInfo = null;
622	        this.totalPage = null;
623	        this.$jsElement = null;
624
625	        this.jsViewer = null;
626
627	        delete this.$menuBtns;
628
629	        if (callback) {
630	            callback();
631	        }
632	    }
633
634	};
635
636	module.exports = DesktopUI;
637
638/***/ })
639
640/******/ });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.