Browse Source

watero框架更新

wangxiaoming 5 years ago
parent
commit
18f33bd5e8
100 changed files with 82178 additions and 0 deletions
  1. 19 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/series-label.js
  2. 606 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/series-label.src.js
  3. 14 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/solid-gauge.js
  4. 305 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/solid-gauge.src.js
  5. 29 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/treemap.js
  6. 881 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/treemap.src.js
  7. 15 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/xrange-series.js
  8. 254 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/xrange-series.src.js
  9. 129 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/sand-signika.js
  10. 112 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/skies.js
  11. 228 0
      watero-wechat-web/src/main/webapp/common/lib/jquery.validation/1.14.0/validate-methods.js
  12. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/images/success.gif
  13. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/images/success.png
  14. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/background/images/success.png
  15. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/tface.gif
  16. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/wface.gif
  17. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/yface.gif
  18. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/image/images/success.gif
  19. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/image/images/success.png
  20. 118 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/map/show.html
  21. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/scale.png
  22. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/scaleH.png
  23. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/size.png
  24. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/undo.png
  25. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/undoH.png
  26. 72 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/scrawl.css
  27. 95 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/scrawl.html
  28. 671 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/scrawl.js
  29. 102 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/searchreplace/searchreplace.html
  30. 164 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/searchreplace/searchreplace.js
  31. 58 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/snapscreen/snapscreen.html
  32. 21 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/spechars/spechars.html
  33. 57 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/spechars/spechars.js
  34. 18 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/template/template.css
  35. 26 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/template/template.html
  36. 53 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/template/template.js
  37. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/images/success.gif
  38. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/images/success.png
  39. 635 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/video.css
  40. 86 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/video.html
  41. 789 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/video.js
  42. 53 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/webapp/webapp.html
  43. 1495 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/wordimage/tangram.js
  44. 111 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/wordimage/wordimage.html
  45. 157 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/wordimage/wordimage.js
  46. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/lang/en/images/rotaterightenable.png
  47. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/lang/en/images/upload.png
  48. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/lang/zh-cn/images/upload.png
  49. 1903 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/css/ueditor.css
  50. 8 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/css/ueditor.min.css
  51. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/scale.png
  52. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/sortable.png
  53. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/spacer.gif
  54. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/sparator_v.png
  55. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/table-cell-align.png
  56. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/tangram-colorpicker.png
  57. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/toolbar_bg.png
  58. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/unhighlighted.gif
  59. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/upload.png
  60. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/videologo.gif
  61. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/word.gif
  62. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/wordpaste.png
  63. 3655 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/SyntaxHighlighter/shCore.js
  64. 1 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/SyntaxHighlighter/shCoreDefault.css
  65. 17 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/highcharts/adapters/standalone-framework.js
  66. 583 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/highcharts/adapters/standalone-framework.src.js
  67. 89 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/highcharts/themes/skies.js
  68. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/snapscreen/UEditorSnapscreen.exe
  69. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/font/vjs.eot
  70. 65 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/font/vjs.svg
  71. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/font/vjs.ttf
  72. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/font/vjs.woff
  73. 766 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video-js.css
  74. 5 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video-js.min.css
  75. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video-js.swf
  76. 7108 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video.dev.js
  77. 129 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video.js
  78. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/Uploader.swf
  79. 28 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.css
  80. 5670 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.custom.js
  81. 2 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.custom.min.js
  82. 4176 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.flashonly.js
  83. 2 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.flashonly.min.js
  84. 5559 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.html5only.js
  85. 2 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.html5only.min.js
  86. 6733 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.js
  87. 2 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.min.js
  88. 4593 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.withoutimage.js
  89. 2 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.withoutimage.min.js
  90. 1256 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/zeroclipboard/ZeroClipboard.js
  91. 9 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/zeroclipboard/ZeroClipboard.min.js
  92. 29429 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.all.js
  93. 709 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.all.min.js
  94. 413 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.config.js
  95. 1022 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.parse.js
  96. 28 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.parse.min.js
  97. BIN
      watero-wechat-web/src/main/webapp/common/lib/webuploader/0.1.5/Uploader.swf
  98. 268 0
      watero-wechat-web/src/main/webapp/common/lib/webuploader/0.1.5/cropper/uploader.js
  99. 573 0
      watero-wechat-web/src/main/webapp/common/lib/webuploader/0.1.5/image-upload/upload.js
  100. 0 0
      watero-wechat-web/src/main/webapp/common/lib/webuploader/0.1.5/images/Thumbs.db

File diff suppressed because it is too large
+ 19 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/series-label.js


+ 606 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/series-label.src.js

@@ -0,0 +1,606 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ *
+ * (c) 2009-2016 Torstein Honsi
+ *
+ * License: www.highcharts.com/license
+ */
+(function(factory) {
+    if (typeof module === 'object' && module.exports) {
+        module.exports = factory;
+    } else {
+        factory(Highcharts);
+    }
+}(function(Highcharts) {
+    (function(H) {
+        /**
+         * (c) 2009-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         */
+        /**
+         * EXPERIMENTAL Highcharts module to place labels next to a series in a natural position.
+         *
+         * TODO:
+         * - add column support (box collision detection, boxesToAvoid logic)
+         * - other series types, area etc.
+         * - avoid data labels, when data labels above, show series label below.
+         * - add more options (connector, format, formatter)
+         * 
+         * http://jsfiddle.net/highcharts/L2u9rpwr/
+         * http://jsfiddle.net/highcharts/y5A37/
+         * http://jsfiddle.net/highcharts/264Nm/
+         * http://jsfiddle.net/highcharts/y5A37/
+         */
+
+        'use strict';
+
+        var labelDistance = 3,
+            wrap = H.wrap,
+            each = H.each,
+            extend = H.extend,
+            isNumber = H.isNumber,
+            Series = H.Series,
+            SVGRenderer = H.SVGRenderer,
+            Chart = H.Chart;
+
+        H.setOptions({
+            plotOptions: {
+                series: {
+                    label: {
+                        enabled: true,
+                        // Allow labels to be placed distant to the graph if necessary, and
+                        // draw a connector line to the graph
+                        connectorAllowed: true,
+                        connectorNeighbourDistance: 24, // If the label is closer than this to a neighbour graph, draw a connector
+                        styles: {
+                            fontWeight: 'bold'
+                        }
+                        // boxesToAvoid: []
+                    }
+                }
+            }
+        });
+
+        /**
+         * Counter-clockwise, part of the fast line intersection logic
+         */
+        function ccw(x1, y1, x2, y2, x3, y3) {
+            var cw = ((y3 - y1) * (x2 - x1)) - ((y2 - y1) * (x3 - x1));
+            return cw > 0 ? true : cw < 0 ? false : true;
+        }
+
+        /**
+         * Detect if two lines intersect
+         */
+        function intersectLine(x1, y1, x2, y2, x3, y3, x4, y4) {
+            return ccw(x1, y1, x3, y3, x4, y4) !== ccw(x2, y2, x3, y3, x4, y4) &&
+                ccw(x1, y1, x2, y2, x3, y3) !== ccw(x1, y1, x2, y2, x4, y4);
+        }
+
+        /**
+         * Detect if a box intersects with a line
+         */
+        function boxIntersectLine(x, y, w, h, x1, y1, x2, y2) {
+            return (
+                intersectLine(x, y, x + w, y, x1, y1, x2, y2) || // top of label
+                intersectLine(x + w, y, x + w, y + h, x1, y1, x2, y2) || // right of label
+                intersectLine(x, y + h, x + w, y + h, x1, y1, x2, y2) || // bottom of label
+                intersectLine(x, y, x, y + h, x1, y1, x2, y2) // left of label
+            );
+        }
+
+        /**
+         * General symbol definition for labels with connector
+         */
+        SVGRenderer.prototype.symbols.connector = function(x, y, w, h, options) {
+            var anchorX = options && options.anchorX,
+                anchorY = options && options.anchorY,
+                path,
+                yOffset,
+                lateral = w / 2;
+
+            if (isNumber(anchorX) && isNumber(anchorY)) {
+
+                path = ['M', anchorX, anchorY];
+
+                // Prefer 45 deg connectors
+                yOffset = y - anchorY;
+                if (yOffset < 0) {
+                    yOffset = -h - yOffset;
+                }
+                if (yOffset < w) {
+                    lateral = anchorX < x + (w / 2) ? yOffset : w - yOffset;
+                }
+
+                // Anchor below label
+                if (anchorY > y + h) {
+                    path.push('L', x + lateral, y + h);
+
+                    // Anchor above label
+                } else if (anchorY < y) {
+                    path.push('L', x + lateral, y);
+
+                    // Anchor left of label
+                } else if (anchorX < x) {
+                    path.push('L', x, y + h / 2);
+
+                    // Anchor right of label
+                } else if (anchorX > x + w) {
+                    path.push('L', x + w, y + h / 2);
+                }
+            }
+            return path || [];
+        };
+
+        /**
+         * Points to avoid. In addition to actual data points, the label should avoid
+         * interpolated positions.
+         */
+        Series.prototype.getPointsOnGraph = function() {
+            var distance = 16,
+                points = this.points,
+                point,
+                last,
+                interpolated = [],
+                i,
+                deltaX,
+                deltaY,
+                delta,
+                len,
+                n,
+                j,
+                d,
+                graph = this.graph || this.area,
+                node = graph.element,
+                inverted = this.chart.inverted,
+                paneLeft = inverted ? this.yAxis.pos : this.xAxis.pos,
+                paneTop = inverted ? this.xAxis.pos : this.yAxis.pos;
+
+            // For splines, get the point at length (possible caveat: peaks are not correctly detected)
+            if (this.getPointSpline && node.getPointAtLength) {
+                // If it is animating towards a path definition, use that briefly, and reset
+                if (graph.toD) {
+                    d = graph.attr('d');
+                    graph.attr({
+                        d: graph.toD
+                    });
+                }
+                len = node.getTotalLength();
+                for (i = 0; i < len; i += distance) {
+                    point = node.getPointAtLength(i);
+                    interpolated.push({
+                        chartX: paneLeft + point.x,
+                        chartY: paneTop + point.y,
+                        plotX: point.x,
+                        plotY: point.y
+                    });
+                }
+                if (d) {
+                    graph.attr({
+                        d: d
+                    });
+                }
+                // Last point
+                point = points[points.length - 1];
+                point.chartX = paneLeft + point.plotX;
+                point.chartY = paneTop + point.plotY;
+                interpolated.push(point);
+
+                // Interpolate
+            } else {
+                len = points.length;
+                for (i = 0; i < len; i += 1) {
+
+                    point = points[i];
+                    last = points[i - 1];
+
+                    // Absolute coordinates so we can compare different panes
+                    point.chartX = paneLeft + point.plotX;
+                    point.chartY = paneTop + point.plotY;
+
+                    // Add interpolated points
+                    if (i > 0) {
+                        deltaX = Math.abs(point.chartX - last.chartX);
+                        deltaY = Math.abs(point.chartY - last.chartY);
+                        delta = Math.max(deltaX, deltaY);
+                        if (delta > distance) {
+
+                            n = Math.ceil(delta / distance);
+
+                            for (j = 1; j < n; j += 1) {
+                                interpolated.push({
+                                    chartX: last.chartX + (point.chartX - last.chartX) * (j / n),
+                                    chartY: last.chartY + (point.chartY - last.chartY) * (j / n),
+                                    plotX: last.plotX + (point.plotX - last.plotX) * (j / n),
+                                    plotY: last.plotY + (point.plotY - last.plotY) * (j / n)
+                                });
+                            }
+                        }
+                    }
+
+                    // Add the real point in order to find positive and negative peaks
+                    if (isNumber(point.plotY)) {
+                        interpolated.push(point);
+                    }
+                }
+            }
+            return interpolated;
+        };
+
+        /**
+         * Check whether a proposed label position is clear of other elements
+         */
+        Series.prototype.checkClearPoint = function(x, y, bBox, checkDistance) {
+            var distToOthersSquared = Number.MAX_VALUE, // distance to other graphs
+                distToPointSquared = Number.MAX_VALUE,
+                dist,
+                connectorPoint,
+                connectorEnabled = this.options.label.connectorAllowed,
+
+                chart = this.chart,
+                series,
+                points,
+                leastDistance = 16,
+                withinRange,
+                i,
+                j;
+
+            function intersectRect(r1, r2) {
+                return !(r2.left > r1.right ||
+                    r2.right < r1.left ||
+                    r2.top > r1.bottom ||
+                    r2.bottom < r1.top);
+            }
+
+            /**
+             * Get the weight in order to determine the ideal position. Larger distance to
+             * other series gives more weight. Smaller distance to the actual point (connector points only)
+             * gives more weight.
+             */
+            function getWeight(distToOthersSquared, distToPointSquared) {
+                return distToOthersSquared - distToPointSquared;
+            }
+
+            // First check for collision with existing labels
+            for (i = 0; i < chart.boxesToAvoid.length; i += 1) {
+                if (intersectRect(chart.boxesToAvoid[i], {
+                        left: x,
+                        right: x + bBox.width,
+                        top: y,
+                        bottom: y + bBox.height
+                    })) {
+                    return false;
+                }
+            }
+
+            // For each position, check if the lines around the label intersect with any of the 
+            // graphs
+            for (i = 0; i < chart.series.length; i += 1) {
+                series = chart.series[i];
+                points = series.interpolatedPoints;
+                if (series.visible && points) {
+                    for (j = 1; j < points.length; j += 1) {
+                        // If any of the box sides intersect with the line, return
+                        if (boxIntersectLine(
+                                x,
+                                y,
+                                bBox.width,
+                                bBox.height,
+                                points[j - 1].chartX,
+                                points[j - 1].chartY,
+                                points[j].chartX,
+                                points[j].chartY
+                            )) {
+                            return false;
+                        }
+
+                        // But if it is too far away (a padded box doesn't intersect), also return
+                        if (this === series && !withinRange && checkDistance) {
+                            withinRange = boxIntersectLine(
+                                x - leastDistance,
+                                y - leastDistance,
+                                bBox.width + 2 * leastDistance,
+                                bBox.height + 2 * leastDistance,
+                                points[j - 1].chartX,
+                                points[j - 1].chartY,
+                                points[j].chartX,
+                                points[j].chartY
+                            );
+                        }
+
+                        // Find the squared distance from the center of the label
+                        if (this !== series) {
+                            distToOthersSquared = Math.min(
+                                distToOthersSquared,
+                                Math.pow(x + bBox.width / 2 - points[j].chartX, 2) + Math.pow(y + bBox.height / 2 - points[j].chartY, 2),
+                                Math.pow(x - points[j].chartX, 2) + Math.pow(y - points[j].chartY, 2),
+                                Math.pow(x + bBox.width - points[j].chartX, 2) + Math.pow(y - points[j].chartY, 2),
+                                Math.pow(x + bBox.width - points[j].chartX, 2) + Math.pow(y + bBox.height - points[j].chartY, 2),
+                                Math.pow(x - points[j].chartX, 2) + Math.pow(y + bBox.height - points[j].chartY, 2)
+                            );
+                        }
+                    }
+
+                    // Do we need a connector? 
+                    if (connectorEnabled && this === series && ((checkDistance && !withinRange) ||
+                            distToOthersSquared < Math.pow(this.options.label.connectorNeighbourDistance, 2))) {
+                        for (j = 1; j < points.length; j += 1) {
+                            dist = Math.min(
+                                Math.pow(x + bBox.width / 2 - points[j].chartX, 2) + Math.pow(y + bBox.height / 2 - points[j].chartY, 2),
+                                Math.pow(x - points[j].chartX, 2) + Math.pow(y - points[j].chartY, 2),
+                                Math.pow(x + bBox.width - points[j].chartX, 2) + Math.pow(y - points[j].chartY, 2),
+                                Math.pow(x + bBox.width - points[j].chartX, 2) + Math.pow(y + bBox.height - points[j].chartY, 2),
+                                Math.pow(x - points[j].chartX, 2) + Math.pow(y + bBox.height - points[j].chartY, 2)
+                            );
+                            if (dist < distToPointSquared) {
+                                distToPointSquared = dist;
+                                connectorPoint = points[j];
+                            }
+                        }
+                        withinRange = true;
+                    }
+                }
+            }
+
+            return !checkDistance || withinRange ? {
+                x: x,
+                y: y,
+                weight: getWeight(distToOthersSquared, connectorPoint ? distToPointSquared : 0),
+                connectorPoint: connectorPoint
+            } : false;
+
+        };
+
+        /**
+         * The main initiator method that runs on chart level after initiation and redraw. It runs in 
+         * a timeout to prevent locking, and loops over all series, taking all series and labels into
+         * account when placing the labels.
+         */
+        Chart.prototype.drawSeriesLabels = function() {
+            var chart = this,
+                labelSeries = this.labelSeries;
+
+            chart.boxesToAvoid = [];
+
+            // Build the interpolated points
+            each(labelSeries, function(series) {
+                series.interpolatedPoints = series.getPointsOnGraph();
+
+                each(series.options.label.boxesToAvoid || [], function(box) {
+                    chart.boxesToAvoid.push(box);
+                });
+            });
+
+            each(chart.series, function(series) {
+                var bBox,
+                    x,
+                    y,
+                    results = [],
+                    clearPoint,
+                    i,
+                    best,
+                    inverted = chart.inverted,
+                    paneLeft = inverted ? series.yAxis.pos : series.xAxis.pos,
+                    paneTop = inverted ? series.xAxis.pos : series.yAxis.pos,
+                    paneWidth = chart.inverted ? series.yAxis.len : series.xAxis.len,
+                    paneHeight = chart.inverted ? series.xAxis.len : series.yAxis.len,
+                    points = series.interpolatedPoints,
+                    label = series.labelBySeries;
+
+                function insidePane(x, y, bBox) {
+                    return x > paneLeft && x <= paneLeft + paneWidth - bBox.width &&
+                        y >= paneTop && y <= paneTop + paneHeight - bBox.height;
+                }
+
+                if (series.visible && points) {
+                    if (!label) {
+                        series.labelBySeries = label = chart.renderer
+                            .label(series.name, 0, -9999, 'connector')
+                            .css(extend({
+                                color: series.color
+                            }, series.options.label.styles))
+                            .attr({
+                                padding: 0,
+                                opacity: 0,
+                                stroke: series.color,
+                                'stroke-width': 1
+                            })
+                            .add(series.group)
+                            .animate({
+                                opacity: 1
+                            }, {
+                                duration: 200
+                            });
+                    }
+
+                    bBox = label.getBBox();
+                    bBox.width = Math.round(bBox.width);
+
+                    // Ideal positions are centered above or below a point on right side
+                    // of chart
+                    for (i = points.length - 1; i > 0; i -= 1) {
+
+                        // Right - up
+                        x = points[i].chartX + labelDistance;
+                        y = points[i].chartY - bBox.height - labelDistance;
+                        if (insidePane(x, y, bBox)) {
+                            best = series.checkClearPoint(
+                                x,
+                                y,
+                                bBox
+                            );
+                        }
+                        if (best) {
+                            results.push(best);
+                        }
+
+                        // Right - down
+                        x = points[i].chartX + labelDistance;
+                        y = points[i].chartY + labelDistance;
+                        if (insidePane(x, y, bBox)) {
+                            best = series.checkClearPoint(
+                                x,
+                                y,
+                                bBox
+                            );
+                        }
+                        if (best) {
+                            results.push(best);
+                        }
+
+                        // Left - down
+                        x = points[i].chartX - bBox.width - labelDistance;
+                        y = points[i].chartY + labelDistance;
+                        if (insidePane(x, y, bBox)) {
+                            best = series.checkClearPoint(
+                                x,
+                                y,
+                                bBox
+                            );
+                        }
+                        if (best) {
+                            results.push(best);
+                        }
+
+                        // Left - up
+                        x = points[i].chartX - bBox.width - labelDistance;
+                        y = points[i].chartY - bBox.height - labelDistance;
+                        if (insidePane(x, y, bBox)) {
+                            best = series.checkClearPoint(
+                                x,
+                                y,
+                                bBox
+                            );
+                        }
+                        if (best) {
+                            results.push(best);
+                        }
+
+                    }
+
+                    // Brute force, try all positions on the chart in a 16x16 grid
+                    if (!results.length) {
+                        for (x = paneLeft + paneWidth - bBox.width; x >= paneLeft; x -= 16) {
+                            for (y = paneTop; y < paneTop + paneHeight - bBox.height; y += 16) {
+                                clearPoint = series.checkClearPoint(x, y, bBox, true);
+                                if (clearPoint) {
+                                    results.push(clearPoint);
+                                }
+                            }
+                        }
+                    }
+
+                    if (results.length) {
+
+                        results.sort(function(a, b) {
+                            return b.weight - a.weight;
+                        });
+
+                        best = results[0];
+
+                        chart.boxesToAvoid.push({
+                            left: best.x,
+                            right: best.x + bBox.width,
+                            top: best.y,
+                            bottom: best.y + bBox.height
+                        });
+
+                        // Move it if needed
+                        if (Math.round(best.x) !== Math.round(label.x) ||
+                            Math.round(best.y) !== Math.round(label.y)) {
+                            series.labelBySeries
+                                .attr({
+                                    opacity: 0,
+                                    x: best.x - paneLeft,
+                                    y: best.y - paneTop,
+                                    anchorX: best.connectorPoint && best.connectorPoint.plotX,
+                                    anchorY: best.connectorPoint && best.connectorPoint.plotY
+                                })
+                                .animate({
+                                    opacity: 1
+                                });
+
+                            // Record closest point to stick to for sync redraw
+                            series.options.kdNow = true;
+                            series.buildKDTree();
+                            var closest = series.searchPoint({
+                                chartX: best.x,
+                                chartY: best.y
+                            }, true);
+                            label.closest = [
+                                closest,
+                                best.x - paneLeft - closest.plotX,
+                                best.y - paneTop - closest.plotY
+                            ];
+
+                        }
+
+                    } else if (label) {
+                        series.labelBySeries = label.destroy();
+                    }
+                }
+            });
+        };
+
+        /**
+         * Prepare drawing series labels
+         */
+        function drawLabels(proceed) {
+
+            var chart = this,
+                delay = Math.max(
+                    H.animObject(chart.renderer.globalAnimation).duration,
+                    250
+                ),
+                initial = !chart.hasRendered;
+
+            proceed.apply(chart, [].slice.call(arguments, 1));
+
+            chart.labelSeries = [];
+
+            clearTimeout(chart.seriesLabelTimer);
+
+            // Which series should have labels
+            each(chart.series, function(series) {
+                var options = series.options.label,
+                    label = series.labelBySeries,
+                    closest = label && label.closest;
+
+                if (options.enabled && series.visible && (series.graph || series.area)) {
+                    chart.labelSeries.push(series);
+
+                    // The labels are processing heavy, wait until the animation is done
+                    if (initial) {
+                        delay = Math.max(
+                            delay,
+                            H.animObject(series.options.animation).duration
+                        );
+                    }
+
+                    // Keep the position updated to the axis while redrawing
+                    if (closest) {
+                        if (closest[0].plotX !== undefined) {
+                            label.animate({
+                                x: closest[0].plotX + closest[1],
+                                y: closest[0].plotY + closest[2]
+                            });
+                        } else {
+                            label.attr({
+                                opacity: 0
+                            });
+                        }
+                    }
+                }
+            });
+
+            chart.seriesLabelTimer = setTimeout(function() {
+                chart.drawSeriesLabels();
+            }, delay);
+
+        }
+        wrap(Chart.prototype, 'render', drawLabels);
+        wrap(Chart.prototype, 'redraw', drawLabels);
+
+    }(Highcharts));
+}));

File diff suppressed because it is too large
+ 14 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/solid-gauge.js


+ 305 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/solid-gauge.src.js

@@ -0,0 +1,305 @@
+/**
+ * @license  Highcharts JS v5.0.6 (2016-12-07)
+ * Solid angular gauge module
+ *
+ * (c) 2010-2016 Torstein Honsi
+ *
+ * License: www.highcharts.com/license
+ */
+(function(factory) {
+    if (typeof module === 'object' && module.exports) {
+        module.exports = factory;
+    } else {
+        factory(Highcharts);
+    }
+}(function(Highcharts) {
+    (function(H) {
+        /**
+         * Solid angular gauge module
+         *
+         * (c) 2010-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         */
+
+        'use strict';
+
+        var pInt = H.pInt,
+            pick = H.pick,
+            each = H.each,
+            isNumber = H.isNumber,
+            colorAxisMethods;
+
+        // These methods are defined in the ColorAxis object, and copied here.
+        // If we implement an AMD system we should make ColorAxis a dependency.
+        colorAxisMethods = {
+
+
+            initDataClasses: function(userOptions) {
+                var axis = this,
+                    chart = this.chart,
+                    dataClasses,
+                    colorCounter = 0,
+                    options = this.options;
+                this.dataClasses = dataClasses = [];
+
+                each(userOptions.dataClasses, function(dataClass, i) {
+                    var colors;
+
+                    dataClass = H.merge(dataClass);
+                    dataClasses.push(dataClass);
+                    if (!dataClass.color) {
+                        if (options.dataClassColor === 'category') {
+                            colors = chart.options.colors;
+                            dataClass.color = colors[colorCounter++];
+                            // loop back to zero
+                            if (colorCounter === colors.length) {
+                                colorCounter = 0;
+                            }
+                        } else {
+                            dataClass.color = axis.tweenColors(H.color(options.minColor), H.color(options.maxColor), i / (userOptions.dataClasses.length - 1));
+                        }
+                    }
+                });
+            },
+
+            initStops: function(userOptions) {
+                this.stops = userOptions.stops || [
+                    [0, this.options.minColor],
+                    [1, this.options.maxColor]
+                ];
+                each(this.stops, function(stop) {
+                    stop.color = H.color(stop[1]);
+                });
+            },
+            /** 
+             * Translate from a value to a color
+             */
+            toColor: function(value, point) {
+                var pos,
+                    stops = this.stops,
+                    from,
+                    to,
+                    color,
+                    dataClasses = this.dataClasses,
+                    dataClass,
+                    i;
+
+                if (dataClasses) {
+                    i = dataClasses.length;
+                    while (i--) {
+                        dataClass = dataClasses[i];
+                        from = dataClass.from;
+                        to = dataClass.to;
+                        if ((from === undefined || value >= from) && (to === undefined || value <= to)) {
+                            color = dataClass.color;
+                            if (point) {
+                                point.dataClass = i;
+                            }
+                            break;
+                        }
+                    }
+
+                } else {
+
+                    if (this.isLog) {
+                        value = this.val2lin(value);
+                    }
+                    pos = 1 - ((this.max - value) / (this.max - this.min));
+                    i = stops.length;
+                    while (i--) {
+                        if (pos > stops[i][0]) {
+                            break;
+                        }
+                    }
+                    from = stops[i] || stops[i + 1];
+                    to = stops[i + 1] || from;
+
+                    // The position within the gradient
+                    pos = 1 - (to[0] - pos) / ((to[0] - from[0]) || 1);
+
+                    color = this.tweenColors(
+                        from.color,
+                        to.color,
+                        pos
+                    );
+                }
+                return color;
+            },
+            /*
+             * Return an intermediate color between two colors, according to pos where 0
+             * is the from color and 1 is the to color.
+             */
+            tweenColors: function(from, to, pos) {
+                // Check for has alpha, because rgba colors perform worse due to lack of
+                // support in WebKit.
+                var hasAlpha,
+                    ret;
+
+                // Unsupported color, return to-color (#3920)
+                if (!to.rgba.length || !from.rgba.length) {
+                    ret = to.input || 'none';
+
+                    // Interpolate
+                } else {
+                    from = from.rgba;
+                    to = to.rgba;
+                    hasAlpha = (to[3] !== 1 || from[3] !== 1);
+                    ret = (hasAlpha ? 'rgba(' : 'rgb(') +
+                        Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
+                        Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
+                        Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
+                        (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
+                }
+                return ret;
+            }
+        };
+
+        /**
+         * Handle animation of the color attributes directly
+         */
+        each(['fill', 'stroke'], function(prop) {
+            H.Fx.prototype[prop + 'Setter'] = function() {
+                this.elem.attr(
+                    prop,
+                    colorAxisMethods.tweenColors(
+                        H.color(this.start),
+                        H.color(this.end),
+                        this.pos
+                    ),
+                    null,
+                    true
+                );
+            };
+        });
+
+        // The solidgauge series type
+        H.seriesType('solidgauge', 'gauge', {
+            colorByPoint: true
+
+        }, {
+
+            /**
+             * Extend the translate function to extend the Y axis with the necessary
+             * decoration (#5895).
+             */
+            translate: function() {
+                var axis = this.yAxis;
+                H.extend(axis, colorAxisMethods);
+
+                // Prepare data classes
+                if (!axis.dataClasses && axis.options.dataClasses) {
+                    axis.initDataClasses(axis.options);
+                }
+                axis.initStops(axis.options);
+
+                // Generate points and inherit data label position
+                H.seriesTypes.gauge.prototype.translate.call(this);
+            },
+
+            /**
+             * Draw the points where each point is one needle
+             */
+            drawPoints: function() {
+                var series = this,
+                    yAxis = series.yAxis,
+                    center = yAxis.center,
+                    options = series.options,
+                    renderer = series.chart.renderer,
+                    overshoot = options.overshoot,
+                    overshootVal = isNumber(overshoot) ? overshoot / 180 * Math.PI : 0,
+                    thresholdAngleRad;
+
+                // Handle the threshold option
+                if (isNumber(options.threshold)) {
+                    thresholdAngleRad = yAxis.startAngleRad + yAxis.translate(
+                        options.threshold,
+                        null,
+                        null,
+                        null,
+                        true
+                    );
+                }
+                this.thresholdAngleRad = pick(thresholdAngleRad, yAxis.startAngleRad);
+
+
+                each(series.points, function(point) {
+                    var graphic = point.graphic,
+                        rotation = yAxis.startAngleRad + yAxis.translate(point.y, null, null, null, true),
+                        radius = (pInt(pick(point.options.radius, options.radius, 100)) * center[2]) / 200,
+                        innerRadius = (pInt(pick(point.options.innerRadius, options.innerRadius, 60)) * center[2]) / 200,
+                        shapeArgs,
+                        d,
+                        toColor = yAxis.toColor(point.y, point),
+                        axisMinAngle = Math.min(yAxis.startAngleRad, yAxis.endAngleRad),
+                        axisMaxAngle = Math.max(yAxis.startAngleRad, yAxis.endAngleRad),
+                        minAngle,
+                        maxAngle;
+
+                    if (toColor === 'none') { // #3708
+                        toColor = point.color || series.color || 'none';
+                    }
+                    if (toColor !== 'none') {
+                        point.color = toColor;
+                    }
+
+                    // Handle overshoot and clipping to axis max/min
+                    rotation = Math.max(axisMinAngle - overshootVal, Math.min(axisMaxAngle + overshootVal, rotation));
+
+                    // Handle the wrap option
+                    if (options.wrap === false) {
+                        rotation = Math.max(axisMinAngle, Math.min(axisMaxAngle, rotation));
+                    }
+
+                    minAngle = Math.min(rotation, series.thresholdAngleRad);
+                    maxAngle = Math.max(rotation, series.thresholdAngleRad);
+
+                    if (maxAngle - minAngle > 2 * Math.PI) {
+                        maxAngle = minAngle + 2 * Math.PI;
+                    }
+
+                    point.shapeArgs = shapeArgs = {
+                        x: center[0],
+                        y: center[1],
+                        r: radius,
+                        innerR: innerRadius,
+                        start: minAngle,
+                        end: maxAngle,
+                        fill: toColor
+                    };
+                    point.startR = radius; // For PieSeries.animate
+
+                    if (graphic) {
+                        d = shapeArgs.d;
+                        graphic.animate(shapeArgs);
+                        if (d) {
+                            shapeArgs.d = d; // animate alters it
+                        }
+                    } else {
+                        point.graphic = renderer.arc(shapeArgs)
+                            .addClass('highcharts-point')
+                            .attr({
+                                fill: toColor,
+                                'sweep-flag': 0
+                            })
+                            .add(series.group);
+
+
+                    }
+                });
+            },
+
+            /**
+             * Extend the pie slice animation by animating from start angle and up
+             */
+            animate: function(init) {
+
+                if (!init) {
+                    this.startAngleRad = this.thresholdAngleRad;
+                    H.seriesTypes.pie.prototype.animate.call(this, init);
+                }
+            }
+        });
+
+    }(Highcharts));
+}));

File diff suppressed because it is too large
+ 29 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/treemap.js


+ 881 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/treemap.src.js

@@ -0,0 +1,881 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ *
+ * (c) 2014 Highsoft AS
+ * Authors: Jon Arild Nygard / Oystein Moseng
+ *
+ * License: www.highcharts.com/license
+ */
+(function(factory) {
+    if (typeof module === 'object' && module.exports) {
+        module.exports = factory;
+    } else {
+        factory(Highcharts);
+    }
+}(function(Highcharts) {
+    (function(H) {
+        /**
+         * (c) 2014 Highsoft AS
+         * Authors: Jon Arild Nygard / Oystein Moseng
+         *
+         * License: www.highcharts.com/license
+         */
+        'use strict';
+
+        var seriesType = H.seriesType,
+            seriesTypes = H.seriesTypes,
+            map = H.map,
+            merge = H.merge,
+            extend = H.extend,
+            noop = H.noop,
+            each = H.each,
+            grep = H.grep,
+            isNumber = H.isNumber,
+            pick = H.pick,
+            Series = H.Series,
+            stableSort = H.stableSort,
+            color = H.Color,
+            eachObject = function(list, func, context) {
+                var key;
+                context = context || this;
+                for (key in list) {
+                    if (list.hasOwnProperty(key)) {
+                        func.call(context, list[key], key, list);
+                    }
+                }
+            },
+            reduce = function(arr, func, previous, context) {
+                context = context || this;
+                arr = arr || []; // @note should each be able to handle empty values automatically?
+                each(arr, function(current, i) {
+                    previous = func.call(context, previous, current, i, arr);
+                });
+                return previous;
+            },
+            // @todo find correct name for this function. 
+            // @todo Similar to reduce, this function is likely redundant
+            recursive = function(item, func, context) {
+                var next;
+                context = context || this;
+                next = func.call(context, item);
+                if (next !== false) {
+                    recursive(next, func, context);
+                }
+            };
+
+        // The Treemap series type
+        seriesType('treemap', 'scatter', {
+            showInLegend: false,
+            marker: false,
+            dataLabels: {
+                enabled: true,
+                defer: false,
+                verticalAlign: 'middle',
+                formatter: function() { // #2945
+                    return this.point.name || this.point.id;
+                },
+                inside: true
+            },
+            tooltip: {
+                headerFormat: '',
+                pointFormat: '<b>{point.name}</b>: {point.value}</b><br/>'
+            },
+            layoutAlgorithm: 'sliceAndDice',
+            layoutStartingDirection: 'vertical',
+            alternateStartingDirection: false,
+            levelIsConstant: true,
+            drillUpButton: {
+                position: {
+                    align: 'right',
+                    x: -10,
+                    y: 10
+                }
+            },
+
+
+            // Prototype members
+        }, {
+            pointArrayMap: ['value'],
+            axisTypes: seriesTypes.heatmap ? ['xAxis', 'yAxis', 'colorAxis'] : ['xAxis', 'yAxis'],
+            optionalAxis: 'colorAxis',
+            getSymbol: noop,
+            parallelArrays: ['x', 'y', 'value', 'colorValue'],
+            colorKey: 'colorValue', // Point color option key
+            translateColors: seriesTypes.heatmap && seriesTypes.heatmap.prototype.translateColors,
+            trackerGroups: ['group', 'dataLabelsGroup'],
+            /**
+             * Creates an object map from parent id to childrens index.
+             * @param {Array} data List of points set in options.
+             * @param {string} data[].parent Parent id of point.
+             * @param {Array} ids List of all point ids.
+             * @return {Object} Map from parent id to children index in data.
+             */
+            getListOfParents: function(data, ids) {
+                var listOfParents = reduce(data, function(prev, curr, i) {
+                    var parent = pick(curr.parent, '');
+                    if (prev[parent] === undefined) {
+                        prev[parent] = [];
+                    }
+                    prev[parent].push(i);
+                    return prev;
+                }, {});
+
+                // If parent does not exist, hoist parent to root of tree.
+                eachObject(listOfParents, function(children, parent, list) {
+                    if ((parent !== '') && (H.inArray(parent, ids) === -1)) {
+                        each(children, function(child) {
+                            list[''].push(child);
+                        });
+                        delete list[parent];
+                    }
+                });
+                return listOfParents;
+            },
+            /**
+             * Creates a tree structured object from the series points
+             */
+            getTree: function() {
+                var tree,
+                    series = this,
+                    allIds = map(this.data, function(d) {
+                        return d.id;
+                    }),
+                    parentList = series.getListOfParents(this.data, allIds);
+
+                series.nodeMap = [];
+                tree = series.buildNode('', -1, 0, parentList, null);
+                // Parents of the root node is by default visible
+                recursive(this.nodeMap[this.rootNode], function(node) {
+                    var next = false,
+                        p = node.parent;
+                    node.visible = true;
+                    if (p || p === '') {
+                        next = series.nodeMap[p];
+                    }
+                    return next;
+                });
+                // Children of the root node is by default visible
+                recursive(this.nodeMap[this.rootNode].children, function(children) {
+                    var next = false;
+                    each(children, function(child) {
+                        child.visible = true;
+                        if (child.children.length) {
+                            next = (next || []).concat(child.children);
+                        }
+                    });
+                    return next;
+                });
+                this.setTreeValues(tree);
+                return tree;
+            },
+            init: function(chart, options) {
+                var series = this;
+                Series.prototype.init.call(series, chart, options);
+                if (series.options.allowDrillToNode) {
+                    series.drillTo();
+                }
+            },
+            buildNode: function(id, i, level, list, parent) {
+                var series = this,
+                    children = [],
+                    point = series.points[i],
+                    node,
+                    child;
+
+                // Actions
+                each((list[id] || []), function(i) {
+                    child = series.buildNode(series.points[i].id, i, (level + 1), list, id);
+                    children.push(child);
+                });
+                node = {
+                    id: id,
+                    i: i,
+                    children: children,
+                    level: level,
+                    parent: parent,
+                    visible: false // @todo move this to better location
+                };
+                series.nodeMap[node.id] = node;
+                if (point) {
+                    point.node = node;
+                }
+                return node;
+            },
+            setTreeValues: function(tree) {
+                var series = this,
+                    options = series.options,
+                    childrenTotal = 0,
+                    children = [],
+                    val,
+                    point = series.points[tree.i];
+
+                // First give the children some values
+                each(tree.children, function(child) {
+                    child = series.setTreeValues(child);
+                    children.push(child);
+
+                    if (!child.ignore) {
+                        childrenTotal += child.val;
+                    } else {
+                        // @todo Add predicate to avoid looping already ignored children
+                        recursive(child.children, function(children) {
+                            var next = false;
+                            each(children, function(node) {
+                                extend(node, {
+                                    ignore: true,
+                                    isLeaf: false,
+                                    visible: false
+                                });
+                                if (node.children.length) {
+                                    next = (next || []).concat(node.children);
+                                }
+                            });
+                            return next;
+                        });
+                    }
+                });
+                // Sort the children
+                stableSort(children, function(a, b) {
+                    return a.sortIndex - b.sortIndex;
+                });
+                // Set the values
+                val = pick(point && point.options.value, childrenTotal);
+                if (point) {
+                    point.value = val;
+                }
+                extend(tree, {
+                    children: children,
+                    childrenTotal: childrenTotal,
+                    // Ignore this node if point is not visible
+                    ignore: !(pick(point && point.visible, true) && (val > 0)),
+                    isLeaf: tree.visible && !childrenTotal,
+                    levelDynamic: (options.levelIsConstant ? tree.level : (tree.level - series.nodeMap[series.rootNode].level)),
+                    name: pick(point && point.name, ''),
+                    sortIndex: pick(point && point.sortIndex, -val),
+                    val: val
+                });
+                return tree;
+            },
+            /**
+             * Recursive function which calculates the area for all children of a node.
+             * @param {Object} node The node which is parent to the children.
+             * @param {Object} area The rectangular area of the parent.
+             */
+            calculateChildrenAreas: function(parent, area) {
+                var series = this,
+                    options = series.options,
+                    level = this.levelMap[parent.levelDynamic + 1],
+                    algorithm = pick((series[level && level.layoutAlgorithm] && level.layoutAlgorithm), options.layoutAlgorithm),
+                    alternate = options.alternateStartingDirection,
+                    childrenValues = [],
+                    children;
+
+                // Collect all children which should be included
+                children = grep(parent.children, function(n) {
+                    return !n.ignore;
+                });
+
+                if (level && level.layoutStartingDirection) {
+                    area.direction = level.layoutStartingDirection === 'vertical' ? 0 : 1;
+                }
+                childrenValues = series[algorithm](area, children);
+                each(children, function(child, index) {
+                    var values = childrenValues[index];
+                    child.values = merge(values, {
+                        val: child.childrenTotal,
+                        direction: (alternate ? 1 - area.direction : area.direction)
+                    });
+                    child.pointValues = merge(values, {
+                        x: (values.x / series.axisRatio),
+                        width: (values.width / series.axisRatio)
+                    });
+                    // If node has children, then call method recursively
+                    if (child.children.length) {
+                        series.calculateChildrenAreas(child, child.values);
+                    }
+                });
+            },
+            setPointValues: function() {
+                var series = this,
+                    xAxis = series.xAxis,
+                    yAxis = series.yAxis;
+                each(series.points, function(point) {
+                    var node = point.node,
+                        values = node.pointValues,
+                        x1,
+                        x2,
+                        y1,
+                        y2,
+                        crispCorr = 0.5; // Assume 1px borderWidth for simplicity
+
+                    // Points which is ignored, have no values.
+                    if (values && node.visible) {
+                        x1 = Math.round(xAxis.translate(values.x, 0, 0, 0, 1)) - crispCorr;
+                        x2 = Math.round(xAxis.translate(values.x + values.width, 0, 0, 0, 1)) - crispCorr;
+                        y1 = Math.round(yAxis.translate(values.y, 0, 0, 0, 1)) - crispCorr;
+                        y2 = Math.round(yAxis.translate(values.y + values.height, 0, 0, 0, 1)) - crispCorr;
+                        // Set point values
+                        point.shapeType = 'rect';
+                        point.shapeArgs = {
+                            x: Math.min(x1, x2),
+                            y: Math.min(y1, y2),
+                            width: Math.abs(x2 - x1),
+                            height: Math.abs(y2 - y1)
+                        };
+                        point.plotX = point.shapeArgs.x + (point.shapeArgs.width / 2);
+                        point.plotY = point.shapeArgs.y + (point.shapeArgs.height / 2);
+                    } else {
+                        // Reset visibility
+                        delete point.plotX;
+                        delete point.plotY;
+                    }
+                });
+            },
+            setColorRecursive: function(node, color, colorIndex) {
+                var series = this,
+                    point,
+                    level;
+                if (node) {
+                    point = series.points[node.i];
+                    level = series.levelMap[node.levelDynamic];
+                    // Select either point color, level color or inherited color.
+                    color = pick(point && point.options.color, level && level.color, color);
+                    colorIndex = pick(point && point.options.colorIndex, level && level.colorIndex, colorIndex);
+                    if (point) {
+                        point.color = color;
+                        point.colorIndex = colorIndex;
+                    }
+
+                    // Do it all again with the children	
+                    if (node.children.length) {
+                        each(node.children, function(child) {
+                            series.setColorRecursive(child, color, colorIndex);
+                        });
+                    }
+                }
+            },
+            algorithmGroup: function(h, w, d, p) {
+                this.height = h;
+                this.width = w;
+                this.plot = p;
+                this.direction = d;
+                this.startDirection = d;
+                this.total = 0;
+                this.nW = 0;
+                this.lW = 0;
+                this.nH = 0;
+                this.lH = 0;
+                this.elArr = [];
+                this.lP = {
+                    total: 0,
+                    lH: 0,
+                    nH: 0,
+                    lW: 0,
+                    nW: 0,
+                    nR: 0,
+                    lR: 0,
+                    aspectRatio: function(w, h) {
+                        return Math.max((w / h), (h / w));
+                    }
+                };
+                this.addElement = function(el) {
+                    this.lP.total = this.elArr[this.elArr.length - 1];
+                    this.total = this.total + el;
+                    if (this.direction === 0) {
+                        // Calculate last point old aspect ratio
+                        this.lW = this.nW;
+                        this.lP.lH = this.lP.total / this.lW;
+                        this.lP.lR = this.lP.aspectRatio(this.lW, this.lP.lH);
+                        // Calculate last point new aspect ratio
+                        this.nW = this.total / this.height;
+                        this.lP.nH = this.lP.total / this.nW;
+                        this.lP.nR = this.lP.aspectRatio(this.nW, this.lP.nH);
+                    } else {
+                        // Calculate last point old aspect ratio
+                        this.lH = this.nH;
+                        this.lP.lW = this.lP.total / this.lH;
+                        this.lP.lR = this.lP.aspectRatio(this.lP.lW, this.lH);
+                        // Calculate last point new aspect ratio
+                        this.nH = this.total / this.width;
+                        this.lP.nW = this.lP.total / this.nH;
+                        this.lP.nR = this.lP.aspectRatio(this.lP.nW, this.nH);
+                    }
+                    this.elArr.push(el);
+                };
+                this.reset = function() {
+                    this.nW = 0;
+                    this.lW = 0;
+                    this.elArr = [];
+                    this.total = 0;
+                };
+            },
+            algorithmCalcPoints: function(directionChange, last, group, childrenArea) {
+                var pX,
+                    pY,
+                    pW,
+                    pH,
+                    gW = group.lW,
+                    gH = group.lH,
+                    plot = group.plot,
+                    keep,
+                    i = 0,
+                    end = group.elArr.length - 1;
+                if (last) {
+                    gW = group.nW;
+                    gH = group.nH;
+                } else {
+                    keep = group.elArr[group.elArr.length - 1];
+                }
+                each(group.elArr, function(p) {
+                    if (last || (i < end)) {
+                        if (group.direction === 0) {
+                            pX = plot.x;
+                            pY = plot.y;
+                            pW = gW;
+                            pH = p / pW;
+                        } else {
+                            pX = plot.x;
+                            pY = plot.y;
+                            pH = gH;
+                            pW = p / pH;
+                        }
+                        childrenArea.push({
+                            x: pX,
+                            y: pY,
+                            width: pW,
+                            height: pH
+                        });
+                        if (group.direction === 0) {
+                            plot.y = plot.y + pH;
+                        } else {
+                            plot.x = plot.x + pW;
+                        }
+                    }
+                    i = i + 1;
+                });
+                // Reset variables
+                group.reset();
+                if (group.direction === 0) {
+                    group.width = group.width - gW;
+                } else {
+                    group.height = group.height - gH;
+                }
+                plot.y = plot.parent.y + (plot.parent.height - group.height);
+                plot.x = plot.parent.x + (plot.parent.width - group.width);
+                if (directionChange) {
+                    group.direction = 1 - group.direction;
+                }
+                // If not last, then add uncalculated element
+                if (!last) {
+                    group.addElement(keep);
+                }
+            },
+            algorithmLowAspectRatio: function(directionChange, parent, children) {
+                var childrenArea = [],
+                    series = this,
+                    pTot,
+                    plot = {
+                        x: parent.x,
+                        y: parent.y,
+                        parent: parent
+                    },
+                    direction = parent.direction,
+                    i = 0,
+                    end = children.length - 1,
+                    group = new this.algorithmGroup(parent.height, parent.width, direction, plot); // eslint-disable-line new-cap
+                // Loop through and calculate all areas
+                each(children, function(child) {
+                    pTot = (parent.width * parent.height) * (child.val / parent.val);
+                    group.addElement(pTot);
+                    if (group.lP.nR > group.lP.lR) {
+                        series.algorithmCalcPoints(directionChange, false, group, childrenArea, plot);
+                    }
+                    // If last child, then calculate all remaining areas
+                    if (i === end) {
+                        series.algorithmCalcPoints(directionChange, true, group, childrenArea, plot);
+                    }
+                    i = i + 1;
+                });
+                return childrenArea;
+            },
+            algorithmFill: function(directionChange, parent, children) {
+                var childrenArea = [],
+                    pTot,
+                    direction = parent.direction,
+                    x = parent.x,
+                    y = parent.y,
+                    width = parent.width,
+                    height = parent.height,
+                    pX,
+                    pY,
+                    pW,
+                    pH;
+                each(children, function(child) {
+                    pTot = (parent.width * parent.height) * (child.val / parent.val);
+                    pX = x;
+                    pY = y;
+                    if (direction === 0) {
+                        pH = height;
+                        pW = pTot / pH;
+                        width = width - pW;
+                        x = x + pW;
+                    } else {
+                        pW = width;
+                        pH = pTot / pW;
+                        height = height - pH;
+                        y = y + pH;
+                    }
+                    childrenArea.push({
+                        x: pX,
+                        y: pY,
+                        width: pW,
+                        height: pH
+                    });
+                    if (directionChange) {
+                        direction = 1 - direction;
+                    }
+                });
+                return childrenArea;
+            },
+            strip: function(parent, children) {
+                return this.algorithmLowAspectRatio(false, parent, children);
+            },
+            squarified: function(parent, children) {
+                return this.algorithmLowAspectRatio(true, parent, children);
+            },
+            sliceAndDice: function(parent, children) {
+                return this.algorithmFill(true, parent, children);
+            },
+            stripes: function(parent, children) {
+                return this.algorithmFill(false, parent, children);
+            },
+            translate: function() {
+                var pointValues,
+                    seriesArea,
+                    tree,
+                    val;
+
+                // Call prototype function
+                Series.prototype.translate.call(this);
+
+                // Assign variables
+                this.rootNode = pick(this.options.rootId, '');
+                // Create a object map from level to options
+                this.levelMap = reduce(this.options.levels, function(arr, item) {
+                    arr[item.level] = item;
+                    return arr;
+                }, {});
+                tree = this.tree = this.getTree(); // @todo Only if series.isDirtyData is true
+
+                // Calculate plotting values.
+                this.axisRatio = (this.xAxis.len / this.yAxis.len);
+                this.nodeMap[''].pointValues = pointValues = {
+                    x: 0,
+                    y: 0,
+                    width: 100,
+                    height: 100
+                };
+                this.nodeMap[''].values = seriesArea = merge(pointValues, {
+                    width: (pointValues.width * this.axisRatio),
+                    direction: (this.options.layoutStartingDirection === 'vertical' ? 0 : 1),
+                    val: tree.val
+                });
+                this.calculateChildrenAreas(tree, seriesArea);
+
+                // Logic for point colors
+                if (this.colorAxis) {
+                    this.translateColors();
+                } else if (!this.options.colorByPoint) {
+                    this.setColorRecursive(this.tree);
+                }
+
+                // Update axis extremes according to the root node.
+                if (this.options.allowDrillToNode) {
+                    val = this.nodeMap[this.rootNode].pointValues;
+                    this.xAxis.setExtremes(val.x, val.x + val.width, false);
+                    this.yAxis.setExtremes(val.y, val.y + val.height, false);
+                    this.xAxis.setScale();
+                    this.yAxis.setScale();
+                }
+
+                // Assign values to points.
+                this.setPointValues();
+            },
+            /**
+             * Extend drawDataLabels with logic to handle custom options related to the treemap series:
+             * - Points which is not a leaf node, has dataLabels disabled by default.
+             * - Options set on series.levels is merged in.
+             * - Width of the dataLabel is set to match the width of the point shape.
+             */
+            drawDataLabels: function() {
+                var series = this,
+                    points = grep(series.points, function(n) {
+                        return n.node.visible;
+                    }),
+                    options,
+                    level;
+                each(points, function(point) {
+                    level = series.levelMap[point.node.levelDynamic];
+                    // Set options to new object to avoid problems with scope
+                    options = {
+                        style: {}
+                    };
+
+                    // If not a leaf, then label should be disabled as default
+                    if (!point.node.isLeaf) {
+                        options.enabled = false;
+                    }
+
+                    // If options for level exists, include them as well
+                    if (level && level.dataLabels) {
+                        options = merge(options, level.dataLabels);
+                        series._hasPointLabels = true;
+                    }
+
+                    // Set dataLabel width to the width of the point shape.
+                    if (point.shapeArgs) {
+                        options.style.width = point.shapeArgs.width;
+                        if (point.dataLabel) {
+                            point.dataLabel.css({
+                                width: point.shapeArgs.width + 'px'
+                            });
+                        }
+                    }
+
+                    // Merge custom options with point options
+                    point.dlOptions = merge(options, point.options.dataLabels);
+                });
+                Series.prototype.drawDataLabels.call(this);
+            },
+
+            /**
+             * Over the alignment method by setting z index
+             */
+            alignDataLabel: function(point) {
+                seriesTypes.column.prototype.alignDataLabel.apply(this, arguments);
+                if (point.dataLabel) {
+                    point.dataLabel.attr({
+                        zIndex: point.node.zIndex + 1
+                    });
+                }
+            },
+
+
+
+            /**
+             * Extending ColumnSeries drawPoints
+             */
+            drawPoints: function() {
+                var series = this,
+                    points = grep(series.points, function(n) {
+                        return n.node.visible;
+                    });
+
+                each(points, function(point) {
+                    var groupKey = 'levelGroup-' + point.node.levelDynamic;
+                    if (!series[groupKey]) {
+                        series[groupKey] = series.chart.renderer.g(groupKey)
+                            .attr({
+                                zIndex: 1000 - point.node.levelDynamic // @todo Set the zIndex based upon the number of levels, instead of using 1000
+                            })
+                            .add(series.group);
+                    }
+                    point.group = series[groupKey];
+
+                });
+                // Call standard drawPoints
+                seriesTypes.column.prototype.drawPoints.call(this);
+
+                // If drillToNode is allowed, set a point cursor on clickables & add drillId to point 
+                if (series.options.allowDrillToNode) {
+                    each(points, function(point) {
+                        if (point.graphic) {
+                            point.drillId = series.options.interactByLeaf ? series.drillToByLeaf(point) : series.drillToByGroup(point);
+                        }
+                    });
+                }
+            },
+            /**
+             * Add drilling on the suitable points
+             */
+            drillTo: function() {
+                var series = this;
+                H.addEvent(series, 'click', function(event) {
+                    var point = event.point,
+                        drillId = point.drillId,
+                        drillName;
+                    // If a drill id is returned, add click event and cursor. 
+                    if (drillId) {
+                        drillName = series.nodeMap[series.rootNode].name || series.rootNode;
+                        point.setState(''); // Remove hover
+                        series.drillToNode(drillId);
+                        series.showDrillUpButton(drillName);
+                    }
+                });
+            },
+            /**
+             * Finds the drill id for a parent node.
+             * Returns false if point should not have a click event
+             * @param {Object} point
+             * @return {string || boolean} Drill to id or false when point should not have a click event
+             */
+            drillToByGroup: function(point) {
+                var series = this,
+                    drillId = false;
+                if ((point.node.level - series.nodeMap[series.rootNode].level) === 1 && !point.node.isLeaf) {
+                    drillId = point.id;
+                }
+                return drillId;
+            },
+            /**
+             * Finds the drill id for a leaf node.
+             * Returns false if point should not have a click event
+             * @param {Object} point
+             * @return {string || boolean} Drill to id or false when point should not have a click event
+             */
+            drillToByLeaf: function(point) {
+                var series = this,
+                    drillId = false,
+                    nodeParent;
+                if ((point.node.parent !== series.rootNode) && (point.node.isLeaf)) {
+                    nodeParent = point.node;
+                    while (!drillId) {
+                        nodeParent = series.nodeMap[nodeParent.parent];
+                        if (nodeParent.parent === series.rootNode) {
+                            drillId = nodeParent.id;
+                        }
+                    }
+                }
+                return drillId;
+            },
+            drillUp: function() {
+                var drillPoint = null,
+                    node,
+                    parent;
+                if (this.rootNode) {
+                    node = this.nodeMap[this.rootNode];
+                    if (node.parent !== null) {
+                        drillPoint = this.nodeMap[node.parent];
+                    } else {
+                        drillPoint = this.nodeMap[''];
+                    }
+                }
+
+                if (drillPoint !== null) {
+                    this.drillToNode(drillPoint.id);
+                    if (drillPoint.id === '') {
+                        this.drillUpButton = this.drillUpButton.destroy();
+                    } else {
+                        parent = this.nodeMap[drillPoint.parent];
+                        this.showDrillUpButton((parent.name || parent.id));
+                    }
+                }
+            },
+            drillToNode: function(id) {
+                this.options.rootId = id;
+                this.isDirty = true; // Force redraw
+                this.chart.redraw();
+            },
+            showDrillUpButton: function(name) {
+                var series = this,
+                    backText = (name || '< Back'),
+                    buttonOptions = series.options.drillUpButton,
+                    attr,
+                    states;
+
+                if (buttonOptions.text) {
+                    backText = buttonOptions.text;
+                }
+                if (!this.drillUpButton) {
+                    attr = buttonOptions.theme;
+                    states = attr && attr.states;
+
+                    this.drillUpButton = this.chart.renderer.button(
+                            backText,
+                            null,
+                            null,
+                            function() {
+                                series.drillUp();
+                            },
+                            attr,
+                            states && states.hover,
+                            states && states.select
+                        )
+                        .attr({
+                            align: buttonOptions.position.align,
+                            zIndex: 7
+                        })
+                        .add()
+                        .align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox');
+                } else {
+                    this.drillUpButton.attr({
+                            text: backText
+                        })
+                        .align();
+                }
+            },
+            buildKDTree: noop,
+            drawLegendSymbol: H.LegendSymbolMixin.drawRectangle,
+            getExtremes: function() {
+                // Get the extremes from the value data
+                Series.prototype.getExtremes.call(this, this.colorValueData);
+                this.valueMin = this.dataMin;
+                this.valueMax = this.dataMax;
+
+                // Get the extremes from the y data
+                Series.prototype.getExtremes.call(this);
+            },
+            getExtremesFromAll: true,
+            bindAxes: function() {
+                var treeAxis = {
+                    endOnTick: false,
+                    gridLineWidth: 0,
+                    lineWidth: 0,
+                    min: 0,
+                    dataMin: 0,
+                    minPadding: 0,
+                    max: 100,
+                    dataMax: 100,
+                    maxPadding: 0,
+                    startOnTick: false,
+                    title: null,
+                    tickPositions: []
+                };
+                Series.prototype.bindAxes.call(this);
+                H.extend(this.yAxis.options, treeAxis);
+                H.extend(this.xAxis.options, treeAxis);
+            }
+
+            // Point class
+        }, {
+            getClassName: function() {
+                var className = H.Point.prototype.getClassName.call(this),
+                    series = this.series,
+                    options = series.options;
+
+                // Above the current level
+                if (this.node.level <= series.nodeMap[series.rootNode].level) {
+                    className += ' highcharts-above-level';
+
+                } else if (!this.node.isLeaf && !pick(options.interactByLeaf, !options.allowDrillToNode)) {
+                    className += ' highcharts-internal-node-interactive';
+
+                } else if (!this.node.isLeaf) {
+                    className += ' highcharts-internal-node';
+                }
+                return className;
+            },
+            isValid: function() {
+                return isNumber(this.value);
+            },
+            setState: function(state) {
+                H.Point.prototype.setState.call(this, state);
+                this.graphic.attr({
+                    zIndex: state === 'hover' ? 1 : 0
+                });
+            },
+            setVisible: seriesTypes.pie.prototype.pointClass.prototype.setVisible
+        });
+
+    }(Highcharts));
+}));

File diff suppressed because it is too large
+ 15 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/xrange-series.js


+ 254 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/xrange-series.src.js

@@ -0,0 +1,254 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ * X-range series
+ *
+ * (c) 2010-2016 Torstein Honsi, Lars A. V. Cabrera
+ *
+ * --- WORK IN PROGRESS ---
+ *
+ * License: www.highcharts.com/license
+ */
+(function(factory) {
+    if (typeof module === 'object' && module.exports) {
+        module.exports = factory;
+    } else {
+        factory(Highcharts);
+    }
+}(function(Highcharts) {
+    (function(H) {
+        /**
+         * (c) 2014-2016 Highsoft AS
+         * Authors: Torstein Honsi, Lars A. V. Cabrera
+         *
+         * License: www.highcharts.com/license
+         */
+        'use strict';
+
+        var defaultPlotOptions = H.getOptions().plotOptions,
+            color = H.Color,
+            columnType = H.seriesTypes.column,
+            each = H.each,
+            extendClass = H.extendClass,
+            isNumber = H.isNumber,
+            isObject = H.isObject,
+            merge = H.merge,
+            pick = H.pick,
+            seriesTypes = H.seriesTypes,
+            wrap = H.wrap,
+            Axis = H.Axis,
+            Point = H.Point,
+            Series = H.Series,
+            pointFormat = '<span style="color:{point.color}">' +
+            '\u25CF' +
+            '</span> {series.name}: <b>{point.yCategory}</b><br/>',
+            xrange = 'xrange';
+
+        defaultPlotOptions.xrange = merge(defaultPlotOptions.column, {
+            tooltip: {
+                pointFormat: pointFormat
+            }
+        });
+        seriesTypes.xrange = extendClass(columnType, {
+            pointClass: extendClass(Point, {
+                // Add x2 and yCategory to the available properties for tooltip formats
+                getLabelConfig: function() {
+                    var cfg = Point.prototype.getLabelConfig.call(this);
+
+                    cfg.x2 = this.x2;
+                    cfg.yCategory = this.yCategory = this.series.yAxis.categories && this.series.yAxis.categories[this.y];
+                    return cfg;
+                }
+            }),
+            type: xrange,
+            forceDL: true,
+            parallelArrays: ['x', 'x2', 'y'],
+            requireSorting: false,
+            animate: seriesTypes.line.prototype.animate,
+
+            /**
+             * Borrow the column series metrics, but with swapped axes. This gives free access
+             * to features like groupPadding, grouping, pointWidth etc.
+             */
+            getColumnMetrics: function() {
+                var metrics,
+                    chart = this.chart;
+
+                function swapAxes() {
+                    each(chart.series, function(s) {
+                        var xAxis = s.xAxis;
+                        s.xAxis = s.yAxis;
+                        s.yAxis = xAxis;
+                    });
+                }
+
+                swapAxes();
+
+                this.yAxis.closestPointRange = 1;
+                metrics = columnType.prototype.getColumnMetrics.call(this);
+
+                swapAxes();
+
+                return metrics;
+            },
+
+            /**
+             * Override cropData to show a point where x is outside visible range
+             * but x2 is outside.
+             */
+            cropData: function(xData, yData, min, max) {
+
+                // Replace xData with x2Data to find the appropriate cropStart
+                var cropData = Series.prototype.cropData,
+                    crop = cropData.call(this, this.x2Data, yData, min, max);
+
+                // Re-insert the cropped xData
+                crop.xData = xData.slice(crop.start, crop.end);
+
+                return crop;
+            },
+
+            translate: function() {
+                columnType.prototype.translate.apply(this, arguments);
+                var series = this,
+                    xAxis = series.xAxis,
+                    metrics = series.columnMetrics,
+                    minPointLength = series.options.minPointLength || 0;
+
+                each(series.points, function(point) {
+                    var plotX = point.plotX,
+                        posX = pick(point.x2, point.x + (point.len || 0)),
+                        plotX2 = xAxis.toPixels(posX, true),
+                        width = plotX2 - plotX,
+                        widthDifference,
+                        shapeArgs,
+                        partialFill;
+
+                    if (minPointLength) {
+                        widthDifference = minPointLength - width;
+                        if (widthDifference < 0) {
+                            widthDifference = 0;
+                        }
+                        plotX -= widthDifference / 2;
+                        plotX2 += widthDifference / 2;
+                    }
+
+                    plotX = Math.max(plotX, -10);
+                    plotX2 = Math.min(Math.max(plotX2, -10), xAxis.len + 10);
+
+                    point.shapeArgs = {
+                        x: plotX,
+                        y: point.plotY + metrics.offset,
+                        width: plotX2 - plotX,
+                        height: metrics.width
+                    };
+                    point.tooltipPos[0] += width / 2;
+                    point.tooltipPos[1] -= metrics.width / 2;
+
+                    // Add a partShapeArgs to the point, based on the shapeArgs property
+                    partialFill = point.partialFill;
+                    if (partialFill) {
+                        // Get the partial fill amount
+                        if (isObject(partialFill)) {
+                            partialFill = partialFill.amount;
+                        }
+                        // If it was not a number, assume 0
+                        if (!isNumber(partialFill)) {
+                            partialFill = 0;
+                        }
+                        shapeArgs = point.shapeArgs;
+                        point.partShapeArgs = {
+                            x: shapeArgs.x,
+                            y: shapeArgs.y + 1,
+                            width: shapeArgs.width * partialFill,
+                            height: shapeArgs.height - 2
+                        };
+                    }
+                });
+            },
+
+            drawPoints: function() {
+                var series = this,
+                    chart = this.chart,
+                    options = series.options,
+                    renderer = chart.renderer,
+                    animationLimit = options.animationLimit || 250,
+                    verb = chart.pointCount < animationLimit ? 'animate' : 'attr';
+
+                // draw the columns
+                each(series.points, function(point) {
+                    var plotY = point.plotY,
+                        graphic = point.graphic,
+                        type = point.shapeType,
+                        shapeArgs = point.shapeArgs,
+                        partShapeArgs = point.partShapeArgs,
+                        seriesOpts = series.options,
+                        pfOptions = point.partialFill,
+                        fill,
+                        state = point.selected && 'select',
+                        cutOff = options.stacking && !options.borderRadius;
+
+                    if (isNumber(plotY) && point.y !== null) {
+                        if (graphic) { // update
+                            point.graphicOriginal[verb](
+                                merge(shapeArgs)
+                            );
+                            if (partShapeArgs) {
+                                point.graphicOverlay[verb](
+                                    merge(partShapeArgs)
+                                );
+                            }
+
+                        } else {
+                            point.graphic = graphic = renderer.g('point')
+                                .attr({
+                                    'class': point.getClassName()
+                                })
+                                .add(point.group || series.group);
+
+                            point.graphicOriginal = renderer[type](shapeArgs)
+                                .addClass('highcharts-partfill-original')
+                                .add(graphic);
+                            if (partShapeArgs) {
+                                point.graphicOverlay = renderer[type](partShapeArgs)
+                                    .addClass('highcharts-partfill-overlay')
+                                    .add(graphic);
+                            }
+                        }
+
+
+
+                    } else if (graphic) {
+                        point.graphic = graphic.destroy(); // #1269
+                    }
+                });
+            }
+        });
+
+        /**
+         * Max x2 should be considered in xAxis extremes
+         */
+        wrap(Axis.prototype, 'getSeriesExtremes', function(proceed) {
+            var axis = this,
+                series = axis.series,
+                dataMax,
+                modMax;
+
+            proceed.call(this);
+            if (axis.isXAxis && series.type === xrange) {
+                dataMax = pick(axis.dataMax, Number.MIN_VALUE);
+                each(this.series, function(series) {
+                    each(series.x2Data || [], function(val) {
+                        if (val > dataMax) {
+                            dataMax = val;
+                            modMax = true;
+                        }
+                    });
+                });
+                if (modMax) {
+                    axis.dataMax = dataMax;
+                }
+            }
+        });
+
+    }(Highcharts));
+}));

+ 129 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/sand-signika.js

@@ -0,0 +1,129 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ *
+ * (c) 2009-2016 Torstein Honsi
+ *
+ * License: www.highcharts.com/license
+ */
+(function(factory) {
+    if (typeof module === 'object' && module.exports) {
+        module.exports = factory;
+    } else {
+        factory(Highcharts);
+    }
+}(function(Highcharts) {
+    (function(Highcharts) {
+        /**
+         * (c) 2010-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         * 
+         * Sand-Signika theme for Highcharts JS
+         * @author Torstein Honsi
+         */
+
+        'use strict';
+        /* global document */
+        // Load the fonts
+        Highcharts.createElement('link', {
+            href: 'https://fonts.googleapis.com/css?family=Signika:400,700',
+            rel: 'stylesheet',
+            type: 'text/css'
+        }, null, document.getElementsByTagName('head')[0]);
+
+        // Add the background image to the container
+        Highcharts.wrap(Highcharts.Chart.prototype, 'getContainer', function(proceed) {
+            proceed.call(this);
+            this.container.style.background = 'url(http://www.highcharts.com/samples/graphics/sand.png)';
+        });
+
+
+        Highcharts.theme = {
+            colors: ['#f45b5b', '#8085e9', '#8d4654', '#7798BF', '#aaeeee', '#ff0066', '#eeaaee',
+                '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'
+            ],
+            chart: {
+                backgroundColor: null,
+                style: {
+                    fontFamily: 'Signika, serif'
+                }
+            },
+            title: {
+                style: {
+                    color: 'black',
+                    fontSize: '16px',
+                    fontWeight: 'bold'
+                }
+            },
+            subtitle: {
+                style: {
+                    color: 'black'
+                }
+            },
+            tooltip: {
+                borderWidth: 0
+            },
+            legend: {
+                itemStyle: {
+                    fontWeight: 'bold',
+                    fontSize: '13px'
+                }
+            },
+            xAxis: {
+                labels: {
+                    style: {
+                        color: '#6e6e70'
+                    }
+                }
+            },
+            yAxis: {
+                labels: {
+                    style: {
+                        color: '#6e6e70'
+                    }
+                }
+            },
+            plotOptions: {
+                series: {
+                    shadow: true
+                },
+                candlestick: {
+                    lineColor: '#404048'
+                },
+                map: {
+                    shadow: false
+                }
+            },
+
+            // Highstock specific
+            navigator: {
+                xAxis: {
+                    gridLineColor: '#D0D0D8'
+                }
+            },
+            rangeSelector: {
+                buttonTheme: {
+                    fill: 'white',
+                    stroke: '#C0C0C8',
+                    'stroke-width': 1,
+                    states: {
+                        select: {
+                            fill: '#D0D0D8'
+                        }
+                    }
+                }
+            },
+            scrollbar: {
+                trackBorderColor: '#C0C0C8'
+            },
+
+            // General
+            background2: '#E0E0E8'
+
+        };
+
+        // Apply the theme
+        Highcharts.setOptions(Highcharts.theme);
+
+    }(Highcharts));
+}));

+ 112 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/skies.js

@@ -0,0 +1,112 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ *
+ * (c) 2009-2016 Torstein Honsi
+ *
+ * License: www.highcharts.com/license
+ */
+(function(factory) {
+    if (typeof module === 'object' && module.exports) {
+        module.exports = factory;
+    } else {
+        factory(Highcharts);
+    }
+}(function(Highcharts) {
+    (function(Highcharts) {
+        /**
+         * (c) 2010-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         * 
+         * Skies theme for Highcharts JS
+         * @author Torstein Honsi
+         */
+
+        'use strict';
+        Highcharts.theme = {
+            colors: ['#514F78', '#42A07B', '#9B5E4A', '#72727F', '#1F949A', '#82914E', '#86777F', '#42A07B'],
+            chart: {
+                className: 'skies',
+                borderWidth: 0,
+                plotShadow: true,
+                plotBackgroundImage: 'http://www.highcharts.com/demo/gfx/skies.jpg',
+                plotBackgroundColor: {
+                    linearGradient: [0, 0, 250, 500],
+                    stops: [
+                        [0, 'rgba(255, 255, 255, 1)'],
+                        [1, 'rgba(255, 255, 255, 0)']
+                    ]
+                },
+                plotBorderWidth: 1
+            },
+            title: {
+                style: {
+                    color: '#3E576F',
+                    font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+                }
+            },
+            subtitle: {
+                style: {
+                    color: '#6D869F',
+                    font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+                }
+            },
+            xAxis: {
+                gridLineWidth: 0,
+                lineColor: '#C0D0E0',
+                tickColor: '#C0D0E0',
+                labels: {
+                    style: {
+                        color: '#666',
+                        fontWeight: 'bold'
+                    }
+                },
+                title: {
+                    style: {
+                        color: '#666',
+                        font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+                    }
+                }
+            },
+            yAxis: {
+                alternateGridColor: 'rgba(255, 255, 255, .5)',
+                lineColor: '#C0D0E0',
+                tickColor: '#C0D0E0',
+                tickWidth: 1,
+                labels: {
+                    style: {
+                        color: '#666',
+                        fontWeight: 'bold'
+                    }
+                },
+                title: {
+                    style: {
+                        color: '#666',
+                        font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+                    }
+                }
+            },
+            legend: {
+                itemStyle: {
+                    font: '9pt Trebuchet MS, Verdana, sans-serif',
+                    color: '#3E576F'
+                },
+                itemHoverStyle: {
+                    color: 'black'
+                },
+                itemHiddenStyle: {
+                    color: 'silver'
+                }
+            },
+            labels: {
+                style: {
+                    color: '#3E576F'
+                }
+            }
+        };
+
+        // Apply the theme
+        Highcharts.setOptions(Highcharts.theme);
+
+    }(Highcharts));
+}));

+ 228 - 0
watero-wechat-web/src/main/webapp/common/lib/jquery.validation/1.14.0/validate-methods.js

@@ -0,0 +1,228 @@
+/*****************************************************************
+ * jQuery Validate扩展验证方法  (linjq)    
+ * Modified by guojunhui
+ * Date modified:01/01/2017  
+*****************************************************************/
+$(function(){
+    // 判断整数value是否等于0 
+    jQuery.validator.addMethod("isIntEqZero", function(value, element) { 
+         value=parseInt(value);      
+         return this.optional(element) || value==0;       
+    }, "整数必须为0"); 
+      
+    // 判断整数value是否大于0
+    jQuery.validator.addMethod("isIntGtZero", function(value, element) { 
+         value=parseInt(value);      
+         return this.optional(element) || value>0;       
+    }, "整数必须大于0"); 
+      
+    // 判断整数value是否大于或等于0
+    jQuery.validator.addMethod("isIntGteZero", function(value, element) { 
+         value=parseInt(value);      
+         return this.optional(element) || value>=0;       
+    }, "整数必须大于或等于0");   
+    
+    // 判断整数value是否不等于0 
+    jQuery.validator.addMethod("isIntNEqZero", function(value, element) { 
+         value=parseInt(value);      
+         return this.optional(element) || value!=0;       
+    }, "整数必须不等于0");  
+    
+    // 判断整数value是否小于0 
+    jQuery.validator.addMethod("isIntLtZero", function(value, element) { 
+         value=parseInt(value);      
+         return this.optional(element) || value<0;       
+    }, "整数必须小于0");  
+    
+    // 判断整数value是否小于或等于0 
+    jQuery.validator.addMethod("isIntLteZero", function(value, element) { 
+         value=parseInt(value);      
+         return this.optional(element) || value<=0;       
+    }, "整数必须小于或等于0");  
+    
+    // 判断浮点数value是否等于0 
+    jQuery.validator.addMethod("isFloatEqZero", function(value, element) { 
+         value=parseFloat(value);      
+         return this.optional(element) || value==0;       
+    }, "浮点数必须为0"); 
+      
+    // 判断浮点数value是否大于0
+    jQuery.validator.addMethod("isFloatGtZero", function(value, element) { 
+         value=parseFloat(value);      
+         return this.optional(element) || value>0;       
+    }, "浮点数必须大于0"); 
+      
+    // 判断浮点数value是否大于或等于0
+    jQuery.validator.addMethod("isFloatGteZero", function(value, element) { 
+         value=parseFloat(value);      
+         return this.optional(element) || value>=0;       
+    }, "浮点数必须大于或等于0");   
+    
+    // 判断浮点数value是否不等于0 
+    jQuery.validator.addMethod("isFloatNEqZero", function(value, element) { 
+         value=parseFloat(value);      
+         return this.optional(element) || value!=0;       
+    }, "浮点数必须不等于0");  
+    
+    // 判断浮点数value是否小于0 
+    jQuery.validator.addMethod("isFloatLtZero", function(value, element) { 
+         value=parseFloat(value);      
+         return this.optional(element) || value<0;       
+    }, "浮点数必须小于0");  
+    
+    // 判断浮点数value是否小于或等于0 
+    jQuery.validator.addMethod("isFloatLteZero", function(value, element) { 
+         value=parseFloat(value);      
+         return this.optional(element) || value<=0;       
+    }, "浮点数必须小于或等于0");  
+    
+    // 判断浮点型  
+    jQuery.validator.addMethod("isFloat", function(value, element) {       
+         return this.optional(element) || /^[-\+]?\d+(\.\d+)?$/.test(value);       
+    }, "只能包含数字、小数点等字符"); 
+     
+    // 匹配integer
+    jQuery.validator.addMethod("isInteger", function(value, element) {       
+         return this.optional(element) || (/^[-\+]?\d+$/.test(value) && parseInt(value)>=0);       
+    }, "匹配integer");  
+     
+    // 判断数值类型,包括整数和浮点数
+    jQuery.validator.addMethod("isNumber", function(value, element) {       
+         return this.optional(element) || /^[-\+]?\d+$/.test(value) || /^[-\+]?\d+(\.\d+)?$/.test(value);       
+    }, "匹配数值类型,包括整数和浮点数");  
+    
+    // 只能输入[0-9]数字
+    jQuery.validator.addMethod("isDigits", function(value, element) {       
+         return this.optional(element) || /^\d+$/.test(value);       
+    }, "只能输入0-9数字");  
+    
+    // 判断中文字符 
+    jQuery.validator.addMethod("isChinese", function(value, element) {       
+         return this.optional(element) || /^[\u0391-\uFFE5]+$/.test(value);       
+    }, "只能包含中文字符。");   
+ 
+    // 判断英文字符 
+    jQuery.validator.addMethod("isEnglish", function(value, element) {       
+         return this.optional(element) || /^[A-Za-z]+$/.test(value);       
+    }, "只能包含英文字符。");   
+ 
+     // 手机号码验证    
+    jQuery.validator.addMethod("isMobile", function(value, element) {    
+      var length = value.length;    
+      return this.optional(element) || (length == 11 && /^(((13[0-9]{1})|(15[0-35-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/.test(value));    
+    }, "手机号码格式不正确。");
+
+    // 电话号码验证    
+    jQuery.validator.addMethod("isPhone", function(value, element) {    
+      var tel = /^(\d{3,4}-?)?\d{7,9}$/g;    
+      return this.optional(element) || (tel.test(value));    
+    }, "电话号码格式不正确");
+
+    // 联系电话(手机/电话皆可)验证   
+    jQuery.validator.addMethod("isTel", function(value,element) {   
+        var length = value.length;   
+        var mobile = /^(((13[0-9]{1})|(15[0-35-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
+        var tel = /^(\d{3,4}-?)?\d{7,9}$/g;       
+        return this.optional(element) || tel.test(value) || (length==11 && mobile.test(value));   
+    }, "请输入正确手机号码或电话号码"); 
+ 
+     // 匹配qq      
+    jQuery.validator.addMethod("isQq", function(value, element) {       
+         return this.optional(element) || /^[1-9]\d{4,12}$/;       
+    }, "QQ号码不合法");   
+ 
+     // 邮政编码验证    
+    jQuery.validator.addMethod("isZipCode", function(value, element) {    
+      var zip = /^[0-9]{6}$/;    
+      return this.optional(element) || (zip.test(value));    
+    }, "邮政编码不正确");  
+    
+    // 匹配密码,以字母开头,长度在6-16之间,只能包含字符、数字和下划线。      
+    jQuery.validator.addMethod("isPwd", function(value, element) {       
+         return this.optional(element) || /^[a-zA-Z]\\w{6,16}$/.test(value);       
+    }, "以字母开头,长度在6-12之间,只能包含字符、数字和下划线。");  
+    
+    // 身份证号码验证
+    jQuery.validator.addMethod("isIdCardNo", function(value, element) { 
+      //var idCard = /^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})(\w)$/;   
+      return this.optional(element) || isIdCardNo(value);    
+    }, "身份证号码不正确"); 
+
+    // IP地址验证   
+    jQuery.validator.addMethod("ip", function(value, element) {    
+      return this.optional(element) || /^(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.)(([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))\.){2}([1-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5])))$/.test(value);    
+    }, "请填写正确的IP地址");
+   
+    // 字符验证,只能包含中文、英文、数字、下划线等字符。    
+    jQuery.validator.addMethod("stringCheck", function(value, element) {       
+         return this.optional(element) || /^[a-zA-Z0-9\u4e00-\u9fa5-_]+$/.test(value);       
+    }, "只能包含中文、英文、数字、下划线等字符");   
+   
+    // 匹配english  
+    jQuery.validator.addMethod("isEnglish", function(value, element) {       
+         return this.optional(element) || /^[A-Za-z]+$/.test(value);       
+    }, "必须输入英文");   
+    
+    // 匹配汉字  
+    jQuery.validator.addMethod("isChinese", function(value, element) {       
+         return this.optional(element) || /^[\u4e00-\u9fa5]+$/.test(value);       
+    }, "只能输入汉字");   
+    
+    // 匹配中文(包括汉字和字符) 
+    jQuery.validator.addMethod("isChineseChar", function(value, element) {       
+         return this.optional(element) || /^[\u0391-\uFFE5]+$/.test(value);       
+    }, "匹配中文(包括汉字和字符) "); 
+      
+    // 判断是否为合法字符(a-zA-Z0-9-_)
+    jQuery.validator.addMethod("isRightfulString", function(value, element) {       
+         return this.optional(element) || /^[A-Za-z0-9_-]+$/.test(value);       
+    }, "判断是否为合法字符(a-zA-Z0-9-_)");   
+    
+    // 判断是否包含中英文特殊字符,除英文"-_"字符外
+    jQuery.validator.addMethod("isContainsSpecialChar", function(value, element) {  
+         var reg = RegExp(/[(\ )(\`)(\~)(\!)(\@)(\#)(\$)(\%)(\^)(\&)(\*)(\()(\))(\+)(\=)(\|)(\{)(\})(\')(\:)(\;)(\')(',)(\[)(\])(\.)(\<)(\>)(\/)(\?)(\~)(\!)(\@)(\#)(\¥)(\%)(\…)(\&)(\*)(\()(\))(\—)(\+)(\|)(\{)(\})(\【)(\】)(\‘)(\;)(\:)(\”)(\“)(\’)(\。)(\,)(\、)(\?)]+/);   
+         return this.optional(element) || !reg.test(value);       
+    }, "含有中英文特殊字符");
+	
+	//车牌号校验
+	jQuery.validator.addMethod("isPlateNo", function(value, element) {
+		var reg = /^[\u4e00-\u9fa5]{1}[A-Z]{1}[A-Z_0-9]{5}$/;
+		return this.optional(element) || (tel.test(value)); 
+	},"请输入正确车牌号");
+});
+//身份证号码的验证规则
+function isIdCardNo(num){ 
+    //if (isNaN(num)) {alert("输入的不是数字!"); return false;} 
+   var len = num.length, re; 
+   if (len == 15) 
+   re = new RegExp(/^(\d{6})()?(\d{2})(\d{2})(\d{2})(\d{2})(\w)$/); 
+   else if (len == 18) 
+   re = new RegExp(/^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})(\w)$/); 
+   else {
+		//alert("输入的数字位数不对。"); 
+		return false;
+	} 
+   var a = num.match(re); 
+   if (a != null) 
+   { 
+   if (len==15) 
+   { 
+   var D = new Date("19"+a[3]+"/"+a[4]+"/"+a[5]); 
+   var B = D.getYear()==a[3]&&(D.getMonth()+1)==a[4]&&D.getDate()==a[5]; 
+   } 
+   else 
+   { 
+   var D = new Date(a[3]+"/"+a[4]+"/"+a[5]); 
+   var B = D.getFullYear()==a[3]&&(D.getMonth()+1)==a[4]&&D.getDate()==a[5]; 
+   } 
+   if (!B) {
+		//alert("输入的身份证号 "+ a[0] +" 里出生日期不对。"); 
+		return false;
+	} 
+   } 
+   if(!re.test(num)){
+		//alert("身份证最后一位只能是数字和字母。");
+		return false;
+	}
+   return true; 
+}

BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/images/success.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/images/success.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/background/images/success.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/tface.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/wface.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/yface.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/image/images/success.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/image/images/success.png


+ 118 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/map/show.html

@@ -0,0 +1,118 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8"/>
+    <meta name="keywords" content="百度地图,百度地图API,百度地图自定义工具,百度地图所见即所得工具"/>
+    <meta name="description" content="百度地图API自定义地图,帮助用户在可视化操作下生成百度地图"/>
+    <title>百度地图API自定义地图</title>
+    <!--引用百度地图API-->
+    <style type="text/css">
+        html, body {
+            margin: 0;
+            padding: 0;
+            overflow: hidden;
+        }
+    </style>
+    <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
+</head>
+
+<body onload="initMap();">
+<!--百度地图容器-->
+<div style="width:697px;height:550px;border:#ccc solid 1px;" id="dituContent"></div>
+</body>
+<script type="text/javascript">
+    function getParam(name) {
+        return location.href.match(new RegExp('[?#&]' + name + '=([^?#&]+)', 'i')) ? RegExp.$1 : '';
+    }
+    var map, marker;
+    var centerParam = getParam('center');
+    var zoomParam = getParam('zoom');
+    var widthParam = getParam('width');
+    var heightParam = getParam('height');
+    var markersParam = getParam('markers');
+    var markerStylesParam = getParam('markerStyles');
+
+    //创建和初始化地图函数:
+    function initMap() {
+        // [FF]切换模式后报错
+        if (!window.BMap) {
+            return;
+        }
+        var dituContent = document.getElementById('dituContent');
+        dituContent.style.width = widthParam + 'px';
+        dituContent.style.height = heightParam + 'px';
+
+        createMap();//创建地图
+        setMapEvent();//设置地图事件
+        addMapControl();//向地图添加控件
+
+        // 创建标注
+        var markersArr = markersParam.split(',');
+        var point = new BMap.Point(markersArr[0], markersArr[1]);
+        marker = new BMap.Marker(point);
+        marker.enableDragging();
+        map.addOverlay(marker); // 将标注添加到地图中
+
+        if(parent.editor && parent.document.body.contentEditable=="true") { //在编辑状态下
+            setMapListener();//地图改变修改外层的iframe标签src属性
+        }
+    }
+
+    //创建地图函数:
+    function createMap() {
+        map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
+        var centerArr = centerParam.split(',');
+        var point = new BMap.Point(parseFloat(centerArr[0]), parseFloat(centerArr[1]));//定义一个中心点坐标
+        map.centerAndZoom(point, parseInt(zoomParam));//设定地图的中心点和坐标并将地图显示在地图容器中
+    }
+
+    //地图事件设置函数:
+    function setMapEvent() {
+        map.enableDragging();//启用地图拖拽事件,默认启用(可不写)
+        map.enableScrollWheelZoom();//启用地图滚轮放大缩小
+        map.enableDoubleClickZoom();//启用鼠标双击放大,默认启用(可不写)
+        map.enableKeyboard();//启用键盘上下左右键移动地图
+    }
+
+    //地图控件添加函数:
+    function addMapControl() {
+        //向地图中添加缩放控件
+        var ctrl_nav = new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_LARGE});
+        map.addControl(ctrl_nav);
+        //向地图中添加缩略图控件
+        var ctrl_ove = new BMap.OverviewMapControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 1});
+        map.addControl(ctrl_ove);
+        //向地图中添加比例尺控件
+        var ctrl_sca = new BMap.ScaleControl({anchor: BMAP_ANCHOR_BOTTOM_LEFT});
+        map.addControl(ctrl_sca);
+    }
+
+    function setMapListener() {
+        var editor = parent.editor, containerIframe,
+            iframes = parent.document.getElementsByTagName('iframe');
+        for (var key in iframes) {
+            if (iframes[key].contentWindow == window) {
+                containerIframe = iframes[key];
+                break;
+            }
+        }
+        if (containerIframe) {
+            map.addEventListener('moveend', mapListenerHandler);
+            map.addEventListener('zoomend', mapListenerHandler);
+            marker.addEventListener('dragend', mapListenerHandler);
+        }
+
+        function mapListenerHandler() {
+            var zoom = map.getZoom(),
+                center = map.getCenter(),
+                marker = window.marker.getPoint();
+            containerIframe.src = containerIframe.src.
+                replace(new RegExp('([?#&])center=([^?#&]+)', 'i'), '$1center=' + center.lng + ',' + center.lat).
+                replace(new RegExp('([?#&])markers=([^?#&]+)', 'i'), '$1markers=' + marker.lng + ',' + marker.lat).
+                replace(new RegExp('([?#&])zoom=([^?#&]+)', 'i'), '$1zoom=' + zoom);
+            editor.fireEvent('saveScene');
+        }
+    }
+</script>
+</html>

BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/scale.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/scaleH.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/size.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/undo.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/undoH.png


+ 72 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/scrawl.css

@@ -0,0 +1,72 @@
+/*common
+*/
+body{margin: 0;}
+table{width:100%;}
+table td{padding:2px 4px;vertical-align: middle;}
+a{text-decoration: none;}
+em{font-style: normal;}
+.border_style1{border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;}
+/*module
+*/
+.main{margin: 8px;overflow: hidden;}
+
+.hot{float:left;height:335px;}
+.drawBoard{position: relative; cursor: crosshair;}
+.brushBorad{position: absolute;left:0;top:0;z-index: 998;}
+.picBoard{border: none;text-align: center;line-height: 300px;cursor: default;}
+.operateBar{margin-top:10px;font-size:12px;text-align: center;}
+.operateBar span{margin-left: 10px;}
+
+.drawToolbar{float:right;width:110px;height:300px;overflow: hidden;}
+.colorBar{margin-top:10px;font-size: 12px;text-align: center;}
+.colorBar a{display:block;width: 10px;height: 10px;border:1px solid #1006F1;border-radius: 3px; box-shadow:2px 2px 5px #d3d6da;opacity: 0.3}
+.sectionBar{margin-top:15px;font-size: 12px;text-align: center;}
+.sectionBar a{display:inline-block;width:10px;height:12px;color: #888;text-indent: -999px;opacity: 0.3}
+.size1{background: url('images/size.png') 1px center no-repeat ;}
+.size2{background: url('images/size.png') -10px center no-repeat;}
+.size3{background: url('images/size.png') -22px center no-repeat;}
+.size4{background: url('images/size.png') -35px center no-repeat;}
+
+.addImgH{position: relative;}
+.addImgH_form{position: absolute;left: 18px;top: -1px;width: 75px;height: 21px;opacity: 0;cursor: pointer;}
+.addImgH_form input{width: 100%;}
+/*scrawl遮罩层
+*/
+.maskLayerNull{display: none;}
+.maskLayer{position: absolute;top:0;left:0;width: 100%; height: 100%;opacity: 0.7;
+    background-color: #fff;text-align:center;font-weight:bold;line-height:300px;z-index: 1000;}
+/*btn state
+*/
+.previousStepH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/undoH.png');cursor: pointer;}
+.previousStepH .text{color:#888;cursor:pointer;}
+.previousStep .icon{display: inline-block;width:16px;height:16px;background-image: url('images/undo.png');cursor:default;}
+.previousStep .text{color:#ccc;cursor:default;}
+
+.nextStepH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/redoH.png');cursor: pointer;}
+.nextStepH .text{color:#888;cursor:pointer;}
+.nextStep .icon{display: inline-block;width:16px;height:16px;background-image: url('images/redo.png');cursor:default;}
+.nextStep .text{color:#ccc;cursor:default;}
+
+.clearBoardH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/emptyH.png');cursor: pointer;}
+.clearBoardH .text{color:#888;cursor:pointer;}
+.clearBoard .icon{display: inline-block;width:16px;height:16px;background-image: url('images/empty.png');cursor:default;}
+.clearBoard .text{color:#ccc;cursor:default;}
+
+.scaleBoardH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/scaleH.png');cursor: pointer;}
+.scaleBoardH .text{color:#888;cursor:pointer;}
+.scaleBoard .icon{display: inline-block;width:16px;height:16px;background-image: url('images/scale.png');cursor:default;}
+.scaleBoard .text{color:#ccc;cursor:default;}
+
+.removeImgH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/delimgH.png');cursor: pointer;}
+.removeImgH .text{color:#888;cursor:pointer;}
+.removeImg .icon{display: inline-block;width:16px;height:16px;background-image: url('images/delimg.png');cursor:default;}
+.removeImg .text{color:#ccc;cursor:default;}
+
+.addImgH .icon{vertical-align:top;display: inline-block;width:16px;height:16px;background-image: url('images/addimg.png')}
+.addImgH .text{color:#888;cursor:pointer;}
+/*icon
+*/
+.brushIcon{display: inline-block;width:16px;height:16px;background-image: url('images/brush.png')}
+.eraserIcon{display: inline-block;width:16px;height:16px;background-image: url('images/eraser.png')}
+
+

+ 95 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/scrawl.html

@@ -0,0 +1,95 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title></title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <meta name="robots" content="noindex, nofollow"/>
+    <script type="text/javascript" src="../internal.js"></script>
+    <link rel="stylesheet" type="text/css" href="scrawl.css">
+</head>
+<body>
+<div class="main" id="J_wrap">
+    <div class="hot">
+        <div class="drawBoard border_style1">
+            <canvas id="J_brushBoard" class="brushBorad" width="360" height="300"></canvas>
+            <div id="J_picBoard" class="picBoard" style="width: 360px;height: 300px"></div>
+        </div>
+        <div id="J_operateBar" class="operateBar">
+            <span id="J_previousStep" class="previousStep">
+                <em class="icon"></em>
+                <em class="text"><var id="lang_input_previousStep"></var></em>
+            </span>
+            <span id="J_nextStep" class="nextStep">
+                <em class="icon"></em>
+                <em class="text"><var id="lang_input_nextsStep"></var></em>
+            </span>
+            <span id="J_clearBoard" class="clearBoard">
+                <em class="icon"></em>
+                <em class="text"><var id="lang_input_clear"></var></em>
+            </span>
+            <span id="J_sacleBoard" class="scaleBoard">
+                <em class="icon"></em>
+                <em class="text"><var id="lang_input_ScalePic"></var></em>
+            </span>
+        </div>
+    </div>
+    <div class="drawToolbar border_style1">
+        <div id="J_colorBar" class="colorBar"></div>
+        <div id="J_brushBar" class="sectionBar">
+            <em class="brushIcon"></em>
+            <a href="javascript:void(0)" class="size1">1</a>
+            <a href="javascript:void(0)" class="size2">3</a>
+            <a href="javascript:void(0)" class="size3">5</a>
+            <a href="javascript:void(0)" class="size4">7</a>
+        </div>
+        <div id="J_eraserBar" class="sectionBar">
+            <em class="eraserIcon"></em>
+            <a href="javascript:void(0)" class="size1">1</a>
+            <a href="javascript:void(0)" class="size2">3</a>
+            <a href="javascript:void(0)" class="size3">5</a>
+            <a href="javascript:void(0)" class="size4">7</a>
+        </div>
+        <div class="sectionBar">
+            <div id="J_addImg" class="addImgH">
+                <em class="icon"></em>
+                <em class="text"><var id="lang_input_addPic"></var></em>
+                <form method="post" id="fileForm" enctype="multipart/form-data" class="addImgH_form" target="up">
+                    <input type="file" name="upfile" id="J_imgTxt"
+                           accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"/>
+                </form>
+                <iframe name="up" style="display: none"></iframe>
+            </div>
+        </div>
+        <div class="sectionBar">
+            <span id="J_removeImg" class="removeImg">
+                <em class="icon"></em>
+                <em class="text"><var id="lang_input_removePic"></var></em>
+            </span>
+        </div>
+    </div>
+</div>
+<div id="J_maskLayer" class="maskLayerNull"></div>
+
+<script type="text/javascript" src="scrawl.js"></script>
+<script type="text/javascript">
+    var settings = {
+        drawBrushSize:3, //画笔初始大小
+        drawBrushColor:"#4bacc6", //画笔初始颜色
+        colorList:['c00000', 'ff0000', 'ffc000', 'ffff00', '92d050', '00b050', '00b0f0', '0070c0', '002060', '7030a0', 'ffffff',
+            '000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646'], //画笔选择颜色
+        saveNum:10  //撤销次数
+    };
+
+    var scrawlObj = new scrawl( settings );
+    scrawlObj.isCancelScrawl = false;
+
+    dialog.onok = function () {
+        exec( scrawlObj );
+        return false;
+    };
+    dialog.oncancel = function () {
+        scrawlObj.isCancelScrawl = true;
+    };
+</script>
+</body>
+</html>

+ 671 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/scrawl.js

@@ -0,0 +1,671 @@
+/**
+ * Created with JetBrains PhpStorm.
+ * User: xuheng
+ * Date: 12-5-22
+ * Time: 上午11:38
+ * To change this template use File | Settings | File Templates.
+ */
+var scrawl = function (options) {
+    options && this.initOptions(options);
+};
+(function () {
+    var canvas = $G("J_brushBoard"),
+        context = canvas.getContext('2d'),
+        drawStep = [], //undo redo存储
+        drawStepIndex = 0; //undo redo指针
+
+    scrawl.prototype = {
+        isScrawl:false, //是否涂鸦
+        brushWidth:-1, //画笔粗细
+        brushColor:"", //画笔颜色
+
+        initOptions:function (options) {
+            var me = this;
+            me.originalState(options);//初始页面状态
+            me._buildToolbarColor(options.colorList);//动态生成颜色选择集合
+
+            me._addBoardListener(options.saveNum);//添加画板处理
+            me._addOPerateListener(options.saveNum);//添加undo redo clearBoard处理
+            me._addColorBarListener();//添加颜色选择处理
+            me._addBrushBarListener();//添加画笔大小处理
+            me._addEraserBarListener();//添加橡皮大小处理
+            me._addAddImgListener();//添加增添背景图片处理
+            me._addRemoveImgListenter();//删除背景图片处理
+            me._addScalePicListenter();//添加缩放处理
+            me._addClearSelectionListenter();//添加清楚选中状态处理
+
+            me._originalColorSelect(options.drawBrushColor);//初始化颜色选中
+            me._originalBrushSelect(options.drawBrushSize);//初始化画笔选中
+            me._clearSelection();//清楚选中状态
+        },
+
+        originalState:function (options) {
+            var me = this;
+
+            me.brushWidth = options.drawBrushSize;//同步画笔粗细
+            me.brushColor = options.drawBrushColor;//同步画笔颜色
+
+            context.lineWidth = me.brushWidth;//初始画笔大小
+            context.strokeStyle = me.brushColor;//初始画笔颜色
+            context.fillStyle = "transparent";//初始画布背景颜色
+            context.lineCap = "round";//去除锯齿
+            context.fill();
+        },
+        _buildToolbarColor:function (colorList) {
+            var tmp = null, arr = [];
+            arr.push("<table id='J_colorList'>");
+            for (var i = 0, color; color = colorList[i++];) {
+                if ((i - 1) % 5 == 0) {
+                    if (i != 1) {
+                        arr.push("</tr>");
+                    }
+                    arr.push("<tr>");
+                }
+                tmp = '#' + color;
+                arr.push("<td><a title='" + tmp + "' href='javascript:void(0)' style='background-color:" + tmp + "'></a></td>");
+            }
+            arr.push("</tr></table>");
+            $G("J_colorBar").innerHTML = arr.join("");
+        },
+
+        _addBoardListener:function (saveNum) {
+            var me = this,
+                margin = 0,
+                startX = -1,
+                startY = -1,
+                isMouseDown = false,
+                isMouseMove = false,
+                isMouseUp = false,
+                buttonPress = 0, button, flag = '';
+
+            margin = parseInt(domUtils.getComputedStyle($G("J_wrap"), "margin-left"));
+            drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height));
+            drawStepIndex += 1;
+
+            domUtils.on(canvas, ["mousedown", "mousemove", "mouseup", "mouseout"], function (e) {
+                button = browser.webkit ? e.which : buttonPress;
+                switch (e.type) {
+                    case 'mousedown':
+                        buttonPress = 1;
+                        flag = 1;
+                        isMouseDown = true;
+                        isMouseUp = false;
+                        isMouseMove = false;
+                        me.isScrawl = true;
+                        startX = e.clientX - margin;//10为外边距总和
+                        startY = e.clientY - margin;
+                        context.beginPath();
+                        break;
+                    case 'mousemove' :
+                        if (!flag && button == 0) {
+                            return;
+                        }
+                        if (!flag && button) {
+                            startX = e.clientX - margin;//10为外边距总和
+                            startY = e.clientY - margin;
+                            context.beginPath();
+                            flag = 1;
+                        }
+                        if (isMouseUp || !isMouseDown) {
+                            return;
+                        }
+                        var endX = e.clientX - margin,
+                            endY = e.clientY - margin;
+
+                        context.moveTo(startX, startY);
+                        context.lineTo(endX, endY);
+                        context.stroke();
+                        startX = endX;
+                        startY = endY;
+                        isMouseMove = true;
+                        break;
+                    case 'mouseup':
+                        buttonPress = 0;
+                        if (!isMouseDown)return;
+                        if (!isMouseMove) {
+                            context.arc(startX, startY, context.lineWidth, 0, Math.PI * 2, false);
+                            context.fillStyle = context.strokeStyle;
+                            context.fill();
+                        }
+                        context.closePath();
+                        me._saveOPerate(saveNum);
+                        isMouseDown = false;
+                        isMouseMove = false;
+                        isMouseUp = true;
+                        startX = -1;
+                        startY = -1;
+                        break;
+                    case 'mouseout':
+                        flag = '';
+                        buttonPress = 0;
+                        if (button == 1) return;
+                        context.closePath();
+                        break;
+                }
+            });
+        },
+        _addOPerateListener:function (saveNum) {
+            var me = this;
+            domUtils.on($G("J_previousStep"), "click", function () {
+                if (drawStepIndex > 1) {
+                    drawStepIndex -= 1;
+                    context.clearRect(0, 0, context.canvas.width, context.canvas.height);
+                    context.putImageData(drawStep[drawStepIndex - 1], 0, 0);
+                    me.btn2Highlight("J_nextStep");
+                    drawStepIndex == 1 && me.btn2disable("J_previousStep");
+                }
+            });
+            domUtils.on($G("J_nextStep"), "click", function () {
+                if (drawStepIndex > 0 && drawStepIndex < drawStep.length) {
+                    context.clearRect(0, 0, context.canvas.width, context.canvas.height);
+                    context.putImageData(drawStep[drawStepIndex], 0, 0);
+                    drawStepIndex += 1;
+                    me.btn2Highlight("J_previousStep");
+                    drawStepIndex == drawStep.length && me.btn2disable("J_nextStep");
+                }
+            });
+            domUtils.on($G("J_clearBoard"), "click", function () {
+                context.clearRect(0, 0, context.canvas.width, context.canvas.height);
+                drawStep = [];
+                me._saveOPerate(saveNum);
+                drawStepIndex = 1;
+                me.isScrawl = false;
+                me.btn2disable("J_previousStep");
+                me.btn2disable("J_nextStep");
+                me.btn2disable("J_clearBoard");
+            });
+        },
+        _addColorBarListener:function () {
+            var me = this;
+            domUtils.on($G("J_colorBar"), "click", function (e) {
+                var target = me.getTarget(e),
+                    color = target.title;
+                if (!!color) {
+                    me._addColorSelect(target);
+
+                    me.brushColor = color;
+                    context.globalCompositeOperation = "source-over";
+                    context.lineWidth = me.brushWidth;
+                    context.strokeStyle = color;
+                }
+            });
+        },
+        _addBrushBarListener:function () {
+            var me = this;
+            domUtils.on($G("J_brushBar"), "click", function (e) {
+                var target = me.getTarget(e),
+                    size = browser.ie ? target.innerText : target.text;
+                if (!!size) {
+                    me._addBESelect(target);
+
+                    context.globalCompositeOperation = "source-over";
+                    context.lineWidth = parseInt(size);
+                    context.strokeStyle = me.brushColor;
+                    me.brushWidth = context.lineWidth;
+                }
+            });
+        },
+        _addEraserBarListener:function () {
+            var me = this;
+            domUtils.on($G("J_eraserBar"), "click", function (e) {
+                var target = me.getTarget(e),
+                    size = browser.ie ? target.innerText : target.text;
+                if (!!size) {
+                    me._addBESelect(target);
+
+                    context.lineWidth = parseInt(size);
+                    context.globalCompositeOperation = "destination-out";
+                    context.strokeStyle = "#FFF";
+                }
+            });
+        },
+        _addAddImgListener:function () {
+            var file = $G("J_imgTxt");
+            if (!window.FileReader) {
+                $G("J_addImg").style.display = 'none';
+                $G("J_removeImg").style.display = 'none';
+                $G("J_sacleBoard").style.display = 'none';
+            }
+            domUtils.on(file, "change", function (e) {
+                var frm = file.parentNode;
+                addMaskLayer(lang.backgroundUploading);
+
+                var target = e.target || e.srcElement,
+                    reader = new FileReader();
+                reader.onload = function(evt){
+                    var target = evt.target || evt.srcElement;
+                    ue_callback(target.result, 'SUCCESS');
+                };
+                reader.readAsDataURL(target.files[0]);
+                frm.reset();
+            });
+        },
+        _addRemoveImgListenter:function () {
+            var me = this;
+            domUtils.on($G("J_removeImg"), "click", function () {
+                $G("J_picBoard").innerHTML = "";
+                me.btn2disable("J_removeImg");
+                me.btn2disable("J_sacleBoard");
+            });
+        },
+        _addScalePicListenter:function () {
+            domUtils.on($G("J_sacleBoard"), "click", function () {
+                var picBoard = $G("J_picBoard"),
+                    scaleCon = $G("J_scaleCon"),
+                    img = picBoard.children[0];
+
+                if (img) {
+                    if (!scaleCon) {
+                        picBoard.style.cssText = "position:relative;z-index:999;"+picBoard.style.cssText;
+                        img.style.cssText = "position: absolute;top:" + (canvas.height - img.height) / 2 + "px;left:" + (canvas.width - img.width) / 2 + "px;";
+                        var scale = new ScaleBoy();
+                        picBoard.appendChild(scale.init());
+                        scale.startScale(img);
+                    } else {
+                        if (scaleCon.style.visibility == "visible") {
+                            scaleCon.style.visibility = "hidden";
+                            picBoard.style.position = "";
+                            picBoard.style.zIndex = "";
+                        } else {
+                            scaleCon.style.visibility = "visible";
+                            picBoard.style.cssText += "position:relative;z-index:999";
+                        }
+                    }
+                }
+            });
+        },
+        _addClearSelectionListenter:function () {
+            var doc = document;
+            domUtils.on(doc, 'mousemove', function (e) {
+                if (browser.ie && browser.version < 11)
+                    doc.selection.clear();
+                else
+                    window.getSelection().removeAllRanges();
+            });
+        },
+        _clearSelection:function () {
+            var list = ["J_operateBar", "J_colorBar", "J_brushBar", "J_eraserBar", "J_picBoard"];
+            for (var i = 0, group; group = list[i++];) {
+                domUtils.unSelectable($G(group));
+            }
+        },
+
+        _saveOPerate:function (saveNum) {
+            var me = this;
+            if (drawStep.length <= saveNum) {
+                if(drawStepIndex<drawStep.length){
+                    me.btn2disable("J_nextStep");
+                    drawStep.splice(drawStepIndex);
+                }
+                drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height));
+                drawStepIndex = drawStep.length;
+            } else {
+                drawStep.shift();
+                drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height));
+                drawStepIndex = drawStep.length;
+            }
+            me.btn2Highlight("J_previousStep");
+            me.btn2Highlight("J_clearBoard");
+        },
+
+        _originalColorSelect:function (title) {
+            var colorList = $G("J_colorList").getElementsByTagName("td");
+            for (var j = 0, cell; cell = colorList[j++];) {
+                if (cell.children[0].title.toLowerCase() == title) {
+                    cell.children[0].style.opacity = 1;
+                }
+            }
+        },
+        _originalBrushSelect:function (text) {
+            var brushList = $G("J_brushBar").children;
+            for (var i = 0, ele; ele = brushList[i++];) {
+                if (ele.tagName.toLowerCase() == "a") {
+                    var size = browser.ie ? ele.innerText : ele.text;
+                    if (size.toLowerCase() == text) {
+                        ele.style.opacity = 1;
+                    }
+                }
+            }
+        },
+        _addColorSelect:function (target) {
+            var me = this,
+                colorList = $G("J_colorList").getElementsByTagName("td"),
+                eraserList = $G("J_eraserBar").children,
+                brushList = $G("J_brushBar").children;
+
+            for (var i = 0, cell; cell = colorList[i++];) {
+                cell.children[0].style.opacity = 0.3;
+            }
+            for (var k = 0, ele; ele = brushList[k++];) {
+                if (ele.tagName.toLowerCase() == "a") {
+                    ele.style.opacity = 0.3;
+                    var size = browser.ie ? ele.innerText : ele.text;
+                    if (size.toLowerCase() == this.brushWidth) {
+                        ele.style.opacity = 1;
+                    }
+                }
+            }
+            for (var j = 0, node; node = eraserList[j++];) {
+                if (node.tagName.toLowerCase() == "a") {
+                    node.style.opacity = 0.3;
+                }
+            }
+
+            target.style.opacity = 1;
+            target.blur();
+        },
+        _addBESelect:function (target) {
+            var brushList = $G("J_brushBar").children;
+            var eraserList = $G("J_eraserBar").children;
+
+            for (var i = 0, ele; ele = brushList[i++];) {
+                if (ele.tagName.toLowerCase() == "a") {
+                    ele.style.opacity = 0.3;
+                }
+            }
+            for (var j = 0, node; node = eraserList[j++];) {
+                if (node.tagName.toLowerCase() == "a") {
+                    node.style.opacity = 0.3;
+                }
+            }
+
+            target.style.opacity = 1;
+            target.blur();
+        },
+        getCanvasData:function () {
+            var picContainer = $G("J_picBoard"),
+                img = picContainer.children[0];
+            if (img) {
+                var x, y;
+                if (img.style.position == "absolute") {
+                    x = parseInt(img.style.left);
+                    y = parseInt(img.style.top);
+                } else {
+                    x = (picContainer.offsetWidth - img.width) / 2;
+                    y = (picContainer.offsetHeight - img.height) / 2;
+                }
+                context.globalCompositeOperation = "destination-over";
+                context.drawImage(img, x, y, img.width, img.height);
+            } else {
+                context.globalCompositeOperation = "destination-atop";
+                context.fillStyle = "#fff";//重置画布背景白色
+                context.fillRect(0, 0, canvas.width, canvas.height);
+            }
+            try {
+                return canvas.toDataURL("image/png").substring(22);
+            } catch (e) {
+                return "";
+            }
+        },
+        btn2Highlight:function (id) {
+            var cur = $G(id);
+            cur.className.indexOf("H") == -1 && (cur.className += "H");
+        },
+        btn2disable:function (id) {
+            var cur = $G(id);
+            cur.className.indexOf("H") != -1 && (cur.className = cur.className.replace("H", ""));
+        },
+        getTarget:function (evt) {
+            return evt.target || evt.srcElement;
+        }
+    };
+})();
+
+var ScaleBoy = function () {
+    this.dom = null;
+    this.scalingElement = null;
+};
+(function () {
+    function _appendStyle() {
+        var doc = document,
+            head = doc.getElementsByTagName('head')[0],
+            style = doc.createElement('style'),
+            cssText = '.scale{visibility:hidden;cursor:move;position:absolute;left:0;top:0;width:100px;height:50px;background-color:#fff;font-size:0;line-height:0;opacity:.4;filter:Alpha(opacity=40);}'
+                + '.scale span{position:absolute;left:0;top:0;width:6px;height:6px;background-color:#006DAE;}'
+                + '.scale .hand0, .scale .hand7{cursor:nw-resize;}'
+                + '.scale .hand1, .scale .hand6{left:50%;margin-left:-3px;cursor:n-resize;}'
+                + '.scale .hand2, .scale .hand4, .scale .hand7{left:100%;margin-left:-6px;}'
+                + '.scale .hand3, .scale .hand4{top:50%;margin-top:-3px;cursor:w-resize;}'
+                + '.scale .hand5, .scale .hand6, .scale .hand7{margin-top:-6px;top:100%;}'
+                + '.scale .hand2, .scale .hand5{cursor:ne-resize;}';
+        style.type = 'text/css';
+
+        try {
+            style.appendChild(doc.createTextNode(cssText));
+        } catch (e) {
+            style.styleSheet.cssText = cssText;
+        }
+        head.appendChild(style);
+    }
+
+    function _getDom() {
+        var doc = document,
+            hand,
+            arr = [],
+            scale = doc.createElement('div');
+
+        scale.id = 'J_scaleCon';
+        scale.className = 'scale';
+        for (var i = 0; i < 8; i++) {
+            arr.push("<span class='hand" + i + "'></span>");
+        }
+        scale.innerHTML = arr.join("");
+        return scale;
+    }
+
+    var rect = [
+        //[left, top, width, height]
+        [1, 1, -1, -1],
+        [0, 1, 0, -1],
+        [0, 1, 1, -1],
+        [1, 0, -1, 0],
+        [0, 0, 1, 0],
+        [1, 0, -1, 1],
+        [0, 0, 0, 1],
+        [0, 0, 1, 1]
+    ];
+    ScaleBoy.prototype = {
+        init:function () {
+            _appendStyle();
+            var me = this,
+                scale = me.dom = _getDom();
+
+            me.scaleMousemove.fp = me;
+            domUtils.on(scale, 'mousedown', function (e) {
+                var target = e.target || e.srcElement;
+                me.start = {x:e.clientX, y:e.clientY};
+                if (target.className.indexOf('hand') != -1) {
+                    me.dir = target.className.replace('hand', '');
+                }
+                domUtils.on(document.body, 'mousemove', me.scaleMousemove);
+                e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
+            });
+            domUtils.on(document.body, 'mouseup', function (e) {
+                if (me.start) {
+                    domUtils.un(document.body, 'mousemove', me.scaleMousemove);
+                    if (me.moved) {
+                        me.updateScaledElement({position:{x:scale.style.left, y:scale.style.top}, size:{w:scale.style.width, h:scale.style.height}});
+                    }
+                    delete me.start;
+                    delete me.moved;
+                    delete me.dir;
+                }
+            });
+            return scale;
+        },
+        startScale:function (objElement) {
+            var me = this, Idom = me.dom;
+
+            Idom.style.cssText = 'visibility:visible;top:' + objElement.style.top + ';left:' + objElement.style.left + ';width:' + objElement.offsetWidth + 'px;height:' + objElement.offsetHeight + 'px;';
+            me.scalingElement = objElement;
+        },
+        updateScaledElement:function (objStyle) {
+            var cur = this.scalingElement,
+                pos = objStyle.position,
+                size = objStyle.size;
+            if (pos) {
+                typeof pos.x != 'undefined' && (cur.style.left = pos.x);
+                typeof pos.y != 'undefined' && (cur.style.top = pos.y);
+            }
+            if (size) {
+                size.w && (cur.style.width = size.w);
+                size.h && (cur.style.height = size.h);
+            }
+        },
+        updateStyleByDir:function (dir, offset) {
+            var me = this,
+                dom = me.dom, tmp;
+
+            rect['def'] = [1, 1, 0, 0];
+            if (rect[dir][0] != 0) {
+                tmp = parseInt(dom.style.left) + offset.x;
+                dom.style.left = me._validScaledProp('left', tmp) + 'px';
+            }
+            if (rect[dir][1] != 0) {
+                tmp = parseInt(dom.style.top) + offset.y;
+                dom.style.top = me._validScaledProp('top', tmp) + 'px';
+            }
+            if (rect[dir][2] != 0) {
+                tmp = dom.clientWidth + rect[dir][2] * offset.x;
+                dom.style.width = me._validScaledProp('width', tmp) + 'px';
+            }
+            if (rect[dir][3] != 0) {
+                tmp = dom.clientHeight + rect[dir][3] * offset.y;
+                dom.style.height = me._validScaledProp('height', tmp) + 'px';
+            }
+            if (dir === 'def') {
+                me.updateScaledElement({position:{x:dom.style.left, y:dom.style.top}});
+            }
+        },
+        scaleMousemove:function (e) {
+            var me = arguments.callee.fp,
+                start = me.start,
+                dir = me.dir || 'def',
+                offset = {x:e.clientX - start.x, y:e.clientY - start.y};
+
+            me.updateStyleByDir(dir, offset);
+            arguments.callee.fp.start = {x:e.clientX, y:e.clientY};
+            arguments.callee.fp.moved = 1;
+        },
+        _validScaledProp:function (prop, value) {
+            var ele = this.dom,
+                wrap = $G("J_picBoard");
+
+            value = isNaN(value) ? 0 : value;
+            switch (prop) {
+                case 'left':
+                    return value < 0 ? 0 : (value + ele.clientWidth) > wrap.clientWidth ? wrap.clientWidth - ele.clientWidth : value;
+                case 'top':
+                    return value < 0 ? 0 : (value + ele.clientHeight) > wrap.clientHeight ? wrap.clientHeight - ele.clientHeight : value;
+                case 'width':
+                    return value <= 0 ? 1 : (value + ele.offsetLeft) > wrap.clientWidth ? wrap.clientWidth - ele.offsetLeft : value;
+                case 'height':
+                    return value <= 0 ? 1 : (value + ele.offsetTop) > wrap.clientHeight ? wrap.clientHeight - ele.offsetTop : value;
+            }
+        }
+    };
+})();
+
+//后台回调
+function ue_callback(url, state) {
+    var doc = document,
+        picBorard = $G("J_picBoard"),
+        img = doc.createElement("img");
+
+    //图片缩放
+    function scale(img, max, oWidth, oHeight) {
+        var width = 0, height = 0, percent, ow = img.width || oWidth, oh = img.height || oHeight;
+        if (ow > max || oh > max) {
+            if (ow >= oh) {
+                if (width = ow - max) {
+                    percent = (width / ow).toFixed(2);
+                    img.height = oh - oh * percent;
+                    img.width = max;
+                }
+            } else {
+                if (height = oh - max) {
+                    percent = (height / oh).toFixed(2);
+                    img.width = ow - ow * percent;
+                    img.height = max;
+                }
+            }
+        }
+    }
+
+    //移除遮罩层
+    removeMaskLayer();
+    //状态响应
+    if (state == "SUCCESS") {
+        picBorard.innerHTML = "";
+        img.onload = function () {
+            scale(this, 300);
+            picBorard.appendChild(img);
+
+            var obj = new scrawl();
+            obj.btn2Highlight("J_removeImg");
+            //trace 2457
+            obj.btn2Highlight("J_sacleBoard");
+        };
+        img.src = url;
+    } else {
+        alert(state);
+    }
+}
+//去掉遮罩层
+function removeMaskLayer() {
+    var maskLayer = $G("J_maskLayer");
+    maskLayer.className = "maskLayerNull";
+    maskLayer.innerHTML = "";
+    dialog.buttons[0].setDisabled(false);
+}
+//添加遮罩层
+function addMaskLayer(html) {
+    var maskLayer = $G("J_maskLayer");
+    dialog.buttons[0].setDisabled(true);
+    maskLayer.className = "maskLayer";
+    maskLayer.innerHTML = html;
+}
+//执行确认按钮方法
+function exec(scrawlObj) {
+    if (scrawlObj.isScrawl) {
+        addMaskLayer(lang.scrawlUpLoading);
+        var base64 = scrawlObj.getCanvasData();
+        if (!!base64) {
+            var options = {
+                timeout:100000,
+                onsuccess:function (xhr) {
+                    if (!scrawlObj.isCancelScrawl) {
+                        var responseObj;
+                        responseObj = eval("(" + xhr.responseText + ")");
+                        if (responseObj.state == "SUCCESS") {
+                            var imgObj = {},
+                                url = editor.options.scrawlUrlPrefix + responseObj.url;
+                            imgObj.src = url;
+                            imgObj._src = url;
+                            imgObj.alt = responseObj.original || '';
+                            imgObj.title = responseObj.title || '';
+                            editor.execCommand("insertImage", imgObj);
+                            dialog.close();
+                        } else {
+                            alert(responseObj.state);
+                        }
+
+                    }
+                },
+                onerror:function () {
+                    alert(lang.imageError);
+                    dialog.close();
+                }
+            };
+            options[editor.getOpt('scrawlFieldName')] = base64;
+
+            var actionUrl = editor.getActionUrl(editor.getOpt('scrawlActionName')),
+                params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
+                url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + params);
+            ajax.request(url, options);
+        }
+    } else {
+        addMaskLayer(lang.noScarwl + "&nbsp;&nbsp;&nbsp;<input type='button' value='" + lang.continueBtn + "'  onclick='removeMaskLayer()'/>");
+    }
+}
+

+ 102 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/searchreplace/searchreplace.html

@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+    <title></title>
+    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
+    <script type="text/javascript" src="../internal.js"></script>
+    <style type="text/css">
+        .warpper{ position:relative;width: 380px; height: 100%; margin: 10px auto;}
+        .tabbody{height: 160px;}
+        .tabbody table{width:100%;border-collapse: separate;border-spacing: 3px;}
+        .tabbody .panel{width:373px;height:100%;padding-left: 5px;position: absolute;background-color: #fff;}
+        .tabbody input.int{ width:190px;height:21px;border:1px solid #d7d7d7;line-height:21px;}
+        .tabbody input.btn{padding: 0 5px; text-align:center;line-height:24px; text-decoration: none;height:24px;background:url("../../themes/default/images/dialog-title-bg.png") repeat-x;border:1px solid #ccc; }
+    </style>
+</head>
+<body>
+<div class="warpper" id="searchtab">
+    <div id="head" class="tabhead">
+        <span  tabsrc="find" class="focus"><var id="lang_tab_search"></var></span>
+        <span  tabsrc="replace" ><var id="lang_tab_replace"></var></span>
+    </div>
+    <div class="tabbody">
+        <div class="panel" id="find">
+            <table>
+                <tr>
+                    <td width="80"><var id="lang_search1"></var>: </td>
+                    <td><input id="findtxt" type="text" class="int" /></td>
+                </tr>
+                <!--<tr>-->
+
+                    <!--<td colspan="2"><span style="color:red"><var id="lang_searchReg"></var></span></td>-->
+                <!--</tr>-->
+                <tr>
+                    <td><var id="lang_case_sensitive1"></var></td>
+                    <td>
+                        <input id="matchCase" type="checkbox" />
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        <input id="nextFindBtn" type="button" class="btn" />
+                        <input id="preFindBtn" type="button" class="btn" />
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        &nbsp;
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        <span id="search-msg" style="color:red"></span>
+                    </td>
+                </tr>
+            </table>
+        </div>
+        <div class="panel" id="replace">
+            <table>
+                <tr>
+                    <td width="80"><var id="lang_search2"></var>: </td>
+                    <td><input id="findtxt1" type="text" class="int"  /></td>
+                </tr>
+                <!--<tr>-->
+
+                    <!--<td colspan="2"><span style="color:red"><var id="lang_searchReg1"></var></span></td>-->
+                <!--</tr>-->
+                <tr>
+                    <td><var id="lang_replace"></var>: </td>
+                    <td><input id="replacetxt" type="text" class="int" /></td>
+                </tr>
+                <tr>
+                    <td><var id="lang_case_sensitive2"></var></td>
+                    <td>
+                        <input id="matchCase1" type="checkbox" />
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        <input id="nextReplaceBtn" type="button" class="btn" />
+                        <input id="preReplaceBtn" type="button" class="btn" />
+                        <input id="repalceBtn" type="button" class="btn" />
+                        <input id="repalceAllBtn" type="button" class="btn" />
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        &nbsp;
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        <span id="replace-msg" style="color:red"></span>
+                    </td>
+                </tr>
+            </table>
+        </div>
+    </div>
+</div>
+<script type="text/javascript" src="searchreplace.js"></script>
+</body>
+</html>

+ 164 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/searchreplace/searchreplace.js

@@ -0,0 +1,164 @@
+/**
+ * Created with JetBrains PhpStorm.
+ * User: xuheng
+ * Date: 12-9-26
+ * Time: 下午12:29
+ * To change this template use File | Settings | File Templates.
+ */
+
+//清空上次查选的痕迹
+editor.firstForSR = 0;
+editor.currentRangeForSR = null;
+//给tab注册切换事件
+/**
+ * tab点击处理事件
+ * @param tabHeads
+ * @param tabBodys
+ * @param obj
+ */
+function clickHandler( tabHeads,tabBodys,obj ) {
+    //head样式更改
+    for ( var k = 0, len = tabHeads.length; k < len; k++ ) {
+        tabHeads[k].className = "";
+    }
+    obj.className = "focus";
+    //body显隐
+    var tabSrc = obj.getAttribute( "tabSrc" );
+    for ( var j = 0, length = tabBodys.length; j < length; j++ ) {
+        var body = tabBodys[j],
+            id = body.getAttribute( "id" );
+        if ( id != tabSrc ) {
+            body.style.zIndex = 1;
+        } else {
+            body.style.zIndex = 200;
+        }
+    }
+
+}
+
+/**
+ * TAB切换
+ * @param tabParentId  tab的父节点ID或者对象本身
+ */
+function switchTab( tabParentId ) {
+    var tabElements = $G( tabParentId ).children,
+        tabHeads = tabElements[0].children,
+        tabBodys = tabElements[1].children;
+
+    for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
+        var head = tabHeads[i];
+        if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
+        head.onclick = function () {
+            clickHandler(tabHeads,tabBodys,this);
+        }
+    }
+}
+$G('searchtab').onmousedown = function(){
+    $G('search-msg').innerHTML = '';
+    $G('replace-msg').innerHTML = ''
+}
+//是否区分大小写
+function getMatchCase(id) {
+    return $G(id).checked ? true : false;
+}
+//查找
+$G("nextFindBtn").onclick = function (txt, dir, mcase) {
+    var findtxt = $G("findtxt").value, obj;
+    if (!findtxt) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:1,
+        casesensitive:getMatchCase("matchCase")
+    };
+    if (!frCommond(obj)) {
+        var bk = editor.selection.getRange().createBookmark();
+        $G('search-msg').innerHTML = lang.getEnd;
+        editor.selection.getRange().moveToBookmark(bk).select();
+
+
+    }
+};
+$G("nextReplaceBtn").onclick = function (txt, dir, mcase) {
+    var findtxt = $G("findtxt1").value, obj;
+    if (!findtxt) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:1,
+        casesensitive:getMatchCase("matchCase1")
+    };
+    frCommond(obj);
+};
+$G("preFindBtn").onclick = function (txt, dir, mcase) {
+    var findtxt = $G("findtxt").value, obj;
+    if (!findtxt) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:-1,
+        casesensitive:getMatchCase("matchCase")
+    };
+    if (!frCommond(obj)) {
+        $G('search-msg').innerHTML = lang.getStart;
+    }
+};
+$G("preReplaceBtn").onclick = function (txt, dir, mcase) {
+    var findtxt = $G("findtxt1").value, obj;
+    if (!findtxt) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:-1,
+        casesensitive:getMatchCase("matchCase1")
+    };
+    frCommond(obj);
+};
+//替换
+$G("repalceBtn").onclick = function () {
+    var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj,
+        replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, "");
+    if (!findtxt) {
+        return false;
+    }
+    if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:1,
+        casesensitive:getMatchCase("matchCase1"),
+        replaceStr:replacetxt
+    };
+    frCommond(obj);
+};
+//全部替换
+$G("repalceAllBtn").onclick = function () {
+    var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj,
+        replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, "");
+    if (!findtxt) {
+        return false;
+    }
+    if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        casesensitive:getMatchCase("matchCase1"),
+        replaceStr:replacetxt,
+        all:true
+    };
+    var num = frCommond(obj);
+    if (num) {
+        $G('replace-msg').innerHTML = lang.countMsg.replace("{#count}", num);
+    }
+};
+//执行
+var frCommond = function (obj) {
+    return editor.execCommand("searchreplace", obj);
+};
+switchTab("searchtab");

+ 58 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/snapscreen/snapscreen.html

@@ -0,0 +1,58 @@
+<!DOCTYPE HTML>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+        <title></title>
+        <script type="text/javascript" src="../internal.js"></script>
+        <style type="text/css">
+            *{color: #838383}
+            html,body {
+                font-size: 12px;
+                width:100%;
+                height:100%;
+                overflow: hidden;
+                margin:0px;
+                padding:0px;
+            }
+            h2 { font-size: 16px; margin: 20px auto;}
+            .content{
+                padding:5px 15px 0 15px;
+                height:100%;
+            }
+            dt,dd { margin-left: 0; padding-left: 0;}
+            dt a { display: block;
+                    height: 30px;
+                    line-height: 30px;
+                    width: 55px;
+                    background: #EFEFEF;
+                    border: 1px solid #CCC;
+                    padding: 0 10px;
+                    text-decoration: none;
+            }
+            dt a:hover{
+                background: #e0e0e0;
+                border-color: #999
+            }
+            dt a:active{
+                background: #ccc;
+                border-color: #999;
+                color: #666;
+            }
+            dd { line-height:20px;margin-top: 10px;}
+            span{ padding-right:4px;}
+            input{width:210px;height:21px;background: #FFF;border:1px solid #d7d7d7;padding: 0px; margin: 0px; }
+
+
+        </style>
+    </head>
+    <body>
+        <div class="content">
+            <h2><var id="lang_showMsg"></var></h2>
+            <dl>
+                <dt><a href="../../third-party/snapscreen/UEditorSnapscreen.exe" target="_blank" id="downlink"><var id="lang_download"></var></a></dt>
+                <dd><var id="lang_step1"></var></dd>
+                <dd><var id="lang_step2"></var></dd>
+            </dl>
+        </div>
+    </body>
+</html>

+ 21 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/spechars/spechars.html

@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+    <title></title>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
+    <style type="text/css">
+        html,body{overflow:hidden;}
+        #specharsTab{width: 97%;margin: 10px auto; zoom:1;position: relative}
+        .tabbody {height:447px;}
+        .tabbody span{ margin: 5px 3px;text-align: center;display:inline-block;width: 40px;height:16px;line-height: 16px;cursor: pointer; }
+    </style>
+</head>
+<body>
+    <div id="specharsTab">
+        <div id="tabHeads" class="tabhead"></div><div id="tabBodys" class="tabbody"></div>
+    </div>
+<script type="text/javascript" src="spechars.js"></script>
+</body>
+</html>

File diff suppressed because it is too large
+ 57 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/spechars/spechars.js


+ 18 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/template/template.css

@@ -0,0 +1,18 @@
+.wrap{ padding: 5px;font-size: 14px;}
+.left{width:425px;float: left;}
+.right{width:160px;border: 1px solid #ccc;float: right;padding: 5px;margin-right: 5px;}
+.right .pre{height: 332px;overflow-y: auto;}
+.right .preitem{border: white 1px solid;margin: 5px 0;padding: 2px 0;}
+.right .preitem:hover{background-color: lemonChiffon;cursor: pointer;border: #ccc 1px solid;}
+.right .preitem img{display: block;margin: 0 auto;width:100px;}
+.clear{clear: both;}
+.top{height:26px;line-height: 26px;padding: 5px;}
+.bottom{height:320px;width:100%;margin: 0 auto;}
+.transparent{ background: url("images/bg.gif") repeat;}
+.bottom table tr td{border:1px dashed #ccc;}
+#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;}
+.border_style1{padding:2px;border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;}
+p{margin: 5px 0}
+table{clear:both;margin-bottom:10px;border-collapse:collapse;word-break:break-all;}
+li{clear:both}
+ol{padding-left:40px; }

+ 26 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/template/template.html

@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <title></title>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
+    <link rel="stylesheet" type="text/css" href="template.css">
+</head>
+<body>
+    <div class="wrap">
+        <div class="left">
+            <div class="top">
+                <label><var id="lang_template_clear"></var>:<input id="issave" type="checkbox"></label>
+            </div>
+            <div class="bottom border_style1" id="preview"></div>
+        </div>
+        <fieldset  class="right border_style1">
+            <legend><var id="lang_template_select"></var></legend>
+            <div class="pre" id="preitem"></div>
+        </fieldset>
+        <div class="clear"></div>
+    </div>
+    <script type="text/javascript" src="config.js"></script>
+    <script type="text/javascript" src="template.js"></script>
+</body>
+</html>

+ 53 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/template/template.js

@@ -0,0 +1,53 @@
+/**
+ * Created with JetBrains PhpStorm.
+ * User: xuheng
+ * Date: 12-8-8
+ * Time: 下午2:09
+ * To change this template use File | Settings | File Templates.
+ */
+(function () {
+    var me = editor,
+            preview = $G( "preview" ),
+            preitem = $G( "preitem" ),
+            tmps = templates,
+            currentTmp;
+    var initPre = function () {
+        var str = "";
+        for ( var i = 0, tmp; tmp = tmps[i++]; ) {
+            str += '<div class="preitem" onclick="pre(' + i + ')"><img src="' + "images/" + tmp.pre + '" ' + (tmp.title ? "alt=" + tmp.title + " title=" + tmp.title + "" : "") + '></div>';
+        }
+        preitem.innerHTML = str;
+    };
+    var pre = function ( n ) {
+        var tmp = tmps[n - 1];
+        currentTmp = tmp;
+        clearItem();
+        domUtils.setStyles( preitem.childNodes[n - 1], {
+            "background-color":"lemonChiffon",
+            "border":"#ccc 1px solid"
+        } );
+        preview.innerHTML = tmp.preHtml ? tmp.preHtml : "";
+    };
+    var clearItem = function () {
+        var items = preitem.children;
+        for ( var i = 0, item; item = items[i++]; ) {
+            domUtils.setStyles( item, {
+                "background-color":"",
+                "border":"white 1px solid"
+            } );
+        }
+    };
+    dialog.onok = function () {
+        if ( !$G( "issave" ).checked ){
+            me.execCommand( "cleardoc" );
+        }
+        var obj = {
+            html:currentTmp && currentTmp.html
+        };
+        me.execCommand( "template", obj );
+    };
+    initPre();
+    window.pre = pre;
+    pre(2)
+
+})();

BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/images/success.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/images/success.png


+ 635 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/video.css

@@ -0,0 +1,635 @@
+@charset "utf-8";
+.wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative}
+.tabbody{height: 335px;}
+.tabbody .panel {
+    position: absolute;
+    width: 0;
+    height: 0;
+    background: #fff;
+    overflow: hidden;
+    display: none;
+}
+.tabbody .panel.focus {
+    width: 100%;
+    height: 335px;
+    display: block;
+}
+
+.tabbody .panel table td{vertical-align: middle;}
+#videoUrl {
+    width: 490px;
+    height: 21px;
+    line-height: 21px;
+    margin: 8px 5px;
+    background: #FFF;
+    border: 1px solid #d7d7d7;
+}
+#videoSearchTxt{margin-left:15px;background: #FFF;width:200px;height:21px;line-height:21px;border: 1px solid #d7d7d7;}
+#searchList{width: 570px;overflow: auto;zoom:1;height: 270px;}
+#searchList div{float: left;width: 120px;height: 135px;margin: 5px 15px;}
+#searchList img{margin: 2px 8px;cursor: pointer;border: 2px solid #fff} /*不用缩略图*/
+#searchList p{margin-left: 10px;}
+#videoType{
+    width: 65px;
+    height: 23px;
+    line-height: 22px;
+    border: 1px solid #d7d7d7;
+}
+#videoSearchBtn,#videoSearchReset{
+    /*width: 80px;*/
+    height: 25px;
+    line-height: 25px;
+    background: #eee;
+    border: 1px solid #d7d7d7;
+    cursor: pointer;
+    padding: 0 5px;
+}
+
+
+
+#preview{position: relative;width: 420px;padding:0;overflow: hidden; margin-left: 10px; _margin-left:5px; height: 280px;background-color: #ddd;float: left}
+#preview .previewMsg {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;background-color: #666;}
+#preview .previewMsg span{display:block;margin: 125px auto 0 auto;text-align:center;font-size:18px;color:#fff;}
+#preview .previewVideo {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;}
+.edui-video-wrapper fieldset{
+    border: 1px solid #ddd;
+    padding-left: 5px;
+    margin-bottom: 20px;
+    padding-bottom: 5px;
+    width: 115px;
+}
+
+#videoInfo {width: 120px;float: left;margin-left: 10px;_margin-left:7px;}
+fieldset{
+    border: 1px solid #ddd;
+    padding-left: 5px;
+    margin-bottom: 20px;
+    padding-bottom: 5px;
+    width: 115px;
+}
+fieldset legend{font-weight: bold;}
+fieldset p{line-height: 30px;}
+fieldset input.txt{
+    width: 65px;
+    height: 21px;
+    line-height: 21px;
+    margin: 8px 5px;
+    background: #FFF;
+    border: 1px solid #d7d7d7;
+}
+label.url{font-weight: bold;margin-left: 5px;color: #06c;}
+#videoFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;}
+#videoFloat .focus{opacity: 1;filter: alpha(opacity = 100)}
+span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color: blue}
+
+
+
+
+/* upload video */
+.tabbody #upload.panel {
+    width: 0;
+    height: 0;
+    overflow: hidden;
+    position: absolute !important;
+    clip: rect(1px, 1px, 1px, 1px);
+    background: #fff;
+    display: block;
+}
+.tabbody #upload.panel.focus {
+    width: 100%;
+    height: 335px;
+    display: block;
+    clip: auto;
+}
+#upload_alignment div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;}
+#upload_alignment .focus{opacity: 1;filter: alpha(opacity = 100)}
+#upload_left { width:427px; float:left; }
+#upload_left .controller { height: 30px; clear: both; }
+#uploadVideoInfo{margin-top:10px;float:right;padding-right:8px;}
+
+#upload .queueList {
+    margin: 0;
+}
+
+#upload p {
+    margin: 0;
+}
+
+.element-invisible {
+    width: 0 !important;
+    height: 0 !important;
+    border: 0;
+    padding: 0;
+    margin: 0;
+    overflow: hidden;
+    position: absolute !important;
+    clip: rect(1px, 1px, 1px, 1px);
+}
+
+#upload .placeholder {
+    margin: 10px;
+    margin-right:0;
+    border: 2px dashed #e6e6e6;
+    *border: 0px dashed #e6e6e6;
+    height: 161px;
+    padding-top: 150px;
+    text-align: center;
+    width: 97%;
+    float: left;
+    background: url(./images/image.png) center 70px no-repeat;
+    color: #cccccc;
+    font-size: 18px;
+    position: relative;
+    top:0;
+    *margin-left: 0;
+    *left: 10px;
+}
+
+#upload .placeholder .webuploader-pick {
+    font-size: 18px;
+    background: #00b7ee;
+    border-radius: 3px;
+    line-height: 44px;
+    padding: 0 30px;
+    *width: 120px;
+    color: #fff;
+    display: inline-block;
+    margin: 0 auto 20px auto;
+    cursor: pointer;
+    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+}
+
+#upload .placeholder .webuploader-pick-hover {
+    background: #00a2d4;
+}
+
+
+#filePickerContainer {
+    text-align: center;
+}
+
+#upload .placeholder .flashTip {
+    color: #666666;
+    font-size: 12px;
+    position: absolute;
+    width: 100%;
+    text-align: center;
+    bottom: 20px;
+}
+
+#upload .placeholder .flashTip a {
+    color: #0785d1;
+    text-decoration: none;
+}
+
+#upload .placeholder .flashTip a:hover {
+    text-decoration: underline;
+}
+
+#upload .placeholder.webuploader-dnd-over {
+    border-color: #999999;
+}
+
+#upload .filelist {
+    list-style: none;
+    margin: 0;
+    padding: 0;
+    overflow-x: hidden;
+    overflow-y: auto;
+    position: relative;
+    height: 285px;
+}
+
+#upload .filelist:after {
+    content: '';
+    display: block;
+    width: 0;
+    height: 0;
+    overflow: hidden;
+    clear: both;
+}
+
+#upload .filelist li {
+    width: 113px;
+    height: 113px;
+    background: url(./images/bg.png);
+    text-align: center;
+    margin: 15px 0 0 20px;
+    *margin: 15px 0 0 15px;
+    position: relative;
+    display: block;
+    float: left;
+    overflow: hidden;
+    font-size: 12px;
+}
+
+#upload .filelist li p.log {
+    position: relative;
+    top: -45px;
+}
+
+#upload .filelist li p.title {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    top: 5px;
+    text-indent: 5px;
+    text-align: left;
+}
+
+#upload .filelist li p.progress {
+    position: absolute;
+    width: 100%;
+    bottom: 0;
+    left: 0;
+    height: 8px;
+    overflow: hidden;
+    z-index: 50;
+    margin: 0;
+    border-radius: 0;
+    background: none;
+    -webkit-box-shadow: 0 0 0;
+}
+
+#upload .filelist li p.progress span {
+    display: none;
+    overflow: hidden;
+    width: 0;
+    height: 100%;
+    background: #1483d8 url(./images/progress.png) repeat-x;
+
+    -webit-transition: width 200ms linear;
+    -moz-transition: width 200ms linear;
+    -o-transition: width 200ms linear;
+    -ms-transition: width 200ms linear;
+    transition: width 200ms linear;
+
+    -webkit-animation: progressmove 2s linear infinite;
+    -moz-animation: progressmove 2s linear infinite;
+    -o-animation: progressmove 2s linear infinite;
+    -ms-animation: progressmove 2s linear infinite;
+    animation: progressmove 2s linear infinite;
+
+    -webkit-transform: translateZ(0);
+}
+
+@-webkit-keyframes progressmove {
+    0% {
+        background-position: 0 0;
+    }
+    100% {
+        background-position: 17px 0;
+    }
+}
+
+@-moz-keyframes progressmove {
+    0% {
+        background-position: 0 0;
+    }
+    100% {
+        background-position: 17px 0;
+    }
+}
+
+@keyframes progressmove {
+    0% {
+        background-position: 0 0;
+    }
+    100% {
+        background-position: 17px 0;
+    }
+}
+
+#upload .filelist li p.imgWrap {
+    position: relative;
+    z-index: 2;
+    line-height: 113px;
+    vertical-align: middle;
+    overflow: hidden;
+    width: 113px;
+    height: 113px;
+
+    -webkit-transform-origin: 50% 50%;
+    -moz-transform-origin: 50% 50%;
+    -o-transform-origin: 50% 50%;
+    -ms-transform-origin: 50% 50%;
+    transform-origin: 50% 50%;
+
+    -webit-transition: 200ms ease-out;
+    -moz-transition: 200ms ease-out;
+    -o-transition: 200ms ease-out;
+    -ms-transition: 200ms ease-out;
+    transition: 200ms ease-out;
+}
+#upload .filelist li p.imgWrap.notimage {
+    margin-top: 0;
+    width: 111px;
+    height: 111px;
+    border: 1px #eeeeee solid;
+}
+#upload .filelist li p.imgWrap.notimage i.file-preview {
+    margin-top: 15px;
+}
+
+#upload .filelist li img {
+    width: 100%;
+}
+
+#upload .filelist li p.error {
+    background: #f43838;
+    color: #fff;
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    height: 28px;
+    line-height: 28px;
+    width: 100%;
+    z-index: 100;
+    display:none;
+}
+
+#upload .filelist li .success {
+    display: block;
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    height: 40px;
+    width: 100%;
+    z-index: 200;
+    background: url(./images/success.png) no-repeat right bottom;
+    background-image: url(./images/success.gif) \9;
+}
+
+#upload .filelist li.filePickerBlock {
+    width: 113px;
+    height: 113px;
+    background: url(./images/image.png) no-repeat center 12px;
+    border: 1px solid #eeeeee;
+    border-radius: 0;
+}
+#upload .filelist li.filePickerBlock div.webuploader-pick  {
+    width: 100%;
+    height: 100%;
+    margin: 0;
+    padding: 0;
+    opacity: 0;
+    background: none;
+    font-size: 0;
+}
+
+#upload .filelist div.file-panel {
+    position: absolute;
+    height: 0;
+    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0;
+    background: rgba(0, 0, 0, 0.5);
+    width: 100%;
+    top: 0;
+    left: 0;
+    overflow: hidden;
+    z-index: 300;
+}
+
+#upload .filelist div.file-panel span {
+    width: 24px;
+    height: 24px;
+    display: inline;
+    float: right;
+    text-indent: -9999px;
+    overflow: hidden;
+    background: url(./images/icons.png) no-repeat;
+    background: url(./images/icons.gif) no-repeat \9;
+    margin: 5px 1px 1px;
+    cursor: pointer;
+    -webkit-tap-highlight-color: rgba(0,0,0,0);
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+}
+
+#upload .filelist div.file-panel span.rotateLeft {
+    display:none;
+    background-position: 0 -24px;
+}
+
+#upload .filelist div.file-panel span.rotateLeft:hover {
+    background-position: 0 0;
+}
+
+#upload .filelist div.file-panel span.rotateRight {
+    display:none;
+    background-position: -24px -24px;
+}
+
+#upload .filelist div.file-panel span.rotateRight:hover {
+    background-position: -24px 0;
+}
+
+#upload .filelist div.file-panel span.cancel {
+    background-position: -48px -24px;
+}
+
+#upload .filelist div.file-panel span.cancel:hover {
+    background-position: -48px 0;
+}
+
+#upload .statusBar {
+    height: 45px;
+    border-bottom: 1px solid #dadada;
+    margin: 0 10px;
+    padding: 0;
+    line-height: 45px;
+    vertical-align: middle;
+    position: relative;
+}
+
+#upload .statusBar .progress {
+    border: 1px solid #1483d8;
+    width: 198px;
+    background: #fff;
+    height: 18px;
+    position: absolute;
+    top: 12px;
+    display: none;
+    text-align: center;
+    line-height: 18px;
+    color: #6dbfff;
+    margin: 0 10px 0 0;
+}
+#upload .statusBar .progress span.percentage {
+    width: 0;
+    height: 100%;
+    left: 0;
+    top: 0;
+    background: #1483d8;
+    position: absolute;
+}
+#upload .statusBar .progress span.text {
+    position: relative;
+    z-index: 10;
+}
+
+#upload .statusBar .info {
+    display: inline-block;
+    font-size: 14px;
+    color: #666666;
+}
+
+#upload .statusBar .btns {
+    position: absolute;
+    top: 7px;
+    right: 0;
+    line-height: 30px;
+}
+
+#filePickerBtn {
+    display: inline-block;
+    float: left;
+}
+#upload .statusBar .btns .webuploader-pick,
+#upload .statusBar .btns .uploadBtn,
+#upload .statusBar .btns .uploadBtn.state-uploading,
+#upload .statusBar .btns .uploadBtn.state-paused {
+    background: #ffffff;
+    border: 1px solid #cfcfcf;
+    color: #565656;
+    padding: 0 18px;
+    display: inline-block;
+    border-radius: 3px;
+    margin-left: 10px;
+    cursor: pointer;
+    font-size: 14px;
+    float: left;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+}
+#upload .statusBar .btns .webuploader-pick-hover,
+#upload .statusBar .btns .uploadBtn:hover,
+#upload .statusBar .btns .uploadBtn.state-uploading:hover,
+#upload .statusBar .btns .uploadBtn.state-paused:hover {
+    background: #f0f0f0;
+}
+
+#upload .statusBar .btns .uploadBtn,
+#upload .statusBar .btns .uploadBtn.state-paused{
+    background: #00b7ee;
+    color: #fff;
+    border-color: transparent;
+}
+#upload .statusBar .btns .uploadBtn:hover,
+#upload .statusBar .btns .uploadBtn.state-paused:hover{
+    background: #00a2d4;
+}
+
+#upload .statusBar .btns .uploadBtn.disabled {
+    pointer-events: none;
+    filter:alpha(opacity=60);
+    -moz-opacity:0.6;
+    -khtml-opacity: 0.6;
+    opacity: 0.6;
+}
+
+
+/* 在线文件的文件预览图标 */
+i.file-preview {
+    display: block;
+    margin: 10px auto;
+    width: 70px;
+    height: 70px;
+    background-image: url("./images/file-icons.png");
+    background-image: url("./images/file-icons.gif") \9;
+    background-position: -140px center;
+    background-repeat: no-repeat;
+}
+i.file-preview.file-type-dir{
+    background-position: 0 center;
+}
+i.file-preview.file-type-file{
+    background-position: -140px center;
+}
+i.file-preview.file-type-filelist{
+    background-position: -210px center;
+}
+i.file-preview.file-type-zip,
+i.file-preview.file-type-rar,
+i.file-preview.file-type-7z,
+i.file-preview.file-type-tar,
+i.file-preview.file-type-gz,
+i.file-preview.file-type-bz2{
+    background-position: -280px center;
+}
+i.file-preview.file-type-xls,
+i.file-preview.file-type-xlsx{
+    background-position: -350px center;
+}
+i.file-preview.file-type-doc,
+i.file-preview.file-type-docx{
+    background-position: -420px center;
+}
+i.file-preview.file-type-ppt,
+i.file-preview.file-type-pptx{
+    background-position: -490px center;
+}
+i.file-preview.file-type-vsd{
+    background-position: -560px center;
+}
+i.file-preview.file-type-pdf{
+    background-position: -630px center;
+}
+i.file-preview.file-type-txt,
+i.file-preview.file-type-md,
+i.file-preview.file-type-json,
+i.file-preview.file-type-htm,
+i.file-preview.file-type-xml,
+i.file-preview.file-type-html,
+i.file-preview.file-type-js,
+i.file-preview.file-type-css,
+i.file-preview.file-type-php,
+i.file-preview.file-type-jsp,
+i.file-preview.file-type-asp{
+    background-position: -700px center;
+}
+i.file-preview.file-type-apk{
+    background-position: -770px center;
+}
+i.file-preview.file-type-exe{
+    background-position: -840px center;
+}
+i.file-preview.file-type-ipa{
+    background-position: -910px center;
+}
+i.file-preview.file-type-mp4,
+i.file-preview.file-type-swf,
+i.file-preview.file-type-mkv,
+i.file-preview.file-type-avi,
+i.file-preview.file-type-flv,
+i.file-preview.file-type-mov,
+i.file-preview.file-type-mpg,
+i.file-preview.file-type-mpeg,
+i.file-preview.file-type-ogv,
+i.file-preview.file-type-webm,
+i.file-preview.file-type-rm,
+i.file-preview.file-type-rmvb{
+    background-position: -980px center;
+}
+i.file-preview.file-type-ogg,
+i.file-preview.file-type-wav,
+i.file-preview.file-type-wmv,
+i.file-preview.file-type-mid,
+i.file-preview.file-type-mp3{
+    background-position: -1050px center;
+}
+i.file-preview.file-type-jpg,
+i.file-preview.file-type-jpeg,
+i.file-preview.file-type-gif,
+i.file-preview.file-type-bmp,
+i.file-preview.file-type-png,
+i.file-preview.file-type-psd{
+    background-position: -140px center;
+}

+ 86 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/video.html

@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+    <title></title>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
+    <link rel="stylesheet" type="text/css" href="video.css" />
+</head>
+<body>
+<div class="wrapper">
+    <div id="videoTab">
+        <div id="tabHeads" class="tabhead">
+            <span tabSrc="video" class="focus" data-content-id="video"><var id="lang_tab_insertV"></var></span>
+            <span tabSrc="upload" data-content-id="upload"><var id="lang_tab_uploadV"></var></span>
+        </div>
+        <div id="tabBodys" class="tabbody">
+            <div id="video" class="panel focus">
+               <table><tr><td><label for="videoUrl" class="url"><var id="lang_video_url"></var></label></td><td><input id="videoUrl" type="text"></td></tr></table>
+               <div id="preview"></div>
+               <div id="videoInfo">
+                   <fieldset>
+                       <legend><var id="lang_video_size"></var></legend>
+                       <table>
+                           <tr><td><label for="videoWidth"><var id="lang_videoW"></var></label></td><td><input class="txt" id="videoWidth" type="text"/></td></tr>
+                           <tr><td><label for="videoHeight"><var id="lang_videoH"></var></label></td><td><input class="txt" id="videoHeight" type="text"/></td></tr>
+                       </table>
+                   </fieldset>
+                   <fieldset>
+                      <legend><var id="lang_alignment"></var></legend>
+                      <div id="videoFloat"></div>
+                  </fieldset>
+               </div>
+            </div>
+            <div id="upload" class="panel">
+                <div id="upload_left">
+                    <div id="queueList" class="queueList">
+                        <div class="statusBar element-invisible">
+                            <div class="progress">
+                                <span class="text">0%</span>
+                                <span class="percentage"></span>
+                            </div><div class="info"></div>
+                            <div class="btns">
+                                <div id="filePickerBtn"></div>
+                                <div class="uploadBtn"><var id="lang_start_upload"></var></div>
+                            </div>
+                        </div>
+                        <div id="dndArea" class="placeholder">
+                            <div class="filePickerContainer">
+                                <div id="filePickerReady"></div>
+                            </div>
+                        </div>
+                        <ul class="filelist element-invisible">
+                            <li id="filePickerBlock" class="filePickerBlock"></li>
+                        </ul>
+                    </div>
+                </div>
+                <div id="uploadVideoInfo">
+                    <fieldset>
+                        <legend><var id="lang_upload_size"></var></legend>
+                        <table>
+                            <tr><td><label><var id="lang_upload_width"></var></label></td><td><input class="txt" id="upload_width" type="text"/></td></tr>
+                            <tr><td><label><var id="lang_upload_height"></var></label></td><td><input class="txt" id="upload_height" type="text"/></td></tr>
+                        </table>
+                    </fieldset>
+                    <fieldset>
+                        <legend><var id="lang_upload_alignment"></var></legend>
+                        <div id="upload_alignment"></div>
+                    </fieldset>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<!-- jquery -->
+<script type="text/javascript" src="../../third-party/jquery-1.10.2.min.js"></script>
+
+<!-- webuploader -->
+<script type="text/javascript" src="../../third-party/webuploader/webuploader.min.js"></script>
+<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css">
+
+<!-- video -->
+<script type="text/javascript" src="video.js"></script>
+</body>
+</html>

+ 789 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/video.js

@@ -0,0 +1,789 @@
+/**
+ * Created by JetBrains PhpStorm.
+ * User: taoqili
+ * Date: 12-2-20
+ * Time: 上午11:19
+ * To change this template use File | Settings | File Templates.
+ */
+
+(function(){
+
+    var video = {},
+        uploadVideoList = [],
+        isModifyUploadVideo = false,
+        uploadFile;
+
+    window.onload = function(){
+        $focus($G("videoUrl"));
+        initTabs();
+        initVideo();
+        initUpload();
+    };
+
+    /* 初始化tab标签 */
+    function initTabs(){
+        var tabs = $G('tabHeads').children;
+        for (var i = 0; i < tabs.length; i++) {
+            domUtils.on(tabs[i], "click", function (e) {
+                var j, bodyId, target = e.target || e.srcElement;
+                for (j = 0; j < tabs.length; j++) {
+                    bodyId = tabs[j].getAttribute('data-content-id');
+                    if(tabs[j] == target){
+                        domUtils.addClass(tabs[j], 'focus');
+                        domUtils.addClass($G(bodyId), 'focus');
+                    }else {
+                        domUtils.removeClasses(tabs[j], 'focus');
+                        domUtils.removeClasses($G(bodyId), 'focus');
+                    }
+                }
+            });
+        }
+    }
+
+    function initVideo(){
+        createAlignButton( ["videoFloat", "upload_alignment"] );
+        addUrlChangeListener($G("videoUrl"));
+        addOkListener();
+
+        //编辑视频时初始化相关信息
+        (function(){
+            var img = editor.selection.getRange().getClosedNode(),url;
+            if(img && img.className){
+                var hasFakedClass = (img.className == "edui-faked-video"),
+                    hasUploadClass = img.className.indexOf("edui-upload-video")!=-1;
+                if(hasFakedClass || hasUploadClass) {
+                    $G("videoUrl").value = url = img.getAttribute("_url");
+                    $G("videoWidth").value = img.width;
+                    $G("videoHeight").value = img.height;
+                    var align = domUtils.getComputedStyle(img,"float"),
+                        parentAlign = domUtils.getComputedStyle(img.parentNode,"text-align");
+                    updateAlignButton(parentAlign==="center"?"center":align);
+                }
+                if(hasUploadClass) {
+                    isModifyUploadVideo = true;
+                }
+            }
+            createPreviewVideo(url);
+        })();
+    }
+
+    /**
+     * 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作
+     */
+    function addOkListener(){
+        dialog.onok = function(){
+            $G("preview").innerHTML = "";
+            var currentTab =  findFocus("tabHeads","tabSrc");
+            switch(currentTab){
+                case "video":
+                    return insertSingle();
+                    break;
+                case "videoSearch":
+                    return insertSearch("searchList");
+                    break;
+                case "upload":
+                    return insertUpload();
+                    break;
+            }
+        };
+        dialog.oncancel = function(){
+            $G("preview").innerHTML = "";
+        };
+    }
+
+    /**
+     * 依据传入的align值更新按钮信息
+     * @param align
+     */
+    function updateAlignButton( align ) {
+        var aligns = $G( "videoFloat" ).children;
+        for ( var i = 0, ci; ci = aligns[i++]; ) {
+            if ( ci.getAttribute( "name" ) == align ) {
+                if ( ci.className !="focus" ) {
+                    ci.className = "focus";
+                }
+            } else {
+                if ( ci.className =="focus" ) {
+                    ci.className = "";
+                }
+            }
+        }
+    }
+
+    /**
+     * 将单个视频信息插入编辑器中
+     */
+    function insertSingle(){
+        var width = $G("videoWidth"),
+            height = $G("videoHeight"),
+            url=$G('videoUrl').value,
+            align = findFocus("videoFloat","name");
+        if(!url) return false;
+        if ( !checkNum( [width, height] ) ) return false;
+        editor.execCommand('insertvideo', {
+            url: convert_url(url),
+            width: width.value,
+            height: height.value,
+            align: align
+        }, isModifyUploadVideo ? 'upload':null);
+    }
+
+    /**
+     * 将元素id下的所有代表视频的图片插入编辑器中
+     * @param id
+     */
+    function insertSearch(id){
+        var imgs = domUtils.getElementsByTagName($G(id),"img"),
+            videoObjs=[];
+        for(var i=0,img; img=imgs[i++];){
+            if(img.getAttribute("selected")){
+                videoObjs.push({
+                    url:img.getAttribute("ue_video_url"),
+                    width:420,
+                    height:280,
+                    align:"none"
+                });
+            }
+        }
+        editor.execCommand('insertvideo',videoObjs);
+    }
+
+    /**
+     * 找到id下具有focus类的节点并返回该节点下的某个属性
+     * @param id
+     * @param returnProperty
+     */
+    function findFocus( id, returnProperty ) {
+        var tabs = $G( id ).children,
+                property;
+        for ( var i = 0, ci; ci = tabs[i++]; ) {
+            if ( ci.className=="focus" ) {
+                property = ci.getAttribute( returnProperty );
+                break;
+            }
+        }
+        return property;
+    }
+    function convert_url(url){
+        if ( !url ) return '';
+        url = utils.trim(url)
+            .replace(/v\.youku\.com\/v_show\/id_([\w\-=]+)\.html/i, 'player.youku.com/player.php/sid/$1/v.swf')
+            .replace(/(www\.)?youtube\.com\/watch\?v=([\w\-]+)/i, "www.youtube.com/v/$2")
+            .replace(/youtu.be\/(\w+)$/i, "www.youtube.com/v/$1")
+            .replace(/v\.ku6\.com\/.+\/([\w\.]+)\.html.*$/i, "player.ku6.com/refer/$1/v.swf")
+            .replace(/www\.56\.com\/u\d+\/v_([\w\-]+)\.html/i, "player.56.com/v_$1.swf")
+            .replace(/www.56.com\/w\d+\/play_album\-aid\-\d+_vid\-([^.]+)\.html/i, "player.56.com/v_$1.swf")
+            .replace(/v\.pps\.tv\/play_([\w]+)\.html.*$/i, "player.pps.tv/player/sid/$1/v.swf")
+            .replace(/www\.letv\.com\/ptv\/vplay\/([\d]+)\.html.*$/i, "i7.imgs.letv.com/player/swfPlayer.swf?id=$1&autoplay=0")
+            .replace(/www\.tudou\.com\/programs\/view\/([\w\-]+)\/?/i, "www.tudou.com/v/$1")
+            .replace(/v\.qq\.com\/cover\/[\w]+\/[\w]+\/([\w]+)\.html/i, "static.video.qq.com/TPout.swf?vid=$1")
+            .replace(/v\.qq\.com\/.+[\?\&]vid=([^&]+).*$/i, "static.video.qq.com/TPout.swf?vid=$1")
+            .replace(/my\.tv\.sohu\.com\/[\w]+\/[\d]+\/([\d]+)\.shtml.*$/i, "share.vrs.sohu.com/my/v.swf&id=$1");
+
+        return url;
+    }
+
+    /**
+      * 检测传入的所有input框中输入的长宽是否是正数
+      * @param nodes input框集合,
+      */
+     function checkNum( nodes ) {
+         for ( var i = 0, ci; ci = nodes[i++]; ) {
+             var value = ci.value;
+             if ( !isNumber( value ) && value) {
+                 alert( lang.numError );
+                 ci.value = "";
+                 ci.focus();
+                 return false;
+             }
+         }
+         return true;
+     }
+
+    /**
+     * 数字判断
+     * @param value
+     */
+    function isNumber( value ) {
+        return /(0|^[1-9]\d*$)/.test( value );
+    }
+
+    /**
+      * 创建图片浮动选择按钮
+      * @param ids
+      */
+     function createAlignButton( ids ) {
+         for ( var i = 0, ci; ci = ids[i++]; ) {
+             var floatContainer = $G( ci ),
+                     nameMaps = {"none":lang['default'], "left":lang.floatLeft, "right":lang.floatRight, "center":lang.block};
+             for ( var j in nameMaps ) {
+                 var div = document.createElement( "div" );
+                 div.setAttribute( "name", j );
+                 if ( j == "none" ) div.className="focus";
+                 div.style.cssText = "background:url(images/" + j + "_focus.jpg);";
+                 div.setAttribute( "title", nameMaps[j] );
+                 floatContainer.appendChild( div );
+             }
+             switchSelect( ci );
+         }
+     }
+
+    /**
+     * 选择切换
+     * @param selectParentId
+     */
+    function switchSelect( selectParentId ) {
+        var selects = $G( selectParentId ).children;
+        for ( var i = 0, ci; ci = selects[i++]; ) {
+            domUtils.on( ci, "click", function () {
+                for ( var j = 0, cj; cj = selects[j++]; ) {
+                    cj.className = "";
+                    cj.removeAttribute && cj.removeAttribute( "class" );
+                }
+                this.className = "focus";
+            } )
+        }
+    }
+
+    /**
+     * 监听url改变事件
+     * @param url
+     */
+    function addUrlChangeListener(url){
+        if (browser.ie) {
+            url.onpropertychange = function () {
+                createPreviewVideo( this.value );
+            }
+        } else {
+            url.addEventListener( "input", function () {
+                createPreviewVideo( this.value );
+            }, false );
+        }
+    }
+
+    /**
+     * 根据url生成视频预览
+     * @param url
+     */
+    function createPreviewVideo(url){
+        if ( !url )return;
+
+        var conUrl = convert_url(url);
+
+        $G("preview").innerHTML = '<div class="previewMsg"><span>'+lang.urlError+'</span></div>'+
+        '<embed class="previewVideo" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"' +
+            ' src="' + conUrl + '"' +
+            ' width="' + 420  + '"' +
+            ' height="' + 280  + '"' +
+            ' wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true" >' +
+        '</embed>';
+    }
+
+
+    /* 插入上传视频 */
+    function insertUpload(){
+        var videoObjs=[],
+            uploadDir = editor.getOpt('videoUrlPrefix'),
+            width = $G('upload_width').value || 420,
+            height = $G('upload_height').value || 280,
+            align = findFocus("upload_alignment","name") || 'none';
+        for(var key in uploadVideoList) {
+            var file = uploadVideoList[key];
+            videoObjs.push({
+                url: uploadDir + file.url,
+                width:width,
+                height:height,
+                align:align
+            });
+        }
+
+        var count = uploadFile.getQueueCount();
+        if (count) {
+            $('.info', '#queueList').html('<span style="color:red;">' + '还有2个未上传文件'.replace(/[\d]/, count) + '</span>');
+            return false;
+        } else {
+            editor.execCommand('insertvideo', videoObjs, 'upload');
+        }
+    }
+
+    /*初始化上传标签*/
+    function initUpload(){
+        uploadFile = new UploadFile('queueList');
+    }
+
+
+    /* 上传附件 */
+    function UploadFile(target) {
+        this.$wrap = target.constructor == String ? $('#' + target) : $(target);
+        this.init();
+    }
+    UploadFile.prototype = {
+        init: function () {
+            this.fileList = [];
+            this.initContainer();
+            this.initUploader();
+        },
+        initContainer: function () {
+            this.$queue = this.$wrap.find('.filelist');
+        },
+        /* 初始化容器 */
+        initUploader: function () {
+            var _this = this,
+                $ = jQuery,    // just in case. Make sure it's not an other libaray.
+                $wrap = _this.$wrap,
+            // 图片容器
+                $queue = $wrap.find('.filelist'),
+            // 状态栏,包括进度和控制按钮
+                $statusBar = $wrap.find('.statusBar'),
+            // 文件总体选择信息。
+                $info = $statusBar.find('.info'),
+            // 上传按钮
+                $upload = $wrap.find('.uploadBtn'),
+            // 上传按钮
+                $filePickerBtn = $wrap.find('.filePickerBtn'),
+            // 上传按钮
+                $filePickerBlock = $wrap.find('.filePickerBlock'),
+            // 没选择文件之前的内容。
+                $placeHolder = $wrap.find('.placeholder'),
+            // 总体进度条
+                $progress = $statusBar.find('.progress').hide(),
+            // 添加的文件数量
+                fileCount = 0,
+            // 添加的文件总大小
+                fileSize = 0,
+            // 优化retina, 在retina下这个值是2
+                ratio = window.devicePixelRatio || 1,
+            // 缩略图大小
+                thumbnailWidth = 113 * ratio,
+                thumbnailHeight = 113 * ratio,
+            // 可能有pedding, ready, uploading, confirm, done.
+                state = '',
+            // 所有文件的进度信息,key为file id
+                percentages = {},
+                supportTransition = (function () {
+                    var s = document.createElement('p').style,
+                        r = 'transition' in s ||
+                            'WebkitTransition' in s ||
+                            'MozTransition' in s ||
+                            'msTransition' in s ||
+                            'OTransition' in s;
+                    s = null;
+                    return r;
+                })(),
+            // WebUploader实例
+                uploader,
+                actionUrl = editor.getActionUrl(editor.getOpt('videoActionName')),
+                fileMaxSize = editor.getOpt('videoMaxSize'),
+                acceptExtensions = (editor.getOpt('videoAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');;
+
+            if (!WebUploader.Uploader.support()) {
+                $('#filePickerReady').after($('<div>').html(lang.errorNotSupport)).hide();
+                return;
+            } else if (!editor.getOpt('videoActionName')) {
+                $('#filePickerReady').after($('<div>').html(lang.errorLoadConfig)).hide();
+                return;
+            }
+
+            uploader = _this.uploader = WebUploader.create({
+                pick: {
+                    id: '#filePickerReady',
+                    label: lang.uploadSelectFile
+                },
+                swf: '../../third-party/webuploader/Uploader.swf',
+                server: actionUrl,
+                fileVal: editor.getOpt('videoFieldName'),
+                duplicate: true,
+                fileSingleSizeLimit: fileMaxSize,
+                compress: false
+            });
+            uploader.addButton({
+                id: '#filePickerBlock'
+            });
+            uploader.addButton({
+                id: '#filePickerBtn',
+                label: lang.uploadAddFile
+            });
+
+            setState('pedding');
+
+            // 当有文件添加进来时执行,负责view的创建
+            function addFile(file) {
+                var $li = $('<li id="' + file.id + '">' +
+                        '<p class="title">' + file.name + '</p>' +
+                        '<p class="imgWrap"></p>' +
+                        '<p class="progress"><span></span></p>' +
+                        '</li>'),
+
+                    $btns = $('<div class="file-panel">' +
+                        '<span class="cancel">' + lang.uploadDelete + '</span>' +
+                        '<span class="rotateRight">' + lang.uploadTurnRight + '</span>' +
+                        '<span class="rotateLeft">' + lang.uploadTurnLeft + '</span></div>').appendTo($li),
+                    $prgress = $li.find('p.progress span'),
+                    $wrap = $li.find('p.imgWrap'),
+                    $info = $('<p class="error"></p>').hide().appendTo($li),
+
+                    showError = function (code) {
+                        switch (code) {
+                            case 'exceed_size':
+                                text = lang.errorExceedSize;
+                                break;
+                            case 'interrupt':
+                                text = lang.errorInterrupt;
+                                break;
+                            case 'http':
+                                text = lang.errorHttp;
+                                break;
+                            case 'not_allow_type':
+                                text = lang.errorFileType;
+                                break;
+                            default:
+                                text = lang.errorUploadRetry;
+                                break;
+                        }
+                        $info.text(text).show();
+                    };
+
+                if (file.getStatus() === 'invalid') {
+                    showError(file.statusText);
+                } else {
+                    $wrap.text(lang.uploadPreview);
+                    if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|'+file.ext.toLowerCase()+'|') == -1) {
+                        $wrap.empty().addClass('notimage').append('<i class="file-preview file-type-' + file.ext.toLowerCase() + '"></i>' +
+                            '<span class="file-title">' + file.name + '</span>');
+                    } else {
+                        if (browser.ie && browser.version <= 7) {
+                            $wrap.text(lang.uploadNoPreview);
+                        } else {
+                            uploader.makeThumb(file, function (error, src) {
+                                if (error || !src || (/^data:/.test(src) && browser.ie && browser.version <= 7)) {
+                                    $wrap.text(lang.uploadNoPreview);
+                                } else {
+                                    var $img = $('<img src="' + src + '">');
+                                    $wrap.empty().append($img);
+                                    $img.on('error', function () {
+                                        $wrap.text(lang.uploadNoPreview);
+                                    });
+                                }
+                            }, thumbnailWidth, thumbnailHeight);
+                        }
+                    }
+                    percentages[ file.id ] = [ file.size, 0 ];
+                    file.rotation = 0;
+
+                    /* 检查文件格式 */
+                    if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) {
+                        showError('not_allow_type');
+                        uploader.removeFile(file);
+                    }
+                }
+
+                file.on('statuschange', function (cur, prev) {
+                    if (prev === 'progress') {
+                        $prgress.hide().width(0);
+                    } else if (prev === 'queued') {
+                        $li.off('mouseenter mouseleave');
+                        $btns.remove();
+                    }
+                    // 成功
+                    if (cur === 'error' || cur === 'invalid') {
+                        showError(file.statusText);
+                        percentages[ file.id ][ 1 ] = 1;
+                    } else if (cur === 'interrupt') {
+                        showError('interrupt');
+                    } else if (cur === 'queued') {
+                        percentages[ file.id ][ 1 ] = 0;
+                    } else if (cur === 'progress') {
+                        $info.hide();
+                        $prgress.css('display', 'block');
+                    } else if (cur === 'complete') {
+                    }
+
+                    $li.removeClass('state-' + prev).addClass('state-' + cur);
+                });
+
+                $li.on('mouseenter', function () {
+                    $btns.stop().animate({height: 30});
+                });
+                $li.on('mouseleave', function () {
+                    $btns.stop().animate({height: 0});
+                });
+
+                $btns.on('click', 'span', function () {
+                    var index = $(this).index(),
+                        deg;
+
+                    switch (index) {
+                        case 0:
+                            uploader.removeFile(file);
+                            return;
+                        case 1:
+                            file.rotation += 90;
+                            break;
+                        case 2:
+                            file.rotation -= 90;
+                            break;
+                    }
+
+                    if (supportTransition) {
+                        deg = 'rotate(' + file.rotation + 'deg)';
+                        $wrap.css({
+                            '-webkit-transform': deg,
+                            '-mos-transform': deg,
+                            '-o-transform': deg,
+                            'transform': deg
+                        });
+                    } else {
+                        $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')');
+                    }
+
+                });
+
+                $li.insertBefore($filePickerBlock);
+            }
+
+            // 负责view的销毁
+            function removeFile(file) {
+                var $li = $('#' + file.id);
+                delete percentages[ file.id ];
+                updateTotalProgress();
+                $li.off().find('.file-panel').off().end().remove();
+            }
+
+            function updateTotalProgress() {
+                var loaded = 0,
+                    total = 0,
+                    spans = $progress.children(),
+                    percent;
+
+                $.each(percentages, function (k, v) {
+                    total += v[ 0 ];
+                    loaded += v[ 0 ] * v[ 1 ];
+                });
+
+                percent = total ? loaded / total : 0;
+
+                spans.eq(0).text(Math.round(percent * 100) + '%');
+                spans.eq(1).css('width', Math.round(percent * 100) + '%');
+                updateStatus();
+            }
+
+            function setState(val, files) {
+
+                if (val != state) {
+
+                    var stats = uploader.getStats();
+
+                    $upload.removeClass('state-' + state);
+                    $upload.addClass('state-' + val);
+
+                    switch (val) {
+
+                        /* 未选择文件 */
+                        case 'pedding':
+                            $queue.addClass('element-invisible');
+                            $statusBar.addClass('element-invisible');
+                            $placeHolder.removeClass('element-invisible');
+                            $progress.hide(); $info.hide();
+                            uploader.refresh();
+                            break;
+
+                        /* 可以开始上传 */
+                        case 'ready':
+                            $placeHolder.addClass('element-invisible');
+                            $queue.removeClass('element-invisible');
+                            $statusBar.removeClass('element-invisible');
+                            $progress.hide(); $info.show();
+                            $upload.text(lang.uploadStart);
+                            uploader.refresh();
+                            break;
+
+                        /* 上传中 */
+                        case 'uploading':
+                            $progress.show(); $info.hide();
+                            $upload.text(lang.uploadPause);
+                            break;
+
+                        /* 暂停上传 */
+                        case 'paused':
+                            $progress.show(); $info.hide();
+                            $upload.text(lang.uploadContinue);
+                            break;
+
+                        case 'confirm':
+                            $progress.show(); $info.hide();
+                            $upload.text(lang.uploadStart);
+
+                            stats = uploader.getStats();
+                            if (stats.successNum && !stats.uploadFailNum) {
+                                setState('finish');
+                                return;
+                            }
+                            break;
+
+                        case 'finish':
+                            $progress.hide(); $info.show();
+                            if (stats.uploadFailNum) {
+                                $upload.text(lang.uploadRetry);
+                            } else {
+                                $upload.text(lang.uploadStart);
+                            }
+                            break;
+                    }
+
+                    state = val;
+                    updateStatus();
+
+                }
+
+                if (!_this.getQueueCount()) {
+                    $upload.addClass('disabled')
+                } else {
+                    $upload.removeClass('disabled')
+                }
+
+            }
+
+            function updateStatus() {
+                var text = '', stats;
+
+                if (state === 'ready') {
+                    text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize));
+                } else if (state === 'confirm') {
+                    stats = uploader.getStats();
+                    if (stats.uploadFailNum) {
+                        text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum);
+                    }
+                } else {
+                    stats = uploader.getStats();
+                    text = lang.updateStatusFinish.replace('_', fileCount).
+                        replace('_KB', WebUploader.formatSize(fileSize)).
+                        replace('_', stats.successNum);
+
+                    if (stats.uploadFailNum) {
+                        text += lang.updateStatusError.replace('_', stats.uploadFailNum);
+                    }
+                }
+
+                $info.html(text);
+            }
+
+            uploader.on('fileQueued', function (file) {
+                fileCount++;
+                fileSize += file.size;
+
+                if (fileCount === 1) {
+                    $placeHolder.addClass('element-invisible');
+                    $statusBar.show();
+                }
+
+                addFile(file);
+            });
+
+            uploader.on('fileDequeued', function (file) {
+                fileCount--;
+                fileSize -= file.size;
+
+                removeFile(file);
+                updateTotalProgress();
+            });
+
+            uploader.on('filesQueued', function (file) {
+                if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) {
+                    setState('ready');
+                }
+                updateTotalProgress();
+            });
+
+            uploader.on('all', function (type, files) {
+                switch (type) {
+                    case 'uploadFinished':
+                        setState('confirm', files);
+                        break;
+                    case 'startUpload':
+                        /* 添加额外的GET参数 */
+                        var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
+                            url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params);
+                        uploader.option('server', url);
+                        setState('uploading', files);
+                        break;
+                    case 'stopUpload':
+                        setState('paused', files);
+                        break;
+                }
+            });
+
+            uploader.on('uploadBeforeSend', function (file, data, header) {
+                //这里可以通过data对象添加POST参数
+                header['X_Requested_With'] = 'XMLHttpRequest';
+            });
+
+            uploader.on('uploadProgress', function (file, percentage) {
+                var $li = $('#' + file.id),
+                    $percent = $li.find('.progress span');
+
+                $percent.css('width', percentage * 100 + '%');
+                percentages[ file.id ][ 1 ] = percentage;
+                updateTotalProgress();
+            });
+
+            uploader.on('uploadSuccess', function (file, ret) {
+                var $file = $('#' + file.id);
+                try {
+                    var responseText = (ret._raw || ret),
+                        json = utils.str2json(responseText);
+                    if (json.state == 'SUCCESS') {
+                        uploadVideoList.push({
+                            'url': json.url,
+                            'type': json.type,
+                            'original':json.original
+                        });
+                        $file.append('<span class="success"></span>');
+                    } else {
+                        $file.find('.error').text(json.state).show();
+                    }
+                } catch (e) {
+                    $file.find('.error').text(lang.errorServerUpload).show();
+                }
+            });
+
+            uploader.on('uploadError', function (file, code) {
+            });
+            uploader.on('error', function (code, file) {
+                if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') {
+                    addFile(file);
+                }
+            });
+            uploader.on('uploadComplete', function (file, ret) {
+            });
+
+            $upload.on('click', function () {
+                if ($(this).hasClass('disabled')) {
+                    return false;
+                }
+
+                if (state === 'ready') {
+                    uploader.upload();
+                } else if (state === 'paused') {
+                    uploader.upload();
+                } else if (state === 'uploading') {
+                    uploader.stop();
+                }
+            });
+
+            $upload.addClass('state-' + state);
+            updateTotalProgress();
+        },
+        getQueueCount: function () {
+            var file, i, status, readyFile = 0, files = this.uploader.getFiles();
+            for (i = 0; file = files[i++]; ) {
+                status = file.getStatus();
+                if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++;
+            }
+            return readyFile;
+        },
+        refresh: function(){
+            this.uploader.refresh();
+        }
+    };
+
+})();

+ 53 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/webapp/webapp.html

@@ -0,0 +1,53 @@
+<!DOCTYPE>
+<html>
+<head>
+    <title></title>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
+    <style type="text/css">
+        .wrapper{width: 540px; margin: 10px auto;}
+        #appShow {border: 1px solid #ddd;}
+        .errorMsg{font-size: 13px;margin: 10px;color: #dd0000}
+    </style>
+</head>
+<body>
+    <div class="wrapper">
+        <div id="appShow"></div>
+    </div>
+    <script type="text/javascript">
+        //此处配置您在百度上申请到的appkey。
+        var apikey = editor.options.webAppKey;
+        if ( apikey && apikey.length == 24 ) {
+            var searchConfig = {
+                container:'appShow', //容器ID
+                tips:"", //该值用于自动清空
+                search:1, //是否显示搜索框
+                ps:12, //每页显示的条数
+                suggest:1, //是否开启搜索自动完成
+                limit:0, //搜索结果显示条数,0表示无限制
+                searchNow:0, //是否在初始化完成时立即搜索
+                apikey:apikey, //每人得
+                pager:1,
+                cid:7134562,
+                outputHTML:1
+            },baiduApp;
+
+            function clickCallback() {
+                baiduApp.addEventListener( 'getAppHTML', function ( e, data ) {
+                    var url = 'http://app.baidu.com/app/enter?appid='+data.data['app_id'] +'&tn=app_canvas&app_spce_id=1&apikey='+apikey+'&api_key=' + apikey;
+                    editor.execCommand( "webapp", {url:url,width:data.uniWidth,height:data.uniHeight+60,logo:data.data['app_logo'],title:data.data['app_name']});
+                    dialog.close();
+                } );
+            }
+
+            var script = document.createElement( "script" );
+            script.type = "text/javascript";
+            script.src = "http://app.baidu.com/appweb/api/search?auto=yes&container=container&apikey=" + apikey + "&instanceName=baiduApp&callback=clickCallback&config=searchConfig";
+            document.body.appendChild( script );
+        } else {
+            $G( "appShow" ).innerHTML = "<p class='errorMsg'>"+lang.tip1+"<a title='"+lang.anthorApi+"' href='http://app.baidu.com/static/cms/getapikey.html' target='_blank'>"+lang.applyFor+"</a></p><p class='errorMsg'>"+lang.tip2+"</p>" ;
+        }
+
+    </script>
+</body>
+</html>

File diff suppressed because it is too large
+ 1495 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/wordimage/tangram.js


+ 111 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/wordimage/wordimage.html

@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+    <title></title>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
+    <style type="text/css">
+        .wrapper{width: 600px;padding: 10px;height: 352px;overflow: hidden;position: relative;border-bottom: 1px solid #d7d7d7}
+        .localPath input{float: left;width: 350px;line-height: 20px;height: 20px;}
+        #clipboard{float:left;width: 70px;height: 30px; }
+        .description{ color: #0066cc; margin-top: 2px; width: 450px; height: 45px;float: left;line-height: 22px}
+        #upload{width: 100px;height: 30px;float: right; margin:10px 2px 0 0;cursor: pointer;}
+        #msg{ width: 140px; height: 30px; line-height:25px;float: left;color: red}
+    </style>
+</head>
+<body>
+    <div class="wrapper">
+        <div class="localPath">
+            <input id="localPath" type="text" readonly />
+            <div id="clipboard"></div>
+            <div id="msg"></div>
+        </div>
+        <div id="flashContainer"></div>
+        <div>
+            <div id="upload" style="display: none" ><img id="uploadBtn"></div>
+            <div class="description">
+                <span style="color: red"><var id="lang_resave"></var>: </span><var id="lang_step"></var>
+            </div>
+          </div>
+    </div>
+    <script type="text/javascript" src="tangram.js"></script>
+    <script type="text/javascript" src="wordimage.js"></script>
+    <script type="text/javascript">
+        editor.setOpt({
+            wordImageFieldName:"upfile",
+            compressSide:0,
+            maxImageSideLength:900
+        });
+
+            //全局变量
+        var imageUrls = [],          //用于保存从服务器返回的图片信息数组
+            selectedImageCount = 0,  //当前已选择的但未上传的图片数量
+            optImageUrl = editor.getActionUrl(editor.getOpt('imageActionName')),
+            optImageFieldName = editor.getOpt('imageFieldName'),
+            optImageCompressBorder = editor.getOpt('imageCompressEnable') ? editor.getOpt('imageCompressBorder'):null,
+            maxSize = editor.getOpt('imageMaxSize') / 1024,
+            extension = editor.getOpt('imageAllowFiles').join(';').replace(/\./g, '*.');
+
+        /* 添加额外的GET参数 */
+        var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
+            urlWidthParams = optImageUrl + (optImageUrl.indexOf('?') == -1 ? '?':'&') + params;
+
+        utils.domReady(function(){
+            //创建Flash相关的参数集合
+            var flashOptions = {
+                container:"flashContainer",                                                    //flash容器id
+                url:urlWidthParams,                                           // 上传处理页面的url地址
+                ext:editor.queryCommandValue('serverParam') || {},                                 //可向服务器提交的自定义参数列表
+                fileType:'{"description":"'+lang.fileType+'", "extension":"' + extension + '"}',     //上传文件格式限制
+                flashUrl:'imageUploader.swf',                                                  //上传用的flash组件地址
+                width:600,          //flash的宽度
+                height:272,         //flash的高度
+                gridWidth:120,     // 每一个预览图片所占的宽度
+                gridHeight:120,    // 每一个预览图片所占的高度
+                picWidth:100,      // 单张预览图片的宽度
+                picHeight:100,     // 单张预览图片的高度
+                uploadDataFieldName: optImageFieldName,    // POST请求中图片数据的key
+                picDescFieldName:'pictitle',      // POST请求中图片描述的key
+                maxSize: maxSize,                         // 文件的最大体积,单位M
+                compressSize:1,                   // 上传前如果图片体积超过该值,会先压缩,单位M
+                maxNum:32,                         // 单次最大可上传多少个文件
+                compressSide: 0,                 //等比压缩的基准,0为按照最长边,1为按照宽度,2为按照高度
+                compressLength: optImageCompressBorder        //能接受的最大边长,超过该值Flash会自动等比压缩
+            };
+            //回调函数集合,支持传递函数名的字符串、函数句柄以及函数本身三种类型
+            var callbacks={
+                selectFileCallback: function(selectFiles){                // 选择文件的回调
+                    selectedImageCount += selectFiles.length;
+                    if(selectedImageCount) baidu.g("upload").style.display = "";
+                    dialog.buttons[0].setDisabled(true); //初始化时置灰确定按钮
+                },
+                deleteFileCallback: function(delFiles){                 // 删除文件的回调
+                    selectedImageCount -= delFiles.length;
+                    if (!selectedImageCount) {
+                        baidu.g("upload").style.display = "none";
+                        dialog.buttons[0].setDisabled(false);         //没有选择图片时重新点亮按钮
+                    }
+                },
+                uploadCompleteCallback: function(data){               // 单个文件上传完成的回调
+                    try{var info = eval("(" + data.info + ")");
+                    info && imageUrls.push(info);
+                    selectedImageCount--;
+                    }catch(e){}
+                },
+                uploadErrorCallback: function (data){         // 单个文件上传失败的回调,
+                    console && console.log(data);
+                },
+                allCompleteCallback: function(){              // 全部上传完成时的回调
+                    dialog.buttons[0].setDisabled(false);    //上传完毕后点亮按钮
+                }
+                //exceedFileCallback: 'exceedFileCallback',   // 文件超出限制的最大体积时的回调
+                //startUploadCallback: startUploadCallback    // 开始上传某个文件时的回调
+            };
+            wordImage.init(flashOptions,callbacks);
+        });
+
+    </script>
+
+</body>
+</html>

+ 157 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/wordimage/wordimage.js

@@ -0,0 +1,157 @@
+/**
+ * Created by JetBrains PhpStorm.
+ * User: taoqili
+ * Date: 12-1-30
+ * Time: 下午12:50
+ * To change this template use File | Settings | File Templates.
+ */
+
+
+
+var wordImage = {};
+//(function(){
+var g = baidu.g,
+	flashObj,flashContainer;
+
+wordImage.init = function(opt, callbacks) {
+	showLocalPath("localPath");
+	//createCopyButton("clipboard","localPath");
+	createFlashUploader(opt, callbacks);
+	addUploadListener();
+	addOkListener();
+};
+
+function hideFlash(){
+    flashObj = null;
+    flashContainer.innerHTML = "";
+}
+function addOkListener() {
+	dialog.onok = function() {
+		if (!imageUrls.length) return;
+		var urlPrefix = editor.getOpt('imageUrlPrefix'),
+            images = domUtils.getElementsByTagName(editor.document,"img");
+        editor.fireEvent('saveScene');
+		for (var i = 0,img; img = images[i++];) {
+			var src = img.getAttribute("word_img");
+			if (!src) continue;
+			for (var j = 0,url; url = imageUrls[j++];) {
+				if (src.indexOf(url.original.replace(" ","")) != -1) {
+					img.src = urlPrefix + url.url;
+					img.setAttribute("_src", urlPrefix + url.url);  //同时修改"_src"属性
+					img.setAttribute("title",url.title);
+                    domUtils.removeAttributes(img, ["word_img","style","width","height"]);
+					editor.fireEvent("selectionchange");
+					break;
+				}
+			}
+		}
+        editor.fireEvent('saveScene');
+        hideFlash();
+	};
+    dialog.oncancel = function(){
+        hideFlash();
+    }
+}
+
+/**
+ * 绑定开始上传事件
+ */
+function addUploadListener() {
+	g("upload").onclick = function () {
+		flashObj.upload();
+		this.style.display = "none";
+	};
+}
+
+function showLocalPath(id) {
+    //单张编辑
+    var img = editor.selection.getRange().getClosedNode();
+    var images = editor.execCommand('wordimage');
+    if(images.length==1 || img && img.tagName == 'IMG'){
+        g(id).value = images[0];
+        return;
+    }
+	var path = images[0];
+    var leftSlashIndex  = path.lastIndexOf("/")||0,  //不同版本的doc和浏览器都可能影响到这个符号,故直接判断两种
+        rightSlashIndex = path.lastIndexOf("\\")||0,
+        separater = leftSlashIndex > rightSlashIndex ? "/":"\\" ;
+
+	path = path.substring(0, path.lastIndexOf(separater)+1);
+	g(id).value = path;
+}
+
+function createFlashUploader(opt, callbacks) {
+    //由于lang.flashI18n是静态属性,不可以直接进行修改,否则会影响到后续内容
+    var i18n = utils.extend({},lang.flashI18n);
+    //处理图片资源地址的编码,补全等问题
+    for(var i in i18n){
+        if(!(i in {"lang":1,"uploadingTF":1,"imageTF":1,"textEncoding":1}) && i18n[i]){
+            i18n[i] = encodeURIComponent(editor.options.langPath + editor.options.lang + "/images/" + i18n[i]);
+        }
+    }
+    opt = utils.extend(opt,i18n,false);
+	var option = {
+		createOptions:{
+			id:'flash',
+			url:opt.flashUrl,
+			width:opt.width,
+			height:opt.height,
+			errorMessage:lang.flashError,
+			wmode:browser.safari ? 'transparent' : 'window',
+			ver:'10.0.0',
+			vars:opt,
+			container:opt.container
+		}
+	};
+
+	option = extendProperty(callbacks, option);
+	flashObj = new baidu.flash.imageUploader(option);
+    flashContainer = $G(opt.container);
+}
+
+function extendProperty(fromObj, toObj) {
+	for (var i in fromObj) {
+		if (!toObj[i]) {
+			toObj[i] = fromObj[i];
+		}
+	}
+	return toObj;
+}
+
+//})();
+
+function getPasteData(id) {
+	baidu.g("msg").innerHTML = lang.copySuccess + "</br>";
+	setTimeout(function() {
+		baidu.g("msg").innerHTML = "";
+	}, 5000);
+	return baidu.g(id).value;
+}
+
+function createCopyButton(id, dataFrom) {
+	baidu.swf.create({
+			id:"copyFlash",
+			url:"fClipboard_ueditor.swf",
+			width:"58",
+			height:"25",
+			errorMessage:"",
+			bgColor:"#CBCBCB",
+			wmode:"transparent",
+			ver:"10.0.0",
+			vars:{
+				tid:dataFrom
+			}
+		}, id
+	);
+
+	var clipboard = baidu.swf.getMovie("copyFlash");
+	var clipinterval = setInterval(function() {
+		if (clipboard && clipboard.flashInit) {
+			clearInterval(clipinterval);
+			clipboard.setHandCursor(true);
+			clipboard.setContentFuncName("getPasteData");
+			//clipboard.setMEFuncName("mouseEventHandler");
+		}
+	}, 500);
+}
+createCopyButton("clipboard", "localPath");

BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/lang/en/images/rotaterightenable.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/lang/en/images/upload.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/lang/zh-cn/images/upload.png


File diff suppressed because it is too large
+ 1903 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/css/ueditor.css


File diff suppressed because it is too large
+ 8 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/css/ueditor.min.css


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/scale.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/sortable.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/spacer.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/sparator_v.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/table-cell-align.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/tangram-colorpicker.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/toolbar_bg.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/unhighlighted.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/upload.png


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/videologo.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/word.gif


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/themes/default/images/wordpaste.png


File diff suppressed because it is too large
+ 3655 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/SyntaxHighlighter/shCore.js


File diff suppressed because it is too large
+ 1 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/SyntaxHighlighter/shCoreDefault.css


File diff suppressed because it is too large
+ 17 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/highcharts/adapters/standalone-framework.js


+ 583 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/highcharts/adapters/standalone-framework.src.js

@@ -0,0 +1,583 @@
+/**
+ * @license Highcharts JS v3.0.6 (2013-10-04)
+ *
+ * Standalone Highcharts Framework
+ *
+ * License: MIT License
+ */
+
+
+/*global Highcharts */
+var HighchartsAdapter = (function () {
+
+var UNDEFINED,
+	doc = document,
+	emptyArray = [],
+	timers = [],
+	timerId,
+	Fx;
+
+Math.easeInOutSine = function (t, b, c, d) {
+	return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
+};
+
+
+
+/**
+ * Extend given object with custom events
+ */
+function augment(obj) {
+	function removeOneEvent(el, type, fn) {
+		el.removeEventListener(type, fn, false);
+	}
+
+	function IERemoveOneEvent(el, type, fn) {
+		fn = el.HCProxiedMethods[fn.toString()];
+		el.detachEvent('on' + type, fn);
+	}
+
+	function removeAllEvents(el, type) {
+		var events = el.HCEvents,
+			remove,
+			types,
+			len,
+			n;
+
+		if (el.removeEventListener) {
+			remove = removeOneEvent;
+		} else if (el.attachEvent) {
+			remove = IERemoveOneEvent;
+		} else {
+			return; // break on non-DOM events
+		}
+
+
+		if (type) {
+			types = {};
+			types[type] = true;
+		} else {
+			types = events;
+		}
+
+		for (n in types) {
+			if (events[n]) {
+				len = events[n].length;
+				while (len--) {
+					remove(el, n, events[n][len]);
+				}
+			}
+		}
+	}
+
+	if (!obj.HCExtended) {
+		Highcharts.extend(obj, {
+			HCExtended: true,
+
+			HCEvents: {},
+
+			bind: function (name, fn) {
+				var el = this,
+					events = this.HCEvents,
+					wrappedFn;
+
+				// handle DOM events in modern browsers
+				if (el.addEventListener) {
+					el.addEventListener(name, fn, false);
+
+				// handle old IE implementation
+				} else if (el.attachEvent) {
+					
+					wrappedFn = function (e) {
+						fn.call(el, e);
+					};
+
+					if (!el.HCProxiedMethods) {
+						el.HCProxiedMethods = {};
+					}
+
+					// link wrapped fn with original fn, so we can get this in removeEvent
+					el.HCProxiedMethods[fn.toString()] = wrappedFn;
+
+					el.attachEvent('on' + name, wrappedFn);
+				}
+
+
+				if (events[name] === UNDEFINED) {
+					events[name] = [];
+				}
+
+				events[name].push(fn);
+			},
+
+			unbind: function (name, fn) {
+				var events,
+					index;
+
+				if (name) {
+					events = this.HCEvents[name] || [];
+					if (fn) {
+						index = HighchartsAdapter.inArray(fn, events);
+						if (index > -1) {
+							events.splice(index, 1);
+							this.HCEvents[name] = events;
+						}
+						if (this.removeEventListener) {
+							removeOneEvent(this, name, fn);
+						} else if (this.attachEvent) {
+							IERemoveOneEvent(this, name, fn);
+						}
+					} else {
+						removeAllEvents(this, name);
+						this.HCEvents[name] = [];
+					}
+				} else {
+					removeAllEvents(this);
+					this.HCEvents = {};
+				}
+			},
+
+			trigger: function (name, args) {
+				var events = this.HCEvents[name] || [],
+					target = this,
+					len = events.length,
+					i,
+					preventDefault,
+					fn;
+
+				// Attach a simple preventDefault function to skip default handler if called
+				preventDefault = function () {
+					args.defaultPrevented = true;
+				};
+				
+				for (i = 0; i < len; i++) {
+					fn = events[i];
+
+					// args is never null here
+					if (args.stopped) {
+						return;
+					}
+
+					args.preventDefault = preventDefault;
+					args.target = target;
+					args.type = name; // #2297	
+					
+					// If the event handler return false, prevent the default handler from executing
+					if (fn.call(this, args) === false) {
+						args.preventDefault();
+					}
+				}
+			}
+		});
+	}
+
+	return obj;
+}
+
+
+return {
+	/**
+	 * Initialize the adapter. This is run once as Highcharts is first run.
+	 */
+	init: function (pathAnim) {
+
+		/**
+		 * Compatibility section to add support for legacy IE. This can be removed if old IE 
+		 * support is not needed.
+		 */
+		if (!doc.defaultView) {
+			this._getStyle = function (el, prop) {
+				var val;
+				if (el.style[prop]) {
+					return el.style[prop];
+				} else {
+					if (prop === 'opacity') {
+						prop = 'filter';
+					}
+					/*jslint unparam: true*/
+					val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b) { return b.toUpperCase(); })];
+					if (prop === 'filter') {
+						val = val.replace(
+							/alpha\(opacity=([0-9]+)\)/, 
+							function (a, b) { 
+								return b / 100; 
+							}
+						);
+					}
+					/*jslint unparam: false*/
+					return val === '' ? 1 : val;
+				} 
+			};
+			this.adapterRun = function (elem, method) {
+				var alias = { width: 'clientWidth', height: 'clientHeight' }[method];
+
+				if (alias) {
+					elem.style.zoom = 1;
+					return elem[alias] - 2 * parseInt(HighchartsAdapter._getStyle(elem, 'padding'), 10);
+				}
+			};
+		}
+
+		if (!Array.prototype.forEach) {
+			this.each = function (arr, fn) { // legacy
+				var i = 0, 
+					len = arr.length;
+				for (; i < len; i++) {
+					if (fn.call(arr[i], arr[i], i, arr) === false) {
+						return i;
+					}
+				}
+			};
+		}
+
+		if (!Array.prototype.indexOf) {
+			this.inArray = function (item, arr) {
+				var len, 
+					i = 0;
+
+				if (arr) {
+					len = arr.length;
+					
+					for (; i < len; i++) {
+						if (arr[i] === item) {
+							return i;
+						}
+					}
+				}
+
+				return -1;
+			};
+		}
+
+		if (!Array.prototype.filter) {
+			this.grep = function (elements, callback) {
+				var ret = [],
+					i = 0,
+					length = elements.length;
+
+				for (; i < length; i++) {
+					if (!!callback(elements[i], i)) {
+						ret.push(elements[i]);
+					}
+				}
+
+				return ret;
+			};
+		}
+
+		//--- End compatibility section ---
+
+
+		/**
+		 * Start of animation specific code
+		 */
+		Fx = function (elem, options, prop) {
+			this.options = options;
+			this.elem = elem;
+			this.prop = prop;
+		};
+		Fx.prototype = {
+			
+			update: function () {
+				var styles,
+					paths = this.paths,
+					elem = this.elem,
+					elemelem = elem.element; // if destroyed, it is null
+
+				// Animating a path definition on SVGElement
+				if (paths && elemelem) {
+					elem.attr('d', pathAnim.step(paths[0], paths[1], this.now, this.toD));
+				
+				// Other animations on SVGElement
+				} else if (elem.attr) {
+					if (elemelem) {
+						elem.attr(this.prop, this.now);
+					}
+
+				// HTML styles
+				} else {
+					styles = {};
+					styles[elem] = this.now + this.unit;
+					Highcharts.css(elem, styles);
+				}
+				
+				if (this.options.step) {
+					this.options.step.call(this.elem, this.now, this);
+				}
+
+			},
+			custom: function (from, to, unit) {
+				var self = this,
+					t = function (gotoEnd) {
+						return self.step(gotoEnd);
+					},
+					i;
+
+				this.startTime = +new Date();
+				this.start = from;
+				this.end = to;
+				this.unit = unit;
+				this.now = this.start;
+				this.pos = this.state = 0;
+
+				t.elem = this.elem;
+
+				if (t() && timers.push(t) === 1) {
+					timerId = setInterval(function () {
+						
+						for (i = 0; i < timers.length; i++) {
+							if (!timers[i]()) {
+								timers.splice(i--, 1);
+							}
+						}
+
+						if (!timers.length) {
+							clearInterval(timerId);
+						}
+					}, 13);
+				}
+			},
+			
+			step: function (gotoEnd) {
+				var t = +new Date(),
+					ret,
+					done,
+					options = this.options,
+					i;
+
+				if (this.elem.stopAnimation) {
+					ret = false;
+
+				} else if (gotoEnd || t >= options.duration + this.startTime) {
+					this.now = this.end;
+					this.pos = this.state = 1;
+					this.update();
+
+					this.options.curAnim[this.prop] = true;
+
+					done = true;
+					for (i in options.curAnim) {
+						if (options.curAnim[i] !== true) {
+							done = false;
+						}
+					}
+
+					if (done) {
+						if (options.complete) {
+							options.complete.call(this.elem);
+						}
+					}
+					ret = false;
+
+				} else {
+					var n = t - this.startTime;
+					this.state = n / options.duration;
+					this.pos = options.easing(n, 0, 1, options.duration);
+					this.now = this.start + ((this.end - this.start) * this.pos);
+					this.update();
+					ret = true;
+				}
+				return ret;
+			}
+		};
+
+		/**
+		 * The adapter animate method
+		 */
+		this.animate = function (el, prop, opt) {
+			var start,
+				unit = '',
+				end,
+				fx,
+				args,
+				name;
+
+			el.stopAnimation = false; // ready for new
+
+			if (typeof opt !== 'object' || opt === null) {
+				args = arguments;
+				opt = {
+					duration: args[2],
+					easing: args[3],
+					complete: args[4]
+				};
+			}
+			if (typeof opt.duration !== 'number') {
+				opt.duration = 400;
+			}
+			opt.easing = Math[opt.easing] || Math.easeInOutSine;
+			opt.curAnim = Highcharts.extend({}, prop);
+			
+			for (name in prop) {
+				fx = new Fx(el, opt, name);
+				end = null;
+				
+				if (name === 'd') {
+					fx.paths = pathAnim.init(
+						el,
+						el.d,
+						prop.d
+					);
+					fx.toD = prop.d;
+					start = 0;
+					end = 1;
+				} else if (el.attr) {
+					start = el.attr(name);
+				} else {
+					start = parseFloat(HighchartsAdapter._getStyle(el, name)) || 0;
+					if (name !== 'opacity') {
+						unit = 'px';
+					}
+				}
+	
+				if (!end) {
+					end = parseFloat(prop[name]);
+				}
+				fx.custom(start, end, unit);
+			}	
+		};
+	},
+
+	/**
+	 * Internal method to return CSS value for given element and property
+	 */
+	_getStyle: function (el, prop) {
+		return window.getComputedStyle(el).getPropertyValue(prop);
+	},
+
+	/**
+	 * Downloads a script and executes a callback when done.
+	 * @param {String} scriptLocation
+	 * @param {Function} callback
+	 */
+	getScript: function (scriptLocation, callback) {
+		// We cannot assume that Assets class from mootools-more is available so instead insert a script tag to download script.
+		var head = doc.getElementsByTagName('head')[0],
+			script = doc.createElement('script');
+
+		script.type = 'text/javascript';
+		script.src = scriptLocation;
+		script.onload = callback;
+
+		head.appendChild(script);
+	},
+
+	/**
+	 * Return the index of an item in an array, or -1 if not found
+	 */
+	inArray: function (item, arr) {
+		return arr.indexOf ? arr.indexOf(item) : emptyArray.indexOf.call(arr, item);
+	},
+
+
+	/**
+	 * A direct link to adapter methods
+	 */
+	adapterRun: function (elem, method) {
+		return parseInt(HighchartsAdapter._getStyle(elem, method), 10);
+	},
+
+	/**
+	 * Filter an array
+	 */
+	grep: function (elements, callback) {
+		return emptyArray.filter.call(elements, callback);
+	},
+
+	/**
+	 * Map an array
+	 */
+	map: function (arr, fn) {
+		var results = [], i = 0, len = arr.length;
+
+		for (; i < len; i++) {
+			results[i] = fn.call(arr[i], arr[i], i, arr);
+		}
+
+		return results;
+	},
+
+	offset: function (el) {
+		var left = 0,
+			top = 0;
+
+		while (el) {
+			left += el.offsetLeft;
+			top += el.offsetTop;
+			el = el.offsetParent;
+		}
+
+		return {
+			left: left,
+			top: top
+		};
+	},
+
+	/**
+	 * Add an event listener
+	 */
+	addEvent: function (el, type, fn) {
+		augment(el).bind(type, fn);
+	},
+
+	/**
+	 * Remove event added with addEvent
+	 */
+	removeEvent: function (el, type, fn) {
+		augment(el).unbind(type, fn);
+	},
+
+	/**
+	 * Fire an event on a custom object
+	 */
+	fireEvent: function (el, type, eventArguments, defaultFunction) {
+		var e;
+
+		if (doc.createEvent && (el.dispatchEvent || el.fireEvent)) {
+			e = doc.createEvent('Events');
+			e.initEvent(type, true, true);
+			e.target = el;
+
+			Highcharts.extend(e, eventArguments);
+
+			if (el.dispatchEvent) {
+				el.dispatchEvent(e);
+			} else {
+				el.fireEvent(type, e);
+			}
+
+		} else if (el.HCExtended === true) {
+			eventArguments = eventArguments || {};
+			el.trigger(type, eventArguments);
+		}
+
+		if (eventArguments && eventArguments.defaultPrevented) {
+			defaultFunction = null;
+		}
+
+		if (defaultFunction) {
+			defaultFunction(eventArguments);
+		}
+	},
+
+	washMouseEvent: function (e) {
+		return e;
+	},
+
+
+	/**
+	 * Stop running animation
+	 */
+	stop: function (el) {
+		el.stopAnimation = true;
+	},
+
+	/**
+	 * Utility for iterating over an array. Parameters are reversed compared to jQuery.
+	 * @param {Array} arr
+	 * @param {Function} fn
+	 */
+	each: function (arr, fn) { // modern browsers
+		return Array.prototype.forEach.call(arr, fn);
+	}
+};
+}());

+ 89 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/highcharts/themes/skies.js

@@ -0,0 +1,89 @@
+/**
+ * Skies theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"],
+	chart: {
+		className: 'skies',
+		borderWidth: 0,
+		plotShadow: true,
+		plotBackgroundImage: 'http://www.highcharts.com/demo/gfx/skies.jpg',
+		plotBackgroundColor: {
+			linearGradient: [0, 0, 250, 500],
+			stops: [
+				[0, 'rgba(255, 255, 255, 1)'],
+				[1, 'rgba(255, 255, 255, 0)']
+			]
+		},
+		plotBorderWidth: 1
+	},
+	title: {
+		style: {
+			color: '#3E576F',
+			font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#6D869F',
+			font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineWidth: 0,
+		lineColor: '#C0D0E0',
+		tickColor: '#C0D0E0',
+		labels: {
+			style: {
+				color: '#666',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#666',
+				font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	yAxis: {
+		alternateGridColor: 'rgba(255, 255, 255, .5)',
+		lineColor: '#C0D0E0',
+		tickColor: '#C0D0E0',
+		tickWidth: 1,
+		labels: {
+			style: {
+				color: '#666',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#666',
+				font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	legend: {
+		itemStyle: {
+			font: '9pt Trebuchet MS, Verdana, sans-serif',
+			color: '#3E576F'
+		},
+		itemHoverStyle: {
+			color: 'black'
+		},
+		itemHiddenStyle: {
+			color: 'silver'
+		}
+	},
+	labels: {
+		style: {
+			color: '#3E576F'
+		}
+	}
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/snapscreen/UEditorSnapscreen.exe


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/font/vjs.eot


File diff suppressed because it is too large
+ 65 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/font/vjs.svg


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/font/vjs.ttf


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/font/vjs.woff


+ 766 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video-js.css

@@ -0,0 +1,766 @@
+/*!
+Video.js Default Styles (http://videojs.com)
+Version 4.3.0
+Create your own skin at http://designer.videojs.com
+*/
+/* SKIN
+================================================================================
+The main class name for all skin-specific styles. To make your own skin,
+replace all occurances of 'vjs-default-skin' with a new name. Then add your new
+skin name to your video tag instead of the default skin.
+e.g. <video class="video-js my-skin-name">
+*/
+.vjs-default-skin {
+  color: #cccccc;
+}
+/* Custom Icon Font
+--------------------------------------------------------------------------------
+The control icons are from a custom font. Each icon corresponds to a character
+(e.g. "\e001"). Font icons allow for easy scaling and coloring of icons.
+*/
+@font-face {
+  font-family: 'VideoJS';
+  src: url('font/vjs.eot');
+  src: url('font/vjs.eot?#iefix') format('embedded-opentype'), url('font/vjs.woff') format('woff'), url('font/vjs.ttf') format('truetype');
+  font-weight: normal;
+  font-style: normal;
+}
+/* Base UI Component Classes
+--------------------------------------------------------------------------------
+*/
+/* Slider - used for Volume bar and Seek bar */
+.vjs-default-skin .vjs-slider {
+  /* Replace browser focus hightlight with handle highlight */
+  outline: 0;
+  position: relative;
+  cursor: pointer;
+  padding: 0;
+  /* background-color-with-alpha */
+  background-color: #333333;
+  background-color: rgba(51, 51, 51, 0.9);
+}
+.vjs-default-skin .vjs-slider:focus {
+  /* box-shadow */
+  -webkit-box-shadow: 0 0 2em #ffffff;
+  -moz-box-shadow: 0 0 2em #ffffff;
+  box-shadow: 0 0 2em #ffffff;
+}
+.vjs-default-skin .vjs-slider-handle {
+  position: absolute;
+  /* Needed for IE6 */
+  left: 0;
+  top: 0;
+}
+.vjs-default-skin .vjs-slider-handle:before {
+  content: "\e009";
+  font-family: VideoJS;
+  font-size: 1em;
+  line-height: 1;
+  text-align: center;
+  text-shadow: 0em 0em 1em #fff;
+  position: absolute;
+  top: 0;
+  left: 0;
+  /* Rotate the square icon to make a diamond */
+  /* transform */
+  -webkit-transform: rotate(-45deg);
+  -moz-transform: rotate(-45deg);
+  -ms-transform: rotate(-45deg);
+  -o-transform: rotate(-45deg);
+  transform: rotate(-45deg);
+}
+/* Control Bar
+--------------------------------------------------------------------------------
+The default control bar that is a container for most of the controls.
+*/
+.vjs-default-skin .vjs-control-bar {
+  /* Start hidden */
+  display: none;
+  position: absolute;
+  /* Place control bar at the bottom of the player box/video.
+     If you want more margin below the control bar, add more height. */
+  bottom: 0;
+  /* Use left/right to stretch to 100% width of player div */
+  left: 0;
+  right: 0;
+  /* Height includes any margin you want above or below control items */
+  height: 3.0em;
+  /* background-color-with-alpha */
+  background-color: #07141e;
+  background-color: rgba(7, 20, 30, 0.7);
+}
+/* Show the control bar only once the video has started playing */
+.vjs-default-skin.vjs-has-started .vjs-control-bar {
+  display: block;
+  /* Visibility needed to make sure things hide in older browsers too. */
+
+  visibility: visible;
+  opacity: 1;
+  /* transition */
+  -webkit-transition: visibility 0.1s, opacity 0.1s;
+  -moz-transition: visibility 0.1s, opacity 0.1s;
+  -o-transition: visibility 0.1s, opacity 0.1s;
+  transition: visibility 0.1s, opacity 0.1s;
+}
+/* Hide the control bar when the video is playing and the user is inactive  */
+.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {
+  display: block;
+  visibility: hidden;
+  opacity: 0;
+  /* transition */
+  -webkit-transition: visibility 1s, opacity 1s;
+  -moz-transition: visibility 1s, opacity 1s;
+  -o-transition: visibility 1s, opacity 1s;
+  transition: visibility 1s, opacity 1s;
+}
+.vjs-default-skin.vjs-controls-disabled .vjs-control-bar {
+  display: none;
+}
+.vjs-default-skin.vjs-using-native-controls .vjs-control-bar {
+  display: none;
+}
+/* IE8 is flakey with fonts, and you have to change the actual content to force
+fonts to show/hide properly.
+  - "\9" IE8 hack didn't work for this
+  - Found in XP IE8 from http://modern.ie. Does not show up in "IE8 mode" in IE9
+*/
+@media \0screen {
+  .vjs-default-skin.vjs-user-inactive.vjs-playing .vjs-control-bar :before {
+    content: "";
+  }
+}
+/* General styles for individual controls. */
+.vjs-default-skin .vjs-control {
+  outline: none;
+  position: relative;
+  float: left;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  height: 3.0em;
+  width: 4em;
+}
+/* FontAwsome button icons */
+.vjs-default-skin .vjs-control:before {
+  font-family: VideoJS;
+  font-size: 1.5em;
+  line-height: 2;
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  text-align: center;
+  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
+}
+/* Replacement for focus outline */
+.vjs-default-skin .vjs-control:focus:before,
+.vjs-default-skin .vjs-control:hover:before {
+  text-shadow: 0em 0em 1em #ffffff;
+}
+.vjs-default-skin .vjs-control:focus {
+  /*  outline: 0; */
+  /* keyboard-only users cannot see the focus on several of the UI elements when
+  this is set to 0 */
+
+}
+/* Hide control text visually, but have it available for screenreaders */
+.vjs-default-skin .vjs-control-text {
+  /* hide-visually */
+  border: 0;
+  clip: rect(0 0 0 0);
+  height: 1px;
+  margin: -1px;
+  overflow: hidden;
+  padding: 0;
+  position: absolute;
+  width: 1px;
+}
+/* Play/Pause
+--------------------------------------------------------------------------------
+*/
+.vjs-default-skin .vjs-play-control {
+  width: 5em;
+  cursor: pointer;
+}
+.vjs-default-skin .vjs-play-control:before {
+  content: "\e001";
+}
+.vjs-default-skin.vjs-playing .vjs-play-control:before {
+  content: "\e002";
+}
+/* Volume/Mute
+-------------------------------------------------------------------------------- */
+.vjs-default-skin .vjs-mute-control,
+.vjs-default-skin .vjs-volume-menu-button {
+  cursor: pointer;
+  float: right;
+}
+.vjs-default-skin .vjs-mute-control:before,
+.vjs-default-skin .vjs-volume-menu-button:before {
+  content: "\e006";
+}
+.vjs-default-skin .vjs-mute-control.vjs-vol-0:before,
+.vjs-default-skin .vjs-volume-menu-button.vjs-vol-0:before {
+  content: "\e003";
+}
+.vjs-default-skin .vjs-mute-control.vjs-vol-1:before,
+.vjs-default-skin .vjs-volume-menu-button.vjs-vol-1:before {
+  content: "\e004";
+}
+.vjs-default-skin .vjs-mute-control.vjs-vol-2:before,
+.vjs-default-skin .vjs-volume-menu-button.vjs-vol-2:before {
+  content: "\e005";
+}
+.vjs-default-skin .vjs-volume-control {
+  width: 5em;
+  float: right;
+}
+.vjs-default-skin .vjs-volume-bar {
+  width: 5em;
+  height: 0.6em;
+  margin: 1.1em auto 0;
+}
+.vjs-default-skin .vjs-volume-menu-button .vjs-menu-content {
+  height: 2.9em;
+}
+.vjs-default-skin .vjs-volume-level {
+  position: absolute;
+  top: 0;
+  left: 0;
+  height: 0.5em;
+  background: #66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat;
+}
+.vjs-default-skin .vjs-volume-bar .vjs-volume-handle {
+  width: 0.5em;
+  height: 0.5em;
+}
+.vjs-default-skin .vjs-volume-handle:before {
+  font-size: 0.9em;
+  top: -0.2em;
+  left: -0.2em;
+  width: 1em;
+  height: 1em;
+}
+.vjs-default-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content {
+  width: 6em;
+  left: -4em;
+}
+/* Progress
+--------------------------------------------------------------------------------
+*/
+.vjs-default-skin .vjs-progress-control {
+  position: absolute;
+  left: 0;
+  right: 0;
+  width: auto;
+  font-size: 0.3em;
+  height: 1em;
+  /* Set above the rest of the controls. */
+  top: -1em;
+  /* Shrink the bar slower than it grows. */
+  /* transition */
+  -webkit-transition: all 0.4s;
+  -moz-transition: all 0.4s;
+  -o-transition: all 0.4s;
+  transition: all 0.4s;
+}
+/* On hover, make the progress bar grow to something that's more clickable.
+    This simply changes the overall font for the progress bar, and this
+    updates both the em-based widths and heights, as wells as the icon font */
+.vjs-default-skin:hover .vjs-progress-control {
+  font-size: .9em;
+  /* Even though we're not changing the top/height, we need to include them in
+      the transition so they're handled correctly. */
+
+  /* transition */
+  -webkit-transition: all 0.2s;
+  -moz-transition: all 0.2s;
+  -o-transition: all 0.2s;
+  transition: all 0.2s;
+}
+/* Box containing play and load progresses. Also acts as seek scrubber. */
+.vjs-default-skin .vjs-progress-holder {
+  height: 100%;
+}
+/* Progress Bars */
+.vjs-default-skin .vjs-progress-holder .vjs-play-progress,
+.vjs-default-skin .vjs-progress-holder .vjs-load-progress {
+  position: absolute;
+  display: block;
+  height: 100%;
+  margin: 0;
+  padding: 0;
+  /* Needed for IE6 */
+  left: 0;
+  top: 0;
+}
+.vjs-default-skin .vjs-play-progress {
+  /*
+    Using a data URI to create the white diagonal lines with a transparent
+      background. Surprisingly works in IE8.
+      Created using http://www.patternify.com
+    Changing the first color value will change the bar color.
+    Also using a paralax effect to make the lines move backwards.
+      The -50% left position makes that happen.
+  */
+
+  background: #66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat;
+}
+.vjs-default-skin .vjs-load-progress {
+  background: #646464 /* IE8- Fallback */;
+  background: rgba(255, 255, 255, 0.4);
+}
+.vjs-default-skin .vjs-seek-handle {
+  width: 1.5em;
+  height: 100%;
+}
+.vjs-default-skin .vjs-seek-handle:before {
+  padding-top: 0.1em /* Minor adjustment */;
+}
+/* Time Display
+--------------------------------------------------------------------------------
+*/
+.vjs-default-skin .vjs-time-controls {
+  font-size: 1em;
+  /* Align vertically by making the line height the same as the control bar */
+  line-height: 3em;
+}
+.vjs-default-skin .vjs-current-time {
+  float: left;
+}
+.vjs-default-skin .vjs-duration {
+  float: left;
+}
+/* Remaining time is in the HTML, but not included in default design */
+.vjs-default-skin .vjs-remaining-time {
+  display: none;
+  float: left;
+}
+.vjs-time-divider {
+  float: left;
+  line-height: 3em;
+}
+/* Fullscreen
+--------------------------------------------------------------------------------
+*/
+.vjs-default-skin .vjs-fullscreen-control {
+  width: 3.8em;
+  cursor: pointer;
+  float: right;
+}
+.vjs-default-skin .vjs-fullscreen-control:before {
+  content: "\e000";
+}
+/* Switch to the exit icon when the player is in fullscreen */
+.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control:before {
+  content: "\e00b";
+}
+/* Big Play Button (play button at start)
+--------------------------------------------------------------------------------
+Positioning of the play button in the center or other corners can be done more
+easily in the skin designer. http://designer.videojs.com/
+*/
+.vjs-default-skin .vjs-big-play-button {
+  left: 0.5em;
+  top: 0.5em;
+  font-size: 3em;
+  display: block;
+  z-index: 2;
+  position: absolute;
+  width: 4em;
+  height: 2.6em;
+  text-align: center;
+  vertical-align: middle;
+  cursor: pointer;
+  opacity: 1;
+  /* Need a slightly gray bg so it can be seen on black backgrounds */
+  /* background-color-with-alpha */
+  background-color: #07141e;
+  background-color: rgba(7, 20, 30, 0.7);
+  border: 0.1em solid #3b4249;
+  /* border-radius */
+  -webkit-border-radius: 0.8em;
+  -moz-border-radius: 0.8em;
+  border-radius: 0.8em;
+  /* box-shadow */
+  -webkit-box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);
+  -moz-box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);
+  box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);
+  /* transition */
+  -webkit-transition: all 0.4s;
+  -moz-transition: all 0.4s;
+  -o-transition: all 0.4s;
+  transition: all 0.4s;
+}
+/* Optionally center */
+.vjs-default-skin.vjs-big-play-centered .vjs-big-play-button {
+  /* Center it horizontally */
+  left: 50%;
+  margin-left: -2.1em;
+  /* Center it vertically */
+  top: 50%;
+  margin-top: -1.4000000000000001em;
+}
+/* Hide if controls are disabled */
+.vjs-default-skin.vjs-controls-disabled .vjs-big-play-button {
+  display: none;
+}
+/* Hide when video starts playing */
+.vjs-default-skin.vjs-has-started .vjs-big-play-button {
+  display: none;
+}
+/* Hide on mobile devices. Remove when we stop using native controls
+    by default on mobile  */
+.vjs-default-skin.vjs-using-native-controls .vjs-big-play-button {
+  display: none;
+}
+.vjs-default-skin:hover .vjs-big-play-button,
+.vjs-default-skin .vjs-big-play-button:focus {
+  outline: 0;
+  border-color: #fff;
+  /* IE8 needs a non-glow hover state */
+  background-color: #505050;
+  background-color: rgba(50, 50, 50, 0.75);
+  /* box-shadow */
+  -webkit-box-shadow: 0 0 3em #ffffff;
+  -moz-box-shadow: 0 0 3em #ffffff;
+  box-shadow: 0 0 3em #ffffff;
+  /* transition */
+  -webkit-transition: all 0s;
+  -moz-transition: all 0s;
+  -o-transition: all 0s;
+  transition: all 0s;
+}
+.vjs-default-skin .vjs-big-play-button:before {
+  content: "\e001";
+  font-family: VideoJS;
+  /* In order to center the play icon vertically we need to set the line height
+     to the same as the button height */
+
+  line-height: 2.6em;
+  text-shadow: 0.05em 0.05em 0.1em #000;
+  text-align: center /* Needed for IE8 */;
+  position: absolute;
+  left: 0;
+  width: 100%;
+  height: 100%;
+}
+/* Loading Spinner
+--------------------------------------------------------------------------------
+*/
+.vjs-loading-spinner {
+  display: none;
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  font-size: 4em;
+  line-height: 1;
+  width: 1em;
+  height: 1em;
+  margin-left: -0.5em;
+  margin-top: -0.5em;
+  opacity: 0.75;
+  /* animation */
+  -webkit-animation: spin 1.5s infinite linear;
+  -moz-animation: spin 1.5s infinite linear;
+  -o-animation: spin 1.5s infinite linear;
+  animation: spin 1.5s infinite linear;
+}
+.vjs-default-skin .vjs-loading-spinner:before {
+  content: "\e01e";
+  font-family: VideoJS;
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 1em;
+  height: 1em;
+  text-align: center;
+  text-shadow: 0em 0em 0.1em #000;
+}
+@-moz-keyframes spin {
+  0% {
+    -moz-transform: rotate(0deg);
+  }
+  100% {
+    -moz-transform: rotate(359deg);
+  }
+}
+@-webkit-keyframes spin {
+  0% {
+    -webkit-transform: rotate(0deg);
+  }
+  100% {
+    -webkit-transform: rotate(359deg);
+  }
+}
+@-o-keyframes spin {
+  0% {
+    -o-transform: rotate(0deg);
+  }
+  100% {
+    -o-transform: rotate(359deg);
+  }
+}
+@keyframes spin {
+  0% {
+    transform: rotate(0deg);
+  }
+  100% {
+    transform: rotate(359deg);
+  }
+}
+/* WeChatMenu Buttons (Captions/Subtitles/etc.)
+--------------------------------------------------------------------------------
+*/
+.vjs-default-skin .vjs-menu-button {
+  float: right;
+  cursor: pointer;
+}
+.vjs-default-skin .vjs-menu {
+  display: none;
+  position: absolute;
+  bottom: 0;
+  left: 0em;
+  /* (Width of vjs-menu - width of button) / 2 */
+
+  width: 0em;
+  height: 0em;
+  margin-bottom: 3em;
+  border-left: 2em solid transparent;
+  border-right: 2em solid transparent;
+  border-top: 1.55em solid #000000;
+  /* Same width top as ul bottom */
+
+  border-top-color: rgba(7, 40, 50, 0.5);
+  /* Same as ul background */
+
+}
+/* Button Pop-up WeChatMenu */
+.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content {
+  display: block;
+  padding: 0;
+  margin: 0;
+  position: absolute;
+  width: 10em;
+  bottom: 1.5em;
+  /* Same bottom as vjs-menu border-top */
+
+  max-height: 15em;
+  overflow: auto;
+  left: -5em;
+  /* Width of menu - width of button / 2 */
+
+  /* background-color-with-alpha */
+  background-color: #07141e;
+  background-color: rgba(7, 20, 30, 0.7);
+  /* box-shadow */
+  -webkit-box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
+  -moz-box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
+  box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
+}
+.vjs-default-skin .vjs-menu-button:hover .vjs-menu {
+  display: block;
+}
+.vjs-default-skin .vjs-menu-button ul li {
+  list-style: none;
+  margin: 0;
+  padding: 0.3em 0 0.3em 0;
+  line-height: 1.4em;
+  font-size: 1.2em;
+  text-align: center;
+  text-transform: lowercase;
+}
+.vjs-default-skin .vjs-menu-button ul li.vjs-selected {
+  background-color: #000;
+}
+.vjs-default-skin .vjs-menu-button ul li:focus,
+.vjs-default-skin .vjs-menu-button ul li:hover,
+.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,
+.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover {
+  outline: 0;
+  color: #111;
+  /* background-color-with-alpha */
+  background-color: #ffffff;
+  background-color: rgba(255, 255, 255, 0.75);
+  /* box-shadow */
+  -webkit-box-shadow: 0 0 1em #ffffff;
+  -moz-box-shadow: 0 0 1em #ffffff;
+  box-shadow: 0 0 1em #ffffff;
+}
+.vjs-default-skin .vjs-menu-button ul li.vjs-menu-title {
+  text-align: center;
+  text-transform: uppercase;
+  font-size: 1em;
+  line-height: 2em;
+  padding: 0;
+  margin: 0 0 0.3em 0;
+  font-weight: bold;
+  cursor: default;
+}
+/* Subtitles Button */
+.vjs-default-skin .vjs-subtitles-button:before {
+  content: "\e00c";
+}
+/* Captions Button */
+.vjs-default-skin .vjs-captions-button:before {
+  content: "\e008";
+}
+/* Replacement for focus outline */
+.vjs-default-skin .vjs-captions-button:focus .vjs-control-content:before,
+.vjs-default-skin .vjs-captions-button:hover .vjs-control-content:before {
+  /* box-shadow */
+  -webkit-box-shadow: 0 0 1em #ffffff;
+  -moz-box-shadow: 0 0 1em #ffffff;
+  box-shadow: 0 0 1em #ffffff;
+}
+/*
+REQUIRED STYLES (be careful overriding)
+================================================================================
+When loading the player, the video tag is replaced with a DIV,
+that will hold the video tag or object tag for other playback methods.
+The div contains the video playback element (Flash or HTML5) and controls,
+and sets the width and height of the video.
+
+** If you want to add some kind of border/padding (e.g. a frame), or special
+positioning, use another containing element. Otherwise you risk messing up
+control positioning and full window mode. **
+*/
+.video-js {
+  background-color: #000;
+  position: relative;
+  padding: 0;
+  /* Start with 10px for base font size so other dimensions can be em based and
+     easily calculable. */
+
+  font-size: 10px;
+  /* Allow poster to be vertially aligned. */
+
+  vertical-align: middle;
+  /*  display: table-cell; */
+  /*This works in Safari but not Firefox.*/
+
+  /* Provide some basic defaults for fonts */
+
+  font-weight: normal;
+  font-style: normal;
+  /* Avoiding helvetica: issue #376 */
+
+  font-family: Arial, sans-serif;
+  /* Turn off user selection (text highlighting) by default.
+     The majority of player components will not be text blocks.
+     Text areas will need to turn user selection back on. */
+
+  /* user-select */
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+/* Playback technology elements expand to the width/height of the containing div
+    <video> or <object> */
+.video-js .vjs-tech {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+}
+/* Fix for Firefox 9 fullscreen (only if it is enabled). Not needed when
+   checking fullScreenEnabled. */
+.video-js:-moz-full-screen {
+  position: absolute;
+}
+/* Fullscreen Styles */
+body.vjs-full-window {
+  padding: 0;
+  margin: 0;
+  height: 100%;
+  /* Fix for IE6 full-window. http://www.cssplay.co.uk/layouts/fixed.html */
+  overflow-y: auto;
+}
+.video-js.vjs-fullscreen {
+  position: fixed;
+  overflow: hidden;
+  z-index: 1000;
+  left: 0;
+  top: 0;
+  bottom: 0;
+  right: 0;
+  width: 100% !important;
+  height: 100% !important;
+  /* IE6 full-window (underscore hack) */
+  _position: absolute;
+}
+.video-js:-webkit-full-screen {
+  width: 100% !important;
+  height: 100% !important;
+}
+.video-js.vjs-fullscreen.vjs-user-inactive {
+  cursor: none;
+}
+/* Poster Styles */
+.vjs-poster {
+  background-repeat: no-repeat;
+  background-position: 50% 50%;
+  background-size: contain;
+  cursor: pointer;
+  height: 100%;
+  margin: 0;
+  padding: 0;
+  position: relative;
+  width: 100%;
+}
+.vjs-poster img {
+  display: block;
+  margin: 0 auto;
+  max-height: 100%;
+  padding: 0;
+  width: 100%;
+}
+/* Hide the poster when native controls are used otherwise it covers them */
+.video-js.vjs-using-native-controls .vjs-poster {
+  display: none;
+}
+/* Text Track Styles */
+/* Overall track holder for both captions and subtitles */
+.video-js .vjs-text-track-display {
+  text-align: center;
+  position: absolute;
+  bottom: 4em;
+  /* Leave padding on left and right */
+  left: 1em;
+  right: 1em;
+}
+/* Individual tracks */
+.video-js .vjs-text-track {
+  display: none;
+  font-size: 1.4em;
+  text-align: center;
+  margin-bottom: 0.1em;
+  /* Transparent black background, or fallback to all black (oldIE) */
+  /* background-color-with-alpha */
+  background-color: #000000;
+  background-color: rgba(0, 0, 0, 0.5);
+}
+.video-js .vjs-subtitles {
+  color: #ffffff /* Subtitles are white */;
+}
+.video-js .vjs-captions {
+  color: #ffcc66 /* Captions are yellow */;
+}
+.vjs-tt-cue {
+  display: block;
+}
+/* Hide disabled or unsupported controls */
+.vjs-default-skin .vjs-hidden {
+  display: none;
+}
+.vjs-lock-showing {
+  display: block !important;
+  opacity: 1;
+  visibility: visible;
+}
+/* -----------------------------------------------------------------------------
+The original source of this file lives at
+https://github.com/videojs/video.js/blob/master/src/css/video-js.less */

File diff suppressed because it is too large
+ 5 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video-js.min.css


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video-js.swf


File diff suppressed because it is too large
+ 7108 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video.dev.js


File diff suppressed because it is too large
+ 129 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/video-js/video.js


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/Uploader.swf


+ 28 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.css

@@ -0,0 +1,28 @@
+.webuploader-container {
+	position: relative;
+}
+.webuploader-element-invisible {
+	position: absolute !important;
+	clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
+    clip: rect(1px,1px,1px,1px);
+}
+.webuploader-pick {
+	position: relative;
+	display: inline-block;
+	cursor: pointer;
+	background: #00b7ee;
+	padding: 10px 15px;
+	color: #fff;
+	text-align: center;
+	border-radius: 3px;
+	overflow: hidden;
+}
+.webuploader-pick-hover {
+	background: #00a2d4;
+}
+
+.webuploader-pick-disable {
+	opacity: 0.6;
+	pointer-events:none;
+}
+

File diff suppressed because it is too large
+ 5670 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.custom.js


File diff suppressed because it is too large
+ 2 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.custom.min.js


File diff suppressed because it is too large
+ 4176 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.flashonly.js


File diff suppressed because it is too large
+ 2 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.flashonly.min.js


File diff suppressed because it is too large
+ 5559 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.html5only.js


File diff suppressed because it is too large
+ 2 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.html5only.min.js


File diff suppressed because it is too large
+ 6733 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.js


File diff suppressed because it is too large
+ 2 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.min.js


File diff suppressed because it is too large
+ 4593 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.withoutimage.js


File diff suppressed because it is too large
+ 2 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/webuploader/webuploader.withoutimage.min.js


File diff suppressed because it is too large
+ 1256 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/zeroclipboard/ZeroClipboard.js


File diff suppressed because it is too large
+ 9 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/third-party/zeroclipboard/ZeroClipboard.min.js


File diff suppressed because it is too large
+ 29429 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.all.js


File diff suppressed because it is too large
+ 709 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.all.min.js


+ 413 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.config.js

@@ -0,0 +1,413 @@
+/**
+ * ueditor完整配置项
+ * 可以在这里配置整个编辑器的特性
+ */
+/**************************提示********************************
+ * 所有被注释的配置项均为UEditor默认值。
+ * 修改默认配置请首先确保已经完全明确该参数的真实用途。
+ * 主要有两种修改方案,一种是取消此处注释,然后修改成对应参数;另一种是在实例化编辑器时传入对应参数。
+ * 当升级编辑器时,可直接使用旧版配置文件替换新版配置文件,不用担心旧版配置文件中因缺少新功能所需的参数而导致脚本报错。
+ **************************提示********************************/
+
+(function () {
+
+    /**
+     * 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。
+     * 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。
+     * "相对于网站根目录的相对路径"也就是以斜杠开头的形如"/myProject/ueditor/"这样的路径。
+     * 如果站点中有多个不在同一层级的页面需要实例化编辑器,且引用了同一UEditor的时候,此处的URL可能不适用于每个页面的编辑器。
+     * 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
+     * window.UEDITOR_HOME_URL = "/xxxx/xxxx/";
+     */
+    var URL = window.UEDITOR_HOME_URL || getUEBasePath();
+
+    /**
+     * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
+     */
+    window.UEDITOR_CONFIG = {
+
+        //为编辑器实例添加一个路径,这个不能被注释
+        UEDITOR_HOME_URL: URL
+
+        // 服务器统一请求接口路径
+        , serverUrl: URL + "jsp/controller.jsp"
+
+        //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
+        , toolbars: [[
+            'fullscreen', 'source', '|', 'undo', 'redo', '|',
+            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
+            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
+            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
+            'directionalityltr', 'directionalityrtl', 'indent', '|',
+            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
+            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
+            'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
+            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
+            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
+            'print', 'preview', 'searchreplace', 'help', 'drafts'
+        ]]
+        //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
+        //,labelMap:{
+        //    'anchor':'', 'undo':''
+        //}
+
+        //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
+        //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
+        //,lang:"zh-cn"
+        //,langPath:URL +"lang/"
+
+        //主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
+        //现有如下皮肤:default
+        //,theme:'default'
+        //,themePath:URL +"themes/"
+
+        //,zIndex : 900     //编辑器层级的基数,默认是900
+
+        //针对getAllHtml方法,会在对应的head标签中增加该编码设置。
+        //,charset:"utf-8"
+
+        //若实例化编辑器的页面手动修改的domain,此处需要设置为true
+        //,customDomain:false
+
+        //常用配置项目
+        //,isShow : true    //默认显示编辑器
+
+        //,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
+
+        //,initialContent:'欢迎使用ueditor!'    //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
+
+        //,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
+
+        //,focus:false //初始化时,是否让编辑器获得焦点true或false
+
+        //如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
+        //,initialStyle:'p{line-height:1em}'//编辑器层级的基数,可以用来改变字体等
+
+        //,iframeCssUrl: URL + '/themes/iframe.css' //给编辑器内部引入一个css文件
+
+        //indentValue
+        //首行缩进距离,默认是2em
+        //,indentValue:'2em'
+
+        //,initialFrameWidth:1000  //初始化编辑器宽度,默认1000
+        //,initialFrameHeight:320  //初始化编辑器高度,默认320
+
+        //,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
+
+        //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
+
+        //启用自动保存
+        //,enableAutoSave: true
+        //自动保存间隔时间, 单位ms
+        //,saveInterval: 500
+
+        //,fullscreen : false //是否开启初始化时即全屏,默认关闭
+
+        //,imagePopup:true      //图片操作的浮层开关,默认打开
+
+        //,autoSyncData:true //自动同步编辑器要提交的数据
+        //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
+
+        //粘贴只保留标签,去除标签所有属性
+        //,retainOnlyLabelPasted: false
+
+        //,pasteplain:false  //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
+        //纯文本粘贴模式下的过滤规则
+        //'filterTxtRules' : function(){
+        //    function transP(node){
+        //        node.tagName = 'p';
+        //        node.setStyle();
+        //    }
+        //    return {
+        //        //直接删除及其字节点内容
+        //        '-' : 'script style object iframe embed input select',
+        //        'p': {$:{}},
+        //        'br':{$:{}},
+        //        'div':{'$':{}},
+        //        'li':{'$':{}},
+        //        'caption':transP,
+        //        'th':transP,
+        //        'tr':transP,
+        //        'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP,
+        //        'td':function(node){
+        //            //没有内容的td直接删掉
+        //            var txt = !!node.innerText();
+        //            if(txt){
+        //                node.parentNode.insertAfter(UE.uNode.createText(' &nbsp; &nbsp;'),node);
+        //            }
+        //            node.parentNode.removeChild(node,node.innerText())
+        //        }
+        //    }
+        //}()
+
+        //,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
+
+        //insertorderedlist
+        //有序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
+        //,'insertorderedlist':{
+        //      //自定的样式
+        //        'num':'1,2,3...',
+        //        'num1':'1),2),3)...',
+        //        'num2':'(1),(2),(3)...',
+        //        'cn':'一,二,三....',
+        //        'cn1':'一),二),三)....',
+        //        'cn2':'(一),(二),(三)....',
+        //     //系统自带
+        //     'decimal' : '' ,         //'1,2,3...'
+        //     'lower-alpha' : '' ,    // 'a,b,c...'
+        //     'lower-roman' : '' ,    //'i,ii,iii...'
+        //     'upper-alpha' : '' , lang   //'A,B,C'
+        //     'upper-roman' : ''      //'I,II,III...'
+        //}
+
+        //insertunorderedlist
+        //无序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
+        //,insertunorderedlist : { //自定的样式
+        //    'dash' :'— 破折号', //-破折号
+        //    'dot':' 。 小圆圈', //系统自带
+        //    'circle' : '',  // '○ 小圆圈'
+        //    'disc' : '',    // '● 小圆点'
+        //    'square' : ''   //'■ 小方块'
+        //}
+        //,listDefaultPaddingLeft : '30'//默认的左边缩进的基数倍
+        //,listiconpath : 'http://bs.baidu.com/listicon/'//自定义标号的路径
+        //,maxListLevel : 3 //限制可以tab的级数, 设置-1为不限制
+
+        //,autoTransWordToList:false  //禁止word中粘贴进来的列表自动变成列表标签
+
+        //fontfamily
+        //字体设置 label留空支持多语言自动切换,若配置,则以配置值为准
+        //,'fontfamily':[
+        //    { label:'',name:'songti',val:'宋体,SimSun'},
+        //    { label:'',name:'kaiti',val:'楷体,楷体_GB2312, SimKai'},
+        //    { label:'',name:'yahei',val:'微软雅黑,Microsoft YaHei'},
+        //    { label:'',name:'heiti',val:'黑体, SimHei'},
+        //    { label:'',name:'lishu',val:'隶书, SimLi'},
+        //    { label:'',name:'andaleMono',val:'andale mono'},
+        //    { label:'',name:'arial',val:'arial, helvetica,sans-serif'},
+        //    { label:'',name:'arialBlack',val:'arial black,avant garde'},
+        //    { label:'',name:'comicSansMs',val:'comic sans ms'},
+        //    { label:'',name:'impact',val:'impact,chicago'},
+        //    { label:'',name:'timesNewRoman',val:'times new roman'}
+        //]
+
+        //fontsize
+        //字号
+        //,'fontsize':[10, 11, 12, 14, 16, 18, 20, 24, 36]
+
+        //paragraph
+        //段落格式 值留空时支持多语言自动识别,若配置,则以配置值为准
+        //,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''}
+
+        //rowspacingtop
+        //段间距 值和显示的名字相同
+        //,'rowspacingtop':['5', '10', '15', '20', '25']
+
+        //rowspacingBottom
+        //段间距 值和显示的名字相同
+        //,'rowspacingbottom':['5', '10', '15', '20', '25']
+
+        //lineheight
+        //行内间距 值和显示的名字相同
+        //,'lineheight':['1', '1.5','1.75','2', '3', '4', '5']
+
+        //customstyle
+        //自定义样式,不支持国际化,此处配置值即可最后显示值
+        //block的元素是依据设置段落的逻辑设置的,inline的元素依据BIU的逻辑设置
+        //尽量使用一些常用的标签
+        //参数说明
+        //tag 使用的标签名字
+        //label 显示的名字也是用来标识不同类型的标识符,注意这个值每个要不同,
+        //style 添加的样式
+        //每一个对象就是一个自定义的样式
+        //,'customstyle':[
+        //    {tag:'h1', name:'tc', label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'},
+        //    {tag:'h1', name:'tl',label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;margin:0 0 10px 0;'},
+        //    {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold'},
+        //    {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'}
+        //]
+
+        //打开右键菜单功能
+        //,enableContextMenu: true
+        //右键菜单的内容,可以参考plugins/contextmenu.js里边的默认菜单的例子,label留空支持国际化,否则以此配置为准
+        //,contextMenu:[
+        //    {
+        //        label:'',       //显示的名称
+        //        cmdName:'selectall',//执行的command命令,当点击这个右键菜单时
+        //        //exec可选,有了exec就会在点击时执行这个function,优先级高于cmdName
+        //        exec:function () {
+        //            //this是当前编辑器的实例
+        //            //this.ui._dialogs['inserttableDialog'].open();
+        //        }
+        //    }
+        //]
+
+        //快捷菜单
+        //,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
+
+        //elementPathEnabled
+        //是否启用元素路径,默认是显示
+        //,elementPathEnabled : true
+
+        //wordCount
+        //,wordCount:true          //是否开启字数统计
+        //,maximumWords:10000       //允许的最大字符数
+        //字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示
+        //,wordCountMsg:''   //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符
+        //超出字数限制提示  留空支持多语言自动切换,否则按此配置显示
+        //,wordOverFlowMsg:''    //<span style="color:red;">你输入的字符个数已经超出最大允许值,服务器可能会拒绝保存!</span>
+
+        //tab
+        //点击tab键时移动的距离,tabSize倍数,tabNode什么字符做为单位
+        //,tabSize:4
+        //,tabNode:'&nbsp;'
+
+        //removeFormat
+        //清除格式时可以删除的标签和属性
+        //removeForamtTags标签
+        //,removeFormatTags:'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'
+        //removeFormatAttributes属性
+        //,removeFormatAttributes:'class,style,lang,width,height,align,hspace,valign'
+
+        //undo
+        //可以最多回退的次数,默认20
+        //,maxUndoCount:20
+        //当输入的字符数超过该值时,保存一次现场
+        //,maxInputCount:1
+
+        //autoHeightEnabled
+        // 是否自动长高,默认true
+        //,autoHeightEnabled:true
+
+        //scaleEnabled
+        //是否可以拉伸长高,默认true(当开启时,自动长高失效)
+        //,scaleEnabled:false
+        //,minFrameWidth:800    //编辑器拖动时最小宽度,默认800
+        //,minFrameHeight:220  //编辑器拖动时最小高度,默认220
+
+        //autoFloatEnabled
+        //是否保持toolbar的位置不动,默认true
+        //,autoFloatEnabled:true
+        //浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
+        //,topOffset:30
+        //编辑器底部距离工具栏高度(如果参数大于等于编辑器高度,则设置无效)
+        //,toolbarTopOffset:400
+
+        //pageBreakTag
+        //分页标识符,默认是_ueditor_page_break_tag_
+        //,pageBreakTag:'_ueditor_page_break_tag_'
+
+        //autotypeset
+        //自动排版参数
+        //,autotypeset: {
+        //    mergeEmptyline: true,           //合并空行
+        //    removeClass: true,              //去掉冗余的class
+        //    removeEmptyline: false,         //去掉空行
+        //    textAlign:"left",               //段落的排版方式,可以是 left,right,center,justify 去掉这个属性表示不执行排版
+        //    imageBlockLine: 'center',       //图片的浮动方式,独占一行剧中,左右浮动,默认: center,left,right,none 去掉这个属性表示不执行排版
+        //    pasteFilter: false,             //根据规则过滤没事粘贴进来的内容
+        //    clearFontSize: false,           //去掉所有的内嵌字号,使用编辑器默认的字号
+        //    clearFontFamily: false,         //去掉所有的内嵌字体,使用编辑器默认的字体
+        //    removeEmptyNode: false,         // 去掉空节点
+        //    //可以去掉的标签
+        //    removeTagNames: {标签名字:1},
+        //    indent: false,                  // 行首缩进
+        //    indentValue : '2em',            //行首缩进的大小
+        //    bdc2sb: false,
+        //    tobdc: false
+        //}
+
+        //tableDragable
+        //表格是否可以拖拽
+        //,tableDragable: true
+
+        //,disabledTableInTable:true  //禁止表格嵌套
+
+        //sourceEditor
+        //源码的查看方式,codemirror 是代码高亮,textarea是文本框,默认是codemirror
+        //注意默认codemirror只能在ie8+和非ie中使用
+        //,sourceEditor:"codemirror"
+        //如果sourceEditor是codemirror,还用配置一下两个参数
+        //codeMirrorJsUrl js加载的路径,默认是 URL + "third-party/codemirror/codemirror.js"
+        //,codeMirrorJsUrl:URL + "third-party/codemirror/codemirror.js"
+        //codeMirrorCssUrl css加载的路径,默认是 URL + "third-party/codemirror/codemirror.css"
+        //,codeMirrorCssUrl:URL + "third-party/codemirror/codemirror.css"
+        //编辑器初始化完成后是否进入源码模式,默认为否。
+        //,sourceEditorFirst:false
+
+        //iframeUrlMap
+        //dialog内容的路径 ~会被替换成URL,垓属性一旦打开,将覆盖所有的dialog的默认路径
+        //,iframeUrlMap:{
+        //    'anchor':'~/dialogs/anchor/anchor.html',
+        //}
+
+        //webAppKey 百度应用的APIkey,每个站长必须首先去百度官网注册一个key后方能正常使用app功能,注册介绍,http://app.baidu.com/static/cms/getapikey.html
+        //, webAppKey: ""
+    };
+
+    function getUEBasePath(docUrl, confUrl) {
+
+        return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
+
+    }
+
+    function getConfigFilePath() {
+
+        var configPath = document.getElementsByTagName('script');
+
+        return configPath[ configPath.length - 1 ].src;
+
+    }
+
+    function getBasePath(docUrl, confUrl) {
+
+        var basePath = confUrl;
+
+
+        if (/^(\/|\\\\)/.test(confUrl)) {
+
+            basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
+
+        } else if (!/^[a-z]+:/i.test(confUrl)) {
+
+            docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
+
+            basePath = docUrl + "" + confUrl;
+
+        }
+
+        return optimizationPath(basePath);
+
+    }
+
+    function optimizationPath(path) {
+
+        var protocol = /^[a-z]+:\/\//.exec(path)[ 0 ],
+            tmp = null,
+            res = [];
+
+        path = path.replace(protocol, "").split("?")[0].split("#")[0];
+
+        path = path.replace(/\\/g, '/').split(/\//);
+
+        path[ path.length - 1 ] = "";
+
+        while (path.length) {
+
+            if (( tmp = path.shift() ) === "..") {
+                res.pop();
+            } else if (tmp !== ".") {
+                res.push(tmp);
+            }
+
+        }
+
+        return protocol + res.join("/");
+
+    }
+
+    window.UE = {
+        getUEBasePath: getUEBasePath
+    };
+
+})();

File diff suppressed because it is too large
+ 1022 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.parse.js


File diff suppressed because it is too large
+ 28 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/ueditor.parse.min.js


BIN
watero-wechat-web/src/main/webapp/common/lib/webuploader/0.1.5/Uploader.swf


+ 268 - 0
watero-wechat-web/src/main/webapp/common/lib/webuploader/0.1.5/cropper/uploader.js

@@ -0,0 +1,268 @@
+(function( factory ) {
+    if ( !window.jQuery ) {
+        alert('jQuery is required.')
+    }
+
+    jQuery(function() {
+        factory.call( null, jQuery );
+    });
+})(function( $ ) {
+
+var Uploader = (function() {
+
+    // -------setting-------
+    // 如果使用原始大小,超大的图片可能会出现 Croper UI 卡顿,所以这里建议先缩小后再crop.
+    var FRAME_WIDTH = 1600;
+
+
+    var _ = WebUploader;
+    var Uploader = _.Uploader;
+    var uploaderContainer = $('.uploader-container');
+    var uploader, file;
+
+    if ( !Uploader.support() ) {
+        alert( 'Web Uploader 不支持您的浏览器!');
+        throw new Error( 'WebUploader does not support the browser you are using.' );
+    }
+
+    // hook,
+    // 在文件开始上传前进行裁剪。
+    Uploader.register({
+        'before-send-file': 'cropImage'
+    }, {
+
+        cropImage: function( file ) {
+
+            var data = file._cropData,
+                image, deferred;
+
+            file = this.request( 'get-file', file );
+            deferred = _.Deferred();
+
+            image = new _.Lib.Image();
+
+            deferred.always(function() {
+                image.destroy();
+                image = null;
+            });
+            image.once( 'error', deferred.reject );
+            image.once( 'load', function() {
+                image.crop( data.x, data.y, data.width, data.height, data.scale );
+            });
+
+            image.once( 'complete', function() {
+                var blob, size;
+
+                // 移动端 UC / qq 浏览器的无图模式下
+                // ctx.getImageData 处理大图的时候会报 Exception
+                // INDEX_SIZE_ERR: DOM Exception 1
+                try {
+                    blob = image.getAsBlob();
+                    size = file.size;
+                    file.source = blob;
+                    file.size = blob.size;
+
+                    file.trigger( 'resize', blob.size, size );
+
+                    deferred.resolve();
+                } catch ( e ) {
+                    console.log( e );
+                    // 出错了直接继续,让其上传原始图片
+                    deferred.resolve();
+                }
+            });
+
+            file._info && image.info( file._info );
+            file._meta && image.meta( file._meta );
+            image.loadFromBlob( file.source );
+            return deferred.promise();
+        }
+    });
+
+    return {
+        init: function( selectCb ) {
+            uploader = new Uploader({
+                pick: {
+                    id: '#filePicker',
+                    multiple: false
+                },
+
+                // 设置用什么方式去生成缩略图。
+                thumb: {
+                    quality: 70,
+
+                    // 不允许放大
+                    allowMagnify: false,
+
+                    // 是否采用裁剪模式。如果采用这样可以避免空白内容。
+                    crop: false
+                },
+
+                // 禁掉分块传输,默认是开起的。
+                chunked: false,
+
+                // 禁掉上传前压缩功能,因为会手动裁剪。
+                compress: false,
+
+                // fileSingleSizeLimit: 2 * 1024 * 1024,
+
+                server: '../server/fileupload.php',
+                swf: '../Uploader.swf',
+                fileNumLimit: 1,
+                onError: function() {
+                    var args = [].slice.call(arguments, 0);
+                    alert(args.join('\n'));
+                }
+            });
+
+            uploader.on('fileQueued', function( _file ) {
+                file = _file;
+
+                uploader.makeThumb( file, function( error, src ) {
+
+                    if ( error ) {
+                        alert('不能预览');
+                        return;
+                    }
+
+                    selectCb( src );
+
+                }, FRAME_WIDTH, 1 );   // 注意这里的 height 值是 1,被当成了 100% 使用。
+            });
+        },
+
+        crop: function( data ) {
+
+            var scale = Croper.getImageSize().width / file._info.width;
+            data.scale = scale;
+
+            file._cropData = {
+                x: data.x1,
+                y: data.y1,
+                width: data.width,
+                height: data.height,
+                scale: data.scale
+            };
+        },
+
+        upload: function() {
+            uploader.upload();
+        }
+    }
+})();
+
+
+var Croper = (function() {
+    var container = $('.cropper-wraper');
+    var $image = container.find('.img-container img');
+    var btn = $('.upload-btn');
+    var isBase64Supported, callback;
+
+    $image.cropper({
+        aspectRatio: 16 / 9,
+        preview: ".img-preview",
+        done: function(data) {
+            // console.log(data);
+        }
+    });
+
+    function srcWrap( src, cb ) {
+
+        // we need to check this at the first time.
+        if (typeof isBase64Supported === 'undefined') {
+            (function() {
+                var data = new Image();
+                var support = true;
+                data.onload = data.onerror = function() {
+                    if( this.width != 1 || this.height != 1 ) {
+                        support = false;
+                    }
+                }
+                data.src = src;
+                isBase64Supported = support;
+            })();
+        }
+
+        if ( isBase64Supported ) {
+            cb( src );
+        } else {
+            // otherwise we need server support.
+            // convert base64 to a file.
+            $.ajax('../server/preview.php', {
+                method: 'POST',
+                data: src,
+                dataType:'json'
+            }).done(function( response ) {
+                if (response.result) {
+                    cb( response.result );
+                } else {
+                    alert("预览出错");
+                }
+            });
+        }
+    }
+
+    btn.on('click', function() {
+        callback && callback($image.cropper("getData"));
+        return false;
+    });
+
+    return {
+        setSource: function( src ) {
+
+            // 处理 base64 不支持的情况。
+            // 一般出现在 ie6-ie8
+            srcWrap( src, function( src ) {
+                $image.cropper("setImgSrc", src);
+            });
+
+            container.removeClass('webuploader-element-invisible');
+
+            return this;
+        },
+
+        getImageSize: function() {
+            var img = $image.get(0);
+            return {
+                width: img.naturalWidth,
+                height: img.naturalHeight
+            }
+        },
+
+        setCallback: function( cb ) {
+            callback = cb;
+            return this;
+        },
+
+        disable: function() {
+            $image.cropper("disable");
+            return this;
+        },
+
+        enable: function() {
+            $image.cropper("enable");
+            return this;
+        }
+    }
+
+})();
+
+
+
+var container = $('.uploader-container');
+
+Uploader.init(function( src ) {
+
+    Croper.setSource( src );
+
+    // 隐藏选择按钮。
+    container.addClass('webuploader-element-invisible');
+
+    // 当用户选择上传的时候,开始上传。
+    Croper.setCallback(function( data ) {
+        Uploader.crop(data);
+        Uploader.upload();
+    });
+});
+
+});

+ 573 - 0
watero-wechat-web/src/main/webapp/common/lib/webuploader/0.1.5/image-upload/upload.js

@@ -0,0 +1,573 @@
+(function( $ ){
+    // 当domReady的时候开始初始化
+    $(function() {
+        var $wrap = $('.uploader-list-container'),
+
+            // 图片容器
+            $queue = $( '<ul class="filelist"></ul>' )
+                .appendTo( $wrap.find( '.queueList' ) ),
+
+            // 状态栏,包括进度和控制按钮
+            $statusBar = $wrap.find( '.statusBar' ),
+
+            // 文件总体选择信息。
+            $info = $statusBar.find( '.info' ),
+
+            // 上传按钮
+            $upload = $wrap.find( '.uploadBtn' ),
+
+            // 没选择文件之前的内容。
+            $placeHolder = $wrap.find( '.placeholder' ),
+
+            $progress = $statusBar.find( '.progress' ).hide(),
+
+            // 添加的文件数量
+            fileCount = 0,
+
+            // 添加的文件总大小
+            fileSize = 0,
+
+            // 优化retina, 在retina下这个值是2
+            ratio = window.devicePixelRatio || 1,
+
+            // 缩略图大小
+            thumbnailWidth = 110 * ratio,
+            thumbnailHeight = 110 * ratio,
+
+            // 可能有pedding, ready, uploading, confirm, done.
+            state = 'pedding',
+
+            // 所有文件的进度信息,key为file id
+            percentages = {},
+            // 判断浏览器是否支持图片的base64
+            isSupportBase64 = ( function() {
+                var data = new Image();
+                var support = true;
+                data.onload = data.onerror = function() {
+                    if( this.width != 1 || this.height != 1 ) {
+                        support = false;
+                    }
+                }
+                data.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
+                return support;
+            } )(),
+
+            // 检测是否已经安装flash,检测flash的版本
+            flashVersion = ( function() {
+                var version;
+
+                try {
+                    version = navigator.plugins[ 'Shockwave Flash' ];
+                    version = version.description;
+                } catch ( ex ) {
+                    try {
+                        version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')
+                                .GetVariable('$version');
+                    } catch ( ex2 ) {
+                        version = '0.0';
+                    }
+                }
+                version = version.match( /\d+/g );
+                return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 );
+            } )(),
+
+            supportTransition = (function(){
+                var s = document.createElement('p').style,
+                    r = 'transition' in s ||
+                            'WebkitTransition' in s ||
+                            'MozTransition' in s ||
+                            'msTransition' in s ||
+                            'OTransition' in s;
+                s = null;
+                return r;
+            })(),
+
+            // WebUploader实例
+            uploader;
+
+        if ( !WebUploader.Uploader.support('flash') && WebUploader.browser.ie ) {
+
+            // flash 安装了但是版本过低。
+            if (flashVersion) {
+                (function(container) {
+                    window['expressinstallcallback'] = function( state ) {
+                        switch(state) {
+                            case 'Download.Cancelled':
+                                alert('您取消了更新!')
+                                break;
+
+                            case 'Download.Failed':
+                                alert('安装失败')
+                                break;
+
+                            default:
+                                alert('安装已成功,请刷新!');
+                                break;
+                        }
+                        delete window['expressinstallcallback'];
+                    };
+
+                    var swf = 'expressInstall.swf';
+                    // insert flash object
+                    var html = '<object type="application/' +
+                            'x-shockwave-flash" data="' +  swf + '" ';
+
+                    if (WebUploader.browser.ie) {
+                        html += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
+                    }
+
+                    html += 'width="100%" height="100%" style="outline:0">'  +
+                        '<param name="movie" value="' + swf + '" />' +
+                        '<param name="wmode" value="transparent" />' +
+                        '<param name="allowscriptaccess" value="always" />' +
+                    '</object>';
+
+                    container.html(html);
+
+                })($wrap);
+
+            // 压根就没有安转。
+            } else {
+                $wrap.html('<a href="http://www.adobe.com/go/getflashplayer" target="_blank" border="0"><img alt="get flash player" src="http://www.adobe.com/macromedia/style_guide/images/160x41_Get_Flash_Player.jpg" /></a>');
+            }
+
+            return;
+        } else if (!WebUploader.Uploader.support()) {
+            alert( 'Web Uploader 不支持您的浏览器!');
+            return;
+        }
+
+        // 实例化
+        uploader = WebUploader.create({
+            pick: {
+                id: '#filePicker-2',
+                label: '点击选择图片'
+            },
+            formData: {
+                uid: 123
+            },
+            dnd: '#dndArea',
+            paste: '#uploader',
+            swf: '../Uploader.swf',
+            chunked: false,
+            chunkSize: 512 * 1024,
+            server: '../server/fileupload.php',
+            // runtimeOrder: 'flash',
+
+            // accept: {
+            //     title: 'Images',
+            //     extensions: 'gif,jpg,jpeg,bmp,png',
+            //     mimeTypes: 'image/*'
+            // },
+
+            // 禁掉全局的拖拽功能。这样不会出现图片拖进页面的时候,把图片打开。
+            disableGlobalDnd: true,
+            fileNumLimit: 300,
+            fileSizeLimit: 200 * 1024 * 1024,    // 200 M
+            fileSingleSizeLimit: 50 * 1024 * 1024    // 50 M
+        });
+
+        // 拖拽时不接受 js, txt 文件。
+        uploader.on( 'dndAccept', function( items ) {
+            var denied = false,
+                len = items.length,
+                i = 0,
+                // 修改js类型
+                unAllowed = 'text/plain;application/javascript ';
+
+            for ( ; i < len; i++ ) {
+                // 如果在列表里面
+                if ( ~unAllowed.indexOf( items[ i ].type ) ) {
+                    denied = true;
+                    break;
+                }
+            }
+
+            return !denied;
+        });
+
+        uploader.on('dialogOpen', function() {
+            console.log('here');
+        });
+
+        // uploader.on('filesQueued', function() {
+        //     uploader.sort(function( a, b ) {
+        //         if ( a.name < b.name )
+        //           return -1;
+        //         if ( a.name > b.name )
+        //           return 1;
+        //         return 0;
+        //     });
+        // });
+
+        // 添加“添加文件”的按钮,
+        uploader.addButton({
+            id: '#filePicker2',
+            label: '继续添加'
+        });
+
+        uploader.on('ready', function() {
+            window.uploader = uploader;
+        });
+
+        // 当有文件添加进来时执行,负责view的创建
+        function addFile( file ) {
+            var $li = $( '<li id="' + file.id + '">' +
+                    '<p class="title">' + file.name + '</p>' +
+                    '<p class="imgWrap"></p>'+
+                    '<p class="progress"><span></span></p>' +
+                    '</li>' ),
+
+                $btns = $('<div class="file-panel">' +
+                    '<span class="cancel">删除</span>' +
+                    '<span class="rotateRight">向右旋转</span>' +
+                    '<span class="rotateLeft">向左旋转</span></div>').appendTo( $li ),
+                $prgress = $li.find('p.progress span'),
+                $wrap = $li.find( 'p.imgWrap' ),
+                $info = $('<p class="error"></p>'),
+
+                showError = function( code ) {
+                    switch( code ) {
+                        case 'exceed_size':
+                            text = '文件大小超出';
+                            break;
+
+                        case 'interrupt':
+                            text = '上传暂停';
+                            break;
+
+                        default:
+                            text = '上传失败,请重试';
+                            break;
+                    }
+
+                    $info.text( text ).appendTo( $li );
+                };
+
+            if ( file.getStatus() === 'invalid' ) {
+                showError( file.statusText );
+            } else {
+                // @todo lazyload
+                $wrap.text( '预览中' );
+                uploader.makeThumb( file, function( error, src ) {
+                    var img;
+
+                    if ( error ) {
+                        $wrap.text( '不能预览' );
+                        return;
+                    }
+
+                    if( isSupportBase64 ) {
+                        img = $('<img src="'+src+'">');
+                        $wrap.empty().append( img );
+                    } else {
+                        $.ajax('../server/preview.php', {
+                            method: 'POST',
+                            data: src,
+                            dataType:'json'
+                        }).done(function( response ) {
+                            if (response.result) {
+                                img = $('<img src="'+response.result+'">');
+                                $wrap.empty().append( img );
+                            } else {
+                                $wrap.text("预览出错");
+                            }
+                        });
+                    }
+                }, thumbnailWidth, thumbnailHeight );
+
+                percentages[ file.id ] = [ file.size, 0 ];
+                file.rotation = 0;
+            }
+
+            file.on('statuschange', function( cur, prev ) {
+                if ( prev === 'progress' ) {
+                    $prgress.hide().width(0);
+                } else if ( prev === 'queued' ) {
+                    $li.off( 'mouseenter mouseleave' );
+                    $btns.remove();
+                }
+
+                // 成功
+                if ( cur === 'error' || cur === 'invalid' ) {
+                    console.log( file.statusText );
+                    showError( file.statusText );
+                    percentages[ file.id ][ 1 ] = 1;
+                } else if ( cur === 'interrupt' ) {
+                    showError( 'interrupt' );
+                } else if ( cur === 'queued' ) {
+                    percentages[ file.id ][ 1 ] = 0;
+                } else if ( cur === 'progress' ) {
+                    $info.remove();
+                    $prgress.css('display', 'block');
+                } else if ( cur === 'complete' ) {
+                    $li.append( '<span class="success"></span>' );
+                }
+
+                $li.removeClass( 'state-' + prev ).addClass( 'state-' + cur );
+            });
+
+            $li.on( 'mouseenter', function() {
+                $btns.stop().animate({height: 30});
+            });
+
+            $li.on( 'mouseleave', function() {
+                $btns.stop().animate({height: 0});
+            });
+
+            $btns.on( 'click', 'span', function() {
+                var index = $(this).index(),
+                    deg;
+
+                switch ( index ) {
+                    case 0:
+                        uploader.removeFile( file );
+                        return;
+
+                    case 1:
+                        file.rotation += 90;
+                        break;
+
+                    case 2:
+                        file.rotation -= 90;
+                        break;
+                }
+
+                if ( supportTransition ) {
+                    deg = 'rotate(' + file.rotation + 'deg)';
+                    $wrap.css({
+                        '-webkit-transform': deg,
+                        '-mos-transform': deg,
+                        '-o-transform': deg,
+                        'transform': deg
+                    });
+                } else {
+                    $wrap.css( 'filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation='+ (~~((file.rotation/90)%4 + 4)%4) +')');
+                    // use jquery animate to rotation
+                    // $({
+                    //     rotation: rotation
+                    // }).animate({
+                    //     rotation: file.rotation
+                    // }, {
+                    //     easing: 'linear',
+                    //     step: function( now ) {
+                    //         now = now * Math.PI / 180;
+
+                    //         var cos = Math.cos( now ),
+                    //             sin = Math.sin( now );
+
+                    //         $wrap.css( 'filter', "progid:DXImageTransform.Microsoft.Matrix(M11=" + cos + ",M12=" + (-sin) + ",M21=" + sin + ",M22=" + cos + ",SizingMethod='auto expand')");
+                    //     }
+                    // });
+                }
+
+
+            });
+
+            $li.appendTo( $queue );
+        }
+
+        // 负责view的销毁
+        function removeFile( file ) {
+            var $li = $('#'+file.id);
+
+            delete percentages[ file.id ];
+            updateTotalProgress();
+            $li.off().find('.file-panel').off().end().remove();
+        }
+
+        function updateTotalProgress() {
+            var loaded = 0,
+                total = 0,
+                spans = $progress.children(),
+                percent;
+
+            $.each( percentages, function( k, v ) {
+                total += v[ 0 ];
+                loaded += v[ 0 ] * v[ 1 ];
+            } );
+
+            percent = total ? loaded / total : 0;
+
+
+            spans.eq( 0 ).text( Math.round( percent * 100 ) + '%' );
+            spans.eq( 1 ).css( 'width', Math.round( percent * 100 ) + '%' );
+            updateStatus();
+        }
+
+        function updateStatus() {
+            var text = '', stats;
+
+            if ( state === 'ready' ) {
+                text = '选中' + fileCount + '张图片,共' +
+                        WebUploader.formatSize( fileSize ) + '。';
+            } else if ( state === 'confirm' ) {
+                stats = uploader.getStats();
+                if ( stats.uploadFailNum ) {
+                    text = '已成功上传' + stats.successNum+ '张照片至XX相册,'+
+                        stats.uploadFailNum + '张照片上传失败,<a class="retry" href="#">重新上传</a>失败图片或<a class="ignore" href="#">忽略</a>'
+                }
+
+            } else {
+                stats = uploader.getStats();
+                text = '共' + fileCount + '张(' +
+                        WebUploader.formatSize( fileSize )  +
+                        '),已上传' + stats.successNum + '张';
+
+                if ( stats.uploadFailNum ) {
+                    text += ',失败' + stats.uploadFailNum + '张';
+                }
+            }
+
+            $info.html( text );
+        }
+
+        function setState( val ) {
+            var file, stats;
+
+            if ( val === state ) {
+                return;
+            }
+
+            $upload.removeClass( 'state-' + state );
+            $upload.addClass( 'state-' + val );
+            state = val;
+
+            switch ( state ) {
+                case 'pedding':
+                    $placeHolder.removeClass( 'element-invisible' );
+                    $queue.hide();
+                    $statusBar.addClass( 'element-invisible' );
+                    uploader.refresh();
+                    break;
+
+                case 'ready':
+                    $placeHolder.addClass( 'element-invisible' );
+                    $( '#filePicker2' ).removeClass( 'element-invisible');
+                    $queue.show();
+                    $statusBar.removeClass('element-invisible');
+                    uploader.refresh();
+                    break;
+
+                case 'uploading':
+                    $( '#filePicker2' ).addClass( 'element-invisible' );
+                    $progress.show();
+                    $upload.text( '暂停上传' );
+                    break;
+
+                case 'paused':
+                    $progress.show();
+                    $upload.text( '继续上传' );
+                    break;
+
+                case 'confirm':
+                    $progress.hide();
+                    $( '#filePicker2' ).removeClass( 'element-invisible' );
+                    $upload.text( '开始上传' );
+
+                    stats = uploader.getStats();
+                    if ( stats.successNum && !stats.uploadFailNum ) {
+                        setState( 'finish' );
+                        return;
+                    }
+                    break;
+                case 'finish':
+                    stats = uploader.getStats();
+                    if ( stats.successNum ) {
+                        alert( '上传成功' );
+                    } else {
+                        // 没有成功的图片,重设
+                        state = 'done';
+                        location.reload();
+                    }
+                    break;
+            }
+
+            updateStatus();
+        }
+
+        uploader.onUploadProgress = function( file, percentage ) {
+            var $li = $('#'+file.id),
+                $percent = $li.find('.progress span');
+
+            $percent.css( 'width', percentage * 100 + '%' );
+            percentages[ file.id ][ 1 ] = percentage;
+            updateTotalProgress();
+        };
+
+        uploader.onFileQueued = function( file ) {
+            fileCount++;
+            fileSize += file.size;
+
+            if ( fileCount === 1 ) {
+                $placeHolder.addClass( 'element-invisible' );
+                $statusBar.show();
+            }
+
+            addFile( file );
+            setState( 'ready' );
+            updateTotalProgress();
+        };
+
+        uploader.onFileDequeued = function( file ) {
+            fileCount--;
+            fileSize -= file.size;
+
+            if ( !fileCount ) {
+                setState( 'pedding' );
+            }
+
+            removeFile( file );
+            updateTotalProgress();
+
+        };
+
+        uploader.on( 'all', function( type ) {
+            var stats;
+            switch( type ) {
+                case 'uploadFinished':
+                    setState( 'confirm' );
+                    break;
+
+                case 'startUpload':
+                    setState( 'uploading' );
+                    break;
+
+                case 'stopUpload':
+                    setState( 'paused' );
+                    break;
+
+            }
+        });
+
+        uploader.onError = function( code ) {
+            alert( 'Eroor: ' + code );
+        };
+
+        $upload.on('click', function() {
+            if ( $(this).hasClass( 'disabled' ) ) {
+                return false;
+            }
+
+            if ( state === 'ready' ) {
+                uploader.upload();
+            } else if ( state === 'paused' ) {
+                uploader.upload();
+            } else if ( state === 'uploading' ) {
+                uploader.stop();
+            }
+        });
+
+        $info.on( 'click', '.retry', function() {
+            uploader.retry();
+        } );
+
+        $info.on( 'click', '.ignore', function() {
+            alert( 'todo' );
+        } );
+
+        $upload.addClass( 'state-' + state );
+        updateTotalProgress();
+    });
+
+})( jQuery );

+ 0 - 0
watero-wechat-web/src/main/webapp/common/lib/webuploader/0.1.5/images/Thumbs.db


Some files were not shown because too many files changed in this diff