diff --git a/o2web/source/o2_core/o2/o2.core.js b/o2web/source/o2_core/o2/o2.core.js index b6099eb843fa2d9f1b119d2643d137a9a1dcb80a..ab044c8ea6478bba95b82dd6b4886c9535d253ea 100644 --- a/o2web/source/o2_core/o2/o2.core.js +++ b/o2web/source/o2_core/o2/o2.core.js @@ -46,8 +46,8 @@ } } if ((typeof currentNS).toLowerCase()==="function"){ - for (var prop in props){ - currentNS.prototype[prop] = props[prop]; + for (var propfun in props){ + currentNS.prototype[propfun] = props[propfun]; } } return currentNS; @@ -91,42 +91,93 @@ _requireJs(jsPath, callback, loadAsync, compression); }; - var _require = function(module, callback, async, compression){ + var _requireSequence = function(fun, module, thisLoaded, thisErrorLoaded, callback, async, compression){ + var m = module.shift(); + fun(m, { + "onSuccess": function(){ + thisLoaded.push(module[i]); + if (module.length){ + _requireSequence(module, thisLoaded, thisErrorLoaded, callback); + }else{ + if (thisErrorLoaded.length){ + o2.runCallback(callback, "failure", [thisLoaded, thisErrorLoaded]); + }else{ + o2.runCallback(callback, "success", [thisLoaded, thisErrorLoaded]); + } + } + }, + "onFailure": function(){ + thisErrorLoaded.push(module[i]); + o2.runCallback(callback, "failure", [thisLoaded, thisErrorLoaded]); + } + }, async, compression); + }; + var _requireDisarray = function(fun, module, thisLoaded, thisErrorLoaded, callback, async, compression){ + for (var i=0; i +
+
+
+
+
+
+
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/o2web/source/o2_core/o2/widget/$Dialog/user/img/bottom-bg.gif b/o2web/source/o2_core/o2/widget/$Dialog/user/img/bottom-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..72ef530c8c0757c662a974a90c719c92153c340b Binary files /dev/null and b/o2web/source/o2_core/o2/widget/$Dialog/user/img/bottom-bg.gif differ diff --git a/o2web/source/o2_core/o2/widget/$Dialog/user/img/bottom-left.gif b/o2web/source/o2_core/o2/widget/$Dialog/user/img/bottom-left.gif new file mode 100644 index 0000000000000000000000000000000000000000..1cc4dde832c4356e52172e36e5f8bf039f29da35 Binary files /dev/null and b/o2web/source/o2_core/o2/widget/$Dialog/user/img/bottom-left.gif differ diff --git a/o2web/source/o2_core/o2/widget/$Dialog/user/img/bottom-right.gif b/o2web/source/o2_core/o2/widget/$Dialog/user/img/bottom-right.gif new file mode 100644 index 0000000000000000000000000000000000000000..51a24ef62325a341f52ce52eb3cac56d0335b863 Binary files /dev/null and b/o2web/source/o2_core/o2/widget/$Dialog/user/img/bottom-right.gif differ diff --git a/o2web/source/o2_core/o2/widget/$Dialog/user/img/close.png b/o2web/source/o2_core/o2/widget/$Dialog/user/img/close.png new file mode 100644 index 0000000000000000000000000000000000000000..73e676932db678de26f8d4856518aa5ee7b77c7c Binary files /dev/null and b/o2web/source/o2_core/o2/widget/$Dialog/user/img/close.png differ diff --git a/o2web/source/o2_core/o2/widget/$Dialog/user/img/resize.png b/o2web/source/o2_core/o2/widget/$Dialog/user/img/resize.png new file mode 100644 index 0000000000000000000000000000000000000000..c9fd9aede6af2d77d151daa69e7cda839f4869b9 Binary files /dev/null and b/o2web/source/o2_core/o2/widget/$Dialog/user/img/resize.png differ diff --git a/o2web/source/o2_core/o2/widget/$Dialog/user/img/title-bg.gif b/o2web/source/o2_core/o2/widget/$Dialog/user/img/title-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..a48ca6a056652b65e9cbb40c594bd743065d8588 Binary files /dev/null and b/o2web/source/o2_core/o2/widget/$Dialog/user/img/title-bg.gif differ diff --git a/o2web/source/o2_core/o2/widget/$Dialog/user/img/title-left.gif b/o2web/source/o2_core/o2/widget/$Dialog/user/img/title-left.gif new file mode 100644 index 0000000000000000000000000000000000000000..f7aeda8c41a749b73fe32e1052ce4c2a61468e05 Binary files /dev/null and b/o2web/source/o2_core/o2/widget/$Dialog/user/img/title-left.gif differ diff --git a/o2web/source/o2_core/o2/widget/$Dialog/user/img/title-right.gif b/o2web/source/o2_core/o2/widget/$Dialog/user/img/title-right.gif new file mode 100644 index 0000000000000000000000000000000000000000..3e90680fe8b5c8f2f23ea44ebe1ac1b13cd7669d Binary files /dev/null and b/o2web/source/o2_core/o2/widget/$Dialog/user/img/title-right.gif differ diff --git a/o2web/source/o2_core/o2/widget/$SearchInput/height24/css.wcss b/o2web/source/o2_core/o2/widget/$SearchInput/height24/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..5ebb0cdc797eec67c1fa9212b407e33257c22e57 --- /dev/null +++ b/o2web/source/o2_core/o2/widget/$SearchInput/height24/css.wcss @@ -0,0 +1,54 @@ +{ + "searchNode": { + "overflow": "hidden" + }, + "searchBarNode": { + "border": "0px solid #999999", + "height": "26px" + }, + "searchAction": { + "cursor": "pointer", + "height": "26px", + "width": "30px", + "background": "url("+o2.session.path+"/widget/$SearchInput/height24/icon/search.png) no-repeat center center", + "float": "right" + }, + "searchInputArea": { + "margin-right": "30px", + "margin-left": "5px", + "height": "26px" + }, + + "searchInputNode": { + "border": "0px", + "height": "24px", + "line-height": "24px", + "width": "99%", + "color": "#999999", + "background": "transparent", + "font-size": "14px" + }, + "autoCompletedNode": { + "position": "absolute", + "clear": "both", + "border-left": "1px solid #999999", + "border-right": "1px solid #999999", + "border-bottom": "1px solid #999999", + "overflow": "hidden", + "box-shadow": "0px 3px 10px #cccccc", + "background-color": "#ffffff" + }, + "searchKeyItem": { + "padding": "0px 5px", + "height": "26px", + "font-size": "14px", + "line-height": "26px", + "color": "#666666", + "cursor": "default", + "background-color": "#ffffff" + }, + "searchKeyItem_over": { + "background-color": "#f1f1f1" + } + +} \ No newline at end of file diff --git a/o2web/source/o2_core/o2/widget/$SearchInput/height24/icon/search.png b/o2web/source/o2_core/o2/widget/$SearchInput/height24/icon/search.png new file mode 100644 index 0000000000000000000000000000000000000000..0da5cff228000adc857bc7b957e7f8060bd50ba3 Binary files /dev/null and b/o2web/source/o2_core/o2/widget/$SearchInput/height24/icon/search.png differ diff --git a/o2web/source/o2_core/o2/widget/Dialog.js b/o2web/source/o2_core/o2/widget/Dialog.js index e7197ef4f28ef6a255eb0797cb57088e0cc6826a..8ea3f0a0f3fb6e9ce1fe46854f82c9f7a3babede 100644 --- a/o2web/source/o2_core/o2/widget/Dialog.js +++ b/o2web/source/o2_core/o2/widget/Dialog.js @@ -7,6 +7,8 @@ o2.widget.Dialog = o2.DL = new Class({ "title": "dialog", "width": "300", "height": "150", + "contentWidth": null, + "contentHeight": null, "top": "0", "left": "0", "fromTop": "0", @@ -19,14 +21,18 @@ o2.widget.Dialog = o2.DL = new Class({ "content": null, "isMax": false, - "isClose": true, + "isClose": false, "isResize": true, "isMove": true, + "isTitle": true, "buttons": null, "buttonList": null, "maskNode" : null, + "transition": null, + "duration": 200, + "container": null }, initialize: function(options){ @@ -93,8 +99,6 @@ o2.widget.Dialog = o2.DL = new Class({ this.node.set("styles", this.css.from); this.node.inject(this.options.container || $(document.body)); this.node.addEvent("selectstart", function(e){ - - var select = e.target.getStyle("-webkit-user-select"); if (!select) select = this.getParentSelect(e.target); if (!select){ @@ -118,6 +122,15 @@ o2.widget.Dialog = o2.DL = new Class({ this.resizeNode = this.node.getElement(".MWF_dialod_bottom_resize"); this.button = this.node.getElement(".MWF_dialod_button"); + if (!this.options.isTitle) { + this.title.destroy(); + this.title = null; + this.titleCenter = null; + this.titleRefresh = null; + this.titleText = null; + this.titleAction = null; + } + if (this.title) this.title.setStyles(this.css.MWF_dialod_title); if (this.titleCenter) this.titleCenter.setStyles(this.css.MWF_dialod_title_center); if (this.titleRefresh) this.titleRefresh.setStyles(this.css.MWF_dialod_title_refresh); @@ -145,22 +158,52 @@ o2.widget.Dialog = o2.DL = new Class({ this.titleRefresh.set("title", o2.LP.widget.refresh); }, setTitleEvent: function(){ - this.title.addEvent("mousedown", function(){ - this.containerDrag = new Drag.Move(this.node); + this.containerDrag = new Drag.Move(this.node, { + "container": (layout) ? layout.desktop.currentApp.content: null + }); }.bind(this)); this.title.addEvent("mouseup", function(){ this.node.removeEvents("mousedown"); this.title.addEvent("mousedown", function(){ - this.containerDrag = new Drag.Move(this.node); + this.containerDrag = new Drag.Move(this.node, { + "container": (layout) ? layout.desktop.currentApp.content: null + }); }.bind(this)); }.bind(this)); }, setResizeNode: function(){ //未实现................................ + if (!this.options.isResize){ + if (this.resizeNode) this.resizeNode.hide(); + }else{ + if (this.resizeNode){ + this.node.makeResizable({ + "handle": this.resizeNode || this.bottom, + "limit": {x:[200, null], y:[150, null]}, + "onDrag": function(){ + var size = this.node.getComputedSize(); + + this.css.to.width = size.totalWidth; + this.css.to.height = size.totalHeight; + + this.setContentSize(size.totalHeight, size.totalWidth); + + this.fireEvent("resize"); + }.bind(this), + "onComplete": function(){ + this.fireEvent("resizeCompleted"); + }.bind(this) + }); + } + } }, getAction: function(){ - //未实现................................ + //未完成................................ + if (this.options.isClose){ + this.closeAction = new Element("div", {"styles": this.css.closeAction}).inject(this.titleAction); + this.closeAction.addEvent("click", this.close.bind(this)); + } }, getButton: function(){ for (i in this.options.buttons){ @@ -180,24 +223,38 @@ o2.widget.Dialog = o2.DL = new Class({ "value": bt.text, "styles": this.css.button, "events": { - "click": bt.action.bind(this, this) + "click": function(e){bt.action.call(this, this, e)}.bind(this) } }).inject(this.button); }.bind(this)); } }, getContentSize: function(height, width){ - if (!height) height = this.options.height; - if (!width) width = this.options.width; + var nodeHeight, nodeWidth; + if (!height){ + if (this.options.contentHeight){ + nodeHeight = height = this.options.contentHeight.toFloat(); + }else{ + height = this.options.height.toFloat(); + } + } + if (!width){ + if (this.options.contentWidth){ + nodeWidth = width = this.options.contentWidth.toFloat(); + }else{ + width = this.options.width.toFloat(); + } + } + var offsetHeight = 0; + var offsetWidth = 0; if (this.title){ var h1 = this.title.getSize().y; var ptop1 = this.title.getStyle("padding-top").toFloat(); var pbottom1 = this.title.getStyle("padding-bottom").toFloat(); var mtop1 = this.title.getStyle("margin-top").toFloat(); var mbottom1 = this.title.getStyle("margin-bottom").toFloat(); - - height = height - h1 - ptop1 - pbottom1 - mtop1 - mbottom1; + offsetHeight += h1 + ptop1 + pbottom1 + mtop1 + mbottom1; } if (this.bottom){ var h2 = this.bottom.getSize().y; @@ -205,8 +262,8 @@ o2.widget.Dialog = o2.DL = new Class({ var pbottom2 = this.bottom.getStyle("padding-bottom").toFloat(); var mtop2 = this.bottom.getStyle("margin-top").toFloat(); var mbottom2 = this.bottom.getStyle("margin-bottom").toFloat(); - - height = height - h2 - ptop2 - pbottom2 - mtop2 - mbottom2; + + offsetHeight += h2 + ptop2 + pbottom2 + mtop2 + mbottom2; } if (this.button){ var h3 = this.button.getSize().y; @@ -214,15 +271,21 @@ o2.widget.Dialog = o2.DL = new Class({ var pbottom3 = this.button.getStyle("padding-bottom").toFloat(); var mtop3 = this.button.getStyle("margin-top").toFloat(); var mbottom3 = this.button.getStyle("margin-bottom").toFloat(); - - height = height - h3 - ptop3 - pbottom3 - mtop3 - mbottom3; + + offsetHeight += h3 + ptop3 + pbottom3 + mtop3 + mbottom3; } var ptop4 = this.content.getStyle("padding-top").toFloat(); var pbottom4 = this.content.getStyle("padding-bottom").toFloat(); var mtop4 = this.content.getStyle("margin-top").toFloat(); var mbottom4 = this.content.getStyle("margin-bottom").toFloat(); - height = height - ptop4 - pbottom4 - mtop4 - mbottom4; + offsetHeight += ptop4 + pbottom4 + mtop4 + mbottom4; + + if (nodeHeight){ + nodeHeight = nodeHeight + offsetHeight+2; + }else { + height = height - offsetHeight; + } //if (this.content.getParent().getStyle("overflow-x")!="hidden" ) height = height-18; @@ -230,8 +293,34 @@ o2.widget.Dialog = o2.DL = new Class({ var pright = this.content.getStyle("padding-right").toFloat(); var mleft = this.content.getStyle("margin-left").toFloat(); var mright = this.content.getStyle("margin-right").toFloat(); - width = width-pleft-pright-mleft-mright; + offsetWidth = pleft+pright+mleft+mright; + //width = width-pleft-pright-mleft-mright; //if (this.content.getParent().getStyle("overflow-y")!="hidden" ) width = width-18; + if (nodeWidth){ + nodeWidth = nodeWidth+offsetWidth; + }else{ + width = width-offsetWidth; + } + + + if (nodeHeight) { + this.options.height = nodeHeight; + this.options.contentHeight = null; + this.options.fromTop = this.options.fromTop.toFloat()-offsetHeight/2; + this.options.top = this.options.top.toFloat()-offsetHeight/2; + this.css.to.height = nodeHeight+"px"; + this.css.to.top = this.options.top+"px"; + this.css.from.top = this.options.fromTop+"px"; + } + if (nodeWidth){ + this.options.width = nodeWidth; + this.options.contentWidth = null; + this.options.fromLeft = this.options.fromLeft.toFloat()-offsetWidth/2; + this.options.left = this.options.left.toFloat()-offsetWidth/2; + this.css.to.width = nodeWidth+"px"; + this.css.to.left = this.options.left+"px"; + this.css.from.left = this.options.fromLeft+"px"; + } if (!height || height<0){ this.content.setStyles({"overflow": "hidden", "height": "auto", "width": ""+width+"px"}); @@ -259,8 +348,21 @@ o2.widget.Dialog = o2.DL = new Class({ this.content.setStyles(this.getContentSize(height, width)); this.content.setStyle("width", "auto"); //} - }, + reCenter: function(){ + var size = this.node.getSize(); + var container = this.options.container || $(document.body); + var p = o2.getCenter(size, container, container); + this.options.top = p.y; + this.options.left = p.x; + this.css.to.top = this.options.top+"px"; + this.css.to.left = this.options.left+"px"; + this.node.setStyles({ + "top": this.css.to.top, + "left": this.css.to.left + }); + }, + getTitle: function(){ this.titleText.set("text", this.options.title); }, @@ -296,7 +398,7 @@ o2.widget.Dialog = o2.DL = new Class({ show: function(){ if (this.options.mark) this._markShow(); if (!this.morph){ - this.morph = new Fx.Morph(this.node, {duration: 200}); + this.morph = new Fx.Morph(this.node, {duration: this.options.duration, "transition": this.options.transition}); } if (this.fireEvent("queryShow")){ this.node.setStyle("display", "block"); @@ -317,7 +419,7 @@ o2.widget.Dialog = o2.DL = new Class({ }, hide: function() { if (!this.morph){ - this.morph = new Fx.Morph(this.node, {duration: 200}); + this.morph = new Fx.Morph(this.node, {duration: this.options.duration, "transition": this.options.transition}); } if (this.fireEvent("queryHide")){ if (this.titleText) this.titleText.set("text", ""); @@ -332,7 +434,7 @@ o2.widget.Dialog = o2.DL = new Class({ }, close: function(){ if (!this.morph){ - this.morph = new Fx.Morph(this.node, {duration: 200}); + this.morph = new Fx.Morph(this.node, {duration: this.options.duration, "transition": this.options.transition}); } if (this.fireEvent("queryClose")){ diff --git a/o2web/source/o2_core/o2/xAction/RestActions.js b/o2web/source/o2_core/o2/xAction/RestActions.js index e77c177f45be67dcee1f0e51b235197dc0b6a372..494de2b0edd3a09ba5d7c1679c1d2ec91c7aca45 100644 --- a/o2web/source/o2_core/o2/xAction/RestActions.js +++ b/o2web/source/o2_core/o2/xAction/RestActions.js @@ -27,6 +27,69 @@ MWF.xAction.RestActions = MWF.Actions = { address = layout.config.app_protocol+"//"+host+(port=="80" ? "" : ":"+port); } return address; + }, + "invokeAsync": function(actions, callback){ + var len = actions.length; + var parlen = arguments.length-2; + var res = []; + var jsons = new Array(len-1); + var args = arguments; + + var cbs = (o2.typeOf(callback)==="function") ? callback : callback.success; + var cbf = (o2.typeOf(callback)==="function") ? null : callback.failure; + + var cb = function(){ + if (res.length===len) cbs.apply(this, jsons); + }; + var _doError = function(xhr, text, error){ + if (xhr.status!=0){ + var errorText = error; + if (xhr){ + var json = JSON.decode(xhr.responseText); + if (json){ + errorText = json.message.trim() || "request json error"; + }else{ + errorText = "request json error: "+xhr.responseText; + } + } + MWF.xDesktop.notice("error", {x: "right", y:"top"}, errorText); + } + }; + actions.each(function(action, i){ + var par = (i++i) ? functionArguments[i] : null; + urlEncode = (n>++i) ? functionArguments[i] : true; }else{ parameters.each(function(p, x){ parameter[p] = (n>x) ? functionArguments[x] : null; @@ -88,8 +152,9 @@ MWF.xAction.RestActions.Action = new Class({ success = (n>++i) ? functionArguments[i] : null; failure = (n>++i) ? functionArguments[i] : null; async = (n>++i) ? functionArguments[i] : null; + urlEncode = (n>++i) ? functionArguments[i] : true; } - return this.action.invoke({"name": key, "async": async, "data": data, "file": file, "parameter": parameter, "success": success, "failure": failure}); + return this.action.invoke({"name": key, "async": async, "data": data, "file": file, "parameter": parameter, "success": success, "failure": failure, "urlEncode": urlEncode}); }.bind(this); } }); diff --git a/o2web/source/o2_core/o2/xAction/services/x_attendance_assemble_control.js b/o2web/source/o2_core/o2/xAction/services/x_attendance_assemble_control.js index b9d06d7147b08ce9d397d71cf6b4814d2fa951a8..3f4c30bd21bf83228cba93067bbe5267585921a5 100644 --- a/o2web/source/o2_core/o2/xAction/services/x_attendance_assemble_control.js +++ b/o2web/source/o2_core/o2/xAction/services/x_attendance_assemble_control.js @@ -34,5 +34,14 @@ MWF.xAction.RestActions.Action["x_attendance_assemble_control"] = new Class({ window.open(this.action.address+url , "_blank"); }.bind(this)); //this.action.invoke({"name": "exportAbnormalAttachment", "parameter": {"year": year, "month": month },"success": success,"failure": failure}); + }, + listHolidayByYearAndName: function(year,name,success, failure, async){ + this.action.invoke({"name": "listHolidayFilter","data": {"q_Year": year, "q_Name" : name },"async": async, "success": success, "failure": failure}); + }, + listHolidayByYearAndMonth: function(year, month, success, failure, async){ + this.action.invoke({"name": "listHolidayFilter","data": {"q_Year": year, "q_Month" : month },"async": async, "success": success, "failure": failure}); + }, + listHolidayByName: function(name,success, failure, async){ + this.action.invoke({"name": "listHolidayFilter","data": {"q_Name": name },"async": async, "success": success, "failure": failure}); } }); \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xAction/services/x_mind_assemble_control.js b/o2web/source/o2_core/o2/xAction/services/x_mind_assemble_control.js new file mode 100644 index 0000000000000000000000000000000000000000..266969b5656426cc87dad5b6517f800610b66abe --- /dev/null +++ b/o2web/source/o2_core/o2/xAction/services/x_mind_assemble_control.js @@ -0,0 +1,84 @@ +MWF.xApplication.Minder = MWF.xApplication.Minder || {}; +MWF.xApplication.Minder.Actions = MWF.xApplication.Minder.Actions || {}; +MWF.require("MWF.xDesktop.Actions.RestActions", null, false); + +MWF.xApplication.Minder.Actions.RestActions2 = new Class({ + Extends : MWF.xDesktop.Actions.RestActions, + invoke: function(option){ + this.getActions(function(){ + //name, parameter, data, async, success, failure, withCredentials, urlEncode + var action = this.actions[option.name]; + var method = action.method || "GET"; + var uri = action.uri; + if (option.parameter){ + Object.each(option.parameter, function(value, key){ + var reg = new RegExp("{"+key+"}", "g"); + if (option.urlEncode===false){ + uri = uri.replace(reg, value); + }else{ + uri = uri.replace(reg, encodeURIComponent(value)); + } + }); + } + uri = this.address+uri; + + var async = (option.async===false) ? false : true; + + var progress = (option.progress===false) ? false : true; //控制是否显示进度条 + + var callback = new MWF.xDesktop.Actions.RestActions.Callback(option.success, option.failure); + if (action.enctype && (action.enctype.toLowerCase()=="formdata")){ + this.invokeFormData(method, uri, option.data, option.file, callback, async, progress); + }else{ + var data = (option.data) ? JSON.encode(option.data) : ""; + var credentials = true; + if (option.withCredentials===false){ + credentials = false; + } + MWF.restful(method, uri, data, callback, async, credentials); + } + }.bind(this)); + }, + invokeFormData: function(method, uri, data, file, callback, async, progress){ + var xhr = new COMMON.Browser.Request(); + data.append('fileName', file.name); + if (xhr.upload && progress){ + this.invokeFormDataWithProgress(xhr, method, uri, data, file, callback, async); + }else{ + this.invokeFormDataWithoutProgress(xhr, method, uri, data, file, callback, async); + } + }, + invokeFormDataWithoutProgress: function(xhr, method, uri, data, file, callback, async){ + var messageItem = null; + var currentDate = new Date(); + + xhr.addEventListener("readystatechange", function(e){ + if (xhr.readyState == 4){ + //this.transferComplete(e, xhr, messageItem, currentDate, file) + this.xhrStateChange(e, xhr, messageItem, callback); + } + }.bind(this), false); + + xhr.open(method, uri, true); + xhr.withCredentials = true; + + //messageItem = this.addFormDataMessage(file, true); + xhr.send(data); + //this.setMessageText(messageItem, MWF.LP.desktop.action.sendStart); + } +}); + +MWF.xAction.RestActions.Action["x_mind_assemble_control"] = new Class({ + Extends: MWF.xAction.RestActions.Action, + initialize: function(root, actions){ + this.action = new MWF.xApplication.Minder.Actions.RestActions2("/xAction/services/"+root+".json", root, ""); + this.action.actions = actions; + + Object.each(this.action.actions, function(service, key){ + if (service.uri) if (!this[key]) this.createMethod(service, key); + }.bind(this)); + }, + uploadMindIcon: function(mindId, size, success, failure, formData, file, progress){ + this.action.invoke({"name": "uploadMindIcon", "parameter": {"mindId": mindId, "size" : size},"data": formData,"file": file,"success": success,"failure": failure, "progress" : progress}); + } +}); \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xAction/services/x_mind_assemble_control.json b/o2web/source/o2_core/o2/xAction/services/x_mind_assemble_control.json new file mode 100644 index 0000000000000000000000000000000000000000..1dbb16987870bcbc637c1868b84c74c31b34df53 --- /dev/null +++ b/o2web/source/o2_core/o2/xAction/services/x_mind_assemble_control.json @@ -0,0 +1,38 @@ +{ + "saveFolder": { "uri": "/jaxrs/folder/save", "method": "POST" }, + "getFolder": {"uri": "/jaxrs/folder/{id}"}, + "removeFolder": { "uri": "/jaxrs/folder/{id}", "method": "DELETE" }, + "removeFolderForce": { "uri": "/jaxrs/folder/{id}/force", "method": "DELETE" }, + "listMyFolder": {"uri": "/jaxrs/folder/tree/my"}, + + //{sharePersons:"",shareUnits:"",shareGroups:"",folderId:"",orderField:"",orderType:DESC|ASC, 默认为DESC}, + "listMySharedMind" : {"uri":"/jaxrs/mind/filter/shared/{id}/next/{count}","method": "PUT"}, + //{sharePersons:"",shareUnits:"",shareGroups:""}, + "shareMind" : {"uri":"/jaxrs/mind/share/{id}","method": "PUT"}, + //根据分享记录ID取消对脑图的分享 + "cancelShareMind" : {"uri":"/jaxrs/mind/share/{shareId}/cancel","method": "PUT"}, + "listShareRecordsWithMindId" : {"uri":"/jaxrs/mind/list/{id}/shareRecords"}, + + "listMyRecycledMind" : {"uri":"/jaxrs/mind/filter/recycle/{id}/next/{count}","method": "PUT"}, + + "listMyReceivedMind" : {"uri":"/jaxrs/mind/filter/recived/{id}/next/{count}","method": "PUT"}, + + "saveMind" : { "uri" : "/jaxrs/mind/save" , "method": "POST" }, + "getMind" : { "uri" : "/jaxrs/mind/view/{id}" }, //带正文 + "getMindBaseInfor" : { "uri" : "/jaxrs/mind/{id}" }, //基本信息,不带正文 + "deleteMind": { "uri": "/jaxrs/mind/{id}/destorymind", "method": "DELETE" }, + "recycleMind" : {"uri":"/jaxrs/mind/recycle/{id}", "method": "DELETE" }, //放入回收站 + "destroyFromRecycle" : {"uri":"/jaxrs/mind/{recycleId}/destoryrecycle", "method": "DELETE" }, //放入回收站 + "restoreMind" : {"uri":"/jaxrs/mind/restore/{id}"}, //从回收站恢复 + //{"name":"","folderId":"root","description":"","creator":"","creatorUnit":"","shared":"","orderField":"","orderType":""} + "listNextMindWithFilter" : {"uri":"/jaxrs/mind/filter/list/{id}/next/{count}", "method": "PUT"}, + + "uploadMindIcon" : {"uri":"/jaxrs/mind/{mindId}/icon/size/{size}", "method": "POST", "enctype": "formData"}, + "getMindIcon" : {"uri":"/jaxrs/mind/{id}/icon"}, + + "listVersionsWithMindId" : {"uri":"/jaxrs/mind/list/{id}/version"}, //根据脑图ID获取脑图所有的版本信息 + "viewMindVersionWithId": {"uri":"/jaxrs/mind/version/{versionid}"}, //根据历史版本信息ID获取脑图信息,包括脑图内容 + + + "clazz": "x_mind_assemble_control" +} \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.json b/o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.json index 4f2598aaf9d92bcbb9458cc2e2cde28f9b66be6a..d1956bed570d76d71ea0567bd27d9b15d4f61bc3 100644 --- a/o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.json +++ b/o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.json @@ -6,15 +6,16 @@ "listWorkNext": {"uri": "/jaxrs/work/list/{id}/next/{count}/application/{applicationId}"}, "listWorkPrev": {"uri": "/jaxrs/work/list/{id}/prev/{count}/application/{applicationId}"}, - "listProcess": {"uri": "/jaxrs/work/list/count/application/{applicationId}/process"}, + "listProcessCount": {"uri": "/jaxrs/work/list/count/application/{applicationId}/process"}, "listWorkNextManage": {"uri": "/jaxrs/work/list/{id}/next/{count}/application/{applicationId}/manage"}, "listWorkPrevManage": {"uri": "/jaxrs/work/list/{id}/prev/{count}/application/{applicationId}/manage"}, - "listProcessManage": {"uri": "/jaxrs/work/list/count/application/{applicationId}/process/manage"}, + "listProcessCountManage": {"uri": "/jaxrs/work/list/count/application/{applicationId}/process/manage"}, + "listAssignments": {"uri": "/jaxrs/work/{id}/assignment/manage"}, "listRelatives": {"uri": "/jaxrs/work/{id}/relative/manage"}, "listWorkByJob": {"uri": "/jaxrs/job/{job}/find/work/workcompleted"}, - "listTaskByWork": {"uri": "/jaxrs/work/{id}/assignment/manage"}, + "listAssignmentByWork": {"uri": "/jaxrs/work/{id}/assignment/manage"}, "listWorkFilter": {"uri": "/jaxrs/work/list/{id}/next/{count}/application/{applicationId}/filter", "method": "POST"}, "listFilterAttribute": {"uri": "/jaxrs/work/filter/attribute/application/{applicationId}"}, @@ -178,6 +179,8 @@ "getJobByWork": {"uri": "/jaxrs/work/{id}/complex"}, "getJobByWorkMobile": {"uri": "/jaxrs/work/{id}/complex/mobile"}, + "getLogWithWork": {"uri": "/jaxrs/worklog/list/work/{workId}"}, + "getWorkData": {"uri": "/jaxrs/data/work/{id}", "method": "GET"}, "getWorkcompletedData": {"uri": "/jaxrs/data/workcompleted/{id}", "method": "GET"}, @@ -200,6 +203,12 @@ "getAttachmentWorkcompleted": {"uri": "/jaxrs/attachment/{id}/workCompletedId/{workCompletedId}"}, "deleteAttachment": {"uri": "/jaxrs/attachment/{id}/work/{workid}", "method": "DELETE"}, + "configAttachment": {"uri": "/jaxrs/attachment/edit/{id}/work/{workId}", "method": "PUT"}, + "getAttachmentOCR": {"uri": "/jaxrs/attachment/{id}/work/{workId}/text"}, + "setAttachmentOCR": {"uri": "/jaxrs/attachment/edit/{id}/work/{workId}/text", "method": "PUT"}, + + + "retractWork": {"uri": "/jaxrs/work/{id}/retract", "method": "PUT"}, "resetWork": {"uri": "/jaxrs/task/{id}/reset", "method": "PUT"}, @@ -214,12 +223,14 @@ "getView": {"uri": "/jaxrs/view/{id}"}, //"getForm": {"uri": "/jaxrs/form/{id}"}, "getForm": {"uri": "/jaxrs/form/{id}/application/{applicationFlag}"}, - + "getScript": {"uri": "/jaxrs/script/{flag}/application/{applicationFlag}"}, +gulp "sendReaderByWork" : {"uri":"/jaxrs/read/work/{workId}", "method": "POST"}, "sendReaderByWorkCompleted" : {"uri":"/jaxrs/read/workcompleted/{workCompletedId}", "method": "POST"}, "copyAttachmentToWork" : {"uri":"/jaxrs/attachment/copy/work/{workId}", "method":"POST"}, + "listProcess": {"uri": "/jaxrs/process/list/application/{applicationFlag}"}, "getProcess": {"uri": "/jaxrs/process/{id}/complex"}, "getProcessByName": {"uri": "/jaxrs/process/{flag}/application/{applicationFlag}"}, @@ -227,6 +238,32 @@ "listFile": {"uri": "/jaxrs/file/list/application/{applicationFlag}"}, "changeSite": {"uri": "/jaxrs/attachment/{id}/work/{workId}/change/site/{site}"}, + + "addSplit": {"uri": "/jaxrs/work/{id}/add/split", "method": "PUT"}, + + "loadWork": {"uri": "/jaxrs/work/workorworkcompleted/{workOrWorkCompleted}"}, + "getWorkLog": {"uri": "/jaxrs/worklog/list/workorworkcompleted/{workOrWorkCompleted}"}, + "listAttachments": {"uri": "/jaxrs/attachment/list/workorworkcompleted/{workOrWorkCompleted}"}, + "listTaskcompleted": {"uri": "/jaxrs/taskcompleted/list/workorworkcompleted/{workOrWorkCompleted}"}, + "listReadcompleted": {"uri": "/jaxrs/readcompleted/list/workorworkcompleted/{workOrWorkCompleted}"}, + "getWorkControl": {"uri": "/jaxrs/control/workorworkcompleted/{workOrWorkCompleted}"}, + "getWorkForm": {"uri": "/jaxrs/form/workorworkcompleted/{workOrWorkCompleted}"}, + "getWorkFormMobile": {"uri": "/jaxrs/form/workorworkcompleted/{workOrWorkCompleted}/mobile"}, + + "listTaskByJob": {"uri": "/jaxrs/task/list/job/{job}"}, + "listTaskCompletedByJob": {"uri": "/jaxrs/taskcompleted/list/job/{job}"}, + "listReadByJob": {"uri": "/jaxrs/task/read/job/{job}"}, + "listReadCompletedByJob": {"uri": "/jaxrs/readcompleted/list/job/{job}"}, + + "listTaskByWork": {"uri": "/jaxrs/task/list/work/{work}"}, + "listTaskCompletedByWork": {"uri": "/jaxrs/taskcompleted/list/work/{work}"}, + "listReadByWork": {"uri": "/jaxrs/task/read/work/{work}"}, + "listReadCompletedByWork": {"uri": "/jaxrs/readcompleted/list/work/{work}"}, + + "rollback": {"uri": "/jaxrs/work/{id}/rollback", "method": "PUT"}, + "rollbackWorkcompleted": {"uri": "/jaxrs/workcompleted/{flag}/rollback", "method": "PUT"}, + + "clazz": "x_processplatform_assemble_surface" } \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xAction/services/x_query_assemble_designer.js b/o2web/source/o2_core/o2/xAction/services/x_query_assemble_designer.js index 8509d4984b2b133c839dd37001aed4875a4c8a58..f80bf767bb63ecb918dfe2c889620823b12d7b49 100644 --- a/o2web/source/o2_core/o2/xAction/services/x_query_assemble_designer.js +++ b/o2web/source/o2_core/o2/xAction/services/x_query_assemble_designer.js @@ -89,7 +89,7 @@ MWF.xAction.RestActions.Action["x_query_assemble_designer"] = new Class({ statData.data = data; }.bind(this)); }else{ - this.action.invoke({"name": "addView","data": statData, "success": function(json){ + this.action.invoke({"name": "addStat","data": statData, "success": function(json){ statData.isNewView = false; if (success) success(json); },"failure": failure}); @@ -101,5 +101,64 @@ MWF.xAction.RestActions.Action["x_query_assemble_designer"] = new Class({ }, deleteStat: function(id, success, failure, async){ this.action.invoke({"name": "removeStat", "async": async, "parameter": {"id": id}, "success": success, "failure": failure}); + }, + + saveStatement: function( data, success, failure, async){ + if ( data.id ){ + this.action.invoke({"name": "updateStatement", "async": async, "parameter": { "flag" : data.id }, "data" : data, "success": success, "failure": failure}); + }else{ + this.action.invoke({"name": "createStatement", "async": async, "data" : data, "success": success, "failure": failure}); + } + }, + + saveTable: function(data, success, failure){ + if (!data.isNewTable){ + this.updateTable(data, success, failure); + }else{ + this.addTable(data, success, failure); + } + }, + updateTable: function(tableData, success, failure){ + var data = Object.clone(tableData); + data.data = JSON.encode(tableData.data); + data.query = tableData.application; + data.queryName = tableData.applicationName; + this.action.invoke({"name": "updateTable", "data": data, "parameter": {"id": data.id},"success": success,"failure": failure}); + }, + addTable: function(tableData, success, failure){ + var data = Object.clone(tableData); + data.data = JSON.encode(tableData.data); + data.query = tableData.application; + data.queryName = tableData.applicationName; + + if (!data.id){ + this.getUUID(function(id){ + data.id = id; + this.action.invoke({"name": "addStat","data": data, "success": function(json){ + tableData.isNewTable = false; + if (success) success(json); + },"failure": failure}); + }.bind(this)); + }else{ + this.action.invoke({"name": "addStat","data": data, "success": function(json){ + tableData.isNewTable = false; + if (success) success(json); + },"failure": failure}); + } + }, + // saveTable: function( data, success, failure, async){ + // if ( data.id ){ + // this.action.invoke({"name": "updateTable", "async": async, "parameter": { "flag" : data.id }, "data" : data, "success": success, "failure": failure}); + // }else{ + // this.action.invoke({"name": "createTable", "async": async, "data" : data, "success": success, "failure": failure}); + // } + // }, + + saveRow: function(tableFlag, data, success, failure, async){ + if ( data.id ){ + this.action.invoke({"name": "updateRow", "async": async, "parameter": {"tableFlag": tableFlag, "id" : data.id }, "data" : data, "success": success, "failure": failure}); + }else{ + this.action.invoke({"name": "insertRow", "async": async, "parameter": {"tableFlag": tableFlag }, "data" : data, "success": success, "failure": failure}); + } } }); \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xAction/services/x_query_assemble_designer.json b/o2web/source/o2_core/o2/xAction/services/x_query_assemble_designer.json index 42412e65691d96bafa1941383ea537c4d1d20d5a..c1ef1e1950c366f06da1c8cad64cbf622db366fb 100644 --- a/o2web/source/o2_core/o2/xAction/services/x_query_assemble_designer.json +++ b/o2web/source/o2_core/o2/xAction/services/x_query_assemble_designer.json @@ -19,7 +19,6 @@ "removeApplication": {"uri": "/jaxrs/query/{id}","method": "DELETE"}, "deleteApplication": {"uri": "/jaxrs/query/{id}","method": "DELETE"}, - "listSelect": {"uri": "/jaxrs/select/list/query/{id}"}, "listView": {"uri": "/jaxrs/view/list/query/{id}"}, "listStat": {"uri": "/jaxrs/stat/list/query/{id}"}, @@ -52,5 +51,45 @@ "updateReveal": {"uri": "/jaxrs/reveal/{id}","method": "PUT"}, + //NeuralAction + "createModel": {"uri": "/jaxrs/neural/model","method": "POST"}, + "deleteModel": {"uri": "/jaxrs/neural/model/{modelFlag}","method": "DELETE"}, + "getModel": {"uri": "/jaxrs/neural/model/{modelFlag}"}, + "updateModel": {"uri": "/jaxrs/neural/model/{modelFlag}","method": "PUT"}, + "listModel": {"uri": "/jaxrs/neural/list/model"}, + + "generate": {"uri": "/jaxrs/neural/generate/model/{modelFlag}"}, + "learn": {"uri": "/jaxrs/neural/learn/model/{modelFlag}"}, + "stopGenerating": {"uri": "/jaxrs/neural/stop/generating/model/{modelFlag}"}, + "stopLearning": {"uri": "/jaxrs/neural/stop/learn/model/{modelFlag}"}, + "resetStatus": {"uri": "/jaxrs/neural/model/{modelFlag}/reset/status"}, + + "listStatementNext" : {"uri": "/jaxrs/statement/list/{id}/next/{count}"}, + "listStatementPrev" : {"uri": "/jaxrs/statement/list/{id}/prev/{count}"}, + "getStatement" : { "uri": "/jaxrs/statement/{flag}" }, + "updateStatement":{ "uri": "/jaxrs/statement/{flag}", "method": "PUT" }, + "createStatement":{ "uri": "/jaxrs/statement", "method": "POST" }, + "deleteStatement" : { "uri": "/jaxrs/statement/{flag}", "method": "DELETE" }, + "executeStatement" : { "uri": "/jaxrs/statement/{flag}/execute", "method": "POST" }, + + "buildAllTable" : { "uri" : "/jaxrs/table/build/all" }, //编译表对象生成实体类进行数据库建表,执行后需要重新启动. + "listTableNext" : {"uri": "/jaxrs/table/list/{id}/next/{count}"}, + "listTable" : {"uri": "/jaxrs/table/list/query/{id}"}, + "listTablePrev" : {"uri": "/jaxrs/table/list/{id}/prev/{count}"}, + "getTable" : { "uri": "/jaxrs/table/{flag}" }, + "updateTable":{ "uri": "/jaxrs/table/{flag}", "method": "PUT" }, + "createTable":{ "uri": "/jaxrs/table", "method": "POST" }, + "deleteTable" : { "uri": "/jaxrs/table/{flag}", "method": "DELETE" }, + + "listRowNext" : { "uri" : "/jaxrs/table/list/{tableFlag}/row/{id}/next/{count}" }, + "listRowPrev" : { "uri" : "/jaxrs/table/list/{tableFlag}/row/{id}/prev/{count}" }, + "listRowSelectWhere" : { "uri" : "/jaxrs/table/list/{tableFlag}/row/select/where/{where}" }, //通过where 获取表中的数据,格式为jpql语法,o.name='zhangsan' + "getRow" : { "uri": "/jaxrs/table/{tableFlag}/row/{id}" }, //获取表中某一行数据 + "updateRow":{ "uri": "/jaxrs/table/{tableFlag}/row/{id}", "method": "PUT" }, //更新指定表中指定行数据. + "insertRow":{ "uri": "/jaxrs/table/{tableFlag}/row", "method": "POST" },//插入一行 + "countRowWhere" : { "uri": "/jaxrs/table/{tableFlag}/row/count/where/{where}"},//通过where 统计数量 + "deleteRow" : { "uri": "/jaxrs/table/{tableFlag}/row/{id}", "method": "DELETE" }, //更新指定表中指定行数据. + "deleteAllRow" : { "uri": "/jaxrs/table/{tableFlag}/row/delete/all", "method": "DELETE"}, //通过where 统计数量 + "clazz": "x_query_assemble_designer" } diff --git a/o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.js b/o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.js new file mode 100644 index 0000000000000000000000000000000000000000..e8d04ea45c3bc225b8ed4e70894b35122a660359 --- /dev/null +++ b/o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.js @@ -0,0 +1,10 @@ +MWF.xAction.RestActions.Action["x_query_assemble_surface"] = new Class({ + Extends: MWF.xAction.RestActions.Action, + saveRow: function(tableFlag, data, success, failure, async){ + if ( data.id ){ + this.action.invoke({"name": "updateRow", "async": async, "parameter": {"tableFlag": tableFlag, "id" : data.id }, "data" : data, "success": success, "failure": failure}); + }else{ + this.action.invoke({"name": "insertRow", "async": async, "parameter": {"tableFlag": tableFlag }, "data" : data, "success": success, "failure": failure}); + } + } +}); \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/css.wcss b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..25643fc8723c895c63ffed098a1b685474372356 --- /dev/null +++ b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/css.wcss @@ -0,0 +1,699 @@ +{ + "desktop": { + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/desktop.jpg)", + "background-position-x": "center" + }, + "layoutNode": { + "height": "100%", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "-moz-background-size": "cover", + "-webkit-background-size": "cover", + "-o-background-size": "cover", + "background-size": "cover", + "background-image": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/desktop.jpg)" + }, + layoutTopShimNode: { + "height": "42px", + "background-color": "#000000", + "border-bottom": "1px solid #999", + "border-top": "1px solid #999", + "opacity": 0.6 + }, + "layoutTopNode": { + "height": "42px", + "position": "absolute", + "width": "100%", + "top": "0px", + "left": "0px" + }, + "desktopNode": { + "overflow": "hidden", + "-webkit-user-select": "none", + "-moz-user-select": "none" + }, + "contentNode": { + "overflow": "hidden" + }, + "naviNode": { + "height": "100px", + "overflow": "hidden", + "text-align": "center" + }, + "loadMenuAction": { + "width": "32px", + "height": "32px", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/menu.png) no-repeat center center", + "margin": "5px", + "cursor": "pointer", + "float": "left" + }, + "showDesktopAction": { + "float": "right", + "width": "8px", + "height": "42px", + "background": "transparent", + "background": "#999999", + "cursor": "pointer" + }, + "showDesktopAction_over": { + "background": "#646464" + }, + "configActionNode": { + "width": "40px", + "height": "40px", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/config.png) no-repeat center center", + "margin": "5px", + "cursor": "pointer", + "float": "left" + }, + "separateNode": { + "float": "left", + "height": "32px", + "width": "1px", + "margin": "5px", + "border-right": "1px solid #EEE", + "background-color": "#999" + }, + "taskbar": { + "margin-left": "65px", + "margin-right": "323px", + "color": "#666666", + "height": "42px" + }, + "userChatNode": { + "width": "40px", + "height": "42px", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/user.png) no-repeat center center", + "margin": "0px", + "cursor": "pointer", + "float": "right" + }, + "userChatNode_over": { + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/user_over.png) no-repeat center center" + }, + "styleActionNode": { + "width": "40px", + "height": "42px", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/style.png) no-repeat center center", + "margin": "0px", + "cursor": "pointer", + "float": "right" + }, + "styleActionNode_over": { + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/style_over.png) no-repeat center center" + + }, + "userMenuNode": { + "width": "40px", + "height": "42px", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/usermenu.png) no-repeat center center", + "margin": "0px", + "cursor": "pointer", + "float": "right" + }, + "userMenuNode_over": { + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/usermenu_over.png) no-repeat center center" + }, + + "messageActionNode": { + "width": "40px", + "height": "42px", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/message.png) no-repeat center center", + "margin": "0px", + "cursor": "pointer", + "float": "right", + "-webkit-user-select": "none", + "-moz-user-select": "none" + }, + "messageActionNode_over": { + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/message_over.png) no-repeat center center" + }, + + "clockNode": { + "width": "70px", + "height": "24px", + "line-height": "16px", + "font-family": "微软雅黑", + "font-size": "12px", + "float": "right", + "text-align": "center", + "color": "#eeeeee", + "margin": "6px" + }, + "naviNodeBottomArea": { + "width": "580px", + "height": "80px", + "margin": "10px auto", + "background-color": "#000", + "opacity": 0.3, + "border-radius": "8px", + "box-shadow": "0px 0px 10px #FFF", + "border": "1px solid #EEE" + }, + "naviNodeArea": { + "width": "560px", + "height": "80px", + "padding": "0px 10px", + "margin": "0px auto", + "border-radius": "8px", + "position": "relative", + "top": "-90px" + }, + "naviEditButton":{ + "height": "20px", + "width": "26px", + "position": "absolute", + "left": "0px", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/navi/edit.png) center center no-repeat", + "cursor": "pointer", + "opacity": 0 + }, + "mainNaviNode": { + "width": "100px", + "height": "70px", + "margin": "5px 20px", + "cursor": "pointer", + "text-align": "center", + "border-radius": "3px", + "opacity": 1, + "float": "left" + }, + "mainNaviIconNode": { + "width": "40px", + "height": "40px", + "background-repeat": "no-repeat", + "margin": "5px auto 0px auto" + }, + "mainNaviTextNode": { + "height": "20px", + "line-height": "20px", + "font-family": "微软雅黑", + "color": "#FFFFFF" + }, + "taskItemNode": { + "border-top": "1px solid #999", + "border-radius": "0px", + //"box-shadow": "0px 0px 0px #999", + "height": "41px", + "margin-top": "0px", + "margin-left": "0px", + "color": "#eeeeee", + "background": "transparent", + "float": "left", + "cursor": "pointer", + "padding": "0px 5px", + "opacity": 0.8 + }, + "taskItemNode_over": { + "background": "#333333" + }, + "taskItemNode_down": { + //"background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/taskbar/taskbg_down.png)", + //"box-shadow": "0px 0px 10px #999", + //"border": "1px solid #deefff" + }, + "taskItemNode_current": { + "color": "#333333", + "background": "#FFFFFF", + "box-shadow": "0px 0px 0px #999" + }, + "taskItemIconNode": { + "width": "28px", + "height": "42px", + "margin": "0px 0px", + "float": "left", + "background-repeat": "no-repeat", + "background-position": "center center" + }, + "taskItemCloseNode": { + "width": "16px", + "height": "42px", + "margin": "0px", + "float": "right", + "opacity": 0, + "background-repeat": "no-repeat", + "background-position": "center center", + "background-image": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/taskbar/close1.png)" + }, + "taskItemCloseNode_current": { + "width": "16px", + "height": "42px", + "margin": "0px", + "float": "right", + "opacity": 1, + "background-repeat": "no-repeat", + "background-position": "center center", + "background-image": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/taskbar/close.png)" + }, + "taskItemTextNode": { + "font-family": "微软雅黑", + "font-size": "14px", + "height": "40px", + "overflow": "hidden", + "padding": "0px 3px", + "line-height": "42px", + "white-space": "nowrap", + "text-overflow": "ellipsis", + "word-break": "keep-all" + }, + + "dsektopLnkArea": { + "width": "120px", + "height": "100%", + "overflow": "hidden", + "margin-left": "0px", + "float": "left" + }, + "dsektopLnkArea_current": { + "width": "auto", + "height": "100%", + "overflow": "hidden", + "float": "none" + }, + + "lnkMoveNode": { + "padding": "10px", + "background-color": "#eaf6fc", + "border": "2px solid #4e99be", + "box-shadow": "0px 0px 10px #000", + "border-radius": "4px", + "opacity": 0.6, + "position": "absolute" + }, + "dsektoplnkMarkNode": { + "width": "80px", + "height": "1px", + "margin": "0px 20px", + "background-color": "#FFF", + "position": "absolute", + "border": "1px solid #FFF" + }, + "desktopLnkNode": { + "width": "80px", + "height": "110px", + "overflow": "hidden", + "margin": "20px 20px", + "text-align": "center", + "border": "0px solid red", + "background": "transparent ", + "border-radius": "0px", + "cursor": "pointer" + }, + "desktopLnkNode_current": { + "width": "80px", + "height": "110px", + "overflow": "hidden", + "margin": "20px 20px", + "text-align": "center", + "border": "0px solid red", + "background-color": "#7c96a6", + "border-radius": "4px", + "cursor": "pointer" + }, + "desktopLnkIconNode": { + "background-repeat": "no-repeat", + "background-position": "center center", + "width": "80px", + "height": "80px", + "margin": "auto" + }, + "desktopLnkTitleNode": { + "width": "80px", + "height": "30px", + "line-height": "15px", + "font-family": "微软雅黑", + "font-size": "14px", + "color": "#FFF", + "text-shadow" : "1px 1px 1px #000", + "overflow": "hidden" + }, + "applicationMenuAreaMark": { + "width": "100%", + "height": "100%", + "opacity": 0, + "background-color": "#000", + "position": "absolute", + "top": "0px", + "left": "0px", + "overflow": "hidden" + }, + "applicationMenuArea": { + "width": "100%", + "height": "100%", + "position": "absolute", + "top": "0px", + "left": "0px", + "opacity": 0, + "overflow": "hidden" + }, + "applicationMenuLeftAction": { + "width": "10%", + "min-width": "64px", + "height": "100%", + "float": "left", + "cursor": "pointer", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/menu/left.png) no-repeat center center" + }, + "applicationMenuRightAction": { + "width": "10%", + "min-width": "64px", + "height": "100%", + "float": "right", + "cursor": "pointer", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/menu/right.png) no-repeat center center" + }, + "applicationMenuScrollArea": { + "height": "100%", + "margin-left": "10%", + "margin-right": "10%", + "overflow": "hidden" + }, + "applicationMenuContentArea": { + "width": "300%", + "height": "100%", + "overflow": "hidden" + }, + + "applicationMemuAppContent": { + "width": "100%", + "height": "100%", + "float": "left" + }, + "applicationMenuAppTitleArea": { + "margin-top": "40px", + "width": "100%", + "text-align": "center", + "height": "60px", + "line-height": "60px", + "font-size": "24px", + "font-weight": "bold", + "color": "#FFF" + }, + "applicationMenuAppIconScrollArea": { + "margin-bottom": "80px", + "margin-top": "10px", + "overflow": "hidden" + }, + "applicationMenuAppIconArea": { + "margin-left": "10px", + "overflow": "hidden" + }, + + "applicationMemuWidgetContent": { + "width": "100%", + "height": "100%", + "float": "left" + }, + "applicationMenuWidgetTitleArea": { + "margin-top": "40px", + "text-align": "center", + "height": "60px", + "line-height": "60px", + "font-size": "24px", + "font-weight": "bold", + "color": "#FFF" + }, + "applicationMenuWidgetScrollArea": { + "margin-bottom": "80px", + "margin-top": "10px", + "overflow": "hidden" + }, + "applicationMenuWidgetArea": { + "margin-left": "10px", + "overflow": "hidden" + }, + + "applicationMemuProcessContent": { + "width": "100%", + "height": "100%", + "float": "left" + }, + "applicationMenuProcessTitleArea": { + "margin-top": "40px", + "text-align": "center", + "height": "60px", + "line-height": "60px", + "font-size": "24px", + "font-weight": "bold", + "color": "#FFF" + }, + "applicationMenuProcessScrollArea": { + "margin-bottom": "80px", + "margin-top": "10px", + "overflow": "hidden" + }, + "applicationMenuProcessArea": { + "margin-left": "10px", + "overflow": "hidden" + }, + + "applicationMenuNode": { + "float": "left", + "margin": "10px", + "width": "100px", + "height": "120px", + "text-align": "center", + "cursor": "pointer" + }, + "applicationMenuIconNode": { + "width": "100px", + "height": "80px", + "background-repeat": "no-repeat", + "background-position": "center center" + }, + "applicationMenuSearchBar": { + "height": "120px", + "width": "100%", + "top": "0px", + "left": "0px", + "position": "absolute" + }, + "applicationMenuSearchBarBox": { + "height": "40px", + "width": "80%", + "margin": "40px auto", + "border": "1px solid #CCCCCC", + "background-color": "#EEEEEE", + "color": "#666666", + "border-radius": "8px" + }, + "applicationMenuSearchBarClose": { + "width": "40px", + "height": "40px", + "float": "right", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/close.png) no-repeat center center", + "cursor": "pointer" + }, + applicationMenuSearchBarInputBox: { + "height": "40px", + "margin-right": "40px" + }, + "applicationMenuSearchBarInput": { + "border": "0px solid #000000", + "height": "38px", + "width": "99%", + "background": "transparent", + "line-height": "38px", + "display": "block", + "margin": "auto", + "border-radius": "8px", + "font-size": "18px" + }, + "widgetMenuNode": { + "float": "left", + "margin": "10px", + "width": "150px", + "height": "140px", + "text-align": "center", + "cursor": "pointer" + }, + "widgetMenuIconNode": { + "width": "150px", + "height": "100px", + "background-repeat": "no-repeat", + "background-position": "top left" + }, + "applicationMenuTextNode": { + "height": "40px", + "line-height": "20px", + "font-family": "微软雅黑", + "font-size": "14px", + "color": "#FFF" + }, + "messageContainerMaskNode": { + "width": "360px", + "background-color": "#FFF", + "position": "absolute", + "z-index": 20, + "opacity": 1, + "display": "none" + }, + "messageContainerNode": { + "width": "360px", + "position": "absolute", + "overflow": "hidden", + "display": "none", + "border-left": "1px solid #999", + "z-index": 20 + + }, + "messageContainersScrollNode":{ + "overflow": "hidden", + "margin-right": "12px" + }, + "messageContainerContentNode": { + "padding": "5px", + "overflow": "hidden" + }, + "messageUnreadCountNode": { + "width": "40px", + "height": "20px", + "padding-top": "32px", + "background": "#CC3D3D", + "color": "#FFF", + "text-align": "center", + "font-size": "12px", + "line-height": "20px", + //"border-radius": "10px", + "position": "relative", + "z-index": 1000000, + //"top": "-3px", + //"left": "25px", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/top/message_red.png) no-repeat", + "-webkit-user-select": "none", + "-moz-user-select": "none" + }, + "messageItemNode": { + "padding": "5px", + "overflow": "hidden", + "border-bottom": "1px solid #CCC", + "background": "transparent", + "cursor": "default" + }, + "messageItemTopNode": { + "height": "30px", + "line-height": "30px", + "font-size": "16px", + "color": "#4387cd" + }, + "messageItemCloseNode": { + "height": "30px", + "width": "16px", + "float": "right", + "cursor": "pointer", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/message/close.png) no-repeat center center" + }, + "messageItemSubjectNode": { + "height": "30px", + "margin-right": "18px" + }, + "messageItemContentNode": { + "overflow": "hidden", + "color": "#333", + "font-size": "12px", + "line-height": "20px", + "word-break": "break-all" + }, + "messageItemBottomNode": { + "height": "24px", + "font-size": "12px", + "line-height": "24px" + }, + "messageItemDateNode": { + "width": "120px", + "color": "#666", + "float": "left" + }, + "messageItemActionsNode": { + "margin-left": "130px" + }, + "messageTooltipAreaNode": { + "position": "absolute", + "width": "310px", + "overflow": "hidden", + "z-index": 500000 + }, + "messageTooltipNode": { + "margin": "10px 10px 0px 0px", + "box-shadow": "0px 0px 10px #333", + "width": "300px", + "padding": "5px", + "overflow": "hidden", + "border": "1px solid #CCC", + "background": "#FFF", + "cursor": "default" + }, + + "messageContainersOperationNode": { + "height": "40px", + "overflow": "hidden" + }, + "messageContainersClearActionNode": { + "height": "24px", + "line-height": "24px", + "width": "120px", + "margin": "4px auto 12px auto", + "border": "1px solid #999", + "text-align": "center", + "border-radius": "3px", + "box-shadow": "1px 1px 3px #666", + "cursor": "pointer", + "background-color": "#FFF", + "color": "#666" + }, + "messageContainersClearActionNode_over": { + "border": "1px solid #333", + "background-color": "#666", + "box-shadow": "1px 1px 3px #666", + "color": "#FFF" + }, + "messageContainersClearActionNode_down": { + "border": "1px solid #333", + "background-color": "#666", + "box-shadow": "0px 0px 0px #333", + "color": "#FFF" + }, + + "widgetNode": { + "border": "0px solid #EEE", + "background-color": "#292c31", + "position": "absolute" + }, + "widgetTitleNode": { + "height": "36px", + "line-height": "36px", + "border-bottom": "1px solid #555", + "margin": "0px" + }, + "widgetContentScrollNode": { + "margin": "8px", + "overflow": "hidden" + }, + "widgetContentNode": { + "overflow": "hidden" + }, + "widgetTitleOpenNode": { + "height": "36px", + "width": "36px", + "float": "left", + "cursor": "pointer", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/widget/open1.png) no-repeat center center" + }, + "widgetTitleCloseNode": { + "height": "36px", + "width": "36px", + "float": "right", + "cursor": "pointer", + "background": "url("+MWF.defaultPath+"/xDesktop/$Layout/newyear/widget/close2.png) no-repeat center center" + }, + "widgetTitleTextNode": { + "height": "36px", + "font-size": "16px", + "font-weight": "bold", + "text-align": "center", + "color": "#cccccc", + "cursor": "default", + "margin": "0px 36px 0px 36px" + } +} \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/desktop.jpg b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/desktop.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ddce747d41a38046bbc2c53bff3234c2d9980414 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/desktop.jpg differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/login/pass.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/login/pass.png new file mode 100644 index 0000000000000000000000000000000000000000..8a1e85550bfc0cc3a5454840956cebc1287975cd Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/login/pass.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/login/user.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/login/user.png new file mode 100644 index 0000000000000000000000000000000000000000..83d4eb9016dee16de650a1bf710790e405f38bfa Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/login/user.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/deploy.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/deploy.png new file mode 100644 index 0000000000000000000000000000000000000000..26a64664b89562385d9f9f5b2bf1a8154f6c92ed Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/deploy.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/find.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/find.png new file mode 100644 index 0000000000000000000000000000000000000000..60bd8adf74849d0c7a248bf6a0f10f91c32ff705 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/find.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/left.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/left.png new file mode 100644 index 0000000000000000000000000000000000000000..0a5ad0ccd45380e1e8e7e08b7827ca2a18c349b4 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/left.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/monitor.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/monitor.png new file mode 100644 index 0000000000000000000000000000000000000000..8dfae553e68268d7193296f007e9b97ea0d7c2bb Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/monitor.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/org.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/org.png new file mode 100644 index 0000000000000000000000000000000000000000..dc763d47c9b0b52ef9e7fa0d78c44f3f2b4fd46f Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/org.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process.png new file mode 100644 index 0000000000000000000000000000000000000000..e36196e84011ed17c7daa57833473df24390d1b7 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_data.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_data.png new file mode 100644 index 0000000000000000000000000000000000000000..7c0ab2b4c643f33162c0ebd80c4b0f8418acef2c Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_data.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_flow.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_flow.png new file mode 100644 index 0000000000000000000000000000000000000000..c32d25c16f8b399f0cf5681651d2871a48207627 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_flow.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_form.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_form.png new file mode 100644 index 0000000000000000000000000000000000000000..807b862cfc087b70dcdd971af3ac92688484e998 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_form.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_plugin.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_plugin.png new file mode 100644 index 0000000000000000000000000000000000000000..6187b15aec001b7080b51a5f944f07591f26cc15 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_plugin.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_rule.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_rule.png new file mode 100644 index 0000000000000000000000000000000000000000..b4aaad9a45c9abbee2d47611a6963101b64a8023 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/process_rule.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/right.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/right.png new file mode 100644 index 0000000000000000000000000000000000000000..6ade60b92b68bbf5de00f6dd6f83506cfccd1125 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/menu/right.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/message/close.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/message/close.png new file mode 100644 index 0000000000000000000000000000000000000000..43ceca9559373a5cd3d56a3a3beb3e41078566b3 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/message/close.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/cms.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/cms.png new file mode 100644 index 0000000000000000000000000000000000000000..4efd4c2da226d4f9b439d6bed5766eb59f9b774f Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/cms.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/cms_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/cms_over.png new file mode 100644 index 0000000000000000000000000000000000000000..b46f515d182c0673533118492bd3ffb3a314a267 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/cms_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/deploy.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/deploy.png new file mode 100644 index 0000000000000000000000000000000000000000..600e3148f46b6451a55c6418e0e81701bc306983 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/deploy.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/deploy_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/deploy_over.png new file mode 100644 index 0000000000000000000000000000000000000000..37da7be23e8f05660cd94640f1132a83f0e26501 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/deploy_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/edit.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/edit.png new file mode 100644 index 0000000000000000000000000000000000000000..1f3b6d07433fde53246f2383626d917a49d1249d Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/edit.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/file.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/file.png new file mode 100644 index 0000000000000000000000000000000000000000..e1c07b2421d995d10f77235a8b783904e69db21f Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/file.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/file_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/file_over.png new file mode 100644 index 0000000000000000000000000000000000000000..c81819dbc2228182cdd32911adf84b7579f68af4 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/file_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/mail.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/mail.png new file mode 100644 index 0000000000000000000000000000000000000000..31a2090d94766a4c0be55a0ba21a0622b3976642 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/mail.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/mail_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/mail_over.png new file mode 100644 index 0000000000000000000000000000000000000000..4f5dbd6b2dc1e9a069089625c9cc37b5d393ec8d Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/mail_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/monitor.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/monitor.png new file mode 100644 index 0000000000000000000000000000000000000000..202c8ec0a485ac2e32cab00362b9cb70a3363c4b Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/monitor.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/monitor_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/monitor_over.png new file mode 100644 index 0000000000000000000000000000000000000000..ce89575c8ed2ab47b627f7acd952ad9f29c55626 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/monitor_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/note.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/note.png new file mode 100644 index 0000000000000000000000000000000000000000..aff8edba89ba319c9b43d0d5e83995799d0b1a93 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/note.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/note_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/note_over.png new file mode 100644 index 0000000000000000000000000000000000000000..aea7a691a42bb412520d8b108db3d15ed4f14ad8 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/note_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/notes_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/notes_over.png new file mode 100644 index 0000000000000000000000000000000000000000..f54ddf1b3d9cf54b8aba81423005b86be561dd6f Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/notes_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/okr.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/okr.png new file mode 100644 index 0000000000000000000000000000000000000000..b56bc69ead20aa3ed82c3d25fdba069bbdf7b5f9 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/okr.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/okr_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/okr_over.png new file mode 100644 index 0000000000000000000000000000000000000000..5761483ce9c6682bf611172e2f7c088fcedfc8fc Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/okr_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/org.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/org.png new file mode 100644 index 0000000000000000000000000000000000000000..63164eb674809f74544c19d60541a74ceb9ba7be Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/org.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/org_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/org_over.png new file mode 100644 index 0000000000000000000000000000000000000000..e0bb781d39efb941e23e3524d66ba237b93bc3df Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/org_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/process.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/process.png new file mode 100644 index 0000000000000000000000000000000000000000..ef4fd74e7936b0b5100c7a87162a91c0bcf578cf Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/process.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/process_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/process_over.png new file mode 100644 index 0000000000000000000000000000000000000000..e53d0f89fe0542e7d4fd9759827545dce6edc227 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/process_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/profile.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/profile.png new file mode 100644 index 0000000000000000000000000000000000000000..e1268daacd486f6475338b128a323f455f14882b Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/profile.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/profile_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/profile_over.png new file mode 100644 index 0000000000000000000000000000000000000000..6e3b9f33b090e8d5563c9db05a832593309b0ac0 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/profile_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/task.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/task.png new file mode 100644 index 0000000000000000000000000000000000000000..369e2eb73ae7d6114af8536bf076cb181754e2a8 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/task.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/task_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/task_over.png new file mode 100644 index 0000000000000000000000000000000000000000..d4ed43b9e620d7d7c4be92e0c9d608c34f5d971b Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/navi/task_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/preview.jpg b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/preview.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d2016e9caaa041e7b7893724f3b53c329ee385ef Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/preview.jpg differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/preview_gray.jpg b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/preview_gray.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cae187e39544b4162e9d7d4e823361f2d5b3e486 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/preview_gray.jpg differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/sound/message.mp3 b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/sound/message.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..81eebbb68e5cf39526d817a945227e0a23f7b14f Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/sound/message.mp3 differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/sound/message.wav b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/sound/message.wav new file mode 100644 index 0000000000000000000000000000000000000000..84d5418e74f0c2b2f707d6c73864c7bff106f180 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/sound/message.wav differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/taskbar/close.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/taskbar/close.png new file mode 100644 index 0000000000000000000000000000000000000000..1d25d9a14b30869320178e2385179d17e4e579ac Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/taskbar/close.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/taskbar/close1.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/taskbar/close1.png new file mode 100644 index 0000000000000000000000000000000000000000..d08244deea3befb4d114f643c72c37452fab678e Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/taskbar/close1.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/close.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/close.png new file mode 100644 index 0000000000000000000000000000000000000000..ab05366f2b95cae7af3afe713061d462d5df26ac Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/close.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/config.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/config.png new file mode 100644 index 0000000000000000000000000000000000000000..02cb03d331d069e180745d91b365968c298f75be Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/config.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/desktop.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/desktop.png new file mode 100644 index 0000000000000000000000000000000000000000..273a51df30298ee2c751bf4ce5dad35932c0cdb9 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/desktop.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/menu.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/menu.png new file mode 100644 index 0000000000000000000000000000000000000000..9fbf06fe166cf7a53ffe078e3af21f1663e13c1b Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/menu.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/menu1.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/menu1.png new file mode 100644 index 0000000000000000000000000000000000000000..53b3cbd16b3a213323baf00b9a48283aeb833269 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/menu1.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/message.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/message.png new file mode 100644 index 0000000000000000000000000000000000000000..320a588e8c7b81716802448580854cf463526f20 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/message.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/message_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/message_over.png new file mode 100644 index 0000000000000000000000000000000000000000..a64421a65e02d607301814b175c2d5c9b554bf4d Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/message_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/message_red.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/message_red.png new file mode 100644 index 0000000000000000000000000000000000000000..4567662fb14a3a7d4d15c004b3bfc8bfc53bc82f Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/message_red.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/style.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/style.png new file mode 100644 index 0000000000000000000000000000000000000000..33b22372934f178748fb12b14abc0820a5d11024 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/style.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/style_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/style_over.png new file mode 100644 index 0000000000000000000000000000000000000000..688fe6a40db7acb9f8bbd2f523f409bd4d336d6e Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/style_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/user.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/user.png new file mode 100644 index 0000000000000000000000000000000000000000..27a35952f8cb3bd7474cad2b02213aca8f664eec Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/user.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/user_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/user_over.png new file mode 100644 index 0000000000000000000000000000000000000000..fcf049923d1e3e7a959a0cdd0fed7ddfcaa100dc Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/user_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/usermenu.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/usermenu.png new file mode 100644 index 0000000000000000000000000000000000000000..de7a4d07d7d4c69074b58f26e913eb6a719a61ec Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/usermenu.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/usermenu_over.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/usermenu_over.png new file mode 100644 index 0000000000000000000000000000000000000000..db3ccadd6da11d67a0a9b0f02c0e482a37338518 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/top/usermenu_over.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/usermenu/config.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/usermenu/config.png new file mode 100644 index 0000000000000000000000000000000000000000..f02d8ac29fec8327bcaf42da0b99b153c7292dfb Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/usermenu/config.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/usermenu/logout.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/usermenu/logout.png new file mode 100644 index 0000000000000000000000000000000000000000..77bd1207e67b7a008fab0cabe5013a559cf83c91 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/usermenu/logout.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/close.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/close.png new file mode 100644 index 0000000000000000000000000000000000000000..205b11fe207de45e536c1e846338349d57d6eefd Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/close.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/close1.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/close1.png new file mode 100644 index 0000000000000000000000000000000000000000..1c01dbc43b061b8378cf1434828c594b5fa7f534 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/close1.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/close2.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/close2.png new file mode 100644 index 0000000000000000000000000000000000000000..20df6780aa567ff983f041b3eb34628b33ec04b1 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/close2.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/open.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/open.png new file mode 100644 index 0000000000000000000000000000000000000000..4ca75d32a3efd7c8206ca9db604327dc597d2e84 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/open.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/open1.png b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/open1.png new file mode 100644 index 0000000000000000000000000000000000000000..503cf899c17715726e6a07fa0722f6a4f0e940d2 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/newyear/widget/open1.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/preview.jpg b/o2web/source/o2_core/o2/xDesktop/$Layout/preview.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d2016e9caaa041e7b7893724f3b53c329ee385ef Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/preview.jpg differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Layout/preview_gray.jpg b/o2web/source/o2_core/o2/xDesktop/$Layout/preview_gray.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cae187e39544b4162e9d7d4e823361f2d5b3e486 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Layout/preview_gray.jpg differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/css.wcss b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..8d5c75662b978823bf2c1cf60693b28672a35f16 --- /dev/null +++ b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/css.wcss @@ -0,0 +1,259 @@ +{ + "from": { + "width": "1px", + "height": "1px", + "position": "absolute", + "top": $(document.body).getSize().y/2, + "left": $(document.body).getSize().x/2, + "border-style": "solid", + "border-color": "#999", + "border-width": "1px", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "border-radius": "8px", + "box-shadow": "0px 0px 10px #333", + + "padding": "0px", + "overflow": "hidden", + + "opacity": 0 + + }, + "to": { + "border-style": "solid", + "border-color": "#999", + "border-width": "1px", + "box-shadow": "0px 0px 10px #333", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "border-radius": "8px", + "font-size": "12px", + "height": "60", + "padding": "0px", + "width": "300", + "position": "absolute", + "top": "0", + "left": "0", + "overflow": "hidden", + "opacity": 1 + }, + "current": { + }, + "uncurrent": { + }, + "spacerFrom": { + "-webkit-user-select": "none", + "-moz-user-select": "none", + "width": "1px", + "height": "1px", + "position": "absolute", + "opacity": 0, + "padding": "0px", + "border-radius": "8px", + "background-color": "#333333" + //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_newyear/img/window.jpg)" + }, + "spacerTo": { + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "absolute", + "opacity": 0.9, + "border-radius": "8px", + "padding": "0px", + "background-color": "#333333" + //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_newyear/img/window.jpg)" + }, + "spacerCurrent":{ + "background-color": "#333333" + //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_newyear/img/window.jpg)" + }, + "spacerUncurrent":{ + "background-image": "", + "background-color": "#AAA" + }, + "content": { + "position": "relative", + "overflow": "hidden" + }, + "mark": { + "height": "0", + "width": "0", + "opacity": 0.3, + "position": "absolute", + "top": "0px", + "left": "0px", + "border-style": "none", + "border-width": "0", + "background-color": "#CCC" + }, + "button": { + "border": "1px solid #999", + "color": "#333", + "margin": "0px 5px" + }, + "titleAction": { + "cursor": "default" + }, + "titleRefresh": { + "width": "20px", + "height": "16px", + "margin-top": "12px", + "margin-right": "4px", + "background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_o2/img/refresh.png)", + "background-position": "center 0px", + "background-repeat": "no-repeat" + }, + "closeActionNode": { + "float": "right", + "width": "20px", + "height": "16px", + "margin-top": "10px", + "margin-right": "4px", + "background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_o2/img/close.png)", + "background-position": "center 0px", + + //"background-color": "#fff", + + "background-repeat": "no-repeat" + }, + "maxActionNode": { + "float": "right", + "width": "20px", + "height": "16px", + "margin-top": "10px", + "margin-right": "4px", + "background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_o2/img/max.png)", + "background-position": "center 0px", + + //"background-color": "#fff", + "background-repeat": "no-repeat" + }, + "restoreActionNode": { + "background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_o2/img/restore.png)" + }, + "minActionNode": { + "float": "right", + "width": "20px", + "height": "16px", + "margin-top": "10px", + "margin-right": "4px", + "background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_o2/img/min.png)", + "background-position": "center 0px", + //"background-color": "#fff", + "background-repeat": "no-repeat" + }, + "titleActionOver": { + "background-position": "center -16px" + }, + "titleActionOut": { + "background-position": "center 0px" + }, + "titleActionDown": { + "background-position": "center -32px" + }, + + "windowNodeMax": { + "box-shadow": "0px 0px 0px #333", + "border-radius": "0px" + }, + + "windowTitleMax": { + "height": "20px", + "border-bottom": "1px solid #999", + "overflow": "hidden", + "line-height": "20px", + "font-size": "12px", + "background-color": "#e6e6e6" + }, + "windowTitleRefreshMax": { + "width": "20px", + "height": "16px", + "margin-top": "2px", + "margin-right": "4px", + "background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_o2/img/refresh_max.png)", + "background-position": "center 0px" + }, + "windowTitleTextMax": { + "height": "20px", + "float": "left", + "cursor": "default", + "display": "none" + }, + "windowTitleActionMax": { + "height": "20px" + }, + "windowActionNodeMax": { + "margin-top": "2px" + }, + "windowTitleRestore": { + "height": "40px", + "border-bottom": "0px solid #999", + "overflow": "hidden", + "line-height": "40px", + "font-size": "14px", + "background-color": "transparent", + "color": "#FFF" + }, + "windowTitleTextRestore": { + "height": "40px", + "display": "block" + }, + "windowTitleActionRestore": { + "height": "40px" + }, + "windowNodeRestore": { + "box-shadow": "0px 0px 10px #333", + "border-radius": "8px" + }, + + "MWF_dialod_title": { + "height":"40px", + "font-size":"14px", + "line-height":"40px", + "font-weight": "400", + "color": "#FFF" + }, + "MWF_dialod_title_refresh": { + "height": "26px", + "margin-top": "14px", + "width": "40px", + "float": "left", + "margin-left": "10px" + }, + "MWF_dialod_title_text": { + "height": "40px", + "float": "left", + "cursor": "default" + }, + "MWF_dialod_title_action": { + "height": "40px", + "float": "right" + }, + "MWF_dialod_under": { + "overflow": "hidden", + "background-color": "#EEEEEE" + }, + "MWF_dialod_content": { + "margin": "0px", + "margin-bottom": "0px", + "background-color": "#EEEEEE", + "overflow": "auto", + "text-align": "left", + "padding": "0px" + }, + "MWF_dialod_bottom": { + "height": "0px", + "width": "10px", + "background-color": "#EEEEEE", + "float": "right" + }, + "MWF_dialod_bottom_resize": { + "cursor": "nw-resize", + "height": "10px", + "width": "10px", + "float": "right", + "position": "relative", + "top": "-10px" + } + +} \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/dialog.html b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/dialog.html new file mode 100644 index 0000000000000000000000000000000000000000..3450309fc0da60255be3912d027b1a9b8a775cd4 --- /dev/null +++ b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/dialog.html @@ -0,0 +1,14 @@ +
+
+
+
+
+
+
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/bottom-bg.gif b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/bottom-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..72ef530c8c0757c662a974a90c719c92153c340b Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/bottom-bg.gif differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/bottom-left.gif b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/bottom-left.gif new file mode 100644 index 0000000000000000000000000000000000000000..1cc4dde832c4356e52172e36e5f8bf039f29da35 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/bottom-left.gif differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/bottom-right.gif b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/bottom-right.gif new file mode 100644 index 0000000000000000000000000000000000000000..51a24ef62325a341f52ce52eb3cac56d0335b863 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/bottom-right.gif differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/close.png b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/close.png new file mode 100644 index 0000000000000000000000000000000000000000..a1de357a7437b2c004d44bce0a0fa755b5704574 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/close.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/max.png b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/max.png new file mode 100644 index 0000000000000000000000000000000000000000..492bb8200a142fa904b0ede8a26a7bcd4b73cc6f Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/max.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/min.png b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/min.png new file mode 100644 index 0000000000000000000000000000000000000000..c0f69db3d5649085ce63b72291c8f714047c22fc Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/min.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/refresh.png b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/refresh.png new file mode 100644 index 0000000000000000000000000000000000000000..c7da49de89e6936ad46b618c9745b27ff0008dc9 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/refresh.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/refresh1.png b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/refresh1.png new file mode 100644 index 0000000000000000000000000000000000000000..55a1875386daa8c90a2e497b868ca966932444c4 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/refresh1.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/refresh_max.png b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/refresh_max.png new file mode 100644 index 0000000000000000000000000000000000000000..d0bf405a1c197bea705b252e425411e24184404f Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/refresh_max.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/restore.png b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/restore.png new file mode 100644 index 0000000000000000000000000000000000000000..f01b9fa6c6938a0fdeaea52ba62da2101b80a304 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/restore.png differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/title-bg.gif b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/title-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..a48ca6a056652b65e9cbb40c594bd743065d8588 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/title-bg.gif differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/title-left.gif b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/title-left.gif new file mode 100644 index 0000000000000000000000000000000000000000..f7aeda8c41a749b73fe32e1052ce4c2a61468e05 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/title-left.gif differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/title-right.gif b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/title-right.gif new file mode 100644 index 0000000000000000000000000000000000000000..3e90680fe8b5c8f2f23ea44ebe1ac1b13cd7669d Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/title-right.gif differ diff --git a/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/window.jpg b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/window.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d83c4b49b1df25e972b6c353d5e6cacd9393c9a8 Binary files /dev/null and b/o2web/source/o2_core/o2/xDesktop/$Window/desktop_newyear/img/window.jpg differ diff --git a/o2web/source/o2_core/o2/xDesktop/Common.js b/o2web/source/o2_core/o2/xDesktop/Common.js index 15fa72e3a46fe55c99250078ef9f2b9abeb73cc1..4184a15e64642e540435f2b31b75ad36ead5cc06 100644 --- a/o2web/source/o2_core/o2/xDesktop/Common.js +++ b/o2web/source/o2_core/o2/xDesktop/Common.js @@ -239,7 +239,13 @@ MWF.xDesktop.getProcessFileUr = function(id, app){ url = url.replace("{applicationFlag}", app); return url }; - +MWF.xDesktop.getCMSFileUr = function(id, app){ + var root = "x_cms_assemble_control"; + var url = MWF.Actions.getHost(root)+"/"+root+MWF.Actions.get(root).action.actions.readFile.uri; + url = url.replace("{flag}", id); + url = url.replace("{applicationFlag}", app); + return url +}; MWF.xDesktop.getServiceAddress = function(config, callback){ var error = function(){ @@ -294,13 +300,6 @@ MWF.xDesktop.chooseCenter = function(config){ return center; }; MWF.xDesktop.getServiceAddressConfigArray = function(config, callback, error) { - // var center = config.center[0]; - // return MWF.restful("get", "res/config/distribute.json", null, function(json){ - // //this.serviceAddressList = json.data; - // //this.centerServer = center; - // if (callback) callback(json.data, center); - // }.bind(this)); - var requests = []; config.center.each(function(center){ requests.push( diff --git a/o2web/source/o2_core/o2/xDesktop/Dialog.js b/o2web/source/o2_core/o2/xDesktop/Dialog.js index 12b43c0323ebb466c056737483bae88ced9ea7aa..f531f7d97fdede68c6f547bb86424b5ffe915fd4 100644 --- a/o2web/source/o2_core/o2/xDesktop/Dialog.js +++ b/o2web/source/o2_core/o2/xDesktop/Dialog.js @@ -1,6 +1,6 @@ -MWF.require("MWF.widget.Dialog", null, false); -MWF.xDesktop.Dialog = new Class({ - Extends: MWF.widget.Dialog, +o2.require("MWF.widget.Dialog", null, false); +o2.xDesktop.Dialog = o2.DDL = new Class({ + Extends: o2.widget.Dialog, // _markShow: function(){ // // if (this.options.mark){ @@ -69,6 +69,15 @@ MWF.xDesktop.Dialog = new Class({ this.resizeNode = this.node.getElement(".MWF_dialod_bottom_resize"); this.button = this.node.getElement(".MWF_dialod_button"); + if (!this.options.isTitle) { + this.title.destroy(); + this.title = null; + this.titleCenter = null; + this.titleRefresh = null; + this.titleText = null; + this.titleAction = null; + } + if (this.title) this.setTitleEvent(); // if (this.titleText) this.getTitle(); if (this.content) this.getContent(); @@ -79,3 +88,68 @@ MWF.xDesktop.Dialog = new Class({ if (this.content) this.setContentSize(); } }); +o2.DL.open = function(options){ + if (!options) options = {}; + if (!options.style) options.style = "user"; + //if (!options.transition) options.transition = Fx.Transitions.Back.easeOut; + if (!options.duration) options.duration = 200; + if (options.isClose!==false) options.isClose = true; + + var size; + if (!options.width && !options.contentWidth){ + if (options.content){ + options.content.show(); + size = options.content.getComputedSize(); + options.contentWidth = size.totalWidth.toFloat(); + } + } + if (!options.height && !options.contentHeight){ + if (options.content){ + if (!size){ + options.content.show(); + size = options.content.getComputedSize(); + } + options.contentHeight = size.totalHeight.toFloat()+2; + } + } + if (!options.width && !options.contentWidth) options.width = 300; + if (!options.height && !options.contentHeight) options.height = 150; + + if (!options.container && layout){ + if (layout.desktop.currentApp){ + options.container = layout.desktop.currentApp.content; + } + } + var container = (options.positionNode || options.container || $(document.body)); + + if ((options.top===undefined ) && (options.left===undefined)){ + var p = o2.getCenter({"x":(options.width || options.contentWidth), "y": (options.height || options.contentHeight+120)}, container, container); + options.top = (p.y<0) ? 0 : p.y; + options.left = (p.x<0) ? 0 : p.x; + } + if ((options.fromTop===undefined ) && (options.fromLeft===undefined)){ + var p = o2.getCenter({"x":(options.width || options.contentWidth)*0, "y": (options.height || options.contentHeight+120)*0}, container, container); + options.fromTop = (p.y<0) ? 0 : p.y; + options.fromLeft = (p.x<0) ? 0 : p.x; + } + if (options.offset){ + if (options.offset.y){ + options.top = options.top+options.offset.y.toInt(); + options.fromTop = options.fromTop+options.offset.y.toInt(); + } + if (options.offset.x){ + options.left = options.left+options.offset.x.toInt(); + options.fromLeft = options.fromLeft+options.offset.x.toInt(); + } + } + if (options.top<0) options.top = 0; + if (options.left<0) options.left = 0; + if (options.fromTop<0) options.fromTop = 0; + if (options.fromLeft<0) options.fromLeft = 0; + + options.mark = !(options.mask===false); + + var dlg = new o2.DDL(options); + dlg.show(); + return dlg; +}; \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xDesktop/Layout.js b/o2web/source/o2_core/o2/xDesktop/Layout.js index c3ace419fd29ddb3b480951dc02ef31a6f2fcaad..796a99ae7eadb18ef89d4396204d1b7aed13a07f 100644 --- a/o2web/source/o2_core/o2/xDesktop/Layout.js +++ b/o2web/source/o2_core/o2/xDesktop/Layout.js @@ -5,6 +5,7 @@ MWF.xDesktop.requireApp = function(module, clazz, callback, async){ MWF.xApplication = MWF.xApplication || {}; MWF.require("MWF.widget.Common", null, false); MWF.require("MWF.xDesktop.Common", null, false); +MWF.require("o2.xDesktop.Dialog", null, false); MWF.require("MWF.xAction.RestActions", null, false); MWF.require("MWF.xDesktop.Menu", null, false); MWF.require("MWF.widget.UUID", null, false); @@ -26,6 +27,7 @@ MWF.xDesktop.Layout = new Class({ Implements: [Options, Events], options: { "style": "default", + "defaultStyle": "default", "topShim": "layout_top_shim", "top": "layout_top", @@ -72,6 +74,7 @@ MWF.xDesktop.Layout = new Class({ }.bind(this)); }, getStyleLoad: function(node){ + MWF.UD.getPublicData("forceLayout", function(json) { var forceStatus = null; if (json){ @@ -106,7 +109,6 @@ MWF.xDesktop.Layout = new Class({ }.bind(this)); }, loadCss: function(){ - var uri = new URI(window.location.href); var style = uri.getData("style"); var styletype = (uri.getData("styletype")); @@ -118,7 +120,7 @@ MWF.xDesktop.Layout = new Class({ this.windowCss = json.data.window; }else{ MWF.UD.deletePublicData(style); - this.options.style = "default"; + this.options.style = this.options.defaultStyle; this.cssPath = MWF.defaultPath+"/xDesktop/$Layout/"+this.options.style+"/css.wcss"; this._loadCss(); } @@ -135,7 +137,7 @@ MWF.xDesktop.Layout = new Class({ this.cssPath = MWF.defaultPath+"/xDesktop/$Layout/"+this.options.style+"/css.wcss"; this._loadCss(); if (!this.css){ - this.options.style = "default"; + this.options.style = this.options.defaultStyle; this.cssPath = MWF.defaultPath+"/xDesktop/$Layout/"+this.options.style+"/css.wcss"; this._loadCss(); } @@ -146,7 +148,7 @@ MWF.xDesktop.Layout = new Class({ this.windowCss = json.data.window; }else{ MWF.UD.deletePublicData(this.status.style); - this.options.style = "default"; + this.options.style = this.options.defaultStyle; this.cssPath = MWF.defaultPath+"/xDesktop/$Layout/"+this.options.style+"/css.wcss"; this._loadCss(); } @@ -417,7 +419,7 @@ MWF.xDesktop.Layout = new Class({ }, openApplicationWithStatus: function(appStatus){ var appName = appStatus.name; - var style = (appStatus.style) ? appStatus.style : "default"; + var style = (appStatus.style) ? appStatus.style : this.options.defaultStyle; // var appClass = "MWF.xApplication."+appName+".Main"; this.requireApp(appName, function(appNamespace){ var app = new appNamespace["Main"](this, { @@ -463,7 +465,7 @@ MWF.xDesktop.Layout = new Class({ if (this.status.apps){ Object.each(this.status.apps, function(appStatus, id){ var appName = appStatus.name; - var style = (appStatus.style) ? appStatus.style : "default"; + var style = (appStatus.style) ? appStatus.style : this.options.defaultStyle; // var appClass = "MWF.xApplication."+appName+".Main"; this.requireApp(appName, function(appNamespace){ @@ -587,7 +589,6 @@ MWF.xDesktop.Layout = new Class({ setEvent: function(){ this.node.addEvent("selectstart", function(e){ - var select = "text"; if (e.target.getStyle("-webkit-user-select")){ select = e.target.getStyle("-webkit-user-select").toString().toLowerCase(); @@ -931,6 +932,14 @@ MWF.xDesktop.Layout = new Class({ }.bind(this), widgetName); }, openApplication: function(e, appNames, options, obj, inBrowser){ + if (appNames.substring(0, 4)==="@url"){ + var url = appNames.replace(/\@url\:/i, ""); + var a = new Element("a", {"href": url, "target": "_blank"}); + a.click(); + a.destroy(); + a = null; + return true; + } var appPath = appNames.split("."); var appName = appPath[appPath.length-1]; @@ -1354,7 +1363,7 @@ MWF.xDesktop.Layout.Top = new Class({ }, showApplicationMenu: function(){ - this.applicationMenuAreaMark.fade(0.8); + this.applicationMenuAreaMark.fade(0.7); this.applicationMenuArea.fade("in"); }, closeApplicationMenu: function(){ @@ -1573,7 +1582,16 @@ MWF.xDesktop.Layout.Top = new Class({ "styles": this.layout.css.applicationMenuIconNode }).inject(applicationMenuNode); - var icon = "/x_component_"+value.path.replace(/\./g, "_")+"/$Main/"+value.iconPath; + var icon; + if (value.path.substring(0, 4)==="@url"){ + if (value.iconPath){ + icon = value.iconPath; + }else{ + icon = "/x_component_Setting/$Main/default/icon/site.png"; + } + }else{ + icon = "/x_component_"+value.path.replace(/\./g, "_")+"/$Main/"+value.iconPath; + } applicationMenuIconNode.setStyle("background-image", "url("+icon+")"); new Element("div", { diff --git a/o2web/source/o2_core/o2/xDesktop/Layout_min.js b/o2web/source/o2_core/o2/xDesktop/Layout_min.js new file mode 100644 index 0000000000000000000000000000000000000000..c543697369739babec28ab83c6ab0d8cecd9ce29 --- /dev/null +++ b/o2web/source/o2_core/o2/xDesktop/Layout_min.js @@ -0,0 +1,11 @@ +MWF.xDesktop = MWF.xDesktop || {}; +MWF.xDesktop.requireApp = function(module, clazz, callback, async){ + o2.requireApp(module, clazz, callback, async) +}; +MWF.require("MWF.widget.Common", null, false); +MWF.require("MWF.xDesktop.Common", null, false); +MWF.require("MWF.xDesktop.UserData", null, false); +MWF.require("MWF.xAction.RestActions", null, false); +MWF.require("MWF.xDesktop.Access", null, false); +MWF.require("MWF.widget.UUID", null, false); +MWF.xDesktop.requireApp("Common", "", null, false); \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xDesktop/WebSocket.js b/o2web/source/o2_core/o2/xDesktop/WebSocket.js index b06703bfef59c7aa82e6b3545f4ec0f462be8b62..4d2be56d2bb9554cff01cdebeba0c226f41501ca 100644 --- a/o2web/source/o2_core/o2/xDesktop/WebSocket.js +++ b/o2web/source/o2_core/o2/xDesktop/WebSocket.js @@ -106,7 +106,7 @@ MWF.xDesktop.WebSocket = new Class({ }, receiveTaskMessage: function(data){ //data.task - var action = new MWF.xDesktop.Actions.RestActions("/res/mwf4/package/xDesktop/Actions/action.json", "x_processplatform_assemble_surface", "x_desktop"); + var action = new MWF.xDesktop.Actions.RestActions("/o2_core/o2/xDesktop/Actions/action.json", "x_processplatform_assemble_surface", "x_desktop"); action.invoke({ "name": "getTask", "parameter": {"id": data.task}, @@ -144,7 +144,7 @@ MWF.xDesktop.WebSocket = new Class({ }); }, receiveReadMessage: function(data){ - var action = new MWF.xDesktop.Actions.RestActions("/res/mwf4/package/xDesktop/Actions/action.json", "x_processplatform_assemble_surface", "x_desktop"); + var action = new MWF.xDesktop.Actions.RestActions("/o2_core/o2/xDesktop/Actions/action.json", "x_processplatform_assemble_surface", "x_desktop"); action.invoke({ "name": "getRead", "parameter": {"id": data.read}, diff --git a/o2web/source/o2_core/o2/xScript/CMSEnvironment.js b/o2web/source/o2_core/o2/xScript/CMSEnvironment.js index 9b973349b99f7bdb2e843a0a9b01902489bd0053..d998a5ee2148e1114dbaeee72ab563acde55cfed 100644 --- a/o2web/source/o2_core/o2/xScript/CMSEnvironment.js +++ b/o2web/source/o2_core/o2/xScript/CMSEnvironment.js @@ -362,16 +362,16 @@ MWF.xScript.CMSEnvironment = function(ev){ } switch (getUnitMethod){ case "current": - var data = {"identity":(typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name,"level":flag}; - orgActions.getUnitWithIdentityAndLevel(data, function(json){ v = json.data; }, null, false); + var data = {"identityList":getNameFlag(name)}; + orgActions.listUnitWithIdentity(data, function(json){ v = json.data; v=(v&&v.length===1) ? v[0] : v }, null, false); break; case "type": var data = {"identity":(typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name,"type":flag}; orgActions.getUnitWithIdentityAndType(data, function(json){ v = json.data; }, null, false); break; case "level": - var data = {"identityList":getNameFlag(name)}; - orgActions.listUnitWithIdentity(data, function(json){ v = json.data; }, null, false); + var data = {"identity":(typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name,"level":flag}; + orgActions.getUnitWithIdentityAndLevel(data, function(json){ v = json.data; }, null, false); break; } return v; @@ -1335,10 +1335,10 @@ MWF.xScript.createCMSDict = function(application){ var encodePath = function( path ){ var arr = path.split(/\./g); - // var ar = arr.map(function(v){ - // return encodeURIComponent(v); - // }); - return arr.join("/"); + var ar = arr.map(function(v){ + return encodeURIComponent(v); + }); + return ar.join("/"); }; this.get = function(path, success, failure){ @@ -1351,7 +1351,7 @@ MWF.xScript.createCMSDict = function(application){ if (success) success(json.data); }, function(xhr, text, error){ if (failure) failure(xhr, text, error); - }, false); + }, false, false); }else{ action[ ( (enableAnonymous && type == "cms") ? "getDictRootAnonymous" : "getDictRoot" ) ](encodeURIComponent(this.name), applicationId, function(json){ value = json.data; diff --git a/o2web/source/o2_core/o2/xScript/Environment.js b/o2web/source/o2_core/o2/xScript/Environment.js index 3ea6e9c0ae8a5e362b217997274a90855791257e..02574b649619c96420db50fd5bd0406e8a23f7ed 100644 --- a/o2web/source/o2_core/o2/xScript/Environment.js +++ b/o2web/source/o2_core/o2/xScript/Environment.js @@ -25,7 +25,7 @@ MWF.xScript.Environment = function(ev){ this.setData = function(data){ this.data = getJSONData(data); this.data.save = function(callback){ - form.workAction.saveData(function(){if (callback) callback();}.bind(this), null, work.id, jData); + _form.workAction.saveData(function(){if (callback) callback();}.bind(this), null, (ev.work.id || ev.workCompleted.id), data); } }; this.setData(_data); @@ -43,12 +43,91 @@ MWF.xScript.Environment = function(ev){ "getTask": function(){return ev.task || null;}, "getWork": function(){return ev.work || ev.workCompleted;}, "getActivity": function(){return ev.activity || null;}, - "getTaskList": function(){return ev.taskList;}, - "getReadList": function(){return ev.readList;}, - "getTaskCompletedList": function(){ - //MWF.Actions.get("") - return ev.taskCompletedList; + "getTaskList": function(callback, error){ + var cb = (callback && o2.typeOf(callback)==="function") ? callback : null; + var ecb = (error && o2.typeOf(error)==="function") ? error : null; + var list; + o2.Actions.get("x_processplatform_assemble_surface").listTaskByWork(ev.work.id, function(json){ + list = json.data; + if (cb) cb(list); + }, ecb, !!cb); + return list; }, + "getTaskListByJob": function(callback, error){ + var cb = (callback && o2.typeOf(callback)==="function") ? callback : null; + var ecb = (error && o2.typeOf(error)==="function") ? error : null; + var list; + o2.Actions.get("x_processplatform_assemble_surface").listTaskByJob(ev.work.job, function(json){ + list = json.data; + if (cb) cb(list); + }, ecb, !!cb); + return list; + }, + "getReadList": function(callback, error){ + var cb = (callback && o2.typeOf(callback)==="function") ? callback : null; + var ecb = (error && o2.typeOf(error)==="function") ? error : null; + var list; + o2.Actions.get("x_processplatform_assemble_surface").listReadByWork(ev.work.id, function(json){ + list = json.data; + if (cb) cb(list); + }, ecb, !!cb); + return list; + }, + "getReadListByJob": function(callback, error){ + var cb = (callback && o2.typeOf(callback)==="function") ? callback : null; + var ecb = (error && o2.typeOf(error)==="function") ? error : null; + var list; + o2.Actions.get("x_processplatform_assemble_surface").listReadByJob(ev.work.job, function(json){ + list = json.data; + if (cb) cb(list); + }, ecb, !!cb); + return list; + }, + "getTaskCompletedList": function(callback, error){ + var cb = (callback && o2.typeOf(callback)==="function") ? callback : null; + var ecb = (error && o2.typeOf(error)==="function") ? error : null; + var list; + o2.Actions.get("x_processplatform_assemble_surface").listTaskCompletedByWork(ev.work.job, function(json){ + list = json.data; + if (cb) cb(list); + }, ecb, !!cb); + return list; + }, + "getTaskCompletedListByJob": function(callback, error){ + var cb = (callback && o2.typeOf(callback)==="function") ? callback : null; + var ecb = (error && o2.typeOf(error)==="function") ? error : null; + var list; + o2.Actions.get("x_processplatform_assemble_surface").listTaskCompletedByJob(ev.work.job, function(json){ + list = json.data; + if (cb) cb(list); + }, ecb, !!cb); + return list; + }, + "getReadCompletedList": function(callback, error){ + var cb = (callback && o2.typeOf(callback)==="function") ? callback : null; + var ecb = (error && o2.typeOf(error)==="function") ? error : null; + var list; + o2.Actions.get("x_processplatform_assemble_surface").listReadCompletedByWork(ev.work.job, function(json){ + list = json.data; + if (cb) cb(list); + }, ecb, !!cb); + return list; + }, + "getReadCompletedListByJob": function(callback, error){ + var cb = (callback && o2.typeOf(callback)==="function") ? callback : null; + var ecb = (error && o2.typeOf(error)==="function") ? error : null; + var list; + o2.Actions.get("x_processplatform_assemble_surface").listReadCompletedByJob(ev.work.job, function(json){ + list = json.data; + if (cb) cb(list); + }, ecb, !!cb); + return list; + }, + "getJobTaskList": this.getTaskListByJob, + "getJobReadList": this.getReadListByJob, + "getJobTaskCompletedList": this.getTaskCompletedListByJob, + "getJobReadCompletedList": this.getReadCompletedListByJob, + "getControl": function(){return ev.control;}, "getWorkLogList": function(){return ev.workLogList;}, "getAttachmentList": function(){return ev.attachmentList;}, @@ -453,7 +532,7 @@ MWF.xScript.Environment = function(ev){ switch (getUnitMethod){ case "current": var data = {"identityList":getNameFlag(name)}; - orgActions.f(data, function(json){ v = json.data; }, null, false); + orgActions.listUnitWithIdentity(data, function(json){ v = json.data; v=(v&&v.length===1) ? v[0] : v }, null, false); break; case "type": var data = {"identity":(typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name,"type":flag}; @@ -649,103 +728,6 @@ MWF.xScript.Environment = function(ev){ } }; - //this.view = { - // "lookup": function(view, callback){ - // getLookupAction(function(){ - // lookupAction.invoke({"name": "lookup","async": true, "parameter": {"view": view.view, "application": view.application},"success": function(json){ - // var data = { - // "grid": json.data.grid, - // "groupGrid": json.data.groupGrid - // }; - // if (callback) callback(data); - // }.bind(this)}); - // }.bind(this)); - // }, - // "select": function(view, callback, options){ - // if (view.view){ - // var viewJson = { - // "application": view.application || _form.json.application, - // "viewName": view.view || "", - // "isTitle": view.isTitle || "yes", - // "select": view.select || "multi", - // "title": view.title || "Select View" - // }; - // if (!options) options = {}; - // var width = options.width || "700"; - // var height = options.height || "400"; - // - // var size; - // if (layout.mobile){ - // size = document.body.getSize(); - // width = size.x; - // height = size.y; - // options.style = "viewmobile"; - // } - // width = width.toInt(); - // height = height.toInt(); - // - // size = _form.app.content.getSize(); - // var x = (size.x-width)/2; - // var y = (size.y-height)/2; - // if (x<0) x = 0; - // if (y<0) y = 0; - // if (layout.mobile){ - // x = 20; - // y = 0; - // } - // - // var _self = this; - // MWF.require("MWF.xDesktop.Dialog", function(){ - // var dlg = new MWF.xDesktop.Dialog({ - // "title": viewJson.title || "select view", - // "style": options.style || "view", - // "top": y, - // "left": x-20, - // "fromTop":y, - // "fromLeft": x-20, - // "width": width, - // "height": height, - // "html": "
", - // "maskNode": _form.app.content, - // "container": _form.app.content, - // "buttonList": [ - // { - // "text": MWF.LP.process.button.ok, - // "action": function(){ - // //if (callback) callback(_self.view.selectedItems); - // if (callback) callback(_self.view.getData()); - // this.close(); - // } - // }, - // { - // "text": MWF.LP.process.button.cancel, - // "action": function(){this.close();} - // } - // ] - // }); - // dlg.show(); - // - // if (layout.mobile){ - // var backAction = dlg.node.getElement(".MWF_dialod_Action_back"); - // var okAction = dlg.node.getElement(".MWF_dialod_Action_ok"); - // if (backAction) backAction.addEvent("click", function(){ - // dlg.close(); - // }.bind(this)); - // if (okAction) okAction.addEvent("click", function(){ - // //if (callback) callback(this.view.selectedItems); - // if (callback) callback(this.view.getData()); - // dlg.close(); - // }.bind(this)); - // } - // - // MWF.xDesktop.requireApp("query.Query", "Viewer", function(){ - // this.view = new MWF.xApplication.query.Query.Viewer(dlg.content.getFirst(), viewJson, {"style": "select"}); - // }.bind(this)); - // }.bind(this)); - // } - // } - //}; - this.view = { "lookup": function(view, callback, async){ var filterList = {"filterList": (view.filter || null)}; @@ -919,26 +901,6 @@ MWF.xScript.Environment = function(ev){ }.bind(this), null, false); }; - //var includedScripts = []; - //this.include = function(name, callback){ - // if (includedScripts.indexOf(name)===-1){ - // if (!this.scriptAction){ - // MWF.require("MWF.xScript.Actions.ScriptActions", null, false); - // this.scriptAction = new MWF.xScript.Actions.ScriptActions(); - // } - // this.scriptAction.getScriptByName(_form.json.application, name, includedScripts, function(json){ - // if (json.data){ - // includedScripts = includedScripts.concat(json.data.importedList); - // MWF.Macro.exec(json.data.text, this); - // if (callback) callback.apply(this); - // }else{ - // if (callback) callback.apply(this); - // } - // }.bind(this), null, false); - // }else{ - // if (callback) callback.apply(this); - // } - //}.bind(this); this.define = function(name, fun, overwrite){ var over = true; if (overwrite===false) over = false; @@ -964,6 +926,11 @@ MWF.xScript.Environment = function(ev){ "getData": function(){return new MWF.xScript.JSONData(_form.getData());}, "save": function(callback){_form.saveWork(callback);}, "close": function(){_form.closeWork();}, + + "verify": function(){ + return !(!_form.formCustomValidation("", "") | !_form.formValidation("", "")); + }, + "process": function(option){ if (option){ _form.submitWork(option.routeName, option.opinion, null, option.callback); @@ -980,11 +947,26 @@ MWF.xScript.Environment = function(ev){ }, "retract": function(option){ if (!option){ - if (_form.businessData.control["allowRetract"]) _form.retractWork(); + if (_form.businessData.control["allowAddSplit"]) _form.addSplit(); }else{ _form.doRetractWork(opinion.success, opinion.failure); } }, + "addSplit": function(option){ + if (!option){ + if (_form.businessData.control["allowRetract"]) _form.retractWork(); + }else{ + _form.addSplitWork(option.value, opinion.success, opinion.failure); + } + }, + "rollback": function(option){ + if (!option){ + if (_form.businessData.control["allowRollback"]) _form.rollback(); + }else{ + _form.doRollbackActionInvoke(option.log, opinion.success, opinion.failure); + } + }, + "print": function(application, form){ if (arguments.length){ var app = (arguments.length>1) ? arguments[0] : null; @@ -1027,6 +1009,36 @@ MWF.xScript.Environment = function(ev){ op.appId = "process.Work"+(op.workId || op.workCompletedId); layout.desktop.openApplication(this.event, "process.Work", op); }, + "openJob": function(id, choice){ + o2.Actions.get("x_processplatform_assemble_surface").listWorkByJob(id, function(json){ + var len = json.data.workList.length + json.data.workCompletedList.length; + if (len){ + if (len>1 && choice){ + //@todo......... + //............. + //.............//............. + //.............//............. + + + }else{ + if (json.data.workList.length){ + var work = json.data.workList[0]; + this.openWork(work.id, null, work.title); + }else{ + var work = json.data.workCompletedList[0]; + this.openWork(null, work.id, work.title); + } + } + } + }.bind(this)); + + // var op = options || {}; + // op.workId = id; + // op.workCompletedId = completedId; + // op.docTitle = title; + // op.appId = "process.Work"+(op.workId || op.workCompletedId); + // layout.desktop.openApplication(this.event, "process.Work", op); + }, "openDocument": function(id, title, options){ var op = options || {}; op.documentId = id; @@ -1416,9 +1428,9 @@ MWF.xScript.createDict = function(application){ if (success) success(json.data); }, function(xhr, text, error){ if (failure) failure(xhr, text, error); - }, false); + }, false, false); }else{ - action[ ( (enableAnonymous && type == "cms") ? "getDictRootAnonymous" : "getDictRoot" ) ](encodeURIComponent(this.name), applicationId, function(json){ + action[ ( (enableAnonymous && type == "cms") ? "getDictRootAnonymous" : "getDictRoot" ) ](this.name, applicationId, function(json){ value = json.data; if (success) success(json.data); }, function(xhr, text, error){ @@ -1436,7 +1448,7 @@ MWF.xScript.createDict = function(application){ if (success) success(json.data); }, function(xhr, text, error){ if (failure) failure(xhr, text, error); - }); + }, false, false); }; this.add = function(path, value, success, failure){ var p = encodePath( path ); @@ -1445,7 +1457,7 @@ MWF.xScript.createDict = function(application){ if (success) success(json.data); }, function(xhr, text, error){ if (failure) failure(xhr, text, error); - }); + }, false, false); }; this["delete"] = function(path, success, failure){ var p = encodePath( path ); @@ -1454,7 +1466,7 @@ MWF.xScript.createDict = function(application){ if (success) success(json.data); }, function(xhr, text, error){ if (failure) failure(xhr, text, error); - }); + }, false, false); }; this.destory = this["delete"]; } diff --git a/o2web/source/o2_core/o2/xScript/PageEnvironment.js b/o2web/source/o2_core/o2/xScript/PageEnvironment.js index 02467d8666485709ad01d7bda867dd14c817699a..03e7a221bd9c42b5e25c7beba1fc7ee88a1064cb 100644 --- a/o2web/source/o2_core/o2/xScript/PageEnvironment.js +++ b/o2web/source/o2_core/o2/xScript/PageEnvironment.js @@ -410,16 +410,16 @@ MWF.xScript.PageEnvironment = function(ev){ } switch (getUnitMethod){ case "current": - var data = {"identity":(typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name,"level":flag}; - orgActions.getUnitWithIdentityAndLevel(data, function(json){ v = json.data; }, null, false); + var data = {"identityList":getNameFlag(name)}; + orgActions.listUnitWithIdentity(data, function(json){ v = json.data; v=(v&&v.length===1) ? v[0] : v }, null, false); break; case "type": var data = {"identity":(typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name,"type":flag}; orgActions.getUnitWithIdentityAndType(data, function(json){ v = json.data; }, null, false); break; case "level": - var data = {"identityList":getNameFlag(name)}; - orgActions.listUnitWithIdentity(data, function(json){ v = json.data; }, null, false); + var data = {"identity":(typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name,"level":flag}; + orgActions.getUnitWithIdentityAndLevel(data, function(json){ v = json.data; }, null, false); break; } return v; diff --git a/o2web/source/o2_core/test.html b/o2web/source/o2_core/test.html new file mode 100644 index 0000000000000000000000000000000000000000..de8b6b6cf6fb6ab6d9212344d96375cb719441b8 --- /dev/null +++ b/o2web/source/o2_core/test.html @@ -0,0 +1,358 @@ + + + + + Title + + + +
+ + + + + +
+ + + + + + \ No newline at end of file diff --git a/o2web/source/o2_core/test1.html b/o2web/source/o2_core/test1.html new file mode 100644 index 0000000000000000000000000000000000000000..e6e45aac35b1392ddd94a8a1b0d3672b420e0daf --- /dev/null +++ b/o2web/source/o2_core/test1.html @@ -0,0 +1,300 @@ + + + + + Title + + + +
+ + + + +
+ + + + + + \ No newline at end of file diff --git a/o2web/source/o2_lib/kityminder/core/dist/kityminder.core.js b/o2web/source/o2_lib/kityminder/core/dist/kityminder.core.js index 59324ff448258b2f11bd6c14a32fa76dd380a465..0fd33cb97a6e118a73f810fec860aa3e86beed77 100644 --- a/o2web/source/o2_lib/kityminder/core/dist/kityminder.core.js +++ b/o2web/source/o2_lib/kityminder/core/dist/kityminder.core.js @@ -5609,14 +5609,17 @@ _p[49] = { */ var ImageCommand = kity.createClass("ImageCommand", { base: Command, - execute: function(km, url, title) { + execute: function(km, url, title, id) { var nodes = km.getSelectedNodes(); - loadImageSize(url, function(width, height) { + var url1; + if( id )var url1 = MWF.xDesktop.getImageSrc(id); + loadImageSize(url1 || url, function(width, height) { nodes.forEach(function(n) { var size = fitImageSize(width, height, km.getOption("maxImageWidth"), km.getOption("maxImageHeight")); n.setData("image", url); n.setData("imageTitle", url && title); n.setData("imageSize", url && size); + n.setData("imageId", url && id); n.render(); }); km.fire("saveScene"); @@ -5638,32 +5641,39 @@ _p[49] = { }, queryValue: function(km) { var node = km.getSelectedNode(); - return { + var json = { url: node.getData("image"), - title: node.getData("imageTitle") + title: node.getData("imageTitle"), + id : node.getData("imageId") }; + return json; } }); var ImageRenderer = kity.createClass("ImageRenderer", { base: Renderer, create: function(node) { - return new kity.Image(node.getData("image")); + var url = node.getData("imageId") ? MWF.xDesktop.getImageSrc(node.getData("imageId")) : node.getData("image"); + return new kity.Image(url); }, shouldRender: function(node) { - return node.getData("image"); + return node.getData("image") || node.getData("imageId"); }, update: function(image, node, box) { var url = node.getData("image"); var title = node.getData("imageTitle"); var size = node.getData("imageSize"); + var id = node.getData("imageId"); + var url1; + if( id )url1 = MWF.xDesktop.getImageSrc(node.getData("imageId")); var spaceTop = node.getStyle("space-top"); if (!size) return; if (title) { image.node.setAttributeNS("http://www.w3.org/1999/xlink", "title", title); } + //image.node.setAttribute("crossOrigin","Anonymous"); var x = box.cx - size.width / 2; var y = box.y - size.height - spaceTop; - image.setUrl(url).setX(x | 0).setY(y | 0).setWidth(size.width | 0).setHeight(size.height | 0); + image.setUrl(url1 || url).setX(x | 0).setY(y | 0).setWidth(size.width | 0).setHeight(size.height | 0); return new kity.Box(x | 0, y | 0, size.width | 0, size.height | 0); } }); diff --git a/o2web/source/o2_lib/mootools/plugin/mBox.js b/o2web/source/o2_lib/mootools/plugin/mBox.js new file mode 100644 index 0000000000000000000000000000000000000000..1a5f159ef8919348f36a12a03c5273952b089a60 --- /dev/null +++ b/o2web/source/o2_lib/mootools/plugin/mBox.js @@ -0,0 +1,1311 @@ +/* +--- +description: mBox is a powerful library, helping you to easily create tooltips, modal windows, notice messages and more. + +authors: Stephan Wagner + +license: MIT-style + +requires: + - core/1.4.5: '*' + - more/Element.Measure + +provides: [mBox] + +documentation: http://htmltweaks.com/mBox/Documentation +... +*/ + +var mBox = new Class({ + + Implements: [Options,Events], + + options: { + id: '', // id of the mBox wrapper (defaults to mBox_1, mBox_2, mBox_3...) + + theme: '', // themes can be defined by css, e.g. in assets/themes/mBoxMyTheme.css + + addClass: { // add additional classes to wrapper, container, title and/or footer + wrapper: '', + container: '', + content: '', + title: '', + footer: '' + }, + setStyles: { // set additional styles to wrapper, container, title and/or footer + wrapper: {}, + container: {}, + content: {}, + title: {}, + footer: {} + }, + + target: $(window), // element reference or element-id where the mBox will be opened (use 'mouse' to show mBox on mouse-position) + + attach: null, // element reference or element-id or element-classes of the elements which will open / close the mBox + event: 'click', // the event which will trigger the mBox to show (can be: 'click' || 'mouseover' (= 'mouseenter')) + preventDefault: false, // prevents the default action when clicking on attached item (e.g. prevents to follow a link when clicking on a link) + + //inject: null, // TODO element to inject the wrapper to (open and close will be disabled) + + width: 'auto', // width of the content area + height: 'auto', // height of the content area + zIndex: 8000, // z-index of wrapper + + content: null, // element reference or element-id or element classes to inject into the content, use a string to set a string as content + + setContent: + 'data-setContent', // if the attached element has the attribute data-setContent it's value will be set as new content on open + + load: null, // set to ajax to load the content from url + url: '', // the url to load the content from if load is set to ajax or iframe + reload: false, // reloads the content each time the mBox is opened + + title: null, // adds a title (element reference, element-id or string) + footer: null, // adds a footer (element reference, element-id or string) + + draggable: false, // mBox can be dragged when clicking on title + + position: { + x: 'center', // horizontal position (use array to define outside or inside positions e.g. ['right', 'inside'] or ['left', 'center']) + y: 'center' // vertical position (use array to define outside or inside positions e.g. ['top', 'inside'] or ['bottom', 'center']) + }, // the position-attributes default to 'left' and 'top', to change them to 'right' or 'bottom', define a third value in the array e.g. ['left', 'inside', 'right'] + + fixed: null, // set to false to force mBox to be absolute or true to force mBox to be fixed + + offset: { // offsets to be added to position + x: 0, + y: 0 + }, + + pointer: false, // set to true to show a pointer (at least one position value needs to be 'outside') + // set to 'right', 'left', 'top', 'bottom' to adjust the pointers position + // if you want to add an offset to the pointer, provide an array, e.g. ['left', 10] + + fade: { // set to false or 0 if you want to open/close the tooltip instantly (fade: false will open and close tooltip instantly) + open: true, + close: true + }, + fadeDuration: { // default fade duration when opening or closing (set fadeDuration: 250 to use it for open and close) + open: 200, + close: 300 + }, + fadeWhenOpen: false, // set to true if you want to fade the mBox on open even if it's already open + + overlay: false, // adds a overlay just underneath the mBox to prevent clicks on body + overlayStyles: { // set the color and the opacity of the overlay + color: 'black', + opacity: 0.75 + }, + overlayFadeDuration: 100, // default fade duration for the overlay + + transition: { // adds a transition when mBox is opened or closed, following shortcuts are availible: + // transition: ['flyin', 'flyout', 'flyinout', 'flyoutin', 'bounce', 'bouncefly'] + open: null, // you can also define your own transitions by using mootools transitions: + close: null // transition: {open: {transition: 'bounce:in', property: 'top', duration: 400, difference_start: 50, difference_end: 0} + }, + + closeOnEsc: true, // close mBox when pressing esc + closeOnClick: false, // close mBox when clicking anywhere + closeOnBoxClick: false, // close mBox when clicking on the mBox + closeOnWrapperClick: false, // close mBox when clicking on the Wrapper of the mBox (wont close when clicking on children of mBox like title, content etc.) + closeOnBodyClick: true, // close mBox when clicking anywhere except the mBox itself + closeOnMouseleave: false, // close mBox when the mouse leaves the mBox area or the attached area + + closeInTitle: false, // adds a close button in the title area // TODO won't work in tooltip title yet + //closeInContainer: false, // TODO add a close button to the container + //closeInWindow: false, // TODO add a close button to the window + + delayOpen: 0, // delay opening the mBox in ms + delayClose: 0, // delay closing the mBox in ms + delayOpenOnce: true, // set to true if you want the delay to be ignored when the mBox didnt finish closing yet + + constructOnInit: true, // true will construct the mBox once its finished initializing + openOnInit: false // true will construct (if it hasbn't been) and open the mBox once its finished initializing + + // Events: + // onInit: function() {}, + // onOpen: function() {}, + // onOpenComplete: function() {}, + // onClose: function() {}, + // onCloseComplete: function() {} + // onBoxReady: function() {} + + // onAjaxComplete: function() {} + }, + + // initialize + initialize: function(options) { + + // set global vars + this.block = false; // set this.block to true so the mBox wont be opened until set to false again + this.ignoreDelay = false; // set this.ignoreDelay to true if you want to ignore the delays until set to false again + this.ignoreDelayOnce = false; // set this.ignoreDelayOnce to true if you want to ignore the delay only for one closing / opening + + // set the options + this.setOptions(options); + + // fix options addClass, setStyles, fade, fadeDuration + this.fixOptions(); + this.getPosition(); + + // save current target in this.target + this.target = this.getTarget(); + + // set fixed to true or false depending on target + if (this.options.fixed == null) { + this.options.fixed = [$(window), $(document), $(document.body)].contains(this.target); + } + + // no pointer if target == 'mouse' + if (this.target == 'mouse') { this.options.pointer = false; } + + // targets will be saved in this.targets + this.targets = []; + + // get mBox id + this.id = (this.options.id || 'mBox' + (++mBox.currentId)); + + // add listeners to elements + this.addListeners(); + + // construct the mBox + if(this.options.constructOnInit) { + this.construct(); + } + + // fire onInit events + this.fireEvent('init').fireEvent('systemInit'); + + // open mBox on init + if(this.options.openOnInit) { + this.open(); + } + + // add this instance to global collector + mBox.instances.push(this); + }, + + // re-initialize mBox (e.g. after an ajax call) + reInit: function() { + // add listeners to new elements + this.addListeners(); + }, + + // fix options + fixOptions: function() { + if(typeof this.options.addClass == 'string') { + this.options.addClass = { + wrapper: this.options.addClass + }; + } + if(typeof this.options.setStyles == 'object' && !this.options.setStyles.wrapper && !this.options.setStyles.container && !this.options.setStyles.content && !this.options.setStyles.title && !this.options.setStyles.footer) { + this.options.setStyles = { + wrapper: this.options.setStyles + }; + } + this.options.fade = { + open: this.options.fade.open || (this.options.fade == true), + close: this.options.fade.close || (this.options.fade == true) + }; + this.options.fadeDuration = { + open: this.options.fadeDuration.open || this.options.fadeDuration, + close: this.options.fadeDuration.close || this.options.fadeDuration + }; + }, + + // contruct the mBox + construct: function() { + if(this.wrapper) { + return null; + } + // create wrapper + this.wrapper = new Element('div', { + id: this.id, + 'class': 'mBox ' + (this.defaultTheme || 'Core') + (this.options.theme ? '-' + this.options.theme : '') + ' ' + (this.options.addClass.wrapper || ''), + styles: { + zIndex: this.options.zIndex, + position: (this.options.fixed == false || Browser.ie6 || Browser.ie7) ? 'absolute' : 'fixed', + display: 'none', + opacity: 0.00001, + top: -12000, + left: -12000, + zoom: 1 + } + //}).setStyles(this.options.setStyles.wrapper || {}).inject(document.body, 'bottom'); + }).setStyles(this.options.setStyles.wrapper || {}); + + var target = $(target) || target || this.target || $(this.options.target) || this.options.target || $(this.options.attach); + if (target && typeOf(target)==="element"){ + this.wrapper.inject(target, "after"); + }else{ + this.wrapper.inject(document.body, 'bottom'); + } + + // add mouse events to wrapper + if(this.options.closeOnMouseleave) { + this.wrapper.addEvents({ + mouseenter: function(ev) { + this.open(); + }.bind(this), + mouseleave: function(ev) { + this.close(); + }.bind(this) + }); + } + + // create container (contains content, title, footer) + this.container = new Element('div', { + 'class': 'mBoxContainer' + ' ' + (this.options.addClass.container || '') + }).setStyles(this.options.setStyles.container || {}).inject(this.wrapper); + + // create content + this.content = new Element('div', { + 'class': 'mBoxContent' + ' ' + (this.options.addClass.content || ''), + styles: { + width: this.options.width, + height: this.options.height + } + }).setStyles(this.options.setStyles.content || {}).inject(this.container); + + // load content into mBox + this.load(this.options.content, this.options.title, this.options.footer, true); // TODO whats the true for? + + // fire boxReady events + this.fireEvent('systemBoxReady').fireEvent('boxReady'); + }, + + // add event listerners to elements + addListeners: function(el) { + + // get elements to add events to, if none given use this.options.attach + el = el || this.options.attach; + + elements = Array.from($(el)).combine(Array.from($$('.' + el))).combine(Array.from($$(el))).clean(); + + if(!elements || elements.length == 0) return this; + + // add elements to this.targets + this.targets.combine(elements); + + // create click or mouseenter/mouseleave events + switch(this.options.event) { + case 'mouseenter': + case 'mouseover': + var events = { + mouseenter: function(ev) { + this.target = this.getTargetFromEvent(ev); + this.source = this.getTargetElementFromEvent(ev); + this.open(); + }.bind(this), + mouseleave: function(ev) { + this.close(); + }.bind(this) + }; + break; + default: + var events = { + click: function(ev) { + if(this.options.preventDefault) { + ev.preventDefault(); + } + if(this.isOpen) { + this.close(); + } else { + this.target = this.getTargetFromEvent(ev); + this.source = this.getTargetElementFromEvent(ev); + this.open(); + } + }.bind(this) + }; + } + + // add events if not already added + $$(elements).each(function(el) { + if(!el.retrieve('mBoxElementEventsAdded' + this.id)) { + el.addEvents(events).store('mBoxElementEventsAdded' + this.id, true); + } + }.bind(this)); + }, + + // load content with ajax into mBox + loadAjax: function(sendObj) { + if(!this.ajaxRequest) { + this.ajaxRequest = new Request.HTML({ + link: 'cancel', + update: this.content, + onRequest: function() { + this.setContent(''); + this.wrapper.addClass('mBoxLoading'); + }.bind(this), + onComplete: function() { + this.wrapper.removeClass('mBoxLoading'); + if(this.options.width == 'auto' || this.options.height == 'auto') { + this.setPosition(); + } + this.fireEvent('ajaxComplete'); + }.bind(this) + }).send(); + } + this.ajaxRequest.send(sendObj); + this.ajaxLoaded = true; + }, + + // open / show the mBox + open: function(options) { + if(!this.wrapper) { + // construct the mBox + this.construct(); + } + + if(typeof options != 'object') options = {}; + + clearTimeout(this.timer); + + if(!this.isOpen && !this.block) { + + var complete = function() { + this.ignoreDelayOnce = false; + this.fireEvent('systemOpenComplete').fireEvent('openComplete'); + }.bind(this); + + var open = function(complete) { + this.isOpen = true; + + // load content from ajax + if(this.options.load == 'ajax' && this.options.url && (!this.ajaxLoaded || this.options.reload)) { + this.loadAjax({url: this.options.url}); + } + + // set target + this.target = this.getTarget(options.target || null); + + // set new content + if (this.options.setContent && this.source && this.source.getAttribute(this.options.setContent)) { + + if ($(this.source.getAttribute(this.options.setContent))) { + this.content.getChildren().setStyle('display', 'none'); + $(this.source.getAttribute(this.options.setContent)).setStyle('display', ''); + } else { + var attribute_array = this.source.getAttribute(this.options.setContent).split('|'), + content = attribute_array[0] || null, + title = attribute_array[1] || null, + footer = attribute_array[2] || null; + + this.load(content, title, footer); + } + } + + + if (this.wrapper) this.wrapper.inject(document.body, 'bottom'); + + // set new position + this.setPosition(null, options.position || null, options.offset || null); + + // fire open events + this.fireEvent('systemOpen').fireEvent('open'); + + // fade mBox + if(this.fx) { this.fx.cancel(); } + + this.wrapper.setStyles({ + display: '' + }); + + if(this.options.fadeWhenOpen) { + this.wrapper.setStyle('opacity', 0); + } + + this.fx = new Fx.Tween(this.wrapper, { + property: 'opacity', + duration: this.options.fadeDuration.open, + link: 'cancel', + onComplete: complete + })[(options.instant || !this.options.fade.open) ? 'set' : 'start'](1); + + // call complete function when showing instantly + if(options.instant || !this.options.fade.open) { + complete(); + } + + // start additional transition + var transition = this.getTransition(); + if(transition.open) { + var fx = new Fx.Tween(this.wrapper, { + property: transition.open.property || 'top', + duration: transition.open.duration || this.options.fadeDuration.open, + transition: transition.open.transition || null, + onStart: transition.open.onStart || null, + onComplete: transition.open.onComplete || null + }); + fx.start((transition.open.start || (this.wrapper.getStyle(transition.open.property || 'top').toInt() + (transition.open.difference_start || 0))), + (transition.open.end || (this.wrapper.getStyle(transition.open.property || 'top').toInt() + (transition.open.difference_end || 0)))); + } + + // attach events to document and window + this.attachEvents(); + + // add overlay + if(this.options.overlay) { + this.addOverlay((options.instant || !this.options.fade.open)); + } + + // set delay open once to true, set to false again when closing is finished + if(this.options.delayOpenOnce) { + this.delayOpenOnce = true; + } + }.bind(this); + + // delay open or close instantly + if(this.options.delayOpen > 0 && !this.ignoreDelay && !this.ignoreDelayOnce && !this.delayOpenOnce) { + this.timer = open.delay(this.options.delayOpen, this, complete); + } else { + open(complete); + } + } + return this; + }, + + // close / hide the mBox + close: function(options) { + if(typeof options != 'object') options = {}; + + clearTimeout(this.timer); + + if(this.isOpen && !this.block) { + + var complete = function() { + this.delayOpenOnce = false; + this.ignoreDelayOnce = false; + this.wrapper.setStyle('display', 'none'); + this.fireEvent('systemCloseComplete').fireEvent('closeComplete'); + + if (this.wrapper){ + var target = this.target || $(this.options.target) || this.options.target || $(this.options.attach); + if (target && typeOf(target)==="element"){ + this.wrapper.inject(target); + } + } + }.bind(this); + + var close = function(complete) { + this.isOpen = false; + + // fire close events + this.fireEvent('systemClose').fireEvent('close'); + + // detach document and window events + this.detachEvents(); + + // remove overlay + if(this.options.overlay) { + this.removeOverlay((options.instant || !this.options.fade.close)); + } + + // fade mBox + if(this.fx) { this.fx.cancel(); } + + this.fx = new Fx.Tween(this.wrapper, { + property: 'opacity', + duration: this.options.fadeDuration.close, + link: 'cancel', + onComplete: complete + })[(options.instant || !this.options.fade.close) ? 'set' : 'start'](0); + + + // call complete function when hiding instantly + if(options.instant || !this.options.fade.close) { + complete(); + } + + // start additionel transition + var transition = this.getTransition(); + if(transition.close) { + var fx = new Fx.Tween(this.wrapper, { + property: transition.close.property || 'top', + duration: transition.close.duration || this.options.fadeDuration.close, + transition: transition.close.transition || null, + onStart: transition.open.onStart || null, + onComplete: transition.open.onComplete || null + }); + fx.start((transition.close.start || (this.wrapper.getStyle(transition.close.property || 'top').toInt() + (transition.close.difference_start || 0))), + (transition.close.end || (this.wrapper.getStyle(transition.close.property || 'top').toInt() + (transition.close.difference_end || 0)))); + } + + }.bind(this); + + // delay close or close instantly + if(this.options.delayClose > 0 && !this.ignoreDelay && !this.ignoreDelayOnce) { + this.timer = close.delay(this.options.delayClose, this, complete); + } else { + close(complete); + } + } + return this; + }, + + // adds a overlay just beneath the mBox to prevent clicks on body + addOverlay: function(instant) { + if(!this.overlay) { + this.overlay = new Element('div', { styles: { + position: 'fixed', + top: 0, + left: 0, + width: '100%', + height: '100%', + zIndex: (this.wrapper.getStyle('zIndex') - 1), + background: this.options.overlayStyles.color || 'white', + opacity: 0.001, + display: 'none' + }}).set('tween', { + duration: this.options.overlayFadeDuration, + link: 'cancel' + }).inject($(document.body), 'bottom'); + } + this.overlay.setStyle('display', 'block')[instant ? 'set' : 'tween']('opacity', (this.options.overlayStyles.opacity || 0.001)); + return this; + }, + + // remove the overlay + removeOverlay: function(instant) { + if(this.overlay) { + this.overlay[instant ? 'set' : 'tween']('opacity', 0).get('tween').chain(function() { + this.overlay.setStyle('display', 'none'); + }.bind(this)); + } + return this; + }, + + // get the current or given target + getTarget: function(target) { + var target = $(target) || target || this.target || $(this.options.target) || this.options.target || $(this.options.attach); + return target == 'mouse' ? 'mouse' : this.fixOperaPositioning($(target)); + }, + + // get the target element from event target + getTargetFromEvent: function(ev) { + if(this.options.target) return this.fixOperaPositioning($(this.options.target)); + return this.getTargetElementFromEvent(ev); + }, + + // get the attached element from event + getTargetElementFromEvent: function(ev) { + if(ev && ev.target) { + if(this.targets.contains(ev.target)) return this.fixOperaPositioning(ev.target); + + var parent_element = ev.target.getParent(); + while(parent_element != null) { + if(this.targets.contains(parent_element)) { + return this.fixOperaPositioning(parent_element); + } + parent_element = parent_element.getParent(); + } + } + return null; + }, + + // TEMP: This function fixes temporarily the mootools 1.4.5 positioning bug in opera + fixOperaPositioning: function(el) { + if($(el) && !$(el).retrieve('OperaBugFixed') && el != window) { + try { + if(!($(el).getStyle('border-top-width').toInt() + $(el).getStyle('border-right-width').toInt() + $(el).getStyle('border-bottom-width').toInt() + $(el).getStyle('border-left-width').toInt())) { + $(el).setStyle('border', 0); + } + } + catch(e) {} + $(el).store('OperaBugFixed'); + } + return el; + }, + + // get cached variable position or get a clean position variable + getPosition: function(position) { + if(!position && this.position) return this.position; + position = position || this.options.position; + this.position = {}; + + // TODO shortcuts 'top' 'topRight' 'bottomLeft' etc. + + // get a clean x-position + this.position.x = (typeof position == 'object' && typeof position.x == 'number') ? + [position.x.toInt(), null] : ((typeof position != 'object' || !position.x || position.x == 'center' || (typeof position.x == 'object' && position.x[0] == 'center')) ? + ['center', null] : (['right', 'left'].contains(position.x) ? + [position.x, (this.defaultInOut || 'inside')] : ((typeof position.x == 'object' && ['right', 'left'].contains(position.x[0])) ? + [position.x[0], (['inside', 'center', 'outside'].contains(position.x[1]) ? position.x[1] : (this.defaultInOut || 'inside'))] : ['center', null]))); + + this.position.xAttribute = (this.position.x[3] == 'right' || (this.position.x[1] == 'inside' && this.position.x[0] == 'right')) ? 'right' : 'left'; + + // get a clean y-position + this.position.y = (typeof position == 'object' && typeof position.y == 'number') ? + [position.y.toInt(), null] : ((typeof position != 'object' || !position.y || position.y == 'center' || (typeof position.y == 'object' && position.y[0] == 'center')) ? + ['center', null] : (['top', 'bottom'].contains(position.y) ? + [position.y, (this.defaultInOut || 'inside')] : ((typeof position.y == 'object' && ['top', 'bottom'].contains(position.y[0])) ? + [position.y[0], (['inside', 'center', 'outside'].contains(position.y[1]) ? position.y[1] : (this.defaultInOut || 'inside'))] : ['center', null]))); + + this.position.yAttribute = (this.position.x[3] == 'bottom' || (this.position.y[1] == 'inside' && this.position.y[0] == 'bottom')) ? 'bottom' : 'top'; + + return this.position; + }, + + // get cached offset variable or get a clean one + getOffset: function(offset) { + if(!offset && this.offset) return this.offset; + offset = offset || this.options.offset; + + this.offset = {}; + this.offset.x = (typeof offset == 'number') ? offset : (!offset.x ? 0 : (offset.x.toInt() >= 0 || offset.x.toInt() < 0) ? offset.x.toInt() : 0); + this.offset.y = (typeof offset == 'number') ? offset : (!offset.y ? 0 : (offset.y.toInt() >= 0 || offset.y.toInt() < 0) ? offset.y.toInt() : 0); + + return this.offset; + }, + + // get cached pointer variable or get a clean one + getPointer: function(pointer) { + if(!pointer && this.pointer) return this.pointer; + pointer = pointer || this.options.pointer; + if(!pointer) return false; + var position = this.getPosition(); + this.pointer = {}; + if(position.y[1] == 'outside') { + this.pointer.position = (position.y[0] == 'bottom') ? 'top' : 'bottom'; + this.pointer.adjustment = (typeof pointer == 'object' && ['center', 'right', 'left'].contains(pointer[0])) ? pointer[0] : (['center', 'right', 'left'].contains(pointer) ? pointer : 'center'); + } else if(position.x[1] == 'outside') { + this.pointer.position = (position.x[0] == 'left') ? 'right' : 'left'; + this.pointer.adjustment = (typeof pointer == 'object' && ['center', 'top', 'bottom'].contains(pointer[0])) ? pointer[0] : (['center', 'top', 'bottom'].contains(pointer) ? pointer : 'center'); + } else { + return null; + } + this.pointer.offset = (typeof pointer == 'object' && pointer[1] && typeof(pointer[1].toInt()) == 'number') ? pointer[1].toInt() : 0; + + // TODO pointer with inside && inside should be possible + // TODO minimum offset if the container has a border-radius (this.container.getStyle('border-top-left-radius'); + + this.pointer.offset = this.pointer.offset < 0 ? this.pointer.offset * (-1) : this.pointer.offset; + this.pointer.offset = (this.pointer.adjustment == 'right' || this.pointer.adjustment == 'bottom') ? this.pointer.offset * (-1) : this.pointer.offset; + return this.pointer; + }, + + // get cached transition variable or get a clean one + getTransition: function() { + if(this.transition) return this.transition; + if(this.options.transition && ['flyin', 'flyout', 'flyinout', 'flyoutin', 'bounce', 'bouncein', 'bounceout', 'bounceinout', 'bouncefly'].contains(this.options.transition)) { + + this.transition = {}; + this.transition.open = { + property: (this.position.yAttribute == 'top' || this.position.yAttribute == 'bottom') ? this.position.yAttribute : this.position.xAttribute, + transition: 'quad:out', + duration: 300 + } + this.transition.close = Object.clone(this.transition.open); + + var distance = (20 * (this.position.yAttribute == 'bottom' || this.position.xAttribute == 'right' ? -1 : 1)); + + switch(this.options.transition) { + case 'flyin': // TODO flyin should only flyin + case 'flyout': + this.transition.open.difference_start = this.transition.close.difference_end = distance * (this.options.transition == 'flyin' ? (-1) : 1); + break; + case 'flyinout': + case 'flyoutin': + distance = (distance * (this.options.transition == 'flyinout' ? 1 : (-1))); + this.transition.open.difference_start = distance * (-1); + this.transition.close.difference_end = distance; + break; + case 'bounce': + case 'bouncefly': + case 'bouncein': + case 'bounceout': + case 'bounceinout': + this.transition.open.transition = 'bounce:out'; + this.transition.open.duration = 450; + this.transition.open.difference_start = distance * (-1); + if(this.options.transition == 'bounceinout' || this.options.transition == 'bounceout' || this.options.transition == 'bouncefly') { + this.transition.close.difference_end = distance * (-1); + } + break; + } + } else { + this.transition = {}; + this.transition.open = typeof this.options.transition.open != undefined ? this.options.transition.open : this.options.transition; + this.transition.close = typeof this.options.transition.close != undefined ? this.options.transition.close : this.options.transition; + } + + return this.transition; + }, + + // position the mBox + setPosition: function(target, position, offset) { + + // get variables + target = this.getTarget(target); + position = this.getPosition(position); + offset = this.getOffset(offset); + pointer = this.getPointer(); + + // attach to mouse if target == 'mouse' + if(target == 'mouse') { + posX = ((this.mouseX || 0) + 15 + offset.x); + posY = ((this.mouseY || 0) + 15 + offset.y); + this.wrapper.setStyles({ + 'left': Math.floor(posX), + 'top': Math.floor(posY) + }); + return this; + } + + // get dimensions and coordinates + if(!target || [$(window), $(document), $(document.body)].contains(target)) { + var windowScroll = this.wrapper.getStyle('position') == 'fixed' ? {x: 0, y: 0} : $(window).getScroll(), + targetDimensions = $(window).getSize(); + targetDimensions.width = targetDimensions.totalWidth = targetDimensions.x; + targetDimensions.height = targetDimensions.totalHeight = targetDimensions.y; + + var targetCoordinates = { + top: windowScroll.y, + left: windowScroll.x, + right: windowScroll.x + targetDimensions.width, + bottom: windowScroll.y + targetDimensions.height + }; + } else { + if(!this.options.fixed != true) { + this.wrapper.setStyle('position', 'absolute'); + } + var targetDimensions = target.getDimensions({computeSize: true}); + var targetCoordinates = target.getCoordinates(); + if(targetDimensions.totalWidth == 0) { + targetDimensions.width = targetDimensions.totalWidth = targetCoordinates.width; + targetDimensions.height = targetDimensions.totalHeight = targetCoordinates.height; + } + } + + // set position to current position of target + var posX = targetCoordinates.left || 0, + posY = targetCoordinates.top || 0; + + var wrapperDimensions = this.wrapper.getDimensions({computeSize: true}); + + // create pointer if not already created + if(pointer && !this.pointerElement) { + this.pointerElement = new Element('div', { + 'class': 'mBoxPointer ' + 'mBoxPointer' + pointer.position.capitalize(), + styles: {position: 'absolute'} + }).setStyle(pointer.position, 0).inject(this.wrapper, 'top'); + + // opera wont calculate the size of the pointer correctly, needs to get fixed properly + if(Browser.opera) { + var tempContainer = new Element('div', {'class': 'mBox ' + (this.defaultTheme || 'Core') + (this.options.theme ? '-' + this.options.theme : '')}).inject(document.body).grab(this.pointerElement); + this.pointerDimensions = this.pointerElement.getDimensions({computeSize: true}); + this.pointerElement.inject(this.wrapper, 'top'); + tempContainer.destroy(); + } else { + this.pointerDimensions = this.pointerElement.getDimensions({computeSize: true}); + } + + this.container.setStyle('margin-' + pointer.position, + (pointer.position == 'left' || pointer.position == 'right') ? + (this.pointerDimensions.width - this.container.getStyle('border-' + pointer.position).toInt()) : + (this.pointerDimensions.height - this.container.getStyle('border-' + pointer.position).toInt())); + } + + // adjust wrapper to pointer position + if(pointer && this.pointerElement) { + + // if position x and position y is outside, fix pointer position + if(position.x[1] == 'outside' && position.y[1] == 'outside' && pointer.adjustment == 'center') { + pointer.adjustment = (position.x[0] == 'left') ? 'right' : 'left'; + switch(position.x[0]) { + case 'left': + posX += wrapperDimensions.totalWidth - (this.pointerDimensions.width / 2); + break; + case 'right': + posX -= (this.pointerDimensions.width / 2); + break; + } + } + + // calculate pointer margin and extra offset + var wrapperOffset = 0, pointerMargin = 0, offsetPointerX = 0, offsetPointerY = 0; + + switch(pointer.adjustment) { + case 'center': + pointerMargin = (pointer.position == 'top' || pointer.position == 'bottom') ? ((wrapperDimensions.totalWidth / 2) - (this.pointerDimensions.width / 2)) : ((wrapperDimensions.totalHeight / 2) - (this.pointerDimensions.height / 2)); + break; + case 'left': + case 'right': + switch(position.x[1]) { + case 'inside': + offsetPointerX += ((this.pointerDimensions.width / 2) * -1) + ((position.x[0] == 'right') ? wrapperDimensions.totalWidth : 0); + break; + default: + if(position.x[0] == 'center') { + offsetPointerX += (wrapperDimensions.totalWidth / 2) - (this.pointerDimensions.width / 2); + } + } + posX += offsetPointerX - ((pointer.adjustment == 'right') ? (wrapperDimensions.totalWidth - this.pointerDimensions.width) : 0); + pointerMargin = (pointer.adjustment == 'right') ? (wrapperDimensions.totalWidth - this.pointerDimensions.width) : 0; + break; + case 'top': + case 'bottom': + switch(position.y[1]) { + case 'inside': + offsetPointerY += ((this.pointerDimensions.height / 2) * -1) + ((position.y[0] == 'bottom') ? wrapperDimensions.totalHeight : 0); + break; + default: + if(position.y[0] == 'center') { + offsetPointerY += (wrapperDimensions.totalHeight / 2) - (this.pointerDimensions.height / 2); + } + } + posY += offsetPointerY - ((pointer.adjustment == 'bottom') ? (wrapperDimensions.totalHeight - this.pointerDimensions.height) : 0); + pointerMargin = (pointer.adjustment == 'bottom') ? (wrapperDimensions.totalHeight - this.pointerDimensions.height) : 0; + break; + } + switch(pointer.position) { + case 'top': + case 'bottom': + posX += (pointer.offset * (-1)); + break; + case 'left': + case 'right': + posY += (pointer.offset * (-1)); + break; + } + this.pointerElement.setStyle((pointer.position == 'top' || pointer.position == 'bottom') ? 'left' : 'top', pointerMargin + pointer.offset); + } + + // get wrapper dimensions including pointer + wrapperDimensions = this.wrapper.getDimensions({computeSize: true}); + + // calculate position + switch(position.x[0]) { + case 'center': + posX += (targetDimensions.totalWidth / 2) - (wrapperDimensions.totalWidth / 2); + break; + case 'right': + posX += targetDimensions.totalWidth - (position.x[1] == 'inside' ? wrapperDimensions.totalWidth : (position.x[1] == 'center' ? (wrapperDimensions.totalWidth / 2) : 0)); + break; + case 'left': + posX -= (position.x[1] == 'outside' ? wrapperDimensions.totalWidth : (position.x[1] == 'center' ? (wrapperDimensions.totalWidth / 2) : 0)); + break; + default: + posX = position.x; + } + switch(position.y[0]) { + case 'center': + posY += (targetDimensions.totalHeight / 2) - (wrapperDimensions.totalHeight / 2); + break; + case 'bottom': + posY += targetDimensions.totalHeight - (position.y[1] == 'inside' ? wrapperDimensions.totalHeight : (position.y[1] == 'center' ? (wrapperDimensions.totalHeight / 2) : 0)); + break; + case 'top': + posY -= (position.y[1] == 'outside' ? wrapperDimensions.totalHeight : (position.y[1] == 'center' ? (wrapperDimensions.totalHeight / 2) : 0)); + break; + default: + posX = position.y; + } + + // reset wrapper positions + this.wrapper.setStyles({top: null, right: null, bottom: null, left: null}); + + // calculate 'bottom' or 'right' positions if needed + var windowDimensions = $(window).getSize(); + + if(position.xAttribute == 'right') { + posX = windowDimensions.x - (posX + wrapperDimensions.totalWidth); + } + if(position.yAttribute == 'bottom') { + posY = windowDimensions.y - (posY + wrapperDimensions.totalHeight); + } + + // add global offsets and set positions + posX = posX || 0; + posX += offset.x; + posY += offset.y; + this.wrapper.setStyle(position.xAttribute, posX.floor()); + this.wrapper.setStyle(position.yAttribute, posY.floor()); + + return this; + }, + + // set up content + setContent: function(content, where) { + if(content != null) { + if($(content) || $$('.' + content).length > 0) { + this[where || 'content'].grab($(content) || $$('.' + content)); + if($(content)) $(content).setStyle('display', ''); + } else if(content != null) { + this[where || 'content'].set('html', content); + } + } + return this; + }, + + // set up title + setTitle: function(content) { + if(content != null && !this.titleContainer) { + this.titleContainer = new Element('div', { + 'class': 'mBoxTitleContainer' + }).inject(this.container, 'top'); + + this.title = new Element('div', { + 'class': 'mBoxTitle ' + (this.options.addClass.title || ''), + styles: (this.options.setStyles.title || {}) + }).inject(this.titleContainer); + + this.wrapper.addClass('hasTitle'); + + if(this.options.draggable && window['Drag'] != null) { + new Drag(this.wrapper, { handle: this.titleContainer}); + this.titleContainer.addClass('mBoxDraggable'); + } + + if(this.options.closeInTitle) { + new Element('div', { + 'class': 'mBoxClose', + events: { + click: function() { + this.close(); + }.bind(this) + } + }).grab(new Element('div')).inject(this.titleContainer); + } + } + if(content != null) { + this.setContent(content, 'title'); + } + return this; + }, + + // set up footer + setFooter: function(content) { + if(content != null && !this.footerContainer) { + this.footerContainer = new Element('div', { + 'class': 'mBoxFooterContainer' + }).inject(this.container, 'bottom'); + + this.footer = new Element('div', { + 'class': 'mBoxFooter ' + (this.options.addClass.footer || ''), + styles: (this.options.setStyles.footer || {}) + }).inject(this.footerContainer); + + this.wrapper.addClass('hasFooter'); + } + if(content != null) { + this.setContent(content, 'footer'); + } + return this; + }, + + // set up content, title and/or footer + load: function(content, title, footer) { + this.setContent(content); + this.setTitle(title); + this.setFooter(footer); + return this; + }, + + // return the mBox as html + getHTML: function(content, title, footer) { + this.load(content, title, footer); + return '
' + this.wrapper.get('html') + '
'; + }, + + // attach events to document and window + attachEvents: function() { + + // event: close mBox when clicking esc + this.escEvent = function(ev) { + if(ev.key == 'esc') { + this.ignoreDelayOnce = true; + this.close(); + } + }.bind(this); + + if(this.options.closeOnEsc) { + $(window).addEvent('keyup', this.escEvent); + } + + // event: reposition mBox on window resize or scroll + this.resizeEvent = function(ev) { + this.setPosition(); + }.bind(this); + $(window).addEvent('resize', this.resizeEvent); + + if(this.options.fixed && (Browser.ie6 || Browser.ie7)) { + $(window).addEvent('scroll', this.resizeEvent); + } + + // event: close mBox when clicking anywhere + this.closeOnClickEvent = function(ev) { + if(this.isOpen && ($(this.options.attach) != ev.target && !$$('.' + this.options.attach).contains(ev.target))) { + this.ignoreDelayOnce = true; + this.close(); + } + }.bind(this); + + if(this.options.closeOnClick) { + $(document).addEvent('mouseup', this.closeOnClickEvent); + } + + // event: close mBox when clicking on wrapper or it's children + this.closeOnBoxClickEvent = function(ev) { + if(this.isOpen && (this.wrapper == ev.target || this.wrapper.contains(ev.target))) { + this.ignoreDelayOnce = true; + this.close(); + } + }.bind(this); + + if(this.options.closeOnBoxClick) { + $(document).addEvent('mouseup', this.closeOnBoxClickEvent); + } + + // event: close mBox when clicking on wrapper directly + this.closeOnWrapperClickEvent = function(ev) { + if(this.isOpen && this.wrapper == ev.target) { + this.ignoreDelayOnce = true; + this.close(); + } + }.bind(this); + + if(this.options.closeOnWrapperClick) { + $(document).addEvent('mouseup', this.closeOnWrapperClickEvent); + } + + // event: close mBox when clicking on body + this.closeOnBodyClickEvent = function(ev) { + if(this.isOpen && ($(this.options.attach) != ev.target && !$$('.' + this.options.attach).contains(ev.target)) && ev.target != this.wrapper && !this.wrapper.contains(ev.target)) { + this.ignoreDelayOnce = true; + this.close(); + } + }.bind(this); + + if(this.options.closeOnBodyClick) { + $(document).addEvent('mouseup', this.closeOnBodyClickEvent); + } + + // event: attach mBox to mouse position + this.mouseMoveEvent = function(ev) { + this.mouseX = ev.page.x; + this.mouseY = ev.page.y; + this.setPosition('mouse'); + }.bind(this); + + if(this.target == 'mouse') { + $(document).addEvent('mousemove', this.mouseMoveEvent); + } + }, + + // remove events from document or window + detachEvents: function() { + if(this.options.fixed && (Browser.ie6 || Browser.ie7)) { + $(window).removeEvent('scroll', this.resizeEvent); + } + $(window).removeEvent('keyup', this.keyEvent); + $(window).removeEvent('resize', this.resizeEvent); + $(document).removeEvent('mouseup', this.closeOnClickEvent); + $(document).removeEvent('mouseup', this.closeOnBoxClickEvent); + $(document).removeEvent('mouseup', this.closeOnWrapperClickEvent); + $(document).removeEvent('mouseup', this.closeOnBodyClickEvent); + $(document).removeEvent('mousemove', this.mouseMoveEvent); + }, + + // dispose of wrapper and remove it from DOM + destroy: function() { + mBox.instances.erase(this); + this.detachEvents(); + this.wrapper.dispose(); + delete this.wrapper; + } + +}); + +// store global mBox instances +mBox.instances = []; + +// use global mBox ids +mBox.currentId = 0; + +// reinit mBoxes (e.g. once an ajax has been called) +mBox.reInit = function() { + if(mBox.addConfirmEvents) { + mBox.addConfirmEvents(); + } + mBox.instances.each(function(instance) { + try { + instance.reInit(); + } + catch(e) {} + }); +}; +/* +--- +description: With mBox.Notice you can show little notices to your visitors. + +authors: Stephan Wagner + +license: MIT-style + +requires: + - mBox + - core/1.4.5: '*' + - more/Element.Measure + +provides: [mBox.Notice] + +documentation: http://htmltweaks.com/mBox/Documentation/Notice +... +*/ + +mBox.Notice = new Class({ + + Extends: mBox, + + options: { + + type: 'Default', // the type of the notice (defaults to 'default'), possible types are: 'ok', 'error', 'info', 'notice' + + position: { // to use the move tween (see below), position.y has to be 'bottom' or 'top' and both positions need to be 'inside' + x: ['left', 'inside'], + y: ['bottom', 'inside'] + }, + + offset: { + x: 30, + y: 30 + }, + + fixed: true, + + move: true, // true will move the notice box from a window edge to its position instead of fading it (when opening) + moveDuration: 500, // duration of the move-tween + + delayClose: 4000, // duration the notice will be visible + + fade: true, + + fadeDuration: { + open: 250, + close: 400 + }, + + target: $(window), + + zIndex: 1000000, + + closeOnEsc: false, + closeOnBoxClick: true, + closeOnBodyClick: false, + + openOnInit: true + }, + + // initialize parent + initialize: function(options) { + this.defaultInOut = 'inside'; + this.defaultTheme = 'Notice'; + + // add move events / options when initializing parent + options.onSystemBoxReady = function() { + this.container.addClass('mBoxNotice' + (this.options.type.capitalize() || 'Default')); + + if(this.options.move && (this.position.x[1] == 'inside' || this.position.x[0] == 'center') && this.position.y[1] == 'inside' && (this.position.y[0] == 'top' || this.position.y[0] == 'bottom')) { + + var wrapper_dimensions = this.wrapper.getDimensions({computeSize: true}); + + this.container.setStyle('position', 'absolute'); + this.container.setStyle((this.position.y[0] == 'top' ? 'bottom' : 'top'), 0); + + this.wrapper.setStyles({ + height: 0, + width: wrapper_dimensions.totalWidth, + overflowY: 'hidden' + }); + + this.options.transition = { + open: { + transition: 'linear', + property: 'height', + duration: this.options.moveDuration, + start: 0, + end: wrapper_dimensions.totalHeight + this.options.offset.y + } + }; + + this.options.offset.y = 0; + + this.options.delayClose += this.options.moveDuration; + } + }; + + // close stored notice and save new one in window + options.onSystemOpen = function() { + if($(window).retrieve('mBoxNotice')) { + $(window).retrieve('mBoxNotice').ignoreDelay = true; + $(window).retrieve('mBoxNotice').close(); + } + $(window).store('mBoxNotice', this); + }; + + // close notice automatically + options.onSystemOpenComplete = function() { + this.close(); + }; + + // destroy notice when close is complete + options.onSystemCloseComplete = function() { + this.destroy(); + }; + + // init parent + this.parent(options); + } + +}); + +/* +--- +description: The mBox.Tooltip class extends mBox.Core, helping you to attach tooltips to any DOM element. + +authors: Stephan Wagner + +license: MIT-style + +requires: + - mBox + - core/1.4.5: '*' + - more/Element.Measure + +provides: [mBox.Tooltip] + +documentation: http://htmltweaks.com/mBox/Documentation/Tooltip +... +*/ + +mBox.Tooltip = new Class({ + + Extends: mBox, + + options: { + + target: null, + + event: 'mouseenter', + + position: { + x: ['center'], + y: ['top', 'outside'] + }, + pointer: 'center', + + fixed: false, + + delayOpenOnce: true + }, + + // initialize parent + initialize: function(options) { + this.defaultInOut = 'outside'; + this.defaultTheme = 'Tooltip'; + + this.parent(options); + } +}); \ No newline at end of file diff --git a/o2web/source/o2_lib/mootools/plugin/mBox.min.js b/o2web/source/o2_lib/mootools/plugin/mBox.min.js new file mode 100644 index 0000000000000000000000000000000000000000..a54a26ba92cb294542a98437b82e78c3420223f2 --- /dev/null +++ b/o2web/source/o2_lib/mootools/plugin/mBox.min.js @@ -0,0 +1 @@ +var mBox=new Class({Implements:[Options,Events],options:{id:"",theme:"",addClass:{wrapper:"",container:"",content:"",title:"",footer:""},setStyles:{wrapper:{},container:{},content:{},title:{},footer:{}},target:$(window),attach:null,event:"click",preventDefault:!1,width:"auto",height:"auto",zIndex:8e3,content:null,setContent:"data-setContent",load:null,url:"",reload:!1,title:null,footer:null,draggable:!1,position:{x:"center",y:"center"},fixed:null,offset:{x:0,y:0},pointer:!1,fade:{open:!0,close:!0},fadeDuration:{open:200,close:300},fadeWhenOpen:!1,overlay:!1,overlayStyles:{color:"black",opacity:.75},overlayFadeDuration:100,transition:{open:null,close:null},closeOnEsc:!0,closeOnClick:!1,closeOnBoxClick:!1,closeOnWrapperClick:!1,closeOnBodyClick:!0,closeOnMouseleave:!1,closeInTitle:!1,delayOpen:0,delayClose:0,delayOpenOnce:!0,constructOnInit:!0,openOnInit:!1},initialize:function(t){this.block=!1,this.ignoreDelay=!1,this.ignoreDelayOnce=!1,this.setOptions(t),this.fixOptions(),this.getPosition(),this.target=this.getTarget(),null==this.options.fixed&&(this.options.fixed=[$(window),$(document),$(document.body)].contains(this.target)),"mouse"==this.target&&(this.options.pointer=!1),this.targets=[],this.id=this.options.id||"mBox"+ ++mBox.currentId,this.addListeners(),this.options.constructOnInit&&this.construct(),this.fireEvent("init").fireEvent("systemInit"),this.options.openOnInit&&this.open(),mBox.instances.push(this)},reInit:function(){this.addListeners()},fixOptions:function(){"string"==typeof this.options.addClass&&(this.options.addClass={wrapper:this.options.addClass}),"object"!=typeof this.options.setStyles||this.options.setStyles.wrapper||this.options.setStyles.container||this.options.setStyles.content||this.options.setStyles.title||this.options.setStyles.footer||(this.options.setStyles={wrapper:this.options.setStyles}),this.options.fade={open:this.options.fade.open||1==this.options.fade,close:this.options.fade.close||1==this.options.fade},this.options.fadeDuration={open:this.options.fadeDuration.open||this.options.fadeDuration,close:this.options.fadeDuration.close||this.options.fadeDuration}},construct:function(){if(this.wrapper)return null;this.wrapper=new Element("div",{id:this.id,class:"mBox "+(this.defaultTheme||"Core")+(this.options.theme?"-"+this.options.theme:"")+" "+(this.options.addClass.wrapper||""),styles:{zIndex:this.options.zIndex,position:0==this.options.fixed||Browser.ie6||Browser.ie7?"absolute":"fixed",display:"none",opacity:1e-5,top:-12e3,left:-12e3,zoom:1}}).setStyles(this.options.setStyles.wrapper||{});var t=$(t)||t||this.target||$(this.options.target)||this.options.target||$(this.options.attach);t&&"element"===typeOf(t)?this.wrapper.inject(t,"after"):this.wrapper.inject(document.body,"bottom"),this.options.closeOnMouseleave&&this.wrapper.addEvents({mouseenter:function(t){this.open()}.bind(this),mouseleave:function(t){this.close()}.bind(this)}),this.container=new Element("div",{class:"mBoxContainer "+(this.options.addClass.container||"")}).setStyles(this.options.setStyles.container||{}).inject(this.wrapper),this.content=new Element("div",{class:"mBoxContent "+(this.options.addClass.content||""),styles:{width:this.options.width,height:this.options.height}}).setStyles(this.options.setStyles.content||{}).inject(this.container),this.load(this.options.content,this.options.title,this.options.footer,!0),this.fireEvent("systemBoxReady").fireEvent("boxReady")},addListeners:function(t){if(t=t||this.options.attach,elements=Array.from($(t)).combine(Array.from($$("."+t))).combine(Array.from($$(t))).clean(),!elements||0==elements.length)return this;switch(this.targets.combine(elements),this.options.event){case"mouseenter":case"mouseover":var e={mouseenter:function(t){this.target=this.getTargetFromEvent(t),this.source=this.getTargetElementFromEvent(t),this.open()}.bind(this),mouseleave:function(t){this.close()}.bind(this)};break;default:e={click:function(t){this.options.preventDefault&&t.preventDefault(),this.isOpen?this.close():(this.target=this.getTargetFromEvent(t),this.source=this.getTargetElementFromEvent(t),this.open())}.bind(this)}}$$(elements).each(function(t){t.retrieve("mBoxElementEventsAdded"+this.id)||t.addEvents(e).store("mBoxElementEventsAdded"+this.id,!0)}.bind(this))},loadAjax:function(t){this.ajaxRequest||(this.ajaxRequest=new Request.HTML({link:"cancel",update:this.content,onRequest:function(){this.setContent(""),this.wrapper.addClass("mBoxLoading")}.bind(this),onComplete:function(){this.wrapper.removeClass("mBoxLoading"),"auto"!=this.options.width&&"auto"!=this.options.height||this.setPosition(),this.fireEvent("ajaxComplete")}.bind(this)}).send()),this.ajaxRequest.send(t),this.ajaxLoaded=!0},open:function(r){if(this.wrapper||this.construct(),"object"!=typeof r&&(r={}),clearTimeout(this.timer),!this.isOpen&&!this.block){var t=function(){this.ignoreDelayOnce=!1,this.fireEvent("systemOpenComplete").fireEvent("openComplete")}.bind(this),e=function(t){if(this.isOpen=!0,"ajax"!=this.options.load||!this.options.url||this.ajaxLoaded&&!this.options.reload||this.loadAjax({url:this.options.url}),this.target=this.getTarget(r.target||null),this.options.setContent&&this.source&&this.source.getAttribute(this.options.setContent))if($(this.source.getAttribute(this.options.setContent)))this.content.getChildren().setStyle("display","none"),$(this.source.getAttribute(this.options.setContent)).setStyle("display","");else{var e=this.source.getAttribute(this.options.setContent).split("|"),i=e[0]||null,o=e[1]||null,n=e[2]||null;this.load(i,o,n)}this.wrapper&&this.wrapper.inject(document.body,"bottom"),this.setPosition(null,r.position||null,r.offset||null),this.fireEvent("systemOpen").fireEvent("open"),this.fx&&this.fx.cancel(),this.wrapper.setStyles({display:""}),this.options.fadeWhenOpen&&this.wrapper.setStyle("opacity",0),this.fx=new Fx.Tween(this.wrapper,{property:"opacity",duration:this.options.fadeDuration.open,link:"cancel",onComplete:t})[r.instant||!this.options.fade.open?"set":"start"](1),!r.instant&&this.options.fade.open||t();var s=this.getTransition();s.open&&new Fx.Tween(this.wrapper,{property:s.open.property||"top",duration:s.open.duration||this.options.fadeDuration.open,transition:s.open.transition||null,onStart:s.open.onStart||null,onComplete:s.open.onComplete||null}).start(s.open.start||this.wrapper.getStyle(s.open.property||"top").toInt()+(s.open.difference_start||0),s.open.end||this.wrapper.getStyle(s.open.property||"top").toInt()+(s.open.difference_end||0));this.attachEvents(),this.options.overlay&&this.addOverlay(r.instant||!this.options.fade.open),this.options.delayOpenOnce&&(this.delayOpenOnce=!0)}.bind(this);0"+this.wrapper.get("html")+""},attachEvents:function(){this.escEvent=function(t){"esc"==t.key&&(this.ignoreDelayOnce=!0,this.close())}.bind(this),this.options.closeOnEsc&&$(window).addEvent("keyup",this.escEvent),this.resizeEvent=function(t){this.setPosition()}.bind(this),$(window).addEvent("resize",this.resizeEvent),this.options.fixed&&(Browser.ie6||Browser.ie7)&&$(window).addEvent("scroll",this.resizeEvent),this.closeOnClickEvent=function(t){this.isOpen&&$(this.options.attach)!=t.target&&!$$("."+this.options.attach).contains(t.target)&&(this.ignoreDelayOnce=!0,this.close())}.bind(this),this.options.closeOnClick&&$(document).addEvent("mouseup",this.closeOnClickEvent),this.closeOnBoxClickEvent=function(t){this.isOpen&&(this.wrapper==t.target||this.wrapper.contains(t.target))&&(this.ignoreDelayOnce=!0,this.close())}.bind(this),this.options.closeOnBoxClick&&$(document).addEvent("mouseup",this.closeOnBoxClickEvent),this.closeOnWrapperClickEvent=function(t){this.isOpen&&this.wrapper==t.target&&(this.ignoreDelayOnce=!0,this.close())}.bind(this),this.options.closeOnWrapperClick&&$(document).addEvent("mouseup",this.closeOnWrapperClickEvent),this.closeOnBodyClickEvent=function(t){!this.isOpen||$(this.options.attach)==t.target||$$("."+this.options.attach).contains(t.target)||t.target==this.wrapper||this.wrapper.contains(t.target)||(this.ignoreDelayOnce=!0,this.close())}.bind(this),this.options.closeOnBodyClick&&$(document).addEvent("mouseup",this.closeOnBodyClickEvent),this.mouseMoveEvent=function(t){this.mouseX=t.page.x,this.mouseY=t.page.y,this.setPosition("mouse")}.bind(this),"mouse"==this.target&&$(document).addEvent("mousemove",this.mouseMoveEvent)},detachEvents:function(){this.options.fixed&&(Browser.ie6||Browser.ie7)&&$(window).removeEvent("scroll",this.resizeEvent),$(window).removeEvent("keyup",this.keyEvent),$(window).removeEvent("resize",this.resizeEvent),$(document).removeEvent("mouseup",this.closeOnClickEvent),$(document).removeEvent("mouseup",this.closeOnBoxClickEvent),$(document).removeEvent("mouseup",this.closeOnWrapperClickEvent),$(document).removeEvent("mouseup",this.closeOnBodyClickEvent),$(document).removeEvent("mousemove",this.mouseMoveEvent)},destroy:function(){mBox.instances.erase(this),this.detachEvents(),this.wrapper.dispose(),delete this.wrapper}});mBox.instances=[],mBox.currentId=0,mBox.reInit=function(){mBox.addConfirmEvents&&mBox.addConfirmEvents(),mBox.instances.each(function(t){try{t.reInit()}catch(t){}})},mBox.Notice=new Class({Extends:mBox,options:{type:"Default",position:{x:["left","inside"],y:["bottom","inside"]},offset:{x:30,y:30},fixed:!0,move:!0,moveDuration:500,delayClose:4e3,fade:!0,fadeDuration:{open:250,close:400},target:$(window),zIndex:1e6,closeOnEsc:!1,closeOnBoxClick:!0,closeOnBodyClick:!1,openOnInit:!0},initialize:function(t){this.defaultInOut="inside",this.defaultTheme="Notice",t.onSystemBoxReady=function(){if(this.container.addClass("mBoxNotice"+(this.options.type.capitalize()||"Default")),this.options.move&&("inside"==this.position.x[1]||"center"==this.position.x[0])&&"inside"==this.position.y[1]&&("top"==this.position.y[0]||"bottom"==this.position.y[0])){var t=this.wrapper.getDimensions({computeSize:!0});this.container.setStyle("position","absolute"),this.container.setStyle("top"==this.position.y[0]?"bottom":"top",0),this.wrapper.setStyles({height:0,width:t.totalWidth,overflowY:"hidden"}),this.options.transition={open:{transition:"linear",property:"height",duration:this.options.moveDuration,start:0,end:t.totalHeight+this.options.offset.y}},this.options.offset.y=0,this.options.delayClose+=this.options.moveDuration}},t.onSystemOpen=function(){$(window).retrieve("mBoxNotice")&&($(window).retrieve("mBoxNotice").ignoreDelay=!0,$(window).retrieve("mBoxNotice").close()),$(window).store("mBoxNotice",this)},t.onSystemOpenComplete=function(){this.close()},t.onSystemCloseComplete=function(){this.destroy()},this.parent(t)}}),mBox.Tooltip=new Class({Extends:mBox,options:{target:null,event:"mouseenter",position:{x:["center"],y:["top","outside"]},pointer:"center",fixed:!1,delayOpenOnce:!0},initialize:function(t){this.defaultInOut="outside",this.defaultTheme="Tooltip",this.parent(t)}}); \ No newline at end of file diff --git a/o2web/source/x_component_ANN/$Main/appicon.png b/o2web/source/x_component_ANN/$Main/appicon.png new file mode 100644 index 0000000000000000000000000000000000000000..3d5abe9cf666487e87dcceb2276b5c7d1fd47e76 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/appicon.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/content.html b/o2web/source/x_component_ANN/$Main/default/content.html new file mode 100644 index 0000000000000000000000000000000000000000..4b160c3ed482b957c598cba00580c1ac67578978 --- /dev/null +++ b/o2web/source/x_component_ANN/$Main/default/content.html @@ -0,0 +1,111 @@ +
+
+ + + + + + + + + + + +
+
+
+
{{ $.lp.create }}
+ +
+
{{ $.lp.name }}
+
{{ $.data.name }}
+
+ +
+
{{ $.lp.description }}
+
{{ $.data.description }}
+
+ +
+
{{ $.lp.alias }}
+
{{ $.data.alias }}
+
+ +
+
{{ $.lp.processList }}
+
+
+ +
+
{{ $.lp.applicationList }}
+
+
+ +
+
{{ $.lp.analyzeType }}
+
{{ $.data.analyzeType }}
+
+ +
+
{{ $.lp.propertyMap }}
+
+
+ +
+
{{ $.lp.inValueScriptText }}
+
{{ $.data.inValueScriptText }}
+
+ +
+
{{ $.lp.outValueScriptText }}
+
{{ $.data.outValueScriptText }}
+
+ +
+
{{ $.lp.attachmentScriptText }}
+
{{ $.data.attachmentScriptText }}
+
+ +
+
+
+
{{ $.lp.startDate }}
+
{{ $.data.startDate }}
+
+
+
{{ $.lp.endDate }}
+
{{ $.data.endDate }}
+
+
+
{{ $.lp.entryCount }}
+
{{ $.data.entryCount }}
+
+ +
+
{{ $.lp.effectiveEntryCount }}
+
{{ $.data.effectiveEntryCount }}
+
+ +
+
{{ $.lp.statusText }}
+
{{ $.data.status }}
+
+ +
+
{{ $.lp.generatingPercent }}
+
{{ $.data.generatingPercent }}
+
+ +
+
{{ $.lp.learnEntryCount }}
+
{{ $.data.learnEntryCount }}
+
+ +
+
{{ $.lp.validationEntryCount }}
+
{{ $.data.validationEntryCount }}
+
+ +
+
+
\ No newline at end of file diff --git a/o2web/source/x_component_ANN/$Main/default/css.wcss b/o2web/source/x_component_ANN/$Main/default/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..4eb7c3f98363b6a630858151077931b22a8f355c --- /dev/null +++ b/o2web/source/x_component_ANN/$Main/default/css.wcss @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/o2web/source/x_component_ANN/$Main/default/icon.png b/o2web/source/x_component_ANN/$Main/default/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d80244ee1ad987feed077659f3085e5a1a4c34e0 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/add.png b/o2web/source/x_component_ANN/$Main/default/icon/add.png new file mode 100644 index 0000000000000000000000000000000000000000..2f16197008cb79142755ff9b92a03fc3f410b416 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/add.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/bg.jpg b/o2web/source/x_component_ANN/$Main/default/icon/bg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..05631195ed480b888e8438ea83421566769dc0e3 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/bg.jpg differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/completed.png b/o2web/source/x_component_ANN/$Main/default/icon/completed.png new file mode 100644 index 0000000000000000000000000000000000000000..a877ac90d104b49b13e8affa6ded5c5cb27cb52e Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/completed.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/create.png b/o2web/source/x_component_ANN/$Main/default/icon/create.png new file mode 100644 index 0000000000000000000000000000000000000000..29844699db9fcae4dfdac548da5e123eb3854ca3 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/create.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/excessive.png b/o2web/source/x_component_ANN/$Main/default/icon/excessive.png new file mode 100644 index 0000000000000000000000000000000000000000..6ede34458d8e61ec651fb4e83dec572bb1e4f0bd Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/excessive.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/generating.png b/o2web/source/x_component_ANN/$Main/default/icon/generating.png new file mode 100644 index 0000000000000000000000000000000000000000..3402426d315e9e055b82061284ae06abf4f0997c Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/generating.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/idle.png b/o2web/source/x_component_ANN/$Main/default/icon/idle.png new file mode 100644 index 0000000000000000000000000000000000000000..6ef89f188d4ce2fe62d4d87f07d4be9b08b2fff4 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/idle.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/itemlogo.png b/o2web/source/x_component_ANN/$Main/default/icon/itemlogo.png new file mode 100644 index 0000000000000000000000000000000000000000..1d98dc91a5324c3597d7330f69b41edd11d75e9f Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/itemlogo.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/itemlogo_selected.png b/o2web/source/x_component_ANN/$Main/default/icon/itemlogo_selected.png new file mode 100644 index 0000000000000000000000000000000000000000..616df2341e30882c3b9ef4f7376a4ffa25715091 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/itemlogo_selected.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/learning.png b/o2web/source/x_component_ANN/$Main/default/icon/learning.png new file mode 100644 index 0000000000000000000000000000000000000000..d7ea874ab41d8558cb95e2944733f732d545bd6c Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/learning.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/icon/logo.png b/o2web/source/x_component_ANN/$Main/default/icon/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..09a748b863f84afe6957e3a805e01bafcd055009 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/icon/logo.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/model.html b/o2web/source/x_component_ANN/$Main/default/model.html new file mode 100644 index 0000000000000000000000000000000000000000..b30b51ac4aef8cd8a332dbdf3530b77cde68317c --- /dev/null +++ b/o2web/source/x_component_ANN/$Main/default/model.html @@ -0,0 +1,8 @@ +
+
+
+
+
{{ $.data.name }}
+
{{ $.data.updateTime }}
+
+
\ No newline at end of file diff --git a/o2web/source/x_component_ANN/$Main/default/style.css b/o2web/source/x_component_ANN/$Main/default/style.css new file mode 100644 index 0000000000000000000000000000000000000000..14b30637a189df642dec4378c49650011475353a --- /dev/null +++ b/o2web/source/x_component_ANN/$Main/default/style.css @@ -0,0 +1,230 @@ +.o2_ann_content { + height: 100%; + overflow: hidden; +} +.o2_ann_top { + background-color: #484848; + border-bottom: 1px solid #333333; + height: 50px; +} +.o2_ann_topIcon { + width: 50px; + height: 50px; + float: left; + cursor: pointer; + border-right: 0px solid #ffffff; + background: url(/x_component_ANN/$Main/default/icon/create.png) center center no-repeat; +} +.o2_ann_topText { + height: 50px; + float: right; + font-size: 18px; + font-weight: bold; + color: #ffffff; + line-height: 50px; + margin-right: 20px; +} +.o2_ann_contentArea { + overflow: hidden; + height: 510px; +} +.o2_ann_leftContent { + width: 300px; + height: 100%; + float: left; + background-color: #484848; + overflow: auto; + /*background-image: url(/x_component_ANN/$Main/default/icon/bg.jpg);*/ + /*background-size: cover;*/ + /*background-repeat: no-repeat;*/ +} +.o2_ann_rightContent { + height: 100%; + overflow: hidden; + margin-left: 300px; +} + + +/*.o2_ann_right {*/ + /*height: 100%;*/ + /*overflow: hidden;*/ + /*margin-left: 300px;*/ + /*border-left: 0px solid #999999;*/ +/*}*/ +/*.o2_ann_leftTitle {*/ + /*height: 60px;*/ + /*overflow: hidden;*/ + /*border-bottom: 1px solid #999999;*/ +/*}*/ +/*.o2_ann_leftTitleIcon {*/ + /*width: 60px;*/ + /*height: 60px;*/ + /*float: left;*/ + /*background: url(/x_component_ANN/$Main/default/icon/logo.png) center center no-repeat;*/ +/*}*/ +/*.o2_ann_leftTitleAction {*/ + /*width: 60px;*/ + /*height: 60px;*/ + /*float: right;*/ + /*background: url(/x_component_ANN/$Main/default/icon/add.png) center center no-repeat;*/ + /*cursor: pointer;*/ +/*}*/ +/*.o2_ann_leftTitleText {*/ + /*margin: 0 60px 0 60px;*/ + /*height: 60px;*/ + /*line-height: 60px;*/ + /*padding: 0 5px;*/ + /*font-size: 18px;*/ + /*font-weight: bold;*/ + /*color: #eeeeee;*/ +/*}*/ +/*.o2_ann_leftContent {*/ + /*overflow: auto;*/ +/*}*/ + +.o2_ann_model_node { + height: 60px; + overflow: hidden; +} +.o2_ann_model_node_over { + background-color: #333333; +} +.o2_ann_model_node .icon { + background: url(/x_component_ANN/$Main/default/icon/itemlogo.png) center right no-repeat; + width: 50px; + height: 60px; + float: left; +} +.o2_ann_model_node .name { + height:25px; + margin-top: 10px; + line-height: 25px; + font-size: 16px; + font-weight: bold; + color: #FFFFFF; +} +.o2_ann_model_node .date { + height: 15px; + margin-bottom: 10px; + line-height: 15px; + font-size: 12px; + color: #eeeeee; +} + +.o2_ann_model_node_selected { + background-color: #eeeeee; +} +.o2_ann_model_node_selected .icon { + background: url(/x_component_ANN/$Main/default/icon/itemlogo_selected.png) center right no-repeat; + width: 50px; + height: 60px; + float: left; +} +.o2_ann_model_node_selected .name { + color: #333333; +} +.o2_ann_model_node_selected .date { + color: #666666; +} + +.o2_ann_model_nodeRight { + background-position: center center; + background-repeat: no-repeat; + height: 60px; + width: 30px; + float: right; +} +.o2_ann_model_nodeContent { + height: 80px; + margin: 0 30px 0 60px; + cursor: pointer; +} + +.o2_ann_modelContext_node { + height: 100%; + overflow: hidden; +} +.o2_ann_modelContext_toolbar { + height: 40px; +} +.o2_ann_modelContext_content { + height: 470px; + overflow: auto; +} +.o2_ann_modelContext_area { + margin: 20px; + float: left; + width: 40%; +} +.o2_ann_modelContext_status { + width: 40%; + overflow: hidden; + padding-bottom: 40px; + float: right; + margin: 20px 20px 20px 0; + border-left: 1px solid #999999; +} +.o2_ann_modelContext_topTitle { + height: 30px; + line-height: 30px; + font-size: 22px; + font-weight: bold; + color: #333333; + margin-bottom: 10px; +} +.o2_ann_modelContext_line { + margin-bottom: 20px; +} +.o2_ann_modelContext_title { + font-size: 18px; + font-weight: bold; + height: 30px; + line-height: 30px; + color: #666666; +} +.o2_ann_modelContext_value { + font-size: 14px; + line-height: 20px; + overflow: hidden; + color: #337acc; +} +.o2_ann_modelContext_input { + height: 24px; + border-radius: 3px; + border: 1px solid #cccccc; + font-size: 14px; + line-height: 24px; + color: #999999; + width: 90%; + padding: 0 5px; +} +.o2_ann_modelContext_button { + background-color: #337acc; + cursor: pointer; + border-radius: 5px; + color: #ffffff; + border: 1px solid #337acc; + height: 28px; +} +.o2_ann_modelContext_statusLine { + height: 30px; + margin-bottom: 10px; +} +.o2_ann_modelContext_statusTitle { + margin-left: 20px; + float: left; + line-height: 30px; + height: 30px; + font-size: 16px; + color: #666666; + font-weight: bold; +} +.o2_ann_modelContext_statusValue { + float: left; + margin-left: 10px; + line-height: 30px; + height: 30px; + color: #999999; + font-size: 14px; + +} \ No newline at end of file diff --git a/o2web/source/x_component_ANN/$Main/default/tools/close.png b/o2web/source/x_component_ANN/$Main/default/tools/close.png new file mode 100644 index 0000000000000000000000000000000000000000..ae16876cf329539317a5c4963638d07bfd745a1c Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/tools/close.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/tools/edit.png b/o2web/source/x_component_ANN/$Main/default/tools/edit.png new file mode 100644 index 0000000000000000000000000000000000000000..c73709f7a577cbab0987f9a32c2e409f6542de39 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/tools/edit.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/tools/generate.png b/o2web/source/x_component_ANN/$Main/default/tools/generate.png new file mode 100644 index 0000000000000000000000000000000000000000..18f0accc890f80d052c3102ed5c338f8acf69d1e Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/tools/generate.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/tools/learn.png b/o2web/source/x_component_ANN/$Main/default/tools/learn.png new file mode 100644 index 0000000000000000000000000000000000000000..72da8af0b086f4749bec6aa1cacf7efecf746d45 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/tools/learn.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/tools/remove.png b/o2web/source/x_component_ANN/$Main/default/tools/remove.png new file mode 100644 index 0000000000000000000000000000000000000000..813dd1535c1a239d94a9b2a0107e2ed23d9af968 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/tools/remove.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/tools/reset.png b/o2web/source/x_component_ANN/$Main/default/tools/reset.png new file mode 100644 index 0000000000000000000000000000000000000000..1d7e6e7b9c32850a1329149e56d6b857ebd4d351 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/tools/reset.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/tools/save.png b/o2web/source/x_component_ANN/$Main/default/tools/save.png new file mode 100644 index 0000000000000000000000000000000000000000..247ef7e7ce05f2a5fbb84cdbc6d507eaf906de25 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/tools/save.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/tools/stop.png b/o2web/source/x_component_ANN/$Main/default/tools/stop.png new file mode 100644 index 0000000000000000000000000000000000000000..3eb1d51fc53c1d82d3e55d1e2d3a3083bb9754a7 Binary files /dev/null and b/o2web/source/x_component_ANN/$Main/default/tools/stop.png differ diff --git a/o2web/source/x_component_ANN/$Main/default/view.html b/o2web/source/x_component_ANN/$Main/default/view.html new file mode 100644 index 0000000000000000000000000000000000000000..5148865f04644e6f3b6554db93607d7ef93c3e16 --- /dev/null +++ b/o2web/source/x_component_ANN/$Main/default/view.html @@ -0,0 +1,12 @@ +
+
+
+
{{ $.lp.title }}
+
+
+
+
+
+ + +
\ No newline at end of file diff --git a/o2web/source/x_component_ANN/Main.js b/o2web/source/x_component_ANN/Main.js new file mode 100644 index 0000000000000000000000000000000000000000..7b720470f49e9ca18a48bbf332f7efbc6e1d010b --- /dev/null +++ b/o2web/source/x_component_ANN/Main.js @@ -0,0 +1,549 @@ +o2.require("o2.widget.O2Identity", null, false); +o2.require("o2.widget.ace", null, false); +MWF.xApplication.ANN.Main = new Class({ + Extends: MWF.xApplication.Common.Main, + Implements: [Options, Events], + + options: { + "style1": "default", + "style": "default", + "name": "ANN", + "icon": "icon.png", + "width": "1100", + "height": "600", + "isResize": true, + "isMax": true, + "title": MWF.xApplication.ANN.LP.title + }, + initialize: function(desktop, options){ + this.setOptions(options); + this.desktop = desktop; + + this.path = "/x_component_"+this.options.name.replace(/\./g, "_")+"/$Main/"; + this.options.icon = this.path+this.options.style+"/"+this.options.icon; + + //this.cssPath =this.path+this.options.style+"/css.wcss"; + this.stylePath = this.path+this.options.style+"/style.css"; + this.viewPath = this.path+this.options.style+"/view.html"; + }, + + onQueryLoad: function(){ + this.lp = MWF.xApplication.ANN.LP; + this.models = []; + }, + loadApplication: function(callback){ + this.content.loadAll({css: this.stylePath, "html": this.viewPath}, {"bind": this}, function(){ + this.node = this.content.getElement(".o2_ann_content"); + this.titleNode = this.content.getElement(".o2_ann_top"); + this.contentArea = this.content.getElement(".o2_ann_contentArea"); + this.listNode = this.content.getElement(".o2_ann_leftContent"); + this.contentNode = this.content.getElement(".o2_ann_rightContent"); + this.addAction = this.content.getElement(".o2_ann_topIcon"); + + if (!o2.AC.isAdministrator()){ + this.addAction.destroy(); + this.addAction = null; + } + if (this.addAction) this.addAction.addEvent("click", this.createModel.bind(this)); + + this.resizeFun = this.resize.bind(this); + this.resizeFun(); + this.addEvent("resize", this.resizeFun); + this.loadListModel(); + + if (callback) callback(); + }.bind(this)); + }, + getDefaultData: function(){ + return { + "neuralNetworkType": "mlp", + "dataType": "processPlatform", + "name": this.lp.unnamed, + "description": "", + "alias": "", + "inValueScriptText": "", + "outValueScriptText": "", + "attachmentScriptText": "", + "processList": [], + "applicationList": [], + "analyzeType": "default", + "maxResult": 0, + "propertyMap": {} + } + }, + checkSave: function(){ + if (this.currentModel && this.currentModel.context && (this.currentModel.context.status==="edit" || this.currentModel.context.status==="new")){ + this.notice(this.lp.checkSave, "error", this.contentNode, {"x": "left", "y": "top"}); + return false; + }else{ + if (this.currentModel) this.currentModel.unselected(); + return true; + } + }, + + createModel: function(){ + if (this.checkSave()) this.currentModel = new MWF.xApplication.ANN.Model(this.getDefaultData(), this); + }, + resize: function(){ + var size = this.node.getSize(); + var titleSize = this.titleNode.getComputedSize(); + var h = size.y-titleSize.totalHeight; + this.contentArea.setStyle("height", ""+h+"px"); + }, + loadListModel: function(){ + o2.Actions.get("x_query_assemble_designer").listModel(function(json){ + json.data.each(function(item){ + this.models.push(new MWF.xApplication.ANN.Model(item, this)); + }.bind(this)); + }.bind(this)); + } +}); + +MWF.xApplication.ANN.Model = new Class({ + initialize: function(data, app){ + this.data = data; + this.app = app; + this.lp = app.lp; + this.listNode = this.app.listNode; + this.load(); + }, + reload: function(){ + o2.Actions.get("x_query_assemble_designer").getModel(this.data.id, function(json){ + this.data = json.data; + if (this.context) this.context.data = this.data; + this.node.getElement(".o2_ann_model_nodeContentName").set("text", this.data.name); + this.node.getElement(".o2_ann_model_nodeContentDate").set("text", this.data.updateTime); + var rightIcon = this.node.getElement(".o2_ann_model_nodeRight"); + rightIcon.set("title", this.lp.status[this.data.status||'idle']); + rightIcon.setStyle("background-image", "url(/x_component_ANN/$Main/default/icon/"+(this.data.status || 'idle')+".png") + }.bind(this)); + }, + load: function(){ + if (this.data.id){ + this.loadList(function(){ + this.loadEvent(); + }.bind(this)); + }else{ + this.loadCreate(); + } + }, + loadList: function(callback){ + var viewPath = this.app.path+this.app.options.style+"/model.html"; + this.listNode.loadHtml(viewPath, {"bind": {"lp": this.lp, "data": this.data}}, function(){ + this.node = this.listNode.getLast(); + // var rightIcon = this.node.getElement(".o2_ann_model_nodeRight"); + // rightIcon.set("title", this.lp.status[this.data.status||'idle']); + // rightIcon.setStyle("background-image", "url(/x_component_ANN/$Main/default/icon/"+(this.data.status || 'idle')+".png") + if (callback) callback(); + }.bind(this)); + }, + loadCreate: function(){ + this.loadList(function(){ + this.loadEvent(); + this.selected(); + }.bind(this)); + }, + loadEvent: function(){ + this.node.addEvents({ + "mouseover": function(){if (!this.isSelected) this.node.addClass("o2_ann_model_node_over")}.bind(this), + "mouseout": function(){if (!this.isSelected) this.node.removeClass("o2_ann_model_node_over")}.bind(this), + "click": function(){ + if (!this.isSelected){ + this.selected(); + }else{ + if (this.context) this.context.reload(); + } + }.bind(this) + }); + }, + getData: function(callback){ + o2.Actions.get("x_query_assemble_designer").getModel(this.data.id, function(json){ + this.data = json.data; + if (callback) callback(); + }.bind(this)); + }, + selected: function(){ + if (this.app.checkSave()){ + this.node.addClass("o2_ann_model_node_selected"); + this.isSelected = true; + this.app.currentModel = this; + this.openModel(); + } + }, + unselected: function(){ + this.isSelected = false; + this.app.currentModel = null; + this.node.removeClass("o2_ann_model_node_selected"); + this.node.removeClass("o2_ann_model_node_over"); + if (this.context) this.context.destroy(); + }, + openModel: function(){ + this.context = new MWF.xApplication.ANN.Model.Context(this); + }, + destroy: function(){ + this.node.destroy(); + o2.release(this); + } +}); + +MWF.xApplication.ANN.Model.Context = new Class({ + initialize: function(model){ + this.model = model; + this.data = model.data; + this.app = model.app; + this.lp = model.lp; + this.contentNode = this.app.contentNode; + this.getData(this.load.bind(this)); + }, + getData: function(callback){ + o2.Actions.get("x_query_assemble_designer").getModel(this.data.id, function(json){ + this.data = json.data; + if (callback) callback(); + }.bind(this)); + }, + reload: function(){ + this.contentNode.empty(); + this.getData(this.load.bind(this)); + }, + load: function(){ + this.status = "open"; + if (!this.data.id) this.status = "new"; + var viewPath = this.app.path+this.app.options.style+"/content.html"; + this.contentNode.loadHtml(viewPath, {"bind": {"lp": this.lp, "data": this.data}}, function(){ + this.node = this.contentNode.getFirst(); + this.toolbarNode = this.node.getFirst(); + this.content = this.node.getLast(); + this.lines = this.content.getElements(".o2_ann_modelContext_line"); + + o2.widget.ace.load(function(){ + o2.load("/o2_lib/ace/src-min-noconflict/ext-static_highlight.js", function(){ + this.loadContent(); + this.loadToolbar(); + + this.resizeFun = this.resize.bind(this); + this.resizeFun(); + this.app.addEvent("resize", this.resizeFun); + + if (this.status==="new") this.edit(); + }.bind(this)); + }.bind(this)); + }.bind(this)); + }, + loadContent: function(){ + this.loadProcessList(); + this.loadApplicationList(); + this.loadCode(6, JSON.stringify(this.data.propertyMap,null,2)); + this.loadCode(7); + this.loadCode(8); + this.loadCode(9); + + this.loadStatus(); + }, + loadStatus: function(){ + this.statusNode = this.node.getElement(".o2_ann_modelContext_status"); + + }, + loadProcessList: function(){ + if (this.data.processList){ + var node = this.lines[3].getLast().getFirst(); + this.data.processList.each(function(process){ + new o2.widget.O2Process({id: process}, node) + }.bind(this)); + } + }, + loadCode: function(i, text){ + var node = this.lines[i].getLast(); + if (text) node.set("text", text); + var highlight = ace.require("ace/ext/static_highlight"); + highlight(node, {mode: "ace/mode/javascript", theme: "ace/theme/tomorrow", "fontSize": 16}); + }, + loadApplicationList: function(){ + if (this.data.applicationList){ + var node = this.lines[4].getLast(); + this.data.applicationList.each(function(application){ + new o2.widget.O2Application({id: application}, node) + }.bind(this)); + } + }, + destroy: function(){ + if (this.resizeFun) this.app.removeEvent("resize", this.resizeFun); + this.contentNode.empty(); + o2.release(this); + }, + "close": function(el,e){ + if (this.status!=="open"){ + var _self = this; + this.app.confirm("infor", e, this.lp.closeTitle, this.lp.closeInfor, 380, 100, function(){ + if (_self.data.id){ + _self.model.unselected(); + }else{ + var model = _self.model; + _self.model.unselected(); + model.destroy(); + } + this.close(); + }, function(){this.close();}); + }else{ + this.model.unselected(); + } + + }, + loadToolbar: function(){ + MWF.require("MWF.widget.Toolbar", function() { + this.toolbar = new MWF.widget.Toolbar(this.toolbarNode, {"style": "simple"}, this); + this.toolbar.load(); + this.setToolbarDisabled(); + }.bind(this)); + }, + setToolbarDisabled: function(){ + if (this.toolbar){ + if (this.status==="edit"){ + this.toolbar.childrenButton[0].node.hide(); + this.toolbar.childrenButton[1].node.show(); + this.toolbar.childrenButton[6].node.show(); + + if (this.data.status) { + this.toolbar.childrenButton[2].node.hide(); + this.toolbar.childrenButton[3].node.hide(); + }else{ + this.toolbar.childrenButton[2].node.show(); + this.toolbar.childrenButton[3].node.show(); + this.toolbar.childrenButton[8].node.show(); + } + if (this.data.status && this.data.status==="generating"){ + this.toolbar.childrenButton[4].node.show(); + this.toolbar.childrenButton[8].node.hide(); + }else{ + this.toolbar.childrenButton[4].node.hide(); + } + if (this.data.status && this.data.status==="learning"){ + this.toolbar.childrenButton[5].node.show(); + this.toolbar.childrenButton[8].node.hide(); + }else{ + this.toolbar.childrenButton[5].node.hide(); + } + }else if (this.status==="new"){ + this.toolbar.childrenButton[0].node.hide(); + this.toolbar.childrenButton[1].node.show(); + this.toolbar.childrenButton[6].node.hide(); + + this.toolbar.childrenButton[2].node.hide(); + this.toolbar.childrenButton[3].node.hide(); + this.toolbar.childrenButton[4].node.hide(); + this.toolbar.childrenButton[5].node.hide(); + }else{ + this.toolbar.childrenButton[0].node.show(); + this.toolbar.childrenButton[1].node.hide(); + this.toolbar.childrenButton[6].node.show(); + + if (this.data.status) { + this.toolbar.childrenButton[2].node.hide(); + this.toolbar.childrenButton[3].node.hide(); + }else{ + this.toolbar.childrenButton[2].node.show(); + this.toolbar.childrenButton[3].node.show(); + this.toolbar.childrenButton[8].node.show(); + } + if (this.data.status && this.data.status==="generating"){ + this.toolbar.childrenButton[4].node.show(); + this.toolbar.childrenButton[8].node.hide(); + }else{ + this.toolbar.childrenButton[4].node.hide(); + } + if (this.data.status && this.data.status==="learning"){ + this.toolbar.childrenButton[5].node.show(); + this.toolbar.childrenButton[8].node.hide(); + }else{ + this.toolbar.childrenButton[5].node.hide(); + } + } + } + }, + resize: function(){ + var size = this.contentNode.getSize(); + var toolbarSize = this.toolbarNode.getComputedSize(); + var h = size.y - toolbarSize.totalHeight; + this.content.setStyle("height", ""+h+"px"); + }, + edit: function(){ + this.status = (!this.data.id) ? "new" : "edit"; + this.setToolbarDisabled(); + + this.nameInput = this.editInput(0, "name"); + this.descriptionInput = this.editInput(1, "description"); + this.aliasInput = this.editInput(2, "alias"); + + this.editProcessList(3); + this.editApplicationList(4); + + this.analyzeInput = this.editSelect(5, ["default", "full"]); + + o2.require("o2.widget.ScriptArea", function(){ + this.propertyMapInput = this.editCode(6, "propertyMap"); + this.inValueScriptInput = this.editCode(7, "inValueScriptText"); + this.outValueScriptInput = this.editCode(8, "outValueScriptText"); + this.attachmentScriptInput = this.editCode(9), "attachmentScriptText"; + }.bind(this)); + }, + editInput: function(i, text){ + var node = this.lines[i].getLast(); + var value = node.get("text"); + node.empty(); + var input = new Element("input.o2_ann_modelContext_input", { + "type": "text", + "value": value, + "placeholder": this.lp.placeholder[text] + }).inject(node); + return input; + }, + + editProcessList: function(i){ + var node = this.lines[i].getLast(); + var action = new Element("button.o2_ann_modelContext_button", {"text": this.lp.selectProcess}).inject(node); + action.addEvent("click", function(e){ + MWF.xDesktop.requireApp("Selector", "package", function(){ + new MWF.O2Selector(this.app.content, { + "type": "process", "values": this.data.processList, + "onComplete": function(items){ + e.target.getPrevious().empty(); + this.data.processList = []; + items.each(function(item){ + this.data.processList.push(item.data.id); + }.bind(this)); + this.loadProcessList(); + }.bind(this) + }); + }.bind(this)); + }.bind(this)); + }, + editApplicationList: function(i){ + var node = this.lines[i].getLast(); + var action = new Element("button.o2_ann_modelContext_button", {"text": this.lp.selectApplication}).inject(node); + action.addEvent("click", function(e){ + MWF.xDesktop.requireApp("Selector", "package", function(){ + new MWF.O2Selector(this.app.content, { + "type": "application", "values": this.data.applicationList, + "onComplete": function(items){ + e.target.getPrevious().empty(); + this.data.applicationList = []; + items.each(function(item){ + this.data.applicationList.push(item.data.id); + }.bind(this)); + this.loadApplicationList(); + }.bind(this) + }); + }.bind(this)); + }.bind(this)); + }, + + editSelect: function(i, arr){ + var node = this.lines[i].getLast(); + var value = node.get("text"); + node.empty(); + var select = new Element("select").inject(node); + arr.each(function(v){ + new Element("option", {"value": v, "text": v, "checked": (value===v)}).inject(select); + }); + return select; + }, + editCode: function(i, key){ + var node = this.lines[i].getLast(); + var value = (key==="propertyMap") ? JSON.stringify(this.data.propertyMap,null,2) : this.data[key]; + node.empty(); + var editor = new o2.widget.ScriptArea(node, {"title": "","maxObj": this.app.content, "isbind": false, "isload": true}); + editor.load({"code": value}); + return editor; + }, + getModelData: function(){ + this.data.name = this.nameInput.get("value"); + this.data.description = this.descriptionInput.get("value"); + this.data.alias = this.aliasInput.get("value"); + this.data.analyzeType = this.analyzeInput.options[this.analyzeInput.selectedIndex].get("value"); + + this.data.propertyMap = JSON.parse(this.propertyMapInput.editor.getValue()); + this.data.inValueScriptText = this.inValueScriptInput.editor.getValue(); + this.data.outValueScriptText = this.outValueScriptInput.editor.getValue(); + this.data.attachmentScriptText = this.attachmentScriptInput.editor.getValue(); + + if (this.data.propertyMap) this.data.propertyMap = {}; + }, + save: function(){ + debugger; + this.getModelData(); + if (!this.data.id){ + o2.Actions.get("x_query_assemble_designer").createModel(this.data, function(json){ + this.data.id = json.data.id; + this.app.notice(this.lp.generate, "success"); + this.model.reload(); + this.reload(); + }.bind(this)); + }else{ + o2.Actions.get("x_query_assemble_designer").updateModel(this.data.id, this.data, function(){ + this.app.notice(this.lp.saveSuccess, "success"); + this.model.reload(); + this.reload(); + }.bind(this)); + } + }, + generate: function(){ + o2.Actions.get("x_query_assemble_designer").generate(this.data.id,function(){ + this.app.notice(this.lp.generate, "success"); + this.model.reload(); + this.reload(); + }.bind(this)); + }, + learn: function(){ + o2.Actions.get("x_query_assemble_designer").learn(this.data.id, function(){ + this.app.notice(this.lp.learn, "success"); + this.model.reload(); + this.reload(); + }.bind(this)); + }, + stopGenerate: function(el, e){ + var _self = this; + this.app.confirm("infor", e, this.lp.stopGenerateTitle, this.lp.stopGenerateInfor, 380, 100, function(){ + o2.Actions.get("x_query_assemble_designer").stopGenerating(_self.data.id, function(){ + this.app.notice(this.lp.stopGenerate, "success"); + this.model.reload(); + this.reload(); + }.bind(_self)); + this.close(); + }, function(){this.close();}); + + }, + stopLearn: function(el, e){ + var _self = this; + this.app.confirm("infor", e, this.lp.stopLearningTitle, this.lp.stopLearningInfor, 380, 100, function(){ + o2.Actions.get("x_query_assemble_designer").stopLearning(_self.data.id, function(){ + this.app.notice(this.lp.stopLearn, "success"); + this.model.reload(); + this.reload(); + }.bind(_self)); + this.close(); + }, function(){this.close();}); + }, + reset: function(el, e){ + var _self = this; + this.app.confirm("infor", e, this.lp.resetStatusTitle, this.lp.resetStatusInfor, 380, 100, function(){ + o2.Actions.get("x_query_assemble_designer").resetStatus(_self.data.id, function(){ + this.app.notice(this.lp.resetStatus, "success"); + this.model.reload(); + this.reload(); + }.bind(_self)); + this.close(); + }, function(){this.close();}); + }, + remove: function(el, e){ + var _self = this; + this.app.confirm("infor", e, this.lp.removeTitle, this.lp.removeInfor, 380, 100, function(){ + o2.Actions.get("x_query_assemble_designer").deleteModel(_self.data.id, function(){ + var text = this.lp.deleteModel.replace("{name}", this.data.name); + this.app.notice(text, "success"); + var model = this.model; + model.unselected(); + model.destroy(); + }.bind(_self)); + this.close(); + }, function(){this.close();}); + } +}); \ No newline at end of file diff --git a/o2web/source/x_component_ANN/lp/zh-cn.js b/o2web/source/x_component_ANN/lp/zh-cn.js new file mode 100644 index 0000000000000000000000000000000000000000..c9099eb98d492de65569c51901e01aa45f36dbed --- /dev/null +++ b/o2web/source/x_component_ANN/lp/zh-cn.js @@ -0,0 +1,65 @@ +MWF.xApplication.ANN.LP = { + "title": "神经网络模型", + "unnamed": "未命名", + "create": "创建神经网络模型", + "checkSave": "请先保存或关闭当前打开的模型!", + "status": { + "idle": "当前没有运行任务", + "generating": "正在收集训练集", + "learning": "正在运行神经网络学习", + "completed": "学习任务已完成", + "excessive": "训练结果偏差过大" + }, + + "name": "名称", + "description": "描述", + "alias": "别名", + "processList": "流程列表", + "applicationList": "应用列表", + "inValueScriptText": "训练集输入处理", + "outValueScriptText": "训练集输出处理", + "attachmentScriptText": "附件处理", + "analyzeType": "分析类型", + "propertyMap": "神经网络参数", + + "placeholder": { + "name": "请输入训练模型名称", + "description": "请输入训练模型描述", + "alias": "请输入训练模型别名" + }, + + "selectProcess": "选择流程", + "selectApplication": "选择应用", + + "closeTitle": "关闭确认", + "closeInfor": "未保存的内容将会丢失,确定要执行此操作吗?", + "saveSuccess": "保存成功", + "generate": "正在收集训练集", + "learn": "正在运行神经网络学习", + + "stopGenerate": "已发出停止收集训练集指令", + "stopLearn": "已发出停止神经网络学习指令", + "resetStatus": "已发出重置状态指令", + "deleteModel": "模型“{name}”已删除", + + "stopGenerateTitle": "停止收集训练集确认", + "stopGenerateInfor": "您确定要停止收集训练集吗?", + + "stopLearningTitle": "停止学习确认", + "stopLearningInfor": "您确定要停止神经网络学习吗?", + + "resetStatusTitle": "重置状态确认", + "resetStatusInfor": "您确定要重置模型状态吗?", + + "removeTitle": "删除模型确认", + "removeInfor": "您确定要删除当前模型吗?", + + "startDate": "开始时间", + "endDate": "完成时间", + "entryCount": "条目数量", + "effectiveEntryCount" : "有效条目数", + "statusText": "状态", + "generatingPercent": "当前条目生成进度", + "learnEntryCount": "学习条目数量", + "validationEntryCount": "测试条目数" +}; \ No newline at end of file diff --git a/o2web/source/x_component_AppCenter/Main.js b/o2web/source/x_component_AppCenter/Main.js index 94aa9e8e04a75a96b52d51139ed6377791cdbb6a..29d914e6ceeb75e460a23a2817695f2062069acb 100644 --- a/o2web/source/x_component_AppCenter/Main.js +++ b/o2web/source/x_component_AppCenter/Main.js @@ -258,14 +258,35 @@ MWF.xApplication.AppCenter.Exporter = new Class({ output: function(){ if (this.step==2){ if (this.checkInput()){ - this.app.actions.output(this.selectData, function(json){ - var uri = this.app.actions.action.actions["download"].uri; - uri = uri.replace("{flag}", json.data.flag); - this.dlg.close(); - window.open(this.app.actions.action.address+uri); + MWF.require("o2.widget.Mask", function(){ + this.mask = new o2.widget.Mask(); + this.mask.loadNode(this.dlg.node); - MWF.release(this); + this.app.actions.output(this.selectData, function(json){ + var uri = this.app.actions.action.actions["download"].uri; + uri = uri.replace("{flag}", json.data.flag); + + if (this.mask) this.mask.hide(); + this.dlg.close(); + window.open(this.app.actions.action.address+uri); + + MWF.release(this); + }.bind(this), function(xhr, text, error){ + if (xhr.status!=0){ + var errorText = error; + if (xhr){ + var json = JSON.decode(xhr.responseText); + if (json){ + errorText = json.message.trim() || "request json error"; + }else{ + errorText = "request json error: "+xhr.responseText; + } + } + MWF.xDesktop.notice("error", {x: "right", y:"top"}, errorText); + } + if (this.mask) this.mask.hide(); + }.bind(this)); }.bind(this)); } } @@ -495,6 +516,7 @@ MWF.xApplication.AppCenter.Exporter.Element = new Class({ "mouseover": function(){this.contentNode.setStyles(this.css.moduleSetupListContentNode_over);}.bind(this), "mouseout": function(){this.contentNode.setStyles(this.css.moduleSetupListContentNode);}.bind(this) }); + this.iconNode.addEvent("click", this.selectAll.bind(this)); this.action.addEvent("click", function(){ this.selectElements(); }.bind(this)); @@ -502,6 +524,43 @@ MWF.xApplication.AppCenter.Exporter.Element = new Class({ this.selectElements(); }.bind(this)); }, + selectAll: function(){ + debugger; + var selectData = this.postData; + if (selectData.processList.length || selectData.formList.length || selectData.applicationDictList.length || selectData.scriptList.length || selectData.fileList.length){ + if (selectData.processList.length===this.data.processList.length && + selectData.formList.length===this.data.formList.length && + selectData.applicationDictList.length===this.data.applicationDictList.length && + selectData.scriptList.length===this.data.scriptList.length && + selectData.fileList.length===this.data.fileList.length){ + selectData = { + "processList": [], + "formList": [], + "applicationDictList": [], + "scriptList": [], + "fileList": [] + }; + }else{ + selectData = { + "processList": this.data.processList, + "formList": this.data.formList, + "applicationDictList": this.data.applicationDictList, + "scriptList": this.data.scriptList, + "fileList": this.data.fileList + }; + } + }else{ + selectData = { + "processList": this.data.processList, + "formList": this.data.formList, + "applicationDictList": this.data.applicationDictList, + "scriptList": this.data.scriptList, + "fileList": this.data.fileList + }; + } + + this.checkSelect(selectData); + }, getNameContent: function(){ return { "title": this.lp.name+": "+this.data.name+" "+this.lp.id+": "+this.data.id, @@ -550,9 +609,41 @@ MWF.xApplication.AppCenter.Exporter.PortalElement = new Class({ "description": this.data.description, "pageList": [], "scriptList": [], - "widgetList": [] + "widgetList": [], + "fileList": [] }; }, + selectAll: function(){ + var selectData = this.postData; + if (selectData.pageList.length || selectData.scriptList.length || selectData.widgetList.length || selectData.fileList.length){ + if (selectData.pageList.length===this.data.pageList.length && + selectData.scriptList.length===this.data.scriptList.length && + selectData.widgetList.length===this.data.widgetList.length && + selectData.fileList.length===this.data.fileList.length){ + selectData = { + "pageList": [], + "scriptList": [], + "widgetList": [], + "fileList": [] + }; + }else{ + selectData = { + "pageList": this.data.pageList, + "scriptList": this.data.scriptList, + "widgetList": this.data.widgetList, + "fileList": this.data.fileList + }; + } + }else{ + selectData = { + "pageList": this.data.pageList, + "scriptList": this.data.scriptList, + "widgetList": this.data.widgetList, + "fileList": this.data.fileList + }; + } + this.checkSelect(selectData); + }, selectElements: function(){ new MWF.xApplication.AppCenter.Exporter.Element.PortalSelector(this, this.data); }, @@ -560,12 +651,14 @@ MWF.xApplication.AppCenter.Exporter.PortalElement = new Class({ this.postData.pageList = selectData.pageList; this.postData.scriptList = selectData.scriptList; this.postData.widgetList = selectData.widgetList; + this.postData.fileList = selectData.fileList; - if (selectData.pageList.length || selectData.scriptList.length || selectData.widgetList.length){ + if (selectData.pageList.length || selectData.scriptList.length || selectData.widgetList.length || selectData.fileList.length){ this.exporter.selectData.portalList.push(this.postData); if (selectData.pageList.length==this.data.pageList.length && selectData.scriptList.length==this.data.scriptList.length && - selectData.widgetList.length==this.data.widgetList.length){ + selectData.widgetList.length==this.data.widgetList.length && + selectData.fileList.length==this.data.fileList.length){ this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat"); }else{ this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat"); @@ -593,24 +686,62 @@ MWF.xApplication.AppCenter.Exporter.CmsElement = new Class({ "categoryInfoList": [], "formList": [], "appDictList": [], - "scriptList": [] + "scriptList": [], + "fileList": [] }; }, selectElements: function(){ new MWF.xApplication.AppCenter.Exporter.Element.CmsSelector(this, this.data); }, + selectAll: function(){ + var selectData = this.postData; + if (selectData.categoryInfoList.length || selectData.formList.length || selectData.appDictList.length || selectData.scriptList.length || selectData.fileList.length){ + if (selectData.categoryInfoList.length===this.data.categoryInfoList.length && + selectData.formList.length===this.data.formList.length && + selectData.appDictList.length===this.data.appDictList.length && + selectData.scriptList.length===this.data.scriptList.length && + selectData.fileList.length===this.data.fileList.length){ + selectData = { + "categoryInfoList": [], + "formList": [], + "appDictList": [], + "scriptList": [], + "fileList": [] + }; + }else{ + selectData = { + "categoryInfoList": this.data.categoryInfoList, + "formList": this.data.formList, + "appDictList": this.data.appDictList, + "scriptList": this.data.scriptList, + "fileList": this.data.fileList + }; + } + }else{ + selectData = { + "categoryInfoList": this.data.categoryInfoList, + "formList": this.data.formList, + "appDictList": this.data.appDictList, + "scriptList": this.data.scriptList, + "fileList": this.data.fileList + }; + } + this.checkSelect(selectData); + }, checkSelect: function(selectData){ this.postData.categoryInfoList = selectData.categoryInfoList; this.postData.formList = selectData.formList; this.postData.appDictList = selectData.appDictList; this.postData.scriptList = selectData.scriptList; + this.postData.fileList = selectData.fileList; - if (selectData.categoryInfoList.length || selectData.formList.length || selectData.appDictList.length || selectData.scriptList.length){ + if (selectData.categoryInfoList.length || selectData.formList.length || selectData.appDictList.length || selectData.scriptList.length || selectData.fileList.length){ this.exporter.selectData.cmsList.push(this.postData); - if (selectData.categoryInfoList.length==this.data.categoryInfoList.length && - selectData.formList.length==this.data.formList.length && - selectData.appDictList.length==this.data.appDictList.length && - selectData.scriptList.length==this.data.scriptList.length){ + if (selectData.categoryInfoList.length===this.data.categoryInfoList.length && + selectData.formList.length===this.data.formList.length && + selectData.appDictList.length===this.data.appDictList.length && + selectData.scriptList.length===this.data.scriptList.length && + selectData.fileList.length===this.data.fileList.length){ this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat"); }else{ this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat"); @@ -637,6 +768,33 @@ MWF.xApplication.AppCenter.Exporter.QueryElement = new Class({ selectElements: function(){ new MWF.xApplication.AppCenter.Exporter.Element.QuerySelector(this, this.data); }, + selectAll: function(){ + var selectData = this.postData; + if (selectData.viewList.length || selectData.statList.length || selectData.revealList.length){ + if (selectData.viewList.length===this.data.viewList.length && + selectData.statList.length===this.data.statList.length && + selectData.revealList.length===this.data.revealList.length){ + selectData = { + "viewList": this.data.viewList, + "statList": this.data.statList, + "revealList": this.data.revealList + }; + }else{ + selectData = { + "viewList": this.data.viewList, + "statList": this.data.statList, + "revealList": this.data.revealList + }; + } + }else{ + selectData = { + "viewList": this.data.viewList, + "statList": this.data.statList, + "revealList": this.data.revealList + }; + } + this.checkSelect(selectData); + }, checkSelect: function(selectData){ this.postData.viewList = selectData.viewList; this.postData.statList = selectData.statList; @@ -860,13 +1018,15 @@ MWF.xApplication.AppCenter.Exporter.Element.PortalSelector = new Class({ return { "pageList": [], "scriptList": [], - "widgetList": [] + "widgetList": [], + "fileList": [] } }, checkSelect: function() { this.selectData.pageList = this.getCheckedList(this.listPageContent); this.selectData.scriptList = this.getCheckedList(this.listScriptContent); this.selectData.widgetList = this.getCheckedList(this.listWidgetContent); + this.selectData.fileList = this.getCheckedList(this.listFileContent); this.element.checkSelect(this.selectData); this.hide(); }, @@ -875,6 +1035,7 @@ MWF.xApplication.AppCenter.Exporter.Element.PortalSelector = new Class({ this.listPageContent = this.listProcess("pageList"); this.listScriptContent = this.listProcess("scriptList"); this.listWidgetContent = this.listProcess("widgetList"); + this.listFileContent = this.listProcess("fileList"); } }); MWF.xApplication.AppCenter.Exporter.Element.CmsSelector = new Class({ @@ -884,7 +1045,8 @@ MWF.xApplication.AppCenter.Exporter.Element.CmsSelector = new Class({ "categoryInfoList": [], "formList": [], "appDictList": [], - "scriptList": [] + "scriptList": [], + "fileList": [] } }, checkSelect: function() { @@ -892,6 +1054,7 @@ MWF.xApplication.AppCenter.Exporter.Element.CmsSelector = new Class({ this.selectData.formList = this.getCheckedList(this.listFormContent); this.selectData.appDictList = this.getCheckedList(this.listDictContent); this.selectData.scriptList = this.getCheckedList(this.listScriptContent); + this.selectData.fileList = this.getCheckedList(this.listFileContent); this.element.checkSelect(this.selectData); this.hide(); }, @@ -901,6 +1064,7 @@ MWF.xApplication.AppCenter.Exporter.Element.CmsSelector = new Class({ this.listFormContent = this.listProcess("formList"); this.listDictContent = this.listProcess("appDictList"); this.listScriptContent = this.listProcess("scriptList"); + this.listFileContent = this.listProcess("fileList"); }, getItemName: function(item){ return item.name || item.categoryName; diff --git a/o2web/source/x_component_Calendar/Common.js b/o2web/source/x_component_Calendar/Common.js index 1594343535c6279904afd3956bbec8414a1166f6..06e4df4fd1baecb4b5a671299e3fe7e628e48bf7 100644 --- a/o2web/source/x_component_Calendar/Common.js +++ b/o2web/source/x_component_Calendar/Common.js @@ -743,7 +743,7 @@ MWFCalendar.EventForm = new Class({ this.isWeekSelectCreated = false; this.formTopNode = null; - if(this.setFormNodeSizeFun && this.app ){ + if(this.setFormNodeSizeFun && this.app && this.app.removeEvent ){ this.app.removeEvent("resize",this.setFormNodeSizeFun); } if( this.formMaskNode )this.formMaskNode.destroy(); @@ -826,7 +826,8 @@ MWFCalendar.EventForm = new Class({ }.bind(this)); var _self = this; - this.app.confirm("warn", e, this.lp.deleteAttachmentTitle, this.lp.deleteAttachment+"( "+names.join(", ")+" )", 300, 120, function(){ + var confirm = ( this.app && this.app.confirm ) ? this.app.confirm : MWF.xDesktop.confirm; + confirm("warn", e, this.lp.deleteAttachmentTitle, this.lp.deleteAttachment+"( "+names.join(", ")+" )", 300, 120, function(){ while (attachments.length){ attachment = attachments.shift(); _self.deleteAttachment(attachment); @@ -875,7 +876,8 @@ MWFCalendar.EventForm = new Class({ }.bind(this)) }else if( data.id ){ //编辑 var text = this.app.lp.cancel_confirm.replace(/{name}/g, this.data.title); - this.app.confirm("infor", e, this.app.lp.cancel_confirm_title, text, 380, 200, function(){ + var confirm = ( this.app && this.app.confirm ) ? this.app.confirm : MWF.xDesktop.confirm; + confirm("infor", e, this.app.lp.cancel_confirm_title, text, 380, 200, function(){ _self._cancelEvent(); this.close(); }, function(){ @@ -902,7 +904,11 @@ MWFCalendar.EventForm = new Class({ }, save: function(){ this._save(function(){ - this.app.notice(this.lp.event_saveSuccess, "success"); + if( this.app && this.app.notice ){ + this.app.notice(this.lp.event_saveSuccess, "success"); + }else{ + MWF.xDesktop.notice("ok", {"x": "right", "y": "top"}, this.lp.event_saveSuccess, $(document.body)) + } this.close(); //if (!this.attachmentNode){ // this.loadAttachment(); @@ -923,7 +929,11 @@ MWFCalendar.EventForm = new Class({ } if (errorText){ - this.app.notice(this.lp.event_input_error+errorText, "error"); + if( this.app && this.app.notice ){ + this.app.notice(this.lp.event_input_error+errorText, "error"); + }else{ + MWF.xDesktop.notice("error", {"x": "right", "y": "top"}, this.lp.event_input_error+errorText, $(document.body)); + } return false; } @@ -1010,7 +1020,7 @@ MWFCalendar.EventForm = new Class({ //if( this.form ){ // this.form.destroy(); //} - if(this.setFormNodeSizeFun && this.app ){ + if(this.setFormNodeSizeFun && this.app && this.app.removeEvent ){ this.app.removeEvent("resize",this.setFormNodeSizeFun); } if( this.formMaskNode )this.formMaskNode.destroy(); @@ -1218,7 +1228,7 @@ MWFCalendar.CalendarForm = new Class({ }, editCalendar : function(){ this.formTopNode = null; - if(this.setFormNodeSizeFun && this.app ){ + if(this.setFormNodeSizeFun && this.app && this.app.removeEvent ){ this.app.removeEvent("resize",this.setFormNodeSizeFun); } if( this.formMaskNode )this.formMaskNode.destroy(); @@ -1271,7 +1281,7 @@ MWFCalendar.CalendarForm = new Class({ //if( this.form ){ // this.form.destroy(); //} - if(this.setFormNodeSizeFun && this.app ){ + if(this.setFormNodeSizeFun && this.app && this.app.removeEvent){ this.app.removeEvent("resize",this.setFormNodeSizeFun); } if( this.formMaskNode )this.formMaskNode.destroy(); diff --git a/o2web/source/x_component_Calendar/Main.js b/o2web/source/x_component_Calendar/Main.js index abdd50a0d8b1951ed453062392dced694358d2f9..21d0307c85967f0ae068ed06f081d3a436d614b9 100644 --- a/o2web/source/x_component_Calendar/Main.js +++ b/o2web/source/x_component_Calendar/Main.js @@ -26,7 +26,7 @@ MWF.xApplication.Calendar.Main = new Class({ this.isManager = MWF.AC.isAdministrator(); this.userName = ( layout.desktop.session.user || layout.user ).distinguishedName; if (!this.actions) this.actions = MWF.Actions.get("x_calendar_assemble_control"); //new MWF.xApplication.Calendar.Actions.RestActions(); - if (!this.personActions) this.personActions = MWF.Actions.get("x_organization_assemble_express"); + //if (!this.personActions) this.personActions = MWF.Actions.get("x_organization_assemble_express"); }, loadApplication: function(callback) { MWF.UD.getDataJson("calendarConfig", function(json){ @@ -125,8 +125,10 @@ MWF.xApplication.Calendar.Main = new Class({ }).inject(this.node); }, loadLayout: function(){ - if( this.status && this.status.action ){ + if( this.status && this.status.action ) { this.defaultAction = this.status.action; + }else if( this.options.defaultAction ){ + this.defaultAction = this.options.defaultAction; }else if (this.calendarConfig.defaultView){ this.defaultAction = this.calendarConfig.defaultView; }else{ @@ -309,7 +311,7 @@ MWF.xApplication.Calendar.Main = new Class({ } }, toList: function(){ - this.contentNode.setStyle("background", "#EEE"); + if(this.contentNode)this.contentNode.setStyle("background", "#EEE"); if( this.currentView ){ this.currentView.destroy(); this.currentView = null; @@ -339,7 +341,7 @@ MWF.xApplication.Calendar.Main = new Class({ }, toMonth: function(){ - this.contentNode.setStyle("background", "#EEE"); + if(this.contentNode)this.contentNode.setStyle("background", "#EEE"); if( this.currentView ){ this.currentView.destroy(); this.currentView = null; @@ -369,7 +371,7 @@ MWF.xApplication.Calendar.Main = new Class({ }, toWeek: function(){ - this.contentNode.setStyle("background", "#EEE"); + if(this.contentNode)this.contentNode.setStyle("background", "#EEE"); if( this.currentView ){ this.currentView.destroy(); this.currentView = null; @@ -399,7 +401,7 @@ MWF.xApplication.Calendar.Main = new Class({ }, toDay: function(d){ - this.contentNode.setStyle("background", "#EEE"); + if(this.contentNode)this.contentNode.setStyle("background", "#EEE"); if( this.currentView ){ this.currentView.destroy(); this.currentView = null; diff --git a/o2web/source/x_component_Calendar/lp/zh-cn.js b/o2web/source/x_component_Calendar/lp/zh-cn.js index de9ce9b7cf8c56b689bec12ae30725ca304d1966..628990afc7f6c3dfb093280dc72081c3ee19bb4a 100644 --- a/o2web/source/x_component_Calendar/lp/zh-cn.js +++ b/o2web/source/x_component_Calendar/lp/zh-cn.js @@ -124,6 +124,17 @@ MWF.xApplication.Calendar.LP = { "arr": ["周日","周一","周二","周三","周四","周五","周六"], "rruleArr" : ["SU","MO","TU","WE","TH","FR","SA"] }, + "weeksShort": { + "Sun": "日", + "Mon": "一", + "Tues": "二", + "Wed": "三", + "Thur": "四", + "Fri": "五", + "Sat": "六", + "arr": ["日","一","二","三","四","五","六"], + "rruleArr" : ["SU","MO","TU","WE","TH","FR","SA"] + }, "config": { "navi": "导航", "autoHide": "自动隐藏", diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default/css.wcss b/o2web/source/x_component_Calendar/widget/$Schedule/default/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..27bec7ca3cacb1575d3473bf5618af69d6206119 --- /dev/null +++ b/o2web/source/x_component_Calendar/widget/$Schedule/default/css.wcss @@ -0,0 +1,498 @@ +{ + + + "node": { + "margin": "10px 0px", + "overflow": "hidden", + "background-color": "#fff", + "magin-top": "60px", + //"position": "absolute", + "width": "100%", +// "top": "0px", +// "left": "200px", + "display": "block", + "opacity": "1" + }, + + "scrollNode" : { + "overflow-x": "hidden", + "overflow-y": "scroll" + }, + "contentWarpNode" : { + //"width": "1170px", + //"margin" : "0px auto 20px auto", + "overflow" : "hidden" + }, + "contentContainerNode" : { + "height" : "100%", + "overflow": "hidden" + }, + "contentNode" : { + "background-color": "#FFF", + "-webkit-user-select": "none", + "-moz-user-select": "none" + }, + + "calendarTitleNode": { + "height": "40px", + "overflow": "hidden", + "background-color": "#F7F7F7" + }, + "calendarBodyNode": { + "overflow": "hidden" + }, + "titleNameNode" : { + "margin-left" : "10px", + "line-height" : "40px", + "font-size" : "16px", + "color" : "#333", + "float" : "left" + }, + "calendarPrevMonthNode": { + "line-height" : "40px", + "height": "16px", + "width": "16px", + "margin": "12px 3px", + "background": "url(/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_left.png) no-repeat center center", + "cursor": "pointer", + "float": "right" + }, + "calendarPrevMonthNode_over": { + "background": "url(/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_left_click.png) no-repeat center center" + }, + "calendarPrevMonthNode_down": { + "background": "url(/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_left_click.png) no-repeat center center" + }, + "calendarNextMonthNode": { + "height": "16px", + "width": "16px", + "margin": "12px 3px", + "background": "url(/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_right.png) no-repeat center center", + "cursor": "pointer", + "float": "right" + }, + "calendarNextMonthNode_over": { + "background": "url(/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_right_click.png) no-repeat center center" + }, + "calendarNextMonthNode_down": { + "background": "url(/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_right_click.png) no-repeat center center" + }, + "calendarTitleTextNode": { + "line-height": "38px", + "color" : "#0081F3", + "margin": "0px 20px", + "font-size": "16px", + "float": "right", + "cursor": "pointer" + }, + "calendarTitleTextNode_over": { + "color": "#4990e2" + }, + "calendarTitleTextNode_down": { + "color": "#4990e2" + }, + "calendarMonthSelectNode": { + "width": "260px", + "height": "300px", + "background-color": "#FFF", + "position": "absolute", + "text-align": "center", + "box-shadow": "0 0 8px 0 rgba(0,0,0,0.25)", + "border-radius" : "8px" + }, + "calendarMonthSelectTitleNode": { + "color" : "#fff", + "background-color": "#3C76B7", + "overflow": "hidden" + }, + "calendarMonthSelectTitlePrevYearNode": { + "height": "40px", + "width": "40px", + "float": "left", + "background": "url(/x_component_Calendar/$MonthView/default/icon/icon_left.png) no-repeat center center", + "cursor": "pointer" + }, + "calendarMonthSelectTitleNextYearNode": { + "height": "40px", + "width": "40px", + "float": "right", + "background": "url(/x_component_Calendar/$MonthView/default/icon/icon_right.png) no-repeat center center", + "cursor": "pointer" + }, + "calendarMonthSelectTitleTextNode": { + "text-align": "center", + "margin": "0px 40px", + "height": "40px", + "font-size": "18px", + "line-height": "40px" + }, + "calendarMonthSelectCurrentNode" : { + "color" : "#4990e2", + "cursor": "pointer", + "font-size": "14px", + "height" : "30px", + "line-height" : "30px", + "border-radius" : "100px", + "width" : "30px", + "border" : "1px solid #4990e2", + "background-color" : "#fff", + "margin" : "auto" + }, + "calendarMonthSelectTodayNode" : { + "color" : "#fff", + "cursor": "pointer", + "font-size": "14px", + "height" : "30px", + "line-height" : "30px", + "border-radius" : "100px", + "width" : "30px", + "border" : "1px solid #4990e2", + "background-color" : "#4990e2", + "margin" : "auto" + }, + "calendarMonthSelectTdNode": { + "cursor": "pointer", + "height" : "30px", + "width" : "30px", + "color": "#333", + "font-size": "14px" + }, + "calendarMonthSelectTdNode_over": { + "color": "#4990e2" + }, + "calendarMonthSelectTdNode_down": { + "color": "#8894e9" + }, + + "calendarMonthSelectBottomNode": { + "height": "50px", + "font-size": "18px", + "line-height": "40px", + "cursor": "pointer", + "color": "#333" + }, + "calendarMonthSelectBottomNode_over": { + "color": "#4990e2" + }, + + "calendarTitleTableContainer": { + "table-layout" : "fixed", + "height": "40px", + "overflow": "hidden" + //"margin": "0px auto 0px 12px" + }, + "rightContentNode" : { + "float" : "left", + "width" : "130px", + "margin-top" : "5px", + "background-color" : "#4A90E2", + "color" : "#fff", + "padding" : "15px" + }, + "rightContentTitle" : { "overflow" : "hidden", "height" : "28px" }, + "rightContentTitle_text" : { + "float" : "left", + "font-size" : "13px" + }, + "rightContentTitle_count" : { + "float" : "left", + "font-size" : "13px", + "width" : "18px", + "height" : "18px", + "text-align" : "center", + "background-color" : "#fff", + "color" : "#4A90E2", + "border-radius" : "30px", + "margin" : "0px 4px" + }, + "rightContentItemContainer" : { + "height" : "130px" + }, + "rightContentItem" : { + "cursor" : "pointer", + "border-radius" : "2px", + "background-color" : "#fff", + "width" : "130px", + "height" : "50px", + "position" : "relative", + "margin-top" : "10px" + }, + "rightContentItemDot" : { + "width" : "6px", + "height" : "6px", + "background-color" : "#4A90E2", + "position" : "absolute", + "top" : "12px", + "left" : "5px", + "border-radius": "20px" + }, + "rightContentItemText" : { + "width" : "100px", + "overflow" : "hidden", + "line-height" : "20px", + "height" : "20px", + "font-size" : "12px", + "color" : "#333", + "padding-top" : "5px", + "margin-left" : "18px" + }, + "rightContentItemTime" : { + "font-size" : "11px", + "color" : "#333", + "height" : "20px", + "margin-left" : "18px" + }, + "rightToolbar" : { + "overflow" : "hidden" + }, + "rightTool_add" : { + "padding-left" : "20px", + "height": "20px", + "width": "40px", + "float": "left", + "background": "url(/x_component_Calendar/widget/$Schedule/default/icon/icon_zj_click.png) no-repeat left center", + "cursor": "pointer" + }, + "rightTool_more" : { + "padding-left" : "20px", + "height": "20px", + "width": "40px", + "float": "right", + "background": "url(/x_component_Calendar/widget/$Schedule/default/icon/icon_more.png) no-repeat left center", + "cursor": "pointer" + }, + "calendarTable": { + "table-layout" : "fixed", + "font-size" : "12px", + "width": "100%", + "border-left": "1px solid #dfdfdf" + }, + "calendarTableTitleTr": { + "height": "30px" + }, + "calendarTableTh": { + "width": "14.28%", + //"background-color" : "#f0f0f0", + "color": "#333", + "font-size": "14px", + "font-weight" : "normal", + //"min-width": "120px", + //"border-bottom": "1px solid #CCC", + "text-align" : "center" + }, + "calendarTableTh_pre": { + "background-color" : "#f0f0f0", + "color": "#666", + "font-size": "18px", + "font-weight" : "normal", + //"min-width": "120px", + "border-bottom": "1px solid #CCC", + "border-left": "1px solid #f0f0f0", + "text-align" : "center", + "overflow" : "hidden" + }, + "calendarTableCell_thisMonth": { + "width": "14.28%", +// "margin": "7px", + "overflow": "hidden", + "text-align" : "center", + "color" : "#ccc", + "background-color": "transparent" +// "border-right": "1px solid #dfdfdf", +// "border-bottom": "1px solid #dfdfdf", +// "border-radius": "4px", + // "height" : "20px" + }, + "calendarTableCell_otherMonth": { + "width": "14.28%", + "text-align" : "center", +// "margin": "7px", + "overflow": "hidden", + "background-color": "transparent" +// "border-right": "1px solid #dfdfdf", +// "border-bottom": "1px solid #dfdfdf", +// "border-radius": "4px", + // "height" : "20px" + }, + "calendarTableCell_today": { + "width": "14.28%", + "text-align" : "center", +// "margin": "7px", + "overflow": "hidden", + "background-color": "transparent" //"#F8FBFF", +// "border-right": "1px solid #dfdfdf", +// "border-bottom": "1px solid #dfdfdf", +// "border-radius": "4px", +// "height" : "20px" + }, + +// "dayTitle_thisMonth": { +// //"padding" : "5px 0px 5px 5px", +// "height": "40px", +// "cursor": "pointer", +// "line-height": "40px"//, +// // "background-color": "#FFF" +// }, +// "dayTitle_otherMonth": { +// //"padding" : "5px 0px 5px 5px", +// "min-height": "20px", +// "cursor": "pointer", +// "line-height": "40px"//, +// // "background-color": "#FFF" +// }, +// "dayTitle_today": { +// //"padding" : "5px 0px 5px 5px", +// "min-height": "40px", +// "cursor": "pointer", +// "line-height": "40px"//, +// // "background-color": "#F8FBFF" +//// }, + "dayTitleDay_thisMonth": { + "width": "20px", + "text-align" : "center", + "margin" : "0px auto", + "font-size" : "14px", +// "min-height": "20px", +// "width" : "20px", + //"float": "left", + "position" : "relative", + "border": "0px", + "color": "#333", + "cursor" : "pointer" + }, + + "dayTitleDay_otherMonth": { + "width": "20px", + "text-align" : "center", + "margin" : "0px auto", + "color" : "#ccc", + "font-size" : "14px", +// "height": "20px", +// "width" : "20px", + //"float": "left", + "position" : "relative", + "border": "0px", + "color": "#ccc", + "cursor" : "pointer" + }, + "dayTitleDay_current": { + "width": "20px", + "margin-top" : "3px", + "font-size" : "14px", + "border": "1px solid #3C76B7", + "border-radius": "100px", + "text-align" : "center", + "margin" : "0px auto", + "position" : "relative", + // "width": "20px", + // "height": "20px", + //"float": "left", + "color": "#3C76B7", + "cursor" : "pointer" + }, + "dayTitleDay_today": { + "width": "20px", + "margin-top" : "3px", + "font-size" : "14px", + "background": "#3C76B7", + "border-radius": "100px", + "text-align" : "center", + "margin" : "0px auto", + "position" : "relative", +// "width": "20px", +// "height": "20px", + //"float": "left", + "color": "#fff", + "cursor" : "pointer" + }, + "dayHasData" : { + "width" : "6px", + "height" : "6px", + "background-color" : "#4A90E2", + "position" : "absolute", + "top" : "1px", + "right" : "-8px", + "border-radius": "20px" + }, + "dayHasData_today" : { + "width" : "6px", + "height" : "6px", + "background-color" : "#4A90E2", + "position" : "absolute", + "top" : "1px", + "right" : "-8px", + "border-radius": "20px" + }, + +// "dayTitleInfor_thisMonth": { +// "margin-right": "10px", +// "height": "20px", +// "font-size" : "14px", +// "line-height": "20px", +// "text-align": "right", +// "color": "#3C76B7" +// }, +// "dayTitleInfor_otherMonth": { +// "margin-right": "10px", +// "height": "20px", +// "font-size" : "14px", +// "line-height": "20px", +// "text-align": "right", +// "color": "#999" +// }, +// "dayTitleInfor_today": { +// "margin-right": "10px", +// "height": "20px", +// "font-size" : "14px", +// "line-height": "20px", +// "text-align": "right", +// "color": "#3C76B7" +// }, + + "dayContentNode": { + "overflow": "hidden", + //"border-top": "1px solid #ccc", + "margin": "0px 5px 0px 0px" + }, + "calendarNode_today": { + "height": "30px", + "background-color": "#F8FBFF", + "margin": "0px", + "cursor": "pointer", + "font-size": "14px", + "color": "#333", + "line-height": "30px" + }, + "calendarNode": { + "height": "30px", + "background-color": "#FFF", + "margin": "0px", + "cursor": "pointer", + "font-size": "14px", + "color": "#333", + "line-height": "30px" + }, + "calendarNode_over" : { + "background-color": "#F8F8F8", + "color" : "#3C76B7" + }, + "calendarIconNode": { + "height": "30px", + "width": "20px", + "float": "left" + }, + "calendarTextNode": { + "margin-left": "20px", + "margin-right": "48px", + "height": "30px", + "overflow": "hidden" + }, + "calendarTimeNode":{ + "height": "30px", + "width": "40px", + "color" : "#999", + "font-size": "14px", + "float": "right" + } + +} \ No newline at end of file diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_more.png b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_more.png new file mode 100644 index 0000000000000000000000000000000000000000..b58d755a62ba998fd56867acc38686832e66c31b Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_more.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_left.png b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_left.png new file mode 100644 index 0000000000000000000000000000000000000000..97f9f906d7f8f593a97f85f2a44dd15fc7e04abb Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_left.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_left_click.png b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_left_click.png new file mode 100644 index 0000000000000000000000000000000000000000..d5d95e7d3ce33b6c9fcf4492b6d65b7854811c0a Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_left_click.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_right.png b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_right.png new file mode 100644 index 0000000000000000000000000000000000000000..6e49099817722dadff71431a0412b7141b19958d Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_right.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_right_click.png b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_right_click.png new file mode 100644 index 0000000000000000000000000000000000000000..be2eb08e7383c50336eaeaaf7922467bc6dfa686 Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_triangle_right_click.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_zj_click.png b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_zj_click.png new file mode 100644 index 0000000000000000000000000000000000000000..be97c62250a676fdd559c3f179350e2fef3fc8d6 Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default/icon/icon_zj_click.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/css.wcss b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..59f5bc6a31ed0a00a2cf9340c722f4306661cc7a --- /dev/null +++ b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/css.wcss @@ -0,0 +1,390 @@ +{ + + + "node": { + "margin": "10px 0px", + "overflow": "hidden", + "background-color": "#fff", + "magin-top": "60px", + //"position": "absolute", + "width": "100%", +// "top": "0px", +// "left": "200px", + "display": "block", + "opacity": "1" + }, + + "scrollNode" : { + "overflow-x": "hidden", + "overflow-y": "scroll" + }, + "contentWarpNode" : { + //"width": "1170px", + //"margin" : "0px auto 20px auto", + "overflow" : "hidden" + }, + "contentContainerNode" : { + "height" : "100%", + "overflow": "hidden" + }, + "contentNode" : { + "background-color": "#FFF", + "-webkit-user-select": "none", + "-moz-user-select": "none" + }, + + "calendarTitleNode": { + "height": "40px", + "overflow": "hidden", + "background-color": "#F7F7F7" + }, + "calendarBodyNode": { + "overflow": "hidden" + }, + "titleNameNode" : { + "font-size" : "16px", + "color" : "#333" + }, + "calendarPrevMonthNode": { + "height": "30px", + "width": "40px", + "margin": "5px 0px 5px 40px", + "background": "url(/x_component_Calendar/$MonthView/default/icon/left24_gray.png) no-repeat center center", + "cursor": "pointer", + "float": "right" + }, + "calendarPrevMonthNode_over": { + "background": "url(/x_component_Calendar/$MonthView/default/icon/left24_blue.png) no-repeat center center" + }, + "calendarPrevMonthNode_down": { + "background": "url(/x_component_Calendar/$MonthView/default/icon/left24_blue.png) no-repeat center center" + }, + "calendarNextMonthNode": { + "height": "30px", + "width": "40px", + "margin": "5px 0px", + "background": "url(/x_component_Calendar/$MonthView/default/icon/right24_gray.png) no-repeat center center", + "cursor": "pointer", + "float": "right" + }, + "calendarNextMonthNode_over": { + "background": "url(/x_component_Calendar/$MonthView/default/icon/right24_blue.png) no-repeat center center" + }, + "calendarNextMonthNode_down": { + "background": "url(/x_component_Calendar/$MonthView/default/icon/right24_blue.png) no-repeat center center" + }, + "calendarTitleTextNode": { + "line-height": "38px", + "color" : "#333", + "margin": "0px 10px", + "font-size": "20px", + "float": "right", + "cursor": "pointer" + }, + "calendarTitleTextNode_over": { + "color": "#4990e2" + }, + "calendarTitleTextNode_down": { + "color": "#4990e2" + }, + "calendarMonthSelectNode": { + "width": "260px", + "height": "300px", + "background-color": "#FFF", + "position": "absolute", + "text-align": "center", + "box-shadow": "0 0 8px 0 rgba(0,0,0,0.25)", + "border-radius" : "8px" + }, + "calendarMonthSelectTitleNode": { + "color" : "#fff", + "background-color": "#3C76B7", + "overflow": "hidden" + }, + "calendarMonthSelectTitlePrevYearNode": { + "height": "40px", + "width": "40px", + "float": "left", + "background": "url(/x_component_Calendar/$MonthView/default/icon/icon_left.png) no-repeat center center", + "cursor": "pointer" + }, + "calendarMonthSelectTitleNextYearNode": { + "height": "40px", + "width": "40px", + "float": "right", + "background": "url(/x_component_Calendar/$MonthView/default/icon/icon_right.png) no-repeat center center", + "cursor": "pointer" + }, + "calendarMonthSelectTitleTextNode": { + "text-align": "center", + "margin": "0px 40px", + "height": "40px", + "font-size": "18px", + "line-height": "40px" + }, + "calendarMonthSelectCurrentNode" : { + "color" : "#4990e2", + "cursor": "pointer", + "font-size": "14px", + "height" : "30px", + "line-height" : "30px", + "border-radius" : "100px", + "width" : "30px", + "border" : "1px solid #4990e2", + "background-color" : "#fff", + "margin" : "auto" + }, + "calendarMonthSelectTodayNode" : { + "color" : "#fff", + "cursor": "pointer", + "font-size": "14px", + "height" : "30px", + "line-height" : "30px", + "border-radius" : "100px", + "width" : "30px", + "border" : "1px solid #4990e2", + "background-color" : "#4990e2", + "margin" : "auto" + }, + "calendarMonthSelectTdNode": { + "cursor": "pointer", + "height" : "30px", + "width" : "30px", + "color": "#333", + "font-size": "14px" + }, + "calendarMonthSelectTdNode_over": { + "color": "#4990e2" + }, + "calendarMonthSelectTdNode_down": { + "color": "#8894e9" + }, + + "calendarMonthSelectBottomNode": { + "height": "50px", + "font-size": "18px", + "line-height": "40px", + "cursor": "pointer", + "color": "#333" + }, + "calendarMonthSelectBottomNode_over": { + "color": "#4990e2" + }, + + "calendarTitleTableContainer": { + "table-layout" : "fixed", + "height": "40px", + "overflow": "hidden" + //"margin": "0px auto 0px 12px" + }, + + "calendarTable": { + "table-layout" : "fixed", + "font-size" : "12px", + "width": "100%", + "border-left": "1px solid #dfdfdf" + }, + "calendarTableTitleTr": { + "height": "30px" + }, + "calendarTableTh": { + "width": "14.28%", + //"background-color" : "#f0f0f0", + "color": "#0494f6", + "font-size": "16px", + "font-weight" : "normal", + //"min-width": "120px", + "border-bottom": "1px solid #CCC", + "text-align" : "center" + }, + "calendarTableTh_pre": { + "background-color" : "#f0f0f0", + "color": "#666", + "font-size": "18px", + "font-weight" : "normal", + //"min-width": "120px", + "border-bottom": "1px solid #CCC", + "border-left": "1px solid #f0f0f0", + "text-align" : "center", + "overflow" : "hidden" + }, + "calendarTableCell_thisMonth": { + "width": "14.28%", +// "margin": "7px", + "overflow": "hidden", + "text-align" : "center", + "color" : "#ccc", + "background-color": "transparent" +// "border-right": "1px solid #dfdfdf", +// "border-bottom": "1px solid #dfdfdf", +// "border-radius": "4px", + // "height" : "20px" + }, + "calendarTableCell_otherMonth": { + "width": "14.28%", + "text-align" : "center", +// "margin": "7px", + "overflow": "hidden", + "background-color": "transparent" +// "border-right": "1px solid #dfdfdf", +// "border-bottom": "1px solid #dfdfdf", +// "border-radius": "4px", + // "height" : "20px" + }, + "calendarTableCell_today": { + "width": "14.28%", + "text-align" : "center", +// "margin": "7px", + "overflow": "hidden", + "background-color": "transparent" //"#F8FBFF", +// "border-right": "1px solid #dfdfdf", +// "border-bottom": "1px solid #dfdfdf", +// "border-radius": "4px", +// "height" : "20px" + }, + +// "dayTitle_thisMonth": { +// //"padding" : "5px 0px 5px 5px", +// "height": "40px", +// "cursor": "pointer", +// "line-height": "40px"//, +// // "background-color": "#FFF" +// }, +// "dayTitle_otherMonth": { +// //"padding" : "5px 0px 5px 5px", +// "min-height": "20px", +// "cursor": "pointer", +// "line-height": "40px"//, +// // "background-color": "#FFF" +// }, +// "dayTitle_today": { +// //"padding" : "5px 0px 5px 5px", +// "min-height": "40px", +// "cursor": "pointer", +// "line-height": "40px"//, +// // "background-color": "#F8FBFF" +//// }, + "dayTitleDay_thisMonth": { + "font-size" : "14px", +// "min-height": "20px", +// "width" : "20px", + //"float": "left", + "position" : "relative", + "color": "#333" + }, + + "dayTitleDay_otherMonth": { + "color" : "#ccc", + "font-size" : "14px", +// "height": "20px", +// "width" : "20px", + //"float": "left", + "position" : "relative", + "color": "#ccc" + }, + + "dayTitleDay_today": { + "width": "20px", + "margin-top" : "3px", + "font-size" : "14px", + "background": "#3C76B7", + "border-radius": "100px", + "text-align" : "center", + "margin" : "0px auto", + "position" : "relative", +// "width": "20px", +// "height": "20px", + //"float": "left", + "color": "#fff" + }, + "dayHasData" : { + "width" : "6px", + "height" : "6px", + "background-color" : "#4A90E2", + "position" : "absolute", + "top" : "1px", + "right" : "10px", + "border-radius": "20px" + }, + "dayHasData_today" : { + "width" : "6px", + "height" : "6px", + "background-color" : "#4A90E2", + "position" : "absolute", + "top" : "1px", + "right" : "-8px", + "border-radius": "20px" + }, + +// "dayTitleInfor_thisMonth": { +// "margin-right": "10px", +// "height": "20px", +// "font-size" : "14px", +// "line-height": "20px", +// "text-align": "right", +// "color": "#3C76B7" +// }, +// "dayTitleInfor_otherMonth": { +// "margin-right": "10px", +// "height": "20px", +// "font-size" : "14px", +// "line-height": "20px", +// "text-align": "right", +// "color": "#999" +// }, +// "dayTitleInfor_today": { +// "margin-right": "10px", +// "height": "20px", +// "font-size" : "14px", +// "line-height": "20px", +// "text-align": "right", +// "color": "#3C76B7" +// }, + + "dayContentNode": { + "overflow": "hidden", + //"border-top": "1px solid #ccc", + "margin": "0px 5px 0px 0px" + }, + "calendarNode_today": { + "height": "30px", + "background-color": "#F8FBFF", + "margin": "0px", + "cursor": "pointer", + "font-size": "14px", + "color": "#333", + "line-height": "30px" + }, + "calendarNode": { + "height": "30px", + "background-color": "#FFF", + "margin": "0px", + "cursor": "pointer", + "font-size": "14px", + "color": "#333", + "line-height": "30px" + }, + "calendarNode_over" : { + "background-color": "#F8F8F8", + "color" : "#3C76B7" + }, + "calendarIconNode": { + "height": "30px", + "width": "20px", + "float": "left" + }, + "calendarTextNode": { + "margin-left": "20px", + "margin-right": "48px", + "height": "30px", + "overflow": "hidden" + }, + "calendarTimeNode":{ + "height": "30px", + "width": "40px", + "color" : "#999", + "font-size": "14px", + "float": "right" + } + +} \ No newline at end of file diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/icon_left.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/icon_left.png new file mode 100644 index 0000000000000000000000000000000000000000..c2c330b79e2aca47f0480b9f407472c2a35bafe2 Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/icon_left.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/icon_right.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/icon_right.png new file mode 100644 index 0000000000000000000000000000000000000000..178507b561900638c47749afeae8270f56dbe33e Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/icon_right.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/invite.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/invite.png new file mode 100644 index 0000000000000000000000000000000000000000..255dbaf0c8ed4e9cc72bf202152c3d9362b2aa22 Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/invite.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left.png new file mode 100644 index 0000000000000000000000000000000000000000..c2f96b8816e43398e76263df2a80c463ec98afce Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left24_blue.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left24_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..b511f5e596919f576eea6a870672238b8fc6470e Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left24_blue.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left24_gray.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left24_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..fdf3c891a47b4cfacaf9cb0eff328be874b7d24a Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left24_gray.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left_down.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left_down.png new file mode 100644 index 0000000000000000000000000000000000000000..c9e686e134cbd18c20be09fac9c820ee56e289c8 Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left_down.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left_over.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left_over.png new file mode 100644 index 0000000000000000000000000000000000000000..2a5df6ef7854a7eb671b7cc6575d3eed4eb0b52b Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left_over.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left_year.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left_year.png new file mode 100644 index 0000000000000000000000000000000000000000..41e5c39ea6473840bcda4297aa3665acf4b7bb77 Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/left_year.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right.png new file mode 100644 index 0000000000000000000000000000000000000000..e0b42658251cc01250c8e987c616c7bceffb53bf Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right24_blue.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right24_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..0125a40f97b16e8a5fd3546f0504ba4f8714e430 Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right24_blue.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right24_gray.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right24_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..6a8ef5de8b3ef1745d97422214d6420ee1e96baa Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right24_gray.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right_down.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right_down.png new file mode 100644 index 0000000000000000000000000000000000000000..1c8bc8b005c2eac3cc5364aaab4835dfc4075f65 Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right_down.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right_over.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right_over.png new file mode 100644 index 0000000000000000000000000000000000000000..c7c5951bfddad9dea0c2dab318a855847eae824f Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right_over.png differ diff --git a/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right_year.png b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right_year.png new file mode 100644 index 0000000000000000000000000000000000000000..cf1aaca9d8524b76d0658ae1d28d47b7cbb6e569 Binary files /dev/null and b/o2web/source/x_component_Calendar/widget/$Schedule/default_bak/icon/right_year.png differ diff --git a/o2web/source/x_component_Calendar/widget/Schedule.js b/o2web/source/x_component_Calendar/widget/Schedule.js new file mode 100644 index 0000000000000000000000000000000000000000..59fe34b21fe37c67bdeb5a22fe6296e32f82aecf --- /dev/null +++ b/o2web/source/x_component_Calendar/widget/Schedule.js @@ -0,0 +1,900 @@ +var MWFCalendar = MWF.xApplication.Calendar = MWF.xApplication.Calendar || {}; +//MWF.xApplication.Calendar.widget = MWF.xApplication.Calendar.widget || {}; +MWF.xDesktop.requireApp("Calendar", "lp.zh-cn", null, false); +MWF.xDesktop.requireApp("Calendar", "Common", null, false); +o2.widget.Schedule = o2.Schedule = new Class({ + Implements: [Options, Events], + Extends: o2.widget.Common, + options: { + "style": "default", + "weekBegin" : 0, + "date" : "", + "title" : "" + }, + initialize: function(container, app, options){ + this.setOptions(options); + this.container = container; + this._app = app; + + this.path = this.options.path || "/x_component_Calendar/widget/$Schedule/"; + + this.cssPath = "/x_component_Calendar/widget/$Schedule/"+this.options.style+"/css.wcss"; + + this._loadCss(); + this.fireEvent("init"); + + this.load(); + + }, + load: function(){ + this.node = new Element("div", {"styles": this.css.node}).inject(this.container); + var date = ""; + if( this.options.date ){ + date = Date.parse( this.options.date ) + } + + + this.app = { + actions : MWF.Actions.get("x_calendar_assemble_control"), + lp : MWF.xApplication.Calendar.LP, + content : this._app.content + }; + + this.calendar = new o2.Schedule.Calendar(this, date ); + }, + reload: function(){ + if (this.calendar) this.calendar.reLoadCalendar(); + }, + destroy: function(){ + if (this.calendar){ + this.calendar.destroy(); + } + this.node.destroy(); + } +}); + +o2.Schedule.Calendar = new Class({ + Implements: [Events], + initialize: function(view, date){ + this.view = view; + this.css = this.view.css; + this.container = this.view.node; + this.date = date || new Date(); + this.today = new Date(); + this.days = {}; + this.app = this.view.app; + this.lp = MWF.xApplication.Calendar.LP; + this.weekBegin = this.view.options.weekBegin; + this.load(); + }, + load: function(){ + this.titleNode = new Element("div", {"styles": this.css.calendarTitleNode}).inject(this.container); + + this.contentNode = new Element("div", {"styles": { "overflow" : "hidden" }}).inject(this.container); + this.leftContentNode = new Element("div", {"styles": { "float" : "left" }}).inject(this.contentNode); + this.rightContentNode = new Element("div", {"styles": this.css.rightContentNode }).inject(this.contentNode); + + this.titleTableContainer = new Element("div", {"styles": this.css.calendarTitleTableContainer}).inject(this.leftContentNode); + + //this.scrollNode = new Element("div", { + // "styles": this.css.scrollNode + //}).inject(this.container); + //this.contentWarpNode = new Element("div", { + // "styles": this.css.contentWarpNode + //}).inject(this.scrollNode); + // + //this.contentContainerNode = new Element("div",{ + // "styles" : this.css.contentContainerNode + //}).inject(this.contentWarpNode); + this.bodyNode = new Element("div", { + "styles": this.css.contentNode + }).inject(this.leftContentNode); + //this.bodyNode.setStyle("position","relative"); + + //this.bodyNode = new Element("div", {"styles": this.css.calendarBodyNode}).inject(this.container); + + this.setTitleNode(); + + + this.setTitleTableNode(); + this.setBodyNode(); + + //this.app.addEvent("resize", this.resetBodySize.bind(this)); + + }, + resetBodySize: function(){ + var size = this.view.container.getSize(); + var titleSize = this.titleNode.getSize(); + var titleTableSize = this.titleTable.getSize(); + var y = size.y-titleSize.y-titleTableSize.y; + + this.leftContentNode.setStyle( "width", size.x - 160 + "px" ); + + this.rightContentNode.setStyle("height", size.y - titleSize.y - 35 + "px" ); + + o2.Schedule.TdHeight = y / 6; + o2.Schedule.TdWidth = (size.x - 160 )/ 7; + + //this.bodyNode.setStyle("height", ""+y+"px"); + + //var size = this.container.getSize(); + + //this.scrollNode.setStyle("height", ""+y+"px"); + + //this.titleTableContainer.setStyles({ + // "width": (size.x - 40) +"px" + //}); + + //if (this.contentWarpNode){ + // this.contentWarpNode.setStyles({ + // "width": (size.x - 40) +"px" + // }); + //} + + //var tableSize = this.calendarTable.getSize(); + //o2.Schedule.WeekWidth = tableSize.x; + //o2.Schedule.DayWidth = tableSize.x / 7; + //this.dataTdList.each( function( td ){ + // td.setStyle("width", o2.Schedule.WeekWidth) + //}); + + //if( this.wholeDayDocumentList && this.wholeDayDocumentList.length ){ + // this.wholeDayDocumentList.each( function( doc ){ + // doc.resize(); + // }.bind(this)) + //} + // + //if( this.oneDayDocumentList && this.oneDayDocumentList.length ){ + // this.oneDayDocumentList.each( function( doc ){ + // doc.resize(); + // }.bind(this)) + //} + + //var top = 30; + //var trs = this.calendarTable.getElements("tr"); + //this.calendarTrHeight = []; + //for( var key in this.usedYIndex ){ + // var idx = this.usedYIndex[key]; + // var maxLength = Math.max( idx[0].length, idx[1].length, idx[2].length, idx[3].length, idx[4].length, idx[5].length, idx[6].length ); + // if( maxLength > 4 ){ + // this.dataTableList[key].setStyle("top", top ); + // var height = 30 + maxLength * (22 + 2); + // top = top + height; + // trs[ parseInt(key) ].getElements("td").each( function(td){ + // td.setStyle("height", height ) + // }); + // this.calendarTrHeight.push( height ); + // }else{ + // this.dataTableList[key].setStyle("top", top ); + // top = top + o2.Schedule.WeekHeight + 1; + // trs[ parseInt(key) ].getElements("td").each( function(td){ + // td.setStyle("height", o2.Schedule.WeekHeight ) + // }); + // this.calendarTrHeight.push( o2.Schedule.WeekHeight ); + // } + //} + + + //var tdy = (y-30)/6; + //tdy = tdy-34; + //var tds = this.calendarTable.getElements("td"); + //tds.each(function(td){ + // var yy = tdy; + // var node = td.getLast("div"); + // if (node.childNodes.length>=4){ + // if (yy<92) yy = 69; + // } + // node.setStyle("height", ""+yy+"px"); + //}.bind(this)); + + + }, + setTitleNode: function(){ + //this.view.titleContainer.getElements("div:only-child").setStyle("display","none"); + //if( this.titleNode ){ + // this.titleNode.setStyle("display","") + //} + //this.titleNode = new Element("div").inject(this.view.titleContainer); + + if( this.view.options.title ){ + new Element("div", {"styles": this.css.titleNameNode, "text" : this.view.options.title }).inject(this.titleNode); + } + + + + var text = this.date.format(this.lp.dateFormatDay); + this.titleTextNode = new Element("div", {"styles": this.css.calendarTitleTextNode, "text": text}).inject(this.titleNode); + this.nextMonthNode = new Element("div", {"styles": this.css.calendarNextMonthNode}).inject(this.titleNode); + this.prevMonthNode = new Element("div", {"styles": this.css.calendarPrevMonthNode}).inject(this.titleNode); + + + + this.prevMonthNode.addEvents({ + "mouseover": function(){this.prevMonthNode.setStyles(this.css.calendarPrevMonthNode_over);}.bind(this), + "mouseout": function(){this.prevMonthNode.setStyles(this.css.calendarPrevMonthNode);}.bind(this), + "mousedown": function(){this.prevMonthNode.setStyles(this.css.calendarPrevMonthNode_down);}.bind(this), + "mouseup": function(){this.prevMonthNode.setStyles(this.css.calendarPrevMonthNode_over);}.bind(this), + "click": function(){this.changeMonthPrev();}.bind(this) + }); + this.nextMonthNode.addEvents({ + "mouseover": function(){this.nextMonthNode.setStyles(this.css.calendarNextMonthNode_over);}.bind(this), + "mouseout": function(){this.nextMonthNode.setStyles(this.css.calendarNextMonthNode);}.bind(this), + "mousedown": function(){this.nextMonthNode.setStyles(this.css.calendarNextMonthNode_down);}.bind(this), + "mouseup": function(){this.nextMonthNode.setStyles(this.css.calendarNextMonthNode_over);}.bind(this), + "click": function(){this.changeMonthNext();}.bind(this) + }); + this.titleTextNode.addEvents({ + "mouseover": function(){this.titleTextNode.setStyles(this.css.calendarTitleTextNode_over);}.bind(this), + "mouseout": function(){this.titleTextNode.setStyles(this.css.calendarTitleTextNode);}.bind(this), + "mousedown": function(){this.titleTextNode.setStyles(this.css.calendarTitleTextNode_down);}.bind(this), + "mouseup": function(){this.titleTextNode.setStyles(this.css.calendarTitleTextNode_over);}.bind(this), + "click": function(){this.changeMonthSelect();}.bind(this) + }); + }, + changeMonthPrev: function(){ + this.date.decrement("month", 1); + var text = this.date.format(this.lp.dateFormatDay); + this.titleTextNode.set("text", text); + this.reLoadCalendar(); + }, + changeMonthNext: function(){ + this.date.increment("month", 1); + var text = this.date.format(this.lp.dateFormatDay); + this.titleTextNode.set("text", text); + this.reLoadCalendar(); + }, + changeMonthSelect: function(){ + if (!this.monthSelector) this.createMonthSelector(); + this.monthSelector.show(); + }, + createMonthSelector: function(){ + this.monthSelector = new o2.Schedule.MonthSelector(this.date, this); + }, + changeMonthTo: function(d){ + this.date = d; + var text = this.date.format(this.lp.dateFormatDay); + this.titleTextNode.set("text", text); + this.reLoadCalendar(); + }, + + setTitleTableNode : function(){ + if( this.weekBegin == "1" ){ + var html = ""+this.lp.weeksShort.Mon+""+this.lp.weeksShort.Tues+""+this.lp.weeksShort.Wed+"" + + ""+this.lp.weeksShort.Thur+""+this.lp.weeksShort.Fri+""+this.lp.weeksShort.Sat+""+this.lp.weeksShort.Sun+""; + }else{ + var html = ""+this.lp.weeksShort.Sun+""+this.lp.weeksShort.Mon+""+this.lp.weeksShort.Tues+""+this.lp.weeksShort.Wed+"" + + ""+this.lp.weeksShort.Thur+""+this.lp.weeksShort.Fri+""+this.lp.weeksShort.Sat+""; + } + this.titleTable = new Element("table", { + "styles": this.css.calendarTable, + "height": "100%", + "border": "0", + "cellPadding": "0", + "cellSpacing": "0", + "html": html + }).inject(this.titleTableContainer); + this.calendarTableTitleTr = this.titleTable.getElement("tr"); + this.calendarTableTitleTr.setStyles(this.css.calendarTableTitleTr); + var ths = this.calendarTableTitleTr.getElements("th"); + ths.setStyles(this.css.calendarTableTh); + }, + setBodyNode: function(){ + var html = ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + this.calendarTable = new Element("table", { + "styles": this.css.calendarTable, + "height": "100%", + "border": "0", + "cellPadding": "0", + "cellSpacing": "0", + "html": html + }).inject(this.bodyNode); + + //var tds = this.calendarTable.getElements("td"); + //tds.setStyles(this.css.calendarTableCell); + + this.loadCalendar(); + }, + reLoadCalendar: function(){ + //if( this.wholeDayDocumentList && this.wholeDayDocumentList.length ){ + // this.wholeDayDocumentList.each( function( doc ){ + // doc.destroy(); + // }.bind(this)) + //} + //this.wholeDayDocumentList = []; + // + //if( this.oneDayDocumentList && this.oneDayDocumentList.length ){ + // this.oneDayDocumentList.each( function( doc ){ + // doc.destroy(); + // }.bind(this)) + //} + //this.oneDayDocumentList = []; + + this.loadCalendar(); + }, + calculateMonthRange : function(){ + var date = this.date.clone(); + + var start = new Date( date.get("year"), date.get("month"), 1, 0, 0, 0 ); + var week = start.getDay(); + if( this.weekBegin == "1" ){ + var decrementDay = ((week-1)<0) ? 6 : week-1; + }else{ + var decrementDay = week; + } + start.decrement("day", decrementDay); + this.monthStart = start; + this.monthStartStr = this.monthStart.format("db"); + + var end = start.clone(); + end.increment("day", 41); + this.monthEnd = new Date( end.get("year"), end.get("month"), end.get("date"), 23, 59, 59 ); + this.monthEndStr = this.monthEnd.format("db"); + + //this.calculateWeekRange(); + }, + //calculateWeekRange: function(){ + // this.weekRangeList = []; + // var start = this.monthStart.clone(); + // var end; + // for( var i=0; i<6; i++ ){ + // end = start.clone().increment("day", 6); + // end = new Date( end.get("year"), end.get("month"), end.get("date"), 23, 59, 59 ); + // this.weekRangeList.push( { + // start : start, + // end : end + // }); + // start = end.clone().increment("second",1); + // } + // + // this.weekDaysList = []; + // start = this.monthStart.clone(); + // for( var i=0; i this.monthStart && time < this.monthEnd; + }, + //getTimeRange : function( bDate, eDate ){ + // if( bDate > this.monthEnd || eDate < this.monthStart )return null; + // var range = { + // startTime : bDate, + // endTime : eDate, + // start: ( bDate <= this.monthStart ) ? this.monthStart.clone() : bDate.clone(), + // end: ( this.monthEnd <= eDate ) ? this.monthEnd.clone() : eDate.clone() + // }; + // range.firstDay = range.start.clone().clearTime(); + // range.diff = range.start - range.end; + // range.weekInforList = this.getWeekInfor(bDate, eDate); + // return range; + //}, + //getWeekInfor : function( startTime, endTime ){ + // if( startTime > this.monthEnd || endTime < this.monthStart )return null; + // var rangeWeekInfor = {}; + // for( var i=0 ; i range.end || endTime < range.start )continue; + // var isStart = startTime >= range.start; + // var isEnd = range.end >= endTime; + // var start = isStart ? startTime : range.start; + // var end = isEnd ? endTime : range.end; + // var diff = end - start; + // var left = start - range.start; + // var days = this.getDaysByRange(start, end); + // var daysIndex = this.getDateIndexOfWeek( i, days ); + // rangeWeekInfor[i] = { + // index : i, + // isEventStart : isStart, + // isEventEnd : isEnd, + // start : start, + // end : end, + // diff : diff, + // days : days, + // left : left, + // daysIndex : daysIndex + // }; + // if( isEnd )break; + // } + // return rangeWeekInfor; + //}, + //getDaysByRange : function( startTime, endTime ){ + // var start = startTime.clone(); + // var end = endTime; + // var days = []; + // while( start < end ){ + // days.push( start.clone().format("%Y-%m-%d") ); + // start.increment() + // } + // return days; + //}, + loadCalendar: function(){ + //this.app.currentDate = this.date.clone(); + + this.calculateMonthRange(); + this.cancelCurrentTd(); + this.loadData( function(){ + this.resetBodySize(); + this._loadCalendar( false ); + this.loadDayContent( this.date ); + //this.loadWholeDay( this.wholeDayData ); + //this.loadOneDay( this.inOneDayEvents ); + }.bind(this)); + }, + _loadCalendar : function( isCreate ){ + var date = this.date.clone(); + date.set("date", 1); + var week = date.getDay(); + if( this.weekBegin == "1" ){ + var decrementDay = ((week-1)<0) ? 6 : week-1; + }else{ + var decrementDay = week; + } + + date.decrement("day", decrementDay); + var tds = this.calendarTable.getElements("td"); + tds.each(function(td){ + this.loadDay(td, date, isCreate); + date.increment(); + }.bind(this)); + }, + loadData : function( callback ){ + this.app.actions.listMyCalendar( function( json ){ + var ids = []; + json.data.myCalendars.each( function( d ){ ids.push( d.id ) }); + json.data.unitCalendars.each( function( d ){ ids.push( d.id ) }); + json.data.followCalendars.each( function( d ){ ids.push( d.id ) }); + + this.app.actions.listEventWithFilter( { + calendarIds : ids, + startTime : this.monthStartStr, + endTime : this.monthEndStr //, + //createPerson : this.app.userName + }, function(json){ + this.wholeDayData = ( json.data && json.data.wholeDayEvents ) ? json.data.wholeDayEvents : []; + this.wholeDayData.each( function(d){ + d.start = Date.parse( d.startTimeStr ); + d.end = Date.parse( d.endTimeStr ); + }); + this.inOneDayEventMap = {}; + var array = ( json.data && json.data.inOneDayEvents ) ? json.data.inOneDayEvents : []; + array.each( function(d){ + if( d.inOneDayEvents && d.inOneDayEvents.length ){ + this.inOneDayEventMap[d.eventDate] = d.inOneDayEvents; + } + }.bind(this)); + //(( json.data && json.data.inOneDayEvents) ? json.data.inOneDayEvents : []).each( function( d ){ + // if(d.inOneDayEvents.length > 0 ){ + // this.inOneDayEvents.push( d ); + // } + //}.bind(this)); + if(callback)callback(); + }.bind(this)); + + }.bind(this)); + }, + isDateHasData : function( date ){ + debugger; + var dStr = typeOf( date ) === "string" ? date : date.format("%Y-%m-%d"); + var array = []; + if( this.inOneDayEventMap[ dStr ] && this.inOneDayEventMap[ dStr].length )return true; + var start = Date.parse( dStr + " 00:00:00" ); + var end = Date.parse( dStr + " 23:59:59" ); + for( var i=0; i= end )return true; + } + return false; + }, + getDataByDate : function( date ){ + var dStr = typeOf( date ) === "string" ? date : date.format("%Y-%m-%d"); + var array = []; + if( this.inOneDayEventMap[ dStr ] && this.inOneDayEventMap[ dStr].length )array = this.inOneDayEventMap[ dStr].clone(); + var start = Date.parse( dStr + " 00:00:00" ); + var end = Date.parse( dStr + " 23:59:59" ); + this.wholeDayData.each( function( data ){ + if( data.start <= start && data.end >= end )array.push( data ); + }.bind(this)); + return array; + }, + loadDay: function(td, date, isCreate){ + debugger; + var _self = this; + td.empty(); + var type = "thisMonth"; + var m = date.get("month"); + var y = date.get("year"); + var d = date.get("date"); + var mm = this.date.get("month"); + var yy = this.date.get("year"); + var dd = this.date.get("date"); + var mmm = this.today.get("month"); + var yyy = this.today.get("year"); + var ddd = this.today.get("date"); + + if ((m==mmm) && (y==yyy) && (d==ddd)){ + type = "today"; + }else if ((m==mm) && (y==yy)){ + type = "thisMonth"; + }else{ + type = "otherMonth"; + } + + var hasData = this.isDateHasData( date ); + + //var node = new Element("div", { + // "styles" : this.css["calendarTableCell_"+type] + //}).inject( td ); + //td.set( "valign","top"); + td.set( "align","center"); + td.set("height", o2.Schedule.TdHeight ); + + //td.set("line-height","40px"); + td.setStyles( this.css["calendarTableCell_"+type] ); + td.store("dateStr",date.format("%Y-%m-%d")); + td.store("type", type ); + + + td.addEvent("click", function(ev){ + _self.setCurrentTd( this.td ); + _self.loadDayContent( this.date ); + }.bind({ td : td, date : date.format("%Y-%m-%d") })); + + td.addEvent("dblclick", function(ev){ + //_self.cancelCurrentTd(); + //var form = new MWF.xApplication.Calendar.EventForm(_self,{}, { + // startTime : Date.parse( this.retrieve("dateStr") + " 08:00") , + // endTime : Date.parse( this.retrieve("dateStr") + " 09:00") + //}, {app:_self.app}); + //form.view = _self; + //form.create(); + _self.toDay( this.retrieve("dateStr") ); + }.bind(td)); + + //var titleNode = new Element("div", {"styles": this.css["dayTitle_"+ type]}).inject(td); + + var titleDayNode = new Element("div", {"styles": this.css["dayTitleDay_"+ type], "text": d }).inject(td); + + td.store("titleDayNode", titleDayNode ); + + if( hasData ){ + new Element("div", {"styles": type === "today" ? this.css.dayHasData_today : this.css.dayHasData }).inject(titleDayNode); + } + + if( type === "today" ){ + var size = Math.min( o2.Schedule.TdHeight, o2.Schedule.TdWidth ); + size = size > 26 ? 26 : size; + titleDayNode.setStyles({ + "width" : size+"px", + "height" : size+"px", + "line-height" : size+"px" + }) + }else if( (m==mm) && (y==yy) && (d==dd) ){ + this.setCurrentTd( td ) + } + + + + //titleDayNode.addEvent("click", function(){ + // _self.setCurrentTd(); + // _self.loadDayContent( this.date ); + //}.bind({ date : date.format("%Y-%m-%d") })); + + //var contentNode = new Element("div", {"styles": this.css.dayContentNode}).inject(node); + + }, + create : function( dateStr ){ + var _self = this; + var form = new MWF.xApplication.Calendar.EventForm(_self,{}, { + startTime : dateStr + " 08:00", + endTime : dateStr + " 09:00" + }, {app:_self.app}); + form.view = _self; + form.create(); + }, + openEventForm : function(data){ + var form = new MWF.xApplication.Calendar.EventForm(this, data, { + isFull : true + }, {app:this.app}); + form.view = this.view; + form.edit(); + }, + toDay : function( date ){ + var appId = "Calendar"; + if (layout.desktop.apps[appId]){ + var app = layout.desktop.apps[appId]; + app.status = { + options : { "date" : date } + }; + app.toMonth(); + app.setCurrent(); + }else { + var options = { + "defaultAction": "toMonth", + onQueryLoad : function(){ + this.status = { + options : { "date" : date } + } + } + }; + layout.desktop.openApplication(null, "Calendar", options); + } + }, + setCurrentTd : function(td){ + this.cancelCurrentTd(); + var type = td.retrieve("type"); + if( type != "today" ){ + td.retrieve( "titleDayNode" ).setStyles( this.css["dayTitleDay_current"] ) + } + this.currentSelectedTd = td; + }, + cancelCurrentTd : function(){ + if( this.currentSelectedTd ){ + var type = this.currentSelectedTd.retrieve("type"); + if( type != "today" ){ + this.currentSelectedTd.retrieve( "titleDayNode" ).setStyles( this.css["dayTitleDay_"+ type] ) + } + } + this.currentSelectedTd = null; + }, + reload : function(){ + this.view.reload(); + }, + destroy: function(){ + Object.each(this.days, function(day){ + day.destroy(); + }.bind(this)); + this.container.empty(); + }, + loadDayContent : function( date ){ + date = typeOf( date ) === "string" ? date : date.format("%Y-%m-%d"); + var _self = this; + this.rightContentNode.empty(); + + var text = Date.parse(date).format(this.lp.dateFormatDay); + this.titleTextNode.set("text", text); + + var data = this.getDataByDate( date ); + if( data.length == 0 ){ + var titleNode = new Element("div", { styles : this.css.rightContentTitle }).inject( this.rightContentNode ); + new Element("div", { styles : this.css.rightContentTitle_text, text : "当天您没有议程" }).inject( titleNode ); + + var itemContainer = new Element("div", { styles : this.css.rightContentItemContainer }).inject( this.rightContentNode ); + }else{ + var titleNode = new Element("div", { styles : { overflow : "hidden" } }).inject( this.rightContentNode ); + new Element("div", { styles : this.css.rightContentTitle_text, text : "当天您有" }).inject( titleNode ); + new Element("div", { styles : this.css.rightContentTitle_count, text : data.length }).inject( titleNode ); + new Element("div", { styles : this.css.rightContentTitle_text, text : "项议程!" }).inject( titleNode ); + + var itemContainer = new Element("div", { styles : this.css.rightContentItemContainer }).inject( this.rightContentNode ); + for( var i=0; ihello word"); + var d = new Date(); + console.log(d.getTime()); } }); diff --git a/o2web/source/x_component_Forum/$NaviMode/default/css.wcss b/o2web/source/x_component_Forum/$NaviMode/default/css.wcss index aaa6668008c93947f3625c9e71cd6d59d254e48f..969e92a6d85905e9fbcbe06b03d477032393270a 100644 --- a/o2web/source/x_component_Forum/$NaviMode/default/css.wcss +++ b/o2web/source/x_component_Forum/$NaviMode/default/css.wcss @@ -356,6 +356,9 @@ "documentNode_over": { "background-color": "#f5f6f7" }, + "documentNode_down": { + "background-color": "#f5f6f7" + }, "documentNode_remove": { "background-color": "#ffcccc" }, diff --git a/o2web/source/x_component_Forum/$NaviMode/default/listItem.json b/o2web/source/x_component_Forum/$NaviMode/default/listItem.json index a358dbfbce15194efd05570c6ccdcf5d947ab6b2..6dfb94bfef8c034c574ae845b36a94a11ce4754c 100644 --- a/o2web/source/x_component_Forum/$NaviMode/default/listItem.json +++ b/o2web/source/x_component_Forum/$NaviMode/default/listItem.json @@ -8,6 +8,7 @@ "documentSetting": { "html": "", "mouseoverStyles": "documentNode_over", + "mousedownStyles": "documentNode_down", "action": "open" }, "items": [ diff --git a/o2web/source/x_component_Forum/NaviMode.js b/o2web/source/x_component_Forum/NaviMode.js index 3d561870f0ad92fed101f5ac7a7cdfe383bade1c..15c77405950c5fada21a8ac1eb88c516ec53a4af 100644 --- a/o2web/source/x_component_Forum/NaviMode.js +++ b/o2web/source/x_component_Forum/NaviMode.js @@ -541,6 +541,7 @@ MWFForum.NaviMode.AllItem = new Class({ var view = this.navi.view = new MWFForum.NaviMode.AllView( this.viewWarp, this.app, this, { templateUrl : this.navi.path + this.navi.options.style + "/"+"listItem.json", pagingEnable : true, + holdMouseDownStyles : true, pagingPar : { hasReturn : false, currentPage : this.navi.options.viewPageNum, @@ -651,6 +652,7 @@ MWFForum.NaviMode.RecommandItem = new Class({ var view = this.navi.view = new MWFForum.NaviMode.RecommandView( this.viewWarp, this.app, this, { templateUrl : this.navi.path + this.navi.options.style + "/"+"listItem.json", pagingEnable : true, + holdMouseDownStyles : true, pagingPar : { hasReturn : false, currentPage : this.navi.options.viewPageNum, @@ -760,6 +762,7 @@ MWFForum.NaviMode.CreamItem = new Class({ var view = this.navi.view = new MWFForum.NaviMode.CreamView( this.viewWarp, this.app, this, { templateUrl : this.navi.path + this.navi.options.style + "/"+"listItem.json", pagingEnable : true, + holdMouseDownStyles : true, pagingPar : { hasReturn : false, currentPage : this.navi.options.viewPageNum, diff --git a/o2web/source/x_component_ForumPerson/$Main/default/css.wcss b/o2web/source/x_component_ForumPerson/$Main/default/css.wcss index 3e453dc99d471d4d04f7069710adbc5d3d0995ab..bd2e08285f365bca1eac0828194b122bf94de00c 100644 --- a/o2web/source/x_component_ForumPerson/$Main/default/css.wcss +++ b/o2web/source/x_component_ForumPerson/$Main/default/css.wcss @@ -458,6 +458,9 @@ "documentNode_over": { "background-color": "#f5f6f7" }, + "documentNode_down": { + "background-color": "#f5f6f7" + }, "documentNode_remove": { "background-color": "#ffcccc" }, diff --git a/o2web/source/x_component_ForumPerson/$Main/default/listItem.json b/o2web/source/x_component_ForumPerson/$Main/default/listItem.json index 582868b259d470d21b78087b0abd595a301302ad..b7f59451e9eaab0579d64e6305dfc668732f1b09 100644 --- a/o2web/source/x_component_ForumPerson/$Main/default/listItem.json +++ b/o2web/source/x_component_ForumPerson/$Main/default/listItem.json @@ -8,6 +8,7 @@ "documentSetting": { "html": "", "mouseoverStyles": "documentNode_over", + "mousedownStyles": "documentNode_down", "action": "open" }, "items": [ diff --git a/o2web/source/x_component_ForumPerson/$Main/default/listItemReply.json b/o2web/source/x_component_ForumPerson/$Main/default/listItemReply.json index bdd802387aa579aa8d32ec70a447678f27ac7da7..1196f9ef61e5ad0458697950b25b5237a1da8817 100644 --- a/o2web/source/x_component_ForumPerson/$Main/default/listItemReply.json +++ b/o2web/source/x_component_ForumPerson/$Main/default/listItemReply.json @@ -8,6 +8,7 @@ "documentSetting": { "html": "", "mouseoverStyles": "documentNode_over", + "mousedownStyles": "documentNode_down", "action": "open" }, "items": [ diff --git a/o2web/source/x_component_ForumPerson/Main.js b/o2web/source/x_component_ForumPerson/Main.js index d4493be928d12a0a33bcaad83f0368f7b2b20913..ac42a5c3a8dad1691511b5403f998694b3d30d0e 100644 --- a/o2web/source/x_component_ForumPerson/Main.js +++ b/o2web/source/x_component_ForumPerson/Main.js @@ -472,6 +472,7 @@ MWF.xApplication.ForumPerson.Explorer = new Class({ this.view = new MWF.xApplication.ForumPerson.SubjectView( this.viewContainer, this.app, this, { templateUrl : this.parent.path+"listItem.json", pagingEnable : true, + holdMouseDownStyles : true, pagingPar : { //currentPage : this.options.viewPageNum, countPerPage : 30, @@ -502,6 +503,7 @@ MWF.xApplication.ForumPerson.Explorer = new Class({ this.view = new MWF.xApplication.ForumPerson.ReplyView( this.viewContainer, this.app, this, { templateUrl : this.parent.path+"listItemReply.json", pagingEnable : true, + holdMouseDownStyles : true, pagingPar : { //currentPage : this.options.viewPageNum, countPerPage : 30, diff --git a/o2web/source/x_component_ForumSearch/$Main/default/css.wcss b/o2web/source/x_component_ForumSearch/$Main/default/css.wcss index 17646a644498c0b5a92227ec5f735d4768e279c9..2fa3532a50a8c68da85e7dc480610bbeff066fab 100644 --- a/o2web/source/x_component_ForumSearch/$Main/default/css.wcss +++ b/o2web/source/x_component_ForumSearch/$Main/default/css.wcss @@ -361,6 +361,9 @@ "documentNode_over": { "background-color": "#f5f6f7" }, + "documentNode_down": { + "background-color": "#f5f6f7" + }, "documentNode_remove": { "background-color": "#ffcccc" }, diff --git a/o2web/source/x_component_ForumSearch/$Main/default/listItem.json b/o2web/source/x_component_ForumSearch/$Main/default/listItem.json index 06af0fec31306101e2a789a9fe584b5785babd82..532cd38a643d00f2c8f715baf5974168fe2be4ba 100644 --- a/o2web/source/x_component_ForumSearch/$Main/default/listItem.json +++ b/o2web/source/x_component_ForumSearch/$Main/default/listItem.json @@ -8,6 +8,7 @@ "documentSetting": { "html": "", "mouseoverStyles": "documentNode_over", + "mousedownStyles": "documentNode_down", "action": "open" }, "items": [ diff --git a/o2web/source/x_component_ForumSearch/Main.js b/o2web/source/x_component_ForumSearch/Main.js index 01d9dfb3e28ea8392d731ef974be8d3bf41908ab..f9a0358ce6a12cb2e83c73ea8467861b5189b43c 100644 --- a/o2web/source/x_component_ForumSearch/Main.js +++ b/o2web/source/x_component_ForumSearch/Main.js @@ -301,6 +301,7 @@ MWF.xApplication.ForumSearch.Explorer = new Class({ this.view = new MWF.xApplication.ForumSearch.View( this.viewContainer, this.app, this, { templateUrl : this.parent.path+"listItem.json", pagingEnable : true, + holdMouseDownStyles : true, pagingPar : { currentPage : this.options.viewPageNum, countPerPage : 30, diff --git a/o2web/source/x_component_ForumSection/$Main/default/css.wcss b/o2web/source/x_component_ForumSection/$Main/default/css.wcss index 311510111ea136607b658e5da19cb973ed5dbd7f..afd9265613a759c2c85363427d1d09a79e98788b 100644 --- a/o2web/source/x_component_ForumSection/$Main/default/css.wcss +++ b/o2web/source/x_component_ForumSection/$Main/default/css.wcss @@ -480,6 +480,9 @@ "documentNode_over": { "background-color": "#f5f6f7" }, + "documentNode_down": { + "background-color": "#f5f6f7" + }, "documentNode_remove": { "background-color": "#ffcccc" }, diff --git a/o2web/source/x_component_ForumSection/$Main/default/listItem.json b/o2web/source/x_component_ForumSection/$Main/default/listItem.json index 5fc028ef0a5e5a8d3e9effa90b4b4bfbbb7c6dd7..bff5ba38231a1cec81d080e9a3aedb1046a3b430 100644 --- a/o2web/source/x_component_ForumSection/$Main/default/listItem.json +++ b/o2web/source/x_component_ForumSection/$Main/default/listItem.json @@ -8,6 +8,7 @@ "documentSetting": { "html": "", "mouseoverStyles": "documentNode_over", + "mousedownStyles": "documentNode_down", "action": "open" }, "items": [ diff --git a/o2web/source/x_component_ForumSection/$Main/default/listItemPrime.json b/o2web/source/x_component_ForumSection/$Main/default/listItemPrime.json index 102f5cd3789f4536f7e865760b45d88fc2d19bf4..68db0351bfddcf96fb6355cd622097af9e1180b9 100644 --- a/o2web/source/x_component_ForumSection/$Main/default/listItemPrime.json +++ b/o2web/source/x_component_ForumSection/$Main/default/listItemPrime.json @@ -8,6 +8,7 @@ "documentSetting": { "html": "", "mouseoverStyles": "documentNode_over", + "mousedownStyles": "documentNode_down", "action": "open" }, "items": [ diff --git a/o2web/source/x_component_ForumSection/Main.js b/o2web/source/x_component_ForumSection/Main.js index 07c2e6000e1cabb778fb5432b3ee8998c1b6b4fe..d5f0f6ee3925a93f6d98932b60e16e178b6174b4 100644 --- a/o2web/source/x_component_ForumSection/Main.js +++ b/o2web/source/x_component_ForumSection/Main.js @@ -597,6 +597,7 @@ MWF.xApplication.ForumSection.Explorer = new Class({ this.view = new MWF.xApplication.ForumSection.View( this.viewContainer, this.app, this, { templateUrl : this.parent.path+"listItem.json", pagingEnable : true, + holdMouseDownStyles : true, onPostCreateViewBody : function(){ this.app.fireEvent("postCreateViewBody"); }.bind(this), @@ -644,6 +645,7 @@ MWF.xApplication.ForumSection.Explorer = new Class({ this.viewPrime = new MWF.xApplication.ForumSection.PrimeView( this.viewContainerPrime, this.app, this, { templateUrl : this.parent.path+"listItemPrime.json", pagingEnable : true, + holdMouseDownStyles : true, pagingPar : { hasReturn : !this.app.naviMode, currentPage : 1, diff --git a/o2web/source/x_component_Meeting/Common.js b/o2web/source/x_component_Meeting/Common.js index 5e78f38c32d233b229d8cf39e6e06a697ee47c9d..5292b6c787685a173b2c762283862eb07ac9688e 100644 --- a/o2web/source/x_component_Meeting/Common.js +++ b/o2web/source/x_component_Meeting/Common.js @@ -255,19 +255,41 @@ MWF.xApplication.Meeting.RoomForm = new Class({ "click": function(){this.listBuilding();}.bind(this), //"blur": function(){}.bind(this), "change": function(){ this.buildingId = null; }.bind(this), + "focus": function(){ + this.listBuildingHide(); + this.listBuilding(); + }, "keydown": function(e){ //if ([13,40,38].indexOf(e.code)!=-1){ // if (!this.selectBuildingNode){ // this.listBuilding(); // } //} - if (e.code==13){ - this.listBuildingHide(); - this.listBuilding(); + switch (e.code){ + case 13: + this.listBuildingHide(); + this.listBuilding(); + break; + case 40: + this.selectBuildingNext(); + break; + case 38: + this.selectBuildingPrev(); + break; + case 38: + this.selectBuildingConfirm(); + break; + default: + // this.listBuildingHide(); + // this.listBuilding(); } - if (e.code==40) this.selectBuildingNext(); - if (e.code==38) this.selectBuildingPrev(); - if (e.code==32) this.selectBuildingConfirm(e); + // if (e.code==13){ + // this.listBuildingHide(); + // this.listBuilding(); + // } + // if (e.code==40) this.selectBuildingNext(); + // if (e.code==38) this.selectBuildingPrev(); + // if (e.code==32) this.selectBuildingConfirm(e); }.bind(this) } }, @@ -356,7 +378,7 @@ MWF.xApplication.Meeting.RoomForm = new Class({ if (this.selectBuildingNode){ var node=null; if (this.selectBuildingNode.selectedNode){ - var node = this.selectBuildingNode.selectedNode.getNext(); + node = this.selectBuildingNode.selectedNode.getNext(); if (!node) node = this.selectBuildingNode.getFirst(); this.selectBuildingNode.selectedNode.setStyle("background-color", this.selectBuildingNode.selectedNode.retrieve("bg")); }else{ @@ -398,11 +420,21 @@ MWF.xApplication.Meeting.RoomForm = new Class({ //cancelCreateRoom: function(){ // this.createRoomNode.destroy(); //}, + listBuildingData: function(key, callback){ + if (key){ + this.actions.listBuildingByKey(key, function(json){ + if (callback) callback(json); + }); + }else{ + this.actions.listBuilding(function(json){ + if (callback) callback(json); + }); + } + }, listBuilding: function(){ var item = this.form.getItem("buildingName"); var key = item.getValue(); - if( !key )return; - this.actions.listBuildingByKey(key, function(json){ + this.listBuildingData(key, function(json){ if (json.data && json.data.length){ this.selectBuildingNode = new Element("div", {"styles": this.css.createRoomSelectBuildingNode}).inject(item.container); this.setSelectBuildingNodeSize(); @@ -436,6 +468,14 @@ MWF.xApplication.Meeting.RoomForm = new Class({ }.bind(this)); } }.bind(this)); + // if( !key ){ + // listBuilding + // }else{ + // + // } + // this.actions.listBuildingByKey(key, function(json){ + // + // }.bind(this)); }, selectBuilding: function(node){ var id = node.retrieve("building"); diff --git a/o2web/source/x_component_Minder/MineExplorer.js b/o2web/source/x_component_Minder/MineExplorer.js new file mode 100644 index 0000000000000000000000000000000000000000..642c56b563ea82535b186731c6c7d19f7085a297 --- /dev/null +++ b/o2web/source/x_component_Minder/MineExplorer.js @@ -0,0 +1,248 @@ +//MWF.xDesktop.requireApp("Minder", "Actions.RestActions", null, false); +MWF.xDesktop.requireApp("Template", "Explorer", null, false); +MWF.xDesktop.requireApp("Template", "MForm", null, false); +MWF.xDesktop.requireApp("Minder", "Common", null, false); +MWF.xApplication.Minder.MineExplorer = new Class({ + Extends: MWF.widget.Common, + Implements: [Options, Events], + options: { + "style": "default", + "defaultTreeNode" : "root", + "defaultViewType" : "list" + }, + initialize: function(node, app, options){ + this.setOptions(options); + + this.path = "/x_component_Minder/$MineExplorer/"; + this.cssPath = "/x_component_Minder/$MineExplorer/"+this.options.style+"/css.wcss"; + this._loadCss(); + this.app = app; + this.container = $(node); + }, + load : function(){ + this.treeNode = new Element("div.treeNode",{ + "styles" : this.css.treeNode + }).inject(this.container); + this.tree = new MWF.xApplication.Minder.MineExplorer.Tree( this, this.treeNode, { + style : this.options.style, + defaultNode : this.options.defaultTreeNode, + "minWidth" : 260, + "maxWidth" : 350, + onPostLoad : function(){ + this.resizeContent(); + }.bind(this) + } ); + + this.rightNode = new Element("div.rightNode",{ + "styles" : this.css.rightNode + }).inject(this.container); + + //this.historyContentNode = new Element("div",{ + // "styles" : this.css.historyContentNode + //}).inject(this.rightNode); + + //this.app.histroy.load( this.historyContentNode ); + + this.toolbarNode = new Element("div",{ + "styles" : this.css.toolbarNode + }).inject(this.rightNode); + this.toolbar = new MWF.xApplication.Minder.Toolbar(this.toolbarNode, this, { + viewType : this.options.defaultViewType + }); + this.toolbar.load(); + + this.listNode = new Element("div",{ + "styles" : this.css.listNode + }).inject(this.rightNode); + + this.resizeContent(); + this.resizeFun = this.resizeContent.bind(this); + this.app.addEvent("resize", this.resizeFun); + }, + destroy : function(){ + this.container.empty(); + this.app.removeEvent("resize", this.resizeFun); + }, + resizeContent : function(){ + var size = this.app.content.getSize(); + var treeSize = this.treeNode.getSize(); + var naviSize = this.app.naviNode.getSize(); + + var x = size.x - treeSize.x - naviSize.x; + + this.treeNode.setStyle("height", size.y); + + this.rightNode.setStyle("width", x ); + + this.listNode.setStyle("height", size.y - 92 ); + this.listNode.setStyle("width", x - 43 ); + + this.toolbarNode.setStyle("width", x ); + }, + loadList: function( filterData ){ + if (this.currentView) this.currentView.destroy(); + this.currentView = new MWF.xApplication.Minder.List( this.listNode, this.app, this, { + templateUrl : this.path + this.options.style + ( this.getViewType() == "list" ? "/listItem.json" : "/tileItem.json" ), + "scrollEnable" : true + }); + this.currentView.viewType = this.getViewType(); + this.currentView.filterData = filterData; + this.currentView.load(); + }, + getViewType : function(){ + return this.toolbar.getListType(); + }, + getCurrentFolderData : function(){ + return this.tree.getCurrentFolderData(); + }, + getCurrentFolderId : function(){ + return this.tree.getCurrentFolderId(); + }, + recordStatus : function(){ + return { + defaultTreeNode : this.getCurrentFolderId(), + defaultViewType : this.getViewType() + } + } +}); + +MWF.xApplication.Minder.MineExplorer.Tree = new Class({ + Extends: MWF.xApplication.Minder.Tree, + Implements: [Options, Events], + loadTreeNode : function( rootData ){ + this.treeNode = new MWF.xApplication.Minder.MineExplorer.Tree.Node( this, this.treeContentNode, rootData, { + "style" : this.options.style, + "isCurrent" : this.options.defaultNode == rootData.id, + "minWidth" : this.options.minWidth, + "maxWidth" : this.options.maxWidth + }); + } +}); + +MWF.xApplication.Minder.MineExplorer.Tree.Node = new Class({ + Extends: MWF.xApplication.Minder.Tree.Node, + Implements: [Options, Events], + getTreeNode: function( data ){ + return new MWF.xApplication.Minder.MineExplorer.Tree.Node(this.tree, this.treeContentNode, data, { + style :this.options.style, + level : this.options.level + 1, + isCurrent : this.tree.options.defaultNode == data.id, + "minWidth" : this.options.minWidth, + "maxWidth" : this.options.maxWidth + }) + }, + setTextNodeWidth : function(){ + if( this.options.minWidth ){ + this.itemTextNode.setStyle( "min-width" , ( this.options.minWidth - this.options.level * 12 - 10 - 80 ) +"px"); + this.itemTextNode.setStyle( "margin-right" , "0px") + } + if( this.options.maxWidth ){ + this.itemTextNode.setStyle( "max-width" , ( this.options.maxWidth - this.options.level * 12 - 10 - 80 ) +"px"); + this.itemTextNode.setStyle( "margin-right" , "0px") + } + }, + _cancelCurrent : function(){ + if( this.toolbar )this.toolbar.setStyle("display","none"); + this.setTextNodeWidth(); + }, + _setCurrent: function(){ + this.explorer.loadList({ + folderId : this.data.id + }); + if( !this.toolbar ){ + this.createToolbar() + }else{ + this.toolbar.setStyle("display",""); + } + if( this.options.minWidth ){ + this.itemTextNode.setStyle( "min-width" , ( this.options.minWidth - this.options.level * 12 - 10 - 80 - 50 ) +"px"); + this.itemTextNode.setStyle( "margin-right" , "50px") + } + if( this.options.maxWidth ){ + this.itemTextNode.setStyle( "max-width" , ( this.options.maxWidth - this.options.level * 12 - 10 - 80 - 50 ) +"px"); + this.itemTextNode.setStyle( "margin-right" , "50px") + } + this.explorer.resizeContent(); + }, + createToolbar : function(){ + if( this.data.id == "root" )return; + this.toolbar = new Element("div",{ + styles : this.explorer.css.toolbar + }).inject( this.itemNode ); + + this.editAction = new Element("div.editAction",{ + styles : this.explorer.css.editAction, + "title" : "编辑" + }).inject(this.toolbar); + this.editAction.addEvents({ + "click" : function(ev){ + this.edit( ev ); + }.bind(this), + "mouseover" : function(ev){ + this.editAction.setStyles( this.explorer.css.editAction_over ) + }.bind(this), + "mouseout" : function(ev){ + this.editAction.setStyles( this.explorer.css.editAction ) + }.bind(this) + }); + + + this.deleteAction = new Element("div.cancelViewAction", { + "styles": this.explorer.css.deleteAction, + "title" : "删除" + }).inject(this.toolbar); + this.deleteAction.addEvent("click", function(e){ + this.delete(e); + }.bind(this)); + this.deleteAction.addEvents({ + "mouseover" : function(ev){ + this.deleteAction.setStyles( this.explorer.css.deleteAction_over ) + }.bind(this), + "mouseout" : function(ev){ + this.deleteAction.setStyles( this.explorer.css.deleteAction ) + }.bind(this) + }); + }, + checkDelete : function( callback, ev ){ + if( this.children && this.children.length > 0 ){ + this.app.notice( this.app.lp.deleteFolderDisable_hasSubFolder, "error" ); + return false; + } + this.app.restActions.listNextMindWithFilter("(0)", 1, { folderId : this.data.id }, function(json){ + if( json.data && json.data.length > 0 ){ + this.app.notice( this.app.lp.deleteFolderDisable_hasFile, "error" ); + return false; + }else if( callback ){ + callback(); + } + }.bind(this)); + }, + delete : function( ev ){ + this.checkDelete( function(){ + var _self = this; + var text = this.app.lp.deleteFolder.replace(/{name}/g, this.data.name ); + this.app.confirm("infor", ev, this.app.lp.deleteFolderTitle, text, 380, 150, function(){ + _self._delete(); + this.close(); + }, function(){ + this.close() + }); + }.bind(this), ev ); + ev.stopPropagation(); + }, + _delete : function( ev ){ + this.app.restActions.removeFolder( this.data.id, function(){ + if (this.explorer.currentView) this.explorer.currentView.destroy(); + this.tree.reload(); + }.bind(this)); + }, + edit : function( ev ){ + var form = new MWF.xApplication.Minder.FolderForm(this.explorer, this.data, { + title : "编辑目录" + }, { + app: this.app + }); + form.edit(); + ev.stopPropagation(); + } +}); diff --git a/o2web/source/x_component_MinderEditor/Main.js b/o2web/source/x_component_MinderEditor/Main.js index 4fd3e65d7261cee2235950720b77622104762f0e..530409e1e9a4cce7ce4cab64f43237f85ef233c3 100644 --- a/o2web/source/x_component_MinderEditor/Main.js +++ b/o2web/source/x_component_MinderEditor/Main.js @@ -462,13 +462,28 @@ MWF.xApplication.MinderEditor.Main = new Class({ this.restActions.getMind( id, function( json2 ){ var converter = new MWF.xApplication.MinderEditor.Converter(this, this.minder, this); converter.toPng(180, 130, function( img ){ + var formData = new FormData(); formData.append('file', img, "untitled.png"); formData.append('site', id); - this.restActions.uploadMindIcon( id, 180, function(){ - this.notice( "另存成功" ); - }.bind(this), null,formData, img, false ) - }.bind(this)); + + //this.restActions.uploadMindIcon( id, 180, function(){ + // this.notice( "另存成功" ); + //}.bind(this), null,formData, img, false ) + + MWF.xDesktop.uploadImage( id, "mindInfo", formData, img, + function(json3){ + data.id = id; + data.icon = json3.data.id; + this.restActions.saveMind( data, function(json4){ + this.notice( "另存成功" ); + }.bind(this)) + }.bind(this) + ); + + }.bind(this), function(){ + this.notice( "另存成功,但由于脑图中有外网图片,浏览器无法生成缩略图" ); + }.bind(this)) }.bind(this)) }.bind(this)); }, @@ -479,35 +494,68 @@ MWF.xApplication.MinderEditor.Main = new Class({ var content = this.minder.exportJson(); var contentStr = JSON.stringify( content ); var title = this.minder.getRoot().getText(); + + var callback_save = function(id, flag, toPngFail){ + this.data.content = contentStr; + var text = toPngFail ? "另存成功,但由于脑图中有外网图片,浏览器无法生成缩略图" : "保存成功"; + this.restActions.saveMind( this.data, function(json4){ + if( flag ){ + this.restActions.getMind( id, function( json5 ){ + this.data = json5.data; + this.data.content = content; + if( newName )this.setTitle(newName); + this.notice( noticetText || text ); + }.bind(this)) + }else{ + this.data.content = content; + if( newName )this.setTitle(newName); + this.notice( noticetText || text ); + } + }.bind(this)) + }.bind(this); + + var callback = function( id, flag ){ + var converter = new MWF.xApplication.MinderEditor.Converter(this, this.minder, this); + converter.toPng(180, 130, function( img ){ + var formData = new FormData(); + formData.append('file', img, "untitled.png"); + formData.append('site', id); + + //this.restActions.uploadMindIcon( id, 180, function(){ + // if( newName )this.setTitle(newName); + // this.notice( noticetText || "保存成功" ); + //}.bind(this), null,formData, img, false ) + + MWF.xDesktop.uploadImage( id, "mindInfo", formData, img, + function(json3){ + this.data.icon = json3.data.id; + callback_save(id, flag) + }.bind(this) + ); + + }.bind(this), function(){ + this.data.icon = ""; + callback_save(id, flag, true); + }.bind(this)) + }.bind(this); + if( this.data && this.data.id){ this.data.content = contentStr; if( newName ){ this.data.name = newName; } if( folder ){ this.data.folderId = folder; } + callback(this.data.id); }else{ this.data = { content : contentStr, name : newName || title, folderId : folder || this.options.folderId, description : "" - } + }; + this.restActions.saveMind( this.data, function(json){ + var id = this.options.id = json.data.id; + callback(id, true); + }.bind(this)); } - this.restActions.saveMind( this.data, function(json){ - var id = this.options.id = json.data.id; - this.restActions.getMind( id, function( json2 ){ - this.data = json2.data; - this.data.content = content; - var converter = new MWF.xApplication.MinderEditor.Converter(this, this.minder, this); - converter.toPng(180, 130, function( img ){ - var formData = new FormData(); - formData.append('file', img, "untitled.png"); - formData.append('site', id); - this.restActions.uploadMindIcon( id, 180, function(){ - if( newName )this.setTitle(newName); - this.notice( noticetText || "保存成功" ); - }.bind(this), null,formData, img, false ) - }.bind(this)); - }.bind(this)) - }.bind(this)); }, openSaveAsDialog : function(){ var form = new MWF.xApplication.MinderEditor.SaveAsForm(this, { @@ -601,29 +649,36 @@ MWF.xApplication.MinderEditor.Converter = new Class({ this.editor = editor; this.minder = minder; }, - toPng: function (width, height, callback) { + toPng: function (width, height, callback, failure) { var img; this.toCanvas(width, height, function (canvas) { - var src = canvas.toDataURL("image/png"); + try{ + var src = canvas.toDataURL("image/png"); - var base64Code = src.split(',')[1]; - if (!base64Code) { - img = null; - return; - } - base64Code = window.atob(base64Code); + var base64Code = src.split(',')[1]; + if (!base64Code) { + img = null; + return; + } + base64Code = window.atob(base64Code); - var ia = new Uint8Array(base64Code.length); - for (var i = 0; i < base64Code.length; i++) { - ia[i] = base64Code.charCodeAt(i); + var ia = new Uint8Array(base64Code.length); + for (var i = 0; i < base64Code.length; i++) { + ia[i] = base64Code.charCodeAt(i); + } + img = new Blob([ia], {type: "image/png"}); + if(callback)callback( img ); + }catch(e){ + if(failure)failure(); + //debugger; + //var pr = new MWF.xApplication.MinderEditor.PreviewConverter(this.editor, this.minder, width, height); + //pr.toPng(width, height, callback, failure ); } - img = new Blob([ia], {type: "image/png"}); - if(callback)callback( img ); }.bind(this)) }, - toCanvas: function (width, height, callback) { + toCanvas: function (width, height, callback, svg) { this.loadCanvgResource(function () { - var svg = this.editor.contentNode.get("html"); + if( !svg )svg = this.editor.contentNode.get("html"); var coordinates = this.getSvgCoordinates(); @@ -690,14 +745,14 @@ MWF.xApplication.MinderEditor.Converter = new Class({ styles: {width: contentWidth + "px", height: contentHeight + "px"} }).inject(this.editor.node); canvg(canvas, svg, { - log: true, renderCallback: function (dom) { + useCORS : true, log: true, renderCallback: function (dom) { if (callback)callback(canvas); } }); }.bind(this)) }, loadCanvgResource: function (callback) { - var canvgPath = "/o2_lib/framework/canvg/"; + var canvgPath = "/o2_lib/canvg/"; COMMON.AjaxModule.load(canvgPath + "canvg.js", function () { if (callback)callback(); }.bind(this)) @@ -739,3 +794,228 @@ MWF.xApplication.MinderEditor.Converter = new Class({ }); +MWF.xApplication.MinderEditor.PreviewConverter = new Class({ + initialize: function (editor, minder, width, height) { + this.editor = editor; + this.minder = minder; + + this.previewer = new Element("div",{ "styles" : { + width : width, height : height + }}).inject( this.editor.content ); + this.initPreViewer(); + this.draw(); + }, + initPreViewer: function(){ + // 画布,渲染缩略图 + this.paper = new kity.Paper( this.previewer ); + + // 用两个路径来挥之节点和连线的缩略图 + this.nodeThumb = this.paper.put(new kity.Path()); + this.connectionThumb = this.paper.put(new kity.Path()); + /** + * 增加一个对天盘图情况缩略图的处理, + * @Editor: Naixor line 104~129 + * @Date: 2015.11.3 + */ + this.pathHandler = this.getPathHandler(this.minder.getTheme()); + }, + getPathHandler: function (theme) { + switch (theme) { + case "tianpan": + case "tianpan-compact": + return function(nodePathData, x, y, width, height) { + var r = width >> 1; + nodePathData.push('M', x, y + r, + 'a', r, r, 0, 1, 1, 0, 0.01, + 'z'); + }; + default: { + return function(nodePathData, x, y, width, height) { + nodePathData.push('M', x, y, + 'h', width, 'v', height, + 'h', -width, 'z'); + } + } + } + }, + draw : function(){ + var view = this.minder.getRenderContainer().getBoundaryBox(); + var padding = 30; + this.paper.setViewBox( + view.x - padding - 0.5, + view.y - padding - 0.5, + view.width + padding * 2 + 1, + view.height + padding * 2 + 1); + + var nodePathData = []; + var connectionThumbData = []; + this.minder.getRoot().traverse(function(node) { + var box = node.getLayoutBox(); + this.pathHandler(nodePathData, box.x, box.y, box.width, box.height); + if (node.getConnection() && node.parent && node.parent.isExpanded()) { + connectionThumbData.push(node.getConnection().getPathData()); + } + }.bind(this)); + this.paper.setStyle('background', this.minder.getStyle('background')); + + if (nodePathData.length) { + this.nodeThumb + .fill(this.minder.getStyle('root-background')) + .setPathData(nodePathData); + } else { + this.nodeThumb.setPathData(null); + } + + if (connectionThumbData.length) { + this.connectionThumb + .stroke(this.minder.getStyle('connect-color'), '0.5%') + .setPathData(connectionThumbData); + } else { + this.connectionThumb.setPathData(null); + } + }, + toPng: function (width, height, callback, failure, svg) { + var img; + this.toCanvas(width, height, function (canvas) { + try{ + var src = canvas.toDataURL("image/png"); + + var base64Code = src.split(',')[1]; + if (!base64Code) { + img = null; + return; + } + base64Code = window.atob(base64Code); + + var ia = new Uint8Array(base64Code.length); + for (var i = 0; i < base64Code.length; i++) { + ia[i] = base64Code.charCodeAt(i); + } + img = new Blob([ia], {type: "image/png"}); + if(callback)callback( img ); + }catch(e){ + if(failure)failure( ); + } + }.bind(this), svg) + }, + toCanvas: function (width, height, callback, svg ) { + this.loadCanvgResource(function () { + if(!svg)svg = this.previewer.get("html"); + + var coordinates = this.getSvgCoordinates(); + + var offsetLeft = Math.abs(coordinates.left), offsetTop = Math.abs(coordinates.top); + var contentWidth = coordinates.x, contentHeight = coordinates.y; + var matrix; + if (width && height) { + if ((width > coordinates.x) && (height > coordinates.y)) { + //如果宽度比指定宽度小,设置偏移量 + if (width > coordinates.x) { + offsetLeft += ( width - coordinates.x ) / 2; + contentWidth = width; + } + //如果高度比指定高度小,设置偏移量 + if (height > coordinates.y) { + offsetTop += ( height - coordinates.y ) / 2; + contentHeight = height; + } + } + + //如果宽度比指定宽度大,进行缩小 + var xRatio, yRatio, ox, oy, zoom; + if (width < coordinates.x) { + xRatio = width / coordinates.x; + } + //如果高度比指定高度大,进行缩小 + if (height < coordinates.y) { + yRatio = height / coordinates.y; + } + if (xRatio || yRatio) { + + contentWidth = width; + contentHeight = height; + + xRatio = xRatio || 1; + yRatio = yRatio || 1; + if( xRatio >= yRatio ){ + zoom = yRatio; + ox = (width - zoom * coordinates.x)/2; + oy = 0; + }else{ + zoom = xRatio; + ox = 0; + oy = ( height - zoom * coordinates.y )/2; + } + + matrix = zoom + " 0 0 " + zoom + " " + ox + " " + oy; + } + } + + var regex = /(.*?)<\/svg>/ig; + svg = "" + regex.exec(svg)[1] + ""; + + var arr1 = svg.split(""); + var arr2 = svg.split("" + + "" + + "" + + " rightBox.right) { + rightBox = renderBox; + } + if (renderBox.bottom > bottomBox.bottom) { + bottomBox = renderBox; + } + }.bind(this)); + + return { + top: topBox.top, + right: rightBox.right, + bottom: bottomBox.bottom, + left: leftBox.left, + width: rightBox.right - leftBox.left + 1, + height: bottomBox.bottom - topBox.top + 1, + x: rightBox.right - leftBox.left + 1, + y: bottomBox.bottom - topBox.top + 1 + }; + }, + destory : function(){ + this.paper.remove(); + this.previewer.destroy(); + } +}); + diff --git a/o2web/source/x_component_Profile/$Main/default/style.css b/o2web/source/x_component_Profile/$Main/default/style.css new file mode 100644 index 0000000000000000000000000000000000000000..a788f76906412535ab1b2ccd43b61f060a954241 --- /dev/null +++ b/o2web/source/x_component_Profile/$Main/default/style.css @@ -0,0 +1,237 @@ +.o2_profile_titleBar { + overflow: hidden; + height: 50px; + background-color: #4c6b87; +} +.o2_profile_titleUserNode { + width: 80px; + float: right; +} +.o2_profile_titleUserIconNode { + background: url(/x_component_process_TaskCenter/$Main/default/user.png) center center no-repeat; + width: 24px; + height: 24px; + margin-top: 13px; + float: left; +} +.o2_profile_titleUserTextNode { + margin-left: 24px; + color: #FFFFFF; + font-size: 14px; + line-height: 50px; +} +.o2_profile_titleTextNode { + padding-left: 20px; + color: #FFFFFF; + font-size: 18px; + line-height: 50px; + font-weight: bold; + width: 160px; + float: left; +} +.o2_profile_contentNode { + overflow: hidden; +} +.o2_profile_configNode { + height: 440px; +} +.o2_profile_inforConfigArea { + height: 360px; + margin: 40px 80px; + color: #666; + border: 0 solid red; +} +.o2_profile_inforLine { + overflow: hidden; + margin-bottom: 5px; +} + +.o2_profile_inforIconTitle { + width: 80px; + height: 72px; + font-size: 14px; + line-height: 72px; + color: #da7429; + float: left; +} +.o2_profile_inforIconContent { + float: left; + width: 72px; + height: 72px; +} + +.o2_profile_inforIconContentImg { + border: 0px; + width: 72px; + height: 72px; +} + +.o2_profile_inforIconChange { + margin: 22px 10px; + cursor: pointer; + float: left; + border: 1px solid #999; + border-radius: 3px; + padding: 3px 5px; +} +.o2_profile_inforContent { + margin-left: 80px; + height: 30px; + line-height: 30px; + overflow: hidden; +} + +.o2_profile_inforTitle { + width: 80px; + height: 30px; + font-size: 14px; + line-height: 30px; + color: #da7429; + float: left; +} + +.o2_profile_inforContentInput { + border: 1px solid #999; + box-shadow: 0 0 0 #999; + width: 90%; + height: 20px; + line-height: 20px; + background-color: #FFF; + margin-top: 4px; + color: #666; +} +.o2_profile_inforContentInput_focus { + border: 1px solid #da7429; + box-shadow: 0 0 8px #fab37e; +} +.o2_profile_inforContentInput_error { + border: 1px solid #F00; + box-shadow: 0 0 8px #F00; +} +.o2_profile_saveInforAction, .o2_profile_savePasswordAction { + height: 30px; + line-height: 30px; + text-align: center; + width: 140px; + border-radius: 5px; + background-color: #5f6b80; + border: 1px solid #FFF; + color: #FFF; + cursor: pointer; + margin: 10px auto; +} +.o2_profile_layoutTitle { + color: #da7429; + font-size: 14px; + height: 40px; + line-height: 40px; + margin: 20px 30px 20px 30px; + border-bottom: 1px solid #da7429; +} + +.o2_profile_layoutButtonArea { + margin: 20px 30px 20px 30px; + overflow: hidden; +} +.o2_profile_layoutClearDataAction { + height: 30px; + width: 140px; + border-radius: 3px; + background-color: #FFF; + border: 1px solid #666; + line-height: 30px; + text-align: center; + cursor: pointer; + margin: 10px auto; + margin-right: 20px; + float: left; +} + +.o2_profile_ideasArea { + width: 590px; + height: 350px; + margin-top: 40px; + margin-left: 100px; + border: 1px solid #999; + overflow: auto; +} + +.o2_profile_ideasSave { + height: 30px; + width: 140px; + border-radius: 3px; + background-color: #FFF; + border: 1px solid #666; + line-height: 30px; + text-align: center; + cursor: pointer; + float: left; + margin: 10px 10px 10px 100px; +} + +.o2_profile_passwordStrength { + margin-top: 6px; + float: left; + padding-left: 2px; + width: 35px; + overflow: hidden; +} + +.o2_profile_passwordStrengthColor { + background-color: #b3b3b3; + height: 5px; +} +.o2_profile_passwordStrengthColor_low { + background-color: #e6772e; +} +.o2_profile_passwordStrengthColor_middle { + background-color: #3c75b7; +} +.o2_profile_passwordStrengthColor_high { + background-color: #33c025; +} + +.o2_profile_passwordStrengthText { + font-size: 12px; + color: #999; + text-align: center; + line-height: 16px; + margin-top: 5px; +} + +.o2_profile_passwordStrengthText_current { + color: #666; + text-align: center; + margin-top: 5px; +} + +.o2_profile_passwordRemindNode { + float: left; + padding-left: 10px; + padding-top: 10px; + font-size: 12px; + line-height: 27px; + color: #999; +} +.o2_profile_ssoConfigTitle { + padding: 20px; + font-size: 18px; + font-weight: bold; + color: #666666; +} +.o2_profile_ssoConfigArea{ + padding: 10px 40px; +} + +.o2_profile_ssoItemLink{ + font-size: 14px; + display: block; + margin-bottom: 10px; +} +.o2_profile_previewBackground{ + width: 90px; + height: 50px; + float: left; + border: 4px solid #eeeeee; + margin: 10px 10px 0 0; +} \ No newline at end of file diff --git a/o2web/source/x_component_Profile/$Main/default/view.html b/o2web/source/x_component_Profile/$Main/default/view.html new file mode 100644 index 0000000000000000000000000000000000000000..1fdf6f5e34dd713bf791746a332c9a3d69f8f681 --- /dev/null +++ b/o2web/source/x_component_Profile/$Main/default/view.html @@ -0,0 +1,162 @@ +
+
+
+
{{ $.data.name }}
+
+
{{$.lp.title}}
+
+
+
+
+
+
{{ $.lp.icon }}
+
+ +
+
{{ $.lp.changeIcon }}
+
+ +
+
{{ $.lp.name }}
+
{{ $.data.name }}
+
+ +
+
{{ $.lp.employee }}
+
{{ $.data.employee }}
+
+ +
+
{{ $.lp.mail }}
+
+ +
+
+ +
+
{{ $.lp.mobile }}
+
+ +
+
+ +
+
{{ $.lp.officePhone }}
+
+ +
+
+ +
+
{{ $.lp.weixin }}
+
+ +
+
+ +
+
{{ $.lp.QQ }}
+
+ +
+
+ +
+
{{ $.lp.signature }}
+
+ +
+
+ +
+
{{ $.lp.saveInfor }}
+
+ +
+
+ +
+
{{ $.lp.layoutAction }}
+
+
{{ $.lp.clear }}
+ + {{if MWF.AC.isAdministrator() }} +
{{ $.lp.setDefault }}
+
{{ $.lp.clearDefault }}
+
{{ $.lp.setForce }}
+
{{ $.lp.clearForce }}
+ {{ end if }} + +
+ +
{{ $.lp.desktopBackground }}
+
+
+ + +
+ +
{{ $.lp.saveIdea }}
+ + {{if MWF.AC.isAdministrator() }} +
{{ $.lp.saveIdeaDefault }}
+ {{ end if }} + +
+ +
+
+
+
{{ $.lp.oldPassword }}
+
+ +
+
+ +
+
{{ $.lp.password }}
+
+ +
+
+ +
+
+
+
+
+
{{ $.lp.weak }}
+
+
+
+
{{ $.lp.middle }}
+
+
+
+
{{ $.lp.high }}
+
+
{{ $.lp.paswordRule }}
+
+
+ +
+
{{ $.lp.morePassword }}
+
+ +
+
+ +
+
{{ $.lp.passwordConfig }}
+
+ +
+
+ +
+
{{ $.lp.bindOauth }}
+
+ +
+
+
\ No newline at end of file diff --git a/o2web/source/x_component_Profile/Main_bak.js b/o2web/source/x_component_Profile/Main_bak.js new file mode 100644 index 0000000000000000000000000000000000000000..732d38fa9c6247e3c0934c227d79f68300b0c557 --- /dev/null +++ b/o2web/source/x_component_Profile/Main_bak.js @@ -0,0 +1,682 @@ +MWF.xApplication.Profile.options.multitask = false; +MWF.xApplication.Profile.Main = new Class({ + Extends: MWF.xApplication.Common.Main, + Implements: [Options, Events], + + options: { + "style": "default", + "name": "Profile", + "icon": "icon.png", + "width": "800", + "height": "600", + "isResize": false, + "isMax": false, + "mvcStyle": "view.css", + "title": MWF.xApplication.Profile.LP.title + }, + onQueryLoad: function(){ + this.lp = MWF.xApplication.Profile.LP; + }, + loadApplication: function(callback){ + + + this.loadTitle(); + this.loadContent(); + if (callback) callback(); + }, + + loadTitle: function(){ + this.loadTitleBar(); + this.loadTitleUserNode(); + this.loadTitleTextNode(); + }, + + loadTitleBar: function(){ + this.titleBar = new Element("div", { + "styles": this.css.titleBar + }).inject(this.content); + }, + loadTitleUserNode: function(){ + this.titleUserNode = new Element("div", { + "styles": this.css.titleUserNode + }).inject(this.titleBar); + this.titleUserIconNode = new Element("div", { + "styles": this.css.titleUserIconNode + }).inject(this.titleUserNode); + this.titleUserTextNode = new Element("div", { + "styles": this.css.titleUserTextNode, + "text": this.desktop.session.user.name + }).inject(this.titleUserNode); + }, + loadTitleTextNode: function(){ + this.taskTitleTextNode = new Element("div", { + "styles": this.css.titleTextNode, + "text": this.lp.title + }).inject(this.titleBar); + }, + + loadContent: function(){ + this.contentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.content); + MWF.require("MWF.widget.Tab", function(){ + this.tab = new MWF.widget.Tab(this.contentNode, {"style": "profile"}); + this.tab.load(); + + this.loadInforConfigNode(); + this.loadLayoutConfigNode(); + this.loadIdeaConfigNode(); + this.loadPasswordConfigNode(); + this.loadSSOConfigNode(); + + this.inforConfigPage = this.tab.addTab(this.inforConfigNode, this.lp.inforConfig); + this.layoutConfigPage = this.tab.addTab(this.layoutConfigNode, this.lp.layoutConfig); + this.ideaConfigPage = this.tab.addTab(this.ideaConfigNode, this.lp.ideaConfig); + this.passwordConfigPage = this.tab.addTab(this.passwordConfigNode, this.lp.passwordConfig); + this.ssoConfigPage = this.tab.addTab(this.ssoConfigNode, this.lp.ssoConfig); + + if (this.options.tab){ + this[this.options.tab].showIm(); + }else{ + this.inforConfigPage.showIm(); + } + + }.bind(this)); + }, + loadInforConfigNode: function(){ + this.inforConfigNode = new Element("div", {"styles": this.css.configNode}).inject(this.content); + this.inforConfigAreaNode = new Element("div", {"styles": this.css.inforConfigAreaNode}).inject(this.inforConfigNode); + + this.getAction(function(){ + this.action.getPerson(function(json){ + this.personData = json.data; + + var _self = this; + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforIconTitleNode, "text": this.lp.icon}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforIconContentNode}).inject(lineNode); + this.contentImgNode = new Element("img", {"styles": this.css.inforIconContentImgNode, "src": this.action.getPersonIcon()}).inject(contentNode); + var actionNode = new Element("div", {"styles": this.css.inforChangeIconNode, "text": this.lp.changeIcon, "events": { + "click": function(){this.changeIcon();}.bind(this) + }}).inject(lineNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.name}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode, "text": json.data.name}).inject(lineNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.employee}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode, "text": json.data.employee}).inject(lineNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.mail}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + this.mailInputNode = new Element("input", {"styles": this.css.inforContentInputNode, "value": json.data.mail, "events": { + "blur": function(){this.setStyles(_self.css.inforContentInputNode);}, + "focus": function(){this.setStyles(_self.css.inforContentInputNode_focus);} + }}).inject(contentNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.mobile}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + this.mobileInputNode = new Element("input", {"styles": this.css.inforContentInputNode, "value": json.data.mobile, "events": { + "blur": function(){this.setStyles(_self.css.inforContentInputNode);}, + "focus": function(){this.setStyles(_self.css.inforContentInputNode_focus);} + }}).inject(contentNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.officePhone}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + this.officePhoneInputNode = new Element("input", {"styles": this.css.inforContentInputNode, "value": json.data.officePhone, "events": { + "blur": function(){this.setStyles(_self.css.inforContentInputNode);}, + "focus": function(){this.setStyles(_self.css.inforContentInputNode_focus);} + }}).inject(contentNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.weixin}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + this.weixinInputNode = new Element("input", {"styles": this.css.inforContentInputNode, "value": json.data.weixin, "events": { + "blur": function(){this.setStyles(_self.css.inforContentInputNode);}, + "focus": function(){this.setStyles(_self.css.inforContentInputNode_focus);} + }}).inject(contentNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.QQ}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + this.qqInputNode = new Element("input", {"styles": this.css.inforContentInputNode, "value": json.data.qq, "events": { + "blur": function(){this.setStyles(_self.css.inforContentInputNode);}, + "focus": function(){this.setStyles(_self.css.inforContentInputNode_focus);} + }}).inject(contentNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.signature}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + this.signatureInputNode = new Element("input", {"styles": this.css.inforContentInputNode, "value": json.data.signature, "events": { + "blur": function(){this.setStyles(_self.css.inforContentInputNode);}, + "focus": function(){this.setStyles(_self.css.inforContentInputNode_focus);} + }}).inject(contentNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.inforConfigAreaNode); + this.saveAction = new Element("div", {"styles": this.css.saveAction, "text": this.lp.saveInfor}).inject(lineNode); + this.saveAction.addEvent("click", function(){ + this.savePersonInfor(); + }.bind(this)); + + + }.bind(this), null, this.desktop.session.user.name) + }.bind(this)); + }, + changeIcon: function(){ + var options = {}; + var width = "668"; + var height = "510"; + width = width.toInt(); + height = height.toInt(); + + var size = this.content.getSize(); + var x = (size.x-width)/2; + var y = (size.y-height)/2; + if (x<0) x = 0; + if (y<0) y = 0; + if (layout.mobile){ + x = 20; + y = 0; + } + + var _self = this; + MWF.require("MWF.xDesktop.Dialog", function() { + MWF.require("MWF.widget.ImageClipper", function(){ + var dlg = new MWF.xDesktop.Dialog({ + "title": this.lp.changePersonIcon, + "style": "image", + "top": y, + "left": x - 20, + "fromTop": y, + "fromLeft": x - 20, + "width": width, + "height": height, + "html": "
", + "maskNode": this.content, + "container": this.content, + "buttonList": [ + { + "text": MWF.LP.process.button.ok, + "action": function () { + //_self.uploadPersonIcon(); + _self.image.uploadImage( function( json ){ + _self.action.getPerson(function(json){ + if (json.data){ + this.personData = json.data; + _self.contentImgNode.set("src", _self.action.getPersonIcon()); + } + this.close(); + }.bind(this)); + }.bind(this), null ); + } + }, + { + "text": MWF.LP.process.button.cancel, + "action": function () { + _self.image = null; + this.close(); + } + } + ] + }); + dlg.show(); + + this.image = new MWF.widget.ImageClipper(dlg.content.getFirst(), { + "aspectRatio": 1, + "description" : "", + "imageUrl" : this.action.getPersonIcon(), + "resetEnable" : false, + + "data": null, + "parameter": null, + "action": this.action.action, + "method": "changeIcon" + }); + this.image.load(); + }.bind(this)); + }.bind(this)) + }, + uploadPersonIcon: function(){ + if (this.image){ + if( this.image.getResizedImage() ){ + + this.action.changeIcon(function(){ + this.action.getPerson(function(json){ + if (json.data){ + this.personData = json.data; + //if (this.personData.icon){ + this.contentImgNode.set("src", this.action.getPersonIcon()); + //} + } + }.bind(this)) + }.bind(this), null, this.image.getFormData(), this.image.resizedImage); + + + // this.explorer.actions.changePersonIcon(this.data.id ,function(){ + // this.iconNode.set("src", ""); + // if (this.item.iconNode) this.item.iconNode.getElement("img").set("src", ""); + // window.setTimeout(function(){ + // this.iconNode.set("src", this._getIcon(true)); + // if (this.item.iconNode) this.item.iconNode.getElement("img").set("src", this.item._getIcon(true)); + // }.bind(this), 100); + // }.bind(this), null, this.image.getFormData(), this.image.resizedImage); + } + } + }, + + // changeIcon: function(){ + // if (!this.uploadFileAreaNode){ + // this.uploadFileAreaNode = new Element("div"); + // var html = ""; + // this.uploadFileAreaNode.set("html", html); + // + // this.fileUploadNode = this.uploadFileAreaNode.getFirst(); + // this.fileUploadNode.addEvent("change", function(){ + // + // var files = fileNode.files; + // if (files.length){ + // for (var i = 0; i < files.length; i++) { + // var file = files.item(i); + // + // var formData = new FormData(); + // formData.append('file', file); + // //formData.append('name', file.name); + // //formData.append('folder', folderId); + // this.action.changeIcon(function(){ + // this.action.getPerson(function(json){ + // if (json.data){ + // this.personData = json.data; + // //if (this.personData.icon){ + // this.contentImgNode.set("src", this.action.getPersonIcon()); + // //} + // } + // }.bind(this)) + // }.bind(this), null, formData, file); + // } + // } + // + // }.bind(this)); + // } + // var fileNode = this.uploadFileAreaNode.getFirst(); + // fileNode.click(); + // }, + savePersonInfor: function(){ + this.personData.officePhone = this.officePhoneInputNode.get("value"); + this.personData.mail = this.mailInputNode.get("value"); + this.personData.mobile = this.mobileInputNode.get("value"); + this.personData.weixin = this.weixinInputNode.get("value"); + this.personData.qq = this.qqInputNode.get("value"); + this.personData.signature = this.signatureInputNode.get("value"); + this.action.updatePerson(this.personData, function(){ + this.notice(this.lp.saveInforOk, "success"); + }.bind(this)); + }, + loadLayoutConfigNode: function(){ + this.layoutConfigNode = new Element("div", {"styles": this.css.configNode}).inject(this.content); + + new Element("div", {"styles": this.css.layoutTitleNode, "text": this.lp.layoutAction}).inject(this.layoutConfigNode); + + var buttonNode = new Element("div", {"styles": this.css.buttonNodeArea}).inject(this.layoutConfigNode); + + this.clearDataAction = new Element("div", {"styles": this.css.clearDataAction, "text": this.lp.clear}).inject(buttonNode); + this.clearDataAction.addEvent("click", function(){ + MWF.require("MWF.widget.UUID", function(){ + //MWF.UD.putData("layout", {}, function(){ + // this.notice(this.lp.clearok, "success"); + // this.desktop.notRecordStatus = true; + //}.bind(this)); + + MWF.UD.deleteData("layout", function(){ + this.notice(this.lp.clearok, "success"); + this.desktop.notRecordStatus = true; + }.bind(this)); + + }.bind(this)); + }.bind(this)); + + if (MWF.AC.isAdministrator()){ + var defaultNode = new Element("div", {"styles": {"overflow":"hidden", "clear": "left"}}).inject(buttonNode); + this.defaultDataAction = new Element("div", {"styles": this.css.setDefaultDataAction, "text": this.lp.setDefault}).inject(defaultNode); + this.defaultDataAction.addEvent("click", function(){ + MWF.require("MWF.widget.UUID", function(){ + var text = this.lp.setDefaultOk; + this.close(); + var status = layout.desktop.getLayoutStatusData(); + MWF.UD.putPublicData("defaultLayout", status, function(){ + MWF.xDesktop.notice("success", {"x": "right", "y": "top"}, text, layout.desktop.desktopNode); + }.bind(this)); + }.bind(this)); + }.bind(this)); + + this.clearDefaultDataAction = new Element("div", {"styles": this.css.setDefaultDataAction, "text": this.lp.clearDefault}).inject(defaultNode); + this.clearDefaultDataAction.addEvent("click", function(){ + MWF.require("MWF.widget.UUID", function(){ + MWF.UD.deletePublicData("defaultLayout", function(){ + this.notice(this.lp.clearok, "success"); + this.desktop.notRecordStatus = true; + }.bind(this)); + // + // var text = this.lp.setDefaultOk; + // this.close(); + // var status = layout.desktop.getLayoutStatusData(); + // MWF.UD.putPublicData("defaultLayout", status, function(){ + // MWF.xDesktop.notice("success", {"x": "right", "y": "top"}, text, layout.desktop.desktopNode); + // }.bind(this)); + }.bind(this)); + }.bind(this)); + + + //var tmpNode = new Element("div", {"styles": { + // "width": "300px", + // "margin": "-20px auto" + //}}).inject(this.layoutConfigNode); + + this.forceDataAction = new Element("div", {"styles": this.css.setDefaultDataAction, "text": this.lp.setForce}).inject(buttonNode); + this.forceDataAction.setStyle("float", "left"); + this.forceDataAction.addEvent("click", function(){ + MWF.require("MWF.widget.UUID", function(){ + var text = this.lp.setForceOk; + this.close(); + var status = layout.desktop.getLayoutStatusData(); + MWF.UD.putPublicData("forceLayout", status, function(){ + MWF.xDesktop.notice("success", {"x": "right", "y": "top"}, text, layout.desktop.desktopNode); + }.bind(this)); + }.bind(this)); + }.bind(this)); + + this.deleteForceDataAction = new Element("div", {"styles": this.css.setDefaultDataAction, "text": this.lp.clearForce}).inject(buttonNode); + this.deleteForceDataAction.addEvent("click", function(){ + MWF.require("MWF.widget.UUID", function(){ + MWF.UD.deletePublicData("forceLayout", function(){ + this.notice(this.lp.clearok, "success"); + this.desktop.notRecordStatus = true; + }.bind(this)); + }.bind(this)); + }.bind(this)); + } + + new Element("div", {"styles": this.css.layoutTitleNode, "text": this.lp.desktopBackground}).inject(this.layoutConfigNode); + var UINode = new Element("div", {"styles": this.css.buttonNodeArea}).inject(this.layoutConfigNode); + this.loadDesktopBackground(UINode); + }, + loadDesktopBackground: function(UINode){ + var currentSrc = layout.desktop.options.style; + MWF.UD.getDataJson("layoutDesktop", function(json){ + if (json) currentSrc = json.src; + }.bind(this), false); + + MWF.getJSON(layout.desktop.path+"styles.json", function(json){ + json.each(function(style){ + var img = MWF.defaultPath+"/xDesktop/$Layout/"+style.style+"/preview.jpg"; + //var dskImg = MWF.defaultPath+"/xDesktop/$Layout/"+style.style+"/desktop.jpg"; + var imgArea = new Element("div", {"styles": this.css.previewBackground}).inject(UINode); + if (currentSrc==style.style){ + imgArea.setStyles({"border": "4px solid #ffea00"}); + } + new Element("img", {"src": img}).inject(imgArea); + + imgArea.store("dskimg", style.style); + var _self = this; + imgArea.addEvent("click", function(){ _self.selectDesktopImg(this, UINode); }); + }.bind(this)); + }.bind(this)); + + //MWF.UD.getPublicData("layoutDesktopImgs", function(json){ + // if (json) currentSrc = json.src; + //}.bind(this), false); + // + if (MWF.AC.isAdministrator()){ + + } + }, + selectDesktopImg: function(item, UINode){ + var desktopImg = item.retrieve("dskimg"); + MWF.UD.putData("layoutDesktop", {"src": desktopImg}, function(){ + UINode.getChildren().each(function(node){ + node.setStyles({"border": "4px solid #eeeeee"}); + }.bind(this)); + item.setStyles({"border": "4px solid #ffea00"}); + + var dskImg = MWF.defaultPath+"/xDesktop/$Layout/"+desktopImg+"/desktop.jpg"; + layout.desktop.node.setStyle("background-image", "url("+dskImg+")"); + }.bind(this)); + }, + + loadIdeaConfigNode: function(){ + this.ideaConfigNode = new Element("div", {"styles": this.css.configNode}).inject(this.content); + this.ideasArea = new Element("textarea", {"styles": this.css.ideasArea}).inject(this.ideaConfigNode); + this.ideasSaveAction = new Element("div", {"styles": this.css.ideasSaveAction, "text": this.lp.saveIdea}).inject(this.ideaConfigNode); + + if (MWF.AC.isAdministrator()){ + this.ideasSaveDefaultAction = new Element("div", {"styles": this.css.ideasSaveAction, "text": this.lp.saveIdeaDefault}).inject(this.ideaConfigNode); + this.ideasSaveDefaultAction.addEvent("click", function(){ + MWF.require("MWF.widget.UUID", function(){ + var data = {}; + data.ideas = this.ideasArea.get("value").split("\n"); + MWF.UD.putPublicData("idea", data, function(){ + this.notice(this.lp.ideaSaveOk, "success"); + }.bind(this)); + }.bind(this)); + }.bind(this)) + } + + MWF.require("MWF.widget.UUID", function(){ + MWF.UD.getDataJson("idea", function(json){ + if (json){ + if (json.ideas) this.ideasArea.set("value", json.ideas.join("\n")); + } + }.bind(this)); + }.bind(this)); + + this.ideasSaveAction.addEvent("click", function(){ + MWF.require("MWF.widget.UUID", function(){ + var data = {}; + data.ideas = this.ideasArea.get("value").split("\n"); + MWF.UD.putData("idea", data, function(){ + this.notice(this.lp.ideaSaveOk, "success"); + }.bind(this)); + }.bind(this)); + }.bind(this)) + }, + loadPasswordConfigNode: function(){ + this.passwordConfigNode = new Element("div", {"styles": this.css.configNode}); + this.passwordConfigAreaNode = new Element("div", {"styles": this.css.inforConfigAreaNode}).inject(this.passwordConfigNode); + + var _self = this; + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.passwordConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.oldPassword}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + this.oldPasswordInputNode = new Element("input", {"type": "password", "styles": this.css.inforContentInputNode, "events": { + "blur": function(){this.setStyles(_self.css.inforContentInputNode);}, + "focus": function(){this.setStyles(_self.css.inforContentInputNode_focus);} + }}).inject(contentNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.passwordConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.password}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + this.passwordInputNode = new Element("input", {"type": "password", "styles": this.css.inforContentInputNode, "events": { + "blur": function(){ + this.setStyles(_self.css.inforContentInputNode); + }, + "focus": function(){this.setStyles(_self.css.inforContentInputNode_focus);}, + "keyup" : function(){ this.checkPassowrdStrength( this.passwordInputNode.get("value") ) }.bind(this) + }}).inject(contentNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.passwordConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode}).inject(lineNode); + this.passwordRemindContainer = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.passwordConfigAreaNode); + var titleNode = new Element("div", {"styles": this.css.inforTitleNode, "text": this.lp.morePassword}).inject(lineNode); + var contentNode = new Element("div", {"styles": this.css.inforContentNode}).inject(lineNode); + this.morePasswordInputNode = new Element("input", {"type": "password", "styles": this.css.inforContentInputNode, "events": { + "blur": function(){this.setStyles(_self.css.inforContentInputNode);}, + "focus": function(){this.setStyles(_self.css.inforContentInputNode_focus);} + }}).inject(contentNode); + + var lineNode = new Element("div", {"styles": this.css.inforLineNode}).inject(this.passwordConfigAreaNode); + this.saveAction = new Element("div", {"styles": this.css.saveAction, "text": this.lp.passwordConfig}).inject(lineNode); + this.saveAction.addEvent("click", function(){ + this.changePassword(); + }.bind(this)); + + this.createPasswordStrengthNode(); + this.passworRemindNode = new Element("div",{"styles": this.css.passwordRemindNode, "text": this.lp.paswordRule }).inject( this.passwordRemindContainer ); + + }, + changePassword: function(){ + var oldPassword = this.oldPasswordInputNode.get("value"); + var password = this.passwordInputNode.get("value"); + var morePassword = this.morePasswordInputNode.get("value"); + + if (password!=morePassword){ + this.notice(this.lp.passwordNotMatch, "error"); + this.passwordInputNode.setStyles(this.css.inforContentInputNode_error); + this.morePasswordInputNode.setStyles(this.css.inforContentInputNode_error); + }else{ + this.action.changePassword(oldPassword, password, morePassword, function(){ + this.oldPasswordInputNode.set("value", ""); + this.passwordInputNode.set("value", ""); + this.morePasswordInputNode.set("value", ""); + this.notice(this.lp.changePasswordOk, "success"); + }.bind(this)); + + if (layout.config.mail){ + var url = "http://"+layout.config.mail+"//names.nsf?changepassword&password="+encodeURIComponent(oldPassword)+"&passwordnew="+encodeURIComponent(password)+"&passwordconfirm="+encodeURIComponent(password); + var iframe = new Element("iframe", {"styles": {"display": "none"}}).inject(this.desktop.desktopNode); + iframe.set("src", url); + window.setTimeout(function(){ + iframe.destroy(); + }.bind(this), 2000); + } + } + }, + + getAction: function(callback){ + if (!this.acrion){ + this.action = MWF.Actions.get("x_organization_assemble_personal"); + if (callback) callback(); + // MWF.xDesktop.requireApp("Profile", "Actions.RestActions", function(){ + // this.action = new MWF.xApplication.Profile.Actions.RestActions(); + // if (callback) callback(); + // }.bind(this)); + }else{ + if (callback) callback(); + } + }, + createPasswordStrengthNode : function(){ + var passwordStrengthArea = this.passwordRemindContainer; + + var lowNode = new Element( "div", {styles : this.css.passwordStrengthNode }).inject( passwordStrengthArea ); + this.lowColorNode = new Element( "div", {styles : this.css.passwordStrengthColor }).inject( lowNode ); + this.lowTextNode = new Element( "div", {styles : this.css.passwordStrengthText, text : this.lp.weak }).inject( lowNode ); + + var middleNode = new Element( "div" , {styles : this.css.passwordStrengthNode }).inject( passwordStrengthArea ); + this.middleColorNode = new Element( "div", {styles : this.css.passwordStrengthColor }).inject( middleNode ); + this.middleTextNode = new Element( "div", {styles : this.css.passwordStrengthText, text : this.lp.middle }).inject( middleNode ); + + var highNode = new Element("div", {styles : this.css.passwordStrengthNode }).inject( passwordStrengthArea ); + this.highColorNode = new Element( "div", {styles : this.css.passwordStrengthColor }).inject( highNode ); + this.highTextNode = new Element( "div", {styles : this.css.passwordStrengthText, text : this.lp.high }).inject( highNode ); + }, + getPasswordLevel: function( password, callback ){ + /*Level(级别) + •0-3 : [easy] + •4-6 : [midium] + •7-9 : [strong] + •10-12 : [very strong] + •>12 : [extremely strong] + */ + this.getAction( function( ){ + this.action.checkPassword( password, function( json ){ + if(callback)callback( json.data.value ); + }.bind(this), null, false ); + }.bind(this) ); + }, + checkPassowrdStrength: function(pwd){ + this.lowColorNode.setStyles( this.css.passwordStrengthColor ); + this.lowTextNode.setStyles( this.css.passwordStrengthText ); + this.middleColorNode.setStyles( this.css.passwordStrengthColor ); + this.middleTextNode.setStyles( this.css.passwordStrengthText ); + this.highColorNode.setStyles( this.css.passwordStrengthColor ); + this.highTextNode.setStyles( this.css.passwordStrengthText ); + if (pwd==null||pwd==''){ + }else{ + this.getPasswordLevel( pwd, function( level ){ + switch(level) { + case 0: + case 1: + case 2: + case 3: + this.lowColorNode.setStyles( this.css.passwordStrengthColor_low ); + this.lowTextNode.setStyles( this.css.passwordStrengthText_current ); + break; + case 4: + case 5: + case 6: + this.middleColorNode.setStyles( this.css.passwordStrengthColor_middle ); + this.middleTextNode.setStyles( this.css.passwordStrengthText_current ); + break; + default: + this.highColorNode.setStyles( this.css.passwordStrengthColor_high ); + this.highTextNode.setStyles( this.css.passwordStrengthText_current ); + } + }.bind(this) ) + + } + }, + loadSSOConfigNode: function(){ + this.ssoConfigNode = new Element("div", {"styles": this.css.configNode}).inject(this.content); + this.ssoConfigTitleNode = new Element("div", {"styles": this.css.ssoConfigTitleNode, "text": this.lp.bindOauth}).inject(this.ssoConfigNode); + this.ssoConfigAreaNode = new Element("div", {"styles": {"padding": "10px 40px"}}).inject(this.ssoConfigNode); + + MWF.Actions.get("x_organization_assemble_authentication").listOauthServer(function(json){ + json.data.each(function(d){ + var node = new Element("a", { + "styles": {"font-size": "14px", "display": "block", "margin-bottom": "10px"}, + "text": d.displayName, + "target": "_blank", + "href": "/x_desktop/oauth.html?oauth="+encodeURIComponent(d.name)+"&redirect="+"&method=oauthBind" + }).inject(this.ssoConfigAreaNode) + }.bind(this)); + }.bind(this)); + + + // this.ideasArea = new Element("textarea", {"styles": this.css.ideasArea}).inject(this.ideaConfigNode); + // this.ideasSaveAction = new Element("div", {"styles": this.css.ideasSaveAction, "text": this.lp.saveIdea}).inject(this.ideaConfigNode); + // + // if (MWF.AC.isAdministrator()){ + // this.ideasSaveDefaultAction = new Element("div", {"styles": this.css.ideasSaveAction, "text": this.lp.saveIdeaDefault}).inject(this.ideaConfigNode); + // this.ideasSaveDefaultAction.addEvent("click", function(){ + // MWF.require("MWF.widget.UUID", function(){ + // var data = {}; + // data.ideas = this.ideasArea.get("value").split("\n"); + // MWF.UD.putPublicData("idea", data, function(){ + // this.notice(this.lp.ideaSaveOk, "success"); + // }.bind(this)); + // }.bind(this)); + // }.bind(this)) + // } + // + // MWF.require("MWF.widget.UUID", function(){ + // MWF.UD.getDataJson("idea", function(json){ + // if (json){ + // if (json.ideas) this.ideasArea.set("value", json.ideas.join("\n")); + // } + // }.bind(this)); + // }.bind(this)); + // + // this.ideasSaveAction.addEvent("click", function(){ + // MWF.require("MWF.widget.UUID", function(){ + // var data = {}; + // data.ideas = this.ideasArea.get("value").split("\n"); + // MWF.UD.putData("idea", data, function(){ + // this.notice(this.lp.ideaSaveOk, "success"); + // }.bind(this)); + // }.bind(this)); + // }.bind(this)) + } +}); diff --git a/o2web/source/x_component_Selector/$Selector/process/css.wcss b/o2web/source/x_component_Selector/$Selector/process/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..8877818fa0aea28cf900a4cef40826f75dd7bb04 --- /dev/null +++ b/o2web/source/x_component_Selector/$Selector/process/css.wcss @@ -0,0 +1,427 @@ +{ + "maskNode": { + "background-color": "#666", + "opacity": 0.6, + "z-index":1000 + }, + "containerNode": { + "height": "510px", + "width": "700px", + "background-color": "#FFF", + "overflow": "hidden", + "border": "3px solid #666", + "border-radius": "10px", + "box-shadow": "0px 0px 15px #666", + "position": "absolute", + "z-index":1001 + }, + "containerNode_multiple": { + "height": "550px", + "width": "700px", + "background-color": "#FFF", + "overflow": "hidden", + "border": "3px solid #666", + "border-radius": "10px", + "box-shadow": "0px 0px 15px #666", + "position": "absolute", + "z-index":1001 + }, + "containerNodeSingle": { + "height": "510px", + "width": "355px", + "background-color": "#FFF", + "overflow": "hidden", + "border": "3px solid #666", + "border-radius": "10px", + "box-shadow": "0px 0px 15px #666", + "position": "absolute", + "z-index":1001 + }, + "containerNodeSingle_multiple": { + "height": "550px", + "width": "355px", + "background-color": "#FFF", + "overflow": "hidden", + "border": "3px solid #666", + "border-radius": "10px", + "box-shadow": "0px 0px 15px #666", + "position": "absolute", + "z-index":1001 + }, + "containerNodeMobile": { + "height": "100%", + "width": "100%", + "background-color": "#FFF", + "overflow": "hidden", + "position": "absolute", + "z-index":1001 + }, + + "titleNode": { + "height": "30px", + "background-color": "#EEE", + "border-bottom": "1px solid #CCC" + }, + "titleNodeMobile": { + "height": "40px", + "text-align": "center", + "background-color": "#4c6b87", + "border-bottom": "1px solid #CCC" + }, + + "titleTextNode": { + "margin-right": "30px", + "height": "30px", + "padding": "0px 10px", + "color": "#666", + "font-weight": "bold", + "font-size": "14px", + "line-height": "30px" + }, + "titleActionNode": { + "width": "30px", + "height": "30px", + "float": "right", + "background": "url("+"/x_component_Selector/$Selector/default/icon/close.png) no-repeat center center", + "cursor": "pointer" + }, + "titleTextNodeMobile": { + "margin": "0px 50px", + "height": "40px", + "padding": "0px 10px", + "color": "#FFF", + "font-weight": "bold", + "font-size": "14px", + "line-height": "40px" + }, + + "titleCancelActionNodeMobile": { + "height": "26px", + "width": "50px", + "text-align": "center", + "color": "#FFF", + "margin": "7px 15px", + "line-height": "26px", + "float": "left", + "font-size": "14px" + }, + "titleOkActionNodeMobile": { + "height": "26px", + "width": "50px", + "text-align": "center", + "color": "#FFF", + "margin": "7px 15px", + "line-height": "26px", + "float": "right", + "font-size": "14px" + }, + + "contentNode": { + "overflow": "hidden" + }, + "selectNode": { + //"width": "200px", + "width": "54%", + "min-width": "200px", + "height": "250px", + "float": "left", + "margin": "0px", + "border": "1px solid #cccccc", + "border-radius": "0px", + //"background-color": "#ffffff" + }, + "selectNodeSingle": { + //"width": "200px", + "width": "100%", + "height": "250px", + "float": "left", + "margin": "10px", + "border": "2px solid #999", + "border-radius": "6px" + }, + "selectNodeMobile":{ + "margin": "0px", + "border": "0px solid #999", + "border-radius": "0px" + }, + + + "selectedContainerNode": { + //"width": "160px", + "height": "250px", + "margin": "0px", + "border": "1px solid #ccc", + "border-left": "0px solid #ccc", + "border-radius": "0px", + "overflow" : "hidden" + }, + "selectedScrollNode": { +// "width": "331px", +// "height": "410px", +// "float": "right", +// "margin": "10px 10px 10px 5px", +// "border": "2px solid #999", +// "border-radius": "6px", + //"width": "160px", + "min-width": "160px", + "height": "250px", + "overflow" : "auto", + "background-color": "#ffffff" + }, + "selectedNode": { + //"overflow": "hidden" + }, + "actionNode": { + "height": "40px", + "width": "310px", + "margin": "auto" + }, + "okActionNode": { + "width": "150px", + "height": "30px", + "background": "url("+"/x_component_Selector/$Selector/default/icon/editOk_bg.png) no-repeat center center", + "border": "0px", + "color": "#FFF", + "font-size": "18px", + "padding-left": "35px", + "border-radius": "4px", + "cursor": "pointer" + }, + "cancelActionNode": { + "width": "100px", + "height": "30px", + "background": "url("+"/x_component_Selector/$Selector/default/icon/editCancel_bg.png) no-repeat center center", + "border": "0px", + "color": "#FFF", + "font-size": "18px", + "padding-left": "20px", + "border-radius": "4px", + "margin-left": "10px", + "cursor": "pointer" + }, + + "searchInputDiv": { + "height": "24px", + "line-height": "24px", + "font-size": "12px", + "color": "#666666", + "background": "transparent", + "border-bottom": "1px solid #999" + }, + "searchInput": { + "width": "150px", + "height": "22px", + "border": "0px", + "margin": "0px", + "font-size": "12px", + "background": "transparent", + "float": "left", + "outline": "none" + }, + "searchInputSingle": { + "width": "196px", + "height": "22px", + "border": "0px", + "margin": "3px" + }, + "letterAreaMobileNode": { + "padding": "0px 9px", + "height": "36px", + "border-bottom": "1px solid #cccccc", + "background-color": "#EEE", + }, + "letterAreaNode": { + //"width": "196px", + "padding": "0px 2px", + //"height": "36px", + "overflow": "hidden", + "border-bottom": "1px solid #cccccc", + "background-color": "#f3f3f3", + }, + "letterNode": { + "height": "18px", + "line-height": "18px", + "width": "15px", + "text-align": "center", + "font-weight": "bold", + "float": "left", + "cursor": "pointer", + "font-size": "11px", + "color": "#666666", + "background": "transparent" + }, + "letterNode_over": { + "height": "18px", + "line-height": "18px", + "width": "15px", + "text-align": "center", + "font-weight": "bold", + "float": "left", + "color": "#666666", + "cursor": "pointer", + "font-size": "11px", + "background": "#FFF" + }, + "itemAreaScrollNode": { + "overflow": "auto", + "background-color": "#ffffff", + "height": "188px" + }, + "itemAreaNode": { + "overflow": "hidden" + }, + "letterShowNode": { + "text-align": "center", + "font-size": "48px", + "font-weight": "bold", + "position": "absolute", + "color": "#333", + "opacity": 0.6 + }, + "selectorItem": { + "height": "26px", + "line-height": "26px", + "padding": "0px 0px", + "overflow": "hidden", + "cursor": "pointer", + "font-size": "12px", + "border-bottom": "1px solid #FFF", + "color": "#666666", + "background": "transparent" + }, + "selectorItemCategory": { + "height": "26px", + "line-height": "26px", + "padding": "0px 0px", + "overflow": "hidden", + "cursor": "pointer", + "font-size": "12px", + "color": "#666666", + "border-bottom": "1px solid #FFF", + "background": "#eeeeee" + }, + "selectorItemCategory_department": { + "height": "26px", + "line-height": "26px", + "padding": "0px 0px", + "overflow": "hidden", + "cursor": "pointer", + "font-size": "12px", + "border-bottom": "1px solid #FFF", + "background": "#E9E9E9" + }, + + "selectorItem_over": { + //"height": "28px", + "line-height": "26px", + "padding": "0px 0px", + "overflow": "hidden", + "cursor": "pointer", + "border-bottom": "1px solid #FFF", + "background-color": "#edf3fa" + }, + "selectorItem_selected": { + //"height": "24px", + "line-height": "26px", + "padding": "0px 0px", + "overflow": "hidden", + "cursor": "pointer", + "border-bottom": "1px solid #FFF", + "background-color": "#6681a5", + }, + "selectorItemLevelNode": { + "width": "0px", + "height": "26px", + "float": "left" + }, + "selectorItemLevelNode_expand":{ + "background": "url("+"/x_component_Selector/$Selector/default/icon/expand.png) no-repeat center right" + }, + "selectorItemLevelNode_collapse":{ + "background": "url("+"/x_component_Selector/$Selector/default/icon/collapse.png) no-repeat center right" + }, + "selectorItemIconNode": { + "width": "26px", + "height": "26px", + "float": "left", + "background-repeat": "no-repeat", + "background-position": "center center" + }, + "selectorItemActionNode": { + "width": "26px", + "height": "26px", + "float": "right", + "background": "transparent" + }, + "selectorItemActionNode_selected_over": { + "width": "26px", + "height": "26px", + "float": "right", + "background": "url("+"/x_component_Selector/$Selector/default/icon/remove.png) no-repeat center center" + }, + "selectorItemActionNode_over": { + "width": "26px", + "height": "26px", + "float": "right", + "background": "url("+"/x_component_Selector/$Selector/default/icon/right.png) no-repeat center center" + }, + "selectorItemActionNode_selected": { + "width": "26px", + "height": "26px", + "float": "right", + "background": "url("+"/x_component_Selector/$Selector/default/icon/check.png) no-repeat center center" + }, + "selectorItemCategoryActionNode_expand": { + "width": "26px", + "height": "26px", + "float": "right", + "font-size": "12px", + "background": "url("+"/x_component_Selector/$Selector/default/icon/minus.png) no-repeat center center" + }, + "selectorItemCategoryActionNode_collapse": { + "width": "26px", + "height": "26px", + "font-size": "12px", + "float": "right", + "background": "url("+"/x_component_Selector/$Selector/default/icon/add.png) no-repeat center center" + }, + + "selectorItemTextNode": { + "height": "26px", + "margin": "0px 26px", + "word-wrap": "break-word", + "color": "#000" + }, + "selectorItemCategoryTextNode": { + "height": "26px", + "margin": "0px 26px", + "color": "#000", + "font-size": "12px", + "font-weight": "bold" + }, + "selectorItemTextNode_selected": { + "height": "26px", + "margin-left": "26px", + "color": "#FFF" + }, + + "selectorItemCategoryChildrenNode": { + "overflow": "hidden", + "margin-left": "0px" + }, + + "dutyInputDialog":{ + "height": "56px", + "clear": "both" + }, + "dutyInputNode": { + "border": "1px solid #eee", + "background": "#FFF", + "height": "18px" + }, + "filePreviewNode": { + "overflow": "hidden", + "max-width": "300px", + "max-height": "200px" + } +} \ No newline at end of file diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/add.png b/o2web/source/x_component_Selector/$Selector/process/icon/add.png new file mode 100644 index 0000000000000000000000000000000000000000..266ee4e5c4d2a92bf8070bfe4c6306f2d0fe71c7 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/add.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/applicationicon.png b/o2web/source/x_component_Selector/$Selector/process/icon/applicationicon.png new file mode 100644 index 0000000000000000000000000000000000000000..880995101215fe5e860e357f48c41a3e80c8694d Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/applicationicon.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/attr.png b/o2web/source/x_component_Selector/$Selector/process/icon/attr.png new file mode 100644 index 0000000000000000000000000000000000000000..1777642fc08d8d0864839d79a35d8da9a9827c00 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/attr.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/check.png b/o2web/source/x_component_Selector/$Selector/process/icon/check.png new file mode 100644 index 0000000000000000000000000000000000000000..8260584f6e3fadb7dcf5674795dbde54408e948f Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/check.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/close.png b/o2web/source/x_component_Selector/$Selector/process/icon/close.png new file mode 100644 index 0000000000000000000000000000000000000000..4b30ce546d6aaa8dc3bb815fbb4538110c921694 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/close.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/collapse.png b/o2web/source/x_component_Selector/$Selector/process/icon/collapse.png new file mode 100644 index 0000000000000000000000000000000000000000..ffffeec59ac6f23871b885614731fbd491bf293f Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/collapse.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/companyicon.png b/o2web/source/x_component_Selector/$Selector/process/icon/companyicon.png new file mode 100644 index 0000000000000000000000000000000000000000..a2ad2e622ee53795b41e8edf38eb335ec54dadc0 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/companyicon.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/departmenticon.png b/o2web/source/x_component_Selector/$Selector/process/icon/departmenticon.png new file mode 100644 index 0000000000000000000000000000000000000000..c575e4bf40f43f9b1720f9a488e3aa5bef17adb7 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/departmenticon.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/duty.png b/o2web/source/x_component_Selector/$Selector/process/icon/duty.png new file mode 100644 index 0000000000000000000000000000000000000000..54517b531790ddf2782c11b9e8a760c7e5a35b18 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/duty.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/dutyCategory.png b/o2web/source/x_component_Selector/$Selector/process/icon/dutyCategory.png new file mode 100644 index 0000000000000000000000000000000000000000..dc8e2cb24f159720f98af66525766f1efe762083 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/dutyCategory.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/editCancel_bg.png b/o2web/source/x_component_Selector/$Selector/process/icon/editCancel_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..9f296a7b7021d1c6a4e967ccfca14cb1d7691317 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/editCancel_bg.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/editOk_bg.png b/o2web/source/x_component_Selector/$Selector/process/icon/editOk_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..6fd79f6f0e9c82b4455db77563bc348fb606a6d4 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/editOk_bg.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/expand.png b/o2web/source/x_component_Selector/$Selector/process/icon/expand.png new file mode 100644 index 0000000000000000000000000000000000000000..a5266b6684a552bbc9eb2eed7dd3b3ca9352e9bc Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/expand.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/groupicon.png b/o2web/source/x_component_Selector/$Selector/process/icon/groupicon.png new file mode 100644 index 0000000000000000000000000000000000000000..91c60e338c9e6d19b330e42792e7b2f8776a6a4e Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/groupicon.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/minus.png b/o2web/source/x_component_Selector/$Selector/process/icon/minus.png new file mode 100644 index 0000000000000000000000000000000000000000..2e56dabf6927f5d3e2f8b5e1d9dfb3541b4397b1 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/minus.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/personicon.png b/o2web/source/x_component_Selector/$Selector/process/icon/personicon.png new file mode 100644 index 0000000000000000000000000000000000000000..ad48455bc08d590c63000672c764f85e00f5964d Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/personicon.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/processicon.png b/o2web/source/x_component_Selector/$Selector/process/icon/processicon.png new file mode 100644 index 0000000000000000000000000000000000000000..63ef1f41573faa6bc619ba2c621452405c4157a8 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/processicon.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/remove.png b/o2web/source/x_component_Selector/$Selector/process/icon/remove.png new file mode 100644 index 0000000000000000000000000000000000000000..d21e93f005cff3842869daf0f712487a89555a74 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/remove.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/right.png b/o2web/source/x_component_Selector/$Selector/process/icon/right.png new file mode 100644 index 0000000000000000000000000000000000000000..f5a75196f551832fc55179a9869c1c6e58de2c6d Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/right.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/roleicon.png b/o2web/source/x_component_Selector/$Selector/process/icon/roleicon.png new file mode 100644 index 0000000000000000000000000000000000000000..984c6476265c6769eaac7b05ee81634f986087be Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/roleicon.png differ diff --git a/o2web/source/x_component_Selector/$Selector/process/icon/view.png b/o2web/source/x_component_Selector/$Selector/process/icon/view.png new file mode 100644 index 0000000000000000000000000000000000000000..dd7a542841a8a8ee141f997eace7ba59d808fb36 Binary files /dev/null and b/o2web/source/x_component_Selector/$Selector/process/icon/view.png differ diff --git a/o2web/source/x_component_Setting/$Main/default/icon/site.png b/o2web/source/x_component_Setting/$Main/default/icon/site.png new file mode 100644 index 0000000000000000000000000000000000000000..d42fcb993405dffff5b1d5398ffe4143251e3dce Binary files /dev/null and b/o2web/source/x_component_Setting/$Main/default/icon/site.png differ diff --git a/o2web/source/x_component_Setting/Document.js b/o2web/source/x_component_Setting/Document.js index 224376d05961b0bde9071530256fb1bd83581d3c..220fba9146ef5a99bb4229b83998db9d5c2fb4ee 100644 --- a/o2web/source/x_component_Setting/Document.js +++ b/o2web/source/x_component_Setting/Document.js @@ -688,6 +688,7 @@ MWF.xApplication.Setting.Document.List.ItemEditor = new Class({ }.bind(this)); }, save: function(dlg){ + debugger; var keys = Object.keys(this.inputs); var values = {}; var flag = true; diff --git a/o2web/source/x_component_Setting/SettingBase.js b/o2web/source/x_component_Setting/SettingBase.js index 6210e5f3ea9ad63a5ee364ab9146468a60e4efb1..d487062bf3e66f549e784cf4e8d731eb55581701 100644 --- a/o2web/source/x_component_Setting/SettingBase.js +++ b/o2web/source/x_component_Setting/SettingBase.js @@ -34,6 +34,12 @@ MWF.xApplication.Setting.BaseLoginDocument = new Class({ this.titleName = new Element("div", {"styles": this.explorer.css.explorerContentTitleNode}).inject(this.node); this.titleName.set("text", this.lp.base_loginSetting); + this.baseCaptchaLoginInput = new MWF.xApplication.Setting.Document.Check(this.explorer, this.node, { + "lp": {"title": this.lp.base_captchaLogin, "infor": this.lp.base_captchaLogin_infor, "action": this.lp.base_captchaLogin_action}, + "data": {"key": "personData", "valueKey": "captchaLogin", "notEmpty": false }, + "value": this.explorer.personData.captchaLogin + }); + this.baseCodeLoginInput = new MWF.xApplication.Setting.Document.Check(this.explorer, this.node, { "lp": {"title": this.lp.base_codeLogin, "infor": this.lp.base_codeLogin_infor, "action": this.lp.base_codeLogin_action}, "data": {"key": "personData", "valueKey": "codeLogin", "notEmpty": false }, @@ -134,19 +140,44 @@ MWF.xApplication.Setting.BaseSSODocument = new Class({ "icon": "sso.png" }); + + if (!this.explorer.tokenData.qyweixin) this.explorer.tokenData.qyweixin = { + "enable": false, + "syncCron": "", + "forceSyncCron": "", + "apiAddress": "", + "corpId": "", + "corpSecret": "", + "agentId": "", + "token": "", + "encodingAesKey": "", + "messageEnable": false + }; this.baseQyweixinInput = new MWF.xApplication.Setting.Document.List(this.explorer, this.node, { "lp": {"title": this.lp.base_qyweixin, "infor": this.lp.base_qyweixin_infor, "action": this.lp.base_qyweixin_action}, - "data": {"key": "tokenData", "valueKey": "qyweixin", "notEmpty": false}, - "value": this.explorer.tokenData.qyweixin || {"corpId": "", "corpSecret": ""}, + "data": {"key": "tokenData", "valueKey": "qiyeweixin", "notEmpty": false}, + "value": this.explorer.tokenData.qiyeweixin, "itemTitle": "corpId: {corpId}", "addItem": {"corpId": "", "corpSecret": ""}, "icon": "weixin.png" }); + + if (!this.explorer.tokenData.dingding) this.explorer.tokenData.dingding = { + "enable": false, + "corpId": "", + "agentId": "", + "appKey": "", + "appSecret": "", + "syncCron": "", + "forceSyncCron": "", + "oapiAddress": "", + "messageEnable": true + }; this.baseDingdingInput = new MWF.xApplication.Setting.Document.List(this.explorer, this.node, { "lp": {"title": this.lp.base_dingding, "infor": this.lp.base_dingding_infor, "action": this.lp.base_dingding_action}, "data": {"key": "tokenData", "valueKey": "dingding", "notEmpty": false}, - "value": this.explorer.tokenData.dingding || {"corpId": "", "corpSecret": "", "agentId": ""}, - "itemTitle": "corpId: {corpId}", + "value": this.explorer.tokenData.dingding, + "itemTitle": "agentId: {agentId}", "addItem": {"corpId": "", "corpSecret": "", "agentId": ""}, "icon": "dingding.png" }); diff --git a/o2web/source/x_component_Setting/SettingModuleUI.js b/o2web/source/x_component_Setting/SettingModuleUI.js index efff43ec95a108fb955f35c5d5bd1d3cb15bbdd3..0c03180bf1d99954455b76f546d65018d469230d 100644 --- a/o2web/source/x_component_Setting/SettingModuleUI.js +++ b/o2web/source/x_component_Setting/SettingModuleUI.js @@ -196,7 +196,18 @@ MWF.xApplication.Setting.UIModuleDocument.Component = new Class({ this.actionAreaNode = new Element("div", {"styles": this.css.actionAreaNode}).inject(this.node); - var icon = "/x_component_"+this.data.path.replace(/\./g, "_")+"/$Main/"+this.data.iconPath; + //var icon = "/x_component_"+this.data.path.replace(/\./g, "_")+"/$Main/"+this.data.iconPath; + var icon; + if (this.data.path.substring(0, 4)==="@url"){ + if (this.data.iconPath){ + icon = this.data.iconPath; + }else{ + icon = "/x_component_Setting/$Main/default/icon/site.png"; + } + }else{ + icon = "/x_component_"+this.data.path.replace(/\./g, "_")+"/$Main/"+this.data.iconPath; + } + this.iconNode.setStyle("background-image", "url("+icon+")"); this.titleNode.set("text", this.data.title); @@ -360,6 +371,17 @@ MWF.xApplication.Setting.UIModuleDocument.Deploy = new Class({ this.nameInputNode = this.createLine(this.lp.name); this.titleInputNode = this.createLine(this.lp.componentTitle); this.pathInputNode = this.createLine(this.lp.path); + + // var p = this.pathInputNode.getParent(); + // p.setStyle("height", ""+h+"px"); + new Element("div", {"text": this.lp.urlInfor, "styles": this.css.deployLineNode}).inject( this.content); + + this.iconNode = new MWF.xApplication.Setting.UIModuleDocument.Deploy.Icon(this.deployment, this.content, this.lp.icon, this); + + this.pathInputNode.addEvent("change", function(){ + if (this.iconNode) this.iconNode.checkIcon(); + }.bind(this)); + this.visibleInputNode = this.createLineSelect(this.lp.isVisible); // this.widgetNameInputNode = this.createLine(this.lp.widgetName); @@ -411,12 +433,13 @@ MWF.xApplication.Setting.UIModuleDocument.Deploy = new Class({ // "denyList": this.denyList.list, // "controllerList": this.controllerList.list // }; + var path = this.pathInputNode.get("value"); var data = { "name": this.nameInputNode.get("value"), "title": this.titleInputNode.get("value"), - "path": this.pathInputNode.get("value"), - "visible": (visible=="yes") ? true : false, - "iconPath": "appicon.png", + "path": path, + "visible": (visible==="yes") ? true : false, + "iconPath": (path.substring(0, 4)==="@url") ? "/x_component_Setting/$Main/default/icon/site.png" : "appicon.png", "widgetName": "", "widgetTitle": "", "widgetIconPath": "", @@ -467,6 +490,7 @@ MWF.xApplication.Setting.UIModuleDocument.DeployEdit = new Class({ this.okAction.addEvent("click", function(){ var data = this.getComponentData(); + data.iconPath = this.data.iconPath; if ((!data.name) || (!data.title) || (!data.path)){ this.deployment.app.notice(this.lp.noInputInfor, "error"); return false; @@ -537,4 +561,88 @@ MWF.xApplication.Setting.UIModuleDocument.Deploy.Select = new Class({ if (personName) new MWF.widget.O2Person({"name": personName}, this.listNode, {"style": "application"}); }.bind(this)); } +}); + +MWF.xApplication.Setting.UIModuleDocument.Deploy.Icon = new Class({ + initialize: function(deployment, content, title, deploy){ + this.deployment = deployment; + this.css = this.deployment.css; + this.deploy = deploy; + + this.list = []; + + var lineNode = new Element("div", {"styles": this.css.deployLineNode}).inject(content); + lineNode.setStyle("height", "64px"); + var titleNode = new Element("div", {"styles": this.css.deployTitleNode, "text": title}).inject(lineNode); + var valueNode = new Element("div", {"styles": this.css.deployvalueNode}).inject(lineNode); + this.iconNode = new Element("div", {"styles": this.css.deployIconNode}).inject(valueNode); + + this.actionNode = new Element("div", {"styles": this.css.actionNode, "text": this.deployment.lp.selIcon}).inject(valueNode); + this.actionNode.setStyles({"margin-top": "10px", "float": "left"}); + + this.actionNode.addEvent("click", function(){ + if (!this.uploadFileAreaNode){ + this.createUploadFileAreaNode(); + } + this.fileUploadNode.set("multiple", false); + + var fileNode = this.uploadFileAreaNode.getFirst(); + fileNode.set("accept", ".png,.jpg,.bmp,.gif,.jpeg,.jpe"); + fileNode.click(); + }.bind(this)); + + this.checkIcon(); + }, + createUploadFileAreaNode: function(){ + this.uploadFileAreaNode = new Element("div"); + var html = ""; + this.uploadFileAreaNode.set("html", html); + + this.fileUploadNode = this.uploadFileAreaNode.getFirst(); + this.fileUploadNode.addEvent("change", function(){ + //var fileId = attachment.data.id; + + var files = this.fileUploadNode.files; + if (files.length){ + var count = files.length; + for (var i = 0; i < files.length; i++) { + var file = files.item(i); + + var formData = new FormData(); + formData.append('file', file); + + MWF.xDesktop.uploadImage( + "component", + "component", + formData, + file, + function(json){ + debugger; + var id = json.id; + this.deploy.data.iconPath = MWF.xDesktop.getImageSrc(id); + this.checkIcon(); + }.bind(this) + ); + } + } + }.bind(this)); + }, + checkIcon: function(){ + var path = this.deploy.pathInputNode.get("value") || ((this.deploy.data) ? this.deploy.data.path : ""); + if (path.substring(0,4)==="@url"){ + if (!this.deploy.data || !this.deploy.data.iconPath){ + this.iconNode.setStyle("background", "url(/x_component_Setting/$Main/default/icon/site.png) no-repeat center center"); + }else{ + this.iconNode.setStyle("background", "url("+this.deploy.data.iconPath+") no-repeat center center"); + } + if (this.actionNode) this.actionNode.show(); + }else{ + if (path){ + var p = path.replace(".", "_"); + this.iconNode.setStyle("background", "url(/x_component_"+p+"/$Main/appicon.png) no-repeat center center"); + } + if (this.actionNode) this.actionNode.hide(); + } + } + }); \ No newline at end of file diff --git a/o2web/source/x_component_Setting/lp/zh-cn.js b/o2web/source/x_component_Setting/lp/zh-cn.js index 6adb115eef84d40a6b3635866f4b7204e30d051f..610ebee8ea87b4336ade2117fecede1588ea1233 100644 --- a/o2web/source/x_component_Setting/lp/zh-cn.js +++ b/o2web/source/x_component_Setting/lp/zh-cn.js @@ -48,6 +48,11 @@ MWF.xApplication.Setting.LP = { "base_loginSetting": "配置用户登录选项", + + "base_captchaLogin": "启用图片验证码登录", + "base_captchaLogin_infor": "启用后登陆时必须正确输入图片验证码", + "base_captchaLogin_action": "", + "base_codeLogin": "启用短信验证码登录", "base_codeLogin_infor": "启用后允许通过短信验证码登录", "base_codeLogin_action": "", @@ -237,6 +242,7 @@ MWF.xApplication.Setting.LP = { "name": "组件名称", "componentTitle": "组件标题", "path": "组件路径", + "icon": "组件图标", "isVisible": "是否可见", "yes": "是", "no": "否", @@ -249,6 +255,8 @@ MWF.xApplication.Setting.LP = { "denyList": "拒绝访问列表", "controllerList": "管理者", "selPerson": "选择人员", + "selIcon": "选择图标", + "urlInfor": "您可以通过“@url:”将路径添加为一个网页URL,如“@url:http://www.bing.com”", "phone": "手机", "mail": "邮件", diff --git a/o2web/source/x_component_Strategy/lp/zh-cn.min.js b/o2web/source/x_component_Strategy/lp/zh-cn.min.js new file mode 100644 index 0000000000000000000000000000000000000000..4c3e17f9e00c51e9a6ede97378c0e31aaa1d0fb7 --- /dev/null +++ b/o2web/source/x_component_Strategy/lp/zh-cn.min.js @@ -0,0 +1 @@ +MWF.xApplication.Strategy.LP={title:"战略管理平台",keyWork:{name:"公司重点工作",add:"增加",imported:"导入",deptList:"部门列表:",defaultSearchIn:"请按标题搜索",submitWarn:{title:"信息确认",content:{deleted:"确认删除?"}},view:{NO:"序号",title:"标题",department:"责任部门",content:"内容",action:"操作",action_open:"打开",action_edit:"编辑",action_delete:"删除"},popupForm:{addTitle:"增加工作",sequencenumber:"序号",title:"重点工作",year:"年份",department:"部门",description:"描述",selectYears:"2016,2017,2018,2019,2020",saveAction:"保存",cancelAction:"取消"}},measure:{name:"关键举措",add:"增加",addTitle:"增加工作",deptList:"部门列表:",defaultSearchIn:"请按标题搜索",submitWarn:{title:"信息确认",content:{deleted:"确认删除?"}},view:{NO:"序号",title:"标题",department:"牵头部门",resDepartment:"责任部门",measuressupportdepts:"支撑部门",content:"工作内容",action:"操作",action_open:"打开",action_edit:"编辑",action_delete:"删除"},popupForm:{addTitle:"增加工作",sequencenumber:"序号",title:"关键举措",year:"年份",department:"牵头部门",resDepartment:"责任部门",measuressupportdepts:"支撑部门",keyWork:"公司工作重点","Measuresinfoparentid ":"公司工作重点",description:"工作内容",measuresinfotargetvalue:"战略举措目标值",target:"目标值",selectYears:"2016,2017,2018,2019,2020",saveAction:"保存",cancelAction:"取消"}},priority:{name:"年度重点工作及目标",add:"增加",addTitle:"增加工作",deptList:"部门列表:",defaultSearchIn:"请按标题搜索",submitWarn:{title:"信息确认",content:{deleted:"确认删除?"}},view:{NO:"序号",title:"标题",measure:"相关举措",content:"内容",action:"操作",action_open:"打开",action_edit:"编辑",action_delete:"删除"},popupForm:{addTitle:"增加工作",sequencenumber:"序号",title:"标题",year:"年份",department:"部门",keyWork:"公司工作重点",validDate:"起始时间",keyworkbegindate:"开始日期",validDateConnect:"至",validDateMonth:"月",keyworkenddate:"结束日期",measurelist:"相关举措",description:"描述",attachments:"附件",selectYears:"2016,2017,2018,2019,2020",selectMonth:" ,1,2,3,4,5,6,7,8,9,10,11,12",saveAction:"保存",cancelAction:"取消"}},importForm:{importAction:"导入",importClose:"关闭",template:"导入模板",title:"导入",notice:{fileEmpty:"请选择文件",sheetEmpty:"请选择sheet页"}},template:{defaultSelect:"请选择",paging:{prePage:"上页",nextPage:"下页",firstPage:"首页",lastPage:"末页",perPageText:"每页5条,每页10条,每页20条",perPageValue:"5,10,20",perPage:{five:{text:"每页5条",value:5},ten:{text:"每页10条",value:10},twenty:{text:"每页20条",value:20}}}},attachment:{priority:{deleteAttachmentTitle:"附件删除",deleteAttachment:"附件"}},prompt:{keyWork:{deleteOK:"删除成功"},measure:{deleteOK:"删除成功"},priority:{deleteOK:"删除成功"}}}; \ No newline at end of file diff --git a/o2web/source/x_component_Template/Explorer.js b/o2web/source/x_component_Template/Explorer.js index 4b0eb524bdd2a1e0f27a02e68e62df428d66cdf8..4abdf13bfe178c33bd3d41a4560726b5c77e0883 100644 --- a/o2web/source/x_component_Template/Explorer.js +++ b/o2web/source/x_component_Template/Explorer.js @@ -46,6 +46,7 @@ MWF.xApplication.Template.Explorer.ComplexView = new Class({ "pagingEnable" : false, "documentSortable" : false, //item可以拖动排序,和 onSortCompleted 结合使用 "documentKeyWord" : null, + "holdMouseDownStyles" : false, //维持鼠标点击后的样式,在mouseover的时候不改变样式 "pagingPar" : { position : [ "top" , "bottom" ], //分页条,上下 countPerPage : 0, @@ -421,18 +422,24 @@ MWF.xApplication.Template.Explorer.ComplexView = new Class({ if (styles)node.setStyles(styles); if (overStyles && styles) { node.addEvent("mouseover", function (ev) { - if( !_self.lockNodeStyle )this.node.setStyles(this.styles); + if( !_self.lockNodeStyle && (!_self.options.holdMouseDownStyles || _self.mousedownNode != this.node ) )this.node.setStyles(this.styles); }.bind({"styles": overStyles, "node":node })); node.addEvent("mouseout", function (ev) { - if( !_self.lockNodeStyle )this.node.setStyles(this.styles); + if( !_self.lockNodeStyle && (!_self.options.holdMouseDownStyles || _self.mousedownNode != this.node ) )this.node.setStyles(this.styles); }.bind({"styles": styles, "node":node})); } if (downStyles && ( overStyles || styles)) { node.addEvent("mousedown", function (ev) { if( !_self.lockNodeStyle )this.node.setStyles(this.styles); - }.bind({"styles": downStyles, "node":node})); + if( _self.mousedownNode ){ + _self.mousedownNode.setStyles( this.normalStyle ) + } + if( _self.options.holdMouseDownStyles ){ + _self.mousedownNode = this.node; + } + }.bind({"styles": downStyles, normalStyle : (styles || overStyles), "node":node})); node.addEvent("mouseup", function (ev) { - if( !_self.lockNodeStyle )this.node.setStyles(this.styles); + if( !_self.lockNodeStyle && (!_self.options.holdMouseDownStyles || _self.mousedownNode != this.node ) )this.node.setStyles(this.styles); }.bind({"styles": overStyles || styles, "node":node})) } }, diff --git a/o2web/source/x_component_Template/MDomItem.js b/o2web/source/x_component_Template/MDomItem.js index 48039fef8a421ff7b35b8a9b17bd7938c43dced1..9f3cf5749934dddcffc94a411516687e15be1785 100644 --- a/o2web/source/x_component_Template/MDomItem.js +++ b/o2web/source/x_component_Template/MDomItem.js @@ -346,7 +346,9 @@ var MDomItem = new Class({ }else if( this.options.warningType == "single" ){ this.setWarning(warningText, "empty"); }else{ - this.app.notice(warningText,"error",this.container); + if( this.app && this.app.notice ){ + this.app.notice(warningText,"error",this.container); + } if( !this.options.validImmediately ){ if( ["text","password","textarea","select","multiselect"].contains( this.options.type ) ){ items[0].focus(); @@ -2575,6 +2577,7 @@ MDomItem.Rtf = new Class({ if( this.options.RTFConfig ){ editorConfig = Object.merge( editorConfig, this.options.RTFConfig ) } + if( editorConfig.skin )editorConfig.skin = "moono-lisa"; if( !editorConfig.filebrowserFilesImage && !editorConfig.cloudFileDisable ){ editorConfig.filebrowserFilesImage = function( e, callback ){ MWF.xDesktop.requireApp("File", "FileSelector", function(){ diff --git a/o2web/source/x_component_Template/MGrid.js b/o2web/source/x_component_Template/MGrid.js index a0dd75c85f91ef9a6c62bc468d62e96635a0d024..1578b66f15ffa3ba34f1c4128e7044a8f742a089 100644 --- a/o2web/source/x_component_Template/MGrid.js +++ b/o2web/source/x_component_Template/MGrid.js @@ -360,7 +360,9 @@ var MGrid = new Class({ if( this.getTrCounts() < this.options.maxTrCount ){ this._createTr( itemData, isNew, unid, sourceData ) }else{ - this.app.notice("最多只能添加"+this.options.maxTrCount+"项目","error"); + if( this.app && this.app.notice ){ + this.app.notice("最多只能添加"+this.options.maxTrCount+"项目","error"); + } } }else{ this._createTr( itemData, isNew, unid, sourceData ) diff --git a/o2web/source/x_component_Template/MPopupForm.js b/o2web/source/x_component_Template/MPopupForm.js index d26024bdf933b838f60d012f5dbd30b4515b31eb..9290bfc8ca77739f2d190db44942f714c92bed55 100644 --- a/o2web/source/x_component_Template/MPopupForm.js +++ b/o2web/source/x_component_Template/MPopupForm.js @@ -106,7 +106,7 @@ var MPopupForm = new Class({ this.data = this.form.getResult(false, this.options.resultSeparator, false, false, true); } this.formTopNode = null; - if(this.setFormNodeSizeFun && this.app ){ + if(this.setFormNodeSizeFun && this.app && this.app.removeEvent){ this.app.removeEvent("resize",this.setFormNodeSizeFun); } if( this.formMaskNode )this.formMaskNode.destroy(); @@ -176,7 +176,7 @@ var MPopupForm = new Class({ this.setFormNodeSize(); this.setFormNodeSizeFun = this.setFormNodeSize.bind(this); - if( this.app )this.app.addEvent("resize", this.setFormNodeSizeFun); + if( this.app && this.app.addEvent )this.app.addEvent("resize", this.setFormNodeSizeFun); if (this.options.draggable && this.formTopNode) { var size = (this.container || this.app.content).getSize(); @@ -462,7 +462,7 @@ var MPopupForm = new Class({ //if( this.form ){ // this.form.destroy(); //} - if(this.setFormNodeSizeFun && this.app ){ + if(this.setFormNodeSizeFun && this.app && this.app.removeEvent ){ this.app.removeEvent("resize",this.setFormNodeSizeFun); } if( this.formMaskNode )this.formMaskNode.destroy(); @@ -479,12 +479,12 @@ var MPopupForm = new Class({ if (data) { this._ok(data, function (json) { if (json.type == "error") { - if( this.app )this.app.notice(json.message, "error"); + if( this.app && this.app.notice )this.app.notice(json.message, "error"); } else { if( this.formMaskNode )this.formMaskNode.destroy(); if( this.formAreaNode )this.formAreaNode.destroy(); if (this.explorer && this.explorer.view)this.explorer.view.reload(); - if( this.app )this.app.notice(this.isNew ? this.lp.createSuccess : this.lp.updateSuccess, "success"); + if( this.app && this.app.notice)this.app.notice(this.isNew ? this.lp.createSuccess : this.lp.updateSuccess, "success"); this.fireEvent("postOk"); } }.bind(this)) diff --git a/o2web/source/x_component_Template/TEST.js b/o2web/source/x_component_Template/TEST.js index 4d6b3e07fd4371360b9c26c63a9176739c9d59e5..acb5d194876d04ade0a4d3db14942449a2674309 100644 --- a/o2web/source/x_component_Template/TEST.js +++ b/o2web/source/x_component_Template/TEST.js @@ -1,532 +1,29 @@ -print( "积分分发:------------------------------------------" ); -var Config = { - personPointCategoryAlias : "积分-个人积分", - unitPointCategoryAlias : "积分-部门积分", - pointLogCategoryAlias : "积分-积分记录", - query : "pointManagerQuery", - unitPointView : "unitPointView", - companyLevel : 1, - departmentLevel_1 : 2 -}; - -var _self = this; -var applications = this.Action.applications; - -var Utils = { - getUserFlag : function( json ){ - return json.flag || json.distinguishedName || json.unique || json.employee || json.mobile || json.id; - }, - getKeyEqualObjFromArray : function( sourceArray, sourceKey, value ){ - for( var i=0; i 0 ){ - this.profileId = json.data.grid[0].bundle; - }else{ - this.profileId = null; - this.profile = null; - } - } - if( this.profileId ){ - var o1 = applications.getQuery('x_cms_assemble_control', "data/document/"+this.profileId ); //只获取数据 - var json1 = Utils.parseResp( o1 ); - this.profile = json1.data; - } - return this.profile; -}; -UPD.prototype.saveProfile = function( data ){ - // data = { - // pointType - // getedPoint - // projectText - // } - this.getProfile(); - if( !this.profile ){ - this.createProfile( data ); - }else{ - this.updateProfile( data ); - } -}; -UPD.prototype.createProfile = function( data ){ - var categoryData = this.getCategory(); - var doc = { - //"id" : this.documentAction.getUUID(), - "isNewDocument" : true, - "title": this.unitDn.split("@")[0]+"部门积分", - "creatorIdentity": this.identityDn, - "appId" : categoryData.appId, - "attachmentList" : [], - "form" : categoryData.formId, - "formName" :categoryData.formName, - //"docStatus" : "draft", - "categoryName" : categoryData.name || categoryData.categoryName, - "categoryId" : categoryData.id, - "categoryAlias" : Config.unitPointCategoryAlias, - "docData" : { - "unit" : this.unit, - "unitDn" : this.unitDn, - "annualPoint" : data.getedPoint, - "permanentPoint" : data.getedPoint, - "currentYear" : this.currentYear, - "currentMonth" : this.currentMonth, - "companyDn" : Org.getSuperUnitByLevel( this.unitDn, Config.companyLevel ) - } - }; - this.updatePointTypeData( doc.docData, data, true, true ); - var o = applications.putQuery('x_cms_assemble_control', "document/publish/content", JSON.stringify(doc) ); - var json = Utils.parseResp( o ); - this.profileId = json.data.id; -}; -UPD.prototype.updateProfile = function( data, operation ){ //只保存数据 - var doc = this.profile; - var isCurrentMonth = doc.currentMonth === this.currentMonth; - if( !isCurrentMonth ){ - doc.annualPoint_preMonth = doc.annualPoint || 0; - doc.permanentPoint_preMonth = doc.permanentPoint || 0; - doc.currentMonth = this.currentMonth; - doc.preMonth = this.preMonth; - } - - doc.permanentPoint = ( doc.permanentPoint ? parseInt( doc.permanentPoint ) : 0 ) + parseInt( data.getedPoint ); - if( parseInt(doc.currentYear) !== this.currentYear ){ - doc.annualPoint = data.getedPoint; - this.updatePointTypeData( doc, data, false, isCurrentMonth ); - doc.currentYear = this.currentYear; - }else{ - doc.annualPoint = ( doc.annualPoint ? parseInt( doc.annualPoint ) : 0 ) + parseInt( data.getedPoint ); - this.updatePointTypeData( doc, data, true, isCurrentMonth ); - } - var o = applications.putQuery('x_cms_assemble_control', "data/document/"+this.profileId, JSON.stringify(doc) ); - var json = Utils.parseResp( o ); -}; -UPD.prototype.updatePointTypeData = function( docData, data, isCurrentYear, isCurrentMonth ){ - var typeJson = docData[ "typeJson" ] = docData[ "typeJson" ] || {}; - var typeData = typeJson[ data.pointType ] = typeJson[ data.pointType ] || {}; - this.updatePoint( typeData, data.getedPoint, isCurrentYear, isCurrentMonth ); - this.updateProjectData( typeData, data, isCurrentYear, isCurrentMonth ) -}; -UPD.prototype.updateProjectData = function( typeData, data, isCurrentYear, isCurrentMonth ){ - var projectJson = typeData[ "projectJson" ] = typeData[ "projectJson" ] || {}; - var projectData = projectJson[ data.projectText ] = projectJson[ data.projectText ] || {}; - this.updatePoint( projectData, data.getedPoint, isCurrentYear, isCurrentMonth ); -}; -UPD.prototype.updatePoint = function( d, getedPoint, isCurrentYear, isCurrentMonth ){ - var point = parseInt(data.getedPoint); - if( !isCurrentMonth ){ - //if( !isCurrentYear ){ - // d.annualPoint_preMonth = d.annualPoint || 0; - //}else{ - // d.annualPoint_preMonth = 0; - //} - d.annualPoint_preMonth = d.annualPoint || 0; - d.permanentPoint_preMonth = d.permanentPoint || 0; - } - if( !isCurrentYear ){ - d.annualPoint = point; - }else{ - d.annualPoint = ( d.annualPoint ? parseInt( d.annualPoint ) : 0 ) + point; - } - d.permanentPoint = ( d.permanentPoint ? parseInt( d.permanentPoint ) : 0 ) + point; -}; -//部门积分分发 end:------------------------------------------" -print( "部门积分分发 end:------------------------------------------" ); - - -print( "积分记录 start:------------------------------------------" ); -//"积分记录 start:------------------------------------------" -var PointLog = { - getCategory : function(){ - if( !_self.unitPointCategory ){ - var o = applications.putQuery('x_cms_assemble_control', "categoryinfo/alias/" + Config.pointLogCategoryAlias ); - var json = Utils.parseResp( o ); - _self.unitPointCategory = json.data; - } - return _self.unitPointCategory; - }, - saveDoc : function( data, identity, unit, company ){ - var identityDn = Utils.typeOf( identity ) === "string" ? identity : identity.distinguishedName; - var personDn, unitDn, companyDn; - - if( Utils.typeOf( identity ) === "object" )personDn = identity.person; - if( !personDn ){ - var personList = _self.org.listPersonWithIdentity( identity ); - if( personList && personList.length > 0 )personDn = personList[0].distinguishedName; - } - - if( unit ){ - unitDn = Utils.typeOf( unit ) === "string" ? unit : unit.distinguishedName; - }else{ - unit = _self.org.getUnitByIdentity( identityDn, Config.departmentLevel_1 ); - if(unit && unit.length > 0)unitDn = unit[0].distinguishedName - } - - if( company ) { - companyDn = Utils.typeOf(company) === "string" ? company : company.distinguishedName; - }else{ - company = _self.org.getUnitByIdentity( identityDn, Config.companyLevel ); - if(company && company.length > 0)companyDn = company[0].distinguishedName; - } - - var Date = Java.type( "java.util.Date" ); - var nowStr = new java.text.SimpleDateFormat("yyyy-MM-dd").format(new Date()); - - var categoryData = PointLog.getCategory(); - var doc = { - //"id" : this.documentAction.getUUID(), - "isNewDocument" : true, - "title": "积分记录", - "creatorIdentity": identityDn, - "appId" : categoryData.appId, - "attachmentList" : [], - "form" : categoryData.formId, - "formName" :categoryData.formName, - //"docStatus" : "draft", - "categoryName" : categoryData.name || categoryData.categoryName, - "categoryId" : categoryData.id, - "categoryAlias" : Config.unitPointCategoryAlias, - "docData" : { - "personDn" : personDn, - "unitDn" : unitDn, - "companyDn" : companyDn, - "projectText" : data.projectText, - "projectName" : data.projectName, - "getedPoint" : "getedPoint", - "date" : nowStr } - }; - var o = applications.putQuery('x_cms_assemble_control', "document/publish/content", JSON.stringify(doc) ); - var json = Utils.parseResp( o ); - this.profileId = json.data.id; - } -}; -//"积分记录 end:------------------------------------------" -print( "积分记录 end:------------------------------------------" ) - -this.define("dispachPersonFlow", function(){ - var identityDn = this.workContext.getWork().creatorIdentity; - - var ppd = new PersonPointDispatch( identityDn ); - ppd.saveProfile( { - pointType : this.data.pointType, - projectText : this.data.projectText, - getedPoint : this.data.getedPoint - }); + }) + }, this.app); + this.dateGrid.load(); +}) - var upd = new UnitPointDispatch( identityDn ); - upd.saveProfile({ - pointType : this.data.pointType, - projectText : this.data.projectText, - getedPoint : this.data.getedPoint - }); - PointLog.saveDoc({ - pointType : this.data.pointType, - projectText : this.data.projectText, - getedPoint : this.data.getedPoint - }, identityDn ) -}.bind(this)); \ No newline at end of file diff --git a/o2web/source/x_component_Template/framework/xlsx/xlsx.core.js b/o2web/source/x_component_Template/framework/xlsx/xlsx.core.js new file mode 100644 index 0000000000000000000000000000000000000000..5a5c1415f0c6972a71ef69316502264d96aee9c3 --- /dev/null +++ b/o2web/source/x_component_Template/framework/xlsx/xlsx.core.js @@ -0,0 +1,15 @@ +/* xlsx.js (C) 2013-2015 SheetJS -- http://sheetjs.com */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSZip=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}output=output+_keyStr.charAt(enc1)+_keyStr.charAt(enc2)+_keyStr.charAt(enc3)+_keyStr.charAt(enc4)}return output};exports.decode=function(input,utf8){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2)}if(enc4!=64){output=output+String.fromCharCode(chr3)}}return output}},{}],2:[function(_dereq_,module,exports){"use strict";function CompressedObject(){this.compressedSize=0;this.uncompressedSize=0;this.crc32=0;this.compressionMethod=null;this.compressedContent=null}CompressedObject.prototype={getContent:function(){return null},getCompressedContent:function(){return null}};module.exports=CompressedObject},{}],3:[function(_dereq_,module,exports){"use strict";exports.STORE={magic:"\0\0",compress:function(content){return content},uncompress:function(content){return content},compressInputType:null,uncompressInputType:null};exports.DEFLATE=_dereq_("./flate")},{"./flate":8}],4:[function(_dereq_,module,exports){"use strict";var utils=_dereq_("./utils");var table=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];module.exports=function crc32(input,crc){if(typeof input==="undefined"||!input.length){return 0}var isArray=utils.getTypeOf(input)!=="string";if(typeof crc=="undefined"){crc=0}var x=0;var y=0;var b=0;crc=crc^-1;for(var i=0,iTop=input.length;i>>8^x}return crc^-1}},{"./utils":21}],5:[function(_dereq_,module,exports){"use strict";var utils=_dereq_("./utils");function DataReader(data){this.data=null;this.length=0;this.index=0}DataReader.prototype={checkOffset:function(offset){this.checkIndex(this.index+offset)},checkIndex:function(newIndex){if(this.length=this.index;i--){result=(result<<8)+this.byteAt(i)}this.index+=size;return result},readString:function(size){return utils.transformTo("string",this.readData(size))},readData:function(size){},lastIndexOfSignature:function(sig){},readDate:function(){var dostime=this.readInt(4);return new Date((dostime>>25&127)+1980,(dostime>>21&15)-1,dostime>>16&31,dostime>>11&31,dostime>>5&63,(dostime&31)<<1)}};module.exports=DataReader},{"./utils":21}],6:[function(_dereq_,module,exports){"use strict";exports.base64=false;exports.binary=false;exports.dir=false;exports.createFolders=false;exports.date=null;exports.compression=null;exports.comment=null},{}],7:[function(_dereq_,module,exports){"use strict";var utils=_dereq_("./utils");exports.string2binary=function(str){return utils.string2binary(str)};exports.string2Uint8Array=function(str){return utils.transformTo("uint8array",str)};exports.uint8Array2String=function(array){return utils.transformTo("string",array)};exports.string2Blob=function(str){var buffer=utils.transformTo("arraybuffer",str);return utils.arrayBuffer2Blob(buffer)};exports.arrayBuffer2Blob=function(buffer){return utils.arrayBuffer2Blob(buffer)};exports.transformTo=function(outputType,input){return utils.transformTo(outputType,input)};exports.getTypeOf=function(input){return utils.getTypeOf(input)};exports.checkSupport=function(type){return utils.checkSupport(type)};exports.MAX_VALUE_16BITS=utils.MAX_VALUE_16BITS;exports.MAX_VALUE_32BITS=utils.MAX_VALUE_32BITS;exports.pretty=function(str){return utils.pretty(str)};exports.findCompression=function(compressionMethod){return utils.findCompression(compressionMethod)};exports.isRegExp=function(object){return utils.isRegExp(object)}},{"./utils":21}],8:[function(_dereq_,module,exports){"use strict";var USE_TYPEDARRAY=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Uint32Array!=="undefined";var pako=_dereq_("pako");exports.uncompressInputType=USE_TYPEDARRAY?"uint8array":"array";exports.compressInputType=USE_TYPEDARRAY?"uint8array":"array";exports.magic="\b\0";exports.compress=function(input){return pako.deflateRaw(input)};exports.uncompress=function(input){return pako.inflateRaw(input)}},{pako:24}],9:[function(_dereq_,module,exports){"use strict";var base64=_dereq_("./base64");function JSZip(data,options){if(!(this instanceof JSZip))return new JSZip(data,options);this.files={};this.comment=null;this.root="";if(data){this.load(data,options)}this.clone=function(){var newObj=new JSZip;for(var i in this){if(typeof this[i]!=="function"){newObj[i]=this[i]}}return newObj}}JSZip.prototype=_dereq_("./object");JSZip.prototype.load=_dereq_("./load");JSZip.support=_dereq_("./support");JSZip.defaults=_dereq_("./defaults");JSZip.utils=_dereq_("./deprecatedPublicUtils");JSZip.base64={encode:function(input){return base64.encode(input)},decode:function(input){return base64.decode(input)}};JSZip.compressions=_dereq_("./compressions");module.exports=JSZip},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(_dereq_,module,exports){"use strict";var base64=_dereq_("./base64");var ZipEntries=_dereq_("./zipEntries");module.exports=function(data,options){var files,zipEntries,i,input;options=options||{};if(options.base64){data=base64.decode(data)}zipEntries=new ZipEntries(data,options);files=zipEntries.files;for(i=0;i>>8}return hex};var extend=function(){var result={},i,attr;for(i=0;i0?path.substring(0,lastSlash):""};var folderAdd=function(name,createFolders){if(name.slice(-1)!="/"){name+="/"}createFolders=typeof createFolders!=="undefined"?createFolders:false;if(!this.files[name]){fileAdd.call(this,name,null,{dir:true,createFolders:createFolders})}return this.files[name]};var generateCompressedObjectFrom=function(file,compression){var result=new CompressedObject,content;if(file._data instanceof CompressedObject){result.uncompressedSize=file._data.uncompressedSize;result.crc32=file._data.crc32;if(result.uncompressedSize===0||file.dir){compression=compressions["STORE"];result.compressedContent="";result.crc32=0}else if(file._data.compressionMethod===compression.magic){result.compressedContent=file._data.getCompressedContent()}else{content=file._data.getContent();result.compressedContent=compression.compress(utils.transformTo(compression.compressInputType,content))}}else{content=getBinaryData(file);if(!content||content.length===0||file.dir){compression=compressions["STORE"];content=""}result.uncompressedSize=content.length;result.crc32=crc32(content);result.compressedContent=compression.compress(utils.transformTo(compression.compressInputType,content))}result.compressedSize=result.compressedContent.length;result.compressionMethod=compression.magic;return result};var generateZipParts=function(name,file,compressedObject,offset){var data=compressedObject.compressedContent,utfEncodedFileName=utils.transformTo("string",utf8.utf8encode(file.name)),comment=file.comment||"",utfEncodedComment=utils.transformTo("string",utf8.utf8encode(comment)),useUTF8ForFileName=utfEncodedFileName.length!==file.name.length,useUTF8ForComment=utfEncodedComment.length!==comment.length,o=file.options,dosTime,dosDate,extraFields="",unicodePathExtraField="",unicodeCommentExtraField="",dir,date;if(file._initialMetadata.dir!==file.dir){dir=file.dir}else{dir=o.dir}if(file._initialMetadata.date!==file.date){date=file.date}else{date=o.date}dosTime=date.getHours();dosTime=dosTime<<6;dosTime=dosTime|date.getMinutes();dosTime=dosTime<<5;dosTime=dosTime|date.getSeconds()/2;dosDate=date.getFullYear()-1980;dosDate=dosDate<<4;dosDate=dosDate|date.getMonth()+1;dosDate=dosDate<<5;dosDate=dosDate|date.getDate();if(useUTF8ForFileName){unicodePathExtraField=decToHex(1,1)+decToHex(crc32(utfEncodedFileName),4)+utfEncodedFileName;extraFields+="up"+decToHex(unicodePathExtraField.length,2)+unicodePathExtraField}if(useUTF8ForComment){unicodeCommentExtraField=decToHex(1,1)+decToHex(this.crc32(utfEncodedComment),4)+utfEncodedComment;extraFields+="uc"+decToHex(unicodeCommentExtraField.length,2)+unicodeCommentExtraField}var header="";header+="\n\0";header+=useUTF8ForFileName||useUTF8ForComment?"\0\b":"\0\0";header+=compressedObject.compressionMethod;header+=decToHex(dosTime,2);header+=decToHex(dosDate,2);header+=decToHex(compressedObject.crc32,4);header+=decToHex(compressedObject.compressedSize,4);header+=decToHex(compressedObject.uncompressedSize,4);header+=decToHex(utfEncodedFileName.length,2);header+=decToHex(extraFields.length,2);var fileRecord=signature.LOCAL_FILE_HEADER+header+utfEncodedFileName+extraFields;var dirRecord=signature.CENTRAL_FILE_HEADER+"\0"+header+decToHex(utfEncodedComment.length,2)+"\0\0"+"\0\0"+(dir===true?"\0\0\0":"\0\0\0\0")+decToHex(offset,4)+utfEncodedFileName+extraFields+utfEncodedComment;return{fileRecord:fileRecord,dirRecord:dirRecord,compressedObject:compressedObject}};var out={load:function(stream,options){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(search){var result=[],filename,relativePath,file,fileClone;for(filename in this.files){if(!this.files.hasOwnProperty(filename)){continue}file=this.files[filename];fileClone=new ZipObject(file.name,file._data,extend(file.options));relativePath=filename.slice(this.root.length,filename.length);if(filename.slice(0,this.root.length)===this.root&&search(relativePath,fileClone)){result.push(fileClone)}}return result},file:function(name,data,o){if(arguments.length===1){if(utils.isRegExp(name)){var regexp=name;return this.filter(function(relativePath,file){return!file.dir&®exp.test(relativePath)})}else{return this.filter(function(relativePath,file){return!file.dir&&relativePath===name})[0]||null}}else{name=this.root+name;fileAdd.call(this,name,data,o)}return this},folder:function(arg){if(!arg){return this}if(utils.isRegExp(arg)){return this.filter(function(relativePath,file){return file.dir&&arg.test(relativePath)})}var name=this.root+arg;var newFolder=folderAdd.call(this,name);var ret=this.clone();ret.root=newFolder.name;return ret},remove:function(name){name=this.root+name;var file=this.files[name];if(!file){if(name.slice(-1)!="/"){name+="/"}file=this.files[name]}if(file&&!file.dir){delete this.files[name]}else{var kids=this.filter(function(relativePath,file){return file.name.slice(0,name.length)===name});for(var i=0;i=0;--i){if(this.data[i]===sig0&&this.data[i+1]===sig1&&this.data[i+2]===sig2&&this.data[i+3]===sig3){return i}}return-1};Uint8ArrayReader.prototype.readData=function(size){this.checkOffset(size);if(size===0){return new Uint8Array(0)}var result=this.data.subarray(this.index,this.index+size);this.index+=size;return result};module.exports=Uint8ArrayReader},{"./dataReader":5}],19:[function(_dereq_,module,exports){"use strict";var utils=_dereq_("./utils");var Uint8ArrayWriter=function(length){this.data=new Uint8Array(length);this.index=0};Uint8ArrayWriter.prototype={append:function(input){if(input.length!==0){input=utils.transformTo("uint8array",input);this.data.set(input,this.index);this.index+=input.length}},finalize:function(){return this.data}};module.exports=Uint8ArrayWriter},{"./utils":21}],20:[function(_dereq_,module,exports){"use strict";var utils=_dereq_("./utils");var support=_dereq_("./support");var nodeBuffer=_dereq_("./nodeBuffer");var _utf8len=new Array(256);for(var i=0;i<256;i++){_utf8len[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1}_utf8len[254]=_utf8len[254]=1;var string2buf=function(str){var buf,c,c2,m_pos,i,str_len=str.length,buf_len=0;for(m_pos=0;m_pos>>6;buf[i++]=128|c&63}else if(c<65536){buf[i++]=224|c>>>12;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}else{buf[i++]=240|c>>>18;buf[i++]=128|c>>>12&63;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}}return buf};var utf8border=function(buf,max){var pos;max=max||buf.length;if(max>buf.length){max=buf.length}pos=max-1;while(pos>=0&&(buf[pos]&192)===128){pos--}if(pos<0){return max}if(pos===0){return max}return pos+_utf8len[buf[pos]]>max?pos:max};var buf2string=function(buf){var str,i,out,c,c_len;var len=buf.length;var utf16buf=new Array(len*2);for(out=0,i=0;i4){utf16buf[out++]=65533;i+=c_len-1;continue}c&=c_len===2?31:c_len===3?15:7;while(c_len>1&&i1){utf16buf[out++]=65533;continue}if(c<65536){utf16buf[out++]=c}else{c-=65536;utf16buf[out++]=55296|c>>10&1023;utf16buf[out++]=56320|c&1023}}if(utf16buf.length!==out){if(utf16buf.subarray){utf16buf=utf16buf.subarray(0,out)}else{utf16buf.length=out}}return utils.applyFromCharCode(utf16buf)};exports.utf8encode=function utf8encode(str){if(support.nodebuffer){return nodeBuffer(str,"utf-8")}return string2buf(str)};exports.utf8decode=function utf8decode(buf){if(support.nodebuffer){return utils.transformTo("nodebuffer",buf).toString("utf-8")}buf=utils.transformTo(support.uint8array?"uint8array":"array",buf);var result=[],k=0,len=buf.length,chunk=65536;while(k1){try{if(type==="array"||type==="nodebuffer"){result.push(String.fromCharCode.apply(null,array.slice(k,Math.min(k+chunk,len))))}else{result.push(String.fromCharCode.apply(null,array.subarray(k,Math.min(k+chunk,len))))}k+=chunk}catch(e){chunk=Math.floor(chunk/2)}}return result.join("")}exports.applyFromCharCode=arrayLikeToString;function arrayLikeToArrayLike(arrayFrom,arrayTo){for(var i=0;i1){throw new Error("Multi-volumes zip are not supported")}},readLocalFiles:function(){var i,file;for(i=0;i0){opt.windowBits=-opt.windowBits}else if(opt.gzip&&opt.windowBits>0&&opt.windowBits<16){opt.windowBits+=16}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new zstream;this.strm.avail_out=0;var status=zlib_deflate.deflateInit2(this.strm,opt.level,opt.method,opt.windowBits,opt.memLevel,opt.strategy);if(status!==Z_OK){throw new Error(msg[status])}if(opt.header){zlib_deflate.deflateSetHeader(this.strm,opt.header)}};Deflate.prototype.push=function(data,mode){var strm=this.strm;var chunkSize=this.options.chunkSize;var status,_mode;if(this.ended){return false}_mode=mode===~~mode?mode:mode===true?Z_FINISH:Z_NO_FLUSH;if(typeof data==="string"){strm.input=strings.string2buf(data)}else{strm.input=data}strm.next_in=0;strm.avail_in=strm.input.length;do{if(strm.avail_out===0){strm.output=new utils.Buf8(chunkSize);strm.next_out=0;strm.avail_out=chunkSize}status=zlib_deflate.deflate(strm,_mode);if(status!==Z_STREAM_END&&status!==Z_OK){this.onEnd(status);this.ended=true;return false}if(strm.avail_out===0||strm.avail_in===0&&_mode===Z_FINISH){if(this.options.to==="string"){this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output,strm.next_out)))}else{this.onData(utils.shrinkBuf(strm.output,strm.next_out))}}}while((strm.avail_in>0||strm.avail_out===0)&&status!==Z_STREAM_END);if(_mode===Z_FINISH){status=zlib_deflate.deflateEnd(this.strm);this.onEnd(status);this.ended=true;return status===Z_OK}return true};Deflate.prototype.onData=function(chunk){this.chunks.push(chunk)};Deflate.prototype.onEnd=function(status){if(status===Z_OK){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=utils.flattenChunks(this.chunks)}}this.chunks=[];this.err=status;this.msg=this.strm.msg};function deflate(input,options){var deflator=new Deflate(options);deflator.push(input,true);if(deflator.err){throw deflator.msg}return deflator.result}function deflateRaw(input,options){options=options||{};options.raw=true;return deflate(input,options)}function gzip(input,options){options=options||{};options.gzip=true;return deflate(input,options)}exports.Deflate=Deflate;exports.deflate=deflate;exports.deflateRaw=deflateRaw;exports.gzip=gzip},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(_dereq_,module,exports){"use strict";var zlib_inflate=_dereq_("./zlib/inflate.js");var utils=_dereq_("./utils/common");var strings=_dereq_("./utils/strings");var c=_dereq_("./zlib/constants");var msg=_dereq_("./zlib/messages");var zstream=_dereq_("./zlib/zstream");var gzheader=_dereq_("./zlib/gzheader");var Inflate=function(options){this.options=utils.assign({chunkSize:16384,windowBits:0,to:""},options||{});var opt=this.options;if(opt.raw&&opt.windowBits>=0&&opt.windowBits<16){opt.windowBits=-opt.windowBits;if(opt.windowBits===0){opt.windowBits=-15}}if(opt.windowBits>=0&&opt.windowBits<16&&!(options&&options.windowBits)){opt.windowBits+=32}if(opt.windowBits>15&&opt.windowBits<48){if((opt.windowBits&15)===0){opt.windowBits|=15}}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new zstream;this.strm.avail_out=0;var status=zlib_inflate.inflateInit2(this.strm,opt.windowBits);if(status!==c.Z_OK){throw new Error(msg[status])}this.header=new gzheader;zlib_inflate.inflateGetHeader(this.strm,this.header)};Inflate.prototype.push=function(data,mode){var strm=this.strm;var chunkSize=this.options.chunkSize;var status,_mode;var next_out_utf8,tail,utf8str;if(this.ended){return false}_mode=mode===~~mode?mode:mode===true?c.Z_FINISH:c.Z_NO_FLUSH;if(typeof data==="string"){strm.input=strings.binstring2buf(data)}else{strm.input=data}strm.next_in=0;strm.avail_in=strm.input.length;do{if(strm.avail_out===0){strm.output=new utils.Buf8(chunkSize);strm.next_out=0;strm.avail_out=chunkSize}status=zlib_inflate.inflate(strm,c.Z_NO_FLUSH);if(status!==c.Z_STREAM_END&&status!==c.Z_OK){this.onEnd(status);this.ended=true;return false}if(strm.next_out){if(strm.avail_out===0||status===c.Z_STREAM_END||strm.avail_in===0&&_mode===c.Z_FINISH){if(this.options.to==="string"){next_out_utf8=strings.utf8border(strm.output,strm.next_out);tail=strm.next_out-next_out_utf8;utf8str=strings.buf2string(strm.output,next_out_utf8);strm.next_out=tail;strm.avail_out=chunkSize-tail;if(tail){utils.arraySet(strm.output,strm.output,next_out_utf8,tail,0)}this.onData(utf8str)}else{this.onData(utils.shrinkBuf(strm.output,strm.next_out))}}}}while(strm.avail_in>0&&status!==c.Z_STREAM_END);if(status===c.Z_STREAM_END){_mode=c.Z_FINISH}if(_mode===c.Z_FINISH){status=zlib_inflate.inflateEnd(this.strm);this.onEnd(status);this.ended=true;return status===c.Z_OK}return true};Inflate.prototype.onData=function(chunk){this.chunks.push(chunk)};Inflate.prototype.onEnd=function(status){if(status===c.Z_OK){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=utils.flattenChunks(this.chunks)}}this.chunks=[];this.err=status;this.msg=this.strm.msg};function inflate(input,options){var inflator=new Inflate(options);inflator.push(input,true);if(inflator.err){throw inflator.msg}return inflator.result}function inflateRaw(input,options){options=options||{};options.raw=true;return inflate(input,options)}exports.Inflate=Inflate;exports.inflate=inflate;exports.inflateRaw=inflateRaw;exports.ungzip=inflate},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(_dereq_,module,exports){"use strict";var TYPED_OK=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Int32Array!=="undefined";exports.assign=function(obj){var sources=Array.prototype.slice.call(arguments,1);while(sources.length){var source=sources.shift();if(!source){continue}if(typeof source!=="object"){throw new TypeError(source+"must be non-object")}for(var p in source){if(source.hasOwnProperty(p)){obj[p]=source[p]}}}return obj};exports.shrinkBuf=function(buf,size){if(buf.length===size){return buf}if(buf.subarray){return buf.subarray(0,size)}buf.length=size;return buf};var fnTyped={arraySet:function(dest,src,src_offs,len,dest_offs){if(src.subarray&&dest.subarray){dest.set(src.subarray(src_offs,src_offs+len),dest_offs);return}for(var i=0;i=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1}_utf8len[254]=_utf8len[254]=1;exports.string2buf=function(str){var buf,c,c2,m_pos,i,str_len=str.length,buf_len=0;for(m_pos=0;m_pos>>6;buf[i++]=128|c&63}else if(c<65536){buf[i++]=224|c>>>12;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}else{buf[i++]=240|c>>>18;buf[i++]=128|c>>>12&63;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}}return buf};function buf2binstring(buf,len){if(len<65537){if(buf.subarray&&STR_APPLY_UIA_OK||!buf.subarray&&STR_APPLY_OK){return String.fromCharCode.apply(null,utils.shrinkBuf(buf,len))}}var result="";for(var i=0;i4){utf16buf[out++]=65533;i+=c_len-1;continue}c&=c_len===2?31:c_len===3?15:7;while(c_len>1&&i1){utf16buf[out++]=65533;continue}if(c<65536){utf16buf[out++]=c}else{c-=65536;utf16buf[out++]=55296|c>>10&1023;utf16buf[out++]=56320|c&1023}}return buf2binstring(utf16buf,out)};exports.utf8border=function(buf,max){var pos;max=max||buf.length;if(max>buf.length){max=buf.length}pos=max-1;while(pos>=0&&(buf[pos]&192)===128){pos--}if(pos<0){return max}if(pos===0){return max}return pos+_utf8len[buf[pos]]>max?pos:max}},{"./common":27}],29:[function(_dereq_,module,exports){"use strict";function adler32(adler,buf,len,pos){var s1=adler&65535|0,s2=adler>>>16&65535|0,n=0;while(len!==0){n=len>2e3?2e3:len;len-=n;do{s1=s1+buf[pos++]|0;s2=s2+s1|0}while(--n);s1%=65521;s2%=65521}return s1|s2<<16|0}module.exports=adler32},{}],30:[function(_dereq_,module,exports){module.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(_dereq_,module,exports){"use strict";function makeTable(){var c,table=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++){c=c&1?3988292384^c>>>1:c>>>1}table[n]=c}return table}var crcTable=makeTable();function crc32(crc,buf,len,pos){var t=crcTable,end=pos+len;crc=crc^-1;for(var i=pos;i>>8^t[(crc^buf[i])&255]}return crc^-1}module.exports=crc32},{}],32:[function(_dereq_,module,exports){"use strict";var utils=_dereq_("../utils/common");var trees=_dereq_("./trees");var adler32=_dereq_("./adler32");var crc32=_dereq_("./crc32");var msg=_dereq_("./messages");var Z_NO_FLUSH=0;var Z_PARTIAL_FLUSH=1;var Z_FULL_FLUSH=3;var Z_FINISH=4;var Z_BLOCK=5;var Z_OK=0;var Z_STREAM_END=1;var Z_STREAM_ERROR=-2;var Z_DATA_ERROR=-3;var Z_BUF_ERROR=-5;var Z_DEFAULT_COMPRESSION=-1;var Z_FILTERED=1;var Z_HUFFMAN_ONLY=2;var Z_RLE=3;var Z_FIXED=4;var Z_DEFAULT_STRATEGY=0;var Z_UNKNOWN=2;var Z_DEFLATED=8;var MAX_MEM_LEVEL=9;var MAX_WBITS=15;var DEF_MEM_LEVEL=8;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var MIN_MATCH=3;var MAX_MATCH=258;var MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1;var PRESET_DICT=32;var INIT_STATE=42;var EXTRA_STATE=69;var NAME_STATE=73;var COMMENT_STATE=91;var HCRC_STATE=103;var BUSY_STATE=113;var FINISH_STATE=666;var BS_NEED_MORE=1;var BS_BLOCK_DONE=2;var BS_FINISH_STARTED=3;var BS_FINISH_DONE=4;var OS_CODE=3;function err(strm,errorCode){strm.msg=msg[errorCode];return errorCode}function rank(f){return(f<<1)-(f>4?9:0)}function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}function flush_pending(strm){var s=strm.state;var len=s.pending;if(len>strm.avail_out){len=strm.avail_out}if(len===0){return}utils.arraySet(strm.output,s.pending_buf,s.pending_out,len,strm.next_out);strm.next_out+=len;s.pending_out+=len;strm.total_out+=len;strm.avail_out-=len;s.pending-=len;if(s.pending===0){s.pending_out=0}}function flush_block_only(s,last){trees._tr_flush_block(s,s.block_start>=0?s.block_start:-1,s.strstart-s.block_start,last);s.block_start=s.strstart;flush_pending(s.strm)}function put_byte(s,b){s.pending_buf[s.pending++]=b}function putShortMSB(s,b){s.pending_buf[s.pending++]=b>>>8&255;s.pending_buf[s.pending++]=b&255}function read_buf(strm,buf,start,size){var len=strm.avail_in;if(len>size){len=size}if(len===0){return 0}strm.avail_in-=len;utils.arraySet(buf,strm.input,strm.next_in,len,start);if(strm.state.wrap===1){strm.adler=adler32(strm.adler,buf,len,start)}else if(strm.state.wrap===2){strm.adler=crc32(strm.adler,buf,len,start)}strm.next_in+=len;strm.total_in+=len;return len}function longest_match(s,cur_match){var chain_length=s.max_chain_length;var scan=s.strstart;var match;var len;var best_len=s.prev_length;var nice_match=s.nice_match;var limit=s.strstart>s.w_size-MIN_LOOKAHEAD?s.strstart-(s.w_size-MIN_LOOKAHEAD):0;var _win=s.window;var wmask=s.w_mask;var prev=s.prev;var strend=s.strstart+MAX_MATCH;var scan_end1=_win[scan+best_len-1];var scan_end=_win[scan+best_len];if(s.prev_length>=s.good_match){chain_length>>=2}if(nice_match>s.lookahead){nice_match=s.lookahead}do{match=cur_match;if(_win[match+best_len]!==scan_end||_win[match+best_len-1]!==scan_end1||_win[match]!==_win[scan]||_win[++match]!==_win[scan+1]){continue}scan+=2;match++;do{}while(_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&scanbest_len){s.match_start=cur_match;best_len=len;if(len>=nice_match){break}scan_end1=_win[scan+best_len-1];scan_end=_win[scan+best_len]}}while((cur_match=prev[cur_match&wmask])>limit&&--chain_length!==0);if(best_len<=s.lookahead){return best_len}return s.lookahead}function fill_window(s){var _w_size=s.w_size;var p,n,m,more,str;do{more=s.window_size-s.lookahead-s.strstart;if(s.strstart>=_w_size+(_w_size-MIN_LOOKAHEAD)){utils.arraySet(s.window,s.window,_w_size,_w_size,0);s.match_start-=_w_size;s.strstart-=_w_size;s.block_start-=_w_size;n=s.hash_size;p=n;do{m=s.head[--p];s.head[p]=m>=_w_size?m-_w_size:0}while(--n);n=_w_size;p=n;do{m=s.prev[--p];s.prev[p]=m>=_w_size?m-_w_size:0}while(--n);more+=_w_size}if(s.strm.avail_in===0){break}n=read_buf(s.strm,s.window,s.strstart+s.lookahead,more);s.lookahead+=n;if(s.lookahead+s.insert>=MIN_MATCH){str=s.strstart-s.insert;s.ins_h=s.window[str];s.ins_h=(s.ins_h<s.pending_buf_size-5){max_block_size=s.pending_buf_size-5}for(;;){if(s.lookahead<=1){fill_window(s);if(s.lookahead===0&&flush===Z_NO_FLUSH){return BS_NEED_MORE}if(s.lookahead===0){break}}s.strstart+=s.lookahead;s.lookahead=0;var max_start=s.block_start+max_block_size;if(s.strstart===0||s.strstart>=max_start){s.lookahead=s.strstart-max_start;s.strstart=max_start;flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}if(s.strstart-s.block_start>=s.w_size-MIN_LOOKAHEAD){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.strstart>s.block_start){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_NEED_MORE}function deflate_fast(s,flush){var hash_head;var bflush;for(;;){if(s.lookahead=MIN_MATCH){s.ins_h=(s.ins_h<=MIN_MATCH){bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;if(s.match_length<=s.max_lazy_match&&s.lookahead>=MIN_MATCH){s.match_length--;do{s.strstart++;s.ins_h=(s.ins_h<=MIN_MATCH){s.ins_h=(s.ins_h<4096)){s.match_length=MIN_MATCH-1}}if(s.prev_length>=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH;bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH);s.lookahead-=s.prev_length-1;s.prev_length-=2;do{if(++s.strstart<=max_insert){s.ins_h=(s.ins_h<=MIN_MATCH&&s.strstart>0){scan=s.strstart-1;prev=_win[scan];if(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]){strend=s.strstart+MAX_MATCH;do{}while(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&scans.lookahead){s.match_length=s.lookahead}}}if(s.match_length>=MIN_MATCH){bflush=trees._tr_tally(s,1,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;s.strstart+=s.match_length;s.match_length=0}else{bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++}if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function deflate_huff(s,flush){ + var bflush;for(;;){if(s.lookahead===0){fill_window(s);if(s.lookahead===0){if(flush===Z_NO_FLUSH){return BS_NEED_MORE}break}}s.match_length=0;bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}var Config=function(good_length,max_lazy,nice_length,max_chain,func){this.good_length=good_length;this.max_lazy=max_lazy;this.nice_length=nice_length;this.max_chain=max_chain;this.func=func};var configuration_table;configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];function lm_init(s){s.window_size=2*s.w_size;zero(s.head);s.max_lazy_match=configuration_table[s.level].max_lazy;s.good_match=configuration_table[s.level].good_length;s.nice_match=configuration_table[s.level].nice_length;s.max_chain_length=configuration_table[s.level].max_chain;s.strstart=0;s.block_start=0;s.lookahead=0;s.insert=0;s.match_length=s.prev_length=MIN_MATCH-1;s.match_available=0;s.ins_h=0}function DeflateState(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=Z_DEFLATED;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new utils.Buf16(HEAP_SIZE*2);this.dyn_dtree=new utils.Buf16((2*D_CODES+1)*2);this.bl_tree=new utils.Buf16((2*BL_CODES+1)*2);zero(this.dyn_ltree);zero(this.dyn_dtree);zero(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new utils.Buf16(MAX_BITS+1);this.heap=new utils.Buf16(2*L_CODES+1);zero(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new utils.Buf16(2*L_CODES+1);zero(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function deflateResetKeep(strm){var s;if(!strm||!strm.state){return err(strm,Z_STREAM_ERROR)}strm.total_in=strm.total_out=0;strm.data_type=Z_UNKNOWN;s=strm.state;s.pending=0;s.pending_out=0;if(s.wrap<0){s.wrap=-s.wrap}s.status=s.wrap?INIT_STATE:BUSY_STATE;strm.adler=s.wrap===2?0:1;s.last_flush=Z_NO_FLUSH;trees._tr_init(s);return Z_OK}function deflateReset(strm){var ret=deflateResetKeep(strm);if(ret===Z_OK){lm_init(strm.state)}return ret}function deflateSetHeader(strm,head){if(!strm||!strm.state){return Z_STREAM_ERROR}if(strm.state.wrap!==2){return Z_STREAM_ERROR}strm.state.gzhead=head;return Z_OK}function deflateInit2(strm,level,method,windowBits,memLevel,strategy){if(!strm){return Z_STREAM_ERROR}var wrap=1;if(level===Z_DEFAULT_COMPRESSION){level=6}if(windowBits<0){wrap=0;windowBits=-windowBits}else if(windowBits>15){wrap=2;windowBits-=16}if(memLevel<1||memLevel>MAX_MEM_LEVEL||method!==Z_DEFLATED||windowBits<8||windowBits>15||level<0||level>9||strategy<0||strategy>Z_FIXED){return err(strm,Z_STREAM_ERROR)}if(windowBits===8){windowBits=9}var s=new DeflateState;strm.state=s;s.strm=strm;s.wrap=wrap;s.gzhead=null;s.w_bits=windowBits;s.w_size=1<>1;s.l_buf=(1+2)*s.lit_bufsize;s.level=level;s.strategy=strategy;s.method=method;return deflateReset(strm)}function deflateInit(strm,level){return deflateInit2(strm,level,Z_DEFLATED,MAX_WBITS,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY)}function deflate(strm,flush){var old_flush,s;var beg,val;if(!strm||!strm.state||flush>Z_BLOCK||flush<0){return strm?err(strm,Z_STREAM_ERROR):Z_STREAM_ERROR}s=strm.state;if(!strm.output||!strm.input&&strm.avail_in!==0||s.status===FINISH_STATE&&flush!==Z_FINISH){return err(strm,strm.avail_out===0?Z_BUF_ERROR:Z_STREAM_ERROR)}s.strm=strm;old_flush=s.last_flush;s.last_flush=flush;if(s.status===INIT_STATE){if(s.wrap===2){strm.adler=0;put_byte(s,31);put_byte(s,139);put_byte(s,8);if(!s.gzhead){put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,OS_CODE);s.status=BUSY_STATE}else{put_byte(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(!s.gzhead.extra?0:4)+(!s.gzhead.name?0:8)+(!s.gzhead.comment?0:16));put_byte(s,s.gzhead.time&255);put_byte(s,s.gzhead.time>>8&255);put_byte(s,s.gzhead.time>>16&255);put_byte(s,s.gzhead.time>>24&255);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,s.gzhead.os&255);if(s.gzhead.extra&&s.gzhead.extra.length){put_byte(s,s.gzhead.extra.length&255);put_byte(s,s.gzhead.extra.length>>8&255)}if(s.gzhead.hcrc){strm.adler=crc32(strm.adler,s.pending_buf,s.pending,0)}s.gzindex=0;s.status=EXTRA_STATE}}else{var header=Z_DEFLATED+(s.w_bits-8<<4)<<8;var level_flags=-1;if(s.strategy>=Z_HUFFMAN_ONLY||s.level<2){level_flags=0}else if(s.level<6){level_flags=1}else if(s.level===6){level_flags=2}else{level_flags=3}header|=level_flags<<6;if(s.strstart!==0){header|=PRESET_DICT}header+=31-header%31;s.status=BUSY_STATE;putShortMSB(s,header);if(s.strstart!==0){putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}strm.adler=1}}if(s.status===EXTRA_STATE){if(s.gzhead.extra){beg=s.pending;while(s.gzindex<(s.gzhead.extra.length&65535)){if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){break}}put_byte(s,s.gzhead.extra[s.gzindex]&255);s.gzindex++}if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(s.gzindex===s.gzhead.extra.length){s.gzindex=0;s.status=NAME_STATE}}else{s.status=NAME_STATE}}if(s.status===NAME_STATE){if(s.gzhead.name){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindexbeg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.gzindex=0;s.status=COMMENT_STATE}}else{s.status=COMMENT_STATE}}if(s.status===COMMENT_STATE){if(s.gzhead.comment){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindexbeg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.status=HCRC_STATE}}else{s.status=HCRC_STATE}}if(s.status===HCRC_STATE){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size){flush_pending(strm)}if(s.pending+2<=s.pending_buf_size){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);strm.adler=0;s.status=BUSY_STATE}}else{s.status=BUSY_STATE}}if(s.pending!==0){flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}else if(strm.avail_in===0&&rank(flush)<=rank(old_flush)&&flush!==Z_FINISH){return err(strm,Z_BUF_ERROR)}if(s.status===FINISH_STATE&&strm.avail_in!==0){return err(strm,Z_BUF_ERROR)}if(strm.avail_in!==0||s.lookahead!==0||flush!==Z_NO_FLUSH&&s.status!==FINISH_STATE){var bstate=s.strategy===Z_HUFFMAN_ONLY?deflate_huff(s,flush):s.strategy===Z_RLE?deflate_rle(s,flush):configuration_table[s.level].func(s,flush);if(bstate===BS_FINISH_STARTED||bstate===BS_FINISH_DONE){s.status=FINISH_STATE}if(bstate===BS_NEED_MORE||bstate===BS_FINISH_STARTED){if(strm.avail_out===0){s.last_flush=-1}return Z_OK}if(bstate===BS_BLOCK_DONE){if(flush===Z_PARTIAL_FLUSH){trees._tr_align(s)}else if(flush!==Z_BLOCK){trees._tr_stored_block(s,0,0,false);if(flush===Z_FULL_FLUSH){zero(s.head);if(s.lookahead===0){s.strstart=0;s.block_start=0;s.insert=0}}}flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}}if(flush!==Z_FINISH){return Z_OK}if(s.wrap<=0){return Z_STREAM_END}if(s.wrap===2){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);put_byte(s,strm.adler>>16&255);put_byte(s,strm.adler>>24&255);put_byte(s,strm.total_in&255);put_byte(s,strm.total_in>>8&255);put_byte(s,strm.total_in>>16&255);put_byte(s,strm.total_in>>24&255)}else{putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}flush_pending(strm);if(s.wrap>0){s.wrap=-s.wrap}return s.pending!==0?Z_OK:Z_STREAM_END}function deflateEnd(strm){var status;if(!strm||!strm.state){return Z_STREAM_ERROR}status=strm.state.status;if(status!==INIT_STATE&&status!==EXTRA_STATE&&status!==NAME_STATE&&status!==COMMENT_STATE&&status!==HCRC_STATE&&status!==BUSY_STATE&&status!==FINISH_STATE){return err(strm,Z_STREAM_ERROR)}strm.state=null;return status===BUSY_STATE?err(strm,Z_DATA_ERROR):Z_OK}exports.deflateInit=deflateInit;exports.deflateInit2=deflateInit2;exports.deflateReset=deflateReset;exports.deflateResetKeep=deflateResetKeep;exports.deflateSetHeader=deflateSetHeader;exports.deflate=deflate;exports.deflateEnd=deflateEnd;exports.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(_dereq_,module,exports){"use strict";function GZheader(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name="";this.comment="";this.hcrc=0;this.done=false}module.exports=GZheader},{}],34:[function(_dereq_,module,exports){"use strict";var BAD=30;var TYPE=12;module.exports=function inflate_fast(strm,start){var state;var _in;var last;var _out;var beg;var end;var dmax;var wsize;var whave;var wnext;var window;var hold;var bits;var lcode;var dcode;var lmask;var dmask;var here;var op;var len;var dist;var from;var from_source;var input,output;state=strm.state;_in=strm.next_in;input=strm.input;last=_in+(strm.avail_in-5);_out=strm.next_out;output=strm.output;beg=_out-(start-strm.avail_out);end=_out+(strm.avail_out-257);dmax=state.dmax;wsize=state.wsize;whave=state.whave;wnext=state.wnext;window=state.window;hold=state.hold;bits=state.bits;lcode=state.lencode;dcode=state.distcode;lmask=(1<>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op===0){output[_out++]=here&65535}else if(op&16){len=here&65535;op&=15;if(op){if(bits>>=op;bits-=op}if(bits<15){hold+=input[_in++]<>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op&16){dist=here&65535;op&=15;if(bitsdmax){strm.msg="invalid distance too far back";state.mode=BAD;break top}hold>>>=op;bits-=op;op=_out-beg;if(dist>op){op=dist-op;if(op>whave){if(state.sane){strm.msg="invalid distance too far back";state.mode=BAD;break top}}from=0;from_source=window;if(wnext===0){from+=wsize-op;if(op2){output[_out++]=from_source[from++];output[_out++]=from_source[from++];output[_out++]=from_source[from++];len-=3}if(len){output[_out++]=from_source[from++];if(len>1){output[_out++]=from_source[from++]}}}else{from=_out-dist;do{output[_out++]=output[from++];output[_out++]=output[from++];output[_out++]=output[from++];len-=3}while(len>2);if(len){output[_out++]=output[from++];if(len>1){output[_out++]=output[from++]}}}}else if((op&64)===0){here=dcode[(here&65535)+(hold&(1<>3;_in-=len;bits-=len<<3;hold&=(1<>>24&255)+(q>>>8&65280)+((q&65280)<<8)+((q&255)<<24)}function InflateState(){this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new utils.Buf16(320);this.work=new utils.Buf16(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function inflateResetKeep(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;strm.total_in=strm.total_out=state.total=0;strm.msg="";if(state.wrap){strm.adler=state.wrap&1}state.mode=HEAD;state.last=0;state.havedict=0;state.dmax=32768;state.head=null;state.hold=0;state.bits=0;state.lencode=state.lendyn=new utils.Buf32(ENOUGH_LENS);state.distcode=state.distdyn=new utils.Buf32(ENOUGH_DISTS);state.sane=1;state.back=-1;return Z_OK}function inflateReset(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;state.wsize=0;state.whave=0;state.wnext=0;return inflateResetKeep(strm)}function inflateReset2(strm,windowBits){var wrap;var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;if(windowBits<0){wrap=0;windowBits=-windowBits}else{wrap=(windowBits>>4)+1;if(windowBits<48){windowBits&=15}}if(windowBits&&(windowBits<8||windowBits>15)){return Z_STREAM_ERROR}if(state.window!==null&&state.wbits!==windowBits){state.window=null}state.wrap=wrap;state.wbits=windowBits;return inflateReset(strm)}function inflateInit2(strm,windowBits){var ret;var state;if(!strm){return Z_STREAM_ERROR}state=new InflateState;strm.state=state;state.window=null;ret=inflateReset2(strm,windowBits);if(ret!==Z_OK){strm.state=null}return ret}function inflateInit(strm){return inflateInit2(strm,DEF_WBITS)}var virgin=true;var lenfix,distfix;function fixedtables(state){if(virgin){var sym;lenfix=new utils.Buf32(512);distfix=new utils.Buf32(32);sym=0;while(sym<144){state.lens[sym++]=8}while(sym<256){state.lens[sym++]=9}while(sym<280){state.lens[sym++]=7}while(sym<288){state.lens[sym++]=8}inflate_table(LENS,state.lens,0,288,lenfix,0,state.work,{bits:9});sym=0;while(sym<32){state.lens[sym++]=5}inflate_table(DISTS,state.lens,0,32,distfix,0,state.work,{bits:5});virgin=false}state.lencode=lenfix;state.lenbits=9;state.distcode=distfix;state.distbits=5}function updatewindow(strm,src,end,copy){var dist;var state=strm.state;if(state.window===null){state.wsize=1<=state.wsize){utils.arraySet(state.window,src,end-state.wsize,state.wsize,0);state.wnext=0;state.whave=state.wsize}else{dist=state.wsize-state.wnext;if(dist>copy){dist=copy}utils.arraySet(state.window,src,end-copy,dist,state.wnext);copy-=dist;if(copy){utils.arraySet(state.window,src,end-copy,copy,0);state.wnext=copy;state.whave=state.wsize}else{state.wnext+=dist;if(state.wnext===state.wsize){state.wnext=0}if(state.whave>>8&255;state.check=crc32(state.check,hbuf,2,0);hold=0;bits=0;state.mode=FLAGS;break}state.flags=0;if(state.head){state.head.done=false}if(!(state.wrap&1)||(((hold&255)<<8)+(hold>>8))%31){strm.msg="incorrect header check";state.mode=BAD;break}if((hold&15)!==Z_DEFLATED){strm.msg="unknown compression method";state.mode=BAD;break}hold>>>=4;bits-=4;len=(hold&15)+8;if(state.wbits===0){state.wbits=len}else if(len>state.wbits){strm.msg="invalid window size";state.mode=BAD;break}state.dmax=1<>8&1}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=TIME;case TIME:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>8&255;hbuf[2]=hold>>>16&255;hbuf[3]=hold>>>24&255;state.check=crc32(state.check,hbuf,4,0)}hold=0;bits=0;state.mode=OS;case OS:while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<>8}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=EXLEN;case EXLEN:if(state.flags&1024){while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0}else if(state.head){state.head.extra=null}state.mode=EXTRA;case EXTRA:if(state.flags&1024){copy=state.length;if(copy>have){copy=have}if(copy){if(state.head){len=state.head.extra_len-state.length;if(!state.head.extra){state.head.extra=new Array(state.head.extra_len)}utils.arraySet(state.head.extra,input,next,copy,len)}if(state.flags&512){state.check=crc32(state.check,input,copy,next)}have-=copy;next+=copy;state.length-=copy}if(state.length){break inf_leave}}state.length=0;state.mode=NAME;case NAME:if(state.flags&2048){if(have===0){break inf_leave}copy=0;do{len=input[next+copy++];if(state.head&&len&&state.length<65536){state.head.name+=String.fromCharCode(len)}}while(len&©>9&1;state.head.done=true}strm.adler=state.check=0;state.mode=TYPE;break;case DICTID:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=bits&7;bits-=bits&7;state.mode=CHECK;break}while(bits<3){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=1;bits-=1;switch(hold&3){case 0:state.mode=STORED;break;case 1:fixedtables(state);state.mode=LEN_;if(flush===Z_TREES){hold>>>=2;bits-=2;break inf_leave}break;case 2:state.mode=TABLE;break;case 3:strm.msg="invalid block type";state.mode=BAD}hold>>>=2;bits-=2;break;case STORED:hold>>>=bits&7;bits-=bits&7;while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>16^65535)){strm.msg="invalid stored block lengths";state.mode=BAD;break}state.length=hold&65535;hold=0;bits=0;state.mode=COPY_;if(flush===Z_TREES){break inf_leave}case COPY_:state.mode=COPY;case COPY:copy=state.length;if(copy){if(copy>have){copy=have}if(copy>left){copy=left}if(copy===0){break inf_leave}utils.arraySet(output,input,next,copy,put);have-=copy;next+=copy;left-=copy;put+=copy;state.length-=copy;break}state.mode=TYPE;break;case TABLE:while(bits<14){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=5;bits-=5;state.ndist=(hold&31)+1;hold>>>=5;bits-=5;state.ncode=(hold&15)+4;hold>>>=4;bits-=4;if(state.nlen>286||state.ndist>30){strm.msg="too many length or distance symbols";state.mode=BAD;break}state.have=0;state.mode=LENLENS;case LENLENS:while(state.have>>=3;bits-=3}while(state.have<19){state.lens[order[state.have++]]=0}state.lencode=state.lendyn;state.lenbits=7;opts={bits:state.lenbits};ret=inflate_table(CODES,state.lens,0,19,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg="invalid code lengths set";state.mode=BAD;break}state.have=0;state.mode=CODELENS;case CODELENS:while(state.have>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=here_bits;bits-=here_bits;state.lens[state.have++]=here_val}else{if(here_val===16){n=here_bits+2;while(bits>>=here_bits;bits-=here_bits;if(state.have===0){strm.msg="invalid bit length repeat";state.mode=BAD;break}len=state.lens[state.have-1];copy=3+(hold&3);hold>>>=2;bits-=2}else if(here_val===17){n=here_bits+3;while(bits>>=here_bits;bits-=here_bits;len=0;copy=3+(hold&7);hold>>>=3;bits-=3}else{n=here_bits+7;while(bits>>=here_bits;bits-=here_bits;len=0;copy=11+(hold&127);hold>>>=7;bits-=7}if(state.have+copy>state.nlen+state.ndist){strm.msg="invalid bit length repeat";state.mode=BAD;break}while(copy--){state.lens[state.have++]=len}}}if(state.mode===BAD){break}if(state.lens[256]===0){strm.msg="invalid code -- missing end-of-block";state.mode=BAD;break}state.lenbits=9;opts={bits:state.lenbits};ret=inflate_table(LENS,state.lens,0,state.nlen,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg="invalid literal/lengths set";state.mode=BAD;break}state.distbits=6;state.distcode=state.distdyn;opts={bits:state.distbits};ret=inflate_table(DISTS,state.lens,state.nlen,state.ndist,state.distcode,0,state.work,opts);state.distbits=opts.bits;if(ret){strm.msg="invalid distances set";state.mode=BAD;break}state.mode=LEN_;if(flush===Z_TREES){break inf_leave}case LEN_:state.mode=LEN;case LEN:if(have>=6&&left>=258){strm.next_out=put;strm.avail_out=left;strm.next_in=next;strm.avail_in=have;state.hold=hold;state.bits=bits;inflate_fast(strm,_out);put=strm.next_out;output=strm.output;left=strm.avail_out;next=strm.next_in;input=strm.input;have=strm.avail_in;hold=state.hold;bits=state.bits;if(state.mode===TYPE){state.back=-1}break}state.back=0;for(;;){here=state.lencode[hold&(1<>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;state.length=here_val;if(here_op===0){state.mode=LIT;break}if(here_op&32){state.back=-1;state.mode=TYPE;break}if(here_op&64){strm.msg="invalid literal/length code";state.mode=BAD;break}state.extra=here_op&15;state.mode=LENEXT;case LENEXT:if(state.extra){n=state.extra;while(bits>>=state.extra;bits-=state.extra;state.back+=state.extra}state.was=state.length;state.mode=DIST;case DIST:for(;;){here=state.distcode[hold&(1<>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;if(here_op&64){strm.msg="invalid distance code";state.mode=BAD;break}state.offset=here_val;state.extra=here_op&15;state.mode=DISTEXT;case DISTEXT:if(state.extra){n=state.extra;while(bits>>=state.extra;bits-=state.extra;state.back+=state.extra}if(state.offset>state.dmax){strm.msg="invalid distance too far back";state.mode=BAD;break}state.mode=MATCH;case MATCH:if(left===0){break inf_leave}copy=_out-left;if(state.offset>copy){copy=state.offset-copy;if(copy>state.whave){if(state.sane){strm.msg="invalid distance too far back";state.mode=BAD;break}}if(copy>state.wnext){copy-=state.wnext;from=state.wsize-copy}else{from=state.wnext-copy}if(copy>state.length){copy=state.length}from_source=state.window}else{from_source=output;from=put-state.offset;copy=state.length}if(copy>left){copy=left}left-=copy;state.length-=copy;do{output[put++]=from_source[from++]}while(--copy);if(state.length===0){state.mode=LEN}break;case LIT:if(left===0){break inf_leave}output[put++]=state.length;left--;state.mode=LEN;break;case CHECK:if(state.wrap){while(bits<32){if(have===0){break inf_leave}have--;hold|=input[next++]<=1;max--){if(count[max]!==0){break}}if(root>max){root=max}if(max===0){table[table_index++]=1<<24|64<<16|0;table[table_index++]=1<<24|64<<16|0;opts.bits=1;return 0}for(min=1;min0&&(type===CODES||max!==1)){return-1}offs[1]=0;for(len=1;lenENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}var i=0;for(;;){i++;here_bits=len-drop;if(work[sym]end){here_op=extra[extra_index+work[sym]];here_val=base[base_index+work[sym]]}else{here_op=32+64;here_val=0}incr=1<>drop)+fill]=here_bits<<24|here_op<<16|here_val|0}while(fill!==0);incr=1<>=1}if(incr!==0){huff&=incr-1;huff+=incr}else{huff=0}sym++;if(--count[len]===0){if(len===max){break}len=lens[lens_index+work[sym]]}if(len>root&&(huff&mask)!==low){if(drop===0){drop=root}next+=min;curr=len-drop;left=1<ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}low=huff&mask;table[low]=root<<24|curr<<16|next-table_index|0}}if(huff!==0){table[next+huff]=len-drop<<24|64<<16|0}opts.bits=root;return 0}},{"../utils/common":27}],37:[function(_dereq_,module,exports){"use strict";module.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(_dereq_,module,exports){"use strict";var utils=_dereq_("../utils/common");var Z_FIXED=4;var Z_BINARY=0;var Z_TEXT=1;var Z_UNKNOWN=2;function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}var STORED_BLOCK=0;var STATIC_TREES=1;var DYN_TREES=2;var MIN_MATCH=3;var MAX_MATCH=258;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var Buf_size=16;var MAX_BL_BITS=7;var END_BLOCK=256;var REP_3_6=16;var REPZ_3_10=17;var REPZ_11_138=18;var extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var DIST_CODE_LEN=512;var static_ltree=new Array((L_CODES+2)*2);zero(static_ltree);var static_dtree=new Array(D_CODES*2);zero(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero(_dist_code);var _length_code=new Array(MAX_MATCH-MIN_MATCH+1);zero(_length_code);var base_length=new Array(LENGTH_CODES);zero(base_length);var base_dist=new Array(D_CODES);zero(base_dist);var StaticTreeDesc=function(static_tree,extra_bits,extra_base,elems,max_length){this.static_tree=static_tree;this.extra_bits=extra_bits;this.extra_base=extra_base;this.elems=elems;this.max_length=max_length;this.has_stree=static_tree&&static_tree.length};var static_l_desc;var static_d_desc;var static_bl_desc;var TreeDesc=function(dyn_tree,stat_desc){this.dyn_tree=dyn_tree;this.max_code=0;this.stat_desc=stat_desc};function d_code(dist){return dist<256?_dist_code[dist]:_dist_code[256+(dist>>>7)]}function put_short(s,w){s.pending_buf[s.pending++]=w&255;s.pending_buf[s.pending++]=w>>>8&255}function send_bits(s,value,length){if(s.bi_valid>Buf_size-length){s.bi_buf|=value<>Buf_size-s.bi_valid;s.bi_valid+=length-Buf_size}else{s.bi_buf|=value<>>=1;res<<=1}while(--len>0);return res>>>1}function bi_flush(s){if(s.bi_valid===16){put_short(s,s.bi_buf);s.bi_buf=0;s.bi_valid=0}else if(s.bi_valid>=8){s.pending_buf[s.pending++]=s.bi_buf&255;s.bi_buf>>=8;s.bi_valid-=8}}function gen_bitlen(s,desc){var tree=desc.dyn_tree;var max_code=desc.max_code;var stree=desc.stat_desc.static_tree;var has_stree=desc.stat_desc.has_stree;var extra=desc.stat_desc.extra_bits;var base=desc.stat_desc.extra_base;var max_length=desc.stat_desc.max_length;var h;var n,m;var bits;var xbits;var f;var overflow=0;for(bits=0;bits<=MAX_BITS;bits++){s.bl_count[bits]=0}tree[s.heap[s.heap_max]*2+1]=0;for(h=s.heap_max+1;hmax_length){bits=max_length;overflow++}tree[n*2+1]=bits;if(n>max_code){continue}s.bl_count[bits]++;xbits=0;if(n>=base){xbits=extra[n-base]}f=tree[n*2];s.opt_len+=f*(bits+xbits);if(has_stree){s.static_len+=f*(stree[n*2+1]+xbits)}}if(overflow===0){return}do{bits=max_length-1;while(s.bl_count[bits]===0){bits--}s.bl_count[bits]--;s.bl_count[bits+1]+=2;s.bl_count[max_length]--;overflow-=2}while(overflow>0);for(bits=max_length;bits!==0;bits--){n=s.bl_count[bits];while(n!==0){m=s.heap[--h];if(m>max_code){continue}if(tree[m*2+1]!==bits){s.opt_len+=(bits-tree[m*2+1])*tree[m*2];tree[m*2+1]=bits}n--}}}function gen_codes(tree,max_code,bl_count){var next_code=new Array(MAX_BITS+1);var code=0;var bits;var n;for(bits=1;bits<=MAX_BITS;bits++){next_code[bits]=code=code+bl_count[bits-1]<<1}for(n=0;n<=max_code;n++){var len=tree[n*2+1];if(len===0){continue}tree[n*2]=bi_reverse(next_code[len]++,len)}}function tr_static_init(){var n;var bits;var length;var code;var dist;var bl_count=new Array(MAX_BITS+1);length=0;for(code=0;code>=7;for(;code8){put_short(s,s.bi_buf)}else if(s.bi_valid>0){s.pending_buf[s.pending++]=s.bi_buf}s.bi_buf=0;s.bi_valid=0}function copy_block(s,buf,len,header){bi_windup(s);if(header){put_short(s,len);put_short(s,~len)}utils.arraySet(s.pending_buf,s.window,buf,len,s.pending);s.pending+=len}function smaller(tree,n,m,depth){var _n2=n*2;var _m2=m*2;return tree[_n2]>1;n>=1;n--){pqdownheap(s,tree,n)}node=elems;do{n=s.heap[1];s.heap[1]=s.heap[s.heap_len--];pqdownheap(s,tree,1);m=s.heap[1];s.heap[--s.heap_max]=n;s.heap[--s.heap_max]=m;tree[node*2]=tree[n*2]+tree[m*2];s.depth[node]=(s.depth[n]>=s.depth[m]?s.depth[n]:s.depth[m])+1;tree[n*2+1]=tree[m*2+1]=node;s.heap[1]=node++;pqdownheap(s,tree,1)}while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1];gen_bitlen(s,desc);gen_codes(tree,max_code,s.bl_count)}function scan_tree(s,tree,max_code){var n;var prevlen=-1;var curlen;var nextlen=tree[0*2+1];var count=0;var max_count=7;var min_count=4;if(nextlen===0){max_count=138;min_count=3}tree[(max_code+1)*2+1]=65535;for(n=0;n<=max_code;n++){curlen=nextlen;nextlen=tree[(n+1)*2+1];if(++count=3;max_blindex--){if(s.bl_tree[bl_order[max_blindex]*2+1]!==0){break}}s.opt_len+=3*(max_blindex+1)+5+5+4;return max_blindex}function send_all_trees(s,lcodes,dcodes,blcodes){var rank;send_bits(s,lcodes-257,5);send_bits(s,dcodes-1,5);send_bits(s,blcodes-4,4);for(rank=0;rank>>=1){if(black_mask&1&&s.dyn_ltree[n*2]!==0){return Z_BINARY}}if(s.dyn_ltree[9*2]!==0||s.dyn_ltree[10*2]!==0||s.dyn_ltree[13*2]!==0){return Z_TEXT}for(n=32;n0){if(s.strm.data_type===Z_UNKNOWN){s.strm.data_type=detect_data_type(s)}build_tree(s,s.l_desc);build_tree(s,s.d_desc);max_blindex=build_bl_tree(s);opt_lenb=s.opt_len+3+7>>>3;static_lenb=s.static_len+3+7>>>3;if(static_lenb<=opt_lenb){opt_lenb=static_lenb}}else{opt_lenb=static_lenb=stored_len+5}if(stored_len+4<=opt_lenb&&buf!==-1){_tr_stored_block(s,buf,stored_len,last)}else if(s.strategy===Z_FIXED||static_lenb===opt_lenb){send_bits(s,(STATIC_TREES<<1)+(last?1:0),3);compress_block(s,static_ltree,static_dtree)}else{send_bits(s,(DYN_TREES<<1)+(last?1:0),3);send_all_trees(s,s.l_desc.max_code+1,s.d_desc.max_code+1,max_blindex+1);compress_block(s,s.dyn_ltree,s.dyn_dtree)}init_block(s);if(last){bi_windup(s)}}function _tr_tally(s,dist,lc){s.pending_buf[s.d_buf+s.last_lit*2]=dist>>>8&255;s.pending_buf[s.d_buf+s.last_lit*2+1]=dist&255;s.pending_buf[s.l_buf+s.last_lit]=lc&255;s.last_lit++;if(dist===0){s.dyn_ltree[lc*2]++}else{s.matches++;dist--;s.dyn_ltree[(_length_code[lc]+LITERALS+1)*2]++;s.dyn_dtree[d_code(dist)*2]++}return s.last_lit===s.lit_bufsize-1}exports._tr_init=_tr_init;exports._tr_stored_block=_tr_stored_block;exports._tr_flush_block=_tr_flush_block;exports._tr_tally=_tr_tally;exports._tr_align=_tr_align},{"../utils/common":27}],39:[function(_dereq_,module,exports){"use strict";function ZStream(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}module.exports=ZStream},{}]},{},[9])(9)});var XLSX={};(function make_xlsx(XLSX){XLSX.version="0.8.20";var current_codepage=1200,current_cptable;if(typeof module!=="undefined"&&typeof require!=="undefined"){if(typeof cptable==="undefined")cptable=require("./dist/cpexcel");current_cptable=cptable[current_codepage]}function reset_cp(){set_cp(1200)}var set_cp=function(cp){current_codepage=cp};function char_codes(data){var o=[];for(var i=0,len=data.length;i>8])[0]}}var Base64=function make_b64(){var map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(input,utf8){var o="";var c1,c2,c3,e1,e2,e3,e4;for(var i=0;i>2;e2=(c1&3)<<4|c2>>4;e3=(c2&15)<<2|c3>>6;e4=c3&63;if(isNaN(c2)){e3=e4=64}else if(isNaN(c3)){e4=64}o+=map.charAt(e1)+map.charAt(e2)+map.charAt(e3)+map.charAt(e4)}return o},decode:function b64_decode(input,utf8){var o="";var c1,c2,c3;var e1,e2,e3,e4;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var i=0;i>4;c2=(e2&15)<<4|e3>>2;c3=(e3&3)<<6|e4;o+=String.fromCharCode(c1);if(e3!=64){o+=String.fromCharCode(c2)}if(e4!=64){o+=String.fromCharCode(c3)}}return o}}}();var has_buf=typeof Buffer!=="undefined";function new_raw_buf(len){return new(has_buf?Buffer:Array)(len)}function s2a(s){if(has_buf)return new Buffer(s,"binary");return s.split("").map(function(x){return x.charCodeAt(0)&255})}var bconcat=function(bufs){return[].concat.apply([],bufs)};var chr0=/\u0000/g,chr1=/[\u0001-\u0006]/;var SSF={};var make_ssf=function make_ssf(SSF){SSF.version="0.8.1";function _strrev(x){var o="",i=x.length-1;while(i>=0)o+=x.charAt(i--);return o}function fill(c,l){var o="";while(o.length=d?t:fill("0",d-t.length)+t}function pad_(v,d){var t=""+v;return t.length>=d?t:fill(" ",d-t.length)+t}function rpad_(v,d){var t=""+v;return t.length>=d?t:t+fill(" ",d-t.length)}function pad0r1(v,d){var t=""+Math.round(v);return t.length>=d?t:fill("0",d-t.length)+t}function pad0r2(v,d){var t=""+v;return t.length>=d?t:fill("0",d-t.length)+t}var p2_32=Math.pow(2,32);function pad0r(v,d){if(v>p2_32||v<-p2_32)return pad0r1(v,d);var i=Math.round(v);return pad0r2(i,d)}function isgeneral(s,i){return s.length>=7+i&&(s.charCodeAt(i)|32)===103&&(s.charCodeAt(i+1)|32)===101&&(s.charCodeAt(i+2)|32)===110&&(s.charCodeAt(i+3)|32)===101&&(s.charCodeAt(i+4)|32)===114&&(s.charCodeAt(i+5)|32)===97&&(s.charCodeAt(i+6)|32)===108}var opts_fmt=[["date1904",0],["output",""],["WTF",false]];function fixopts(o){for(var y=0;y!=opts_fmt.length;++y)if(o[opts_fmt[y][0]]===undefined)o[opts_fmt[y][0]]=opts_fmt[y][1]}SSF.opts=opts_fmt;var table_fmt={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "',65535:"General"};var days=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]];var months=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function frac(x,D,mixed){var sgn=x<0?-1:1;var B=x*sgn;var P_2=0,P_1=1,P=0;var Q_2=1,Q_1=0,Q=0;var A=Math.floor(B);while(Q_1D){Q=Q_1;P=P_1}if(Q>D){Q=Q_2;P=P_2}if(!mixed)return[0,sgn*P,Q];if(Q===0)throw"Unexpected state: "+P+" "+P_1+" "+P_2+" "+Q+" "+Q_1+" "+Q_2;var q=Math.floor(sgn*P/Q);return[q,sgn*P-q*Q,Q]}function general_fmt_int(v,opts){return""+v}SSF._general_int=general_fmt_int;var general_fmt_num=function make_general_fmt_num(){var gnr1=/\.(\d*[1-9])0+$/,gnr2=/\.0*$/,gnr4=/\.(\d*[1-9])0+/,gnr5=/\.0*[Ee]/,gnr6=/(E[+-])(\d)$/;function gfn2(v){var w=v<0?12:11;var o=gfn5(v.toFixed(12));if(o.length<=w)return o;o=v.toPrecision(10);if(o.length<=w)return o;return v.toExponential(5)}function gfn3(v){var o=v.toFixed(11).replace(gnr1,".$1");if(o.length>(v<0?12:11))o=v.toPrecision(6);return o}function gfn4(o){for(var i=0;i!=o.length;++i)if((o.charCodeAt(i)|32)===101)return o.replace(gnr4,".$1").replace(gnr5,"E").replace("e","E").replace(gnr6,"$10$2");return o}function gfn5(o){return o.indexOf(".")>-1?o.replace(gnr2,"").replace(gnr1,".$1"):o}return function general_fmt_num(v,opts){var V=Math.floor(Math.log(Math.abs(v))*Math.LOG10E),o;if(V>=-4&&V<=-1)o=v.toPrecision(10+V);else if(Math.abs(V)<=9)o=gfn2(v);else if(V===10)o=v.toFixed(10).substr(0,12);else o=gfn3(v);return gfn5(gfn4(o))}}();SSF._general_num=general_fmt_num;function general_fmt(v,opts){switch(typeof v){case"string":return v;case"boolean":return v?"TRUE":"FALSE";case"number":return(v|0)===v?general_fmt_int(v,opts):general_fmt_num(v,opts)}throw new Error("unsupported value in General format: "+v)}SSF._general=general_fmt;function fix_hijri(date,o){return 0}function parse_date_code(v,opts,b2){if(v>2958465||v<0)return null;var date=v|0,time=Math.floor(86400*(v-date)),dow=0;var dout=[];var out={D:date,T:time,u:86400*(v-date)-time,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(out.u)<1e-6)out.u=0;fixopts(opts!=null?opts:opts=[]);if(opts.date1904)date+=1462;if(out.u>.999){out.u=0;if(++time==86400){time=0;++date}}if(date===60){dout=b2?[1317,10,29]:[1900,2,29];dow=3}else if(date===0){dout=b2?[1317,8,29]:[1900,1,0];dow=6}else{if(date>60)--date;var d=new Date(1900,0,1);d.setDate(d.getDate()+date-1);dout=[d.getFullYear(),d.getMonth()+1,d.getDate()];dow=d.getDay();if(date<60)dow=(dow+6)%7;if(b2)dow=fix_hijri(d,dout)}out.y=dout[0];out.m=dout[1];out.d=dout[2];out.S=time%60;time=Math.floor(time/60);out.M=time%60;time=Math.floor(time/60);out.H=time;out.q=dow;return out}SSF.parse_date_code=parse_date_code;function write_date(type,fmt,val,ss0){var o="",ss=0,tt=0,y=val.y,out,outl=0;switch(type){case 98:y=val.y+543;case 121:switch(fmt.length){case 1:case 2:out=y%100;outl=2;break;default:out=y%1e4;outl=4;break}break;case 109:switch(fmt.length){case 1:case 2:out=val.m;outl=fmt.length;break;case 3:return months[val.m-1][1];case 5:return months[val.m-1][0];default:return months[val.m-1][2]}break;case 100:switch(fmt.length){case 1:case 2:out=val.d;outl=fmt.length;break;case 3:return days[val.q][0];default:return days[val.q][1]}break;case 104:switch(fmt.length){case 1:case 2:out=1+(val.H+11)%12;outl=fmt.length;break;default:throw"bad hour format: "+fmt}break;case 72:switch(fmt.length){case 1:case 2:out=val.H;outl=fmt.length;break;default:throw"bad hour format: "+fmt}break;case 77:switch(fmt.length){case 1:case 2:out=val.M;outl=fmt.length;break;default:throw"bad minute format: "+fmt}break;case 115:if(val.u===0)switch(fmt){case"s":case"ss":return pad0(val.S,fmt.length);case".0":case".00":case".000":}switch(fmt){case"s":case"ss":case".0":case".00":case".000":if(ss0>=2)tt=ss0===3?1e3:100;else tt=ss0===1?10:1;ss=Math.round(tt*(val.S+val.u));if(ss>=60*tt)ss=0;if(fmt==="s")return ss===0?"0":""+ss/tt;o=pad0(ss,2+ss0);if(fmt==="ss")return o.substr(0,2);return"."+o.substr(2,fmt.length-1);default:throw"bad second format: "+fmt}case 90:switch(fmt){case"[h]":case"[hh]":out=val.D*24+val.H;break;case"[m]":case"[mm]":out=(val.D*24+val.H)*60+val.M;break;case"[s]":case"[ss]":out=((val.D*24+val.H)*60+val.M)*60+Math.round(val.S+val.u);break;default:throw"bad abstime format: "+fmt}outl=fmt.length===3?1:2;break;case 101:out=y;outl=1}if(outl>0)return pad0(out,outl);else return""}function commaify(s){if(s.length<=3)return s;var j=s.length%3,o=s.substr(0,j);for(;j!=s.length;j+=3)o+=(o.length>0?",":"")+s.substr(j,3);return o}var write_num=function make_write_num(){var pct1=/%/g;function write_num_pct(type,fmt,val){var sfmt=fmt.replace(pct1,""),mul=fmt.length-sfmt.length;return write_num(type,sfmt,val*Math.pow(10,2*mul))+fill("%",mul)}function write_num_cm(type,fmt,val){var idx=fmt.length-1;while(fmt.charCodeAt(idx-1)===44)--idx;return write_num(type,fmt.substr(0,idx),val/Math.pow(10,3*(fmt.length-idx)))}function write_num_exp(fmt,val){var o;var idx=fmt.indexOf("E")-fmt.indexOf(".")-1;if(fmt.match(/^#+0.0E\+0$/)){var period=fmt.indexOf(".");if(period===-1)period=fmt.indexOf("E");var ee=Math.floor(Math.log(Math.abs(val))*Math.LOG10E)%period;if(ee<0)ee+=period;o=(val/Math.pow(10,ee)).toPrecision(idx+1+(period+ee)%period);if(o.indexOf("e")===-1){var fakee=Math.floor(Math.log(Math.abs(val))*Math.LOG10E);if(o.indexOf(".")===-1)o=o[0]+"."+o.substr(1)+"E+"+(fakee-o.length+ee);else o+="E+"+(fakee-ee);while(o.substr(0,2)==="0."){o=o[0]+o.substr(2,period)+"."+o.substr(2+period);o=o.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.")}o=o.replace(/\+-/,"-")}o=o.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function($$,$1,$2,$3){return $1+$2+$3.substr(0,(period+ee)%period)+"."+$3.substr(ee)+"E"})}else o=val.toExponential(idx);if(fmt.match(/E\+00$/)&&o.match(/e[+-]\d$/))o=o.substr(0,o.length-1)+"0"+o[o.length-1];if(fmt.match(/E\-/)&&o.match(/e\+/))o=o.replace(/e\+/,"e");return o.replace("e","E")}var frac1=/# (\?+)( ?)\/( ?)(\d+)/;function write_num_f1(r,aval,sign){var den=parseInt(r[4]),rr=Math.round(aval*den),base=Math.floor(rr/den);var myn=rr-base*den,myd=den;return sign+(base===0?"":""+base)+" "+(myn===0?fill(" ",r[1].length+1+r[4].length):pad_(myn,r[1].length)+r[2]+"/"+r[3]+pad0(myd,r[4].length))}function write_num_f2(r,aval,sign){return sign+(aval===0?"":""+aval)+fill(" ",r[1].length+2+r[4].length)}var dec1=/^#*0*\.(0+)/;var closeparen=/\).*[0#]/;var phone=/\(###\) ###\\?-####/;function hashq(str){var o="",cc;for(var i=0;i!=str.length;++i)switch(cc=str.charCodeAt(i)){case 35:break;case 63:o+=" ";break;case 48:o+="0";break;default:o+=String.fromCharCode(cc)}return o}function rnd(val,d){var dd=Math.pow(10,d);return""+Math.round(val*dd)/dd}function dec(val,d){return Math.round((val-Math.floor(val))*Math.pow(10,d))}function flr(val){if(val<2147483647&&val>-2147483648)return""+(val>=0?val|0:val-1|0);return""+Math.floor(val)}function write_num_flt(type,fmt,val){if(type.charCodeAt(0)===40&&!fmt.match(closeparen)){var ffmt=fmt.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");if(val>=0)return write_num_flt("n",ffmt,val);return"("+write_num_flt("n",ffmt,-val)+")"}if(fmt.charCodeAt(fmt.length-1)===44)return write_num_cm(type,fmt,val);if(fmt.indexOf("%")!==-1)return write_num_pct(type,fmt,val);if(fmt.indexOf("E")!==-1)return write_num_exp(fmt,val);if(fmt.charCodeAt(0)===36)return"$"+write_num_flt(type,fmt.substr(fmt[1]==" "?2:1),val);var o,oo;var r,ri,ff,aval=Math.abs(val),sign=val<0?"-":"";if(fmt.match(/^00+$/))return sign+pad0r(aval,fmt.length);if(fmt.match(/^[#?]+$/)){o=pad0r(val,0);if(o==="0")o="";return o.length>fmt.length?o:hashq(fmt.substr(0,fmt.length-o.length))+o}if((r=fmt.match(frac1))!==null)return write_num_f1(r,aval,sign);if(fmt.match(/^#+0+$/)!==null)return sign+pad0r(aval,fmt.length-fmt.indexOf("0"));if((r=fmt.match(dec1))!==null){o=rnd(val,r[1].length).replace(/^([^\.]+)$/,"$1."+r[1]).replace(/\.$/,"."+r[1]).replace(/\.(\d*)$/,function($$,$1){return"."+$1+fill("0",r[1].length-$1.length)});return fmt.indexOf("0.")!==-1?o:o.replace(/^0\./,".")}fmt=fmt.replace(/^#+([0.])/,"$1");if((r=fmt.match(/^(0*)\.(#*)$/))!==null){return sign+rnd(aval,r[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,r[1].length?"0.":".")}if((r=fmt.match(/^#,##0(\.?)$/))!==null)return sign+commaify(pad0r(aval,0));if((r=fmt.match(/^#,##0\.([#0]*0)$/))!==null){return val<0?"-"+write_num_flt(type,fmt,-val):commaify(""+Math.floor(val))+"."+pad0(dec(val,r[1].length),r[1].length)}if((r=fmt.match(/^#,#*,#0/))!==null)return write_num_flt(type,fmt.replace(/^#,#*,/,""),val);if((r=fmt.match(/^([0#]+)(\\?-([0#]+))+$/))!==null){o=_strrev(write_num_flt(type,fmt.replace(/[\\-]/g,""),val));ri=0;return _strrev(_strrev(fmt.replace(/\\/g,"")).replace(/[0#]/g,function(x){return ri=0)return write_num_int("n",ffmt,val);return"("+write_num_int("n",ffmt,-val)+")"}if(fmt.charCodeAt(fmt.length-1)===44)return write_num_cm2(type,fmt,val);if(fmt.indexOf("%")!==-1)return write_num_pct2(type,fmt,val);if(fmt.indexOf("E")!==-1)return write_num_exp2(fmt,val);if(fmt.charCodeAt(0)===36)return"$"+write_num_int(type,fmt.substr(fmt[1]==" "?2:1),val);var o;var r,ri,ff,aval=Math.abs(val),sign=val<0?"-":"";if(fmt.match(/^00+$/))return sign+pad0(aval,fmt.length);if(fmt.match(/^[#?]+$/)){o=""+val;if(val===0)o="";return o.length>fmt.length?o:hashq(fmt.substr(0,fmt.length-o.length))+o}if((r=fmt.match(frac1))!==null)return write_num_f2(r,aval,sign);if(fmt.match(/^#+0+$/)!==null)return sign+pad0(aval,fmt.length-fmt.indexOf("0"));if((r=fmt.match(dec1))!==null){o=(""+val).replace(/^([^\.]+)$/,"$1."+r[1]).replace(/\.$/,"."+r[1]).replace(/\.(\d*)$/,function($$,$1){return"."+$1+fill("0",r[1].length-$1.length)});return fmt.indexOf("0.")!==-1?o:o.replace(/^0\./,"."); +}fmt=fmt.replace(/^#+([0.])/,"$1");if((r=fmt.match(/^(0*)\.(#*)$/))!==null){return sign+(""+aval).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,r[1].length?"0.":".")}if((r=fmt.match(/^#,##0(\.?)$/))!==null)return sign+commaify(""+aval);if((r=fmt.match(/^#,##0\.([#0]*0)$/))!==null){return val<0?"-"+write_num_int(type,fmt,-val):commaify(""+val)+"."+fill("0",r[1].length)}if((r=fmt.match(/^#,#*,#0/))!==null)return write_num_int(type,fmt.replace(/^#,#*,/,""),val);if((r=fmt.match(/^([0#]+)(\\?-([0#]+))+$/))!==null){o=_strrev(write_num_int(type,fmt.replace(/[\\-]/g,""),val));ri=0;return _strrev(_strrev(fmt.replace(/\\/g,"")).replace(/[0#]/g,function(x){return ri=12?"P":"A";q.t="T";hr="h";i+=3}else if(fmt.substr(i,5)==="AM/PM"){if(dt!=null)q.v=dt.H>=12?"PM":"AM";q.t="T";i+=5;hr="h"}else{q.t="t";++i}if(dt==null&&q.t==="T")return"";out[out.length]=q;lst=c;break;case"[":o=c;while(fmt[i++]!=="]"&&i-1||c=="\\"&&fmt[i+1]=="-"&&"0#".indexOf(fmt[i+2])>-1)o+=c;out[out.length]={t:"n",v:o};break;case"?":o=c;while(fmt[++i]===c)o+=c;q={t:c,v:o};out[out.length]=q;lst=c;break;case"*":++i;if(fmt[i]==" "||fmt[i]=="*")++i;break;case"(":case")":out[out.length]={t:flen===1?"t":c,v:c};++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=c;while("0123456789".indexOf(fmt[++i])>-1)o+=fmt[i];out[out.length]={t:"D",v:o};break;case" ":out[out.length]={t:c,v:c};++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxz".indexOf(c)===-1)throw new Error("unrecognized character "+c+" in "+fmt);out[out.length]={t:"t",v:c};++i;break}}var bt=0,ss0=0,ssm;for(i=out.length-1,lst="t";i>=0;--i){switch(out[i].t){case"h":case"H":out[i].t=hr;lst="h";if(bt<1)bt=1;break;case"s":if(ssm=out[i].v.match(/\.0+$/))ss0=Math.max(ss0,ssm[0].length-1);if(bt<3)bt=3;case"d":case"y":case"M":case"e":lst=out[i].t;break;case"m":if(lst==="s"){out[i].t="M";if(bt<2)bt=2}break;case"X":if(out[i].v==="B2");break;case"Z":if(bt<1&&out[i].v.match(/[Hh]/))bt=1;if(bt<2&&out[i].v.match(/[Mm]/))bt=2;if(bt<3&&out[i].v.match(/[Ss]/))bt=3}}switch(bt){case 0:break;case 1:if(dt.u>=.5){dt.u=0;++dt.S}if(dt.S>=60){dt.S=0;++dt.M}if(dt.M>=60){dt.M=0;++dt.H}break;case 2:if(dt.u>=.5){dt.u=0;++dt.S}if(dt.S>=60){dt.S=0;++dt.M}break}var nstr="",jj;for(i=0;i-1||out[jj].v===" "&&out[jj+1]!=null&&out[jj+1].t=="?"))){out[i].v+=out[jj].v;out[jj]=undefined;++jj}nstr+=out[i].v;i=jj-1;break;case"G":out[i].t="t";out[i].v=general_fmt(v,opts);break}}var vv="",myv,ostr;if(nstr.length>0){myv=v<0&&nstr.charCodeAt(0)===45?-v:v;ostr=write_num(nstr.charCodeAt(0)===40?"(":"n",nstr,myv);jj=ostr.length-1;var decpt=out.length;for(i=0;i-1){decpt=i;break}var lasti=out.length;if(decpt===out.length&&ostr.indexOf("E")===-1){for(i=out.length-1;i>=0;--i){if(out[i]==null||"n?(".indexOf(out[i].t)===-1)continue;if(jj>=out[i].v.length-1){jj-=out[i].v.length;out[i].v=ostr.substr(jj+1,out[i].v.length)}else if(jj<0)out[i].v="";else{out[i].v=ostr.substr(0,jj+1);jj=-1}out[i].t="t";lasti=i}if(jj>=0&&lasti=0;--i){if(out[i]==null||"n?(".indexOf(out[i].t)===-1)continue;j=out[i].v.indexOf(".")>-1&&i===decpt?out[i].v.indexOf(".")-1:out[i].v.length-1;vv=out[i].v.substr(j+1);for(;j>=0;--j){if(jj>=0&&(out[i].v[j]==="0"||out[i].v[j]==="#"))vv=ostr[jj--]+vv}out[i].v=vv;out[i].t="t";lasti=i}if(jj>=0&&lasti-1&&i===decpt?out[i].v.indexOf(".")+1:0;vv=out[i].v.substr(0,j);for(;j-1){myv=flen>1&&v<0&&i>0&&out[i-1].v==="-"?-v:v;out[i].v=write_num(out[i].t,out[i].v,myv);out[i].t="t"}var retval="";for(i=0;i!==out.length;++i)if(out[i]!=null)retval+=out[i].v;return retval}SSF._eval=eval_fmt;var cfregex=/\[[=<>]/;var cfregex2=/\[([=<>]*)(-?\d+\.?\d*)\]/;function chkcond(v,rr){if(rr==null)return false;var thresh=parseFloat(rr[2]);switch(rr[1]){case"=":if(v==thresh)return true;break;case">":if(v>thresh)return true;break;case"<":if(v":if(v!=thresh)return true;break;case">=":if(v>=thresh)return true;break;case"<=":if(v<=thresh)return true;break}return false}function choose_fmt(f,v){var fmt=split_fmt(f);var l=fmt.length,lat=fmt[l-1].indexOf("@");if(l<4&&lat>-1)--l;if(fmt.length>4)throw"cannot find right format for |"+fmt+"|";if(typeof v!=="number")return[4,fmt.length===4||lat>-1?fmt[fmt.length-1]:"@"];switch(fmt.length){case 1:fmt=lat>-1?["General","General","General",fmt[0]]:[fmt[0],fmt[0],fmt[0],"@"];break;case 2:fmt=lat>-1?[fmt[0],fmt[0],fmt[0],fmt[1]]:[fmt[0],fmt[1],fmt[0],"@"];break;case 3:fmt=lat>-1?[fmt[0],fmt[1],fmt[0],fmt[2]]:[fmt[0],fmt[1],fmt[2],"@"];break;case 4:break}var ff=v>0?fmt[0]:v<0?fmt[1]:fmt[2];if(fmt[0].indexOf("[")===-1&&fmt[1].indexOf("[")===-1)return[l,ff];if(fmt[0].match(cfregex)!=null||fmt[1].match(cfregex)!=null){var m1=fmt[0].match(cfregex2);var m2=fmt[1].match(cfregex2);return chkcond(v,m1)?[l,fmt[0]]:chkcond(v,m2)?[l,fmt[1]]:[l,fmt[m1!=null&&m2!=null?2:1]]}return[l,ff]}function format(fmt,v,o){fixopts(o!=null?o:o=[]);var sfmt="";switch(typeof fmt){case"string":sfmt=fmt;break;case"number":sfmt=(o.table!=null?o.table:table_fmt)[fmt];break}if(isgeneral(sfmt,0))return general_fmt(v,o);var f=choose_fmt(sfmt,v);if(isgeneral(f[1]))return general_fmt(v,o);if(v===true)v="TRUE";else if(v===false)v="FALSE";else if(v===""||v==null)return"";return eval_fmt(f[1],v,o,f[0])}SSF._table=table_fmt;SSF.load=function load_entry(fmt,idx){table_fmt[idx]=fmt};SSF.format=format;SSF.get_table=function get_table(){return table_fmt};SSF.load_table=function load_table(tbl){for(var i=0;i!=392;++i)if(tbl[i]!==undefined)SSF.load(tbl[i],i)}};make_ssf(SSF);var XLMLFormatMap={"General Number":"General","General Date":SSF._table[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":SSF._table[15],"Short Date":SSF._table[14],"Long Time":SSF._table[19],"Medium Time":SSF._table[18],"Short Time":SSF._table[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:SSF._table[2],Standard:SSF._table[4],Percent:SSF._table[10],Scientific:SSF._table[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var DO_NOT_EXPORT_CFB=true;var CFB=function _CFB(){var exports={};exports.version="0.10.2";function parse(file){var mver=3;var ssz=512;var nmfs=0;var ndfs=0;var dir_start=0;var minifat_start=0;var difat_start=0;var fat_addrs=[];var blob=file.slice(0,512);prep_blob(blob,0);var mv=check_get_mver(blob);mver=mv[0];switch(mver){case 3:ssz=512;break;case 4:ssz=4096;break;default:throw"Major Version: Expected 3 or 4 saw "+mver}if(ssz!==512){blob=file.slice(0,ssz);prep_blob(blob,28)}var header=file.slice(0,ssz);check_shifts(blob,mver);var nds=blob.read_shift(4,"i");if(mver===3&&nds!==0)throw"# Directory Sectors: Expected 0 saw "+nds;blob.l+=4;dir_start=blob.read_shift(4,"i");blob.l+=4;blob.chk("00100000","Mini Stream Cutoff Size: ");minifat_start=blob.read_shift(4,"i");nmfs=blob.read_shift(4,"i");difat_start=blob.read_shift(4,"i");ndfs=blob.read_shift(4,"i");for(var q,j=0;j<109;++j){q=blob.read_shift(4,"i");if(q<0)break;fat_addrs[j]=q}var sectors=sectorify(file,ssz);sleuth_fat(difat_start,ndfs,sectors,ssz,fat_addrs);var sector_list=make_sector_list(sectors,dir_start,fat_addrs,ssz);sector_list[dir_start].name="!Directory";if(nmfs>0&&minifat_start!==ENDOFCHAIN)sector_list[minifat_start].name="!MiniFAT";sector_list[fat_addrs[0]].name="!FAT";sector_list.fat_addrs=fat_addrs;sector_list.ssz=ssz;var files={},Paths=[],FileIndex=[],FullPaths=[],FullPathDir={};read_directory(dir_start,sector_list,sectors,Paths,nmfs,files,FileIndex);build_full_paths(FileIndex,FullPathDir,FullPaths,Paths);var root_name=Paths.shift();Paths.root=root_name;var find_path=make_find_path(FullPaths,Paths,FileIndex,files,root_name);return{raw:{header:header,sectors:sectors},FileIndex:FileIndex,FullPaths:FullPaths,FullPathDir:FullPathDir,find:find_path}}function check_get_mver(blob){blob.chk(HEADER_SIGNATURE,"Header Signature: ");blob.chk(HEADER_CLSID,"CLSID: ");var mver=blob.read_shift(2,"u");return[blob.read_shift(2,"u"),mver]}function check_shifts(blob,mver){var shift=9;blob.chk("feff","Byte Order: ");switch(shift=blob.read_shift(2)){case 9:if(mver!==3)throw"MajorVersion/SectorShift Mismatch";break;case 12:if(mver!==4)throw"MajorVersion/SectorShift Mismatch";break;default:throw"Sector Shift: Expected 9 or 12 saw "+shift}blob.chk("0600","Mini Sector Shift: ");blob.chk("000000000000","Reserved: ")}function sectorify(file,ssz){var nsectors=Math.ceil(file.length/ssz)-1;var sectors=new Array(nsectors);for(var i=1;i>>2)-1;for(var i=0;i=0;){chkd[j]=true;buf[buf.length]=j;buf_chain.push(sectors[j]);var addr=fat_addrs[Math.floor(j*4/ssz)];jj=j*4&modulus;if(ssz<4+jj)throw"FAT boundary crossed: "+j+" 4 "+ssz;j=__readInt32LE(sectors[addr],jj)}return{nodes:buf,data:__toBuffer([buf_chain])}}function make_sector_list(sectors,dir_start,fat_addrs,ssz){var sl=sectors.length,sector_list=new Array(sl);var chkd=new Array(sl),buf,buf_chain;var modulus=ssz-1,i,j,k,jj;for(i=0;i=sl)k-=sl;if(chkd[k]===true)continue;buf_chain=[];for(j=k;j>=0;){chkd[j]=true;buf[buf.length]=j;buf_chain.push(sectors[j]);var addr=fat_addrs[Math.floor(j*4/ssz)];jj=j*4&modulus;if(ssz<4+jj)throw"FAT boundary crossed: "+j+" 4 "+ssz;j=__readInt32LE(sectors[addr],jj)}sector_list[k]={nodes:buf,data:__toBuffer([buf_chain])}}return sector_list}function read_directory(dir_start,sector_list,sectors,Paths,nmfs,files,FileIndex){var blob;var minifat_store=0,pl=Paths.length?2:0;var sector=sector_list[dir_start].data;var i=0,namelen=0,name,o,ctime,mtime;for(;i0&&minifat_store!==ENDOFCHAIN)sector_list[minifat_store].name="!StreamData"}else if(o.size>=4096){o.storage="fat";if(sector_list[o.start]===undefined)sector_list[o.start]=get_sector_list(sectors,o.start,sector_list.fat_addrs,sector_list.ssz);sector_list[o.start].name=o.name;o.content=sector_list[o.start].data.slice(0,o.size);prep_blob(o.content,0)}else{o.storage="minifat";if(minifat_store!==ENDOFCHAIN&&o.start!==ENDOFCHAIN){o.content=sector_list[minifat_store].data.slice(o.start*MSSZ,o.start*MSSZ+o.size);prep_blob(o.content,0)}}files[name]=o;FileIndex.push(o)}}function read_date(blob,offset){return new Date((__readUInt32LE(blob,offset+4)/1e7*Math.pow(2,32)+__readUInt32LE(blob,offset)/1e7-11644473600)*1e3)}var fs;function readFileSync(filename,options){if(fs===undefined)fs=require("fs");return parse(fs.readFileSync(filename),options)}function readSync(blob,options){switch(options!==undefined&&options.type!==undefined?options.type:"base64"){case"file":return readFileSync(blob,options);case"base64":return parse(s2a(Base64.decode(blob)),options);case"binary":return parse(s2a(blob),options)}return parse(blob)}var MSSZ=64;var ENDOFCHAIN=-2;var HEADER_SIGNATURE="d0cf11e0a1b11ae1";var HEADER_CLSID="00000000000000000000000000000000";var consts={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:ENDOFCHAIN,FREESECT:-1,HEADER_SIGNATURE:HEADER_SIGNATURE,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:HEADER_CLSID,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};exports.read=readSync;exports.parse=parse;exports.utils={ReadShift:ReadShift,CheckField:CheckField,prep_blob:prep_blob,bconcat:bconcat,consts:consts};return exports}();if(typeof require!=="undefined"&&typeof module!=="undefined"&&typeof DO_NOT_EXPORT_CFB==="undefined"){module.exports=CFB}function isval(x){return x!==undefined&&x!==null}function keys(o){return Object.keys(o)}function evert_key(obj,key){var o=[],K=keys(obj);for(var i=0;i!==K.length;++i)o[obj[K[i]][key]]=K[i];return o}function evert(obj){var o=[],K=keys(obj);for(var i=0;i!==K.length;++i)o[obj[K[i]]]=K[i];return o}function evert_num(obj){var o=[],K=keys(obj);for(var i=0;i!==K.length;++i)o[obj[K[i]]]=parseInt(K[i],10);return o}function evert_arr(obj){var o=[],K=keys(obj);for(var i=0;i!==K.length;++i){if(o[obj[K[i]]]==null)o[obj[K[i]]]=[];o[obj[K[i]]].push(K[i])}return o}function datenum(v,date1904){if(date1904)v+=1462;var epoch=Date.parse(v);return(epoch+22091616e5)/(24*60*60*1e3)}function cc2str(arr){var o="";for(var i=0;i!=arr.length;++i)o+=String.fromCharCode(arr[i]);return o}function getdata(data){if(!data)return null;if(data.name.substr(-4)===".bin"){if(data.data)return char_codes(data.data);if(data.asNodeBuffer&&has_buf)return data.asNodeBuffer();if(data._data&&data._data.getContent)return Array.prototype.slice.call(data._data.getContent())}else{if(data.data)return data.name.substr(-4)!==".bin"?debom_xml(data.data):char_codes(data.data);if(data.asNodeBuffer&&has_buf)return debom_xml(data.asNodeBuffer().toString("binary"));if(data.asBinary)return debom_xml(data.asBinary());if(data._data&&data._data.getContent)return debom_xml(cc2str(Array.prototype.slice.call(data._data.getContent(),0)))}return null}function safegetzipfile(zip,file){var f=file;if(zip.files[f])return zip.files[f];var lowerCaseFiles={};for(var key in zip.files){lowerCaseFiles[key.toLowerCase()]=zip.files[key]}f=file.toLowerCase();if(lowerCaseFiles[f])return lowerCaseFiles[f];f=f.replace(/\//g,"\\");if(lowerCaseFiles[f])return lowerCaseFiles[f];return null}function getzipfile(zip,file){var o=safegetzipfile(zip,file);if(o==null)throw new Error("Cannot find file "+file+" in zip");return o}function getzipdata(zip,file,safe){if(!safe)return getdata(getzipfile(zip,file));if(!file)return null;try{return getzipdata(zip,file)}catch(e){return null}}var _fs,jszip;if(typeof JSZip!=="undefined")jszip=JSZip;if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports){if(has_buf&&typeof jszip==="undefined")jszip=require("js"+"zip");if(typeof jszip==="undefined")jszip=require("./js"+"zip").JSZip;_fs=require("f"+"s")}}var attregexg=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g;var tagregex=/<[^>]*>/g;var nsregex=/<\w*:/,nsregex2=/<(\/?)\w+:/;function parsexmltag(tag,skip_root){var z=[];var eq=0,c=0;for(;eq!==tag.length;++eq)if((c=tag.charCodeAt(eq))===32||c===10||c===13)break;if(!skip_root)z[0]=tag.substr(0,eq);if(eq===tag.length)return z;var m=tag.match(attregexg),j=0,w="",v="",i=0,q="",cc="";if(m)for(i=0;i!=m.length;++i){cc=m[i];for(c=0;c!=cc.length;++c)if(cc.charCodeAt(c)===61)break;q=cc.substr(0,c);v=cc.substring(c+2,cc.length-1);for(j=0;j!=q.length;++j)if(q.charCodeAt(j)===58)break;if(j===q.length)z[q]=v;else z[(j===5&&q.substr(0,5)==="xmlns"?"xmlns":"")+q.substr(j+1)]=v}return z}function strip_ns(x){return x.replace(nsregex2,"<$1")}var encodings={""":'"',"'":"'",">":">","<":"<","&":"&"};var rencoding=evert(encodings);var rencstr="&<>'\"".split("");var unescapexml=function(){var encregex=/&[a-z]*;/g,coderegex=/_x([\da-fA-F]+)_/g;return function unescapexml(text){var s=text+"";return s.replace(encregex,function($$){return encodings[$$]}).replace(coderegex,function(m,c){return String.fromCharCode(parseInt(c,16))})}}();var decregex=/[&<>'"]/g,charegex=/[\u0000-\u0008\u000b-\u001f]/g;function escapexml(text){var s=text+"";return s.replace(decregex,function(y){return rencoding[y]}).replace(charegex,function(s){return"_x"+("000"+s.charCodeAt(0).toString(16)).substr(-4)+"_"})}var xlml_fixstr=function(){var entregex=/&#(\d+);/g;function entrepl($$,$1){return String.fromCharCode(parseInt($1,10))}return function xlml_fixstr(str){return str.replace(entregex,entrepl)}}();function parsexmlbool(value,tag){switch(value){case"1":case"true":case"TRUE":return true;default:return false}}var utf8read=function utf8reada(orig){var out="",i=0,c=0,d=0,e=0,f=0,w=0;while(i191&&c<224){out+=String.fromCharCode((c&31)<<6|d&63);continue}e=orig.charCodeAt(i++);if(c<240){out+=String.fromCharCode((c&15)<<12|(d&63)<<6|e&63);continue}f=orig.charCodeAt(i++);w=((c&7)<<18|(d&63)<<12|(e&63)<<6|f&63)-65536;out+=String.fromCharCode(55296+(w>>>10&1023));out+=String.fromCharCode(56320+(w&1023))}return out};if(has_buf){var utf8readb=function utf8readb(data){var out=new Buffer(2*data.length),w,i,j=1,k=0,ww=0,c;for(i=0;i>>10&1023);w=56320+(w&1023)}if(ww!==0){out[k++]=ww&255;out[k++]=ww>>>8;ww=0}out[k++]=w%256;out[k++]=w>>>8}out.length=k;return out.toString("ucs2")};var corpus="foo bar baz☃🍣";if(utf8read(corpus)==utf8readb(corpus))utf8read=utf8readb;var utf8readc=function utf8readc(data){return Buffer(data,"binary").toString("utf8")};if(utf8read(corpus)==utf8readc(corpus))utf8read=utf8readc}var matchtag=function(){var mtcache={};return function matchtag(f,g){var t=f+"|"+g;if(mtcache[t]!==undefined)return mtcache[t];return mtcache[t]=new RegExp("<(?:\\w+:)?"+f+'(?: xml:space="preserve")?(?:[^>]*)>([^☃]*)",g||"")}}();var vtregex=function(){var vt_cache={};return function vt_regex(bt){if(vt_cache[bt]!==undefined)return vt_cache[bt];return vt_cache[bt]=new RegExp("(.*?)","g")}}();var vtvregex=/<\/?vt:variant>/g,vtmregex=/]*)>(.*)"+g+""}function wxt_helper(h){return keys(h).map(function(k){return" "+k+'="'+h[k]+'"'}).join("")}function writextag(f,g,h){return"<"+f+(isval(h)?wxt_helper(h):"")+(isval(g)?(g.match(wtregex)?' xml:space="preserve"':"")+">"+g+""}function write_w3cdtf(d,t){try{return d.toISOString().replace(/\.\d*/,"")}catch(e){if(t)throw e}}function write_vt(s){switch(typeof s){case"string":return writextag("vt:lpwstr",s);case"number":return writextag((s|0)==s?"vt:i4":"vt:r8",String(s));case"boolean":return writextag("vt:bool",s?"true":"false")}if(s instanceof Date)return writextag("vt:filetime",write_w3cdtf(s));throw new Error("Unable to serialize "+s)}var XML_HEADER='\r\n';var XMLNS={dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"};XMLNS.main=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];function readIEEE754(buf,idx,isLE,nl,ml){if(isLE===undefined)isLE=true;if(!nl)nl=8;if(!ml&&nl===8)ml=52;var e,m,el=nl*8-ml-1,eMax=(1<>1;var bits=-7,d=isLE?-1:1,i=isLE?nl-1:0,s=buf[idx+i];i+=d;e=s&(1<<-bits)-1;s>>>=-bits;bits+=el;for(;bits>0;e=e*256+buf[idx+i],i+=d,bits-=8);m=e&(1<<-bits)-1;e>>>=-bits;bits+=ml;for(;bits>0;m=m*256+buf[idx+i],i+=d,bits-=8);if(e===eMax)return m?NaN:(s?-1:1)*Infinity;else if(e===0)e=1-eBias;else{m=m+Math.pow(2,ml);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-ml)}var __toBuffer,___toBuffer;__toBuffer=___toBuffer=function toBuffer_(bufs){var x=[];for(var i=0;i0?__utf8(b,i+4,i+4+len-1):""};var __lpwstr,___lpwstr;__lpwstr=___lpwstr=function lpwstr_(b,i){var len=2*__readUInt32LE(b,i);return len>0?__utf8(b,i+4,i+4+len-1):""};var __double,___double;__double=___double=function(b,idx){return readIEEE754(b,idx)};var is_buf=function is_buf_a(a){return Array.isArray(a)};if(has_buf){__utf16le=function utf16le_b(b,s,e){if(!Buffer.isBuffer(b))return ___utf16le(b,s,e);return b.toString("utf16le",s,e)};__hexlify=function(b,s,l){return Buffer.isBuffer(b)?b.toString("hex",s,s+l):___hexlify(b,s,l)};__lpstr=function lpstr_b(b,i){if(!Buffer.isBuffer(b))return ___lpstr(b,i);var len=b.readUInt32LE(i);return len>0?b.toString("utf8",i+4,i+4+len-1):""};__lpwstr=function lpwstr_b(b,i){if(!Buffer.isBuffer(b))return ___lpwstr(b,i);var len=2*b.readUInt32LE(i);return b.toString("utf16le",i+4,i+4+len-1)};__utf8=function utf8_b(s,e){return this.toString("utf8",s,e)};__toBuffer=function(bufs){return bufs[0].length>0&&Buffer.isBuffer(bufs[0][0])?Buffer.concat(bufs[0]):___toBuffer(bufs)};bconcat=function(bufs){return Buffer.isBuffer(bufs[0])?Buffer.concat(bufs):[].concat.apply([],bufs)};__double=function double_(b,i){if(Buffer.isBuffer(b))return b.readDoubleLE(i);return ___double(b,i)};is_buf=function is_buf_b(a){return Buffer.isBuffer(a)||Array.isArray(a)}}if(typeof cptable!=="undefined"){__utf16le=function(b,s,e){return cptable.utils.decode(1200,b.slice(s,e))};__utf8=function(b,s,e){return cptable.utils.decode(65001,b.slice(s,e))};__lpstr=function(b,i){var len=__readUInt32LE(b,i);return len>0?cptable.utils.decode(current_codepage,b.slice(i+4,i+4+len-1)):""};__lpwstr=function(b,i){var len=2*__readUInt32LE(b,i);return len>0?cptable.utils.decode(1200,b.slice(i+4,i+4+len-1)):""}}var __readUInt8=function(b,idx){return b[idx]};var __readUInt16LE=function(b,idx){return b[idx+1]*(1<<8)+b[idx]};var __readInt16LE=function(b,idx){var u=b[idx+1]*(1<<8)+b[idx];return u<32768?u:(65535-u+1)*-1};var __readUInt32LE=function(b,idx){return b[idx+3]*(1<<24)+(b[idx+2]<<16)+(b[idx+1]<<8)+b[idx]};var __readInt32LE=function(b,idx){return b[idx+3]<<24|b[idx+2]<<16|b[idx+1]<<8|b[idx]};var ___unhexlify=function(s){return s.match(/../g).map(function(x){return parseInt(x,16)})};var __unhexlify=typeof Buffer!=="undefined"?function(s){return Buffer.isBuffer(s)?new Buffer(s,"hex"):___unhexlify(s)}:___unhexlify;function ReadShift(size,t){var o="",oI,oR,oo=[],w,vv,i,loc;switch(t){case"dbcs":loc=this.l;if(has_buf&&Buffer.isBuffer(this))o=this.slice(this.l,this.l+2*size).toString("utf16le");else for(i=0;i!=size;++i){o+=String.fromCharCode(__readUInt16LE(this,loc));loc+=2}size*=2;break;case"utf8":o=__utf8(this,this.l,this.l+size);break;case"utf16le":size*=2;o=__utf16le(this,this.l,this.l+size);break;case"lpstr":o=__lpstr(this,this.l);size=5+o.length;break;case"lpwstr":o=__lpwstr(this,this.l);size=5+o.length;if(o[o.length-1]=="\0")size+=2;break;case"cstr":size=0;o="";while((w=__readUInt8(this,this.l+size++))!==0)oo.push(_getchar(w));o=oo.join("");break;case"wstr":size=0;o="";while((w=__readUInt16LE(this,this.l+size))!==0){oo.push(_getchar(w));size+=2}size+=2;o=oo.join("");break;case"dbcs-cont":o="";loc=this.l;for(i=0;i!=size;++i){if(this.lens&&this.lens.indexOf(loc)!==-1){w=__readUInt8(this,loc);this.l=loc+1;vv=ReadShift.call(this,size-i,w?"dbcs-cont":"sbcs-cont");return oo.join("")+vv}oo.push(_getchar(__readUInt16LE(this,loc)));loc+=2}o=oo.join("");size*=2;break;case"sbcs-cont":o="";loc=this.l;for(i=0;i!=size;++i){if(this.lens&&this.lens.indexOf(loc)!==-1){w=__readUInt8(this,loc);this.l=loc+1;vv=ReadShift.call(this,size-i,w?"dbcs-cont":"sbcs-cont");return oo.join("")+vv}oo.push(_getchar(__readUInt8(this,loc)));loc+=1}o=oo.join("");break;default:switch(size){case 1:oI=__readUInt8(this,this.l);this.l++;return oI;case 2:oI=(t==="i"?__readInt16LE:__readUInt16LE)(this,this.l);this.l+=2;return oI;case 4:if(t==="i"||(this[this.l+3]&128)===0){oI=__readInt32LE(this,this.l);this.l+=4;return oI}else{oR=__readUInt32LE(this,this.l);this.l+=4;return oR}break;case 8:if(t==="f"){oR=__double(this,this.l);this.l+=8;return oR}case 16:o=__hexlify(this,this.l,size);break}}this.l+=size;return o}function WriteShift(t,val,f){var size,i;if(f==="dbcs"){for(i=0;i!=val.length;++i)this.writeUInt16LE(val.charCodeAt(i),this.l+2*i);size=2*val.length; +}else switch(t){case 1:size=1;this[this.l]=val&255;break;case 3:size=3;this[this.l+2]=val&255;val>>>=8;this[this.l+1]=val&255;val>>>=8;this[this.l]=val&255;break;case 4:size=4;this.writeUInt32LE(val,this.l);break;case 8:size=8;if(f==="f"){this.writeDoubleLE(val,this.l);break}case 16:break;case-4:size=4;this.writeInt32LE(val,this.l);break}this.l+=size;return this}function CheckField(hexstr,fld){var m=__hexlify(this,this.l,hexstr.length>>1);if(m!==hexstr)throw fld+"Expected "+hexstr+" saw "+m;this.l+=hexstr.length>>1}function prep_blob(blob,pos){blob.l=pos;blob.read_shift=ReadShift;blob.chk=CheckField;blob.write_shift=WriteShift}function parsenoop(blob,length){blob.l+=length}function writenoop(blob,length){blob.l+=length}function new_buf(sz){var o=new_raw_buf(sz);prep_blob(o,0);return o}function recordhopper(data,cb,opts){var tmpbyte,cntbyte,length;prep_blob(data,data.l||0);while(data.l0)bufs.push(curbuf);curbuf=null};var next=function ba_next(sz){if(sz=128?1:0)+1+length;if(length>=128)++l;if(length>=16384)++l;if(length>=2097152)++l;var o=ba.next(l);if(t<=127)o.write_shift(1,t);else{o.write_shift(1,(t&127)+128);o.write_shift(1,t>>7)}for(var i=0;i!=4;++i){if(length>=128){o.write_shift(1,(length&127)+128);length>>=7}else{o.write_shift(1,length);break}}if(length>0&&is_buf(payload))ba.push(payload)}function shift_cell_xls(cell,tgt){if(tgt.s){if(cell.cRel)cell.c+=tgt.s.c;if(cell.rRel)cell.r+=tgt.s.r}else{cell.c+=tgt.c;cell.r+=tgt.r}cell.cRel=cell.rRel=0;while(cell.c>=256)cell.c-=256;while(cell.r>=65536)cell.r-=65536;return cell}function shift_range_xls(cell,range){cell.s=shift_cell_xls(cell.s,range.s);cell.e=shift_cell_xls(cell.e,range.s);return cell}var OFFCRYPTO={};var make_offcrypto=function(O,_crypto){var crypto;if(typeof _crypto!=="undefined")crypto=_crypto;else if(typeof require!=="undefined"){try{crypto=require("cry"+"pto")}catch(e){crypto=null}}O.rc4=function(key,data){var S=new Array(256);var c=0,i=0,j=0,t=0;for(i=0;i!=256;++i)S[i]=i;for(i=0;i!=256;++i){j=j+S[i]+key[i%key.length].charCodeAt(0)&255;t=S[i];S[i]=S[j];S[j]=t}i=j=0;out=Buffer(data.length);for(c=0;c!=data.length;++c){i=i+1&255;j=(j+S[i])%256;t=S[i];S[i]=S[j];S[j]=t;out[c]=data[c]^S[S[i]+S[j]&255]}return out};if(crypto){O.md5=function(hex){return crypto.createHash("md5").update(hex).digest("hex")}}else{O.md5=function(hex){throw"unimplemented"}}};make_offcrypto(OFFCRYPTO,typeof crypto!=="undefined"?crypto:undefined);function parse_StrRun(data,length){return{ich:data.read_shift(2),ifnt:data.read_shift(2)}}function parse_RichStr(data,length){var start=data.l;var flags=data.read_shift(1);var str=parse_XLWideString(data);var rgsStrRun=[];var z={t:str,h:str};if((flags&1)!==0){var dwSizeStrRun=data.read_shift(4);for(var i=0;i!=dwSizeStrRun;++i)rgsStrRun.push(parse_StrRun(data));z.r=rgsStrRun}else z.r=""+escapexml(str)+"";if((flags&2)!==0){}data.l=start+length;return z}function write_RichStr(str,o){if(o==null)o=new_buf(5+2*str.t.length);o.write_shift(1,0);write_XLWideString(str.t,o);return o}function parse_XLSBCell(data){var col=data.read_shift(4);var iStyleRef=data.read_shift(2);iStyleRef+=data.read_shift(1)<<16;var fPhShow=data.read_shift(1);return{c:col,iStyleRef:iStyleRef}}function write_XLSBCell(cell,o){if(o==null)o=new_buf(8);o.write_shift(-4,cell.c);o.write_shift(3,cell.iStyleRef===undefined?cell.iStyleRef:cell.s);o.write_shift(1,0);return o}function parse_XLSBCodeName(data,length){return parse_XLWideString(data,length)}function parse_XLNullableWideString(data){var cchCharacters=data.read_shift(4);return cchCharacters===0||cchCharacters===4294967295?"":data.read_shift(cchCharacters,"dbcs")}function write_XLNullableWideString(data,o){if(!o)o=new_buf(127);o.write_shift(4,data.length>0?data.length:4294967295);if(data.length>0)o.write_shift(0,data,"dbcs");return o}function parse_XLWideString(data){var cchCharacters=data.read_shift(4);return cchCharacters===0?"":data.read_shift(cchCharacters,"dbcs")}function write_XLWideString(data,o){if(o==null)o=new_buf(4+2*data.length);o.write_shift(4,data.length);if(data.length>0)o.write_shift(0,data,"dbcs");return o}var parse_RelID=parse_XLNullableWideString;var write_RelID=write_XLNullableWideString;function parse_RkNumber(data){var b=data.slice(data.l,data.l+4);var fX100=b[0]&1,fInt=b[0]&2;data.l+=4;b[0]&=252;var RK=fInt===0?__double([0,0,0,0,b[0],b[1],b[2],b[3]],0):__readInt32LE(b,0)>>2;return fX100?RK/100:RK}function parse_UncheckedRfX(data){var cell={s:{},e:{}};cell.s.r=data.read_shift(4);cell.e.r=data.read_shift(4);cell.s.c=data.read_shift(4);cell.e.c=data.read_shift(4);return cell}function write_UncheckedRfX(r,o){if(!o)o=new_buf(16);o.write_shift(4,r.s.r);o.write_shift(4,r.e.r);o.write_shift(4,r.s.c);o.write_shift(4,r.e.c);return o}function parse_Xnum(data,length){return data.read_shift(8,"f")}function write_Xnum(data,o){return(o||new_buf(8)).write_shift(8,"f",data)}var BErr={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"};var RBErr=evert_num(BErr);function parse_BrtColor(data,length){var out={};var d=data.read_shift(1);out.fValidRGB=d&1;out.xColorType=d>>>1;out.index=data.read_shift(1);out.nTintAndShade=data.read_shift(2,"i");out.bRed=data.read_shift(1);out.bGreen=data.read_shift(1);out.bBlue=data.read_shift(1);out.bAlpha=data.read_shift(1)}function parse_FontFlags(data,length){var d=data.read_shift(1);data.l++;var out={fItalic:d&2,fStrikeout:d&8,fOutline:d&16,fShadow:d&32,fCondense:d&64,fExtend:d&128};return out}{var VT_EMPTY=0;var VT_NULL=1;var VT_I2=2;var VT_I4=3;var VT_R4=4;var VT_R8=5;var VT_CY=6;var VT_DATE=7;var VT_BSTR=8;var VT_ERROR=10;var VT_BOOL=11;var VT_VARIANT=12;var VT_DECIMAL=14;var VT_I1=16;var VT_UI1=17;var VT_UI2=18;var VT_UI4=19;var VT_I8=20;var VT_UI8=21;var VT_INT=22;var VT_UINT=23;var VT_LPSTR=30;var VT_LPWSTR=31;var VT_FILETIME=64;var VT_BLOB=65;var VT_STREAM=66;var VT_STORAGE=67;var VT_STREAMED_Object=68;var VT_STORED_Object=69;var VT_BLOB_Object=70;var VT_CF=71;var VT_CLSID=72;var VT_VERSIONED_STREAM=73;var VT_VECTOR=4096;var VT_ARRAY=8192;var VT_STRING=80;var VT_USTR=81;var VT_CUSTOM=[VT_STRING,VT_USTR]}var DocSummaryPIDDSI={1:{n:"CodePage",t:VT_I2},2:{n:"Category",t:VT_STRING},3:{n:"PresentationFormat",t:VT_STRING},4:{n:"ByteCount",t:VT_I4},5:{n:"LineCount",t:VT_I4},6:{n:"ParagraphCount",t:VT_I4},7:{n:"SlideCount",t:VT_I4},8:{n:"NoteCount",t:VT_I4},9:{n:"HiddenCount",t:VT_I4},10:{n:"MultimediaClipCount",t:VT_I4},11:{n:"Scale",t:VT_BOOL},12:{n:"HeadingPair",t:VT_VECTOR|VT_VARIANT},13:{n:"DocParts",t:VT_VECTOR|VT_LPSTR},14:{n:"Manager",t:VT_STRING},15:{n:"Company",t:VT_STRING},16:{n:"LinksDirty",t:VT_BOOL},17:{n:"CharacterCount",t:VT_I4},19:{n:"SharedDoc",t:VT_BOOL},22:{n:"HLinksChanged",t:VT_BOOL},23:{n:"AppVersion",t:VT_I4,p:"version"},26:{n:"ContentType",t:VT_STRING},27:{n:"ContentStatus",t:VT_STRING},28:{n:"Language",t:VT_STRING},29:{n:"Version",t:VT_STRING},255:{}};var SummaryPIDSI={1:{n:"CodePage",t:VT_I2},2:{n:"Title",t:VT_STRING},3:{n:"Subject",t:VT_STRING},4:{n:"Author",t:VT_STRING},5:{n:"Keywords",t:VT_STRING},6:{n:"Comments",t:VT_STRING},7:{n:"Template",t:VT_STRING},8:{n:"LastAuthor",t:VT_STRING},9:{n:"RevNumber",t:VT_STRING},10:{n:"EditTime",t:VT_FILETIME},11:{n:"LastPrinted",t:VT_FILETIME},12:{n:"CreatedDate",t:VT_FILETIME},13:{n:"ModifiedDate",t:VT_FILETIME},14:{n:"PageCount",t:VT_I4},15:{n:"WordCount",t:VT_I4},16:{n:"CharCount",t:VT_I4},17:{n:"Thumbnail",t:VT_CF},18:{n:"ApplicationName",t:VT_LPSTR},19:{n:"DocumentSecurity",t:VT_I4},255:{}};var SpecialProperties={2147483648:{n:"Locale",t:VT_UI4},2147483651:{n:"Behavior",t:VT_UI4},1919054434:{}};(function(){for(var y in SpecialProperties)if(SpecialProperties.hasOwnProperty(y))DocSummaryPIDDSI[y]=SummaryPIDSI[y]=SpecialProperties[y]})();var CountryEnum={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"};var XLSFillPattern=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function rgbify(arr){return arr.map(function(x){return[x>>16&255,x>>8&255,x&255]})}var XLSIcv=rgbify([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0]);var ct2type={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.ms-excel.chartsheet":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"TODO","application/vnd.ms-excel.dialogsheet":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"TODO","application/vnd.ms-excel.macrosheet":"TODO","application/vnd.ms-excel.macrosheet+xml":"TODO","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.ms-excel.comments":"comments","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"TODO","application/vnd.ms-excel.sheetMetadata":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"TODO","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"vba","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO",sheet:"js"};var CT_LIST=function(){var o={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};keys(o).forEach(function(k){if(!o[k].xlsm)o[k].xlsm=o[k].xlsx});keys(o).forEach(function(k){keys(o[k]).forEach(function(v){ct2type[o[k][v]]=k})});return o}();var type2ct=evert_arr(ct2type);XMLNS.CT="http://schemas.openxmlformats.org/package/2006/content-types";function parse_ct(data,opts){var ctext={};if(!data||!data.match)return data;var ct={workbooks:[],sheets:[],calcchains:[],themes:[],styles:[],coreprops:[],extprops:[],custprops:[],strs:[],comments:[],vba:[],TODO:[],rels:[],xmlns:""};(data.match(tagregex)||[]).forEach(function(x){var y=parsexmltag(x);switch(y[0].replace(nsregex,"<")){case"0?ct.calcchains[0]:"";ct.sst=ct.strs.length>0?ct.strs[0]:"";ct.style=ct.styles.length>0?ct.styles[0]:"";ct.defaults=ctext;delete ct.calcchains;return ct}var CTYPE_XML_ROOT=writextag("Types",null,{xmlns:XMLNS.CT,"xmlns:xsd":XMLNS.xsd,"xmlns:xsi":XMLNS.xsi});var CTYPE_DEFAULTS=[["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["rels",type2ct.rels[0]]].map(function(x){return writextag("Default",null,{Extension:x[0],ContentType:x[1]})});function write_ct(ct,opts){var o=[],v;o[o.length]=XML_HEADER;o[o.length]=CTYPE_XML_ROOT;o=o.concat(CTYPE_DEFAULTS);var f1=function(w){if(ct[w]&&ct[w].length>0){v=ct[w][0];o[o.length]=writextag("Override",null,{PartName:(v[0]=="/"?"":"/")+v,ContentType:CT_LIST[w][opts.bookType||"xlsx"]})}};var f2=function(w){ct[w].forEach(function(v){o[o.length]=writextag("Override",null,{PartName:(v[0]=="/"?"":"/")+v,ContentType:CT_LIST[w][opts.bookType||"xlsx"]})})};var f3=function(t){(ct[t]||[]).forEach(function(v){o[o.length]=writextag("Override",null,{PartName:(v[0]=="/"?"":"/")+v,ContentType:type2ct[t][0]})})};f1("workbooks");f2("sheets");f3("themes");["strs","styles"].forEach(f1);["coreprops","extprops","custprops"].forEach(f3);if(o.length>2){o[o.length]="";o[1]=o[1].replace("/>",">")}return o.join("")}var RELS={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument"};function parse_rels(data,currentFilePath){if(!data)return data;if(currentFilePath.charAt(0)!=="/"){currentFilePath="/"+currentFilePath}var rels={};var hash={};var resolveRelativePathIntoAbsolute=function(to){var toksFrom=currentFilePath.split("/");toksFrom.pop();var toksTo=to.split("/");var reversed=[];while(toksTo.length!==0){var tokTo=toksTo.shift();if(tokTo===".."){toksFrom.pop()}else if(tokTo!=="."){toksFrom.push(tokTo)}}return toksFrom.join("/")};data.match(tagregex).forEach(function(x){var y=parsexmltag(x);if(y[0]==="2){o[o.length]="";o[1]=o[1].replace("/>",">")}return o.join("")}var CORE_PROPS=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];XMLNS.CORE_PROPS="http://schemas.openxmlformats.org/package/2006/metadata/core-properties";RELS.CORE_PROPS="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";var CORE_PROPS_REGEX=function(){var r=new Array(CORE_PROPS.length);for(var i=0;i]*>(.*)")}return r}();function parse_core_props(data){var p={};for(var i=0;i0)p[f[1]]=cur[1];if(f[2]==="date"&&p[f[1]])p[f[1]]=new Date(p[f[1]])}return p}var CORE_PROPS_XML_ROOT=writextag("cp:coreProperties",null,{"xmlns:cp":XMLNS.CORE_PROPS,"xmlns:dc":XMLNS.dc,"xmlns:dcterms":XMLNS.dcterms,"xmlns:dcmitype":XMLNS.dcmitype,"xmlns:xsi":XMLNS.xsi});function cp_doit(f,g,h,o,p){if(p[f]!=null||g==null||g==="")return;p[f]=g;o[o.length]=h?writextag(f,g,h):writetag(f,g)}function write_core_props(cp,opts){var o=[XML_HEADER,CORE_PROPS_XML_ROOT],p={};if(opts&&opts.Props){if(opts.Props.title)o[o.length]=""+opts.Props.title+"";if(opts.Props.subject)o[o.length]=""+opts.Props.subject+"";if(opts.Props.creator)o[o.length]=""+opts.Props.creator+"";if(opts.Props.keywords)o[o.length]=""+opts.Props.keywords+"";if(opts.Props.description)o[o.length]=""+opts.Props.description+""}if(cp){if(cp.CreatedDate!=null)cp_doit("dcterms:created",typeof cp.CreatedDate==="string"?cp.CreatedDate:write_w3cdtf(cp.CreatedDate,opts.WTF),{"xsi:type":"dcterms:W3CDTF"},o,p);if(cp.ModifiedDate!=null)cp_doit("dcterms:modified",typeof cp.ModifiedDate==="string"?cp.ModifiedDate:write_w3cdtf(cp.ModifiedDate,opts.WTF),{"xsi:type":"dcterms:W3CDTF"},o,p);for(var i=0;i!=CORE_PROPS.length;++i){var f=CORE_PROPS[i];cp_doit(f[0],cp[f[1]],null,o,p)}}if(o.length>2){o[o.length]="";o[1]=o[1].replace("/>",">")}return o.join("")}var EXT_PROPS=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];XMLNS.EXT_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties";RELS.EXT_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties";function parse_ext_props(data,p){var q={};if(!p)p={};EXT_PROPS.forEach(function(f){switch(f[2]){case"string":p[f[1]]=(data.match(matchtag(f[0]))||[])[1];break;case"bool":p[f[1]]=(data.match(matchtag(f[0]))||[])[1]==="true";break;case"raw":var cur=data.match(new RegExp("<"+f[0]+"[^>]*>(.*)"));if(cur&&cur.length>0)q[f[1]]=cur[1];break}});if(q.HeadingPairs&&q.TitlesOfParts){var v=parseVector(q.HeadingPairs);var j=0,widx=0;for(var i=0;i!==v.length;++i){switch(v[i].v){case"Worksheets":widx=j;p.Worksheets=+v[++i].v;break;case"Named Ranges":++i;break}}var parts=parseVector(q.TitlesOfParts).map(function(x){return utf8read(x.v)});p.SheetNames=parts.slice(widx,widx+p.Worksheets)}return p}var EXT_PROPS_XML_ROOT=writextag("Properties",null,{xmlns:XMLNS.EXT_PROPS,"xmlns:vt":XMLNS.vt});function write_ext_props(cp,opts){var o=[],p={},W=writextag;if(!cp)cp={};cp.Application="SheetJS";o[o.length]=XML_HEADER;o[o.length]=EXT_PROPS_XML_ROOT;EXT_PROPS.forEach(function(f){if(cp[f[1]]===undefined)return;var v;switch(f[2]){case"string":v=cp[f[1]];break;case"bool":v=cp[f[1]]?"true":"false";break}if(v!==undefined)o[o.length]=W(f[0],v)});o[o.length]=W("HeadingPairs",W("vt:vector",W("vt:variant","Worksheets")+W("vt:variant",W("vt:i4",String(cp.Worksheets))),{size:2,baseType:"variant"}));o[o.length]=W("TitlesOfParts",W("vt:vector",cp.SheetNames.map(function(s){return""+s+""}).join(""),{size:cp.Worksheets,baseType:"lpstr"}));if(o.length>2){o[o.length]="";o[1]=o[1].replace("/>",">")}return o.join("")}XMLNS.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties";RELS.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";var custregex=/<[^>]+>[^<]*/g;function parse_cust_props(data,opts){var p={},name;var m=data.match(custregex);if(m)for(var i=0;i!=m.length;++i){var x=m[i],y=parsexmltag(x);switch(y[0]){case"":name=null;break;default:if(x.indexOf("");var type=toks[0].substring(4),text=toks[1];switch(type){case"lpstr":case"lpwstr":case"bstr":case"lpwstr":p[name]=unescapexml(text);break;case"bool":p[name]=parsexmlbool(text,"");break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":p[name]=parseInt(text,10);break;case"r4":case"r8":case"decimal":p[name]=parseFloat(text);break;case"filetime":case"date":p[name]=new Date(text);break;case"cy":case"error":p[name]=unescapexml(text);break;default:if(typeof console!=="undefined")console.warn("Unexpected",x,type,toks)}}else if(x.substr(0,2)==="2){o[o.length]="";o[1]=o[1].replace("/>",">")}return o.join("")}function xlml_set_prop(Props,tag,val){switch(tag){case"Description":tag="Comments";break}Props[tag]=val}function parse_FILETIME(blob){var dwLowDateTime=blob.read_shift(4),dwHighDateTime=blob.read_shift(4);return new Date((dwHighDateTime/1e7*Math.pow(2,32)+dwLowDateTime/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}function parse_lpstr(blob,type,pad){var str=blob.read_shift(0,"lpstr");if(pad)blob.l+=4-(str.length+1&3)&3;return str}function parse_lpwstr(blob,type,pad){var str=blob.read_shift(0,"lpwstr");if(pad)blob.l+=4-(str.length+1&3)&3;return str}function parse_VtStringBase(blob,stringType,pad){if(stringType===31)return parse_lpwstr(blob);return parse_lpstr(blob,stringType,pad)}function parse_VtString(blob,t,pad){return parse_VtStringBase(blob,t,pad===false?0:4)}function parse_VtUnalignedString(blob,t){if(!t)throw new Error("dafuq?");return parse_VtStringBase(blob,t,0)}function parse_VtVecUnalignedLpstrValue(blob){var length=blob.read_shift(4);var ret=[];for(var i=0;i!=length;++i)ret[i]=blob.read_shift(0,"lpstr");return ret}function parse_VtVecUnalignedLpstr(blob){return parse_VtVecUnalignedLpstrValue(blob)}function parse_VtHeadingPair(blob){var headingString=parse_TypedPropertyValue(blob,VT_USTR);var headerParts=parse_TypedPropertyValue(blob,VT_I4);return[headingString,headerParts]}function parse_VtVecHeadingPairValue(blob){var cElements=blob.read_shift(4);var out=[];for(var i=0;i!=cElements/2;++i)out.push(parse_VtHeadingPair(blob));return out}function parse_VtVecHeadingPair(blob){return parse_VtVecHeadingPairValue(blob)}function parse_dictionary(blob,CodePage){var cnt=blob.read_shift(4);var dict={};for(var j=0;j!=cnt;++j){var pid=blob.read_shift(4);var len=blob.read_shift(4);dict[pid]=blob.read_shift(len,CodePage===1200?"utf16le":"utf8").replace(chr0,"").replace(chr1,"!")}if(blob.l&3)blob.l=blob.l>>2+1<<2;return dict}function parse_BLOB(blob){var size=blob.read_shift(4);var bytes=blob.slice(blob.l,blob.l+size);if(size&3>0)blob.l+=4-(size&3)&3;return bytes}function parse_ClipboardData(blob){var o={};o.Size=blob.read_shift(4);blob.l+=o.Size;return o}function parse_VtVector(blob,cb){}function parse_TypedPropertyValue(blob,type,_opts){var t=blob.read_shift(2),ret,opts=_opts||{};blob.l+=2;if(type!==VT_VARIANT)if(t!==type&&VT_CUSTOM.indexOf(type)===-1)throw new Error("Expected type "+type+" saw "+t);switch(type===VT_VARIANT?t:type){case 2:ret=blob.read_shift(2,"i");if(!opts.raw)blob.l+=2;return ret;case 3:ret=blob.read_shift(4,"i");return ret;case 11:return blob.read_shift(4)!==0;case 19:ret=blob.read_shift(4);return ret;case 30:return parse_lpstr(blob,t,4).replace(chr0,"");case 31:return parse_lpwstr(blob);case 64:return parse_FILETIME(blob);case 65:return parse_BLOB(blob);case 71:return parse_ClipboardData(blob);case 80:return parse_VtString(blob,t,!opts.raw&&4).replace(chr0,"");case 81:return parse_VtUnalignedString(blob,t,4).replace(chr0,"");case 4108:return parse_VtVecHeadingPair(blob);case 4126:return parse_VtVecUnalignedLpstr(blob);default:throw new Error("TypedPropertyValue unrecognized type "+type+" "+t)}}function parse_PropertySet(blob,PIDSI){var start_addr=blob.l;var size=blob.read_shift(4);var NumProps=blob.read_shift(4);var Props=[],i=0;var CodePage=0;var Dictionary=-1,DictObj;for(i=0;i!=NumProps;++i){var PropID=blob.read_shift(4);var Offset=blob.read_shift(4);Props[i]=[PropID,Offset+start_addr]}var PropH={};for(i=0;i!=NumProps;++i){if(blob.l!==Props[i][1]){var fail=true;if(i>0&&PIDSI)switch(PIDSI[Props[i-1][0]].t){case 2:if(blob.l+2===Props[i][1]){blob.l+=2;fail=false}break;case 80:if(blob.l<=Props[i][1]){blob.l=Props[i][1];fail=false}break;case 4108:if(blob.l<=Props[i][1]){blob.l=Props[i][1];fail=false}break}if(!PIDSI&&blob.l<=Props[i][1]){fail=false;blob.l=Props[i][1]}if(fail)throw new Error("Read Error: Expected address "+Props[i][1]+" at "+blob.l+" :"+i)}if(PIDSI){var piddsi=PIDSI[Props[i][0]];PropH[piddsi.n]=parse_TypedPropertyValue(blob,piddsi.t,{raw:true});if(piddsi.p==="version")PropH[piddsi.n]=String(PropH[piddsi.n]>>16)+"."+String(PropH[piddsi.n]&65535);if(piddsi.n=="CodePage")switch(PropH[piddsi.n]){case 0:PropH[piddsi.n]=1252;case 1e4:case 1252:case 874:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 932:case 936:case 949:case 950:case 1200:case 1201:case 65e3:case-536:case 65001:case-535:set_cp(CodePage=PropH[piddsi.n]);break;default:throw new Error("Unsupported CodePage: "+PropH[piddsi.n])}}else{if(Props[i][0]===1){CodePage=PropH.CodePage=parse_TypedPropertyValue(blob,VT_I2);set_cp(CodePage);if(Dictionary!==-1){var oldpos=blob.l;blob.l=Props[Dictionary][1];DictObj=parse_dictionary(blob,CodePage);blob.l=oldpos}}else if(Props[i][0]===0){if(CodePage===0){Dictionary=i;blob.l=Props[i+1][1];continue}DictObj=parse_dictionary(blob,CodePage)}else{var name=DictObj[Props[i][0]];var val;switch(blob[blob.l]){case 65:blob.l+=4;val=parse_BLOB(blob);break;case 30:blob.l+=4;val=parse_VtString(blob,blob[blob.l-4]);break;case 31:blob.l+=4;val=parse_VtString(blob,blob[blob.l-4]);break;case 3:blob.l+=4;val=blob.read_shift(4,"i");break;case 19:blob.l+=4;val=blob.read_shift(4);break;case 5:blob.l+=4;val=blob.read_shift(8,"f");break;case 11:blob.l+=4;val=parsebool(blob,4);break;case 64:blob.l+=4;val=new Date(parse_FILETIME(blob));break;default:throw new Error("unparsed value: "+blob[blob.l])}PropH[name]=val}}}blob.l=start_addr+size;return PropH}function parse_PropertySetStream(file,PIDSI){var blob=file.content;prep_blob(blob,0);var NumSets,FMTID0,FMTID1,Offset0,Offset1;blob.chk("feff","Byte Order: ");var vers=blob.read_shift(2);var SystemIdentifier=blob.read_shift(4);blob.chk(CFB.utils.consts.HEADER_CLSID,"CLSID: ");NumSets=blob.read_shift(4);if(NumSets!==1&&NumSets!==2)throw"Unrecognized #Sets: "+NumSets;FMTID0=blob.read_shift(16);Offset0=blob.read_shift(4);if(NumSets===1&&Offset0!==blob.l)throw"Length mismatch";else if(NumSets===2){FMTID1=blob.read_shift(16);Offset1=blob.read_shift(4)}var PSet0=parse_PropertySet(blob,PIDSI);var rval={SystemIdentifier:SystemIdentifier};for(var y in PSet0)rval[y]=PSet0[y];rval.FMTID=FMTID0;if(NumSets===1)return rval;if(blob.l!==Offset1)throw"Length mismatch 2: "+blob.l+" !== "+Offset1;var PSet1;try{PSet1=parse_PropertySet(blob,null)}catch(e){}for(y in PSet1)rval[y]=PSet1[y];rval.FMTID=[FMTID0,FMTID1];return rval}function parsenoop2(blob,length){blob.read_shift(length);return null}function parslurp(blob,length,cb){var arr=[],target=blob.l+length;while(blob.l=8)current_codepage=1200;if(opts===undefined||opts.biff!==5){var fHighByte=blob.read_shift(1);if(fHighByte){width=2;encoding="dbcs-cont"}}var o=cch?blob.read_shift(cch,encoding):"";current_codepage=cp;return o}function parse_XLUnicodeRichExtendedString(blob){var cp=current_codepage;current_codepage=1200;var cch=blob.read_shift(2),flags=blob.read_shift(1);var fHighByte=flags&1,fExtSt=flags&4,fRichSt=flags&8;var width=1+(flags&1);var cRun,cbExtRst;var z={};if(fRichSt)cRun=blob.read_shift(2);if(fExtSt)cbExtRst=blob.read_shift(4);var encoding=flags&1?"dbcs-cont":"sbcs-cont";var msg=cch===0?"":blob.read_shift(cch,encoding);if(fRichSt)blob.l+=4*cRun;if(fExtSt)blob.l+=cbExtRst;z.t=msg;if(!fRichSt){z.raw=""+z.t+"";z.r=z.t}current_codepage=cp;return z}function parse_XLUnicodeStringNoCch(blob,cch,opts){var retval;var fHighByte=blob.read_shift(1);if(fHighByte===0){retval=blob.read_shift(cch,"sbcs-cont")}else{retval=blob.read_shift(cch,"dbcs-cont")}return retval}function parse_XLUnicodeString(blob,length,opts){var cch=blob.read_shift(opts!==undefined&&opts.biff>0&&opts.biff<8?1:2);if(cch===0){blob.l++;return""}return parse_XLUnicodeStringNoCch(blob,cch,opts)}function parse_XLUnicodeString2(blob,length,opts){if(opts.biff!==5&&opts.biff!==2)return parse_XLUnicodeString(blob,length,opts);var cch=blob.read_shift(1);if(cch===0){blob.l++;return""}return blob.read_shift(cch,"sbcs-cont")}var parse_ControlInfo=parsenoop;var parse_URLMoniker=function(blob,length){var len=blob.read_shift(4),start=blob.l;var extra=false;if(len>24){blob.l+=len-24;if(blob.read_shift(16)==="795881f43b1d7f48af2c825dc4852763")extra=true;blob.l=start}var url=blob.read_shift((extra?len-24:len)>>1,"utf16le").replace(chr0,"");if(extra)blob.l+=24;return url};var parse_FileMoniker=function(blob,length){var cAnti=blob.read_shift(2);var ansiLength=blob.read_shift(4);var ansiPath=blob.read_shift(ansiLength,"cstr");var endServer=blob.read_shift(2);var versionNumber=blob.read_shift(2);var cbUnicodePathSize=blob.read_shift(4);if(cbUnicodePathSize===0)return ansiPath.replace(/\\/g,"/");var cbUnicodePathBytes=blob.read_shift(4);var usKeyValue=blob.read_shift(2);var unicodePath=blob.read_shift(cbUnicodePathBytes>>1,"utf16le").replace(chr0,"");return unicodePath};var parse_HyperlinkMoniker=function(blob,length){var clsid=blob.read_shift(16);length-=16;switch(clsid){case"e0c9ea79f9bace118c8200aa004ba90b":return parse_URLMoniker(blob,length);case"0303000000000000c000000000000046":return parse_FileMoniker(blob,length);default:throw"unsupported moniker "+clsid}};var parse_HyperlinkString=function(blob,length){var len=blob.read_shift(4);var o=blob.read_shift(len,"utf16le").replace(chr0,"");return o};var parse_Hyperlink=function(blob,length){var end=blob.l+length;var sVer=blob.read_shift(4);if(sVer!==2)throw new Error("Unrecognized streamVersion: "+sVer);var flags=blob.read_shift(2);blob.l+=2;var displayName,targetFrameName,moniker,oleMoniker,location,guid,fileTime;if(flags&16)displayName=parse_HyperlinkString(blob,end-blob.l);if(flags&128)targetFrameName=parse_HyperlinkString(blob,end-blob.l);if((flags&257)===257)moniker=parse_HyperlinkString(blob,end-blob.l);if((flags&257)===1)oleMoniker=parse_HyperlinkMoniker(blob,end-blob.l);if(flags&8)location=parse_HyperlinkString(blob,end-blob.l);if(flags&32)guid=blob.read_shift(16);if(flags&64)fileTime=parse_FILETIME(blob,8);blob.l=end;var target=targetFrameName||moniker||oleMoniker;if(location)target+="#"+location;return{Target:target}};function parse_LongRGBA(blob,length){var r=blob.read_shift(1),g=blob.read_shift(1),b=blob.read_shift(1),a=blob.read_shift(1);return[r,g,b,a]}function parse_LongRGB(blob,length){var x=parse_LongRGBA(blob,length);x[3]=0;return x}function parse_XLSCell(blob,length){var rw=blob.read_shift(2);var col=blob.read_shift(2);var ixfe=blob.read_shift(2);return{r:rw,c:col,ixfe:ixfe}}function parse_frtHeader(blob){var rt=blob.read_shift(2);var flags=blob.read_shift(2);blob.l+=8;return{type:rt,flags:flags}}function parse_OptXLUnicodeString(blob,length,opts){return length===0?"":parse_XLUnicodeString2(blob,length,opts)}var HIDEOBJENUM=["SHOWALL","SHOWPLACEHOLDER","HIDEALL"];var parse_HideObjEnum=parseuint16;function parse_XTI(blob,length){var iSupBook=blob.read_shift(2),itabFirst=blob.read_shift(2,"i"),itabLast=blob.read_shift(2,"i");return[iSupBook,itabFirst,itabLast]}function parse_RkRec(blob,length){var ixfe=blob.read_shift(2);var RK=parse_RkNumber(blob);return[ixfe,RK]}function parse_AddinUdf(blob,length){blob.l+=4;length-=4;var l=blob.l+length;var udfName=parse_ShortXLUnicodeString(blob,length);var cb=blob.read_shift(2);l-=blob.l;if(cb!==l)throw"Malformed AddinUdf: padding = "+l+" != "+cb;blob.l+=cb;return udfName}function parse_Ref8U(blob,length){var rwFirst=blob.read_shift(2);var rwLast=blob.read_shift(2);var colFirst=blob.read_shift(2);var colLast=blob.read_shift(2);return{s:{c:colFirst,r:rwFirst},e:{c:colLast,r:rwLast}}}function parse_RefU(blob,length){var rwFirst=blob.read_shift(2);var rwLast=blob.read_shift(2);var colFirst=blob.read_shift(1);var colLast=blob.read_shift(1);return{s:{c:colFirst,r:rwFirst},e:{c:colLast,r:rwLast}}}var parse_Ref=parse_RefU;function parse_FtCmo(blob,length){blob.l+=4;var ot=blob.read_shift(2);var id=blob.read_shift(2);var flags=blob.read_shift(2);blob.l+=12;return[id,ot,flags]}function parse_FtNts(blob,length){var out={};blob.l+=4;blob.l+=16;out.fSharedNote=blob.read_shift(2);blob.l+=4;return out}function parse_FtCf(blob,length){var out={};blob.l+=4;blob.cf=blob.read_shift(2);return out}var FtTab={21:parse_FtCmo,19:parsenoop,18:function(blob,length){blob.l+=12},17:function(blob,length){blob.l+=8},16:parsenoop,15:parsenoop,13:parse_FtNts,12:function(blob,length){blob.l+=24},11:function(blob,length){blob.l+=10},10:function(blob,length){blob.l+=16},9:parsenoop,8:function(blob,length){blob.l+=6},7:parse_FtCf,6:function(blob,length){blob.l+=6},4:parsenoop,0:function(blob,length){blob.l+=4}};function parse_FtArray(blob,length,ot){var s=blob.l;var fts=[];while(blob.l