Pārlūkot izejas kodu

watero框架更新

wangxiaoming 5 gadi atpakaļ
vecāks
revīzija
1deda7b403
100 mainītis faili ar 16728 papildinājumiem un 0 dzēšanām
  1. 1648 0
      watero-wechat-web/src/main/webapp/common/lib/Hui-iconfont/1.0.8/demo.html
  2. 218 0
      watero-wechat-web/src/main/webapp/common/lib/drag/drag.js
  3. 29 0
      watero-wechat-web/src/main/webapp/common/lib/echarts/3.4.0/echarts.common.min.js
  4. 50 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/highcharts-3d.js
  5. 60 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/highcharts-more.js
  6. 383 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/highcharts.js
  7. 46 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/accessibility.js
  8. 1072 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/accessibility.src.js
  9. 14 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/annotations.js
  10. 408 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/annotations.src.js
  11. 22 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/boost.js
  12. 652 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/boost.src.js
  13. 14 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/broken-axis.js
  14. 338 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/broken-axis.src.js
  15. 26 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/data.js
  16. 981 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/data.src.js
  17. 25 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/drilldown.js
  18. 756 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/drilldown.src.js
  19. 26 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/exporting.js
  20. 953 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/exporting.src.js
  21. 12 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/funnel.js
  22. 290 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/funnel.src.js
  23. 24 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/gantt.js
  24. 791 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/gantt.src.js
  25. 19 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/grid-axis.js
  26. 545 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/grid-axis.src.js
  27. 25 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/heatmap.js
  28. 798 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/heatmap.src.js
  29. 317 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/dark-blue.js
  30. 314 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/dark-green.js
  31. 243 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/dark-unica.js
  32. 326 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/gray.js
  33. 99 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/grid-light.js
  34. 131 0
      watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/grid.js
  35. 2 0
      watero-wechat-web/src/main/webapp/common/lib/jquery.ui/cityJson.js
  36. 136 0
      watero-wechat-web/src/main/webapp/common/lib/jquery.ui/citySet.js
  37. 998 0
      watero-wechat-web/src/main/webapp/common/lib/jquery.validation/1.14.0/additional-methods.js
  38. BIN
      watero-wechat-web/src/main/webapp/common/lib/layer/2.4/skin/default/icon-ext.png
  39. BIN
      watero-wechat-web/src/main/webapp/common/lib/layer/2.4/skin/default/icon.png
  40. BIN
      watero-wechat-web/src/main/webapp/common/lib/lightbox2/2.8.1/images/close.png
  41. 40 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/anchor/anchor.html
  42. 681 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/attachment.css
  43. 60 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/attachment.html
  44. 754 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/attachment.js
  45. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_chm.gif
  46. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_default.png
  47. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_doc.gif
  48. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/images/alignicon.gif
  49. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/images/alignicon.png
  50. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/images/bg.png
  51. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/images/file-icons.gif
  52. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/attachment/images/file-icons.png
  53. 94 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/background/background.css
  54. 56 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/background/background.html
  55. 376 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/background/background.js
  56. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/background/images/bg.png
  57. 65 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/chart.config.js
  58. 165 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/charts.css
  59. 89 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/charts.html
  60. 519 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/charts.js
  61. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/images/charts0.png
  62. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/images/charts1.png
  63. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/images/charts2.png
  64. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/images/charts3.png
  65. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/images/charts4.png
  66. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/images/charts5.png
  67. 43 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/emotion.css
  68. 54 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/emotion.html
  69. 186 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/emotion.js
  70. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/0.gif
  71. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/bface.gif
  72. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/cface.gif
  73. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/images/fface.gif
  74. 89 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/gmap/gmap.html
  75. 7 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/help/help.css
  76. 82 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/help/help.html
  77. 56 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/help/help.js
  78. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/image/images/alignicon.jpg
  79. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/image/images/bg.png
  80. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/addimg.png
  81. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/brush.png
  82. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/delimg.png
  83. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/delimgH.png
  84. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/empty.png
  85. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/emptyH.png
  86. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/scrawl/images/eraser.png
  87. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/table/dragicon.png
  88. 84 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/table/edittable.css
  89. 64 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/table/edittable.html
  90. 237 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/table/edittable.js
  91. 61 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/table/edittd.html
  92. 33 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/table/edittip.html
  93. 42 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/template/config.js
  94. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/template/images/bg.gif
  95. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/images/bg.png
  96. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/images/center_focus.jpg
  97. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/images/file-icons.gif
  98. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/video/images/file-icons.png
  99. BIN
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/wordimage/fClipboard_ueditor.swf
  100. 0 0
      watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/jsp/config.json

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1648 - 0
watero-wechat-web/src/main/webapp/common/lib/Hui-iconfont/1.0.8/demo.html


+ 218 - 0
watero-wechat-web/src/main/webapp/common/lib/drag/drag.js

@@ -0,0 +1,218 @@
+// 队列数组
+var queueArr = [];
+// 可拖动对象数组
+var draggers = [];
+// 是否在被拖动
+var isDragging = false;
+// 鼠标是否在某个拖动上按下
+var isMouseDown = false;
+// 被拖动的对象
+var dragger = null;
+// 刚开始拖动时的鼠标横坐标
+var mouseX;
+// 刚开始拖动时的鼠标纵坐标
+var mouseY;
+// 刚开始拖动时的拖动对象横坐标
+var draggerLeft;
+// 刚开始拖动时的拖动对象纵坐标
+var draggerTop;
+// 当前拖动对象的一个克隆,跟着鼠标移到
+var clone = null;
+// 拖动到灵敏度
+var DRAG_THRESHOLD = 5;
+// 包含所有队列的容器
+var queueContainer;
+// 队列选中时的border
+var queueActive = {'border': '1px solid #e85032'};
+// 队列未选中时的border
+var queueUnActive = {'border': '1px solid #2db9c7'};
+
+var registerDrag = function(container){
+	queueContainer = container;
+	$.each(container.find('.queue'), function(index, value){
+		queueArr[index] = $(value);
+		draggers[index] = [];
+		elements = $(value).find('.dragger');
+		$.each(elements, function(_index, _value){
+			draggers[index][_index] = $(_value);
+		});
+	});
+	for(var i=0;i<draggers.length;i++)
+		for(var j=0;j<draggers[i].length;j++){
+			draggers[i][j].on('mousedown', dragStart);
+		}
+	$(document).on('mousemove', dragMove);
+	$(document).on('mouseup', dragEnd);
+}
+
+var dragStart = function(e){
+	e.stopPropagation();
+
+	isMouseDown = true;
+	mouseX = e.clientX;
+	mouseY = e.clientY;
+	dragger = $(this);
+}
+
+var dragMove = function(e){
+	e.stopPropagation();
+
+	if(!isMouseDown) return;
+
+	var dx = e.clientX - mouseX;
+	var dy = e.clientY - mouseY;
+	if(isDragging){
+		clone.css({left: draggerLeft + dx, top: draggerTop + dy});
+		arrangeDragger();
+	}else if(Math.abs(dx)>DRAG_THRESHOLD || Math.abs(dy)>DRAG_THRESHOLD){
+		clone = makeClone(dragger);
+		draggerLeft = dragger.offset().left - parseInt(dragger.css('margin-left')) - parseInt(dragger.css('padding-left'));
+		draggerTop = dragger.offset().top - parseInt(dragger.css('margin-top')) - parseInt(dragger.css('padding-top'));
+		clone.css({left: draggerLeft, top: draggerTop});
+		queueContainer.append(clone);
+		dragger.css('visibility', 'hidden');
+		isDragging = true;
+	}
+}
+
+var dragEnd = function(e){
+	e.stopPropagation();
+	if(isDragging){
+		isDragging = false;
+		clone.remove();
+		dragger.css('visibility', 'visible');
+	}
+	for(var i=0;i<queueArr.length;i++)
+		queueArr[i].css(queueUnActive);
+	isMouseDown = false;
+}
+
+var makeClone = function(source){
+	var res = source.clone();
+	res.css({position: 'absolute', 'z-index': 100000});
+	return res;
+}
+
+var arrangeDragger = function(){
+	for(var i=0;i<queueArr.length;i++)
+		queueArr[i].css(queueUnActive);
+	var queueIn = findQueue();
+	if(queueIn != -1)
+		queueArr[queueIn].css(queueActive);
+	var hover = findHover(queueIn);
+	if(hover == null)
+		return;
+	var _hover = hover.hover;
+	var _insert = hover.insert;
+	var queueIdOriginal, drggerIdOriginal;
+	var queueIdHover, drggerIdHover;
+	for(var i=0;i<draggers.length;i++)
+		for(var j=0;j<draggers[i].length;j++){
+			if(draggers[i][j][0] == dragger[0]){
+				queueIdOriginal = i;
+				drggerIdOriginal = j;
+			}
+		}
+	draggers[queueIdOriginal].splice(drggerIdOriginal, 1);
+	if(_hover){
+		for(var i=0;i<draggers.length;i++)
+			for(var j=0;j<draggers[i].length;j++){
+				if(_hover && draggers[i][j][0] == _hover[0]){
+					queueIdHover = i;
+					drggerIdHover = j;
+				}
+			}
+		if(_insert == 'left'){
+			_hover.before(dragger);
+			draggers[queueIdHover].splice(drggerIdHover, 0, dragger);
+		}
+		else{
+			_hover.after(dragger);
+			draggers[queueIdHover].splice(drggerIdHover + 1, 0, dragger);
+		}
+	}else{
+		draggers[queueIn].push(dragger);
+		queueArr[queueIn].append(dragger);
+	}
+	console.log('******************');
+	for(var i=0;i<draggers.length;i++)
+		for(var j=0;j<draggers[i].length;j++)
+			console.log(draggers[i][j][0]);
+	console.log('******************');
+}
+
+var findQueue = function(){
+	var mx=-1,pos=-1;
+	var cloneTop = clone.offset().top;
+	var cloneHeight = clone.height();
+	for(var i=0;i<queueArr.length;i++){
+		var queueTop = queueArr[i].offset().top;
+		var queueHeight = queueArr[i].height();
+		var val = Math.min(queueTop + queueHeight, cloneTop + cloneHeight) - Math.max(queueTop, cloneTop);
+		if(val > mx){
+			mx = val;
+			pos = i;
+		}
+	}
+	return pos;
+}
+
+var findHover = function(queueIn){
+	if(queueIn == -1)
+		return null;
+	var mx=-1,pos=null;
+	var cloneTop = clone.offset().top;
+	var cloneHeight = clone.height();
+	var cloneLeft = clone.offset().left;
+	var cloneWidth = clone.width();
+	var isOwn = false;
+	for(var i=0;i<draggers[queueIn].length;i++){
+
+		var _draggerTop = draggers[queueIn][i].offset().top;
+		var _draggerHeight = draggers[queueIn][i].height();
+		var vertical = Math.min(_draggerTop + _draggerHeight, cloneTop + cloneHeight) - Math.max(_draggerTop, cloneTop);
+
+		var _draggerLeft = draggers[queueIn][i].offset().left;
+		var _draggerWidth = draggers[queueIn][i].width();
+		var horizontal = Math.min(_draggerLeft + _draggerWidth, cloneLeft + cloneWidth) - Math.max(_draggerLeft, cloneLeft);
+
+		if(vertical <= 0 || horizontal <=0) continue;
+		var s = vertical * horizontal;
+		if(s <= cloneHeight * cloneWidth /3)
+			continue;
+		if(draggers[queueIn][i][0] == dragger[0]){
+			isOwn = true;
+			continue;
+		}
+		if(s > mx){
+			mx = s;
+			pos = draggers[queueIn][i];
+		}
+	}
+	if(mx < 0){
+		if(isOwn) return null;
+		if(draggers[queueIn].length == 0){
+			return {'hover': null};
+		}else{
+			var last,index=draggers[queueIn].length - 1;
+			while(index>=0 && draggers[queueIn][index][0] == dragger[0])
+				index--;
+			if(index >= 0)
+				last = draggers[queueIn][index];
+			else
+				return {'hover': null};
+			if(cloneLeft >= last.offset().left + last.width())
+				return {'hover': last, 'insert': 'right'};
+			else
+				return null;
+		}
+	}
+	else{
+		var posMid = (2* pos.offset().left + pos.width())/2;
+		var cloneMid = (2* clone.offset().left + clone.width())/2;
+		if(posMid > cloneMid)
+			return {'hover': pos, 'insert': 'left'};
+		else
+			return {'hover': pos, 'insert': 'right'};
+	}
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 29 - 0
watero-wechat-web/src/main/webapp/common/lib/echarts/3.4.0/echarts.common.min.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 50 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/highcharts-3d.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 60 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/highcharts-more.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 383 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/highcharts.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 46 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/accessibility.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1072 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/accessibility.src.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 14 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/annotations.js


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

@@ -0,0 +1,408 @@
+/**
+ * @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
+         */
+        'use strict';
+
+        var defined = H.defined,
+            isNumber = H.isNumber,
+            inArray = H.inArray,
+            isArray = H.isArray,
+            merge = H.merge,
+            Chart = H.Chart,
+            extend = H.extend,
+            each = H.each;
+
+        var ALIGN_FACTOR,
+            ALLOWED_SHAPES;
+
+        ALLOWED_SHAPES = ['path', 'rect', 'circle'];
+
+        ALIGN_FACTOR = {
+            top: 0,
+            left: 0,
+            center: 0.5,
+            middle: 0.5,
+            bottom: 1,
+            right: 1
+        };
+
+        function defaultOptions(shapeType) {
+            var shapeOptions,
+                options;
+
+            options = {
+                xAxis: 0,
+                yAxis: 0,
+                title: {
+                    style: {},
+                    text: '',
+                    x: 0,
+                    y: 0
+                },
+                shape: {
+                    params: {
+                        stroke: '#000000',
+                        fill: 'transparent',
+                        strokeWidth: 2
+                    }
+                }
+            };
+
+            shapeOptions = {
+                circle: {
+                    params: {
+                        x: 0,
+                        y: 0
+                    }
+                }
+            };
+
+            if (shapeOptions[shapeType]) {
+                options.shape = merge(options.shape, shapeOptions[shapeType]);
+            }
+
+            return options;
+        }
+
+        function translatePath(d, xAxis, yAxis, xOffset, yOffset) {
+            var len = d.length,
+                i = 0;
+
+            while (i < len) {
+                if (isNumber(d[i]) && isNumber(d[i + 1])) {
+                    d[i] = xAxis.toPixels(d[i]) - xOffset;
+                    d[i + 1] = yAxis.toPixels(d[i + 1]) - yOffset;
+                    i += 2;
+                } else {
+                    i += 1;
+                }
+            }
+
+            return d;
+        }
+
+
+        // Define annotation prototype
+        var Annotation = function() {
+            this.init.apply(this, arguments);
+        };
+        Annotation.prototype = {
+            /* 
+             * Initialize the annotation
+             */
+            init: function(chart, options) {
+                var shapeType = options.shape && options.shape.type;
+
+                this.chart = chart;
+                this.options = merge({}, defaultOptions(shapeType), options);
+            },
+
+            /*
+             * Render the annotation
+             */
+            render: function(redraw) {
+                var annotation = this,
+                    chart = this.chart,
+                    renderer = annotation.chart.renderer,
+                    group = annotation.group,
+                    title = annotation.title,
+                    shape = annotation.shape,
+                    options = annotation.options,
+                    titleOptions = options.title,
+                    shapeOptions = options.shape;
+
+                if (!group) {
+                    group = annotation.group = renderer.g();
+                }
+
+
+                if (!shape && shapeOptions && inArray(shapeOptions.type, ALLOWED_SHAPES) !== -1) {
+                    shape = annotation.shape = renderer[options.shape.type](shapeOptions.params);
+                    shape.add(group);
+                }
+
+                if (!title && titleOptions) {
+                    title = annotation.title = renderer.label(titleOptions);
+                    title.add(group);
+                }
+
+                group.add(chart.annotations.group);
+
+                // link annotations to point or series
+                annotation.linkObjects();
+
+                if (redraw !== false) {
+                    annotation.redraw();
+                }
+            },
+
+            /*
+             * Redraw the annotation title or shape after options update
+             */
+            redraw: function() {
+                var options = this.options,
+                    chart = this.chart,
+                    group = this.group,
+                    title = this.title,
+                    shape = this.shape,
+                    linkedTo = this.linkedObject,
+                    xAxis = chart.xAxis[options.xAxis],
+                    yAxis = chart.yAxis[options.yAxis],
+                    width = options.width,
+                    height = options.height,
+                    anchorY = ALIGN_FACTOR[options.anchorY],
+                    anchorX = ALIGN_FACTOR[options.anchorX],
+                    shapeParams,
+                    linkType,
+                    series,
+                    param,
+                    bbox,
+                    x,
+                    y;
+
+                if (linkedTo) {
+                    linkType = (linkedTo instanceof H.Point) ? 'point' :
+                        (linkedTo instanceof H.Series) ? 'series' : null;
+
+                    if (linkType === 'point') {
+                        options.xValue = linkedTo.x;
+                        options.yValue = linkedTo.y;
+                        series = linkedTo.series;
+                    } else if (linkType === 'series') {
+                        series = linkedTo;
+                    }
+
+                    if (group.visibility !== series.group.visibility) {
+                        group.attr({
+                            visibility: series.group.visibility
+                        });
+                    }
+                }
+
+
+                // Based on given options find annotation pixel position
+                x = (defined(options.xValue) ? xAxis.toPixels(options.xValue + xAxis.minPointOffset) - xAxis.minPixelPadding : options.x);
+                y = defined(options.yValue) ? yAxis.toPixels(options.yValue) : options.y;
+
+                if (!isNumber(x) || !isNumber(y)) {
+                    return;
+                }
+
+
+                if (title) {
+                    title.attr(options.title);
+                    title.css(options.title.style);
+                }
+
+                if (shape) {
+                    shapeParams = extend({}, options.shape.params);
+
+                    if (options.units === 'values') {
+                        for (param in shapeParams) {
+                            if (inArray(param, ['width', 'x']) > -1) {
+                                shapeParams[param] = xAxis.translate(shapeParams[param]);
+                            } else if (inArray(param, ['height', 'y']) > -1) {
+                                shapeParams[param] = yAxis.translate(shapeParams[param]);
+                            }
+                        }
+
+                        if (shapeParams.width) {
+                            shapeParams.width -= xAxis.toPixels(0) - xAxis.left;
+                        }
+
+                        if (shapeParams.x) {
+                            shapeParams.x += xAxis.minPixelPadding;
+                        }
+
+                        if (options.shape.type === 'path') {
+                            translatePath(shapeParams.d, xAxis, yAxis, x, y);
+                        }
+                    }
+
+                    // move the center of the circle to shape x/y
+                    if (options.shape.type === 'circle') {
+                        shapeParams.x += shapeParams.r;
+                        shapeParams.y += shapeParams.r;
+                    }
+
+                    shape.attr(shapeParams);
+                }
+
+                group.bBox = null;
+
+                // If annotation width or height is not defined in options use bounding box size
+                if (!isNumber(width)) {
+                    bbox = group.getBBox();
+                    width = bbox.width;
+                }
+
+                if (!isNumber(height)) {
+                    // get bbox only if it wasn't set before
+                    if (!bbox) {
+                        bbox = group.getBBox();
+                    }
+
+                    height = bbox.height;
+                }
+
+                // Calculate anchor point
+                if (!isNumber(anchorX)) {
+                    anchorX = ALIGN_FACTOR.center;
+                }
+
+                if (!isNumber(anchorY)) {
+                    anchorY = ALIGN_FACTOR.center;
+                }
+
+                // Translate group according to its dimension and anchor point
+                x = x - width * anchorX;
+                y = y - height * anchorY;
+
+                if (defined(group.translateX) && defined(group.translateY)) {
+                    group.animate({
+                        translateX: x,
+                        translateY: y
+                    });
+                } else {
+                    group.translate(x, y);
+                }
+            },
+
+            /*
+             * Destroy the annotation
+             */
+            destroy: function() {
+                var annotation = this,
+                    chart = this.chart,
+                    allItems = chart.annotations.allItems,
+                    index = allItems.indexOf(annotation);
+
+                if (index > -1) {
+                    allItems.splice(index, 1);
+                }
+
+                each(['title', 'shape', 'group'], function(element) {
+                    if (annotation[element]) {
+                        annotation[element].destroy();
+                        annotation[element] = null;
+                    }
+                });
+
+                annotation.group = annotation.title = annotation.shape = annotation.chart = annotation.options = null;
+            },
+
+            /*
+             * Update the annotation with a given options
+             */
+            update: function(options, redraw) {
+                extend(this.options, options);
+
+                // update link to point or series
+                this.linkObjects();
+
+                this.render(redraw);
+            },
+
+            linkObjects: function() {
+                var annotation = this,
+                    chart = annotation.chart,
+                    linkedTo = annotation.linkedObject,
+                    linkedId = linkedTo && (linkedTo.id || linkedTo.options.id),
+                    options = annotation.options,
+                    id = options.linkedTo;
+
+                if (!defined(id)) {
+                    annotation.linkedObject = null;
+                } else if (!defined(linkedTo) || id !== linkedId) {
+                    annotation.linkedObject = chart.get(id);
+                }
+            }
+        };
+
+
+        // Add annotations methods to chart prototype
+        extend(Chart.prototype, {
+            annotations: {
+                /*
+                 * Unified method for adding annotations to the chart
+                 */
+                add: function(options, redraw) {
+                    var annotations = this.allItems,
+                        chart = this.chart,
+                        item,
+                        len;
+
+                    if (!isArray(options)) {
+                        options = [options];
+                    }
+
+                    len = options.length;
+
+                    while (len--) {
+                        item = new Annotation(chart, options[len]);
+                        annotations.push(item);
+                        item.render(redraw);
+                    }
+                },
+
+                /**
+                 * Redraw all annotations, method used in chart events
+                 */
+                redraw: function() {
+                    each(this.allItems, function(annotation) {
+                        annotation.redraw();
+                    });
+                }
+            }
+        });
+
+
+        // Initialize on chart load
+        Chart.prototype.callbacks.push(function(chart) {
+            var options = chart.options.annotations,
+                group;
+
+            group = chart.renderer.g('annotations');
+            group.attr({
+                zIndex: 7
+            });
+            group.add();
+
+            // initialize empty array for annotations
+            chart.annotations.allItems = [];
+
+            // link chart object to annotations
+            chart.annotations.chart = chart;
+
+            // link annotations group element to the chart
+            chart.annotations.group = group;
+
+            if (isArray(options) && options.length > 0) {
+                chart.annotations.add(chart.options.annotations);
+            }
+
+            // update annotations after chart redraw
+            H.addEvent(chart, 'redraw', function() {
+                chart.annotations.redraw();
+            });
+        });
+
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 22 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/boost.js


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

@@ -0,0 +1,652 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ * Boost module
+ *
+ * (c) 2010-2016 Highsoft AS
+ * Author: 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) {
+        /**
+         * License: www.highcharts.com/license
+         * Author: Torstein Honsi
+         * 
+         * This is an experimental Highcharts module that draws long data series on a canvas
+         * in order to increase performance of the initial load time and tooltip responsiveness.
+         *
+         * Compatible with HTML5 canvas compatible browsers (not IE < 9).
+         *
+         *
+         * 
+         * Development plan
+         * - Column range.
+         * - Heatmap. Modify the heatmap-canvas demo so that it uses this module.
+         * - Treemap.
+         * - Check how it works with Highstock and data grouping. Currently it only works when navigator.adaptToUpdatedData
+         *   is false. It is also recommended to set scrollbar.liveRedraw to false.
+         * - Check inverted charts.
+         * - Check reversed axes.
+         * - Chart callback should be async after last series is drawn. (But not necessarily, we don't do
+        	 that with initial series animation).
+         * - Cache full-size image so we don't have to redraw on hide/show and zoom up. But k-d-tree still
+         *   needs to be built.
+         * - Test IE9 and IE10.
+         * - Stacking is not perhaps not correct since it doesn't use the translation given in 
+         *   the translate method. If this gets to complicated, a possible way out would be to 
+         *   have a simplified renderCanvas method that simply draws the areaPath on a canvas.
+         *
+         * If this module is taken in as part of the core
+         * - All the loading logic should be merged with core. Update styles in the core.
+         * - Most of the method wraps should probably be added directly in parent methods.
+         *
+         * Notes for boost mode
+         * - Area lines are not drawn
+         * - Point markers are not drawn on line-type series
+         * - Lines are not drawn on scatter charts
+         * - Zones and negativeColor don't work
+         * - Initial point colors aren't rendered
+         * - Columns are always one pixel wide. Don't set the threshold too low.
+         *
+         * Optimizing tips for users
+         * - For scatter plots, use a marker.radius of 1 or less. It results in a rectangle being drawn, which is 
+         *   considerably faster than a circle.
+         * - Set extremes (min, max) explicitly on the axes in order for Highcharts to avoid computing extremes.
+         * - Set enableMouseTracking to false on the series to improve total rendering time.
+         * - The default threshold is set based on one series. If you have multiple, dense series, the combined
+         *   number of points drawn gets higher, and you may want to set the threshold lower in order to 
+         *   use optimizations.
+         */
+
+        'use strict';
+
+        var win = H.win,
+            doc = win.document,
+            noop = function() {},
+            Color = H.Color,
+            Series = H.Series,
+            seriesTypes = H.seriesTypes,
+            each = H.each,
+            extend = H.extend,
+            addEvent = H.addEvent,
+            fireEvent = H.fireEvent,
+            grep = H.grep,
+            isNumber = H.isNumber,
+            merge = H.merge,
+            pick = H.pick,
+            wrap = H.wrap,
+            plotOptions = H.getOptions().plotOptions,
+            CHUNK_SIZE = 50000,
+            destroyLoadingDiv;
+
+        function eachAsync(arr, fn, finalFunc, chunkSize, i) {
+            i = i || 0;
+            chunkSize = chunkSize || CHUNK_SIZE;
+
+            var threshold = i + chunkSize,
+                proceed = true;
+
+            while (proceed && i < threshold && i < arr.length) {
+                proceed = fn(arr[i], i);
+                i = i + 1;
+            }
+            if (proceed) {
+                if (i < arr.length) {
+                    setTimeout(function() {
+                        eachAsync(arr, fn, finalFunc, chunkSize, i);
+                    });
+                } else if (finalFunc) {
+                    finalFunc();
+                }
+            }
+        }
+
+        // Set default options
+        each(
+            ['area', 'arearange', 'bubble', 'column', 'line', 'scatter'],
+            function(type) {
+                if (plotOptions[type]) {
+                    plotOptions[type].boostThreshold = 5000;
+                }
+            }
+        );
+
+        /**
+         * Override a bunch of methods the same way. If the number of points is below the threshold,
+         * run the original method. If not, check for a canvas version or do nothing.
+         */
+        each(['translate', 'generatePoints', 'drawTracker', 'drawPoints', 'render'], function(method) {
+            function branch(proceed) {
+                var letItPass = this.options.stacking && (method === 'translate' || method === 'generatePoints');
+                if ((this.processedXData || this.options.data).length < (this.options.boostThreshold || Number.MAX_VALUE) ||
+                    letItPass) {
+
+                    // Clear image
+                    if (method === 'render' && this.image) {
+                        this.image.attr({
+                            href: ''
+                        });
+                        this.animate = null; // We're zooming in, don't run animation
+                    }
+
+                    proceed.call(this);
+
+                    // If a canvas version of the method exists, like renderCanvas(), run
+                } else if (this[method + 'Canvas']) {
+
+                    this[method + 'Canvas']();
+                }
+            }
+            wrap(Series.prototype, method, branch);
+
+            // A special case for some types - its translate method is already wrapped
+            if (method === 'translate') {
+                each(['arearange', 'bubble', 'column'], function(type) {
+                    if (seriesTypes[type]) {
+                        wrap(seriesTypes[type].prototype, method, branch);
+                    }
+                });
+            }
+        });
+
+        /**
+         * Do not compute extremes when min and max are set.
+         * If we use this in the core, we can add the hook to hasExtremes to the methods directly.
+         */
+        wrap(Series.prototype, 'getExtremes', function(proceed) {
+            if (!this.hasExtremes()) {
+                proceed.apply(this, Array.prototype.slice.call(arguments, 1));
+            }
+        });
+        wrap(Series.prototype, 'setData', function(proceed) {
+            if (!this.hasExtremes(true)) {
+                proceed.apply(this, Array.prototype.slice.call(arguments, 1));
+            }
+        });
+        wrap(Series.prototype, 'processData', function(proceed) {
+            if (!this.hasExtremes(true)) {
+                proceed.apply(this, Array.prototype.slice.call(arguments, 1));
+            }
+        });
+
+
+        H.extend(Series.prototype, {
+            pointRange: 0,
+            allowDG: false, // No data grouping, let boost handle large data 
+            hasExtremes: function(checkX) {
+                var options = this.options,
+                    data = options.data,
+                    xAxis = this.xAxis && this.xAxis.options,
+                    yAxis = this.yAxis && this.yAxis.options;
+                return data.length > (options.boostThreshold || Number.MAX_VALUE) && isNumber(yAxis.min) && isNumber(yAxis.max) &&
+                    (!checkX || (isNumber(xAxis.min) && isNumber(xAxis.max)));
+            },
+
+            /**
+             * If implemented in the core, parts of this can probably be shared with other similar
+             * methods in Highcharts.
+             */
+            destroyGraphics: function() {
+                var series = this,
+                    points = this.points,
+                    point,
+                    i;
+
+                if (points) {
+                    for (i = 0; i < points.length; i = i + 1) {
+                        point = points[i];
+                        if (point && point.graphic) {
+                            point.graphic = point.graphic.destroy();
+                        }
+                    }
+                }
+
+                each(['graph', 'area', 'tracker'], function(prop) {
+                    if (series[prop]) {
+                        series[prop] = series[prop].destroy();
+                    }
+                });
+            },
+
+            /**
+             * Create a hidden canvas to draw the graph on. The contents is later copied over 
+             * to an SVG image element.
+             */
+            getContext: function() {
+                var chart = this.chart,
+                    width = chart.plotWidth,
+                    height = chart.plotHeight,
+                    ctx = this.ctx,
+                    swapXY = function(proceed, x, y, a, b, c, d) {
+                        proceed.call(this, y, x, a, b, c, d);
+                    };
+
+                if (!this.canvas) {
+                    this.canvas = doc.createElement('canvas');
+                    this.image = chart.renderer.image('', 0, 0, width, height).add(this.group);
+                    this.ctx = ctx = this.canvas.getContext('2d');
+                    if (chart.inverted) {
+                        each(['moveTo', 'lineTo', 'rect', 'arc'], function(fn) {
+                            wrap(ctx, fn, swapXY);
+                        });
+                    }
+                } else {
+                    ctx.clearRect(0, 0, width, height);
+                }
+
+                this.canvas.width = width;
+                this.canvas.height = height;
+                this.image.attr({
+                    width: width,
+                    height: height
+                });
+
+                return ctx;
+            },
+
+            /** 
+             * Draw the canvas image inside an SVG image
+             */
+            canvasToSVG: function() {
+                this.image.attr({
+                    href: this.canvas.toDataURL('image/png')
+                });
+            },
+
+            cvsLineTo: function(ctx, clientX, plotY) {
+                ctx.lineTo(clientX, plotY);
+            },
+
+            renderCanvas: function() {
+                var series = this,
+                    options = series.options,
+                    chart = series.chart,
+                    xAxis = this.xAxis,
+                    yAxis = this.yAxis,
+                    ctx,
+                    c = 0,
+                    xData = series.processedXData,
+                    yData = series.processedYData,
+                    rawData = options.data,
+                    xExtremes = xAxis.getExtremes(),
+                    xMin = xExtremes.min,
+                    xMax = xExtremes.max,
+                    yExtremes = yAxis.getExtremes(),
+                    yMin = yExtremes.min,
+                    yMax = yExtremes.max,
+                    pointTaken = {},
+                    lastClientX,
+                    sampling = !!series.sampling,
+                    points,
+                    r = options.marker && options.marker.radius,
+                    cvsDrawPoint = this.cvsDrawPoint,
+                    cvsLineTo = options.lineWidth ? this.cvsLineTo : false,
+                    cvsMarker = r && r <= 1 ?
+                    this.cvsMarkerSquare :
+                    this.cvsMarkerCircle,
+                    strokeBatch = this.cvsStrokeBatch || 1000,
+                    enableMouseTracking = options.enableMouseTracking !== false,
+                    lastPoint,
+                    threshold = options.threshold,
+                    yBottom = yAxis.getThreshold(threshold),
+                    hasThreshold = isNumber(threshold),
+                    translatedThreshold = yBottom,
+                    doFill = this.fill,
+                    isRange = series.pointArrayMap && series.pointArrayMap.join(',') === 'low,high',
+                    isStacked = !!options.stacking,
+                    cropStart = series.cropStart || 0,
+                    loadingOptions = chart.options.loading,
+                    requireSorting = series.requireSorting,
+                    wasNull,
+                    connectNulls = options.connectNulls,
+                    useRaw = !xData,
+                    minVal,
+                    maxVal,
+                    minI,
+                    maxI,
+                    fillColor = series.fillOpacity ?
+                    new Color(series.color).setOpacity(pick(options.fillOpacity, 0.75)).get() :
+                    series.color,
+                    stroke = function() {
+                        if (doFill) {
+                            ctx.fillStyle = fillColor;
+                            ctx.fill();
+                        } else {
+                            ctx.strokeStyle = series.color;
+                            ctx.lineWidth = options.lineWidth;
+                            ctx.stroke();
+                        }
+                    },
+                    drawPoint = function(clientX, plotY, yBottom, i) {
+                        if (c === 0) {
+                            ctx.beginPath();
+
+                            if (cvsLineTo) {
+                                ctx.lineJoin = 'round';
+                            }
+                        }
+
+                        if (wasNull) {
+                            ctx.moveTo(clientX, plotY);
+                        } else {
+                            if (cvsDrawPoint) {
+                                cvsDrawPoint(ctx, clientX, plotY, yBottom, lastPoint);
+                            } else if (cvsLineTo) {
+                                cvsLineTo(ctx, clientX, plotY);
+                            } else if (cvsMarker) {
+                                cvsMarker.call(series, ctx, clientX, plotY, r, i);
+                            }
+                        }
+
+                        // We need to stroke the line for every 1000 pixels. It will crash the browser
+                        // memory use if we stroke too infrequently.
+                        c = c + 1;
+                        if (c === strokeBatch) {
+                            stroke();
+                            c = 0;
+                        }
+
+                        // Area charts need to keep track of the last point
+                        lastPoint = {
+                            clientX: clientX,
+                            plotY: plotY,
+                            yBottom: yBottom
+                        };
+                    },
+
+                    addKDPoint = function(clientX, plotY, i) {
+
+                        // The k-d tree requires series points. Reduce the amount of points, since the time to build the 
+                        // tree increases exponentially.
+                        if (enableMouseTracking && !pointTaken[clientX + ',' + plotY]) {
+                            pointTaken[clientX + ',' + plotY] = true;
+
+                            if (chart.inverted) {
+                                clientX = xAxis.len - clientX;
+                                plotY = yAxis.len - plotY;
+                            }
+
+                            points.push({
+                                clientX: clientX,
+                                plotX: clientX,
+                                plotY: plotY,
+                                i: cropStart + i
+                            });
+                        }
+                    };
+
+                // If we are zooming out from SVG mode, destroy the graphics
+                if (this.points || this.graph) {
+                    this.destroyGraphics();
+                }
+
+                // The group
+                series.plotGroup(
+                    'group',
+                    'series',
+                    series.visible ? 'visible' : 'hidden',
+                    options.zIndex,
+                    chart.seriesGroup
+                );
+
+                series.markerGroup = series.group;
+                addEvent(series, 'destroy', function() {
+                    series.markerGroup = null;
+                });
+
+                points = this.points = [];
+                ctx = this.getContext();
+                series.buildKDTree = noop; // Do not start building while drawing 
+
+                // Display a loading indicator
+                if (rawData.length > 99999) {
+                    chart.options.loading = merge(loadingOptions, {
+                        labelStyle: {
+                            backgroundColor: H.color('#ffffff').setOpacity(0.75).get(),
+                            padding: '1em',
+                            borderRadius: '0.5em'
+                        },
+                        style: {
+                            backgroundColor: 'none',
+                            opacity: 1
+                        }
+                    });
+                    clearTimeout(destroyLoadingDiv);
+                    chart.showLoading('Drawing...');
+                    chart.options.loading = loadingOptions; // reset
+                }
+
+                // Loop over the points
+                eachAsync(isStacked ? series.data : (xData || rawData), function(d, i) {
+                    var x,
+                        y,
+                        clientX,
+                        plotY,
+                        isNull,
+                        low,
+                        chartDestroyed = typeof chart.index === 'undefined',
+                        isYInside = true;
+
+                    if (!chartDestroyed) {
+                        if (useRaw) {
+                            x = d[0];
+                            y = d[1];
+                        } else {
+                            x = d;
+                            y = yData[i];
+                        }
+
+                        // Resolve low and high for range series
+                        if (isRange) {
+                            if (useRaw) {
+                                y = d.slice(1, 3);
+                            }
+                            low = y[0];
+                            y = y[1];
+                        } else if (isStacked) {
+                            x = d.x;
+                            y = d.stackY;
+                            low = y - d.y;
+                        }
+
+                        isNull = y === null;
+
+                        // Optimize for scatter zooming
+                        if (!requireSorting) {
+                            isYInside = y >= yMin && y <= yMax;
+                        }
+
+                        if (!isNull && x >= xMin && x <= xMax && isYInside) {
+
+                            clientX = Math.round(xAxis.toPixels(x, true));
+
+                            if (sampling) {
+                                if (minI === undefined || clientX === lastClientX) {
+                                    if (!isRange) {
+                                        low = y;
+                                    }
+                                    if (maxI === undefined || y > maxVal) {
+                                        maxVal = y;
+                                        maxI = i;
+                                    }
+                                    if (minI === undefined || low < minVal) {
+                                        minVal = low;
+                                        minI = i;
+                                    }
+
+                                }
+                                if (clientX !== lastClientX) { // Add points and reset
+                                    if (minI !== undefined) { // then maxI is also a number
+                                        plotY = yAxis.toPixels(maxVal, true);
+                                        yBottom = yAxis.toPixels(minVal, true);
+                                        drawPoint(
+                                            clientX,
+                                            hasThreshold ? Math.min(plotY, translatedThreshold) : plotY,
+                                            hasThreshold ? Math.max(yBottom, translatedThreshold) : yBottom,
+                                            i
+                                        );
+                                        addKDPoint(clientX, plotY, maxI);
+                                        if (yBottom !== plotY) {
+                                            addKDPoint(clientX, yBottom, minI);
+                                        }
+                                    }
+
+
+                                    minI = maxI = undefined;
+                                    lastClientX = clientX;
+                                }
+                            } else {
+                                plotY = Math.round(yAxis.toPixels(y, true));
+                                drawPoint(clientX, plotY, yBottom, i);
+                                addKDPoint(clientX, plotY, i);
+                            }
+                        }
+                        wasNull = isNull && !connectNulls;
+
+                        if (i % CHUNK_SIZE === 0) {
+                            series.canvasToSVG();
+                        }
+                    }
+
+                    return !chartDestroyed;
+                }, function() {
+                    var loadingDiv = chart.loadingDiv,
+                        loadingShown = chart.loadingShown;
+                    stroke();
+                    series.canvasToSVG();
+
+                    fireEvent(series, 'renderedCanvas');
+
+                    // Do not use chart.hideLoading, as it runs JS animation and will be blocked by buildKDTree.
+                    // CSS animation looks good, but then it must be deleted in timeout. If we add the module to core,
+                    // change hideLoading so we can skip this block.
+                    if (loadingShown) {
+                        extend(loadingDiv.style, {
+                            transition: 'opacity 250ms',
+                            opacity: 0
+                        });
+                        chart.loadingShown = false;
+                        destroyLoadingDiv = setTimeout(function() {
+                            if (loadingDiv.parentNode) { // In exporting it is falsy
+                                loadingDiv.parentNode.removeChild(loadingDiv);
+                            }
+                            chart.loadingDiv = chart.loadingSpan = null;
+                        }, 250);
+                    }
+
+                    // Pass tests in Pointer. 
+                    // Replace this with a single property, and replace when zooming in
+                    // below boostThreshold.
+                    series.directTouch = false;
+                    series.options.stickyTracking = true;
+
+                    delete series.buildKDTree; // Go back to prototype, ready to build
+                    series.buildKDTree();
+
+                    // Don't do async on export, the exportChart, getSVGForExport and getSVG methods are not chained for it.
+                }, chart.renderer.forExport ? Number.MAX_VALUE : undefined);
+            }
+        });
+
+        seriesTypes.scatter.prototype.cvsMarkerCircle = function(ctx, clientX, plotY, r) {
+            ctx.moveTo(clientX, plotY);
+            ctx.arc(clientX, plotY, r, 0, 2 * Math.PI, false);
+        };
+
+        // Rect is twice as fast as arc, should be used for small markers
+        seriesTypes.scatter.prototype.cvsMarkerSquare = function(ctx, clientX, plotY, r) {
+            ctx.rect(clientX - r, plotY - r, r * 2, r * 2);
+        };
+        seriesTypes.scatter.prototype.fill = true;
+
+        if (seriesTypes.bubble) {
+            seriesTypes.bubble.prototype.cvsMarkerCircle = function(ctx, clientX, plotY, r, i) {
+                ctx.moveTo(clientX, plotY);
+                ctx.arc(clientX, plotY, this.radii && this.radii[i], 0, 2 * Math.PI, false);
+            };
+            seriesTypes.bubble.prototype.cvsStrokeBatch = 1;
+        }
+
+
+        extend(seriesTypes.area.prototype, {
+            cvsDrawPoint: function(ctx, clientX, plotY, yBottom, lastPoint) {
+                if (lastPoint && clientX !== lastPoint.clientX) {
+                    ctx.moveTo(lastPoint.clientX, lastPoint.yBottom);
+                    ctx.lineTo(lastPoint.clientX, lastPoint.plotY);
+                    ctx.lineTo(clientX, plotY);
+                    ctx.lineTo(clientX, yBottom);
+                }
+            },
+            fill: true,
+            fillOpacity: true,
+            sampling: true
+        });
+
+        extend(seriesTypes.column.prototype, {
+            cvsDrawPoint: function(ctx, clientX, plotY, yBottom) {
+                ctx.rect(clientX - 1, plotY, 1, yBottom - plotY);
+            },
+            fill: true,
+            sampling: true
+        });
+
+        /**
+         * Return a full Point object based on the index. The boost module uses stripped point objects
+         * for performance reasons.
+         * @param   {Number} boostPoint A stripped-down point object
+         * @returns {Object}   A Point object as per http://api.highcharts.com/highcharts#Point
+         */
+        Series.prototype.getPoint = function(boostPoint) {
+            var point = boostPoint;
+
+            if (boostPoint && !(boostPoint instanceof this.pointClass)) {
+                point = (new this.pointClass()).init(this, this.options.data[boostPoint.i]); // eslint-disable-line new-cap
+                point.category = point.x;
+
+                point.dist = boostPoint.dist;
+                point.distX = boostPoint.distX;
+                point.plotX = boostPoint.plotX;
+                point.plotY = boostPoint.plotY;
+            }
+
+            return point;
+        };
+
+        /**
+         * Extend series.destroy to also remove the fake k-d-tree points (#5137). Normally
+         * this is handled by Series.destroy that calls Point.destroy, but the fake
+         * search points are not registered like that.
+         */
+        wrap(Series.prototype, 'destroy', function(proceed) {
+            var series = this,
+                chart = series.chart;
+            if (chart.hoverPoints) {
+                chart.hoverPoints = grep(chart.hoverPoints, function(point) {
+                    return point.series === series;
+                });
+            }
+
+            if (chart.hoverPoint && chart.hoverPoint.series === series) {
+                chart.hoverPoint = null;
+            }
+            proceed.call(this);
+        });
+
+        /**
+         * Return a point instance from the k-d-tree
+         */
+        wrap(Series.prototype, 'searchPoint', function(proceed) {
+            return this.getPoint(
+                proceed.apply(this, [].slice.call(arguments, 1))
+            );
+        });
+
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 14 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/broken-axis.js


+ 338 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/broken-axis.src.js

@@ -0,0 +1,338 @@
+/**
+ * @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
+         */
+        'use strict';
+
+        var pick = H.pick,
+            wrap = H.wrap,
+            each = H.each,
+            extend = H.extend,
+            fireEvent = H.fireEvent,
+            Axis = H.Axis,
+            Series = H.Series;
+
+        function stripArguments() {
+            return Array.prototype.slice.call(arguments, 1);
+        }
+
+        extend(Axis.prototype, {
+            isInBreak: function(brk, val) {
+                var ret,
+                    repeat = brk.repeat || Infinity,
+                    from = brk.from,
+                    length = brk.to - brk.from,
+                    test = (val >= from ? (val - from) % repeat : repeat - ((from - val) % repeat));
+
+                if (!brk.inclusive) {
+                    ret = test < length && test !== 0;
+                } else {
+                    ret = test <= length;
+                }
+                return ret;
+            },
+
+            isInAnyBreak: function(val, testKeep) {
+
+                var breaks = this.options.breaks,
+                    i = breaks && breaks.length,
+                    inbrk,
+                    keep,
+                    ret;
+
+
+                if (i) {
+
+                    while (i--) {
+                        if (this.isInBreak(breaks[i], val)) {
+                            inbrk = true;
+                            if (!keep) {
+                                keep = pick(breaks[i].showPoints, this.isXAxis ? false : true);
+                            }
+                        }
+                    }
+
+                    if (inbrk && testKeep) {
+                        ret = inbrk && !keep;
+                    } else {
+                        ret = inbrk;
+                    }
+                }
+                return ret;
+            }
+        });
+
+        wrap(Axis.prototype, 'setTickPositions', function(proceed) {
+            proceed.apply(this, Array.prototype.slice.call(arguments, 1));
+
+            if (this.options.breaks) {
+                var axis = this,
+                    tickPositions = this.tickPositions,
+                    info = this.tickPositions.info,
+                    newPositions = [],
+                    i;
+
+                for (i = 0; i < tickPositions.length; i++) {
+                    if (!axis.isInAnyBreak(tickPositions[i])) {
+                        newPositions.push(tickPositions[i]);
+                    }
+                }
+
+                this.tickPositions = newPositions;
+                this.tickPositions.info = info;
+            }
+        });
+
+        wrap(Axis.prototype, 'init', function(proceed, chart, userOptions) {
+            // Force Axis to be not-ordinal when breaks are defined
+            if (userOptions.breaks && userOptions.breaks.length) {
+                userOptions.ordinal = false;
+            }
+
+            proceed.call(this, chart, userOptions);
+
+            if (this.options.breaks) {
+
+                var axis = this;
+
+                axis.isBroken = true;
+
+                this.val2lin = function(val) {
+                    var nval = val,
+                        brk,
+                        i;
+
+                    for (i = 0; i < axis.breakArray.length; i++) {
+                        brk = axis.breakArray[i];
+                        if (brk.to <= val) {
+                            nval -= brk.len;
+                        } else if (brk.from >= val) {
+                            break;
+                        } else if (axis.isInBreak(brk, val)) {
+                            nval -= (val - brk.from);
+                            break;
+                        }
+                    }
+
+                    return nval;
+                };
+
+                this.lin2val = function(val) {
+                    var nval = val,
+                        brk,
+                        i;
+
+                    for (i = 0; i < axis.breakArray.length; i++) {
+                        brk = axis.breakArray[i];
+                        if (brk.from >= nval) {
+                            break;
+                        } else if (brk.to < nval) {
+                            nval += brk.len;
+                        } else if (axis.isInBreak(brk, nval)) {
+                            nval += brk.len;
+                        }
+                    }
+                    return nval;
+                };
+
+                this.setExtremes = function(newMin, newMax, redraw, animation, eventArguments) {
+                    // If trying to set extremes inside a break, extend it to before and after the break ( #3857 )
+                    while (this.isInAnyBreak(newMin)) {
+                        newMin -= this.closestPointRange;
+                    }
+                    while (this.isInAnyBreak(newMax)) {
+                        newMax -= this.closestPointRange;
+                    }
+                    Axis.prototype.setExtremes.call(this, newMin, newMax, redraw, animation, eventArguments);
+                };
+
+                this.setAxisTranslation = function(saveOld) {
+                    Axis.prototype.setAxisTranslation.call(this, saveOld);
+
+                    var breaks = axis.options.breaks,
+                        breakArrayT = [], // Temporary one
+                        breakArray = [],
+                        length = 0,
+                        inBrk,
+                        repeat,
+                        brk,
+                        min = axis.userMin || axis.min,
+                        max = axis.userMax || axis.max,
+                        start,
+                        i,
+                        j;
+
+                    // Min & max check (#4247)
+                    for (i in breaks) {
+                        brk = breaks[i];
+                        repeat = brk.repeat || Infinity;
+                        if (axis.isInBreak(brk, min)) {
+                            min += (brk.to % repeat) - (min % repeat);
+                        }
+                        if (axis.isInBreak(brk, max)) {
+                            max -= (max % repeat) - (brk.from % repeat);
+                        }
+                    }
+
+                    // Construct an array holding all breaks in the axis
+                    for (i in breaks) {
+                        brk = breaks[i];
+                        start = brk.from;
+                        repeat = brk.repeat || Infinity;
+
+                        while (start - repeat > min) {
+                            start -= repeat;
+                        }
+                        while (start < min) {
+                            start += repeat;
+                        }
+
+                        for (j = start; j < max; j += repeat) {
+                            breakArrayT.push({
+                                value: j,
+                                move: 'in'
+                            });
+                            breakArrayT.push({
+                                value: j + (brk.to - brk.from),
+                                move: 'out',
+                                size: brk.breakSize
+                            });
+                        }
+                    }
+
+                    breakArrayT.sort(function(a, b) {
+                        var ret;
+                        if (a.value === b.value) {
+                            ret = (a.move === 'in' ? 0 : 1) - (b.move === 'in' ? 0 : 1);
+                        } else {
+                            ret = a.value - b.value;
+                        }
+                        return ret;
+                    });
+
+                    // Simplify the breaks
+                    inBrk = 0;
+                    start = min;
+
+                    for (i in breakArrayT) {
+                        brk = breakArrayT[i];
+                        inBrk += (brk.move === 'in' ? 1 : -1);
+
+                        if (inBrk === 1 && brk.move === 'in') {
+                            start = brk.value;
+                        }
+                        if (inBrk === 0) {
+                            breakArray.push({
+                                from: start,
+                                to: brk.value,
+                                len: brk.value - start - (brk.size || 0)
+                            });
+                            length += brk.value - start - (brk.size || 0);
+                        }
+                    }
+
+                    axis.breakArray = breakArray;
+
+                    fireEvent(axis, 'afterBreaks');
+
+                    axis.transA *= ((max - axis.min) / (max - min - length));
+
+                    axis.min = min;
+                    axis.max = max;
+                };
+            }
+        });
+
+        wrap(Series.prototype, 'generatePoints', function(proceed) {
+
+            proceed.apply(this, stripArguments(arguments));
+
+            var series = this,
+                xAxis = series.xAxis,
+                yAxis = series.yAxis,
+                points = series.points,
+                point,
+                i = points.length,
+                connectNulls = series.options.connectNulls,
+                nullGap;
+
+
+            if (xAxis && yAxis && (xAxis.options.breaks || yAxis.options.breaks)) {
+                while (i--) {
+                    point = points[i];
+
+                    nullGap = point.y === null && connectNulls === false; // respect nulls inside the break (#4275)
+                    if (!nullGap && (xAxis.isInAnyBreak(point.x, true) || yAxis.isInAnyBreak(point.y, true))) {
+                        points.splice(i, 1);
+                        if (this.data[i]) {
+                            this.data[i].destroyElements(); // removes the graphics for this point if they exist
+                        }
+                    }
+                }
+            }
+
+        });
+
+        function drawPointsWrapped(proceed) {
+            proceed.apply(this);
+            this.drawBreaks(this.xAxis, ['x']);
+            this.drawBreaks(this.yAxis, pick(this.pointArrayMap, ['y']));
+        }
+
+        H.Series.prototype.drawBreaks = function(axis, keys) {
+            var series = this,
+                points = series.points,
+                breaks,
+                threshold,
+                eventName,
+                y;
+
+            if (!axis) {
+                return; // #5950
+            }
+
+            each(keys, function(key) {
+                breaks = axis.breakArray || [];
+                threshold = axis.isXAxis ? axis.min : pick(series.options.threshold, axis.min);
+                each(points, function(point) {
+                    y = pick(point['stack' + key.toUpperCase()], point[key]);
+                    each(breaks, function(brk) {
+                        eventName = false;
+
+                        if ((threshold < brk.from && y > brk.to) || (threshold > brk.from && y < brk.from)) {
+                            eventName = 'pointBreak';
+                        } else if ((threshold < brk.from && y > brk.from && y < brk.to) || (threshold > brk.from && y > brk.to && y < brk.from)) { // point falls inside the break
+                            eventName = 'pointInBreak';
+                        }
+                        if (eventName) {
+                            fireEvent(axis, eventName, {
+                                point: point,
+                                brk: brk
+                            });
+                        }
+                    });
+                });
+            });
+        };
+
+        wrap(H.seriesTypes.column.prototype, 'drawPoints', drawPointsWrapped);
+        wrap(H.Series.prototype, 'drawPoints', drawPointsWrapped);
+
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 26 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/data.js


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

@@ -0,0 +1,981 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ * Data module
+ *
+ * (c) 2012-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) {
+        /**
+         * Data module
+         *
+         * (c) 2012-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         */
+
+        /* global jQuery */
+        'use strict';
+
+        // Utilities
+        var win = Highcharts.win,
+            doc = win.document,
+            each = Highcharts.each,
+            pick = Highcharts.pick,
+            inArray = Highcharts.inArray,
+            isNumber = Highcharts.isNumber,
+            splat = Highcharts.splat,
+            SeriesBuilder;
+
+
+        // The Data constructor
+        var Data = function(dataOptions, chartOptions) {
+            this.init(dataOptions, chartOptions);
+        };
+
+        // Set the prototype properties
+        Highcharts.extend(Data.prototype, {
+
+            /**
+             * Initialize the Data object with the given options
+             */
+            init: function(options, chartOptions) {
+                this.options = options;
+                this.chartOptions = chartOptions;
+                this.columns = options.columns || this.rowsToColumns(options.rows) || [];
+                this.firstRowAsNames = pick(options.firstRowAsNames, true);
+                this.decimalRegex = options.decimalPoint && new RegExp('^(-?[0-9]+)' + options.decimalPoint + '([0-9]+)$');
+
+                // This is a two-dimensional array holding the raw, trimmed string values
+                // with the same organisation as the columns array. It makes it possible
+                // for example to revert from interpreted timestamps to string-based
+                // categories.
+                this.rawColumns = [];
+
+                // No need to parse or interpret anything
+                if (this.columns.length) {
+                    this.dataFound();
+
+                    // Parse and interpret
+                } else {
+
+                    // Parse a CSV string if options.csv is given
+                    this.parseCSV();
+
+                    // Parse a HTML table if options.table is given
+                    this.parseTable();
+
+                    // Parse a Google Spreadsheet 
+                    this.parseGoogleSpreadsheet();
+                }
+
+            },
+
+            /**
+             * Get the column distribution. For example, a line series takes a single column for 
+             * Y values. A range series takes two columns for low and high values respectively,
+             * and an OHLC series takes four columns.
+             */
+            getColumnDistribution: function() {
+                var chartOptions = this.chartOptions,
+                    options = this.options,
+                    xColumns = [],
+                    getValueCount = function(type) {
+                        return (Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap || [0]).length;
+                    },
+                    getPointArrayMap = function(type) {
+                        return Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap;
+                    },
+                    globalType = chartOptions && chartOptions.chart && chartOptions.chart.type,
+                    individualCounts = [],
+                    seriesBuilders = [],
+                    seriesIndex = 0,
+                    i;
+
+                each((chartOptions && chartOptions.series) || [], function(series) {
+                    individualCounts.push(getValueCount(series.type || globalType));
+                });
+
+                // Collect the x-column indexes from seriesMapping
+                each((options && options.seriesMapping) || [], function(mapping) {
+                    xColumns.push(mapping.x || 0);
+                });
+
+                // If there are no defined series with x-columns, use the first column as x column
+                if (xColumns.length === 0) {
+                    xColumns.push(0);
+                }
+
+                // Loop all seriesMappings and constructs SeriesBuilders from
+                // the mapping options.
+                each((options && options.seriesMapping) || [], function(mapping) {
+                    var builder = new SeriesBuilder(),
+                        name,
+                        numberOfValueColumnsNeeded = individualCounts[seriesIndex] || getValueCount(globalType),
+                        seriesArr = (chartOptions && chartOptions.series) || [],
+                        series = seriesArr[seriesIndex] || {},
+                        pointArrayMap = getPointArrayMap(series.type || globalType) || ['y'];
+
+                    // Add an x reader from the x property or from an undefined column
+                    // if the property is not set. It will then be auto populated later.
+                    builder.addColumnReader(mapping.x, 'x');
+
+                    // Add all column mappings
+                    for (name in mapping) {
+                        if (mapping.hasOwnProperty(name) && name !== 'x') {
+                            builder.addColumnReader(mapping[name], name);
+                        }
+                    }
+
+                    // Add missing columns
+                    for (i = 0; i < numberOfValueColumnsNeeded; i++) {
+                        if (!builder.hasReader(pointArrayMap[i])) {
+                            //builder.addNextColumnReader(pointArrayMap[i]);
+                            // Create and add a column reader for the next free column index
+                            builder.addColumnReader(undefined, pointArrayMap[i]);
+                        }
+                    }
+
+                    seriesBuilders.push(builder);
+                    seriesIndex++;
+                });
+
+                var globalPointArrayMap = getPointArrayMap(globalType);
+                if (globalPointArrayMap === undefined) {
+                    globalPointArrayMap = ['y'];
+                }
+
+                this.valueCount = {
+                    global: getValueCount(globalType),
+                    xColumns: xColumns,
+                    individual: individualCounts,
+                    seriesBuilders: seriesBuilders,
+                    globalPointArrayMap: globalPointArrayMap
+                };
+            },
+
+            /**
+             * When the data is parsed into columns, either by CSV, table, GS or direct input,
+             * continue with other operations.
+             */
+            dataFound: function() {
+
+                if (this.options.switchRowsAndColumns) {
+                    this.columns = this.rowsToColumns(this.columns);
+                }
+
+                // Interpret the info about series and columns
+                this.getColumnDistribution();
+
+                // Interpret the values into right types
+                this.parseTypes();
+
+                // Handle columns if a handleColumns callback is given
+                if (this.parsed() !== false) {
+
+                    // Complete if a complete callback is given
+                    this.complete();
+                }
+
+            },
+
+            /**
+             * Parse a CSV input string
+             */
+            parseCSV: function() {
+                var self = this,
+                    options = this.options,
+                    csv = options.csv,
+                    columns = this.columns,
+                    startRow = options.startRow || 0,
+                    endRow = options.endRow || Number.MAX_VALUE,
+                    startColumn = options.startColumn || 0,
+                    endColumn = options.endColumn || Number.MAX_VALUE,
+                    itemDelimiter,
+                    lines,
+                    activeRowNo = 0;
+
+                if (csv) {
+
+                    lines = csv
+                        .replace(/\r\n/g, '\n') // Unix
+                        .replace(/\r/g, '\n') // Mac
+                        .split(options.lineDelimiter || '\n');
+
+                    itemDelimiter = options.itemDelimiter || (csv.indexOf('\t') !== -1 ? '\t' : ',');
+
+                    each(lines, function(line, rowNo) {
+                        var trimmed = self.trim(line),
+                            isComment = trimmed.indexOf('#') === 0,
+                            isBlank = trimmed === '',
+                            items;
+
+                        if (rowNo >= startRow && rowNo <= endRow && !isComment && !isBlank) {
+                            items = line.split(itemDelimiter);
+                            each(items, function(item, colNo) {
+                                if (colNo >= startColumn && colNo <= endColumn) {
+                                    if (!columns[colNo - startColumn]) {
+                                        columns[colNo - startColumn] = [];
+                                    }
+
+                                    columns[colNo - startColumn][activeRowNo] = item;
+                                }
+                            });
+                            activeRowNo += 1;
+                        }
+                    });
+
+                    this.dataFound();
+                }
+            },
+
+            /**
+             * Parse a HTML table
+             */
+            parseTable: function() {
+                var options = this.options,
+                    table = options.table,
+                    columns = this.columns,
+                    startRow = options.startRow || 0,
+                    endRow = options.endRow || Number.MAX_VALUE,
+                    startColumn = options.startColumn || 0,
+                    endColumn = options.endColumn || Number.MAX_VALUE;
+
+                if (table) {
+
+                    if (typeof table === 'string') {
+                        table = doc.getElementById(table);
+                    }
+
+                    each(table.getElementsByTagName('tr'), function(tr, rowNo) {
+                        if (rowNo >= startRow && rowNo <= endRow) {
+                            each(tr.children, function(item, colNo) {
+                                if ((item.tagName === 'TD' || item.tagName === 'TH') && colNo >= startColumn && colNo <= endColumn) {
+                                    if (!columns[colNo - startColumn]) {
+                                        columns[colNo - startColumn] = [];
+                                    }
+
+                                    columns[colNo - startColumn][rowNo - startRow] = item.innerHTML;
+                                }
+                            });
+                        }
+                    });
+
+                    this.dataFound(); // continue
+                }
+            },
+
+            /**
+             */
+            parseGoogleSpreadsheet: function() {
+                var self = this,
+                    options = this.options,
+                    googleSpreadsheetKey = options.googleSpreadsheetKey,
+                    columns = this.columns,
+                    startRow = options.startRow || 0,
+                    endRow = options.endRow || Number.MAX_VALUE,
+                    startColumn = options.startColumn || 0,
+                    endColumn = options.endColumn || Number.MAX_VALUE,
+                    gr, // google row
+                    gc; // google column
+
+                if (googleSpreadsheetKey) {
+                    jQuery.ajax({
+                        dataType: 'json',
+                        url: 'https://spreadsheets.google.com/feeds/cells/' +
+                            googleSpreadsheetKey + '/' + (options.googleSpreadsheetWorksheet || 'od6') +
+                            '/public/values?alt=json-in-script&callback=?',
+                        error: options.error,
+                        success: function(json) {
+                            // Prepare the data from the spreadsheat
+                            var cells = json.feed.entry,
+                                cell,
+                                cellCount = cells.length,
+                                colCount = 0,
+                                rowCount = 0,
+                                i;
+
+                            // First, find the total number of columns and rows that 
+                            // are actually filled with data
+                            for (i = 0; i < cellCount; i++) {
+                                cell = cells[i];
+                                colCount = Math.max(colCount, cell.gs$cell.col);
+                                rowCount = Math.max(rowCount, cell.gs$cell.row);
+                            }
+
+                            // Set up arrays containing the column data
+                            for (i = 0; i < colCount; i++) {
+                                if (i >= startColumn && i <= endColumn) {
+                                    // Create new columns with the length of either end-start or rowCount
+                                    columns[i - startColumn] = [];
+
+                                    // Setting the length to avoid jslint warning
+                                    columns[i - startColumn].length = Math.min(rowCount, endRow - startRow);
+                                }
+                            }
+
+                            // Loop over the cells and assign the value to the right
+                            // place in the column arrays
+                            for (i = 0; i < cellCount; i++) {
+                                cell = cells[i];
+                                gr = cell.gs$cell.row - 1; // rows start at 1
+                                gc = cell.gs$cell.col - 1; // columns start at 1
+
+                                // If both row and col falls inside start and end
+                                // set the transposed cell value in the newly created columns
+                                if (gc >= startColumn && gc <= endColumn &&
+                                    gr >= startRow && gr <= endRow) {
+                                    columns[gc - startColumn][gr - startRow] = cell.content.$t;
+                                }
+                            }
+
+                            // Insert null for empty spreadsheet cells (#5298)
+                            each(columns, function(column) {
+                                for (i = 0; i < column.length; i++) {
+                                    if (column[i] === undefined) {
+                                        column[i] = null;
+                                    }
+                                }
+                            });
+
+                            self.dataFound();
+                        }
+                    });
+                }
+            },
+
+            /**
+             * Trim a string from whitespace
+             */
+            trim: function(str, inside) {
+                if (typeof str === 'string') {
+                    str = str.replace(/^\s+|\s+$/g, '');
+
+                    // Clear white space insdie the string, like thousands separators
+                    if (inside && /^[0-9\s]+$/.test(str)) {
+                        str = str.replace(/\s/g, '');
+                    }
+
+                    if (this.decimalRegex) {
+                        str = str.replace(this.decimalRegex, '$1.$2');
+                    }
+                }
+                return str;
+            },
+
+            /**
+             * Parse numeric cells in to number types and date types in to true dates.
+             */
+            parseTypes: function() {
+                var columns = this.columns,
+                    col = columns.length;
+
+                while (col--) {
+                    this.parseColumn(columns[col], col);
+                }
+
+            },
+
+            /**
+             * Parse a single column. Set properties like .isDatetime and .isNumeric.
+             */
+            parseColumn: function(column, col) {
+                var rawColumns = this.rawColumns,
+                    columns = this.columns,
+                    row = column.length,
+                    val,
+                    floatVal,
+                    trimVal,
+                    trimInsideVal,
+                    firstRowAsNames = this.firstRowAsNames,
+                    isXColumn = inArray(col, this.valueCount.xColumns) !== -1,
+                    dateVal,
+                    backup = [],
+                    diff,
+                    chartOptions = this.chartOptions,
+                    descending,
+                    columnTypes = this.options.columnTypes || [],
+                    columnType = columnTypes[col],
+                    forceCategory = isXColumn && ((chartOptions && chartOptions.xAxis && splat(chartOptions.xAxis)[0].type === 'category') || columnType === 'string');
+
+                if (!rawColumns[col]) {
+                    rawColumns[col] = [];
+                }
+                while (row--) {
+                    val = backup[row] || column[row];
+
+                    trimVal = this.trim(val);
+                    trimInsideVal = this.trim(val, true);
+                    floatVal = parseFloat(trimInsideVal);
+
+                    // Set it the first time
+                    if (rawColumns[col][row] === undefined) {
+                        rawColumns[col][row] = trimVal;
+                    }
+
+                    // Disable number or date parsing by setting the X axis type to category
+                    if (forceCategory || (row === 0 && firstRowAsNames)) {
+                        column[row] = trimVal;
+
+                    } else if (+trimInsideVal === floatVal) { // is numeric
+
+                        column[row] = floatVal;
+
+                        // If the number is greater than milliseconds in a year, assume datetime
+                        if (floatVal > 365 * 24 * 3600 * 1000 && columnType !== 'float') {
+                            column.isDatetime = true;
+                        } else {
+                            column.isNumeric = true;
+                        }
+
+                        if (column[row + 1] !== undefined) {
+                            descending = floatVal > column[row + 1];
+                        }
+
+                        // String, continue to determine if it is a date string or really a string
+                    } else {
+                        dateVal = this.parseDate(val);
+                        // Only allow parsing of dates if this column is an x-column
+                        if (isXColumn && isNumber(dateVal) && columnType !== 'float') { // is date
+                            backup[row] = val;
+                            column[row] = dateVal;
+                            column.isDatetime = true;
+
+                            // Check if the dates are uniformly descending or ascending. If they 
+                            // are not, chances are that they are a different time format, so check
+                            // for alternative.
+                            if (column[row + 1] !== undefined) {
+                                diff = dateVal > column[row + 1];
+                                if (diff !== descending && descending !== undefined) {
+                                    if (this.alternativeFormat) {
+                                        this.dateFormat = this.alternativeFormat;
+                                        row = column.length;
+                                        this.alternativeFormat = this.dateFormats[this.dateFormat].alternative;
+                                    } else {
+                                        column.unsorted = true;
+                                    }
+                                }
+                                descending = diff;
+                            }
+
+                        } else { // string
+                            column[row] = trimVal === '' ? null : trimVal;
+                            if (row !== 0 && (column.isDatetime || column.isNumeric)) {
+                                column.mixed = true;
+                            }
+                        }
+                    }
+                }
+
+                // If strings are intermixed with numbers or dates in a parsed column, it is an indication
+                // that parsing went wrong or the data was not intended to display as numbers or dates and 
+                // parsing is too aggressive. Fall back to categories. Demonstrated in the 
+                // highcharts/demo/column-drilldown sample.
+                if (isXColumn && column.mixed) {
+                    columns[col] = rawColumns[col];
+                }
+
+                // If the 0 column is date or number and descending, reverse all columns. 
+                if (isXColumn && descending && this.options.sort) {
+                    for (col = 0; col < columns.length; col++) {
+                        columns[col].reverse();
+                        if (firstRowAsNames) {
+                            columns[col].unshift(columns[col].pop());
+                        }
+                    }
+                }
+            },
+
+            /**
+             * A collection of available date formats, extendable from the outside to support
+             * custom date formats.
+             */
+            dateFormats: {
+                'YYYY-mm-dd': {
+                    regex: /^([0-9]{4})[\-\/\.]([0-9]{2})[\-\/\.]([0-9]{2})$/,
+                    parser: function(match) {
+                        return Date.UTC(+match[1], match[2] - 1, +match[3]);
+                    }
+                },
+                'dd/mm/YYYY': {
+                    regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,
+                    parser: function(match) {
+                        return Date.UTC(+match[3], match[2] - 1, +match[1]);
+                    },
+                    alternative: 'mm/dd/YYYY' // different format with the same regex
+                },
+                'mm/dd/YYYY': {
+                    regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,
+                    parser: function(match) {
+                        return Date.UTC(+match[3], match[1] - 1, +match[2]);
+                    }
+                },
+                'dd/mm/YY': {
+                    regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,
+                    parser: function(match) {
+                        return Date.UTC(+match[3] + 2000, match[2] - 1, +match[1]);
+                    },
+                    alternative: 'mm/dd/YY' // different format with the same regex
+                },
+                'mm/dd/YY': {
+                    regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,
+                    parser: function(match) {
+                        return Date.UTC(+match[3] + 2000, match[1] - 1, +match[2]);
+                    }
+                }
+            },
+
+            /**
+             * Parse a date and return it as a number. Overridable through options.parseDate.
+             */
+            parseDate: function(val) {
+                var parseDate = this.options.parseDate,
+                    ret,
+                    key,
+                    format,
+                    dateFormat = this.options.dateFormat || this.dateFormat,
+                    match;
+
+                if (parseDate) {
+                    ret = parseDate(val);
+
+                } else if (typeof val === 'string') {
+                    // Auto-detect the date format the first time
+                    if (!dateFormat) {
+                        for (key in this.dateFormats) {
+                            format = this.dateFormats[key];
+                            match = val.match(format.regex);
+                            if (match) {
+                                this.dateFormat = dateFormat = key;
+                                this.alternativeFormat = format.alternative;
+                                ret = format.parser(match);
+                                break;
+                            }
+                        }
+                        // Next time, use the one previously found
+                    } else {
+                        format = this.dateFormats[dateFormat];
+                        match = val.match(format.regex);
+                        if (match) {
+                            ret = format.parser(match);
+                        }
+                    }
+                    // Fall back to Date.parse		
+                    if (!match) {
+                        match = Date.parse(val);
+                        // External tools like Date.js and MooTools extend Date object and
+                        // returns a date.
+                        if (typeof match === 'object' && match !== null && match.getTime) {
+                            ret = match.getTime() - match.getTimezoneOffset() * 60000;
+
+                            // Timestamp
+                        } else if (isNumber(match)) {
+                            ret = match - (new Date(match)).getTimezoneOffset() * 60000;
+                        }
+                    }
+                }
+                return ret;
+            },
+
+            /**
+             * Reorganize rows into columns
+             */
+            rowsToColumns: function(rows) {
+                var row,
+                    rowsLength,
+                    col,
+                    colsLength,
+                    columns;
+
+                if (rows) {
+                    columns = [];
+                    rowsLength = rows.length;
+                    for (row = 0; row < rowsLength; row++) {
+                        colsLength = rows[row].length;
+                        for (col = 0; col < colsLength; col++) {
+                            if (!columns[col]) {
+                                columns[col] = [];
+                            }
+                            columns[col][row] = rows[row][col];
+                        }
+                    }
+                }
+                return columns;
+            },
+
+            /**
+             * A hook for working directly on the parsed columns
+             */
+            parsed: function() {
+                if (this.options.parsed) {
+                    return this.options.parsed.call(this, this.columns);
+                }
+            },
+
+            getFreeIndexes: function(numberOfColumns, seriesBuilders) {
+                var s,
+                    i,
+                    freeIndexes = [],
+                    freeIndexValues = [],
+                    referencedIndexes;
+
+                // Add all columns as free
+                for (i = 0; i < numberOfColumns; i = i + 1) {
+                    freeIndexes.push(true);
+                }
+
+                // Loop all defined builders and remove their referenced columns
+                for (s = 0; s < seriesBuilders.length; s = s + 1) {
+                    referencedIndexes = seriesBuilders[s].getReferencedColumnIndexes();
+
+                    for (i = 0; i < referencedIndexes.length; i = i + 1) {
+                        freeIndexes[referencedIndexes[i]] = false;
+                    }
+                }
+
+                // Collect the values for the free indexes
+                for (i = 0; i < freeIndexes.length; i = i + 1) {
+                    if (freeIndexes[i]) {
+                        freeIndexValues.push(i);
+                    }
+                }
+
+                return freeIndexValues;
+            },
+
+            /**
+             * If a complete callback function is provided in the options, interpret the 
+             * columns into a Highcharts options object.
+             */
+            complete: function() {
+
+                var columns = this.columns,
+                    xColumns = [],
+                    type,
+                    options = this.options,
+                    series,
+                    data,
+                    i,
+                    j,
+                    r,
+                    seriesIndex,
+                    chartOptions,
+                    allSeriesBuilders = [],
+                    builder,
+                    freeIndexes,
+                    typeCol,
+                    index;
+
+                xColumns.length = columns.length;
+                if (options.complete || options.afterComplete) {
+
+                    // Get the names and shift the top row
+                    for (i = 0; i < columns.length; i++) {
+                        if (this.firstRowAsNames) {
+                            columns[i].name = columns[i].shift();
+                        }
+                    }
+
+                    // Use the next columns for series
+                    series = [];
+                    freeIndexes = this.getFreeIndexes(columns.length, this.valueCount.seriesBuilders);
+
+                    // Populate defined series
+                    for (seriesIndex = 0; seriesIndex < this.valueCount.seriesBuilders.length; seriesIndex++) {
+                        builder = this.valueCount.seriesBuilders[seriesIndex];
+
+                        // If the builder can be populated with remaining columns, then add it to allBuilders
+                        if (builder.populateColumns(freeIndexes)) {
+                            allSeriesBuilders.push(builder);
+                        }
+                    }
+
+                    // Populate dynamic series
+                    while (freeIndexes.length > 0) {
+                        builder = new SeriesBuilder();
+                        builder.addColumnReader(0, 'x');
+
+                        // Mark index as used (not free)
+                        index = inArray(0, freeIndexes);
+                        if (index !== -1) {
+                            freeIndexes.splice(index, 1);
+                        }
+
+                        for (i = 0; i < this.valueCount.global; i++) {
+                            // Create and add a column reader for the next free column index
+                            builder.addColumnReader(undefined, this.valueCount.globalPointArrayMap[i]);
+                        }
+
+                        // If the builder can be populated with remaining columns, then add it to allBuilders
+                        if (builder.populateColumns(freeIndexes)) {
+                            allSeriesBuilders.push(builder);
+                        }
+                    }
+
+                    // Get the data-type from the first series x column
+                    if (allSeriesBuilders.length > 0 && allSeriesBuilders[0].readers.length > 0) {
+                        typeCol = columns[allSeriesBuilders[0].readers[0].columnIndex];
+                        if (typeCol !== undefined) {
+                            if (typeCol.isDatetime) {
+                                type = 'datetime';
+                            } else if (!typeCol.isNumeric) {
+                                type = 'category';
+                            }
+                        }
+                    }
+                    // Axis type is category, then the "x" column should be called "name"
+                    if (type === 'category') {
+                        for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
+                            builder = allSeriesBuilders[seriesIndex];
+                            for (r = 0; r < builder.readers.length; r++) {
+                                if (builder.readers[r].configName === 'x') {
+                                    builder.readers[r].configName = 'name';
+                                }
+                            }
+                        }
+                    }
+
+                    // Read data for all builders
+                    for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
+                        builder = allSeriesBuilders[seriesIndex];
+
+                        // Iterate down the cells of each column and add data to the series
+                        data = [];
+                        for (j = 0; j < columns[0].length; j++) {
+                            data[j] = builder.read(columns, j);
+                        }
+
+                        // Add the series
+                        series[seriesIndex] = {
+                            data: data
+                        };
+                        if (builder.name) {
+                            series[seriesIndex].name = builder.name;
+                        }
+                        if (type === 'category') {
+                            series[seriesIndex].turboThreshold = 0;
+                        }
+                    }
+
+
+
+                    // Do the callback
+                    chartOptions = {
+                        series: series
+                    };
+                    if (type) {
+                        chartOptions.xAxis = {
+                            type: type
+                        };
+                        if (type === 'category') {
+                            chartOptions.xAxis.uniqueNames = false;
+                        }
+                    }
+
+                    if (options.complete) {
+                        options.complete(chartOptions);
+                    }
+
+                    // The afterComplete hook is used internally to avoid conflict with the externally
+                    // available complete option.
+                    if (options.afterComplete) {
+                        options.afterComplete(chartOptions);
+                    }
+                }
+            }
+        });
+
+        // Register the Data prototype and data function on Highcharts
+        Highcharts.Data = Data;
+        Highcharts.data = function(options, chartOptions) {
+            return new Data(options, chartOptions);
+        };
+
+        // Extend Chart.init so that the Chart constructor accepts a new configuration
+        // option group, data.
+        Highcharts.wrap(Highcharts.Chart.prototype, 'init', function(proceed, userOptions, callback) {
+            var chart = this;
+
+            if (userOptions && userOptions.data) {
+                Highcharts.data(Highcharts.extend(userOptions.data, {
+
+                    afterComplete: function(dataOptions) {
+                        var i, series;
+
+                        // Merge series configs
+                        if (userOptions.hasOwnProperty('series')) {
+                            if (typeof userOptions.series === 'object') {
+                                i = Math.max(userOptions.series.length, dataOptions.series.length);
+                                while (i--) {
+                                    series = userOptions.series[i] || {};
+                                    userOptions.series[i] = Highcharts.merge(series, dataOptions.series[i]);
+                                }
+                            } else { // Allow merging in dataOptions.series (#2856)
+                                delete userOptions.series;
+                            }
+                        }
+
+                        // Do the merge
+                        userOptions = Highcharts.merge(dataOptions, userOptions);
+
+                        proceed.call(chart, userOptions, callback);
+                    }
+                }), userOptions);
+            } else {
+                proceed.call(chart, userOptions, callback);
+            }
+        });
+
+        /**
+         * Creates a new SeriesBuilder. A SeriesBuilder consists of a number
+         * of ColumnReaders that reads columns and give them a name.
+         * Ex: A series builder can be constructed to read column 3 as 'x' and
+         * column 7 and 8 as 'y1' and 'y2'.
+         * The output would then be points/rows of the form {x: 11, y1: 22, y2: 33}
+         * 
+         * The name of the builder is taken from the second column. In the above
+         * example it would be the column with index 7.
+         * @constructor
+         */
+        SeriesBuilder = function() {
+            this.readers = [];
+            this.pointIsArray = true;
+        };
+
+        /**
+         * Populates readers with column indexes. A reader can be added without
+         * a specific index and for those readers the index is taken sequentially
+         * from the free columns (this is handled by the ColumnCursor instance).
+         * @returns {boolean}
+         */
+        SeriesBuilder.prototype.populateColumns = function(freeIndexes) {
+            var builder = this,
+                enoughColumns = true;
+
+            // Loop each reader and give it an index if its missing.
+            // The freeIndexes.shift() will return undefined if there
+            // are no more columns.
+            each(builder.readers, function(reader) {
+                if (reader.columnIndex === undefined) {
+                    reader.columnIndex = freeIndexes.shift();
+                }
+            });
+
+            // Now, all readers should have columns mapped. If not
+            // then return false to signal that this series should
+            // not be added.
+            each(builder.readers, function(reader) {
+                if (reader.columnIndex === undefined) {
+                    enoughColumns = false;
+                }
+            });
+
+            return enoughColumns;
+        };
+
+        /**
+         * Reads a row from the dataset and returns a point or array depending
+         * on the names of the readers.
+         * @param columns
+         * @param rowIndex
+         * @returns {Array | Object}
+         */
+        SeriesBuilder.prototype.read = function(columns, rowIndex) {
+            var builder = this,
+                pointIsArray = builder.pointIsArray,
+                point = pointIsArray ? [] : {},
+                columnIndexes;
+
+            // Loop each reader and ask it to read its value.
+            // Then, build an array or point based on the readers names.
+            each(builder.readers, function(reader) {
+                var value = columns[reader.columnIndex][rowIndex];
+                if (pointIsArray) {
+                    point.push(value);
+                } else {
+                    point[reader.configName] = value;
+                }
+            });
+
+            // The name comes from the first column (excluding the x column)
+            if (this.name === undefined && builder.readers.length >= 2) {
+                columnIndexes = builder.getReferencedColumnIndexes();
+                if (columnIndexes.length >= 2) {
+                    // remove the first one (x col)
+                    columnIndexes.shift();
+
+                    // Sort the remaining
+                    columnIndexes.sort();
+
+                    // Now use the lowest index as name column
+                    this.name = columns[columnIndexes.shift()].name;
+                }
+            }
+
+            return point;
+        };
+
+        /**
+         * Creates and adds ColumnReader from the given columnIndex and configName.
+         * ColumnIndex can be undefined and in that case the reader will be given
+         * an index when columns are populated.
+         * @param columnIndex {Number | undefined}
+         * @param configName
+         */
+        SeriesBuilder.prototype.addColumnReader = function(columnIndex, configName) {
+            this.readers.push({
+                columnIndex: columnIndex,
+                configName: configName
+            });
+
+            if (!(configName === 'x' || configName === 'y' || configName === undefined)) {
+                this.pointIsArray = false;
+            }
+        };
+
+        /**
+         * Returns an array of column indexes that the builder will use when
+         * reading data.
+         * @returns {Array}
+         */
+        SeriesBuilder.prototype.getReferencedColumnIndexes = function() {
+            var i,
+                referencedColumnIndexes = [],
+                columnReader;
+
+            for (i = 0; i < this.readers.length; i = i + 1) {
+                columnReader = this.readers[i];
+                if (columnReader.columnIndex !== undefined) {
+                    referencedColumnIndexes.push(columnReader.columnIndex);
+                }
+            }
+
+            return referencedColumnIndexes;
+        };
+
+        /**
+         * Returns true if the builder has a reader for the given configName.
+         * @param configName
+         * @returns {boolean}
+         */
+        SeriesBuilder.prototype.hasReader = function(configName) {
+            var i, columnReader;
+            for (i = 0; i < this.readers.length; i = i + 1) {
+                columnReader = this.readers[i];
+                if (columnReader.configName === configName) {
+                    return true;
+                }
+            }
+            // Else return undefined
+        };
+
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 25 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/drilldown.js


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

@@ -0,0 +1,756 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ * Highcharts Drilldown module
+ * 
+ * Author: 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) {
+        /**
+         * Highcharts Drilldown module
+         * 
+         * Author: Torstein Honsi
+         * License: www.highcharts.com/license
+         *
+         */
+
+        'use strict';
+
+        var noop = H.noop,
+            color = H.color,
+            defaultOptions = H.defaultOptions,
+            each = H.each,
+            extend = H.extend,
+            format = H.format,
+            pick = H.pick,
+            wrap = H.wrap,
+            Chart = H.Chart,
+            seriesTypes = H.seriesTypes,
+            PieSeries = seriesTypes.pie,
+            ColumnSeries = seriesTypes.column,
+            Tick = H.Tick,
+            fireEvent = H.fireEvent,
+            inArray = H.inArray,
+            ddSeriesId = 1;
+
+        // Utilities
+        /*
+         * Return an intermediate color between two colors, according to pos where 0
+         * is the from color and 1 is the to color. This method is copied from ColorAxis.js
+         * and should always be kept updated, until we get AMD support.
+         */
+        function tweenColors(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,
+                    tweenColors(color(this.start), color(this.end), this.pos),
+                    null,
+                    true
+                );
+            };
+        });
+
+        // Add language
+        extend(defaultOptions.lang, {
+            drillUpText: '◁ Back to {series.name}'
+        });
+        defaultOptions.drilldown = {
+
+            animation: {
+                duration: 500
+            },
+            drillUpButton: {
+                position: {
+                    align: 'right',
+                    x: -10,
+                    y: 10
+                }
+                // relativeTo: 'plotBox'
+                // theme
+            }
+        };
+
+        /**
+         * A general fadeIn method
+         */
+        H.SVGRenderer.prototype.Element.prototype.fadeIn = function(animation) {
+            this
+                .attr({
+                    opacity: 0.1,
+                    visibility: 'inherit'
+                })
+                .animate({
+                    opacity: pick(this.newOpacity, 1) // newOpacity used in maps
+                }, animation || {
+                    duration: 250
+                });
+        };
+
+        Chart.prototype.addSeriesAsDrilldown = function(point, ddOptions) {
+            this.addSingleSeriesAsDrilldown(point, ddOptions);
+            this.applyDrilldown();
+        };
+        Chart.prototype.addSingleSeriesAsDrilldown = function(point, ddOptions) {
+            var oldSeries = point.series,
+                xAxis = oldSeries.xAxis,
+                yAxis = oldSeries.yAxis,
+                newSeries,
+                pointIndex,
+                levelSeries = [],
+                levelSeriesOptions = [],
+                level,
+                levelNumber,
+                last,
+                colorProp;
+
+
+
+            colorProp = {
+                colorIndex: pick(point.colorIndex, oldSeries.colorIndex)
+            };
+
+
+            if (!this.drilldownLevels) {
+                this.drilldownLevels = [];
+            }
+
+            levelNumber = oldSeries.options._levelNumber || 0;
+
+            // See if we can reuse the registered series from last run
+            last = this.drilldownLevels[this.drilldownLevels.length - 1];
+            if (last && last.levelNumber !== levelNumber) {
+                last = undefined;
+            }
+
+            ddOptions = extend(extend({
+                _ddSeriesId: ddSeriesId++
+            }, colorProp), ddOptions);
+            pointIndex = inArray(point, oldSeries.points);
+
+            // Record options for all current series
+            each(oldSeries.chart.series, function(series) {
+                if (series.xAxis === xAxis && !series.isDrilling) {
+                    series.options._ddSeriesId = series.options._ddSeriesId || ddSeriesId++;
+                    series.options._colorIndex = series.userOptions._colorIndex;
+                    series.options._levelNumber = series.options._levelNumber || levelNumber; // #3182
+
+                    if (last) {
+                        levelSeries = last.levelSeries;
+                        levelSeriesOptions = last.levelSeriesOptions;
+                    } else {
+                        levelSeries.push(series);
+                        levelSeriesOptions.push(series.options);
+                    }
+                }
+            });
+
+            // Add a record of properties for each drilldown level
+            level = extend({
+                levelNumber: levelNumber,
+                seriesOptions: oldSeries.options,
+                levelSeriesOptions: levelSeriesOptions,
+                levelSeries: levelSeries,
+                shapeArgs: point.shapeArgs,
+                bBox: point.graphic ? point.graphic.getBBox() : {}, // no graphic in line series with markers disabled
+                color: point.isNull ? new H.Color(color).setOpacity(0).get() : color,
+                lowerSeriesOptions: ddOptions,
+                pointOptions: oldSeries.options.data[pointIndex],
+                pointIndex: pointIndex,
+                oldExtremes: {
+                    xMin: xAxis && xAxis.userMin,
+                    xMax: xAxis && xAxis.userMax,
+                    yMin: yAxis && yAxis.userMin,
+                    yMax: yAxis && yAxis.userMax
+                }
+            }, colorProp);
+
+            // Push it to the lookup array
+            this.drilldownLevels.push(level);
+
+            newSeries = level.lowerSeries = this.addSeries(ddOptions, false);
+            newSeries.options._levelNumber = levelNumber + 1;
+            if (xAxis) {
+                xAxis.oldPos = xAxis.pos;
+                xAxis.userMin = xAxis.userMax = null;
+                yAxis.userMin = yAxis.userMax = null;
+            }
+
+            // Run fancy cross-animation on supported and equal types
+            if (oldSeries.type === newSeries.type) {
+                newSeries.animate = newSeries.animateDrilldown || noop;
+                newSeries.options.animation = true;
+            }
+        };
+
+        Chart.prototype.applyDrilldown = function() {
+            var drilldownLevels = this.drilldownLevels,
+                levelToRemove;
+
+            if (drilldownLevels && drilldownLevels.length > 0) { // #3352, async loading
+                levelToRemove = drilldownLevels[drilldownLevels.length - 1].levelNumber;
+                each(this.drilldownLevels, function(level) {
+                    if (level.levelNumber === levelToRemove) {
+                        each(level.levelSeries, function(series) {
+                            if (series.options && series.options._levelNumber === levelToRemove) { // Not removed, not added as part of a multi-series drilldown
+                                series.remove(false);
+                            }
+                        });
+                    }
+                });
+            }
+
+            this.redraw();
+            this.showDrillUpButton();
+        };
+
+        Chart.prototype.getDrilldownBackText = function() {
+            var drilldownLevels = this.drilldownLevels,
+                lastLevel;
+            if (drilldownLevels && drilldownLevels.length > 0) { // #3352, async loading
+                lastLevel = drilldownLevels[drilldownLevels.length - 1];
+                lastLevel.series = lastLevel.seriesOptions;
+                return format(this.options.lang.drillUpText, lastLevel);
+            }
+
+        };
+
+        Chart.prototype.showDrillUpButton = function() {
+            var chart = this,
+                backText = this.getDrilldownBackText(),
+                buttonOptions = chart.options.drilldown.drillUpButton,
+                attr,
+                states;
+
+
+            if (!this.drillUpButton) {
+                attr = buttonOptions.theme;
+                states = attr && attr.states;
+
+                this.drillUpButton = this.renderer.button(
+                        backText,
+                        null,
+                        null,
+                        function() {
+                            chart.drillUp();
+                        },
+                        attr,
+                        states && states.hover,
+                        states && states.select
+                    )
+                    .addClass('highcharts-drillup-button')
+                    .attr({
+                        align: buttonOptions.position.align,
+                        zIndex: 7
+                    })
+                    .add()
+                    .align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox');
+            } else {
+                this.drillUpButton.attr({
+                        text: backText
+                    })
+                    .align();
+            }
+        };
+
+        Chart.prototype.drillUp = function() {
+            var chart = this,
+                drilldownLevels = chart.drilldownLevels,
+                levelNumber = drilldownLevels[drilldownLevels.length - 1].levelNumber,
+                i = drilldownLevels.length,
+                chartSeries = chart.series,
+                seriesI,
+                level,
+                oldSeries,
+                newSeries,
+                oldExtremes,
+                addSeries = function(seriesOptions) {
+                    var addedSeries;
+                    each(chartSeries, function(series) {
+                        if (series.options._ddSeriesId === seriesOptions._ddSeriesId) {
+                            addedSeries = series;
+                        }
+                    });
+
+                    addedSeries = addedSeries || chart.addSeries(seriesOptions, false);
+                    if (addedSeries.type === oldSeries.type && addedSeries.animateDrillupTo) {
+                        addedSeries.animate = addedSeries.animateDrillupTo;
+                    }
+                    if (seriesOptions === level.seriesOptions) {
+                        newSeries = addedSeries;
+                    }
+                };
+
+            while (i--) {
+
+                level = drilldownLevels[i];
+                if (level.levelNumber === levelNumber) {
+                    drilldownLevels.pop();
+
+                    // Get the lower series by reference or id
+                    oldSeries = level.lowerSeries;
+                    if (!oldSeries.chart) { // #2786
+                        seriesI = chartSeries.length; // #2919
+                        while (seriesI--) {
+                            if (chartSeries[seriesI].options.id === level.lowerSeriesOptions.id &&
+                                chartSeries[seriesI].options._levelNumber === levelNumber + 1) { // #3867
+                                oldSeries = chartSeries[seriesI];
+                                break;
+                            }
+                        }
+                    }
+                    oldSeries.xData = []; // Overcome problems with minRange (#2898)
+
+                    each(level.levelSeriesOptions, addSeries);
+
+                    fireEvent(chart, 'drillup', {
+                        seriesOptions: level.seriesOptions
+                    });
+
+                    if (newSeries.type === oldSeries.type) {
+                        newSeries.drilldownLevel = level;
+                        newSeries.options.animation = chart.options.drilldown.animation;
+
+                        if (oldSeries.animateDrillupFrom && oldSeries.chart) { // #2919
+                            oldSeries.animateDrillupFrom(level);
+                        }
+                    }
+                    newSeries.options._levelNumber = levelNumber;
+
+                    oldSeries.remove(false);
+
+                    // Reset the zoom level of the upper series
+                    if (newSeries.xAxis) {
+                        oldExtremes = level.oldExtremes;
+                        newSeries.xAxis.setExtremes(oldExtremes.xMin, oldExtremes.xMax, false);
+                        newSeries.yAxis.setExtremes(oldExtremes.yMin, oldExtremes.yMax, false);
+                    }
+                }
+            }
+
+            // Fire a once-off event after all series have been drilled up (#5158)
+            fireEvent(chart, 'drillupall');
+
+            this.redraw();
+
+            if (this.drilldownLevels.length === 0) {
+                this.drillUpButton = this.drillUpButton.destroy();
+            } else {
+                this.drillUpButton.attr({
+                        text: this.getDrilldownBackText()
+                    })
+                    .align();
+            }
+
+            this.ddDupes.length = []; // #3315
+        };
+
+
+        ColumnSeries.prototype.supportsDrilldown = true;
+
+        /**
+         * When drilling up, keep the upper series invisible until the lower series has
+         * moved into place
+         */
+        ColumnSeries.prototype.animateDrillupTo = function(init) {
+            if (!init) {
+                var newSeries = this,
+                    level = newSeries.drilldownLevel;
+
+                each(this.points, function(point) {
+                    if (point.graphic) { // #3407
+                        point.graphic.hide();
+                    }
+                    if (point.dataLabel) {
+                        point.dataLabel.hide();
+                    }
+                    if (point.connector) {
+                        point.connector.hide();
+                    }
+                });
+
+
+                // Do dummy animation on first point to get to complete
+                setTimeout(function() {
+                    if (newSeries.points) { // May be destroyed in the meantime, #3389
+                        each(newSeries.points, function(point, i) {
+                            // Fade in other points			  
+                            var verb = i === (level && level.pointIndex) ? 'show' : 'fadeIn',
+                                inherit = verb === 'show' ? true : undefined;
+                            if (point.graphic) { // #3407
+                                point.graphic[verb](inherit);
+                            }
+                            if (point.dataLabel) {
+                                point.dataLabel[verb](inherit);
+                            }
+                            if (point.connector) {
+                                point.connector[verb](inherit);
+                            }
+                        });
+                    }
+                }, Math.max(this.chart.options.drilldown.animation.duration - 50, 0));
+
+                // Reset
+                this.animate = noop;
+            }
+
+        };
+
+        ColumnSeries.prototype.animateDrilldown = function(init) {
+            var series = this,
+                drilldownLevels = this.chart.drilldownLevels,
+                animateFrom,
+                animationOptions = this.chart.options.drilldown.animation,
+                xAxis = this.xAxis;
+
+            if (!init) {
+                each(drilldownLevels, function(level) {
+                    if (series.options._ddSeriesId === level.lowerSeriesOptions._ddSeriesId) {
+                        animateFrom = level.shapeArgs;
+
+                    }
+                });
+
+                animateFrom.x += (pick(xAxis.oldPos, xAxis.pos) - xAxis.pos);
+
+                each(this.points, function(point) {
+                    var animateTo = point.shapeArgs;
+
+
+
+                    if (point.graphic) {
+                        point.graphic
+                            .attr(animateFrom)
+                            .animate(
+                                extend(point.shapeArgs, {
+                                    fill: point.color || series.color
+                                }),
+                                animationOptions
+                            );
+                    }
+                    if (point.dataLabel) {
+                        point.dataLabel.fadeIn(animationOptions);
+                    }
+                });
+                this.animate = null;
+            }
+
+        };
+
+        /**
+         * When drilling up, pull out the individual point graphics from the lower series
+         * and animate them into the origin point in the upper series.
+         */
+        ColumnSeries.prototype.animateDrillupFrom = function(level) {
+            var animationOptions = this.chart.options.drilldown.animation,
+                group = this.group,
+                series = this;
+
+            // Cancel mouse events on the series group (#2787)
+            each(series.trackerGroups, function(key) {
+                if (series[key]) { // we don't always have dataLabelsGroup
+                    series[key].on('mouseover');
+                }
+            });
+
+
+            delete this.group;
+            each(this.points, function(point) {
+                var graphic = point.graphic,
+                    animateTo = level.shapeArgs,
+                    complete = function() {
+                        graphic.destroy();
+                        if (group) {
+                            group = group.destroy();
+                        }
+                    };
+
+                if (graphic) {
+
+                    delete point.graphic;
+
+
+
+                    if (animationOptions) {
+                        graphic.animate(
+                            animateTo,
+                            H.merge(animationOptions, {
+                                complete: complete
+                            })
+                        );
+                    } else {
+                        graphic.attr(animateTo);
+                        complete();
+                    }
+                }
+            });
+        };
+
+        if (PieSeries) {
+            extend(PieSeries.prototype, {
+                supportsDrilldown: true,
+                animateDrillupTo: ColumnSeries.prototype.animateDrillupTo,
+                animateDrillupFrom: ColumnSeries.prototype.animateDrillupFrom,
+
+                animateDrilldown: function(init) {
+                    var level = this.chart.drilldownLevels[this.chart.drilldownLevels.length - 1],
+                        animationOptions = this.chart.options.drilldown.animation,
+                        animateFrom = level.shapeArgs,
+                        start = animateFrom.start,
+                        angle = animateFrom.end - start,
+                        startAngle = angle / this.points.length;
+
+                    if (!init) {
+                        each(this.points, function(point, i) {
+                            var animateTo = point.shapeArgs;
+
+
+
+                            if (point.graphic) {
+                                point.graphic
+                                    .attr(H.merge(animateFrom, {
+                                        start: start + i * startAngle,
+                                        end: start + (i + 1) * startAngle
+                                    }))[animationOptions ? 'animate' : 'attr'](
+                                        animateTo,
+                                        animationOptions
+                                    );
+                            }
+                        });
+                        this.animate = null;
+                    }
+                }
+            });
+        }
+
+        H.Point.prototype.doDrilldown = function(_holdRedraw, category, originalEvent) {
+            var series = this.series,
+                chart = series.chart,
+                drilldown = chart.options.drilldown,
+                i = (drilldown.series || []).length,
+                seriesOptions;
+
+            if (!chart.ddDupes) {
+                chart.ddDupes = [];
+            }
+
+            while (i-- && !seriesOptions) {
+                if (drilldown.series[i].id === this.drilldown && inArray(this.drilldown, chart.ddDupes) === -1) {
+                    seriesOptions = drilldown.series[i];
+                    chart.ddDupes.push(this.drilldown);
+                }
+            }
+
+            // Fire the event. If seriesOptions is undefined, the implementer can check for 
+            // seriesOptions, and call addSeriesAsDrilldown async if necessary.
+            fireEvent(chart, 'drilldown', {
+                point: this,
+                seriesOptions: seriesOptions,
+                category: category,
+                originalEvent: originalEvent,
+                points: category !== undefined && this.series.xAxis.getDDPoints(category).slice(0)
+            }, function(e) {
+                var chart = e.point.series && e.point.series.chart,
+                    seriesOptions = e.seriesOptions;
+                if (chart && seriesOptions) {
+                    if (_holdRedraw) {
+                        chart.addSingleSeriesAsDrilldown(e.point, seriesOptions);
+                    } else {
+                        chart.addSeriesAsDrilldown(e.point, seriesOptions);
+                    }
+                }
+            });
+
+
+        };
+
+        /**
+         * Drill down to a given category. This is the same as clicking on an axis label.
+         */
+        H.Axis.prototype.drilldownCategory = function(x, e) {
+            var key,
+                point,
+                ddPointsX = this.getDDPoints(x);
+            for (key in ddPointsX) {
+                point = ddPointsX[key];
+                if (point && point.series && point.series.visible && point.doDrilldown) { // #3197
+                    point.doDrilldown(true, x, e);
+                }
+            }
+            this.chart.applyDrilldown();
+        };
+
+        /**
+         * Return drillable points for this specific X value
+         */
+        H.Axis.prototype.getDDPoints = function(x) {
+            var ret = [];
+            each(this.series, function(series) {
+                var i,
+                    xData = series.xData,
+                    points = series.points;
+
+                for (i = 0; i < xData.length; i++) {
+                    if (xData[i] === x && series.options.data[i] && series.options.data[i].drilldown) {
+                        ret.push(points ? points[i] : true);
+                        break;
+                    }
+                }
+            });
+            return ret;
+        };
+
+
+        /**
+         * Make a tick label drillable, or remove drilling on update
+         */
+        Tick.prototype.drillable = function() {
+            var pos = this.pos,
+                label = this.label,
+                axis = this.axis,
+                isDrillable = axis.coll === 'xAxis' && axis.getDDPoints,
+                ddPointsX = isDrillable && axis.getDDPoints(pos);
+
+            if (isDrillable) {
+                if (label && ddPointsX.length) {
+                    label.drillable = true;
+
+
+
+                    label
+                        .addClass('highcharts-drilldown-axis-label')
+
+                    .on('click', function(e) {
+                        axis.drilldownCategory(pos, e);
+                    });
+
+                } else if (label && label.drillable) {
+
+
+
+                    label.on('click', null); // #3806			
+                    label.removeClass('highcharts-drilldown-axis-label');
+                }
+            }
+        };
+
+        /**
+         * Always keep the drillability updated (#3951)
+         */
+        wrap(Tick.prototype, 'addLabel', function(proceed) {
+            proceed.call(this);
+            this.drillable();
+        });
+
+
+        /**
+         * On initialization of each point, identify its label and make it clickable. Also, provide a
+         * list of points associated to that label.
+         */
+        wrap(H.Point.prototype, 'init', function(proceed, series, options, x) {
+            var point = proceed.call(this, series, options, x),
+                xAxis = series.xAxis,
+                tick = xAxis && xAxis.ticks[x];
+
+            if (point.drilldown) {
+
+                // Add the click event to the point 
+                H.addEvent(point, 'click', function(e) {
+                    if (series.xAxis && series.chart.options.drilldown.allowPointDrilldown === false) {
+                        series.xAxis.drilldownCategory(point.x, e); // #5822, x changed
+                    } else {
+                        point.doDrilldown(undefined, undefined, e);
+                    }
+                });
+                /*wrap(point, 'importEvents', function (proceed) { // wrapping importEvents makes point.click event work
+                	if (!this.hasImportedEvents) {
+                		proceed.call(this);
+                		H.addEvent(this, 'click', function () {
+                			this.doDrilldown();
+                		});
+                	}
+                });*/
+
+            }
+
+            // Add or remove click handler and style on the tick label
+            if (tick) {
+                tick.drillable();
+            }
+
+            return point;
+        });
+
+        wrap(H.Series.prototype, 'drawDataLabels', function(proceed) {
+            var css = this.chart.options.drilldown.activeDataLabelStyle,
+                renderer = this.chart.renderer;
+
+            proceed.call(this);
+
+            each(this.points, function(point) {
+                var pointCSS = {};
+                if (point.drilldown && point.dataLabel) {
+                    if (css.color === 'contrast') {
+                        pointCSS.color = renderer.getContrast(point.color || this.color);
+                    }
+                    point.dataLabel
+                        .addClass('highcharts-drilldown-data-label');
+
+
+                }
+            }, this);
+        });
+
+        // Mark the trackers with a pointer 
+        var type,
+            drawTrackerWrapper = function(proceed) {
+                proceed.call(this);
+                each(this.points, function(point) {
+                    if (point.drilldown && point.graphic) {
+                        point.graphic.addClass('highcharts-drilldown-point');
+
+
+                    }
+                });
+            };
+        for (type in seriesTypes) {
+            if (seriesTypes[type].prototype.supportsDrilldown) {
+                wrap(seriesTypes[type].prototype, 'drawTracker', drawTrackerWrapper);
+            }
+        }
+
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 26 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/exporting.js


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

@@ -0,0 +1,953 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ * Exporting 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) {
+        /**
+         * Exporting module
+         *
+         * (c) 2010-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         */
+
+        /* eslint indent:0 */
+        'use strict';
+
+        // create shortcuts
+        var defaultOptions = H.defaultOptions,
+            doc = H.doc,
+            Chart = H.Chart,
+            addEvent = H.addEvent,
+            removeEvent = H.removeEvent,
+            fireEvent = H.fireEvent,
+            createElement = H.createElement,
+            discardElement = H.discardElement,
+            css = H.css,
+            merge = H.merge,
+            pick = H.pick,
+            each = H.each,
+            extend = H.extend,
+            isTouchDevice = H.isTouchDevice,
+            win = H.win,
+            SVGRenderer = H.SVGRenderer;
+
+        var symbols = H.Renderer.prototype.symbols;
+
+        // Add language
+        extend(defaultOptions.lang, {
+            printChart: 'Print chart',
+            downloadPNG: 'Download PNG image',
+            downloadJPEG: 'Download JPEG image',
+            downloadPDF: 'Download PDF document',
+            downloadSVG: 'Download SVG vector image',
+            contextButtonTitle: 'Chart context menu'
+        });
+
+        // Buttons and menus are collected in a separate config option set called 'navigation'.
+        // This can be extended later to add control buttons like zoom and pan right click menus.
+        defaultOptions.navigation = {
+            buttonOptions: {
+                theme: {},
+                symbolSize: 14,
+                symbolX: 12.5,
+                symbolY: 10.5,
+                align: 'right',
+                buttonSpacing: 3,
+                height: 22,
+                // text: null,
+                verticalAlign: 'top',
+                width: 24
+            }
+        };
+
+
+
+
+        // Add the export related options
+        defaultOptions.exporting = {
+            //enabled: true,
+            //filename: 'chart',
+            type: 'image/png',
+            url: 'https://export.highcharts.com/',
+            //width: undefined,
+            printMaxWidth: 780,
+            scale: 2,
+            buttons: {
+                contextButton: {
+                    className: 'highcharts-contextbutton',
+                    menuClassName: 'highcharts-contextmenu',
+                    //x: -10,
+                    symbol: 'menu',
+                    _titleKey: 'contextButtonTitle',
+                    menuItems: [{
+                            textKey: 'printChart',
+                            onclick: function() {
+                                this.print();
+                            }
+                        }, {
+                            separator: true
+                        }, {
+                            textKey: 'downloadPNG',
+                            onclick: function() {
+                                this.exportChart();
+                            }
+                        }, {
+                            textKey: 'downloadJPEG',
+                            onclick: function() {
+                                this.exportChart({
+                                    type: 'image/jpeg'
+                                });
+                            }
+                        }, {
+                            textKey: 'downloadPDF',
+                            onclick: function() {
+                                this.exportChart({
+                                    type: 'application/pdf'
+                                });
+                            }
+                        }, {
+                            textKey: 'downloadSVG',
+                            onclick: function() {
+                                this.exportChart({
+                                    type: 'image/svg+xml'
+                                });
+                            }
+                        }
+                        // Enable this block to add "View SVG" to the dropdown menu
+                        /*
+                        ,{
+
+                        	text: 'View SVG',
+                        	onclick: function () {
+                        		var svg = this.getSVG()
+                        			.replace(/</g, '\n&lt;')
+                        			.replace(/>/g, '&gt;');
+
+                        		doc.body.innerHTML = '<pre>' + svg + '</pre>';
+                        	}
+                        } // */
+                    ]
+                }
+            }
+        };
+
+        // Add the H.post utility
+        H.post = function(url, data, formAttributes) {
+            var name,
+                form;
+
+            // create the form
+            form = createElement('form', merge({
+                method: 'post',
+                action: url,
+                enctype: 'multipart/form-data'
+            }, formAttributes), {
+                display: 'none'
+            }, doc.body);
+
+            // add the data
+            for (name in data) {
+                createElement('input', {
+                    type: 'hidden',
+                    name: name,
+                    value: data[name]
+                }, null, form);
+            }
+
+            // submit
+            form.submit();
+
+            // clean up
+            discardElement(form);
+        };
+
+        extend(Chart.prototype, {
+
+            /**
+             * A collection of fixes on the produced SVG to account for expando properties,
+             * browser bugs, VML problems and other. Returns a cleaned SVG.
+             */
+            sanitizeSVG: function(svg, options) {
+                // Move HTML into a foreignObject
+                if (options && options.exporting && options.exporting.allowHTML) {
+                    var html = svg.match(/<\/svg>(.*?$)/);
+                    if (html) {
+                        html = '<foreignObject x="0" y="0" ' +
+                            'width="' + options.chart.width + '" ' +
+                            'height="' + options.chart.height + '">' +
+                            '<body xmlns="http://www.w3.org/1999/xhtml">' +
+                            html[1] +
+                            '</body>' +
+                            '</foreignObject>';
+                        svg = svg.replace('</svg>', html + '</svg>');
+                    }
+                }
+
+                svg = svg
+                    .replace(/zIndex="[^"]+"/g, '')
+                    .replace(/isShadow="[^"]+"/g, '')
+                    .replace(/symbolName="[^"]+"/g, '')
+                    .replace(/jQuery[0-9]+="[^"]+"/g, '')
+                    .replace(/url\(("|&quot;)(\S+)("|&quot;)\)/g, 'url($2)')
+                    .replace(/url\([^#]+#/g, 'url(#')
+                    .replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
+                    .replace(/ (NS[0-9]+\:)?href=/g, ' xlink:href=') // #3567
+                    .replace(/\n/, ' ')
+                    // Any HTML added to the container after the SVG (#894)
+                    .replace(/<\/svg>.*?$/, '</svg>')
+                    // Batik doesn't support rgba fills and strokes (#3095)
+                    .replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"')
+                    /* This fails in IE < 8
+                    .replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
+                    	return s2 +'.'+ s3[0];
+                    })*/
+
+                // Replace HTML entities, issue #347
+                .replace(/&nbsp;/g, '\u00A0') // no-break space
+                    .replace(/&shy;/g, '\u00AD'); // soft hyphen
+
+
+
+                return svg;
+            },
+
+            /**
+             * Return innerHTML of chart. Used as hook for plugins.
+             */
+            getChartHTML: function() {
+
+                this.inlineStyles();
+
+                return this.container.innerHTML;
+            },
+
+            /**
+             * Return an SVG representation of the chart.
+             *
+             * @param additionalOptions {Object} Additional chart options for the
+             *    generated SVG representation. For collections like `xAxis`, `yAxis` or
+             *    `series`, the additional options is either merged in to the orininal
+             *    item of the same `id`, or to the first item if a commin id is not
+             *    found.
+             */
+            getSVG: function(additionalOptions) {
+                var chart = this,
+                    chartCopy,
+                    sandbox,
+                    svg,
+                    seriesOptions,
+                    sourceWidth,
+                    sourceHeight,
+                    cssWidth,
+                    cssHeight,
+                    options = merge(chart.options, additionalOptions); // copy the options and add extra options
+
+
+                // IE compatibility hack for generating SVG content that it doesn't really understand
+                if (!doc.createElementNS) {
+                    doc.createElementNS = function(ns, tagName) {
+                        return doc.createElement(tagName);
+                    };
+                }
+
+                // create a sandbox where a new chart will be generated
+                sandbox = createElement('div', null, {
+                    position: 'absolute',
+                    top: '-9999em',
+                    width: chart.chartWidth + 'px',
+                    height: chart.chartHeight + 'px'
+                }, doc.body);
+
+                // get the source size
+                cssWidth = chart.renderTo.style.width;
+                cssHeight = chart.renderTo.style.height;
+                sourceWidth = options.exporting.sourceWidth ||
+                    options.chart.width ||
+                    (/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
+                    600;
+                sourceHeight = options.exporting.sourceHeight ||
+                    options.chart.height ||
+                    (/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
+                    400;
+
+                // override some options
+                extend(options.chart, {
+                    animation: false,
+                    renderTo: sandbox,
+                    forExport: true,
+                    renderer: 'SVGRenderer',
+                    width: sourceWidth,
+                    height: sourceHeight
+                });
+                options.exporting.enabled = false; // hide buttons in print
+                delete options.data; // #3004
+
+                // prepare for replicating the chart
+                options.series = [];
+                each(chart.series, function(serie) {
+                    seriesOptions = merge(serie.userOptions, { // #4912
+                        animation: false, // turn off animation
+                        enableMouseTracking: false,
+                        showCheckbox: false,
+                        visible: serie.visible
+                    });
+
+                    if (!seriesOptions.isInternal) { // used for the navigator series that has its own option set
+                        options.series.push(seriesOptions);
+                    }
+                });
+
+                // Assign an internal key to ensure a one-to-one mapping (#5924)
+                each(chart.axes, function(axis) {
+                    axis.userOptions.internalKey = H.uniqueKey();
+                });
+
+                // generate the chart copy
+                chartCopy = new H.Chart(options, chart.callback);
+
+                // Axis options and series options  (#2022, #3900, #5982)
+                if (additionalOptions) {
+                    each(['xAxis', 'yAxis', 'series'], function(coll) {
+                        var collOptions = {};
+                        if (additionalOptions[coll]) {
+                            collOptions[coll] = additionalOptions[coll];
+                            chartCopy.update(collOptions);
+                        }
+                    });
+                }
+
+                // Reflect axis extremes in the export (#5924)
+                each(chart.axes, function(axis) {
+                    var axisCopy = H.find(chartCopy.axes, function(copy) {
+                            return copy.options.internalKey ===
+                                axis.userOptions.internalKey;
+                        }),
+                        extremes = axis.getExtremes(),
+                        userMin = extremes.userMin,
+                        userMax = extremes.userMax;
+
+                    if (axisCopy && (userMin !== undefined || userMax !== undefined)) {
+                        axisCopy.setExtremes(userMin, userMax, true, false);
+                    }
+                });
+
+                // Get the SVG from the container's innerHTML
+                svg = chartCopy.getChartHTML();
+
+                svg = chart.sanitizeSVG(svg, options);
+
+                // free up memory
+                options = null;
+                chartCopy.destroy();
+                discardElement(sandbox);
+
+                return svg;
+            },
+
+            getSVGForExport: function(options, chartOptions) {
+                var chartExportingOptions = this.options.exporting;
+
+                return this.getSVG(merge({
+                        chart: {
+                            borderRadius: 0
+                        }
+                    },
+                    chartExportingOptions.chartOptions,
+                    chartOptions, {
+                        exporting: {
+                            sourceWidth: (options && options.sourceWidth) || chartExportingOptions.sourceWidth,
+                            sourceHeight: (options && options.sourceHeight) || chartExportingOptions.sourceHeight
+                        }
+                    }
+                ));
+            },
+
+            /**
+             * Submit the SVG representation of the chart to the server
+             * @param {Object} options Exporting options. Possible members are url, type, width and formAttributes.
+             * @param {Object} chartOptions Additional chart options for the SVG representation of the chart
+             */
+            exportChart: function(options, chartOptions) {
+
+                var svg = this.getSVGForExport(options, chartOptions);
+
+                // merge the options
+                options = merge(this.options.exporting, options);
+
+                // do the post
+                H.post(options.url, {
+                    filename: options.filename || 'chart',
+                    type: options.type,
+                    width: options.width || 0, // IE8 fails to post undefined correctly, so use 0
+                    scale: options.scale,
+                    svg: svg
+                }, options.formAttributes);
+
+            },
+
+            /**
+             * Print the chart
+             */
+            print: function() {
+
+                var chart = this,
+                    container = chart.container,
+                    origDisplay = [],
+                    origParent = container.parentNode,
+                    body = doc.body,
+                    childNodes = body.childNodes,
+                    printMaxWidth = chart.options.exporting.printMaxWidth,
+                    resetParams,
+                    handleMaxWidth;
+
+                if (chart.isPrinting) { // block the button while in printing mode
+                    return;
+                }
+
+                chart.isPrinting = true;
+                chart.pointer.reset(null, 0);
+
+                fireEvent(chart, 'beforePrint');
+
+                // Handle printMaxWidth
+                handleMaxWidth = printMaxWidth && chart.chartWidth > printMaxWidth;
+                if (handleMaxWidth) {
+                    resetParams = [chart.options.chart.width, undefined, false];
+                    chart.setSize(printMaxWidth, undefined, false);
+                }
+
+                // hide all body content
+                each(childNodes, function(node, i) {
+                    if (node.nodeType === 1) {
+                        origDisplay[i] = node.style.display;
+                        node.style.display = 'none';
+                    }
+                });
+
+                // pull out the chart
+                body.appendChild(container);
+
+                // print
+                win.focus(); // #1510
+                win.print();
+
+                // allow the browser to prepare before reverting
+                setTimeout(function() {
+
+                    // put the chart back in
+                    origParent.appendChild(container);
+
+                    // restore all body content
+                    each(childNodes, function(node, i) {
+                        if (node.nodeType === 1) {
+                            node.style.display = origDisplay[i];
+                        }
+                    });
+
+                    chart.isPrinting = false;
+
+                    // Reset printMaxWidth
+                    if (handleMaxWidth) {
+                        chart.setSize.apply(chart, resetParams);
+                    }
+
+                    fireEvent(chart, 'afterPrint');
+
+                }, 1000);
+
+            },
+
+            /**
+             * Display a popup menu for choosing the export type
+             *
+             * @param {String} className An identifier for the menu
+             * @param {Array} items A collection with text and onclicks for the items
+             * @param {Number} x The x position of the opener button
+             * @param {Number} y The y position of the opener button
+             * @param {Number} width The width of the opener button
+             * @param {Number} height The height of the opener button
+             */
+            contextMenu: function(className, items, x, y, width, height, button) {
+                var chart = this,
+                    navOptions = chart.options.navigation,
+                    chartWidth = chart.chartWidth,
+                    chartHeight = chart.chartHeight,
+                    cacheName = 'cache-' + className,
+                    menu = chart[cacheName],
+                    menuPadding = Math.max(width, height), // for mouse leave detection
+                    innerMenu,
+                    hide,
+                    menuStyle,
+                    removeMouseUp;
+
+                // create the menu only the first time
+                if (!menu) {
+
+                    // create a HTML element above the SVG
+                    chart[cacheName] = menu = createElement('div', {
+                        className: className
+                    }, {
+                        position: 'absolute',
+                        zIndex: 1000,
+                        padding: menuPadding + 'px'
+                    }, chart.container);
+
+                    innerMenu = createElement('div', {
+                        className: 'highcharts-menu'
+                    }, null, menu);
+
+
+
+                    // hide on mouse out
+                    hide = function() {
+                        css(menu, {
+                            display: 'none'
+                        });
+                        if (button) {
+                            button.setState(0);
+                        }
+                        chart.openMenu = false;
+                    };
+
+                    // Hide the menu some time after mouse leave (#1357)
+                    addEvent(menu, 'mouseleave', function() {
+                        menu.hideTimer = setTimeout(hide, 500);
+                    });
+                    addEvent(menu, 'mouseenter', function() {
+                        clearTimeout(menu.hideTimer);
+                    });
+
+
+                    // Hide it on clicking or touching outside the menu (#2258, #2335,
+                    // #2407)
+                    removeMouseUp = addEvent(doc, 'mouseup', function(e) {
+                        if (!chart.pointer.inClass(e.target, className)) {
+                            hide();
+                        }
+                    });
+                    addEvent(chart, 'destroy', removeMouseUp);
+
+
+                    // create the items
+                    each(items, function(item) {
+                        if (item) {
+                            var element;
+
+                            if (item.separator) {
+                                element = createElement('hr', null, null, innerMenu);
+
+                            } else {
+                                element = createElement('div', {
+                                    className: 'highcharts-menu-item',
+                                    onclick: function(e) {
+                                        if (e) { // IE7
+                                            e.stopPropagation();
+                                        }
+                                        hide();
+                                        if (item.onclick) {
+                                            item.onclick.apply(chart, arguments);
+                                        }
+                                    },
+                                    innerHTML: item.text || chart.options.lang[item.textKey]
+                                }, null, innerMenu);
+
+
+                            }
+
+                            // Keep references to menu divs to be able to destroy them
+                            chart.exportDivElements.push(element);
+                        }
+                    });
+
+                    // Keep references to menu and innerMenu div to be able to destroy them
+                    chart.exportDivElements.push(innerMenu, menu);
+
+                    chart.exportMenuWidth = menu.offsetWidth;
+                    chart.exportMenuHeight = menu.offsetHeight;
+                }
+
+                menuStyle = {
+                    display: 'block'
+                };
+
+                // if outside right, right align it
+                if (x + chart.exportMenuWidth > chartWidth) {
+                    menuStyle.right = (chartWidth - x - width - menuPadding) + 'px';
+                } else {
+                    menuStyle.left = (x - menuPadding) + 'px';
+                }
+                // if outside bottom, bottom align it
+                if (y + height + chart.exportMenuHeight > chartHeight && button.alignOptions.verticalAlign !== 'top') {
+                    menuStyle.bottom = (chartHeight - y - menuPadding) + 'px';
+                } else {
+                    menuStyle.top = (y + height - menuPadding) + 'px';
+                }
+
+                css(menu, menuStyle);
+                chart.openMenu = true;
+            },
+
+            /**
+             * Add the export button to the chart
+             */
+            addButton: function(options) {
+                var chart = this,
+                    renderer = chart.renderer,
+                    btnOptions = merge(chart.options.navigation.buttonOptions, options),
+                    onclick = btnOptions.onclick,
+                    menuItems = btnOptions.menuItems,
+                    symbol,
+                    button,
+                    symbolSize = btnOptions.symbolSize || 12;
+                if (!chart.btnCount) {
+                    chart.btnCount = 0;
+                }
+
+                // Keeps references to the button elements
+                if (!chart.exportDivElements) {
+                    chart.exportDivElements = [];
+                    chart.exportSVGElements = [];
+                }
+
+                if (btnOptions.enabled === false) {
+                    return;
+                }
+
+
+                var attr = btnOptions.theme,
+                    states = attr.states,
+                    hover = states && states.hover,
+                    select = states && states.select,
+                    callback;
+
+                delete attr.states;
+
+                if (onclick) {
+                    callback = function(e) {
+                        e.stopPropagation();
+                        onclick.call(chart, e);
+                    };
+
+                } else if (menuItems) {
+                    callback = function() {
+                        chart.contextMenu(
+                            button.menuClassName,
+                            menuItems,
+                            button.translateX,
+                            button.translateY,
+                            button.width,
+                            button.height,
+                            button
+                        );
+                        button.setState(2);
+                    };
+                }
+
+
+                if (btnOptions.text && btnOptions.symbol) {
+                    attr.paddingLeft = pick(attr.paddingLeft, 25);
+
+                } else if (!btnOptions.text) {
+                    extend(attr, {
+                        width: btnOptions.width,
+                        height: btnOptions.height,
+                        padding: 0
+                    });
+                }
+
+                button = renderer.button(btnOptions.text, 0, 0, callback, attr, hover, select)
+                    .addClass(options.className)
+                    .attr({
+
+                        title: chart.options.lang[btnOptions._titleKey],
+                        zIndex: 3 // #4955
+                    });
+                button.menuClassName = options.menuClassName || 'highcharts-menu-' + chart.btnCount++;
+
+                if (btnOptions.symbol) {
+                    symbol = renderer.symbol(
+                            btnOptions.symbol,
+                            btnOptions.symbolX - (symbolSize / 2),
+                            btnOptions.symbolY - (symbolSize / 2),
+                            symbolSize,
+                            symbolSize
+                        )
+                        .addClass('highcharts-button-symbol')
+                        .attr({
+                            zIndex: 1
+                        }).add(button);
+
+
+                }
+
+                button.add()
+                    .align(extend(btnOptions, {
+                        width: button.width,
+                        x: pick(btnOptions.x, chart.buttonOffset) // #1654
+                    }), true, 'spacingBox');
+
+                chart.buttonOffset += (button.width + btnOptions.buttonSpacing) * (btnOptions.align === 'right' ? -1 : 1);
+
+                chart.exportSVGElements.push(button, symbol);
+
+            },
+
+            /**
+             * Destroy the buttons.
+             */
+            destroyExport: function(e) {
+                var chart = e ? e.target : this,
+                    exportSVGElements = chart.exportSVGElements,
+                    exportDivElements = chart.exportDivElements;
+
+                // Destroy the extra buttons added
+                if (exportSVGElements) {
+                    each(exportSVGElements, function(elem, i) {
+
+                        // Destroy and null the svg/vml elements
+                        if (elem) { // #1822
+                            elem.onclick = elem.ontouchstart = null;
+                            chart.exportSVGElements[i] = elem.destroy();
+                        }
+                    });
+                    exportSVGElements.length = 0;
+                }
+
+                // Destroy the divs for the menu
+                if (exportDivElements) {
+                    each(exportDivElements, function(elem, i) {
+
+                        // Remove the event handler
+                        clearTimeout(elem.hideTimer); // #5427
+                        removeEvent(elem, 'mouseleave');
+
+                        // Remove inline events
+                        chart.exportDivElements[i] = elem.onmouseout = elem.onmouseover = elem.ontouchstart = elem.onclick = null;
+
+                        // Destroy the div by moving to garbage bin
+                        discardElement(elem);
+                    });
+                    exportDivElements.length = 0;
+                }
+            }
+        });
+
+
+        // These ones are translated to attributes rather than styles
+        SVGRenderer.prototype.inlineToAttributes = [
+            'fill',
+            'stroke',
+            'strokeLinecap',
+            'strokeLinejoin',
+            'strokeWidth',
+            'textAnchor',
+            'x',
+            'y'
+        ];
+        // These CSS properties are not inlined. Remember camelCase.
+        SVGRenderer.prototype.inlineBlacklist = [
+            /-/, // In Firefox, both hyphened and camelCased names are listed
+            /^(clipPath|cssText|d|height|width)$/, // Full words
+            /^font$/, // more specific props are set
+            /[lL]ogical(Width|Height)$/,
+            /perspective/,
+            /TapHighlightColor/,
+            /^transition/
+            // /^text (border|color|cursor|height|webkitBorder)/
+        ];
+        SVGRenderer.prototype.unstyledElements = [
+            'clipPath',
+            'defs',
+            'desc'
+        ];
+
+        /**
+         * Analyze inherited styles from stylesheets and add them inline
+         *
+         * @todo: What are the border styles for text about? In general, text has a lot of properties.
+         * @todo: Make it work with IE9 and IE10.
+         */
+        Chart.prototype.inlineStyles = function() {
+            var renderer = this.renderer,
+                inlineToAttributes = renderer.inlineToAttributes,
+                blacklist = renderer.inlineBlacklist,
+                unstyledElements = renderer.unstyledElements,
+                defaultStyles = {},
+                dummySVG;
+
+            /**
+             * Make hyphenated property names out of camelCase
+             */
+            function hyphenate(prop) {
+                return prop.replace(
+                    /([A-Z])/g,
+                    function(a, b) {
+                        return '-' + b.toLowerCase();
+                    }
+                );
+            }
+
+            /**
+             * Call this on all elements and recurse to children
+             */
+            function recurse(node) {
+                var prop,
+                    styles,
+                    parentStyles,
+                    cssText = '',
+                    dummy,
+                    styleAttr,
+                    blacklisted,
+                    i;
+
+                if (node.nodeType === 1 && unstyledElements.indexOf(node.nodeName) === -1) {
+                    styles = win.getComputedStyle(node, null);
+                    parentStyles = node.nodeName === 'svg' ? {} : win.getComputedStyle(node.parentNode, null);
+
+                    // Get default styles from the browser so that we don't have to add these
+                    if (!defaultStyles[node.nodeName]) {
+                        if (!dummySVG) {
+                            dummySVG = doc.createElementNS(H.SVG_NS, 'svg');
+                            dummySVG.setAttribute('version', '1.1');
+                            doc.body.appendChild(dummySVG);
+                        }
+                        dummy = doc.createElementNS(node.namespaceURI, node.nodeName);
+                        dummySVG.appendChild(dummy);
+                        defaultStyles[node.nodeName] = merge(win.getComputedStyle(dummy, null)); // Copy, so we can remove the node
+                        dummySVG.removeChild(dummy);
+                    }
+
+                    // Loop over all the computed styles and check whether they are in the 
+                    // white list for styles or atttributes.
+                    for (prop in styles) {
+
+                        // Check against blacklist
+                        blacklisted = false;
+                        i = blacklist.length;
+                        while (i-- && !blacklisted) {
+                            blacklisted = blacklist[i].test(prop) || typeof styles[prop] === 'function';
+                        }
+
+                        if (!blacklisted) {
+
+                            // If parent node has the same style, it gets inherited, no need to inline it
+                            if (parentStyles[prop] !== styles[prop] && defaultStyles[node.nodeName][prop] !== styles[prop]) {
+
+                                // Attributes
+                                if (inlineToAttributes.indexOf(prop) !== -1) {
+                                    node.setAttribute(hyphenate(prop), styles[prop]);
+
+                                    // Styles
+                                } else {
+                                    cssText += hyphenate(prop) + ':' + styles[prop] + ';';
+                                }
+                            }
+                        }
+                    }
+
+                    // Apply styles
+                    if (cssText) {
+                        styleAttr = node.getAttribute('style');
+                        node.setAttribute('style', (styleAttr ? styleAttr + ';' : '') + cssText);
+                    }
+
+                    if (node.nodeName === 'text') {
+                        return;
+                    }
+
+                    // Recurse
+                    each(node.children || node.childNodes, recurse);
+                }
+            }
+
+            /**
+             * Remove the dummy objects used to get defaults
+             */
+            function tearDown() {
+                dummySVG.parentNode.removeChild(dummySVG);
+            }
+
+            recurse(this.container.querySelector('svg'));
+            tearDown();
+
+        };
+
+
+
+        symbols.menu = function(x, y, width, height) {
+            var arr = [
+                'M', x, y + 2.5,
+                'L', x + width, y + 2.5,
+                'M', x, y + height / 2 + 0.5,
+                'L', x + width, y + height / 2 + 0.5,
+                'M', x, y + height - 1.5,
+                'L', x + width, y + height - 1.5
+            ];
+            return arr;
+        };
+
+        // Add the buttons on chart load
+        Chart.prototype.renderExporting = function() {
+            var n,
+                exportingOptions = this.options.exporting,
+                buttons = exportingOptions.buttons,
+                isDirty = this.isDirtyExporting || !this.exportSVGElements;
+
+            this.buttonOffset = 0;
+            if (this.isDirtyExporting) {
+                this.destroyExport();
+            }
+
+            if (isDirty && exportingOptions.enabled !== false) {
+
+                for (n in buttons) {
+                    this.addButton(buttons[n]);
+                }
+
+                this.isDirtyExporting = false;
+            }
+
+            // Destroy the export elements at chart destroy
+            addEvent(this, 'destroy', this.destroyExport);
+        };
+
+        Chart.prototype.callbacks.push(function(chart) {
+
+            function update(prop, options, redraw) {
+                chart.isDirtyExporting = true;
+                merge(true, chart.options[prop], options);
+                if (pick(redraw, true)) {
+                    chart.redraw();
+                }
+
+            }
+
+            chart.renderExporting();
+
+            addEvent(chart, 'redraw', chart.renderExporting);
+
+            // Add update methods to handle chart.update and chart.exporting.update
+            // and chart.navigation.update.
+            each(['exporting', 'navigation'], function(prop) {
+                chart[prop] = {
+                    update: function(options, redraw) {
+                        update(prop, options, redraw);
+                    }
+                };
+            });
+        });
+
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 12 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/funnel.js


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

@@ -0,0 +1,290 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ * Highcharts funnel 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(Highcharts) {
+        /**
+         * Highcharts funnel module
+         *
+         * (c) 2010-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         */
+        /* eslint indent:0 */
+        'use strict';
+
+        // create shortcuts
+        var seriesType = Highcharts.seriesType,
+            seriesTypes = Highcharts.seriesTypes,
+            noop = Highcharts.noop,
+            each = Highcharts.each;
+
+
+        seriesType('funnel', 'pie', {
+                animation: false,
+                center: ['50%', '50%'],
+                width: '90%',
+                neckWidth: '30%',
+                height: '100%',
+                neckHeight: '25%',
+                reversed: false,
+                size: true, // to avoid adapting to data label size in Pie.drawDataLabels
+
+
+            },
+
+            // Properties
+            {
+                animate: noop,
+
+                /**
+                 * Overrides the pie translate method
+                 */
+                translate: function() {
+
+                    var
+                    // Get positions - either an integer or a percentage string must be given
+                        getLength = function(length, relativeTo) {
+                            return (/%$/).test(length) ?
+                                relativeTo * parseInt(length, 10) / 100 :
+                                parseInt(length, 10);
+                        },
+
+                        sum = 0,
+                        series = this,
+                        chart = series.chart,
+                        options = series.options,
+                        reversed = options.reversed,
+                        ignoreHiddenPoint = options.ignoreHiddenPoint,
+                        plotWidth = chart.plotWidth,
+                        plotHeight = chart.plotHeight,
+                        cumulative = 0, // start at top
+                        center = options.center,
+                        centerX = getLength(center[0], plotWidth),
+                        centerY = getLength(center[1], plotHeight),
+                        width = getLength(options.width, plotWidth),
+                        tempWidth,
+                        getWidthAt,
+                        height = getLength(options.height, plotHeight),
+                        neckWidth = getLength(options.neckWidth, plotWidth),
+                        neckHeight = getLength(options.neckHeight, plotHeight),
+                        neckY = (centerY - height / 2) + height - neckHeight,
+                        data = series.data,
+                        path,
+                        fraction,
+                        half = options.dataLabels.position === 'left' ? 1 : 0,
+
+                        x1,
+                        y1,
+                        x2,
+                        x3,
+                        y3,
+                        x4,
+                        y5;
+
+                    // Return the width at a specific y coordinate
+                    series.getWidthAt = getWidthAt = function(y) {
+                        var top = (centerY - height / 2);
+
+                        return y > neckY || height === neckHeight ?
+                            neckWidth :
+                            neckWidth + (width - neckWidth) * (1 - (y - top) / (height - neckHeight));
+                    };
+                    series.getX = function(y, half) {
+                        return centerX + (half ? -1 : 1) * ((getWidthAt(reversed ? 2 * centerY - y : y) / 2) + options.dataLabels.distance);
+                    };
+
+                    // Expose
+                    series.center = [centerX, centerY, height];
+                    series.centerX = centerX;
+
+                    /*
+                     * Individual point coordinate naming:
+                     *
+                     * x1,y1 _________________ x2,y1
+                     *  \                         /
+                     *   \                       /
+                     *    \                     /
+                     *     \                   /
+                     *      \                 /
+                     *     x3,y3 _________ x4,y3
+                     *
+                     * Additional for the base of the neck:
+                     *
+                     *       |               |
+                     *       |               |
+                     *       |               |
+                     *     x3,y5 _________ x4,y5
+                     */
+
+
+
+
+                    // get the total sum
+                    each(data, function(point) {
+                        if (!ignoreHiddenPoint || point.visible !== false) {
+                            sum += point.y;
+                        }
+                    });
+
+                    each(data, function(point) {
+                        // set start and end positions
+                        y5 = null;
+                        fraction = sum ? point.y / sum : 0;
+                        y1 = centerY - height / 2 + cumulative * height;
+                        y3 = y1 + fraction * height;
+                        //tempWidth = neckWidth + (width - neckWidth) * ((height - neckHeight - y1) / (height - neckHeight));
+                        tempWidth = getWidthAt(y1);
+                        x1 = centerX - tempWidth / 2;
+                        x2 = x1 + tempWidth;
+                        tempWidth = getWidthAt(y3);
+                        x3 = centerX - tempWidth / 2;
+                        x4 = x3 + tempWidth;
+
+                        // the entire point is within the neck
+                        if (y1 > neckY) {
+                            x1 = x3 = centerX - neckWidth / 2;
+                            x2 = x4 = centerX + neckWidth / 2;
+
+                            // the base of the neck
+                        } else if (y3 > neckY) {
+                            y5 = y3;
+
+                            tempWidth = getWidthAt(neckY);
+                            x3 = centerX - tempWidth / 2;
+                            x4 = x3 + tempWidth;
+
+                            y3 = neckY;
+                        }
+
+                        if (reversed) {
+                            y1 = 2 * centerY - y1;
+                            y3 = 2 * centerY - y3;
+                            y5 = (y5 ? 2 * centerY - y5 : null);
+                        }
+                        // save the path
+                        path = [
+                            'M',
+                            x1, y1,
+                            'L',
+                            x2, y1,
+                            x4, y3
+                        ];
+                        if (y5) {
+                            path.push(x4, y5, x3, y5);
+                        }
+                        path.push(x3, y3, 'Z');
+
+                        // prepare for using shared dr
+                        point.shapeType = 'path';
+                        point.shapeArgs = {
+                            d: path
+                        };
+
+
+                        // for tooltips and data labels
+                        point.percentage = fraction * 100;
+                        point.plotX = centerX;
+                        point.plotY = (y1 + (y5 || y3)) / 2;
+
+                        // Placement of tooltips and data labels
+                        point.tooltipPos = [
+                            centerX,
+                            point.plotY
+                        ];
+
+                        // Slice is a noop on funnel points
+                        point.slice = noop;
+
+                        // Mimicking pie data label placement logic
+                        point.half = half;
+
+                        if (!ignoreHiddenPoint || point.visible !== false) {
+                            cumulative += fraction;
+                        }
+                    });
+                },
+                /**
+                 * Draw a single point (wedge)
+                 * @param {Object} point The point object
+                 * @param {Object} color The color of the point
+                 * @param {Number} brightness The brightness relative to the color
+                 */
+                drawPoints: seriesTypes.column.prototype.drawPoints,
+
+                /**
+                 * Funnel items don't have angles (#2289)
+                 */
+                sortByAngle: function(points) {
+                    points.sort(function(a, b) {
+                        return a.plotY - b.plotY;
+                    });
+                },
+
+                /**
+                 * Extend the pie data label method
+                 */
+                drawDataLabels: function() {
+                    var data = this.data,
+                        labelDistance = this.options.dataLabels.distance,
+                        leftSide,
+                        sign,
+                        point,
+                        i = data.length,
+                        x,
+                        y;
+
+                    // In the original pie label anticollision logic, the slots are distributed
+                    // from one labelDistance above to one labelDistance below the pie. In funnels
+                    // we don't want this.
+                    this.center[2] -= 2 * labelDistance;
+
+                    // Set the label position array for each point.
+                    while (i--) {
+                        point = data[i];
+                        leftSide = point.half;
+                        sign = leftSide ? 1 : -1;
+                        y = point.plotY;
+                        x = this.getX(y, leftSide);
+
+                        // set the anchor point for data labels
+                        point.labelPos = [
+                            0, // first break of connector
+                            y, // a/a
+                            x + (labelDistance - 5) * sign, // second break, right outside point shape
+                            y, // a/a
+                            x + labelDistance * sign, // landing point for connector
+                            y, // a/a
+                            leftSide ? 'right' : 'left', // alignment
+                            0 // center angle
+                        ];
+                    }
+
+                    seriesTypes.pie.prototype.drawDataLabels.call(this);
+                }
+
+            });
+
+        /** 
+         * Pyramid series type.
+         * A pyramid series is a special type of funnel, without neck and reversed by default.
+         */
+        seriesType('pyramid', 'funnel', {
+            neckWidth: '0%',
+            neckHeight: '0%',
+            reversed: true
+        });
+
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 24 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/gantt.js


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

@@ -0,0 +1,791 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ * Gantt series
+ *
+ * (c) 2016 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) 2016 Highsoft AS
+         * Authors: Lars A. V. Cabrera
+         *
+         * License: www.highcharts.com/license
+         */
+        'use strict';
+
+        var dateFormat = H.dateFormat,
+            each = H.each,
+            isObject = H.isObject,
+            pick = H.pick,
+            wrap = H.wrap,
+            Axis = H.Axis,
+            Chart = H.Chart,
+            Tick = H.Tick;
+
+
+        // Enum for which side the axis is on.
+        // Maps to axis.side
+        var axisSide = {
+            top: 0,
+            right: 1,
+            bottom: 2,
+            left: 3,
+            0: 'top',
+            1: 'right',
+            2: 'bottom',
+            3: 'left'
+        };
+
+        /**
+         * Checks if an axis is the outer axis in its dimension. Since
+         * axes are placed outwards in order, the axis with the highest
+         * index is the outermost axis.
+         *
+         * Example: If there are multiple x-axes at the top of the chart,
+         * this function returns true if the axis supplied is the last
+         * of the x-axes.
+         *
+         * @return true if the axis is the outermost axis in its dimension;
+         *		 false if not
+         */
+        Axis.prototype.isOuterAxis = function() {
+            var axis = this,
+                thisIndex = -1,
+                isOuter = true;
+
+            each(this.chart.axes, function(otherAxis, index) {
+                if (otherAxis.side === axis.side) {
+                    if (otherAxis === axis) {
+                        // Get the index of the axis in question
+                        thisIndex = index;
+
+                        // Check thisIndex >= 0 in case thisIndex has
+                        // not been found yet
+                    } else if (thisIndex >= 0 && index > thisIndex) {
+                        // There was an axis on the same side with a
+                        // higher index. Exit the loop.
+                        isOuter = false;
+                        return;
+                    }
+                }
+            });
+            // There were either no other axes on the same side,
+            // or the other axes were not farther from the chart
+            return isOuter;
+        };
+
+        /**
+         * Shortcut function to Tick.label.getBBox().width.
+         *
+         * @return {number} width - the width of the tick label
+         */
+        Tick.prototype.getLabelWidth = function() {
+            return this.label.getBBox().width;
+        };
+
+        /**
+         * Get the maximum label length.
+         * This function can be used in states where the axis.maxLabelLength has not
+         * been set.
+         *
+         * @param  {boolean} force - Optional parameter to force a new calculation, even
+         *                           if a value has already been set
+         * @return {number} maxLabelLength - the maximum label length of the axis
+         */
+        Axis.prototype.getMaxLabelLength = function(force) {
+            var tickPositions = this.tickPositions,
+                ticks = this.ticks,
+                maxLabelLength = 0;
+
+            if (!this.maxLabelLength || force) {
+                each(tickPositions, function(tick) {
+                    tick = ticks[tick];
+                    if (tick && tick.labelLength > maxLabelLength) {
+                        maxLabelLength = tick.labelLength;
+                    }
+                });
+                this.maxLabelLength = maxLabelLength;
+            }
+            return this.maxLabelLength;
+        };
+
+        /**
+         * Adds the axis defined in axis.options.title
+         */
+        Axis.prototype.addTitle = function() {
+            var axis = this,
+                renderer = axis.chart.renderer,
+                axisParent = axis.axisParent,
+                horiz = axis.horiz,
+                opposite = axis.opposite,
+                options = axis.options,
+                axisTitleOptions = options.title,
+                hasData,
+                showAxis,
+                textAlign;
+
+            // For reuse in Axis.render
+            hasData = axis.hasData();
+            axis.showAxis = showAxis = hasData || pick(options.showEmpty, true);
+
+            // Disregard title generation in original Axis.getOffset()
+            options.title = '';
+
+            if (!axis.axisTitle) {
+                textAlign = axisTitleOptions.textAlign;
+                if (!textAlign) {
+                    textAlign = (horiz ? {
+                        low: 'left',
+                        middle: 'center',
+                        high: 'right'
+                    } : {
+                        low: opposite ? 'right' : 'left',
+                        middle: 'center',
+                        high: opposite ? 'left' : 'right'
+                    })[axisTitleOptions.align];
+                }
+                axis.axisTitle = renderer.text(
+                        axisTitleOptions.text,
+                        0,
+                        0,
+                        axisTitleOptions.useHTML
+                    )
+                    .attr({
+                        zIndex: 7,
+                        rotation: axisTitleOptions.rotation || 0,
+                        align: textAlign
+                    })
+                    .addClass('highcharts-axis-title')
+
+                // Add to axisParent instead of axisGroup, to ignore the space
+                // it takes
+                .add(axisParent);
+                axis.axisTitle.isNew = true;
+            }
+
+
+            // hide or show the title depending on whether showEmpty is set
+            axis.axisTitle[showAxis ? 'show' : 'hide'](true);
+        };
+
+        /**
+         * Add custom date formats
+         */
+        H.dateFormats = {
+            // Week number
+            W: function(timestamp) {
+                var date = new Date(timestamp),
+                    day = date.getUTCDay() === 0 ? 7 : date.getUTCDay(),
+                    time = date.getTime(),
+                    startOfYear = new Date(date.getUTCFullYear(), 0, 1, -6),
+                    dayNumber;
+                date.setDate(date.getUTCDate() + 4 - day);
+                dayNumber = Math.floor((time - startOfYear) / 86400000);
+                return 1 + Math.floor(dayNumber / 7);
+            },
+            // First letter of the day of the week, e.g. 'M' for 'Monday'.
+            E: function(timestamp) {
+                return dateFormat('%a', timestamp, true).charAt(0);
+            }
+        };
+
+        /**
+         * Prevents adding the last tick label if the axis is not a category axis.
+         *
+         * Since numeric labels are normally placed at starts and ends of a range of
+         * value, and this module makes the label point at the value, an "extra" label
+         * would appear.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Tick.prototype, 'addLabel', function(proceed) {
+            var axis = this.axis,
+                isCategoryAxis = axis.options.categories !== undefined,
+                tickPositions = axis.tickPositions,
+                lastTick = tickPositions[tickPositions.length - 1],
+                isLastTick = this.pos !== lastTick;
+
+            if (!axis.options.grid || isCategoryAxis || isLastTick) {
+                proceed.apply(this);
+            }
+        });
+
+        /**
+         * Center tick labels vertically and horizontally between ticks
+         *
+         * @param {function} proceed - the original function
+         *
+         * @return {object} object - an object containing x and y positions
+         *						 for the tick
+         */
+        wrap(Tick.prototype, 'getLabelPosition', function(proceed, x, y, label) {
+            var retVal = proceed.apply(this, Array.prototype.slice.call(arguments, 1)),
+                axis = this.axis,
+                options = axis.options,
+                tickInterval = options.tickInterval || 1,
+                newX,
+                newPos,
+                axisHeight,
+                fontSize,
+                labelMetrics,
+                lblB,
+                lblH,
+                labelCenter;
+
+            // Only center tick labels if axis has option grid: true
+            if (options.grid) {
+                fontSize = options.labels.style.fontSize;
+                labelMetrics = axis.chart.renderer.fontMetrics(fontSize, label);
+                lblB = labelMetrics.b;
+                lblH = labelMetrics.h;
+
+                if (axis.horiz && options.categories === undefined) {
+                    // Center x position
+                    axisHeight = axis.axisGroup.getBBox().height;
+                    newPos = this.pos + tickInterval / 2;
+                    retVal.x = axis.translate(newPos) + axis.left;
+                    labelCenter = (axisHeight / 2) + (lblH / 2) - Math.abs(lblH - lblB);
+
+                    // Center y position
+                    if (axis.side === axisSide.top) {
+                        retVal.y = y - labelCenter;
+                    } else {
+                        retVal.y = y + labelCenter;
+                    }
+                } else {
+                    // Center y position
+                    if (options.categories === undefined) {
+                        newPos = this.pos + (tickInterval / 2);
+                        retVal.y = axis.translate(newPos) + axis.top + (lblB / 2);
+                    }
+
+                    // Center x position
+                    newX = (this.getLabelWidth() / 2) - (axis.maxLabelLength / 2);
+                    if (axis.side === axisSide.left) {
+                        retVal.x += newX;
+                    } else {
+                        retVal.x -= newX;
+                    }
+                }
+            }
+            return retVal;
+        });
+
+
+        /**
+         * Draw vertical ticks extra long to create cell floors and roofs.
+         * Overrides the tickLength for vertical axes.
+         *
+         * @param {function} proceed - the original function
+         * @returns {array} retVal -
+         */
+        wrap(Axis.prototype, 'tickSize', function(proceed) {
+            var axis = this,
+                retVal = proceed.apply(axis, Array.prototype.slice.call(arguments, 1)),
+                labelPadding,
+                distance;
+
+            if (axis.options.grid && !axis.horiz) {
+                labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
+                if (!axis.maxLabelLength) {
+                    axis.maxLabelLength = axis.getMaxLabelLength();
+                }
+                distance = axis.maxLabelLength + labelPadding;
+
+                retVal[0] = distance;
+            }
+            return retVal;
+        });
+
+        /**
+         * Disregards space required by axisTitle, by adding axisTitle to axisParent
+         * instead of axisGroup, and disregarding margins and offsets related to
+         * axisTitle.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Axis.prototype, 'getOffset', function(proceed) {
+            var axis = this,
+                axisOffset = axis.chart.axisOffset,
+                side = axis.side,
+                axisHeight,
+                tickSize,
+                options = axis.options,
+                axisTitleOptions = options.title,
+                addTitle = axisTitleOptions &&
+                axisTitleOptions.text &&
+                axisTitleOptions.enabled !== false;
+
+            if (axis.options.grid && isObject(axis.options.title)) {
+
+                tickSize = axis.tickSize('tick')[0];
+                if (axisOffset[side] && tickSize) {
+                    axisHeight = axisOffset[side] + tickSize;
+                }
+
+                if (addTitle) {
+                    // Use the custom addTitle() to add it, while preventing making room
+                    // for it
+                    axis.addTitle();
+                }
+
+                proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
+
+                axisOffset[side] = pick(axisHeight, axisOffset[side]);
+
+
+                // Put axis options back after original Axis.getOffset() has been called
+                options.title = axisTitleOptions;
+
+            } else {
+                proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
+            }
+        });
+
+        /**
+         * Prevents rotation of labels when squished, as rotating them would not
+         * help.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Axis.prototype, 'renderUnsquish', function(proceed) {
+            if (this.options.grid) {
+                this.labelRotation = 0;
+                this.options.labels.rotation = 0;
+            }
+            proceed.apply(this);
+        });
+
+        /**
+         * Places leftmost tick at the start of the axis, to create a left wall.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Axis.prototype, 'setOptions', function(proceed, userOptions) {
+            var axis = this;
+            if (userOptions.grid && axis.horiz) {
+                userOptions.startOnTick = true;
+                userOptions.minPadding = 0;
+                userOptions.endOnTick = true;
+            }
+            proceed.apply(this, Array.prototype.slice.call(arguments, 1));
+        });
+
+        /**
+         * Draw an extra line on the far side of the the axisLine,
+         * creating cell roofs of a grid.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Axis.prototype, 'render', function(proceed) {
+            var axis = this,
+                options = axis.options,
+                labelPadding,
+                distance,
+                lineWidth,
+                linePath,
+                yStartIndex,
+                yEndIndex,
+                xStartIndex,
+                xEndIndex,
+                renderer = axis.chart.renderer,
+                axisGroupBox;
+
+            if (options.grid) {
+                labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
+                distance = axis.maxLabelLength + labelPadding;
+                lineWidth = options.lineWidth;
+
+                // Remove right wall before rendering
+                if (axis.rightWall) {
+                    axis.rightWall.destroy();
+                }
+
+                // Call original Axis.render() to obtain axis.axisLine and
+                // axis.axisGroup
+                proceed.apply(axis);
+
+                axisGroupBox = axis.axisGroup.getBBox();
+
+                // Add right wall on horizontal axes
+                if (axis.horiz) {
+                    axis.rightWall = renderer.path([
+                            'M',
+                            axisGroupBox.x + axis.width + 1, // account for left wall
+                            axisGroupBox.y,
+                            'L',
+                            axisGroupBox.x + axis.width + 1, // account for left wall
+                            axisGroupBox.y + axisGroupBox.height
+                        ])
+                        .attr({
+                            stroke: options.tickColor || '#ccd6eb',
+                            'stroke-width': options.tickWidth || 1,
+                            zIndex: 7,
+                            class: 'grid-wall'
+                        })
+                        .add(axis.axisGroup);
+                }
+
+                if (axis.isOuterAxis() && axis.axisLine) {
+                    if (axis.horiz) {
+                        // -1 to avoid adding distance each time the chart updates
+                        distance = axisGroupBox.height - 1;
+                    }
+
+                    if (lineWidth) {
+                        linePath = axis.getLinePath(lineWidth);
+                        xStartIndex = linePath.indexOf('M') + 1;
+                        xEndIndex = linePath.indexOf('L') + 1;
+                        yStartIndex = linePath.indexOf('M') + 2;
+                        yEndIndex = linePath.indexOf('L') + 2;
+
+                        // Negate distance if top or left axis
+                        if (axis.side === axisSide.top || axis.side === axisSide.left) {
+                            distance = -distance;
+                        }
+
+                        // If axis is horizontal, reposition line path vertically
+                        if (axis.horiz) {
+                            linePath[yStartIndex] = linePath[yStartIndex] + distance;
+                            linePath[yEndIndex] = linePath[yEndIndex] + distance;
+                        } else {
+                            // If axis is vertical, reposition line path horizontally
+                            linePath[xStartIndex] = linePath[xStartIndex] + distance;
+                            linePath[xEndIndex] = linePath[xEndIndex] + distance;
+                        }
+
+                        if (!axis.axisLineExtra) {
+                            axis.axisLineExtra = renderer.path(linePath)
+                                .attr({
+                                    stroke: options.lineColor,
+                                    'stroke-width': lineWidth,
+                                    zIndex: 7
+                                })
+                                .add(axis.axisGroup);
+                        } else {
+                            axis.axisLineExtra.animate({
+                                d: linePath
+                            });
+                        }
+
+                        // show or hide the line depending on options.showEmpty
+                        axis.axisLine[axis.showAxis ? 'show' : 'hide'](true);
+                    }
+                }
+            } else {
+                proceed.apply(axis);
+            }
+        });
+
+        /**
+         * Wraps chart rendering with the following customizations:
+         * 1. Prohibit timespans of multitudes of a time unit
+         * 2. Draw cell walls on vertical axes
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Chart.prototype, 'render', function(proceed) {
+            // 25 is optimal height for default fontSize (11px)
+            // 25 / 11 ≈ 2.28
+            var fontSizeToCellHeightRatio = 25 / 11,
+                fontMetrics,
+                fontSize;
+
+            each(this.axes, function(axis) {
+                var options = axis.options;
+                if (options.grid) {
+                    fontSize = options.labels.style.fontSize;
+                    fontMetrics = axis.chart.renderer.fontMetrics(fontSize);
+
+                    // Prohibit timespans of multitudes of a time unit,
+                    // e.g. two days, three weeks, etc.
+                    if (options.type === 'datetime') {
+                        options.units = [
+                            ['millisecond', [1]],
+                            ['second', [1]],
+                            ['minute', [1]],
+                            ['hour', [1]],
+                            ['day', [1]],
+                            ['week', [1]],
+                            ['month', [1]],
+                            ['year', null]
+                        ];
+                    }
+
+                    // Make tick marks taller, creating cell walls of a grid.
+                    // Use cellHeight axis option if set
+                    if (axis.horiz) {
+                        options.tickLength = options.cellHeight ||
+                            fontMetrics.h * fontSizeToCellHeightRatio;
+                    } else {
+                        options.tickWidth = 1;
+                        if (!options.lineWidth) {
+                            options.lineWidth = 1;
+                        }
+                    }
+                }
+            });
+
+            // Call original Chart.render()
+            proceed.apply(this);
+        });
+
+    }(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));
+    (function(H) {
+        /**
+         * (c) 2016 Highsoft AS
+         * Authors: Lars A. V. Cabrera
+         *
+         * License: www.highcharts.com/license
+         */
+        'use strict';
+        // 
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 19 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/grid-axis.js


+ 545 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/grid-axis.src.js

@@ -0,0 +1,545 @@
+/**
+ * @license Highcharts JS v5.0.6 (2016-12-07)
+ * GridAxis
+ *
+ * (c) 2016 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) 2016 Highsoft AS
+         * Authors: Lars A. V. Cabrera
+         *
+         * License: www.highcharts.com/license
+         */
+        'use strict';
+
+        var dateFormat = H.dateFormat,
+            each = H.each,
+            isObject = H.isObject,
+            pick = H.pick,
+            wrap = H.wrap,
+            Axis = H.Axis,
+            Chart = H.Chart,
+            Tick = H.Tick;
+
+
+        // Enum for which side the axis is on.
+        // Maps to axis.side
+        var axisSide = {
+            top: 0,
+            right: 1,
+            bottom: 2,
+            left: 3,
+            0: 'top',
+            1: 'right',
+            2: 'bottom',
+            3: 'left'
+        };
+
+        /**
+         * Checks if an axis is the outer axis in its dimension. Since
+         * axes are placed outwards in order, the axis with the highest
+         * index is the outermost axis.
+         *
+         * Example: If there are multiple x-axes at the top of the chart,
+         * this function returns true if the axis supplied is the last
+         * of the x-axes.
+         *
+         * @return true if the axis is the outermost axis in its dimension;
+         *		 false if not
+         */
+        Axis.prototype.isOuterAxis = function() {
+            var axis = this,
+                thisIndex = -1,
+                isOuter = true;
+
+            each(this.chart.axes, function(otherAxis, index) {
+                if (otherAxis.side === axis.side) {
+                    if (otherAxis === axis) {
+                        // Get the index of the axis in question
+                        thisIndex = index;
+
+                        // Check thisIndex >= 0 in case thisIndex has
+                        // not been found yet
+                    } else if (thisIndex >= 0 && index > thisIndex) {
+                        // There was an axis on the same side with a
+                        // higher index. Exit the loop.
+                        isOuter = false;
+                        return;
+                    }
+                }
+            });
+            // There were either no other axes on the same side,
+            // or the other axes were not farther from the chart
+            return isOuter;
+        };
+
+        /**
+         * Shortcut function to Tick.label.getBBox().width.
+         *
+         * @return {number} width - the width of the tick label
+         */
+        Tick.prototype.getLabelWidth = function() {
+            return this.label.getBBox().width;
+        };
+
+        /**
+         * Get the maximum label length.
+         * This function can be used in states where the axis.maxLabelLength has not
+         * been set.
+         *
+         * @param  {boolean} force - Optional parameter to force a new calculation, even
+         *                           if a value has already been set
+         * @return {number} maxLabelLength - the maximum label length of the axis
+         */
+        Axis.prototype.getMaxLabelLength = function(force) {
+            var tickPositions = this.tickPositions,
+                ticks = this.ticks,
+                maxLabelLength = 0;
+
+            if (!this.maxLabelLength || force) {
+                each(tickPositions, function(tick) {
+                    tick = ticks[tick];
+                    if (tick && tick.labelLength > maxLabelLength) {
+                        maxLabelLength = tick.labelLength;
+                    }
+                });
+                this.maxLabelLength = maxLabelLength;
+            }
+            return this.maxLabelLength;
+        };
+
+        /**
+         * Adds the axis defined in axis.options.title
+         */
+        Axis.prototype.addTitle = function() {
+            var axis = this,
+                renderer = axis.chart.renderer,
+                axisParent = axis.axisParent,
+                horiz = axis.horiz,
+                opposite = axis.opposite,
+                options = axis.options,
+                axisTitleOptions = options.title,
+                hasData,
+                showAxis,
+                textAlign;
+
+            // For reuse in Axis.render
+            hasData = axis.hasData();
+            axis.showAxis = showAxis = hasData || pick(options.showEmpty, true);
+
+            // Disregard title generation in original Axis.getOffset()
+            options.title = '';
+
+            if (!axis.axisTitle) {
+                textAlign = axisTitleOptions.textAlign;
+                if (!textAlign) {
+                    textAlign = (horiz ? {
+                        low: 'left',
+                        middle: 'center',
+                        high: 'right'
+                    } : {
+                        low: opposite ? 'right' : 'left',
+                        middle: 'center',
+                        high: opposite ? 'left' : 'right'
+                    })[axisTitleOptions.align];
+                }
+                axis.axisTitle = renderer.text(
+                        axisTitleOptions.text,
+                        0,
+                        0,
+                        axisTitleOptions.useHTML
+                    )
+                    .attr({
+                        zIndex: 7,
+                        rotation: axisTitleOptions.rotation || 0,
+                        align: textAlign
+                    })
+                    .addClass('highcharts-axis-title')
+
+                // Add to axisParent instead of axisGroup, to ignore the space
+                // it takes
+                .add(axisParent);
+                axis.axisTitle.isNew = true;
+            }
+
+
+            // hide or show the title depending on whether showEmpty is set
+            axis.axisTitle[showAxis ? 'show' : 'hide'](true);
+        };
+
+        /**
+         * Add custom date formats
+         */
+        H.dateFormats = {
+            // Week number
+            W: function(timestamp) {
+                var date = new Date(timestamp),
+                    day = date.getUTCDay() === 0 ? 7 : date.getUTCDay(),
+                    time = date.getTime(),
+                    startOfYear = new Date(date.getUTCFullYear(), 0, 1, -6),
+                    dayNumber;
+                date.setDate(date.getUTCDate() + 4 - day);
+                dayNumber = Math.floor((time - startOfYear) / 86400000);
+                return 1 + Math.floor(dayNumber / 7);
+            },
+            // First letter of the day of the week, e.g. 'M' for 'Monday'.
+            E: function(timestamp) {
+                return dateFormat('%a', timestamp, true).charAt(0);
+            }
+        };
+
+        /**
+         * Prevents adding the last tick label if the axis is not a category axis.
+         *
+         * Since numeric labels are normally placed at starts and ends of a range of
+         * value, and this module makes the label point at the value, an "extra" label
+         * would appear.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Tick.prototype, 'addLabel', function(proceed) {
+            var axis = this.axis,
+                isCategoryAxis = axis.options.categories !== undefined,
+                tickPositions = axis.tickPositions,
+                lastTick = tickPositions[tickPositions.length - 1],
+                isLastTick = this.pos !== lastTick;
+
+            if (!axis.options.grid || isCategoryAxis || isLastTick) {
+                proceed.apply(this);
+            }
+        });
+
+        /**
+         * Center tick labels vertically and horizontally between ticks
+         *
+         * @param {function} proceed - the original function
+         *
+         * @return {object} object - an object containing x and y positions
+         *						 for the tick
+         */
+        wrap(Tick.prototype, 'getLabelPosition', function(proceed, x, y, label) {
+            var retVal = proceed.apply(this, Array.prototype.slice.call(arguments, 1)),
+                axis = this.axis,
+                options = axis.options,
+                tickInterval = options.tickInterval || 1,
+                newX,
+                newPos,
+                axisHeight,
+                fontSize,
+                labelMetrics,
+                lblB,
+                lblH,
+                labelCenter;
+
+            // Only center tick labels if axis has option grid: true
+            if (options.grid) {
+                fontSize = options.labels.style.fontSize;
+                labelMetrics = axis.chart.renderer.fontMetrics(fontSize, label);
+                lblB = labelMetrics.b;
+                lblH = labelMetrics.h;
+
+                if (axis.horiz && options.categories === undefined) {
+                    // Center x position
+                    axisHeight = axis.axisGroup.getBBox().height;
+                    newPos = this.pos + tickInterval / 2;
+                    retVal.x = axis.translate(newPos) + axis.left;
+                    labelCenter = (axisHeight / 2) + (lblH / 2) - Math.abs(lblH - lblB);
+
+                    // Center y position
+                    if (axis.side === axisSide.top) {
+                        retVal.y = y - labelCenter;
+                    } else {
+                        retVal.y = y + labelCenter;
+                    }
+                } else {
+                    // Center y position
+                    if (options.categories === undefined) {
+                        newPos = this.pos + (tickInterval / 2);
+                        retVal.y = axis.translate(newPos) + axis.top + (lblB / 2);
+                    }
+
+                    // Center x position
+                    newX = (this.getLabelWidth() / 2) - (axis.maxLabelLength / 2);
+                    if (axis.side === axisSide.left) {
+                        retVal.x += newX;
+                    } else {
+                        retVal.x -= newX;
+                    }
+                }
+            }
+            return retVal;
+        });
+
+
+        /**
+         * Draw vertical ticks extra long to create cell floors and roofs.
+         * Overrides the tickLength for vertical axes.
+         *
+         * @param {function} proceed - the original function
+         * @returns {array} retVal -
+         */
+        wrap(Axis.prototype, 'tickSize', function(proceed) {
+            var axis = this,
+                retVal = proceed.apply(axis, Array.prototype.slice.call(arguments, 1)),
+                labelPadding,
+                distance;
+
+            if (axis.options.grid && !axis.horiz) {
+                labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
+                if (!axis.maxLabelLength) {
+                    axis.maxLabelLength = axis.getMaxLabelLength();
+                }
+                distance = axis.maxLabelLength + labelPadding;
+
+                retVal[0] = distance;
+            }
+            return retVal;
+        });
+
+        /**
+         * Disregards space required by axisTitle, by adding axisTitle to axisParent
+         * instead of axisGroup, and disregarding margins and offsets related to
+         * axisTitle.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Axis.prototype, 'getOffset', function(proceed) {
+            var axis = this,
+                axisOffset = axis.chart.axisOffset,
+                side = axis.side,
+                axisHeight,
+                tickSize,
+                options = axis.options,
+                axisTitleOptions = options.title,
+                addTitle = axisTitleOptions &&
+                axisTitleOptions.text &&
+                axisTitleOptions.enabled !== false;
+
+            if (axis.options.grid && isObject(axis.options.title)) {
+
+                tickSize = axis.tickSize('tick')[0];
+                if (axisOffset[side] && tickSize) {
+                    axisHeight = axisOffset[side] + tickSize;
+                }
+
+                if (addTitle) {
+                    // Use the custom addTitle() to add it, while preventing making room
+                    // for it
+                    axis.addTitle();
+                }
+
+                proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
+
+                axisOffset[side] = pick(axisHeight, axisOffset[side]);
+
+
+                // Put axis options back after original Axis.getOffset() has been called
+                options.title = axisTitleOptions;
+
+            } else {
+                proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
+            }
+        });
+
+        /**
+         * Prevents rotation of labels when squished, as rotating them would not
+         * help.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Axis.prototype, 'renderUnsquish', function(proceed) {
+            if (this.options.grid) {
+                this.labelRotation = 0;
+                this.options.labels.rotation = 0;
+            }
+            proceed.apply(this);
+        });
+
+        /**
+         * Places leftmost tick at the start of the axis, to create a left wall.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Axis.prototype, 'setOptions', function(proceed, userOptions) {
+            var axis = this;
+            if (userOptions.grid && axis.horiz) {
+                userOptions.startOnTick = true;
+                userOptions.minPadding = 0;
+                userOptions.endOnTick = true;
+            }
+            proceed.apply(this, Array.prototype.slice.call(arguments, 1));
+        });
+
+        /**
+         * Draw an extra line on the far side of the the axisLine,
+         * creating cell roofs of a grid.
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Axis.prototype, 'render', function(proceed) {
+            var axis = this,
+                options = axis.options,
+                labelPadding,
+                distance,
+                lineWidth,
+                linePath,
+                yStartIndex,
+                yEndIndex,
+                xStartIndex,
+                xEndIndex,
+                renderer = axis.chart.renderer,
+                axisGroupBox;
+
+            if (options.grid) {
+                labelPadding = (Math.abs(axis.defaultLeftAxisOptions.labels.x) * 2);
+                distance = axis.maxLabelLength + labelPadding;
+                lineWidth = options.lineWidth;
+
+                // Remove right wall before rendering
+                if (axis.rightWall) {
+                    axis.rightWall.destroy();
+                }
+
+                // Call original Axis.render() to obtain axis.axisLine and
+                // axis.axisGroup
+                proceed.apply(axis);
+
+                axisGroupBox = axis.axisGroup.getBBox();
+
+                // Add right wall on horizontal axes
+                if (axis.horiz) {
+                    axis.rightWall = renderer.path([
+                            'M',
+                            axisGroupBox.x + axis.width + 1, // account for left wall
+                            axisGroupBox.y,
+                            'L',
+                            axisGroupBox.x + axis.width + 1, // account for left wall
+                            axisGroupBox.y + axisGroupBox.height
+                        ])
+                        .attr({
+                            stroke: options.tickColor || '#ccd6eb',
+                            'stroke-width': options.tickWidth || 1,
+                            zIndex: 7,
+                            class: 'grid-wall'
+                        })
+                        .add(axis.axisGroup);
+                }
+
+                if (axis.isOuterAxis() && axis.axisLine) {
+                    if (axis.horiz) {
+                        // -1 to avoid adding distance each time the chart updates
+                        distance = axisGroupBox.height - 1;
+                    }
+
+                    if (lineWidth) {
+                        linePath = axis.getLinePath(lineWidth);
+                        xStartIndex = linePath.indexOf('M') + 1;
+                        xEndIndex = linePath.indexOf('L') + 1;
+                        yStartIndex = linePath.indexOf('M') + 2;
+                        yEndIndex = linePath.indexOf('L') + 2;
+
+                        // Negate distance if top or left axis
+                        if (axis.side === axisSide.top || axis.side === axisSide.left) {
+                            distance = -distance;
+                        }
+
+                        // If axis is horizontal, reposition line path vertically
+                        if (axis.horiz) {
+                            linePath[yStartIndex] = linePath[yStartIndex] + distance;
+                            linePath[yEndIndex] = linePath[yEndIndex] + distance;
+                        } else {
+                            // If axis is vertical, reposition line path horizontally
+                            linePath[xStartIndex] = linePath[xStartIndex] + distance;
+                            linePath[xEndIndex] = linePath[xEndIndex] + distance;
+                        }
+
+                        if (!axis.axisLineExtra) {
+                            axis.axisLineExtra = renderer.path(linePath)
+                                .attr({
+                                    stroke: options.lineColor,
+                                    'stroke-width': lineWidth,
+                                    zIndex: 7
+                                })
+                                .add(axis.axisGroup);
+                        } else {
+                            axis.axisLineExtra.animate({
+                                d: linePath
+                            });
+                        }
+
+                        // show or hide the line depending on options.showEmpty
+                        axis.axisLine[axis.showAxis ? 'show' : 'hide'](true);
+                    }
+                }
+            } else {
+                proceed.apply(axis);
+            }
+        });
+
+        /**
+         * Wraps chart rendering with the following customizations:
+         * 1. Prohibit timespans of multitudes of a time unit
+         * 2. Draw cell walls on vertical axes
+         *
+         * @param {function} proceed - the original function
+         */
+        wrap(Chart.prototype, 'render', function(proceed) {
+            // 25 is optimal height for default fontSize (11px)
+            // 25 / 11 ≈ 2.28
+            var fontSizeToCellHeightRatio = 25 / 11,
+                fontMetrics,
+                fontSize;
+
+            each(this.axes, function(axis) {
+                var options = axis.options;
+                if (options.grid) {
+                    fontSize = options.labels.style.fontSize;
+                    fontMetrics = axis.chart.renderer.fontMetrics(fontSize);
+
+                    // Prohibit timespans of multitudes of a time unit,
+                    // e.g. two days, three weeks, etc.
+                    if (options.type === 'datetime') {
+                        options.units = [
+                            ['millisecond', [1]],
+                            ['second', [1]],
+                            ['minute', [1]],
+                            ['hour', [1]],
+                            ['day', [1]],
+                            ['week', [1]],
+                            ['month', [1]],
+                            ['year', null]
+                        ];
+                    }
+
+                    // Make tick marks taller, creating cell walls of a grid.
+                    // Use cellHeight axis option if set
+                    if (axis.horiz) {
+                        options.tickLength = options.cellHeight ||
+                            fontMetrics.h * fontSizeToCellHeightRatio;
+                    } else {
+                        options.tickWidth = 1;
+                        if (!options.lineWidth) {
+                            options.lineWidth = 1;
+                        }
+                    }
+                }
+            });
+
+            // Call original Chart.render()
+            proceed.apply(this);
+        });
+
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 25 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/modules/heatmap.js


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

@@ -0,0 +1,798 @@
+/**
+ * @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) 2010-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         */
+        'use strict';
+        var Axis = H.Axis,
+            Chart = H.Chart,
+            color = H.color,
+            ColorAxis,
+            each = H.each,
+            extend = H.extend,
+            isNumber = H.isNumber,
+            Legend = H.Legend,
+            LegendSymbolMixin = H.LegendSymbolMixin,
+            noop = H.noop,
+            merge = H.merge,
+            pick = H.pick,
+            wrap = H.wrap;
+
+        /**
+         * The ColorAxis object for inclusion in gradient legends
+         */
+        ColorAxis = H.ColorAxis = function() {
+            this.init.apply(this, arguments);
+        };
+        extend(ColorAxis.prototype, Axis.prototype);
+        extend(ColorAxis.prototype, {
+            defaultColorAxisOptions: {
+                lineWidth: 0,
+                minPadding: 0,
+                maxPadding: 0,
+                gridLineWidth: 1,
+                tickPixelInterval: 72,
+                startOnTick: true,
+                endOnTick: true,
+                offset: 0,
+                marker: {
+                    animation: {
+                        duration: 50
+                    },
+                    width: 0.01
+
+                },
+                labels: {
+                    overflow: 'justify'
+                },
+                minColor: '#e6ebf5',
+                maxColor: '#003399',
+                tickLength: 5,
+                showInLegend: true
+            },
+
+            // Properties to preserve after destroy, for Axis.update (#5881)
+            keepProps: ['legendGroup', 'legendItem', 'legendSymbol']
+                .concat(Axis.prototype.keepProps),
+
+            /**
+             * Initialize the color axis
+             */
+            init: function(chart, userOptions) {
+                var horiz = chart.options.legend.layout !== 'vertical',
+                    options;
+
+                this.coll = 'colorAxis';
+
+                // Build the options
+                options = merge(this.defaultColorAxisOptions, {
+                    side: horiz ? 2 : 1,
+                    reversed: !horiz
+                }, userOptions, {
+                    opposite: !horiz,
+                    showEmpty: false,
+                    title: null
+                });
+
+                Axis.prototype.init.call(this, chart, options);
+
+                // Base init() pushes it to the xAxis array, now pop it again
+                //chart[this.isXAxis ? 'xAxis' : 'yAxis'].pop();
+
+                // Prepare data classes
+                if (userOptions.dataClasses) {
+                    this.initDataClasses(userOptions);
+                }
+                this.initStops(userOptions);
+
+                // Override original axis properties
+                this.horiz = horiz;
+                this.zoomEnabled = false;
+
+                // Add default values		
+                this.defaultLegendLength = 200;
+            },
+
+            /*
+             * Return an intermediate color between two colors, according to pos where 0
+             * is the from color and 1 is the to color.
+             * NOTE: Changes here should be copied
+             * to the same function in drilldown.src.js and solid-gauge-src.js.
+             */
+            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;
+            },
+
+            initDataClasses: function(userOptions) {
+                var axis = this,
+                    chart = this.chart,
+                    dataClasses,
+                    colorCounter = 0,
+                    colorCount = chart.options.chart.colorCount,
+                    options = this.options,
+                    len = userOptions.dataClasses.length;
+                this.dataClasses = dataClasses = [];
+                this.legendItems = [];
+
+                each(userOptions.dataClasses, function(dataClass, i) {
+                    var colors;
+
+                    dataClass = merge(dataClass);
+                    dataClasses.push(dataClass);
+                    if (!dataClass.color) {
+                        if (options.dataClassColor === 'category') {
+
+                            dataClass.colorIndex = colorCounter;
+
+                            // increase and loop back to zero
+                            colorCounter++;
+                            if (colorCounter === colorCount) {
+                                colorCounter = 0;
+                            }
+                        } else {
+                            dataClass.color = axis.tweenColors(
+                                color(options.minColor),
+                                color(options.maxColor),
+                                len < 2 ? 0.5 : i / (len - 1) // #3219
+                            );
+                        }
+                    }
+                });
+            },
+
+            initStops: function(userOptions) {
+                this.stops = userOptions.stops || [
+                    [0, this.options.minColor],
+                    [1, this.options.maxColor]
+                ];
+                each(this.stops, function(stop) {
+                    stop.color = color(stop[1]);
+                });
+            },
+
+            /**
+             * Extend the setOptions method to process extreme colors and color
+             * stops.
+             */
+            setOptions: function(userOptions) {
+                Axis.prototype.setOptions.call(this, userOptions);
+
+                this.options.crosshair = this.options.marker;
+            },
+
+            setAxisSize: function() {
+                var symbol = this.legendSymbol,
+                    chart = this.chart,
+                    legendOptions = chart.options.legend || {},
+                    x,
+                    y,
+                    width,
+                    height;
+
+                if (symbol) {
+                    this.left = x = symbol.attr('x');
+                    this.top = y = symbol.attr('y');
+                    this.width = width = symbol.attr('width');
+                    this.height = height = symbol.attr('height');
+                    this.right = chart.chartWidth - x - width;
+                    this.bottom = chart.chartHeight - y - height;
+
+                    this.len = this.horiz ? width : height;
+                    this.pos = this.horiz ? x : y;
+                } else {
+                    // Fake length for disabled legend to avoid tick issues and such (#5205)
+                    this.len = (this.horiz ? legendOptions.symbolWidth : legendOptions.symbolHeight) || this.defaultLegendLength;
+                }
+            },
+
+            /**
+             * 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;
+                                point.colorIndex = dataClass.colorIndex;
+                            }
+                            break;
+                        }
+                    }
+
+                } else {
+
+                    if (this.isLog) {
+                        value = this.val2lin(value);
+                    }
+                    pos = 1 - ((this.max - value) / ((this.max - this.min) || 1));
+                    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;
+            },
+
+            /**
+             * Override the getOffset method to add the whole axis groups inside the legend.
+             */
+            getOffset: function() {
+                var group = this.legendGroup,
+                    sideOffset = this.chart.axisOffset[this.side];
+
+                if (group) {
+
+                    // Hook for the getOffset method to add groups to this parent group
+                    this.axisParent = group;
+
+                    // Call the base
+                    Axis.prototype.getOffset.call(this);
+
+                    // First time only
+                    if (!this.added) {
+
+                        this.added = true;
+
+                        this.labelLeft = 0;
+                        this.labelRight = this.width;
+                    }
+                    // Reset it to avoid color axis reserving space
+                    this.chart.axisOffset[this.side] = sideOffset;
+                }
+            },
+
+            /**
+             * Create the color gradient
+             */
+            setLegendColor: function() {
+                var grad,
+                    horiz = this.horiz,
+                    options = this.options,
+                    reversed = this.reversed,
+                    one = reversed ? 1 : 0,
+                    zero = reversed ? 0 : 1;
+
+                grad = horiz ? [one, 0, zero, 0] : [0, zero, 0, one]; // #3190
+                this.legendColor = {
+                    linearGradient: {
+                        x1: grad[0],
+                        y1: grad[1],
+                        x2: grad[2],
+                        y2: grad[3]
+                    },
+                    stops: options.stops || [
+                        [0, options.minColor],
+                        [1, options.maxColor]
+                    ]
+                };
+            },
+
+            /**
+             * The color axis appears inside the legend and has its own legend symbol
+             */
+            drawLegendSymbol: function(legend, item) {
+                var padding = legend.padding,
+                    legendOptions = legend.options,
+                    horiz = this.horiz,
+                    width = pick(legendOptions.symbolWidth, horiz ? this.defaultLegendLength : 12),
+                    height = pick(legendOptions.symbolHeight, horiz ? 12 : this.defaultLegendLength),
+                    labelPadding = pick(legendOptions.labelPadding, horiz ? 16 : 30),
+                    itemDistance = pick(legendOptions.itemDistance, 10);
+
+                this.setLegendColor();
+
+                // Create the gradient
+                item.legendSymbol = this.chart.renderer.rect(
+                    0,
+                    legend.baseline - 11,
+                    width,
+                    height
+                ).attr({
+                    zIndex: 1
+                }).add(item.legendGroup);
+
+                // Set how much space this legend item takes up
+                this.legendItemWidth = width + padding + (horiz ? itemDistance : labelPadding);
+                this.legendItemHeight = height + padding + (horiz ? labelPadding : 0);
+            },
+            /**
+             * Fool the legend
+             */
+            setState: noop,
+            visible: true,
+            setVisible: noop,
+            getSeriesExtremes: function() {
+                var series;
+                if (this.series.length) {
+                    series = this.series[0];
+                    this.dataMin = series.valueMin;
+                    this.dataMax = series.valueMax;
+                }
+            },
+            drawCrosshair: function(e, point) {
+                var plotX = point && point.plotX,
+                    plotY = point && point.plotY,
+                    crossPos,
+                    axisPos = this.pos,
+                    axisLen = this.len;
+
+                if (point) {
+                    crossPos = this.toPixels(point[point.series.colorKey]);
+                    if (crossPos < axisPos) {
+                        crossPos = axisPos - 2;
+                    } else if (crossPos > axisPos + axisLen) {
+                        crossPos = axisPos + axisLen + 2;
+                    }
+
+                    point.plotX = crossPos;
+                    point.plotY = this.len - crossPos;
+                    Axis.prototype.drawCrosshair.call(this, e, point);
+                    point.plotX = plotX;
+                    point.plotY = plotY;
+
+                    if (this.cross) {
+                        this.cross
+                            .addClass('highcharts-coloraxis-marker')
+                            .add(this.legendGroup);
+
+
+
+                    }
+                }
+            },
+            getPlotLinePath: function(a, b, c, d, pos) {
+                return isNumber(pos) ? // crosshairs only // #3969 pos can be 0 !!
+                    (this.horiz ? ['M', pos - 4, this.top - 6, 'L', pos + 4, this.top - 6, pos, this.top, 'Z'] : ['M', this.left, pos, 'L', this.left - 6, pos + 6, this.left - 6, pos - 6, 'Z']) :
+                    Axis.prototype.getPlotLinePath.call(this, a, b, c, d);
+            },
+
+            update: function(newOptions, redraw) {
+                var chart = this.chart,
+                    legend = chart.legend;
+
+                each(this.series, function(series) {
+                    series.isDirtyData = true; // Needed for Axis.update when choropleth colors change
+                });
+
+                // When updating data classes, destroy old items and make sure new ones are created (#3207)
+                if (newOptions.dataClasses && legend.allItems) {
+                    each(legend.allItems, function(item) {
+                        if (item.isDataClass) {
+                            item.legendGroup.destroy();
+                        }
+                    });
+                    chart.isDirtyLegend = true;
+                }
+
+                // Keep the options structure updated for export. Unlike xAxis and yAxis, the colorAxis is
+                // not an array. (#3207)
+                chart.options[this.coll] = merge(this.userOptions, newOptions);
+
+                Axis.prototype.update.call(this, newOptions, redraw);
+                if (this.legendItem) {
+                    this.setLegendColor();
+                    legend.colorizeItem(this, true);
+                }
+            },
+
+            /**
+             * Get the legend item symbols for data classes
+             */
+            getDataClassLegendSymbols: function() {
+                var axis = this,
+                    chart = this.chart,
+                    legendItems = this.legendItems,
+                    legendOptions = chart.options.legend,
+                    valueDecimals = legendOptions.valueDecimals,
+                    valueSuffix = legendOptions.valueSuffix || '',
+                    name;
+
+                if (!legendItems.length) {
+                    each(this.dataClasses, function(dataClass, i) {
+                        var vis = true,
+                            from = dataClass.from,
+                            to = dataClass.to;
+
+                        // Assemble the default name. This can be overridden by legend.options.labelFormatter
+                        name = '';
+                        if (from === undefined) {
+                            name = '< ';
+                        } else if (to === undefined) {
+                            name = '> ';
+                        }
+                        if (from !== undefined) {
+                            name += H.numberFormat(from, valueDecimals) + valueSuffix;
+                        }
+                        if (from !== undefined && to !== undefined) {
+                            name += ' - ';
+                        }
+                        if (to !== undefined) {
+                            name += H.numberFormat(to, valueDecimals) + valueSuffix;
+                        }
+                        // Add a mock object to the legend items
+                        legendItems.push(extend({
+                            chart: chart,
+                            name: name,
+                            options: {},
+                            drawLegendSymbol: LegendSymbolMixin.drawRectangle,
+                            visible: true,
+                            setState: noop,
+                            isDataClass: true,
+                            setVisible: function() {
+                                vis = this.visible = !vis;
+                                each(axis.series, function(series) {
+                                    each(series.points, function(point) {
+                                        if (point.dataClass === i) {
+                                            point.setVisible(vis);
+                                        }
+                                    });
+                                });
+
+                                chart.legend.colorizeItem(this, vis);
+                            }
+                        }, dataClass));
+                    });
+                }
+                return legendItems;
+            },
+            name: '' // Prevents 'undefined' in legend in IE8
+        });
+
+        /**
+         * Handle animation of the color attributes directly
+         */
+        each(['fill', 'stroke'], function(prop) {
+            H.Fx.prototype[prop + 'Setter'] = function() {
+                this.elem.attr(
+                    prop,
+                    ColorAxis.prototype.tweenColors(
+                        color(this.start),
+                        color(this.end),
+                        this.pos
+                    ),
+                    null,
+                    true
+                );
+            };
+        });
+
+        /**
+         * Extend the chart getAxes method to also get the color axis
+         */
+        wrap(Chart.prototype, 'getAxes', function(proceed) {
+
+            var options = this.options,
+                colorAxisOptions = options.colorAxis;
+
+            proceed.call(this);
+
+            this.colorAxis = [];
+            if (colorAxisOptions) {
+                new ColorAxis(this, colorAxisOptions); // eslint-disable-line no-new
+            }
+        });
+
+
+        /**
+         * Wrap the legend getAllItems method to add the color axis. This also removes the
+         * axis' own series to prevent them from showing up individually.
+         */
+        wrap(Legend.prototype, 'getAllItems', function(proceed) {
+            var allItems = [],
+                colorAxis = this.chart.colorAxis[0];
+
+            if (colorAxis && colorAxis.options) {
+                if (colorAxis.options.showInLegend) {
+                    // Data classes
+                    if (colorAxis.options.dataClasses) {
+                        allItems = allItems.concat(colorAxis.getDataClassLegendSymbols());
+                        // Gradient legend
+                    } else {
+                        // Add this axis on top
+                        allItems.push(colorAxis);
+                    }
+                }
+
+                // Don't add the color axis' series
+                each(colorAxis.series, function(series) {
+                    series.options.showInLegend = false;
+                });
+            }
+
+            return allItems.concat(proceed.call(this));
+        });
+
+        wrap(Legend.prototype, 'colorizeItem', function(proceed, item, visible) {
+            proceed.call(this, item, visible);
+            if (visible && item.legendColor) {
+                item.legendSymbol.attr({
+                    fill: item.legendColor
+                });
+            }
+        });
+
+    }(Highcharts));
+    (function(H) {
+        /**
+         * (c) 2010-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         */
+        'use strict';
+        var defined = H.defined,
+            each = H.each,
+            noop = H.noop,
+            seriesTypes = H.seriesTypes;
+
+        /**
+         * Mixin for maps and heatmaps
+         */
+        H.colorPointMixin = {
+            /**
+             * Color points have a value option that determines whether or not it is a null point
+             */
+            isValid: function() {
+                return this.value !== null;
+            },
+
+            /**
+             * Set the visibility of a single point
+             */
+            setVisible: function(vis) {
+                var point = this,
+                    method = vis ? 'show' : 'hide';
+
+                // Show and hide associated elements
+                each(['graphic', 'dataLabel'], function(key) {
+                    if (point[key]) {
+                        point[key][method]();
+                    }
+                });
+            },
+            setState: function(state) {
+                H.Point.prototype.setState.call(this, state);
+                if (this.graphic) {
+                    this.graphic.attr({
+                        zIndex: state === 'hover' ? 1 : 0
+                    });
+                }
+            }
+        };
+
+        H.colorSeriesMixin = {
+            pointArrayMap: ['value'],
+            axisTypes: ['xAxis', 'yAxis', 'colorAxis'],
+            optionalAxis: 'colorAxis',
+            trackerGroups: ['group', 'markerGroup', 'dataLabelsGroup'],
+            getSymbol: noop,
+            parallelArrays: ['x', 'y', 'value'],
+            colorKey: 'value',
+
+
+
+            /**
+             * In choropleth maps, the color is a result of the value, so this needs translation too
+             */
+            translateColors: function() {
+                var series = this,
+                    nullColor = this.options.nullColor,
+                    colorAxis = this.colorAxis,
+                    colorKey = this.colorKey;
+
+                each(this.data, function(point) {
+                    var value = point[colorKey],
+                        color;
+
+                    color = point.options.color ||
+                        (point.isNull ? nullColor : (colorAxis && value !== undefined) ? colorAxis.toColor(value, point) : point.color || series.color);
+
+                    if (color) {
+                        point.color = color;
+                    }
+                });
+            },
+
+            /**
+             * Get the color attibutes to apply on the graphic
+             */
+            colorAttribs: function(point) {
+                var ret = {};
+                if (defined(point.color)) {
+                    ret[this.colorProp || 'fill'] = point.color;
+                }
+                return ret;
+            }
+        };
+
+    }(Highcharts));
+    (function(H) {
+        /**
+         * (c) 2010-2016 Torstein Honsi
+         *
+         * License: www.highcharts.com/license
+         */
+        'use strict';
+        var colorPointMixin = H.colorPointMixin,
+            colorSeriesMixin = H.colorSeriesMixin,
+            each = H.each,
+            LegendSymbolMixin = H.LegendSymbolMixin,
+            merge = H.merge,
+            noop = H.noop,
+            pick = H.pick,
+            Series = H.Series,
+            seriesType = H.seriesType,
+            seriesTypes = H.seriesTypes;
+
+        // The Heatmap series type
+        seriesType('heatmap', 'scatter', {
+            animation: false,
+            borderWidth: 0,
+
+            dataLabels: {
+                formatter: function() { // #2945
+                    return this.point.value;
+                },
+                inside: true,
+                verticalAlign: 'middle',
+                crop: false,
+                overflow: false,
+                padding: 0 // #3837
+            },
+            marker: null,
+            pointRange: null, // dynamically set to colsize by default
+            tooltip: {
+                pointFormat: '{point.x}, {point.y}: {point.value}<br/>'
+            },
+            states: {
+                normal: {
+                    animation: true
+                },
+                hover: {
+                    halo: false, // #3406, halo is not required on heatmaps
+                    brightness: 0.2
+                }
+            }
+        }, merge(colorSeriesMixin, {
+            pointArrayMap: ['y', 'value'],
+            hasPointSpecificOptions: true,
+            supportsDrilldown: true,
+            getExtremesFromAll: true,
+            directTouch: true,
+
+            /**
+             * Override the init method to add point ranges on both axes.
+             */
+            init: function() {
+                var options;
+                seriesTypes.scatter.prototype.init.apply(this, arguments);
+
+                options = this.options;
+                options.pointRange = pick(options.pointRange, options.colsize || 1); // #3758, prevent resetting in setData
+                this.yAxis.axisPointRange = options.rowsize || 1; // general point range
+            },
+            translate: function() {
+                var series = this,
+                    options = series.options,
+                    xAxis = series.xAxis,
+                    yAxis = series.yAxis,
+                    between = function(x, a, b) {
+                        return Math.min(Math.max(a, x), b);
+                    };
+
+                series.generatePoints();
+
+                each(series.points, function(point) {
+                    var xPad = (options.colsize || 1) / 2,
+                        yPad = (options.rowsize || 1) / 2,
+                        x1 = between(Math.round(xAxis.len - xAxis.translate(point.x - xPad, 0, 1, 0, 1)), -xAxis.len, 2 * xAxis.len),
+                        x2 = between(Math.round(xAxis.len - xAxis.translate(point.x + xPad, 0, 1, 0, 1)), -xAxis.len, 2 * xAxis.len),
+                        y1 = between(Math.round(yAxis.translate(point.y - yPad, 0, 1, 0, 1)), -yAxis.len, 2 * yAxis.len),
+                        y2 = between(Math.round(yAxis.translate(point.y + yPad, 0, 1, 0, 1)), -yAxis.len, 2 * yAxis.len);
+
+                    // Set plotX and plotY for use in K-D-Tree and more
+                    point.plotX = point.clientX = (x1 + x2) / 2;
+                    point.plotY = (y1 + y2) / 2;
+
+                    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)
+                    };
+                });
+
+                series.translateColors();
+            },
+            drawPoints: function() {
+                seriesTypes.column.prototype.drawPoints.call(this);
+
+                each(this.points, function(point) {
+
+                    // In styled mode, use CSS, otherwise the fill used in the style
+                    // sheet will take precesence over the fill attribute.
+                    point.graphic.css(this.colorAttribs(point));
+
+                }, this);
+            },
+            animate: noop,
+            getBox: noop,
+            drawLegendSymbol: LegendSymbolMixin.drawRectangle,
+            alignDataLabel: seriesTypes.column.prototype.alignDataLabel,
+            getExtremes: function() {
+                // Get the extremes from the value data
+                Series.prototype.getExtremes.call(this, this.valueData);
+                this.valueMin = this.dataMin;
+                this.valueMax = this.dataMax;
+
+                // Get the extremes from the y data
+                Series.prototype.getExtremes.call(this);
+            }
+
+        }), colorPointMixin);
+
+    }(Highcharts));
+}));

+ 317 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/dark-blue.js

@@ -0,0 +1,317 @@
+/**
+ * @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
+         *
+         * Dark blue theme for Highcharts JS
+         * @author Torstein Honsi
+         */
+        'use strict';
+        Highcharts.theme = {
+            colors: ['#DDDF0D', '#55BF3B', '#DF5353', '#7798BF', '#aaeeee', '#ff0066', '#eeaaee',
+                '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'
+            ],
+            chart: {
+                backgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 1,
+                        y2: 1
+                    },
+                    stops: [
+                        [0, 'rgb(48, 48, 96)'],
+                        [1, 'rgb(0, 0, 0)']
+                    ]
+                },
+                borderColor: '#000000',
+                borderWidth: 2,
+                className: 'dark-container',
+                plotBackgroundColor: 'rgba(255, 255, 255, .1)',
+                plotBorderColor: '#CCCCCC',
+                plotBorderWidth: 1
+            },
+            title: {
+                style: {
+                    color: '#C0C0C0',
+                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+                }
+            },
+            subtitle: {
+                style: {
+                    color: '#666666',
+                    font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+                }
+            },
+            xAxis: {
+                gridLineColor: '#333333',
+                gridLineWidth: 1,
+                labels: {
+                    style: {
+                        color: '#A0A0A0'
+                    }
+                },
+                lineColor: '#A0A0A0',
+                tickColor: '#A0A0A0',
+                title: {
+                    style: {
+                        color: '#CCC',
+                        fontWeight: 'bold',
+                        fontSize: '12px',
+                        fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+                    }
+                }
+            },
+            yAxis: {
+                gridLineColor: '#333333',
+                labels: {
+                    style: {
+                        color: '#A0A0A0'
+                    }
+                },
+                lineColor: '#A0A0A0',
+                minorTickInterval: null,
+                tickColor: '#A0A0A0',
+                tickWidth: 1,
+                title: {
+                    style: {
+                        color: '#CCC',
+                        fontWeight: 'bold',
+                        fontSize: '12px',
+                        fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+                    }
+                }
+            },
+            tooltip: {
+                backgroundColor: 'rgba(0, 0, 0, 0.75)',
+                style: {
+                    color: '#F0F0F0'
+                }
+            },
+            toolbar: {
+                itemStyle: {
+                    color: 'silver'
+                }
+            },
+            plotOptions: {
+                line: {
+                    dataLabels: {
+                        color: '#CCC'
+                    },
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                spline: {
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                scatter: {
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                candlestick: {
+                    lineColor: 'white'
+                }
+            },
+            legend: {
+                itemStyle: {
+                    font: '9pt Trebuchet MS, Verdana, sans-serif',
+                    color: '#A0A0A0'
+                },
+                itemHoverStyle: {
+                    color: '#FFF'
+                },
+                itemHiddenStyle: {
+                    color: '#444'
+                }
+            },
+            credits: {
+                style: {
+                    color: '#666'
+                }
+            },
+            labels: {
+                style: {
+                    color: '#CCC'
+                }
+            },
+
+            navigation: {
+                buttonOptions: {
+                    symbolStroke: '#DDDDDD',
+                    hoverSymbolStroke: '#FFFFFF',
+                    theme: {
+                        fill: {
+                            linearGradient: {
+                                x1: 0,
+                                y1: 0,
+                                x2: 0,
+                                y2: 1
+                            },
+                            stops: [
+                                [0.4, '#606060'],
+                                [0.6, '#333333']
+                            ]
+                        },
+                        stroke: '#000000'
+                    }
+                }
+            },
+
+            // scroll charts
+            rangeSelector: {
+                buttonTheme: {
+                    fill: {
+                        linearGradient: {
+                            x1: 0,
+                            y1: 0,
+                            x2: 0,
+                            y2: 1
+                        },
+                        stops: [
+                            [0.4, '#888'],
+                            [0.6, '#555']
+                        ]
+                    },
+                    stroke: '#000000',
+                    style: {
+                        color: '#CCC',
+                        fontWeight: 'bold'
+                    },
+                    states: {
+                        hover: {
+                            fill: {
+                                linearGradient: {
+                                    x1: 0,
+                                    y1: 0,
+                                    x2: 0,
+                                    y2: 1
+                                },
+                                stops: [
+                                    [0.4, '#BBB'],
+                                    [0.6, '#888']
+                                ]
+                            },
+                            stroke: '#000000',
+                            style: {
+                                color: 'white'
+                            }
+                        },
+                        select: {
+                            fill: {
+                                linearGradient: {
+                                    x1: 0,
+                                    y1: 0,
+                                    x2: 0,
+                                    y2: 1
+                                },
+                                stops: [
+                                    [0.1, '#000'],
+                                    [0.3, '#333']
+                                ]
+                            },
+                            stroke: '#000000',
+                            style: {
+                                color: 'yellow'
+                            }
+                        }
+                    }
+                },
+                inputStyle: {
+                    backgroundColor: '#333',
+                    color: 'silver'
+                },
+                labelStyle: {
+                    color: 'silver'
+                }
+            },
+
+            navigator: {
+                handles: {
+                    backgroundColor: '#666',
+                    borderColor: '#AAA'
+                },
+                outlineColor: '#CCC',
+                maskFill: 'rgba(16, 16, 16, 0.5)',
+                series: {
+                    color: '#7798BF',
+                    lineColor: '#A6C7ED'
+                }
+            },
+
+            scrollbar: {
+                barBackgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0.4, '#888'],
+                        [0.6, '#555']
+                    ]
+                },
+                barBorderColor: '#CCC',
+                buttonArrowColor: '#CCC',
+                buttonBackgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0.4, '#888'],
+                        [0.6, '#555']
+                    ]
+                },
+                buttonBorderColor: '#CCC',
+                rifleColor: '#FFF',
+                trackBackgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0, '#000'],
+                        [1, '#333']
+                    ]
+                },
+                trackBorderColor: '#666'
+            },
+
+            // special colors for some of the
+            legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+            background2: 'rgb(35, 35, 70)',
+            dataLabelsColor: '#444',
+            textColor: '#C0C0C0',
+            maskColor: 'rgba(255,255,255,0.3)'
+        };
+
+        // Apply the theme
+        Highcharts.setOptions(Highcharts.theme);
+
+    }(Highcharts));
+}));

+ 314 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/dark-green.js

@@ -0,0 +1,314 @@
+/**
+ * @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
+         * 
+         * Dark blue theme for Highcharts JS
+         * @author Torstein Honsi
+         */
+
+        'use strict';
+        Highcharts.theme = {
+            colors: ['#DDDF0D', '#55BF3B', '#DF5353', '#7798BF', '#aaeeee', '#ff0066', '#eeaaee',
+                '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'
+            ],
+            chart: {
+                backgroundColor: {
+                    linearGradient: [0, 0, 250, 500],
+                    stops: [
+                        [0, 'rgb(48, 96, 48)'],
+                        [1, 'rgb(0, 0, 0)']
+                    ]
+                },
+                borderColor: '#000000',
+                borderWidth: 2,
+                className: 'dark-container',
+                plotBackgroundColor: 'rgba(255, 255, 255, .1)',
+                plotBorderColor: '#CCCCCC',
+                plotBorderWidth: 1
+            },
+            title: {
+                style: {
+                    color: '#C0C0C0',
+                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+                }
+            },
+            subtitle: {
+                style: {
+                    color: '#666666',
+                    font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+                }
+            },
+            xAxis: {
+                gridLineColor: '#333333',
+                gridLineWidth: 1,
+                labels: {
+                    style: {
+                        color: '#A0A0A0'
+                    }
+                },
+                lineColor: '#A0A0A0',
+                tickColor: '#A0A0A0',
+                title: {
+                    style: {
+                        color: '#CCC',
+                        fontWeight: 'bold',
+                        fontSize: '12px',
+                        fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+                    }
+                }
+            },
+            yAxis: {
+                gridLineColor: '#333333',
+                labels: {
+                    style: {
+                        color: '#A0A0A0'
+                    }
+                },
+                lineColor: '#A0A0A0',
+                minorTickInterval: null,
+                tickColor: '#A0A0A0',
+                tickWidth: 1,
+                title: {
+                    style: {
+                        color: '#CCC',
+                        fontWeight: 'bold',
+                        fontSize: '12px',
+                        fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+                    }
+                }
+            },
+            tooltip: {
+                backgroundColor: 'rgba(0, 0, 0, 0.75)',
+                style: {
+                    color: '#F0F0F0'
+                }
+            },
+            toolbar: {
+                itemStyle: {
+                    color: 'silver'
+                }
+            },
+            plotOptions: {
+                line: {
+                    dataLabels: {
+                        color: '#CCC'
+                    },
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                spline: {
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                scatter: {
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                candlestick: {
+                    lineColor: 'white'
+                }
+            },
+            legend: {
+                itemStyle: {
+                    font: '9pt Trebuchet MS, Verdana, sans-serif',
+                    color: '#A0A0A0'
+                },
+                itemHoverStyle: {
+                    color: '#FFF'
+                },
+                itemHiddenStyle: {
+                    color: '#444'
+                }
+            },
+            credits: {
+                style: {
+                    color: '#666'
+                }
+            },
+            labels: {
+                style: {
+                    color: '#CCC'
+                }
+            },
+
+
+            navigation: {
+                buttonOptions: {
+                    symbolStroke: '#DDDDDD',
+                    hoverSymbolStroke: '#FFFFFF',
+                    theme: {
+                        fill: {
+                            linearGradient: {
+                                x1: 0,
+                                y1: 0,
+                                x2: 0,
+                                y2: 1
+                            },
+                            stops: [
+                                [0.4, '#606060'],
+                                [0.6, '#333333']
+                            ]
+                        },
+                        stroke: '#000000'
+                    }
+                }
+            },
+
+            // scroll charts
+            rangeSelector: {
+                buttonTheme: {
+                    fill: {
+                        linearGradient: {
+                            x1: 0,
+                            y1: 0,
+                            x2: 0,
+                            y2: 1
+                        },
+                        stops: [
+                            [0.4, '#888'],
+                            [0.6, '#555']
+                        ]
+                    },
+                    stroke: '#000000',
+                    style: {
+                        color: '#CCC',
+                        fontWeight: 'bold'
+                    },
+                    states: {
+                        hover: {
+                            fill: {
+                                linearGradient: {
+                                    x1: 0,
+                                    y1: 0,
+                                    x2: 0,
+                                    y2: 1
+                                },
+                                stops: [
+                                    [0.4, '#BBB'],
+                                    [0.6, '#888']
+                                ]
+                            },
+                            stroke: '#000000',
+                            style: {
+                                color: 'white'
+                            }
+                        },
+                        select: {
+                            fill: {
+                                linearGradient: {
+                                    x1: 0,
+                                    y1: 0,
+                                    x2: 0,
+                                    y2: 1
+                                },
+                                stops: [
+                                    [0.1, '#000'],
+                                    [0.3, '#333']
+                                ]
+                            },
+                            stroke: '#000000',
+                            style: {
+                                color: 'yellow'
+                            }
+                        }
+                    }
+                },
+                inputStyle: {
+                    backgroundColor: '#333',
+                    color: 'silver'
+                },
+                labelStyle: {
+                    color: 'silver'
+                }
+            },
+
+            navigator: {
+                handles: {
+                    backgroundColor: '#666',
+                    borderColor: '#AAA'
+                },
+                outlineColor: '#CCC',
+                maskFill: 'rgba(16, 16, 16, 0.5)',
+                series: {
+                    color: '#7798BF',
+                    lineColor: '#A6C7ED'
+                }
+            },
+
+            scrollbar: {
+                barBackgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0.4, '#888'],
+                        [0.6, '#555']
+                    ]
+                },
+                barBorderColor: '#CCC',
+                buttonArrowColor: '#CCC',
+                buttonBackgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0.4, '#888'],
+                        [0.6, '#555']
+                    ]
+                },
+                buttonBorderColor: '#CCC',
+                rifleColor: '#FFF',
+                trackBackgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0, '#000'],
+                        [1, '#333']
+                    ]
+                },
+                trackBorderColor: '#666'
+            },
+
+            // special colors for some of the
+            legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+            background2: 'rgb(35, 35, 70)',
+            dataLabelsColor: '#444',
+            textColor: '#C0C0C0',
+            maskColor: 'rgba(255,255,255,0.3)'
+        };
+
+        // Apply the theme
+        Highcharts.setOptions(Highcharts.theme);
+
+    }(Highcharts));
+}));

+ 243 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/dark-unica.js

@@ -0,0 +1,243 @@
+/**
+ * @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
+         * 
+         * Dark theme for Highcharts JS
+         * @author Torstein Honsi
+         */
+
+        'use strict';
+        /* global document */
+        // Load the fonts
+        Highcharts.createElement('link', {
+            href: 'https://fonts.googleapis.com/css?family=Unica+One',
+            rel: 'stylesheet',
+            type: 'text/css'
+        }, null, document.getElementsByTagName('head')[0]);
+
+        Highcharts.theme = {
+            colors: ['#2b908f', '#90ee7e', '#f45b5b', '#7798BF', '#aaeeee', '#ff0066', '#eeaaee',
+                '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'
+            ],
+            chart: {
+                backgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 1,
+                        y2: 1
+                    },
+                    stops: [
+                        [0, '#2a2a2b'],
+                        [1, '#3e3e40']
+                    ]
+                },
+                style: {
+                    fontFamily: '\'Unica One\', sans-serif'
+                },
+                plotBorderColor: '#606063'
+            },
+            title: {
+                style: {
+                    color: '#E0E0E3',
+                    textTransform: 'uppercase',
+                    fontSize: '20px'
+                }
+            },
+            subtitle: {
+                style: {
+                    color: '#E0E0E3',
+                    textTransform: 'uppercase'
+                }
+            },
+            xAxis: {
+                gridLineColor: '#707073',
+                labels: {
+                    style: {
+                        color: '#E0E0E3'
+                    }
+                },
+                lineColor: '#707073',
+                minorGridLineColor: '#505053',
+                tickColor: '#707073',
+                title: {
+                    style: {
+                        color: '#A0A0A3'
+
+                    }
+                }
+            },
+            yAxis: {
+                gridLineColor: '#707073',
+                labels: {
+                    style: {
+                        color: '#E0E0E3'
+                    }
+                },
+                lineColor: '#707073',
+                minorGridLineColor: '#505053',
+                tickColor: '#707073',
+                tickWidth: 1,
+                title: {
+                    style: {
+                        color: '#A0A0A3'
+                    }
+                }
+            },
+            tooltip: {
+                backgroundColor: 'rgba(0, 0, 0, 0.85)',
+                style: {
+                    color: '#F0F0F0'
+                }
+            },
+            plotOptions: {
+                series: {
+                    dataLabels: {
+                        color: '#B0B0B3'
+                    },
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                boxplot: {
+                    fillColor: '#505053'
+                },
+                candlestick: {
+                    lineColor: 'white'
+                },
+                errorbar: {
+                    color: 'white'
+                }
+            },
+            legend: {
+                itemStyle: {
+                    color: '#E0E0E3'
+                },
+                itemHoverStyle: {
+                    color: '#FFF'
+                },
+                itemHiddenStyle: {
+                    color: '#606063'
+                }
+            },
+            credits: {
+                style: {
+                    color: '#666'
+                }
+            },
+            labels: {
+                style: {
+                    color: '#707073'
+                }
+            },
+
+            drilldown: {
+                activeAxisLabelStyle: {
+                    color: '#F0F0F3'
+                },
+                activeDataLabelStyle: {
+                    color: '#F0F0F3'
+                }
+            },
+
+            navigation: {
+                buttonOptions: {
+                    symbolStroke: '#DDDDDD',
+                    theme: {
+                        fill: '#505053'
+                    }
+                }
+            },
+
+            // scroll charts
+            rangeSelector: {
+                buttonTheme: {
+                    fill: '#505053',
+                    stroke: '#000000',
+                    style: {
+                        color: '#CCC'
+                    },
+                    states: {
+                        hover: {
+                            fill: '#707073',
+                            stroke: '#000000',
+                            style: {
+                                color: 'white'
+                            }
+                        },
+                        select: {
+                            fill: '#000003',
+                            stroke: '#000000',
+                            style: {
+                                color: 'white'
+                            }
+                        }
+                    }
+                },
+                inputBoxBorderColor: '#505053',
+                inputStyle: {
+                    backgroundColor: '#333',
+                    color: 'silver'
+                },
+                labelStyle: {
+                    color: 'silver'
+                }
+            },
+
+            navigator: {
+                handles: {
+                    backgroundColor: '#666',
+                    borderColor: '#AAA'
+                },
+                outlineColor: '#CCC',
+                maskFill: 'rgba(255,255,255,0.1)',
+                series: {
+                    color: '#7798BF',
+                    lineColor: '#A6C7ED'
+                },
+                xAxis: {
+                    gridLineColor: '#505053'
+                }
+            },
+
+            scrollbar: {
+                barBackgroundColor: '#808083',
+                barBorderColor: '#808083',
+                buttonArrowColor: '#CCC',
+                buttonBackgroundColor: '#606063',
+                buttonBorderColor: '#606063',
+                rifleColor: '#FFF',
+                trackBackgroundColor: '#404043',
+                trackBorderColor: '#404043'
+            },
+
+            // special colors for some of the
+            legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+            background2: '#505053',
+            dataLabelsColor: '#B0B0B3',
+            textColor: '#C0C0C0',
+            contrastTextColor: '#F0F0F3',
+            maskColor: 'rgba(255,255,255,0.3)'
+        };
+
+        // Apply the theme
+        Highcharts.setOptions(Highcharts.theme);
+
+    }(Highcharts));
+}));

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

@@ -0,0 +1,326 @@
+/**
+ * @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
+         * 
+         * Gray theme for Highcharts JS
+         * @author Torstein Honsi
+         */
+
+        'use strict';
+        Highcharts.theme = {
+            colors: ['#DDDF0D', '#7798BF', '#55BF3B', '#DF5353', '#aaeeee', '#ff0066', '#eeaaee',
+                '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'
+            ],
+            chart: {
+                backgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0, 'rgb(96, 96, 96)'],
+                        [1, 'rgb(16, 16, 16)']
+                    ]
+                },
+                borderWidth: 0,
+                borderRadius: 0,
+                plotBackgroundColor: null,
+                plotShadow: false,
+                plotBorderWidth: 0
+            },
+            title: {
+                style: {
+                    color: '#FFF',
+                    font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+                }
+            },
+            subtitle: {
+                style: {
+                    color: '#DDD',
+                    font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+                }
+            },
+            xAxis: {
+                gridLineWidth: 0,
+                lineColor: '#999',
+                tickColor: '#999',
+                labels: {
+                    style: {
+                        color: '#999',
+                        fontWeight: 'bold'
+                    }
+                },
+                title: {
+                    style: {
+                        color: '#AAA',
+                        font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+                    }
+                }
+            },
+            yAxis: {
+                alternateGridColor: null,
+                minorTickInterval: null,
+                gridLineColor: 'rgba(255, 255, 255, .1)',
+                minorGridLineColor: 'rgba(255,255,255,0.07)',
+                lineWidth: 0,
+                tickWidth: 0,
+                labels: {
+                    style: {
+                        color: '#999',
+                        fontWeight: 'bold'
+                    }
+                },
+                title: {
+                    style: {
+                        color: '#AAA',
+                        font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+                    }
+                }
+            },
+            legend: {
+                itemStyle: {
+                    color: '#CCC'
+                },
+                itemHoverStyle: {
+                    color: '#FFF'
+                },
+                itemHiddenStyle: {
+                    color: '#333'
+                }
+            },
+            labels: {
+                style: {
+                    color: '#CCC'
+                }
+            },
+            tooltip: {
+                backgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0, 'rgba(96, 96, 96, .8)'],
+                        [1, 'rgba(16, 16, 16, .8)']
+                    ]
+                },
+                borderWidth: 0,
+                style: {
+                    color: '#FFF'
+                }
+            },
+
+
+            plotOptions: {
+                series: {
+                    nullColor: '#444444'
+                },
+                line: {
+                    dataLabels: {
+                        color: '#CCC'
+                    },
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                spline: {
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                scatter: {
+                    marker: {
+                        lineColor: '#333'
+                    }
+                },
+                candlestick: {
+                    lineColor: 'white'
+                }
+            },
+
+            toolbar: {
+                itemStyle: {
+                    color: '#CCC'
+                }
+            },
+
+            navigation: {
+                buttonOptions: {
+                    symbolStroke: '#DDDDDD',
+                    hoverSymbolStroke: '#FFFFFF',
+                    theme: {
+                        fill: {
+                            linearGradient: {
+                                x1: 0,
+                                y1: 0,
+                                x2: 0,
+                                y2: 1
+                            },
+                            stops: [
+                                [0.4, '#606060'],
+                                [0.6, '#333333']
+                            ]
+                        },
+                        stroke: '#000000'
+                    }
+                }
+            },
+
+            // scroll charts
+            rangeSelector: {
+                buttonTheme: {
+                    fill: {
+                        linearGradient: {
+                            x1: 0,
+                            y1: 0,
+                            x2: 0,
+                            y2: 1
+                        },
+                        stops: [
+                            [0.4, '#888'],
+                            [0.6, '#555']
+                        ]
+                    },
+                    stroke: '#000000',
+                    style: {
+                        color: '#CCC',
+                        fontWeight: 'bold'
+                    },
+                    states: {
+                        hover: {
+                            fill: {
+                                linearGradient: {
+                                    x1: 0,
+                                    y1: 0,
+                                    x2: 0,
+                                    y2: 1
+                                },
+                                stops: [
+                                    [0.4, '#BBB'],
+                                    [0.6, '#888']
+                                ]
+                            },
+                            stroke: '#000000',
+                            style: {
+                                color: 'white'
+                            }
+                        },
+                        select: {
+                            fill: {
+                                linearGradient: {
+                                    x1: 0,
+                                    y1: 0,
+                                    x2: 0,
+                                    y2: 1
+                                },
+                                stops: [
+                                    [0.1, '#000'],
+                                    [0.3, '#333']
+                                ]
+                            },
+                            stroke: '#000000',
+                            style: {
+                                color: 'yellow'
+                            }
+                        }
+                    }
+                },
+                inputStyle: {
+                    backgroundColor: '#333',
+                    color: 'silver'
+                },
+                labelStyle: {
+                    color: 'silver'
+                }
+            },
+
+            navigator: {
+                handles: {
+                    backgroundColor: '#666',
+                    borderColor: '#AAA'
+                },
+                outlineColor: '#CCC',
+                maskFill: 'rgba(16, 16, 16, 0.5)',
+                series: {
+                    color: '#7798BF',
+                    lineColor: '#A6C7ED'
+                }
+            },
+
+            scrollbar: {
+                barBackgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0.4, '#888'],
+                        [0.6, '#555']
+                    ]
+                },
+                barBorderColor: '#CCC',
+                buttonArrowColor: '#CCC',
+                buttonBackgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0.4, '#888'],
+                        [0.6, '#555']
+                    ]
+                },
+                buttonBorderColor: '#CCC',
+                rifleColor: '#FFF',
+                trackBackgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 0,
+                        y2: 1
+                    },
+                    stops: [
+                        [0, '#000'],
+                        [1, '#333']
+                    ]
+                },
+                trackBorderColor: '#666'
+            },
+
+            // special colors for some of the demo examples
+            legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
+            background2: 'rgb(70, 70, 70)',
+            dataLabelsColor: '#444',
+            textColor: '#E0E0E0',
+            maskColor: 'rgba(255,255,255,0.3)'
+        };
+
+        // Apply the theme
+        Highcharts.setOptions(Highcharts.theme);
+
+    }(Highcharts));
+}));

+ 99 - 0
watero-wechat-web/src/main/webapp/common/lib/hcharts/Highcharts/5.0.6/js/themes/grid-light.js

@@ -0,0 +1,99 @@
+/**
+ * @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
+         * 
+         * Grid-light theme for Highcharts JS
+         * @author Torstein Honsi
+         */
+
+        'use strict';
+        /* global document */
+        // Load the fonts
+        Highcharts.createElement('link', {
+            href: 'https://fonts.googleapis.com/css?family=Dosis:400,600',
+            rel: 'stylesheet',
+            type: 'text/css'
+        }, null, document.getElementsByTagName('head')[0]);
+
+        Highcharts.theme = {
+            colors: ['#7cb5ec', '#f7a35c', '#90ee7e', '#7798BF', '#aaeeee', '#ff0066', '#eeaaee',
+                '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'
+            ],
+            chart: {
+                backgroundColor: null,
+                style: {
+                    fontFamily: 'Dosis, sans-serif'
+                }
+            },
+            title: {
+                style: {
+                    fontSize: '16px',
+                    fontWeight: 'bold',
+                    textTransform: 'uppercase'
+                }
+            },
+            tooltip: {
+                borderWidth: 0,
+                backgroundColor: 'rgba(219,219,216,0.8)',
+                shadow: false
+            },
+            legend: {
+                itemStyle: {
+                    fontWeight: 'bold',
+                    fontSize: '13px'
+                }
+            },
+            xAxis: {
+                gridLineWidth: 1,
+                labels: {
+                    style: {
+                        fontSize: '12px'
+                    }
+                }
+            },
+            yAxis: {
+                minorTickInterval: 'auto',
+                title: {
+                    style: {
+                        textTransform: 'uppercase'
+                    }
+                },
+                labels: {
+                    style: {
+                        fontSize: '12px'
+                    }
+                }
+            },
+            plotOptions: {
+                candlestick: {
+                    lineColor: '#404048'
+                }
+            },
+
+
+            // General
+            background2: '#F0F0EA'
+
+        };
+
+        // Apply the theme
+        Highcharts.setOptions(Highcharts.theme);
+
+    }(Highcharts));
+}));

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

@@ -0,0 +1,131 @@
+/**
+ * @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
+         * 
+         * Grid theme for Highcharts JS
+         * @author Torstein Honsi
+         */
+
+        'use strict';
+        Highcharts.theme = {
+            colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
+            chart: {
+                backgroundColor: {
+                    linearGradient: {
+                        x1: 0,
+                        y1: 0,
+                        x2: 1,
+                        y2: 1
+                    },
+                    stops: [
+                        [0, 'rgb(255, 255, 255)'],
+                        [1, 'rgb(240, 240, 255)']
+                    ]
+                },
+                borderWidth: 2,
+                plotBackgroundColor: 'rgba(255, 255, 255, .9)',
+                plotShadow: true,
+                plotBorderWidth: 1
+            },
+            title: {
+                style: {
+                    color: '#000',
+                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+                }
+            },
+            subtitle: {
+                style: {
+                    color: '#666666',
+                    font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+                }
+            },
+            xAxis: {
+                gridLineWidth: 1,
+                lineColor: '#000',
+                tickColor: '#000',
+                labels: {
+                    style: {
+                        color: '#000',
+                        font: '11px Trebuchet MS, Verdana, sans-serif'
+                    }
+                },
+                title: {
+                    style: {
+                        color: '#333',
+                        fontWeight: 'bold',
+                        fontSize: '12px',
+                        fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+                    }
+                }
+            },
+            yAxis: {
+                minorTickInterval: 'auto',
+                lineColor: '#000',
+                lineWidth: 1,
+                tickWidth: 1,
+                tickColor: '#000',
+                labels: {
+                    style: {
+                        color: '#000',
+                        font: '11px Trebuchet MS, Verdana, sans-serif'
+                    }
+                },
+                title: {
+                    style: {
+                        color: '#333',
+                        fontWeight: 'bold',
+                        fontSize: '12px',
+                        fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+                    }
+                }
+            },
+            legend: {
+                itemStyle: {
+                    font: '9pt Trebuchet MS, Verdana, sans-serif',
+                    color: 'black'
+
+                },
+                itemHoverStyle: {
+                    color: '#039'
+                },
+                itemHiddenStyle: {
+                    color: 'gray'
+                }
+            },
+            labels: {
+                style: {
+                    color: '#99b'
+                }
+            },
+
+            navigation: {
+                buttonOptions: {
+                    theme: {
+                        stroke: '#CCCCCC'
+                    }
+                }
+            }
+        };
+
+        // Apply the theme
+        Highcharts.setOptions(Highcharts.theme);
+
+    }(Highcharts));
+}));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 0
watero-wechat-web/src/main/webapp/common/lib/jquery.ui/cityJson.js


+ 136 - 0
watero-wechat-web/src/main/webapp/common/lib/jquery.ui/citySet.js

@@ -0,0 +1,136 @@
+function SelCity(obj,e) {
+    var ths = obj;
+    var dal = '<div class="_citys"><span title="关闭" id="cColse" >×</span><ul id="_citysheng" class="_citys0"><li class="citySel">省份</li><li>城市</li><li>区县</li></ul><div id="_citys0" class="_citys1"></div><div style="display:none" id="_citys1" class="_citys1"></div><div style="display:none" id="_citys2" class="_citys1"></div></div>';
+    Iput.show({ id: ths, event: e, content: dal,width:"470"});
+    $("#cColse").click(function () {
+        Iput.colse();
+    });
+    var tb_province = [];
+    var b = province;
+    for (var i = 0, len = b.length; i < len; i++) {
+        tb_province.push('<a data-level="0" data-id="' + b[i]['id'] + '" data-name="' + b[i]['name'] + '">' + b[i]['name'] + '</a>');
+    }
+    $("#_citys0").append(tb_province.join(""));
+    $("#_citys0 a").click(function () {
+        var g = getCity($(this));
+        $("#_citys1 a").remove();
+        $("#_citys1").append(g);
+        $("._citys1").hide();
+        $("._citys1:eq(1)").show();
+        $("#_citys0 a,#_citys1 a,#_citys2 a").removeClass("AreaS");
+        $(this).addClass("AreaS");
+        var lev = $(this).data("name");
+        ths.value = $(this).data("name");
+        if (document.getElementById("hcity") == null) {
+            var hcitys = $('<input>', {
+                type: 'hidden',
+                name: "hcity",
+                "data-id": $(this).data("id"),
+                id: "hcity",
+                val: lev
+            });
+            $(ths).after(hcitys);
+        }
+        else {
+            $("#hcity").val(lev);
+            $("#hcity").attr("data-id", $(this).data("id"));
+        }
+        $("#_citys1 a").click(function () {
+            $("#_citys1 a,#_citys2 a").removeClass("AreaS");
+            $(this).addClass("AreaS");
+            var lev =  $(this).data("name");
+            if (document.getElementById("hproper") == null) {
+                var hcitys = $('<input>', {
+                    type: 'hidden',
+                    name: "hproper",
+                    "data-id": $(this).data("id"),
+                    id: "hproper",
+                    val: lev
+                });
+                $(ths).after(hcitys);
+            }
+            else {
+                $("#hproper").attr("data-id", $(this).data("id"));
+                $("#hproper").val(lev);
+            }
+            var bc = $("#hcity").val();
+            ths.value = bc+ "-" + $(this).data("name");
+
+            var ar = getArea($(this));
+
+            $("#_citys2 a").remove();
+            $("#_citys2").append(ar);
+            $("._citys1").hide();
+            $("._citys1:eq(2)").show();
+
+            $("#_citys2 a").click(function () {
+                $("#_citys2 a").removeClass("AreaS");
+                $(this).addClass("AreaS");
+                var lev = $(this).data("name");
+                if (document.getElementById("harea") == null) {
+                    var hcitys = $('<input>', {
+                        type: 'hidden',
+                        name: "harea",
+                        "data-id": $(this).data("id"),
+                        id: "harea",
+                        val: lev
+                    });
+                    $(ths).after(hcitys);
+                }
+                else {
+                    $("#harea").val(lev);
+                    $("#harea").attr("data-id", $(this).data("id"));
+                }
+                var bc = $("#hcity").val();
+                var bp = $("#hproper").val();
+                ths.value = bc + "-" + bp + "-" + $(this).data("name");
+                Iput.colse();
+            });
+
+        });
+    });
+    $("#_citysheng li").click(function () {
+        $("#_citysheng li").removeClass("citySel");
+        $(this).addClass("citySel");
+        var s = $("#_citysheng li").index(this);
+        $("._citys1").hide();
+        $("._citys1:eq(" + s + ")").show();
+    });
+}
+
+function getCity(obj) {
+    var c = obj.data('id');
+    var e = province;
+    var f;
+    var g = '';
+    for (var i = 0, plen = e.length; i < plen; i++) {
+        if (e[i]['id'] == parseInt(c)) {
+            f = e[i]['city'];
+            break
+        }
+    }
+    for (var j = 0, clen = f.length; j < clen; j++) {
+        g += '<a data-level="1" data-id="' + f[j]['id'] + '" data-name="' + f[j]['name'] + '" title="' + f[j]['name'] + '">' + f[j]['name'] + '</a>'
+    }
+    $("#_citysheng li").removeClass("citySel");
+    $("#_citysheng li:eq(1)").addClass("citySel");
+    return g;
+}
+function getArea(obj) {
+    var c = obj.data('id');
+    var e = area;
+    var f = [];
+    var g = '';
+    for (var i = 0, plen = e.length; i < plen; i++) {
+        if (e[i]['pid'] == parseInt(c)) {
+            f.push(e[i]);
+        }
+    }
+    for (var j = 0, clen = f.length; j < clen; j++) {
+        g += '<a data-level="1" data-id="' + f[j]['id'] + '" data-name="' + f[j]['name'] + '" title="' + f[j]['name'] + '">' + f[j]['name'] + '</a>'
+    }
+
+    $("#_citysheng li").removeClass("citySel");
+    $("#_citysheng li:eq(2)").addClass("citySel");
+    return g;
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 998 - 0
watero-wechat-web/src/main/webapp/common/lib/jquery.validation/1.14.0/additional-methods.js


BIN
watero-wechat-web/src/main/webapp/common/lib/layer/2.4/skin/default/icon-ext.png


BIN
watero-wechat-web/src/main/webapp/common/lib/layer/2.4/skin/default/icon.png


BIN
watero-wechat-web/src/main/webapp/common/lib/lightbox2/2.8.1/images/close.png


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

@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+    "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+        <title></title>
+        <style type="text/css">
+            *{color: #838383;margin: 0;padding: 0}
+            html,body {font-size: 12px;overflow: hidden; }
+            .content{padding:5px 0 0 15px;}
+            input{width:210px;height:21px;line-height:21px;margin-left: 4px;}
+        </style>
+    </head>
+    <body>
+        <div class="content">
+            <span><var id="lang_input_anchorName"></var></span><input id="anchorName"  value="" />
+        </div>
+        <script type="text/javascript" src="../internal.js"></script>
+        <script type="text/javascript">
+            var anchorInput = $G('anchorName'),
+                node = editor.selection.getRange().getClosedNode();
+            if(node && node.tagName == 'IMG' && (node = node.getAttribute('anchorname'))){
+                anchorInput.value = node;
+            }
+            anchorInput.onkeydown = function(evt){
+                evt = evt || window.event;
+                if(evt.keyCode == 13){
+                    editor.execCommand('anchor', anchorInput.value);
+                    dialog.close();
+                    domUtils.preventDefault(evt)
+                }
+            };
+            dialog.onok = function (){
+                editor.execCommand('anchor', anchorInput.value);
+                dialog.close();
+            };
+            $focus(anchorInput);
+        </script>
+    </body>
+</html>

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

@@ -0,0 +1,681 @@
+@charset "utf-8";
+/* dialog样式 */
+.wrapper {
+    zoom: 1;
+    width: 630px;
+    *width: 626px;
+    height: 380px;
+    margin: 0 auto;
+    padding: 10px;
+    position: relative;
+    font-family: sans-serif;
+}
+
+/*tab样式框大小*/
+.tabhead {
+    float:left;
+}
+.tabbody {
+    width: 100%;
+    height: 346px;
+    position: relative;
+    clear: both;
+}
+
+.tabbody .panel {
+    position: absolute;
+    width: 0;
+    height: 0;
+    background: #fff;
+    overflow: hidden;
+    display: none;
+}
+
+.tabbody .panel.focus {
+    width: 100%;
+    height: 346px;
+    display: block;
+}
+
+/* 上传附件 */
+.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: 346px;
+    display: block;
+    clip: auto;
+}
+
+#upload .queueList {
+    margin: 0;
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    overflow: hidden;
+}
+
+#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;
+    border: 2px dashed #e6e6e6;
+    *border: 0px dashed #e6e6e6;
+    height: 172px;
+    padding-top: 150px;
+    text-align: center;
+    background: url(./images/image.png) center 70px no-repeat;
+    color: #cccccc;
+    font-size: 18px;
+    position: relative;
+    top:0;
+    *top: 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: 300px;
+}
+
+#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: 9px 0 0 9px;
+    *margin: 6px 0 0 6px;
+    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;
+}
+
+
+
+/* 图片管理样式 */
+#online {
+    width: 100%;
+    height: 336px;
+    padding: 10px 0 0 0;
+}
+#online #fileList{
+    width: 100%;
+    height: 100%;
+    overflow-x: hidden;
+    overflow-y: auto;
+    position: relative;
+}
+#online ul {
+    display: block;
+    list-style: none;
+    margin: 0;
+    padding: 0;
+}
+#online li {
+    float: left;
+    display: block;
+    list-style: none;
+    padding: 0;
+    width: 113px;
+    height: 113px;
+    margin: 0 0 9px 9px;
+    *margin: 0 0 6px 6px;
+    background-color: #eee;
+    overflow: hidden;
+    cursor: pointer;
+    position: relative;
+}
+#online li.clearFloat {
+    float: none;
+    clear: both;
+    display: block;
+    width:0;
+    height:0;
+    margin: 0;
+    padding: 0;
+}
+#online li img {
+    cursor: pointer;
+}
+#online li div.file-wrapper {
+    cursor: pointer;
+    position: absolute;
+    display: block;
+    width: 111px;
+    height: 111px;
+    border: 1px solid #eee;
+    background: url("./images/bg.png") repeat;
+}
+#online li div span.file-title{
+    display: block;
+    padding: 0 3px;
+    margin: 3px 0 0 0;
+    font-size: 12px;
+    height: 13px;
+    color: #555555;
+    text-align: center;
+    width: 107px;
+    white-space: nowrap;
+    word-break: break-all;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+#online li .icon {
+    cursor: pointer;
+    width: 113px;
+    height: 113px;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 2;
+    border: 0;
+    background-repeat: no-repeat;
+}
+#online li .icon:hover {
+    width: 107px;
+    height: 107px;
+    border: 3px solid #1094fa;
+}
+#online li.selected .icon {
+    background-image: url(images/success.png);
+    background-image: url(images/success.gif) \9;
+    background-position: 75px 75px;
+}
+#online li.selected .icon:hover {
+    width: 107px;
+    height: 107px;
+    border: 3px solid #1094fa;
+    background-position: 72px 72px;
+}
+
+
+/* 在线文件的文件预览图标 */
+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;
+}

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

@@ -0,0 +1,60 @@
+<!doctype html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>ueditor图片对话框</title>
+    <script type="text/javascript" src="../internal.js"></script>
+
+    <!-- jquery -->
+    <script type="text/javascript" src="../../third-party/jquery-1.10.2.min.js"></script>
+
+    <!-- webuploader -->
+    <script src="../../third-party/webuploader/webuploader.min.js"></script>
+    <link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css">
+
+    <!-- attachment dialog -->
+    <link rel="stylesheet" href="attachment.css" type="text/css" />
+</head>
+<body>
+
+    <div class="wrapper">
+        <div id="tabhead" class="tabhead">
+            <span class="tab focus" data-content-id="upload"><var id="lang_tab_upload"></var></span>
+            <span class="tab" data-content-id="online"><var id="lang_tab_online"></var></span>
+        </div>
+        <div id="tabbody" class="tabbody">
+            <!-- 上传图片 -->
+            <div id="upload" class="panel focus">
+                <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="online" class="panel">
+                <div id="fileList"><var id="lang_imgLoading"></var></div>
+            </div>
+
+        </div>
+    </div>
+    <script type="text/javascript" src="attachment.js"></script>
+
+</body>
+</html>

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

@@ -0,0 +1,754 @@
+/**
+ * User: Jinqn
+ * Date: 14-04-08
+ * Time: 下午16:34
+ * 上传图片对话框逻辑代码,包括tab: 远程图片/上传图片/在线图片/搜索图片
+ */
+
+(function () {
+
+    var uploadFile,
+        onlineFile;
+
+    window.onload = function () {
+        initTabs();
+        initButtons();
+    };
+
+    /* 初始化tab标签 */
+    function initTabs() {
+        var tabs = $G('tabhead').children;
+        for (var i = 0; i < tabs.length; i++) {
+            domUtils.on(tabs[i], "click", function (e) {
+                var target = e.target || e.srcElement;
+                setTabFocus(target.getAttribute('data-content-id'));
+            });
+        }
+
+        setTabFocus('upload');
+    }
+
+    /* 初始化tabbody */
+    function setTabFocus(id) {
+        if(!id) return;
+        var i, bodyId, tabs = $G('tabhead').children;
+        for (i = 0; i < tabs.length; i++) {
+            bodyId = tabs[i].getAttribute('data-content-id')
+            if (bodyId == id) {
+                domUtils.addClass(tabs[i], 'focus');
+                domUtils.addClass($G(bodyId), 'focus');
+            } else {
+                domUtils.removeClasses(tabs[i], 'focus');
+                domUtils.removeClasses($G(bodyId), 'focus');
+            }
+        }
+        switch (id) {
+            case 'upload':
+                uploadFile = uploadFile || new UploadFile('queueList');
+                break;
+            case 'online':
+                onlineFile = onlineFile || new OnlineFile('fileList');
+                break;
+        }
+    }
+
+    /* 初始化onok事件 */
+    function initButtons() {
+
+        dialog.onok = function () {
+            var list = [], id, tabs = $G('tabhead').children;
+            for (var i = 0; i < tabs.length; i++) {
+                if (domUtils.hasClass(tabs[i], 'focus')) {
+                    id = tabs[i].getAttribute('data-content-id');
+                    break;
+                }
+            }
+
+            switch (id) {
+                case 'upload':
+                    list = uploadFile.getInsertList();
+                    var count = uploadFile.getQueueCount();
+                    if (count) {
+                        $('.info', '#queueList').html('<span style="color:red;">' + '还有2个未上传文件'.replace(/[\d]/, count) + '</span>');
+                        return false;
+                    }
+                    break;
+                case 'online':
+                    list = onlineFile.getInsertList();
+                    break;
+            }
+            editor.fireEvent('afterUpfile', list);
+            editor.execCommand('insertfile', list);
+        };
+    }
+
+
+    /* 上传附件 */
+    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('fileActionName')),
+                fileMaxSize = editor.getOpt('fileMaxSize'),
+                acceptExtensions = (editor.getOpt('fileAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');;
+
+            if (!WebUploader.Uploader.support()) {
+                $('#filePickerReady').after($('<div>').html(lang.errorNotSupport)).hide();
+                return;
+            } else if (!editor.getOpt('fileActionName')) {
+                $('#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('fileFieldName'),
+                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" title="' + file.name + '">' + file.name + '</span>');
+                    } else {
+                        if (browser.ie && browser.version <= 7) {
+                            $wrap.text(lang.uploadNoPreview);
+                        } else {
+                            uploader.makeThumb(file, function (error, src) {
+                                if (error || !src) {
+                                    $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') {
+                        _this.fileList.push(json);
+                        $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;
+        },
+        getInsertList: function () {
+            var i, link, data, list = [],
+                prefix = editor.getOpt('fileUrlPrefix');
+            for (i = 0; i < this.fileList.length; i++) {
+                data = this.fileList[i];
+                link = data.url;
+                list.push({
+                    title: data.original || link.substr(link.lastIndexOf('/') + 1),
+                    url: prefix + link
+                });
+            }
+            return list;
+        }
+    };
+
+
+    /* 在线附件 */
+    function OnlineFile(target) {
+        this.container = utils.isString(target) ? document.getElementById(target) : target;
+        this.init();
+    }
+    OnlineFile.prototype = {
+        init: function () {
+            this.initContainer();
+            this.initEvents();
+            this.initData();
+        },
+        /* 初始化容器 */
+        initContainer: function () {
+            this.container.innerHTML = '';
+            this.list = document.createElement('ul');
+            this.clearFloat = document.createElement('li');
+
+            domUtils.addClass(this.list, 'list');
+            domUtils.addClass(this.clearFloat, 'clearFloat');
+
+            this.list.appendChild(this.clearFloat);
+            this.container.appendChild(this.list);
+        },
+        /* 初始化滚动事件,滚动到地步自动拉取数据 */
+        initEvents: function () {
+            var _this = this;
+
+            /* 滚动拉取图片 */
+            domUtils.on($G('fileList'), 'scroll', function(e){
+                var panel = this;
+                if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
+                    _this.getFileData();
+                }
+            });
+            /* 选中图片 */
+            domUtils.on(this.list, 'click', function (e) {
+                var target = e.target || e.srcElement,
+                    li = target.parentNode;
+
+                if (li.tagName.toLowerCase() == 'li') {
+                    if (domUtils.hasClass(li, 'selected')) {
+                        domUtils.removeClasses(li, 'selected');
+                    } else {
+                        domUtils.addClass(li, 'selected');
+                    }
+                }
+            });
+        },
+        /* 初始化第一次的数据 */
+        initData: function () {
+
+            /* 拉取数据需要使用的值 */
+            this.state = 0;
+            this.listSize = editor.getOpt('fileManagerListSize');
+            this.listIndex = 0;
+            this.listEnd = false;
+
+            /* 第一次拉取数据 */
+            this.getFileData();
+        },
+        /* 向后台拉取图片列表数据 */
+        getFileData: function () {
+            var _this = this;
+
+            if(!_this.listEnd && !this.isLoadingData) {
+                this.isLoadingData = true;
+                ajax.request(editor.getActionUrl(editor.getOpt('fileManagerActionName')), {
+                    timeout: 100000,
+                    data: utils.extend({
+                            start: this.listIndex,
+                            size: this.listSize
+                        }, editor.queryCommandValue('serverparam')),
+                    method: 'get',
+                    onsuccess: function (r) {
+                        try {
+                            var json = eval('(' + r.responseText + ')');
+                            if (json.state == 'SUCCESS') {
+                                _this.pushData(json.list);
+                                _this.listIndex = parseInt(json.start) + parseInt(json.list.length);
+                                if(_this.listIndex >= json.total) {
+                                    _this.listEnd = true;
+                                }
+                                _this.isLoadingData = false;
+                            }
+                        } catch (e) {
+                            if(r.responseText.indexOf('ue_separate_ue') != -1) {
+                                var list = r.responseText.split(r.responseText);
+                                _this.pushData(list);
+                                _this.listIndex = parseInt(list.length);
+                                _this.listEnd = true;
+                                _this.isLoadingData = false;
+                            }
+                        }
+                    },
+                    onerror: function () {
+                        _this.isLoadingData = false;
+                    }
+                });
+            }
+        },
+        /* 添加图片到列表界面上 */
+        pushData: function (list) {
+            var i, item, img, filetype, preview, icon, _this = this,
+                urlPrefix = editor.getOpt('fileManagerUrlPrefix');
+            for (i = 0; i < list.length; i++) {
+                if(list[i] && list[i].url) {
+                    item = document.createElement('li');
+                    icon = document.createElement('span');
+                    filetype = list[i].url.substr(list[i].url.lastIndexOf('.') + 1);
+
+                    if ( "png|jpg|jpeg|gif|bmp".indexOf(filetype) != -1 ) {
+                        preview = document.createElement('img');
+                        domUtils.on(preview, 'load', (function(image){
+                            return function(){
+                                _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
+                            };
+                        })(preview));
+                        preview.width = 113;
+                        preview.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
+                    } else {
+                        var ic = document.createElement('i'),
+                            textSpan = document.createElement('span');
+                        textSpan.innerHTML = list[i].url.substr(list[i].url.lastIndexOf('/') + 1);
+                        preview = document.createElement('div');
+                        preview.appendChild(ic);
+                        preview.appendChild(textSpan);
+                        domUtils.addClass(preview, 'file-wrapper');
+                        domUtils.addClass(textSpan, 'file-title');
+                        domUtils.addClass(ic, 'file-type-' + filetype);
+                        domUtils.addClass(ic, 'file-preview');
+                    }
+                    domUtils.addClass(icon, 'icon');
+                    item.setAttribute('data-url', urlPrefix + list[i].url);
+                    if (list[i].original) {
+                        item.setAttribute('data-title', list[i].original);
+                    }
+
+                    item.appendChild(preview);
+                    item.appendChild(icon);
+                    this.list.insertBefore(item, this.clearFloat);
+                }
+            }
+        },
+        /* 改变图片大小 */
+        scale: function (img, w, h, type) {
+            var ow = img.width,
+                oh = img.height;
+
+            if (type == 'justify') {
+                if (ow >= oh) {
+                    img.width = w;
+                    img.height = h * oh / ow;
+                    img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
+                } else {
+                    img.width = w * ow / oh;
+                    img.height = h;
+                    img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
+                }
+            } else {
+                if (ow >= oh) {
+                    img.width = w * ow / oh;
+                    img.height = h;
+                    img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
+                } else {
+                    img.width = w;
+                    img.height = h * oh / ow;
+                    img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
+                }
+            }
+        },
+        getInsertList: function () {
+            var i, lis = this.list.children, list = [];
+            for (i = 0; i < lis.length; i++) {
+                if (domUtils.hasClass(lis[i], 'selected')) {
+                    var url = lis[i].getAttribute('data-url');
+                    var title = lis[i].getAttribute('data-title') || url.substr(url.lastIndexOf('/') + 1);
+                    list.push({
+                        title: title,
+                        url: url
+                    });
+                }
+            }
+            return list;
+        }
+    };
+
+
+})();

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


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


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


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


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


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


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


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


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

@@ -0,0 +1,94 @@
+.wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative}
+.tabbody{height:225px;}
+.tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;}
+.tabbody .focus { display: block;}
+
+body{font-size: 12px;color: #888;overflow: hidden;}
+input,label{vertical-align:middle}
+.clear{clear: both;}
+.pl{padding-left: 18px;padding-left: 23px\9;}
+
+#imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;}
+#imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;}
+#imageList img {cursor: pointer;border: 2px solid white;}
+
+.bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;}
+.content div{margin: 10px 0 10px 5px;}
+.content .iptradio{margin: 0px 5px 5px 0px;}
+.txt{width:280px;}
+
+.wrapcolor{height: 19px;}
+div.color{float: left;margin: 0;}
+#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;}
+div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
+#custom input{height: 15px;min-height: 15px;width:20px;}
+#repeatType{width:100px;}
+
+
+/* 图片管理样式 */
+#imgManager {
+    width: 100%;
+    height: 225px;
+}
+#imgManager #imageList{
+    width: 100%;
+    overflow-x: hidden;
+    overflow-y: auto;
+}
+#imgManager ul {
+    display: block;
+    list-style: none;
+    margin: 0;
+    padding: 0;
+}
+#imgManager li {
+    float: left;
+    display: block;
+    list-style: none;
+    padding: 0;
+    width: 113px;
+    height: 113px;
+    margin: 9px 0 0 19px;
+    background-color: #eee;
+    overflow: hidden;
+    cursor: pointer;
+    position: relative;
+}
+#imgManager li.clearFloat {
+    float: none;
+    clear: both;
+    display: block;
+    width:0;
+    height:0;
+    margin: 0;
+    padding: 0;
+}
+#imgManager li img {
+    cursor: pointer;
+}
+#imgManager li .icon {
+    cursor: pointer;
+    width: 113px;
+    height: 113px;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 2;
+    border: 0;
+    background-repeat: no-repeat;
+}
+#imgManager li .icon:hover {
+    width: 107px;
+    height: 107px;
+    border: 3px solid #1094fa;
+}
+#imgManager li.selected .icon {
+    background-image: url(images/success.png);
+    background-position: 75px 75px;
+}
+#imgManager li.selected .icon:hover {
+    width: 107px;
+    height: 107px;
+    border: 3px solid #1094fa;
+    background-position: 72px 72px;
+}

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

@@ -0,0 +1,56 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <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="background.css">
+</head>
+<body>
+    <div id="bg_container" class="wrapper">
+        <div id="tabHeads" class="tabhead">
+            <span class="focus" data-content-id="normal"><var id="lang_background_normal"></var></span>
+            <span class="" data-content-id="imgManager"><var id="lang_background_local"></var></span>
+        </div>
+        <div id="tabBodys" class="tabbody">
+            <div id="normal" class="panel focus">
+                <fieldset class="bgarea">
+                    <legend><var id="lang_background_set"></var></legend>
+                    <div class="content">
+                        <div>
+                            <label><input id="nocolorRadio" class="iptradio" type="radio" name="t" value="none" checked="checked"><var id="lang_background_none"></var></label>
+                            <label><input id="coloredRadio" class="iptradio" type="radio" name="t" value="color"><var id="lang_background_colored"></var></label>
+                        </div>
+                        <div class="wrapcolor pl">
+                            <div class="color">
+                                <var id="lang_background_color"></var>:
+                            </div>
+                            <div id="colorPicker"></div>
+                            <div class="clear"></div>
+                        </div>
+                        <div class="wrapcolor pl">
+                            <label><var id="lang_background_netimg"></var>:</label><input class="txt" type="text" id="url">
+                        </div>
+                        <div id="alignment" class="alignment">
+                            <var id="lang_background_align"></var>:<select id="repeatType">
+                                <option value="center"></option>
+                                <option value="repeat-x"></option>
+                                <option value="repeat-y"></option>
+                                <option value="repeat"></option>
+                                <option value="self"></option>
+                            </select>
+                        </div>
+                        <div id="custom" >
+                            <var id="lang_background_position"></var>:x:<input type="text" size="1" id="x" maxlength="4" value="0">px&nbsp;&nbsp;y:<input type="text" size="1" id="y" maxlength="4" value="0">px
+                        </div>
+                    </div>
+                </fieldset>
+
+            </div>
+            <div id="imgManager" class="panel">
+                <div id="imageList" style=""></div>
+            </div>
+        </div>
+    </div>
+    <script type="text/javascript" src="background.js"></script>
+</body>
+</html>

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

@@ -0,0 +1,376 @@
+(function () {
+
+    var onlineImage,
+        backupStyle = editor.queryCommandValue('background');
+
+    window.onload = function () {
+        initTabs();
+        initColorSelector();
+    };
+
+    /* 初始化tab标签 */
+    function initTabs(){
+        var tabs = $G('tabHeads').children;
+        for (var i = 0; i < tabs.length; i++) {
+            domUtils.on(tabs[i], "click", function (e) {
+                var target = e.target || e.srcElement;
+                for (var j = 0; j < tabs.length; j++) {
+                    if(tabs[j] == target){
+                        tabs[j].className = "focus";
+                        var contentId = tabs[j].getAttribute('data-content-id');
+                        $G(contentId).style.display = "block";
+                        if(contentId == 'imgManager') {
+                            initImagePanel();
+                        }
+                    }else {
+                        tabs[j].className = "";
+                        $G(tabs[j].getAttribute('data-content-id')).style.display = "none";
+                    }
+                }
+            });
+        }
+    }
+
+    /* 初始化颜色设置 */
+    function initColorSelector () {
+        var obj = editor.queryCommandValue('background');
+        if (obj) {
+            var color = obj['background-color'],
+                repeat = obj['background-repeat'] || 'repeat',
+                image = obj['background-image'] || '',
+                position = obj['background-position'] || 'center center',
+                pos = position.split(' '),
+                x = parseInt(pos[0]) || 0,
+                y = parseInt(pos[1]) || 0;
+
+            if(repeat == 'no-repeat' && (x || y)) repeat = 'self';
+
+            image = image.match(/url[\s]*\(([^\)]*)\)/);
+            image = image ? image[1]:'';
+            updateFormState('colored', color, image, repeat, x, y);
+        } else {
+            updateFormState();
+        }
+
+        var updateHandler = function () {
+            updateFormState();
+            updateBackground();
+        }
+        domUtils.on($G('nocolorRadio'), 'click', updateBackground);
+        domUtils.on($G('coloredRadio'), 'click', updateHandler);
+        domUtils.on($G('url'), 'keyup', function(){
+            if($G('url').value && $G('alignment').style.display == "none") {
+                utils.each($G('repeatType').children, function(item){
+                    item.selected = ('repeat' == item.getAttribute('value') ? 'selected':false);
+                });
+            }
+            updateHandler();
+        });
+        domUtils.on($G('repeatType'), 'change', updateHandler);
+        domUtils.on($G('x'), 'keyup', updateBackground);
+        domUtils.on($G('y'), 'keyup', updateBackground);
+
+        initColorPicker();
+    }
+
+    /* 初始化颜色选择器 */
+    function initColorPicker() {
+        var me = editor,
+            cp = $G("colorPicker");
+
+        /* 生成颜色选择器ui对象 */
+        var popup = new UE.ui.Popup({
+            content: new UE.ui.ColorPicker({
+                noColorText: me.getLang("clearColor"),
+                editor: me,
+                onpickcolor: function (t, color) {
+                    updateFormState('colored', color);
+                    updateBackground();
+                    UE.ui.Popup.postHide();
+                },
+                onpicknocolor: function (t, color) {
+                    updateFormState('colored', 'transparent');
+                    updateBackground();
+                    UE.ui.Popup.postHide();
+                }
+            }),
+            editor: me,
+            onhide: function () {
+            }
+        });
+
+        /* 设置颜色选择器 */
+        domUtils.on(cp, "click", function () {
+            popup.showAnchor(this);
+        });
+        domUtils.on(document, 'mousedown', function (evt) {
+            var el = evt.target || evt.srcElement;
+            UE.ui.Popup.postHide(el);
+        });
+        domUtils.on(window, 'scroll', function () {
+            UE.ui.Popup.postHide();
+        });
+    }
+
+    /* 初始化在线图片列表 */
+    function initImagePanel() {
+        onlineImage = onlineImage || new OnlineImage('imageList');
+    }
+
+    /* 更新背景色设置面板 */
+    function updateFormState (radio, color, url, align, x, y) {
+        var nocolorRadio = $G('nocolorRadio'),
+            coloredRadio = $G('coloredRadio');
+
+        if(radio) {
+            nocolorRadio.checked = (radio == 'colored' ? false:'checked');
+            coloredRadio.checked = (radio == 'colored' ? 'checked':false);
+        }
+        if(color) {
+            domUtils.setStyle($G("colorPicker"), "background-color", color);
+        }
+
+        if(url && /^\//.test(url)) {
+            var a = document.createElement('a');
+            a.href = url;
+            browser.ie && (a.href = a.href);
+            url = browser.ie ? a.href:(a.protocol + '//' + a.host + a.pathname + a.search + a.hash);
+        }
+
+        if(url || url === '') {
+            $G('url').value = url;
+        }
+        if(align) {
+            utils.each($G('repeatType').children, function(item){
+                item.selected = (align == item.getAttribute('value') ? 'selected':false);
+            });
+        }
+        if(x || y) {
+            $G('x').value = parseInt(x) || 0;
+            $G('y').value = parseInt(y) || 0;
+        }
+
+        $G('alignment').style.display = coloredRadio.checked && $G('url').value ? '':'none';
+        $G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '':'none';
+    }
+
+    /* 更新背景颜色 */
+    function updateBackground () {
+        if ($G('coloredRadio').checked) {
+            var color = domUtils.getStyle($G("colorPicker"), "background-color"),
+                bgimg = $G("url").value,
+                align = $G("repeatType").value,
+                backgroundObj = {
+                    "background-repeat": "no-repeat",
+                    "background-position": "center center"
+                };
+
+            if (color) backgroundObj["background-color"] = color;
+            if (bgimg) backgroundObj["background-image"] = 'url(' + bgimg + ')';
+            if (align == 'self') {
+                backgroundObj["background-position"] = $G("x").value + "px " + $G("y").value + "px";
+            } else if (align == 'repeat-x' || align == 'repeat-y' || align == 'repeat') {
+                backgroundObj["background-repeat"] = align;
+            }
+
+            editor.execCommand('background', backgroundObj);
+        } else {
+            editor.execCommand('background', null);
+        }
+    }
+
+
+    /* 在线图片 */
+    function OnlineImage(target) {
+        this.container = utils.isString(target) ? document.getElementById(target) : target;
+        this.init();
+    }
+    OnlineImage.prototype = {
+        init: function () {
+            this.reset();
+            this.initEvents();
+        },
+        /* 初始化容器 */
+        initContainer: function () {
+            this.container.innerHTML = '';
+            this.list = document.createElement('ul');
+            this.clearFloat = document.createElement('li');
+
+            domUtils.addClass(this.list, 'list');
+            domUtils.addClass(this.clearFloat, 'clearFloat');
+
+            this.list.id = 'imageListUl';
+            this.list.appendChild(this.clearFloat);
+            this.container.appendChild(this.list);
+        },
+        /* 初始化滚动事件,滚动到地步自动拉取数据 */
+        initEvents: function () {
+            var _this = this;
+
+            /* 滚动拉取图片 */
+            domUtils.on($G('imageList'), 'scroll', function(e){
+                var panel = this;
+                if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
+                    _this.getImageData();
+                }
+            });
+            /* 选中图片 */
+            domUtils.on(this.container, 'click', function (e) {
+                var target = e.target || e.srcElement,
+                    li = target.parentNode,
+                    nodes = $G('imageListUl').childNodes;
+
+                if (li.tagName.toLowerCase() == 'li') {
+                    updateFormState('nocolor', null, '');
+                    for (var i = 0, node; node = nodes[i++];) {
+                        if (node == li && !domUtils.hasClass(node, 'selected')) {
+                            domUtils.addClass(node, 'selected');
+                            updateFormState('colored', null, li.firstChild.getAttribute("_src"), 'repeat');
+                        } else {
+                            domUtils.removeClasses(node, 'selected');
+                        }
+                    }
+                    updateBackground();
+                }
+            });
+        },
+        /* 初始化第一次的数据 */
+        initData: function () {
+
+            /* 拉取数据需要使用的值 */
+            this.state = 0;
+            this.listSize = editor.getOpt('imageManagerListSize');
+            this.listIndex = 0;
+            this.listEnd = false;
+
+            /* 第一次拉取数据 */
+            this.getImageData();
+        },
+        /* 重置界面 */
+        reset: function() {
+            this.initContainer();
+            this.initData();
+        },
+        /* 向后台拉取图片列表数据 */
+        getImageData: function () {
+            var _this = this;
+
+            if(!_this.listEnd && !this.isLoadingData) {
+                this.isLoadingData = true;
+                var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')),
+                    isJsonp = utils.isCrossDomainUrl(url);
+                ajax.request(url, {
+                    'timeout': 100000,
+                    'dataType': isJsonp ? 'jsonp':'',
+                    'data': utils.extend({
+                            start: this.listIndex,
+                            size: this.listSize
+                        }, editor.queryCommandValue('serverparam')),
+                    'method': 'get',
+                    'onsuccess': function (r) {
+                        try {
+                            var json = isJsonp ? r:eval('(' + r.responseText + ')');
+                            if (json.state == 'SUCCESS') {
+                                _this.pushData(json.list);
+                                _this.listIndex = parseInt(json.start) + parseInt(json.list.length);
+                                if(_this.listIndex >= json.total) {
+                                    _this.listEnd = true;
+                                }
+                                _this.isLoadingData = false;
+                            }
+                        } catch (e) {
+                            if(r.responseText.indexOf('ue_separate_ue') != -1) {
+                                var list = r.responseText.split(r.responseText);
+                                _this.pushData(list);
+                                _this.listIndex = parseInt(list.length);
+                                _this.listEnd = true;
+                                _this.isLoadingData = false;
+                            }
+                        }
+                    },
+                    'onerror': function () {
+                        _this.isLoadingData = false;
+                    }
+                });
+            }
+        },
+        /* 添加图片到列表界面上 */
+        pushData: function (list) {
+            var i, item, img, icon, _this = this,
+                urlPrefix = editor.getOpt('imageManagerUrlPrefix');
+            for (i = 0; i < list.length; i++) {
+                if(list[i] && list[i].url) {
+                    item = document.createElement('li');
+                    img = document.createElement('img');
+                    icon = document.createElement('span');
+
+                    domUtils.on(img, 'load', (function(image){
+                        return function(){
+                            _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
+                        }
+                    })(img));
+                    img.width = 113;
+                    img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
+                    img.setAttribute('_src', urlPrefix + list[i].url);
+                    domUtils.addClass(icon, 'icon');
+
+                    item.appendChild(img);
+                    item.appendChild(icon);
+                    this.list.insertBefore(item, this.clearFloat);
+                }
+            }
+        },
+        /* 改变图片大小 */
+        scale: function (img, w, h, type) {
+            var ow = img.width,
+                oh = img.height;
+
+            if (type == 'justify') {
+                if (ow >= oh) {
+                    img.width = w;
+                    img.height = h * oh / ow;
+                    img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
+                } else {
+                    img.width = w * ow / oh;
+                    img.height = h;
+                    img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
+                }
+            } else {
+                if (ow >= oh) {
+                    img.width = w * ow / oh;
+                    img.height = h;
+                    img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
+                } else {
+                    img.width = w;
+                    img.height = h * oh / ow;
+                    img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
+                }
+            }
+        },
+        getInsertList: function () {
+            var i, lis = this.list.children, list = [], align = getAlign();
+            for (i = 0; i < lis.length; i++) {
+                if (domUtils.hasClass(lis[i], 'selected')) {
+                    var img = lis[i].firstChild,
+                        src = img.getAttribute('_src');
+                    list.push({
+                        src: src,
+                        _src: src,
+                        floatStyle: align
+                    });
+                }
+
+            }
+            return list;
+        }
+    };
+
+    dialog.onok = function () {
+        updateBackground();
+        editor.fireEvent('saveScene');
+    };
+    dialog.oncancel = function () {
+        editor.execCommand('background', backupStyle);
+    };
+
+})();

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


+ 65 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/charts/chart.config.js

@@ -0,0 +1,65 @@
+/*
+ * 图表配置文件
+ * */
+
+
+//不同类型的配置
+var typeConfig = [
+    {
+        chart: {
+            type: 'line'
+        },
+        plotOptions: {
+            line: {
+                dataLabels: {
+                    enabled: false
+                },
+                enableMouseTracking: true
+            }
+        }
+    }, {
+        chart: {
+            type: 'line'
+        },
+        plotOptions: {
+            line: {
+                dataLabels: {
+                    enabled: true
+                },
+                enableMouseTracking: false
+            }
+        }
+    }, {
+        chart: {
+            type: 'area'
+        }
+    }, {
+        chart: {
+            type: 'bar'
+        }
+    }, {
+        chart: {
+            type: 'column'
+        }
+    }, {
+        chart: {
+            plotBackgroundColor: null,
+            plotBorderWidth: null,
+            plotShadow: false
+        },
+        plotOptions: {
+            pie: {
+                allowPointSelect: true,
+                cursor: 'pointer',
+                dataLabels: {
+                    enabled: true,
+                    color: '#000000',
+                    connectorColor: '#000000',
+                    formatter: function() {
+                        return '<b>'+ this.point.name +'</b>: '+ ( Math.round( this.point.percentage*100 ) / 100 ) +' %';
+                    }
+                }
+            }
+        }
+    }
+];

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

@@ -0,0 +1,165 @@
+html, body {
+    width: 100%;
+    height: 100%;
+    margin: 0;
+    padding: 0;
+    overflow-x: hidden;
+}
+
+.main {
+    width: 100%;
+    overflow: hidden;
+}
+
+.table-view {
+    height: 100%;
+    float: left;
+    margin: 20px;
+    width: 40%;
+}
+
+.table-view .table-container {
+    width: 100%;
+    margin-bottom: 50px;
+    overflow: scroll;
+}
+
+.table-view th {
+    padding: 5px 10px;
+    background-color: #F7F7F7;
+}
+
+.table-view td {
+    width: 50px;
+    text-align: center;
+    padding:0;
+}
+
+.table-container input {
+    width: 40px;
+    padding: 5px;
+    border: none;
+    outline: none;
+}
+
+.table-view caption {
+    font-size: 18px;
+    text-align: left;
+}
+
+.charts-view {
+    /*margin-left: 49%!important;*/
+    width: 50%;
+    margin-left: 49%;
+    height: 400px;
+}
+
+.charts-container {
+    border-left: 1px solid #c3c3c3;
+}
+
+.charts-format fieldset {
+    padding-left: 20px;
+    margin-bottom: 50px;
+}
+
+.charts-format legend {
+    padding-left: 10px;
+    padding-right: 10px;
+}
+
+.format-item-container {
+    padding: 20px;
+}
+
+.format-item-container label {
+    display: block;
+    margin: 10px 0;
+}
+
+.charts-format .data-item {
+    border: 1px solid black;
+    outline: none;
+    padding: 2px 3px;
+}
+
+/* 图表类型 */
+
+.charts-type {
+    margin-top: 50px;
+    height: 300px;
+}
+
+.scroll-view {
+    border: 1px solid #c3c3c3;
+    border-left: none;
+    border-right: none;
+    overflow: hidden;
+}
+
+.scroll-container {
+    margin: 20px;
+    width: 100%;
+    overflow: hidden;
+}
+
+.scroll-bed {
+    width: 10000px;
+    _margin-top: 20px;
+    -webkit-transition: margin-left .5s ease;
+    -moz-transition: margin-left .5s ease;
+    transition: margin-left .5s ease;
+}
+
+.view-box {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    margin-right: 20px;
+    border: 2px solid white;
+    line-height: 0;
+    overflow: hidden;
+    cursor: pointer;
+}
+
+.view-box img {
+    border: 1px solid #cecece;
+}
+
+.view-box.selected {
+    border-color: #7274A7;
+}
+
+.button-container {
+    margin-bottom: 20px;
+    text-align: center;
+}
+
+.button-container a {
+    display: inline-block;
+    width: 100px;
+    height: 25px;
+    line-height: 25px;
+    border: 1px solid #c2ccd1;
+    margin-right: 30px;
+    text-decoration: none;
+    color: black;
+    -webkit-border-radius: 2px;
+    -moz-border-radius: 2px;
+    border-radius: 2px;
+}
+
+.button-container a:HOVER {
+    background: #fcfcfc;
+}
+
+.button-container a:ACTIVE {
+    border-top-color: #c2ccd1;
+    box-shadow:inset 0 5px 4px -4px rgba(49, 49, 64, 0.1);
+}
+
+.edui-charts-not-data {
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+}

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

@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>chart</title>
+        <meta chartset="utf-8">
+        <link rel="stylesheet" type="text/css" href="charts.css">
+        <script type="text/javascript" src="../internal.js"></script>
+    </head>
+    <body>
+        <div class="main">
+            <div class="table-view">
+                <h3><var id="lang_data_source"></var></h3>
+                <div id="tableContainer" class="table-container"></div>
+                <h3><var id="lang_chart_format"></var></h3>
+                <form name="data-form">
+                    <div class="charts-format">
+                        <fieldset>
+                            <legend><var id="lang_data_align"></var></legend>
+                            <div class="format-item-container">
+                                <label>
+                                    <input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="1" checked="checked">
+                                    <var id="lang_chart_align_same"></var>
+                                </label>
+                                <label>
+                                    <input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="-1">
+                                    <var id="lang_chart_align_reverse"></var>
+                                </label>
+                                <br>
+                            </div>
+                        </fieldset>
+                        <fieldset>
+                            <legend><var id="lang_chart_title"></var></legend>
+                            <div class="format-item-container">
+                                <label>
+                                    <var id="lang_chart_main_title"></var><input type="text" name="title" class="data-item">
+                                </label>
+                                <label>
+                                    <var id="lang_chart_sub_title"></var><input type="text" name="sub-title" class="data-item not-pie-item">
+                                </label>
+                                <label>
+                                    <var id="lang_chart_x_title"></var><input type="text" name="x-title" class="data-item not-pie-item">
+                                </label>
+                                <label>
+                                    <var id="lang_chart_y_title"></var><input type="text" name="y-title" class="data-item not-pie-item">
+                                </label>
+                            </div>
+                        </fieldset>
+                        <fieldset>
+                            <legend><var id="lang_chart_tip"></var></legend>
+                            <div class="format-item-container">
+                                <label>
+                                    <var id="lang_cahrt_tip_prefix"></var>
+                                    <input type="text" id="tipInput" name="tip" class="data-item" disabled="disabled">
+                                </label>
+                                <p><var id="lang_cahrt_tip_description"></var></p>
+                            </div>
+                        </fieldset>
+                        <fieldset>
+                            <legend><var id="lang_chart_data_unit"></var></legend>
+                            <div class="format-item-container">
+                                <label><var id="lang_chart_data_unit_title"></var><input type="text" name="unit" class="data-item"></label>
+                                <p><var id="lang_chart_data_unit_description"></var></p>
+                            </div>
+                        </fieldset>
+                    </div>
+                </form>
+            </div>
+            <div class="charts-view">
+                <div id="chartsContainer" class="charts-container"></div>
+                <div id="chartsType" class="charts-type">
+                    <h3><var id="lang_chart_type"></var></h3>
+                    <div class="scroll-view">
+                        <div class="scroll-container">
+                            <div id="scrollBed" class="scroll-bed"></div>
+                        </div>
+                        <div id="buttonContainer" class="button-container">
+                            <a href="#" data-title="prev"><var id="lang_prev_btn"></var></a>
+                            <a href="#" data-title="next"><var id="lang_next_btn"></var></a>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <script src="../../third-party/jquery-1.10.2.min.js"></script>
+        <script src="../../third-party/highcharts/highcharts.js"></script>
+        <script src="chart.config.js"></script>
+        <script src="charts.js"></script>
+    </body>
+</html>

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

@@ -0,0 +1,519 @@
+/*
+ * 图片转换对话框脚本
+ **/
+
+var tableData = [],
+    //编辑器页面table
+    editorTable = null,
+    chartsConfig = window.typeConfig,
+    resizeTimer = null,
+    //初始默认图表类型
+    currentChartType = 0;
+
+window.onload = function () {
+
+    editorTable = domUtils.findParentByTagName( editor.selection.getRange().startContainer, 'table', true);
+
+    //未找到表格, 显示错误页面
+    if ( !editorTable ) {
+        document.body.innerHTML = "<div class='edui-charts-not-data'>未找到数据</div>";
+        return;
+    }
+
+    //初始化图表类型选择
+    initChartsTypeView();
+    renderTable( editorTable );
+    initEvent();
+    initUserConfig( editorTable.getAttribute( "data-chart" ) );
+    $( "#scrollBed .view-box:eq("+ currentChartType +")" ).trigger( "click" );
+    updateViewType( currentChartType );
+
+    dialog.addListener( "resize", function () {
+
+        if ( resizeTimer != null ) {
+            window.clearTimeout( resizeTimer );
+        }
+
+        resizeTimer = window.setTimeout( function () {
+
+            resizeTimer = null;
+
+            renderCharts();
+
+        }, 500 );
+
+    } );
+
+};
+
+function initChartsTypeView () {
+
+    var contents = [];
+
+    for ( var i = 0, len = chartsConfig.length; i<len; i++ ) {
+
+        contents.push( '<div class="view-box" data-chart-type="'+ i +'"><img width="300" src="images/charts'+ i +'.png"></div>' );
+
+    }
+
+    $( "#scrollBed" ).html( contents.join( "" ) );
+
+}
+
+//渲染table, 以便用户修改数据
+function renderTable ( table ) {
+
+    var tableHtml = [];
+
+    //构造数据
+    for ( var i = 0, row; row = table.rows[ i ]; i++ ) {
+
+        tableData[ i ] = [];
+        tableHtml[ i ] = [];
+
+        for ( var j = 0, cell; cell = row.cells[ j ]; j++ ) {
+
+            var value = getCellValue( cell );
+
+            if ( i > 0 && j > 0 ) {
+                value = +value;
+            }
+
+            if ( i === 0 || j === 0 ) {
+                tableHtml[ i ].push( '<th>'+ value +'</th>' );
+            } else {
+                tableHtml[ i ].push( '<td><input type="text" class="data-item" value="'+ value +'"></td>' );
+            }
+
+            tableData[ i ][ j ] = value;
+
+        }
+
+        tableHtml[ i ] = tableHtml[ i ].join( "" );
+
+    }
+
+    //draw 表格
+    $( "#tableContainer" ).html( '<table id="showTable" border="1"><tbody><tr>'+ tableHtml.join( "</tr><tr>" ) +'</tr></tbody></table>' );
+
+}
+
+/*
+ * 根据表格已有的图表属性初始化当前图表属性
+ */
+function initUserConfig ( config ) {
+
+    var parsedConfig = {};
+
+    if ( !config ) {
+        return;
+    }
+
+    config = config.split( ";" );
+
+    $.each( config, function ( index, item ) {
+
+        item = item.split( ":" );
+        parsedConfig[ item[ 0 ] ] = item[ 1 ];
+
+    } );
+
+    setUserConfig( parsedConfig );
+
+}
+
+function initEvent () {
+
+    var cacheValue = null,
+        //图表类型数
+        typeViewCount = chartsConfig.length- 1,
+        $chartsTypeViewBox = $( '#scrollBed .view-box' );
+
+    $( ".charts-format" ).delegate( ".format-ctrl", "change", function () {
+
+        renderCharts();
+
+    } )
+
+    $( ".table-view" ).delegate( ".data-item", "focus", function () {
+
+        cacheValue = this.value;
+
+    } ).delegate( ".data-item", "blur", function () {
+
+        if ( this.value !== cacheValue ) {
+            renderCharts();
+        }
+
+        cacheValue = null;
+
+    } );
+
+    $( "#buttonContainer" ).delegate( "a", "click", function (e) {
+
+        e.preventDefault();
+
+        if ( this.getAttribute( "data-title" ) === 'prev' ) {
+
+            if ( currentChartType > 0 ) {
+                currentChartType--;
+                updateViewType( currentChartType );
+            }
+
+        } else {
+
+            if ( currentChartType < typeViewCount ) {
+                currentChartType++;
+                updateViewType( currentChartType );
+            }
+
+        }
+
+    } );
+
+    //图表类型变化
+    $( '#scrollBed' ).delegate( ".view-box", "click", function (e) {
+
+        var index = $( this ).attr( "data-chart-type" );
+        $chartsTypeViewBox.removeClass( "selected" );
+        $( $chartsTypeViewBox[ index ] ).addClass( "selected" );
+
+        currentChartType = index | 0;
+
+        //饼图, 禁用部分配置
+        if ( currentChartType === chartsConfig.length - 1 ) {
+
+            disableNotPieConfig();
+
+        //启用完整配置
+        } else {
+
+            enableNotPieConfig();
+
+        }
+
+        renderCharts();
+
+    } );
+
+}
+
+function renderCharts () {
+
+    var data = collectData();
+
+    $('#chartsContainer').highcharts( $.extend( {}, chartsConfig[ currentChartType ], {
+
+        credits: {
+            enabled: false
+        },
+        exporting: {
+            enabled: false
+        },
+        title: {
+            text: data.title,
+            x: -20 //center
+        },
+        subtitle: {
+            text: data.subTitle,
+            x: -20
+        },
+        xAxis: {
+            title: {
+                text: data.xTitle
+            },
+            categories: data.categories
+        },
+        yAxis: {
+            title: {
+                text: data.yTitle
+            },
+            plotLines: [{
+                value: 0,
+                width: 1,
+                color: '#808080'
+            }]
+        },
+        tooltip: {
+            enabled: true,
+            valueSuffix: data.suffix
+        },
+        legend: {
+            layout: 'vertical',
+            align: 'right',
+            verticalAlign: 'middle',
+            borderWidth: 1
+        },
+        series: data.series
+
+    } ));
+
+}
+
+function updateViewType ( index ) {
+
+    $( "#scrollBed" ).css( 'marginLeft', -index*324+'px' );
+
+}
+
+function collectData () {
+
+    var form = document.forms[ 'data-form' ],
+        data = null;
+
+    if ( currentChartType !== chartsConfig.length - 1 ) {
+
+        data = getSeriesAndCategories();
+        $.extend( data, getUserConfig() );
+
+    //饼图数据格式
+    } else {
+        data = getSeriesForPieChart();
+        data.title = form[ 'title' ].value;
+        data.suffix = form[ 'unit' ].value;
+    }
+
+    return data;
+
+}
+
+/**
+ * 获取用户配置信息
+ */
+function getUserConfig () {
+
+    var form = document.forms[ 'data-form' ],
+        info = {
+            title: form[ 'title' ].value,
+            subTitle: form[ 'sub-title' ].value,
+            xTitle: form[ 'x-title' ].value,
+            yTitle: form[ 'y-title' ].value,
+            suffix: form[ 'unit' ].value,
+            //数据对齐方式
+            tableDataFormat: getTableDataFormat (),
+            //饼图提示文字
+            tip: $( "#tipInput" ).val()
+        };
+
+    return info;
+
+}
+
+function setUserConfig ( config ) {
+
+    var form = document.forms[ 'data-form' ];
+
+    config.title && ( form[ 'title' ].value = config.title );
+    config.subTitle && ( form[ 'sub-title' ].value = config.subTitle );
+    config.xTitle && ( form[ 'x-title' ].value = config.xTitle );
+    config.yTitle && ( form[ 'y-title' ].value = config.yTitle );
+    config.suffix && ( form[ 'unit' ].value = config.suffix );
+    config.dataFormat == "-1" && ( form[ 'charts-format' ][ 1 ].checked = true );
+    config.tip && ( form[ 'tip' ].value = config.tip );
+    currentChartType = config.chartType || 0;
+
+}
+
+function getSeriesAndCategories () {
+
+    var form = document.forms[ 'data-form' ],
+        series = [],
+        categories = [],
+        tmp = [],
+        tableData = getTableData();
+
+    //反转数据
+    if ( getTableDataFormat() === "-1" ) {
+
+        for ( var i = 0, len = tableData.length; i < len; i++ ) {
+
+            for ( var j = 0, jlen = tableData[ i ].length; j < jlen; j++ ) {
+
+                if ( !tmp[ j ] ) {
+                    tmp[ j ] = [];
+                }
+
+                tmp[ j ][ i ] = tableData[ i ][ j ];
+
+            }
+
+        }
+
+        tableData = tmp;
+
+    }
+
+    categories = tableData[0].slice( 1 );
+
+    for ( var i = 1, data; data = tableData[ i ]; i++ ) {
+
+        series.push( {
+            name: data[ 0 ],
+            data: data.slice( 1 )
+        } );
+
+    }
+
+    return {
+        series: series,
+        categories: categories
+    };
+
+}
+
+/*
+ * 获取数据源数据对齐方式
+ */
+function getTableDataFormat () {
+
+    var form = document.forms[ 'data-form' ],
+        items = form['charts-format'];
+
+    return items[ 0 ].checked ? items[ 0 ].value : items[ 1 ].value;
+
+}
+
+/*
+ * 禁用非饼图类型的配置项
+ */
+function disableNotPieConfig() {
+
+    updateConfigItem( 'disable' );
+
+}
+
+/*
+ * 启用非饼图类型的配置项
+ */
+function enableNotPieConfig() {
+
+    updateConfigItem( 'enable' );
+
+}
+
+function updateConfigItem ( value ) {
+
+    var table = $( "#showTable" )[ 0 ],
+        isDisable = value === 'disable' ? true : false;
+
+    //table中的input处理
+    for ( var i = 2 , row; row = table.rows[ i ]; i++ ) {
+
+        for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {
+
+            $( "input", cell ).attr( "disabled", isDisable );
+
+        }
+
+    }
+
+    //其他项处理
+    $( "input.not-pie-item" ).attr( "disabled", isDisable );
+    $( "#tipInput" ).attr( "disabled", !isDisable )
+
+}
+
+/*
+ * 获取饼图数据
+ * 饼图的数据只取第一行的
+ **/
+function getSeriesForPieChart () {
+
+    var series = {
+            type: 'pie',
+            name: $("#tipInput").val(),
+            data: []
+        },
+        tableData = getTableData();
+
+
+    for ( var j = 1, jlen = tableData[ 0 ].length; j < jlen; j++ ) {
+
+        var title = tableData[ 0 ][ j ],
+            val = tableData[ 1 ][ j ];
+
+        series.data.push( [ title, val ] );
+
+    }
+
+    return {
+        series: [ series ]
+    };
+
+}
+
+function getTableData () {
+
+    var table = document.getElementById( "showTable" ),
+        xCount = table.rows[0].cells.length - 1,
+        values = getTableInputValue();
+
+    for ( var i = 0, value; value = values[ i ]; i++ ) {
+
+        tableData[ Math.floor( i / xCount ) + 1 ][ i % xCount + 1 ] = values[ i ];
+
+    }
+
+    return tableData;
+
+}
+
+function getTableInputValue () {
+
+    var table = document.getElementById( "showTable" ),
+        inputs = table.getElementsByTagName( "input" ),
+        values = [];
+
+    for ( var i = 0, input; input = inputs[ i ]; i++ ) {
+        values.push( input.value | 0 );
+    }
+
+    return values;
+
+}
+
+function getCellValue ( cell ) {
+
+    var value = utils.trim( ( cell.innerText || cell.textContent || '' ) );
+
+    return value.replace( new RegExp( UE.dom.domUtils.fillChar, 'g' ), '' ).replace( /^\s+|\s+$/g, '' );
+
+}
+
+
+//dialog确认事件
+dialog.onok = function () {
+
+    //收集信息
+    var form = document.forms[ 'data-form' ],
+        info = getUserConfig();
+
+    //添加图表类型
+    info.chartType = currentChartType;
+
+    //同步表格数据到编辑器
+    syncTableData();
+
+    //执行图表命令
+    editor.execCommand( 'charts', info );
+
+};
+
+/*
+ * 同步图表编辑视图的表格数据到编辑器里的原始表格
+ */
+function syncTableData () {
+
+    var tableData = getTableData();
+
+    for ( var i = 1, row; row = editorTable.rows[ i ]; i++ ) {
+
+        for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {
+
+            cell.innerHTML = tableData[ i ] [ j ];
+
+        }
+
+    }
+
+}

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


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


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


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


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


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


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

@@ -0,0 +1,43 @@
+.jd img{
+    background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+.pp img{
+    background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:25px;height:25px;display:block;
+}
+.ldw img{
+    background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+.tsj img{
+    background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+.cat img{
+    background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+.bb img{
+    background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+.youa img{
+    background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+
+.smileytable td {height: 37px;}
+#tabPanel{margin-left:5px;overflow: hidden;}
+#tabContent {float:left;background:#FFFFFF;}
+#tabContent div{display: none;width:480px;overflow:hidden;}
+#tabIconReview.show{left:17px;display:block;}
+.menuFocus{background:#ACCD3C;}
+.menuDefault{background:#FFFFFF;}
+#tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;}
+img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;}
+
+.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;}
+.tabbody table{width: 100%;}
+.tabbody td{border:1px solid #BAC498;}
+.tabbody td span{display: block;zoom:1;padding:0 4px;}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 54 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/emotion/emotion.html


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

@@ -0,0 +1,186 @@
+window.onload = function () {
+    editor.setOpt({
+        emotionLocalization:false
+    });
+
+    emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/";
+    emotion.SmileyBox = createTabList( emotion.tabNum );
+    emotion.tabExist = createArr( emotion.tabNum );
+
+    initImgName();
+    initEvtHandler( "tabHeads" );
+};
+
+function initImgName() {
+    for ( var pro in emotion.SmilmgName ) {
+        var tempName = emotion.SmilmgName[pro],
+                tempBox = emotion.SmileyBox[pro],
+                tempStr = "";
+
+        if ( tempBox.length ) return;
+        for ( var i = 1; i <= tempName[1]; i++ ) {
+            tempStr = tempName[0];
+            if ( i < 10 ) tempStr = tempStr + '0';
+            tempStr = tempStr + i + '.gif';
+            tempBox.push( tempStr );
+        }
+    }
+}
+
+function initEvtHandler( conId ) {
+    var tabHeads = $G( conId );
+    for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) {
+        var tabObj = tabHeads.childNodes[i];
+        if ( tabObj.nodeType == 1 ) {
+            domUtils.on( tabObj, "click", (function ( index ) {
+                return function () {
+                    switchTab( index );
+                };
+            })( j ) );
+            j++;
+        }
+    }
+    switchTab( 0 );
+    $G( "tabIconReview" ).style.display = 'none';
+}
+
+function InsertSmiley( url, evt ) {
+    var obj = {
+        src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
+    };
+    obj._src = obj.src;
+    editor.execCommand( 'insertimage', obj );
+    if ( !evt.ctrlKey ) {
+        dialog.popup.hide();
+    }
+}
+
+function switchTab( index ) {
+
+    autoHeight( index );
+    if ( emotion.tabExist[index] == 0 ) {
+        emotion.tabExist[index] = 1;
+        createTab( 'tab' + index );
+    }
+    //获取呈现元素句柄数组
+    var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ),
+            tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ),
+            i = 0, L = tabHeads.length;
+    //隐藏所有呈现元素
+    for ( ; i < L; i++ ) {
+        tabHeads[i].className = "";
+        tabBodys[i].style.display = "none";
+    }
+    //显示对应呈现元素
+    tabHeads[index].className = "focus";
+    tabBodys[index].style.display = "block";
+}
+
+function autoHeight( index ) {
+    var iframe = dialog.getDom( "iframe" ),
+            parent = iframe.parentNode.parentNode;
+    switch ( index ) {
+        case 0:
+            iframe.style.height = "380px";
+            parent.style.height = "392px";
+            break;
+        case 1:
+            iframe.style.height = "220px";
+            parent.style.height = "232px";
+            break;
+        case 2:
+            iframe.style.height = "260px";
+            parent.style.height = "272px";
+            break;
+        case 3:
+            iframe.style.height = "300px";
+            parent.style.height = "312px";
+            break;
+        case 4:
+            iframe.style.height = "140px";
+            parent.style.height = "152px";
+            break;
+        case 5:
+            iframe.style.height = "260px";
+            parent.style.height = "272px";
+            break;
+        case 6:
+            iframe.style.height = "230px";
+            parent.style.height = "242px";
+            break;
+        default:
+
+    }
+}
+
+
+function createTab( tabName ) {
+    var faceVersion = "?v=1.1", //版本号
+            tab = $G( tabName ), //获取将要生成的Div句柄
+            imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径
+            positionLine = 11 / 2, //中间数
+            iWidth = iHeight = 35, //图片长宽
+            iColWidth = 3, //表格剩余空间的显示比例
+            tableCss = emotion.imageCss[tabName],
+            cssOffset = emotion.imageCssOffset[tabName],
+            textHTML = ['<table class="smileytable">'],
+            i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage,
+            sUrl, realUrl, posflag, offset, infor;
+
+    for ( ; i < imgNum; ) {
+        textHTML.push( '<tr>' );
+        for ( var j = 0; j < imgColNum; j++, i++ ) {
+            faceImage = emotion.SmileyBox[tabName][i];
+            if ( faceImage ) {
+                sUrl = imagePath + faceImage + faceVersion;
+                realUrl = imagePath + faceImage;
+                posflag = j < positionLine ? 0 : 1;
+                offset = cssOffset * i * (-1) - 1;
+                infor = emotion.SmileyInfor[tabName][i];
+
+                textHTML.push( '<td  class="' + tableCss + '"   border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center"  bgcolor="transparent" onclick="InsertSmiley(\'' + realUrl.replace( /'/g, "\\'" ) + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">' );
+                textHTML.push( '<span>' );
+                textHTML.push( '<img  style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>' );
+                textHTML.push( '</span>' );
+            } else {
+                textHTML.push( '<td width="' + iColWidth + '%"   bgcolor="#FFFFFF">' );
+            }
+            textHTML.push( '</td>' );
+        }
+        textHTML.push( '</tr>' );
+    }
+    textHTML.push( '</table>' );
+    textHTML = textHTML.join( "" );
+    tab.innerHTML = textHTML;
+}
+
+function over( td, srcPath, posFlag ) {
+    td.style.backgroundColor = "#ACCD3C";
+    $G( 'faceReview' ).style.backgroundImage = "url(" + srcPath + ")";
+    if ( posFlag == 1 ) $G( "tabIconReview" ).className = "show";
+    $G( "tabIconReview" ).style.display = 'block';
+}
+
+function out( td ) {
+    td.style.backgroundColor = "transparent";
+    var tabIconRevew = $G( "tabIconReview" );
+    tabIconRevew.className = "";
+    tabIconRevew.style.display = 'none';
+}
+
+function createTabList( tabNum ) {
+    var obj = {};
+    for ( var i = 0; i < tabNum; i++ ) {
+        obj["tab" + i] = [];
+    }
+    return obj;
+}
+
+function createArr( tabNum ) {
+    var arr = [];
+    for ( var i = 0; i < tabNum; i++ ) {
+        arr[i] = 0;
+    }
+    return arr;
+}
+

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


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


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


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


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

@@ -0,0 +1,89 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<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">
+        .content{width:530px; height: 350px;margin: 10px auto;}
+        .content table{width: 100%}
+        .content table td{vertical-align: middle;}
+        #address{width:220px;height:21px;background: #FFF;border:1px solid #d7d7d7; line-height: 21px;}
+    </style>
+    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
+</head>
+<body>
+<div class="content">
+    <table>
+        <tr>
+            <td><label for="address"><var id="lang_input_address"></var></label></td>
+            <td><input id="address" type="text" /></td>
+            <td><a id="doSearch" href="javascript:void(0)" class="button"><var id="lang_input_search"></var></a></td>
+        </tr>
+    </table>
+    <div id="container" style="width: 100%; height: 340px;margin: 5px auto; border: 1px solid gray;"></div>
+</div>
+<script type="text/javascript">
+    domUtils.on(window,"load",function(){
+        var map = new google.maps.Map(document.getElementById('container'), {
+                zoom: 3,
+                streetViewControl: false,
+                scaleControl: true,
+                mapTypeId: google.maps.MapTypeId.ROADMAP
+            });
+            var imgcss;
+            var marker = new google.maps.Marker({
+                map: map,
+                draggable: true
+            });
+            function doSearch(){
+                var address = document.getElementById('address').value;
+                var geocoder = new google.maps.Geocoder();
+                geocoder.geocode( { 'address': address}, function (results, status) {
+                    if (status == google.maps.GeocoderStatus.OK) {
+                        var bounds = results[0].geometry.viewport;
+                        map.fitBounds(bounds);
+                        marker.setPosition(results[0].geometry.location);
+                        marker.setTitle(address);
+                    } else alert(lang.searchError);
+                });
+            }
+            $G('address').onkeydown = function (evt){
+                evt = evt || event;
+                if (evt.keyCode == 13) {
+                    doSearch();
+                }
+            };
+            $G("doSearch").onclick = doSearch;
+            dialog.onok = function (){
+                var center = map.getCenter();
+                var point = marker.getPosition();
+                var url = "http://maps.googleapis.com/maps/api/staticmap?center=" + center.lat() + ',' + center.lng() + "&zoom=" + map.zoom + "&size=520x340&maptype=" + map.getMapTypeId() + "&markers=" + point.lat() + ',' + point.lng() + "&sensor=false";
+                editor.execCommand('inserthtml', '<img width="520" height="340" src="' + url + '"' + (imgcss ? ' style="' + imgcss + '"' :'') + '/>');
+            };
+
+            function getPars(str,par){
+                var reg = new RegExp(par+"=((\\d+|[.,])*)","g");
+                return reg.exec(str)[1];
+            }
+            var img = editor.selection.getRange().getClosedNode();
+            if(img && img.src.indexOf("http://maps.googleapis.com/maps/api/staticmap")!=-1){
+                var url = img.getAttribute("src");
+                var centers = getPars(url,"center").split(",");
+                point = new google.maps.LatLng(Number(centers[0]),Number(centers[1]));
+                map.setCenter(point);
+                map.setZoom(Number(getPars(url,"zoom")));
+                centers = getPars(url,"markers").split(",");
+                marker.setPosition(new google.maps.LatLng(Number(centers[0]),Number(centers[1])));
+                imgcss = img.style.cssText;
+            }else{
+                setTimeout(function(){
+                    doSearch();
+                },30)
+            }
+    });
+
+</script>
+</body>
+</html>

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

@@ -0,0 +1,7 @@
+.wrapper{width: 370px;margin: 10px auto;zoom: 1;}
+.tabbody{height: 360px;}
+.tabbody .panel{width:100%;height: 360px;position: absolute;background: #fff;}
+.tabbody .panel h1{font-size:26px;margin: 5px 0 0 5px;}
+.tabbody .panel p{font-size:12px;margin: 5px 0 0 5px;}
+.tabbody table{width:90%;line-height: 20px;margin: 5px 0 0 5px;;}
+.tabbody table thead{font-weight: bold;line-height: 25px;}

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

@@ -0,0 +1,82 @@
+<!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>
+    <link rel="stylesheet" type="text/css" href="help.css">
+</head>
+<body>
+<div class="wrapper" id="helptab">
+    <div id="tabHeads" class="tabhead">
+        <span class="focus" tabsrc="about"><var id="lang_input_about"></var></span>
+        <span tabsrc="shortcuts"><var id="lang_input_shortcuts"></var></span>
+    </div>
+    <div id="tabBodys" class="tabbody">
+        <div id="about" class="panel">
+            <h1>UEditor</h1>
+            <p id="version"></p>
+            <p><var id="lang_input_introduction"></var></p>
+        </div>
+        <div id="shortcuts" class="panel">
+            <table>
+                <thead>
+                <tr>
+                    <td><var id="lang_Txt_shortcuts"></var></td>
+                    <td><var id="lang_Txt_func"></var></td>
+                </tr>
+                </thead>
+                <tbody>
+                <tr>
+                    <td>ctrl+b</td>
+                    <td><var id="lang_Txt_bold"></var></td>
+                </tr>
+                <tr>
+                    <td>ctrl+c</td>
+                    <td><var id="lang_Txt_copy"></var></td>
+                </tr>
+                <tr>
+                    <td>ctrl+x</td>
+                    <td><var id="lang_Txt_cut"></var></td>
+                </tr>
+                <tr>
+                    <td>ctrl+v</td>
+                    <td><var id="lang_Txt_Paste"></var></td>
+                </tr>
+                <tr>
+                    <td>ctrl+y</td>
+                    <td><var id="lang_Txt_undo"></var></td>
+                </tr>
+                <tr>
+                    <td>ctrl+z</td>
+                    <td><var id="lang_Txt_redo"></var></td>
+                </tr>
+                <tr>
+                    <td>ctrl+i</td>
+                    <td><var id="lang_Txt_italic"></var></td>
+                </tr>
+                <tr>
+                    <td>ctrl+u</td>
+                    <td><var id="lang_Txt_underline"></var></td>
+                </tr>
+                <tr>
+                    <td>ctrl+a</td>
+                    <td><var id="lang_Txt_selectAll"></var></td>
+                </tr>
+                <tr>
+                    <td>shift+enter</td>
+                    <td><var id="lang_Txt_visualEnter"></var></td>
+                </tr>
+                <tr>
+                    <td>alt+z</td>
+                    <td><var id="lang_Txt_fullscreen"></var></td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+</div>
+<script type="text/javascript" src="help.js"></script>
+</body>
+</html>

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

@@ -0,0 +1,56 @@
+/**
+ * Created with JetBrains PhpStorm.
+ * User: xuheng
+ * Date: 12-9-26
+ * Time: 下午1:06
+ * To change this template use File | Settings | File Templates.
+ */
+/**
+ * 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" );
+        body.onclick = function(){
+            this.style.zoom = 1;
+        };
+        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);
+        }
+    }
+}
+switchTab("helptab");
+
+document.getElementById('version').innerHTML = parent.UE.version;

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


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


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


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


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


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


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


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


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


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/table/dragicon.png


+ 84 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/table/edittable.css

@@ -0,0 +1,84 @@
+body{
+    overflow: hidden;
+    width: 540px;
+}
+.wrapper {
+    margin: 10px auto 0;
+    font-size: 12px;
+    overflow: hidden;
+    width: 520px;
+    height: 315px;
+}
+
+.clear {
+    clear: both;
+}
+
+.wrapper .left {
+    float: left;
+    margin-left: 10px;;
+}
+
+.wrapper .right {
+    float: right;
+    border-left: 2px dotted #EDEDED;
+    padding-left: 15px;
+}
+
+.section {
+    margin-bottom: 15px;
+    width: 240px;
+    overflow: hidden;
+}
+
+.section h3 {
+    font-weight: bold;
+    padding: 5px 0;
+    margin-bottom: 10px;
+    border-bottom: 1px solid #EDEDED;
+    font-size: 12px;
+}
+
+.section ul {
+    list-style: none;
+    overflow: hidden;
+    clear: both;
+
+}
+
+.section li {
+    float: left;
+    width: 120px;;
+}
+
+.section .tone {
+    width: 80px;;
+}
+
+.section .preview {
+    width: 220px;
+}
+
+.section .preview table {
+    text-align: center;
+    vertical-align: middle;
+    color: #666;
+}
+
+.section .preview caption {
+    font-weight: bold;
+}
+
+.section .preview td {
+    border-width: 1px;
+    border-style: solid;
+    height: 22px;
+}
+
+.section .preview th {
+    border-style: solid;
+    border-color: #DDD;
+    border-width: 2px 1px 1px 1px;
+    height: 22px;
+    background-color: #F7F7F7;
+}

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

@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title></title>
+    <script type="text/javascript" src="../internal.js"></script>
+    <link rel="stylesheet" type="text/css" href="edittable.css">
+</head>
+<body>
+<div class="wrapper">
+    <div class="left">
+        <div class="section">
+            <h3><var id="lang_tableStyle"></var></h3>
+            <ul>
+                <li>
+                    <label onselectstart="return false"><input type="checkbox" id="J_title" name="style"/><var id="lang_insertTitle"></var></label>
+                </li>
+                <li>
+                    <label onselectstart="return false"><input type="checkbox" id="J_titleCol" name="style"/><var id="lang_insertTitleCol"></var></label>
+                </li>
+            </ul>
+            <ul>
+                <li>
+                    <label onselectstart="return false"><input type="checkbox" id="J_caption" name="style"/><var id="lang_insertCaption"></var></label>
+                </li>
+                <li>
+                    <label onselectstart="return false"><input type="checkbox" id="J_sorttable" name="style"/><var id="lang_orderbycontent"></var></label>
+                </li>
+            </ul>
+            <div class="clear"></div>
+        </div>
+        <div class="section">
+            <h3><var id="lang_tableSize"></var></h3>
+            <ul>
+                <li>
+                    <label><input type="radio" id="J_autoSizeContent" name="size"/><var id="lang_autoSizeContent"></var></label>
+                </li>
+                <li>
+                    <label><input type="radio" id="J_autoSizePage" name="size"/><var id="lang_autoSizePage"></var></label>
+                </li>
+            </ul>
+            <div class="clear"></div>
+        </div>
+        <div class="section">
+            <h3><var id="lang_borderStyle"></var></h3>
+            <ul>
+                <li>
+                    <span><var id="lang_color"></var></span>
+                    <input type="text" class="tone" id="J_tone" readonly='readonly' />
+                </li>
+            </ul>
+            <div class="clear"></div>
+        </div>
+    </div>
+    <div class="right">
+        <div class="section">
+            <h3><var id="lang_example"></var></h3>
+            <div class="preview" id="J_preview">
+            </div>
+        </div>
+    </div>
+</div>
+<script type="text/javascript" src="edittable.js"></script>
+</body>
+</html>

+ 237 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/table/edittable.js

@@ -0,0 +1,237 @@
+/**
+ * Created with JetBrains PhpStorm.
+ * User: xuheng
+ * Date: 12-12-19
+ * Time: 下午4:55
+ * To change this template use File | Settings | File Templates.
+ */
+(function () {
+    var title = $G("J_title"),
+        titleCol = $G("J_titleCol"),
+        caption = $G("J_caption"),
+        sorttable = $G("J_sorttable"),
+        autoSizeContent = $G("J_autoSizeContent"),
+        autoSizePage = $G("J_autoSizePage"),
+        tone = $G("J_tone"),
+        me,
+        preview = $G("J_preview");
+
+    var editTable = function () {
+        me = this;
+        me.init();
+    };
+    editTable.prototype = {
+        init:function () {
+            var colorPiker = new UE.ui.ColorPicker({
+                    editor:editor
+                }),
+                colorPop = new UE.ui.Popup({
+                    editor:editor,
+                    content:colorPiker
+                });
+
+            title.checked = editor.queryCommandState("inserttitle") == -1;
+            titleCol.checked = editor.queryCommandState("inserttitlecol") == -1;
+            caption.checked = editor.queryCommandState("insertcaption") == -1;
+            sorttable.checked = editor.queryCommandState("enablesort") == 1;
+
+            var enablesortState = editor.queryCommandState("enablesort"),
+                disablesortState = editor.queryCommandState("disablesort");
+
+            sorttable.checked = !!(enablesortState < 0 && disablesortState >=0);
+            sorttable.disabled = !!(enablesortState < 0 && disablesortState < 0);
+            sorttable.title = enablesortState < 0 && disablesortState < 0 ? lang.errorMsg:'';
+
+            me.createTable(title.checked, titleCol.checked, caption.checked);
+            me.setAutoSize();
+            me.setColor(me.getColor());
+
+            domUtils.on(title, "click", me.titleHanler);
+            domUtils.on(titleCol, "click", me.titleColHanler);
+            domUtils.on(caption, "click", me.captionHanler);
+            domUtils.on(sorttable, "click", me.sorttableHanler);
+            domUtils.on(autoSizeContent, "click", me.autoSizeContentHanler);
+            domUtils.on(autoSizePage, "click", me.autoSizePageHanler);
+
+            domUtils.on(tone, "click", function () {
+                colorPop.showAnchor(tone);
+            });
+            domUtils.on(document, 'mousedown', function () {
+                colorPop.hide();
+            });
+            colorPiker.addListener("pickcolor", function () {
+                me.setColor(arguments[1]);
+                colorPop.hide();
+            });
+            colorPiker.addListener("picknocolor", function () {
+                me.setColor("");
+                colorPop.hide();
+            });
+        },
+
+        createTable:function (hasTitle, hasTitleCol, hasCaption) {
+            var arr = [],
+                sortSpan = '<span>^</span>';
+            arr.push("<table id='J_example'>");
+            if (hasCaption) {
+                arr.push("<caption>" + lang.captionName + "</caption>")
+            }
+            if (hasTitle) {
+                arr.push("<tr>");
+                if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>"); }
+                for (var j = 0; j < 5; j++) {
+                    arr.push("<th>" + lang.titleName + "</th>");
+                }
+                arr.push("</tr>");
+            }
+            for (var i = 0; i < 6; i++) {
+                arr.push("<tr>");
+                if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>") }
+                for (var k = 0; k < 5; k++) {
+                    arr.push("<td>" + lang.cellsName + "</td>")
+                }
+                arr.push("</tr>");
+            }
+            arr.push("</table>");
+            preview.innerHTML = arr.join("");
+            this.updateSortSpan();
+        },
+        titleHanler:function () {
+            var example = $G("J_example"),
+                frg=document.createDocumentFragment(),
+                color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"),
+                colCount = example.rows[0].children.length;
+
+            if (title.checked) {
+                example.insertRow(0);
+                for (var i = 0, node; i < colCount; i++) {
+                    node = document.createElement("th");
+                    node.innerHTML = lang.titleName;
+                    frg.appendChild(node);
+                }
+                example.rows[0].appendChild(frg);
+
+            } else {
+                domUtils.remove(example.rows[0]);
+            }
+            me.setColor(color);
+            me.updateSortSpan();
+        },
+        titleColHanler:function () {
+            var example = $G("J_example"),
+                color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"),
+                colArr = example.rows,
+                colCount = colArr.length;
+
+            if (titleCol.checked) {
+                for (var i = 0, node; i < colCount; i++) {
+                    node = document.createElement("th");
+                    node.innerHTML = lang.titleName;
+                    colArr[i].insertBefore(node, colArr[i].children[0]);
+                }
+            } else {
+                for (var i = 0; i < colCount; i++) {
+                    domUtils.remove(colArr[i].children[0]);
+                }
+            }
+            me.setColor(color);
+            me.updateSortSpan();
+        },
+        captionHanler:function () {
+            var example = $G("J_example");
+            if (caption.checked) {
+                var row = document.createElement('caption');
+                row.innerHTML = lang.captionName;
+                example.insertBefore(row, example.firstChild);
+            } else {
+                domUtils.remove(domUtils.getElementsByTagName(example, 'caption')[0]);
+            }
+        },
+        sorttableHanler:function(){
+            me.updateSortSpan();
+        },
+        autoSizeContentHanler:function () {
+            var example = $G("J_example");
+            example.removeAttribute("width");
+        },
+        autoSizePageHanler:function () {
+            var example = $G("J_example");
+            var tds = example.getElementsByTagName(example, "td");
+            utils.each(tds, function (td) {
+                td.removeAttribute("width");
+            });
+            example.setAttribute('width', '100%');
+        },
+        updateSortSpan: function(){
+            var example = $G("J_example"),
+                row = example.rows[0];
+
+            var spans = domUtils.getElementsByTagName(example,"span");
+            utils.each(spans,function(span){
+                span.parentNode.removeChild(span);
+            });
+            if (sorttable.checked) {
+                utils.each(row.cells, function(cell, i){
+                    var span = document.createElement("span");
+                    span.innerHTML = "^";
+                    cell.appendChild(span);
+                });
+            }
+        },
+        getColor:function () {
+            var start = editor.selection.getStart(), color,
+                cell = domUtils.findParentByTagName(start, ["td", "th", "caption"], true);
+            color = cell && domUtils.getComputedStyle(cell, "border-color");
+            if (!color)  color = "#DDDDDD";
+            return color;
+        },
+        setColor:function (color) {
+            var example = $G("J_example"),
+                arr = domUtils.getElementsByTagName(example, "td").concat(
+                    domUtils.getElementsByTagName(example, "th"),
+                    domUtils.getElementsByTagName(example, "caption")
+                );
+
+            tone.value = color;
+            utils.each(arr, function (node) {
+                node.style.borderColor = color;
+            });
+
+        },
+        setAutoSize:function () {
+            var me = this;
+            autoSizePage.checked = true;
+            me.autoSizePageHanler();
+        }
+    };
+
+    new editTable;
+
+    dialog.onok = function () {
+        editor.__hasEnterExecCommand = true;
+
+        var checks = {
+            title:"inserttitle deletetitle",
+            titleCol:"inserttitlecol deletetitlecol",
+            caption:"insertcaption deletecaption",
+            sorttable:"enablesort disablesort"
+        };
+        editor.fireEvent('saveScene');
+        for(var i in checks){
+            var cmds = checks[i].split(" "),
+                input = $G("J_" + i);
+            if(input["checked"]){
+                editor.queryCommandState(cmds[0])!=-1 &&editor.execCommand(cmds[0]);
+            }else{
+                editor.queryCommandState(cmds[1])!=-1 &&editor.execCommand(cmds[1]);
+            }
+        }
+
+        editor.execCommand("edittable", tone.value);
+        autoSizeContent.checked ?editor.execCommand('adaptbytext') : "";
+        autoSizePage.checked ? editor.execCommand("adaptbywindow") : "";
+        editor.fireEvent('saveScene');
+
+        editor.__hasEnterExecCommand = false;
+    };
+})();

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

@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title></title>
+    <script type="text/javascript" src="../internal.js"></script>
+    <style type="text/css">
+        .section {
+            text-align: center;
+            margin-top: 10px;
+        }
+        .section input {
+            margin-left: 5px;
+            width: 70px;
+        }
+    </style>
+</head>
+<body>
+<div class="section">
+    <span><var id="lang_tdBkColor"></var></span>
+    <input type="text" id="J_tone"/>
+</div>
+<script type="text/javascript">
+    var tone = $G("J_tone"),
+            colorPiker = new UE.ui.ColorPicker({
+                editor:editor
+            }),
+            colorPop = new UE.ui.Popup({
+                editor:editor,
+                content:colorPiker
+            });
+    domUtils.on(tone, "click", function () {
+        colorPop.showAnchor(tone);
+    });
+    domUtils.on(document, 'mousedown', function () {
+        colorPop.hide();
+    });
+    colorPiker.addListener("pickcolor", function () {
+        tone.value = arguments[1];
+        colorPop.hide();
+    });
+    colorPiker.addListener("picknocolor", function () {
+        tone.value="";
+        colorPop.hide();
+    });
+    dialog.onok=function(){
+        editor.execCommand("edittd",tone.value);
+    };
+
+    var start = editor.selection.getStart(),
+        cell = start && domUtils.findParentByTagName(start, ["td", "th"], true);
+    if(cell){
+        var color = domUtils.getComputedStyle(cell,'background-color');
+        if(/^#/.test(color)){
+            tone.value = color
+        }
+
+    }
+
+</script>
+</body>
+</html>

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

@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>表格删除提示</title>
+    <script type="text/javascript" src="../internal.js"></script>
+    <style type="text/css">
+        .section {
+            width: 200px;
+            margin: 10px auto 0;
+            font-size: 14px;
+        }
+
+        .item {
+            text-align: center;
+        }
+    </style>
+</head>
+<body>
+<div class="section">
+    <div class="item">
+        <label><input type="radio" id="J_delRow" name="cmd" checked/><var id="lang_delRow"></var></label>
+    </div>
+    <div class="item">
+        <label><input type="radio" id="J_delCol" name="cmd"/><var id="lang_delCol"></var></label>
+    </div>
+</div>
+<script type="text/javascript">
+    dialog.onok = function () {
+        $G("J_delRow").checked ? editor.execCommand("deleterow") : editor.execCommand("deletecol");
+    };
+</script>
+</body>
+</html>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 42 - 0
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/template/config.js


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


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


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


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


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


BIN
watero-wechat-web/src/main/webapp/common/lib/ueditor/1.4.3/dialogs/wordimage/fClipboard_ueditor.swf


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


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels