├── static ├── .gitkeep ├── video.mp4 └── ueditor │ ├── lang │ ├── en │ │ └── images │ │ │ ├── copy.png │ │ │ ├── music.png │ │ │ ├── addimage.png │ │ │ ├── button.png │ │ │ ├── upload.png │ │ │ ├── background.png │ │ │ ├── localimage.png │ │ │ ├── deletedisable.png │ │ │ ├── deleteenable.png │ │ │ ├── listbackground.png │ │ │ ├── alldeletebtnupskin.png │ │ │ ├── rotateleftdisable.png │ │ │ ├── rotateleftenable.png │ │ │ ├── rotaterightdisable.png │ │ │ ├── rotaterightenable.png │ │ │ └── alldeletebtnhoverskin.png │ └── zh-cn │ │ └── images │ │ ├── copy.png │ │ ├── music.png │ │ ├── upload.png │ │ └── localimage.png │ ├── themes │ ├── default │ │ ├── images │ │ │ ├── sparator.png │ │ │ ├── icons29f4d4.png │ │ │ ├── icon_edui_indent.png │ │ │ ├── icons-all29f4d4.gif │ │ │ └── ueditor_z29f4d5.png │ │ └── css │ │ │ └── ueditor.css │ └── iframe.css │ └── third-party │ ├── video-js │ ├── font │ │ ├── vjs.eot │ │ ├── vjs.ttf │ │ ├── vjs.woff │ │ └── vjs.svg │ ├── video-js.swf │ └── video-js.min.css │ ├── webuploader │ ├── Uploader.swf │ └── webuploader.css │ ├── snapscreen │ └── UEditorSnapscreen.exe │ ├── zeroclipboard │ ├── ZeroClipboard.swf │ └── ZeroClipboard.min.js │ ├── highcharts │ ├── modules │ │ ├── heatmap.js │ │ ├── heatmap.src.js │ │ ├── no-data-to-display.js │ │ ├── funnel.js │ │ ├── annotations.js │ │ ├── no-data-to-display.src.js │ │ ├── data.js │ │ ├── drilldown.js │ │ ├── exporting.js │ │ ├── funnel.src.js │ │ ├── map.js │ │ ├── annotations.src.js │ │ └── drilldown.src.js │ ├── themes │ │ ├── skies.js │ │ ├── grid.js │ │ ├── dark-green.js │ │ ├── dark-blue.js │ │ └── gray.js │ └── adapters │ │ ├── mootools-adapter.js │ │ ├── prototype-adapter.js │ │ ├── standalone-framework.js │ │ ├── mootools-adapter.src.js │ │ ├── prototype-adapter.src.js │ │ └── standalone-framework.src.js │ ├── codemirror │ └── codemirror.css │ └── SyntaxHighlighter │ └── shCoreDefault.css ├── src ├── components │ ├── toolbuttons │ │ ├── colorpicker.vue │ │ ├── toolbtn.vue │ │ ├── fontSize.vue │ │ └── toolselect.vue │ └── Hello.vue ├── assets │ └── logo.png ├── common │ └── js │ │ └── util.js ├── router │ └── index.js ├── main.js └── App.vue ├── .gitignore ├── config ├── prod.env.js ├── dev.env.js └── index.js ├── .eslintignore ├── .editorconfig ├── .babelrc ├── index.html ├── README.md ├── .eslintrc.js └── package.json /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/toolbuttons/colorpicker.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log 5 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /static/video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/video.mp4 -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | node_modules/*.* 4 | static/* 5 | src/assets/ueditor/* -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/copy.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/music.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/addimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/addimage.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/button.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/upload.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/zh-cn/images/copy.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/zh-cn/images/music.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/background.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/localimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/localimage.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/zh-cn/images/upload.png -------------------------------------------------------------------------------- /src/common/js/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 数组去重 3 | * @createdAt 2017-02-09T21:12:41+0800 4 | * @author lichin 5 | */ 6 | export uniqueArr() { 7 | 8 | }; -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/deletedisable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/deletedisable.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/deleteenable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/deleteenable.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/localimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/zh-cn/images/localimage.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/listbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/listbackground.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/sparator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/themes/default/images/sparator.png -------------------------------------------------------------------------------- /static/ueditor/third-party/video-js/font/vjs.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/third-party/video-js/font/vjs.eot -------------------------------------------------------------------------------- /static/ueditor/third-party/video-js/font/vjs.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/third-party/video-js/font/vjs.ttf -------------------------------------------------------------------------------- /static/ueditor/third-party/video-js/font/vjs.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/third-party/video-js/font/vjs.woff -------------------------------------------------------------------------------- /static/ueditor/third-party/video-js/video-js.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/third-party/video-js/video-js.swf -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/alldeletebtnupskin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/alldeletebtnupskin.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/rotateleftdisable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/rotateleftdisable.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/rotateleftenable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/rotateleftenable.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/rotaterightdisable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/rotaterightdisable.png -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/rotaterightenable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/rotaterightenable.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/icons29f4d4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/themes/default/images/icons29f4d4.png -------------------------------------------------------------------------------- /static/ueditor/third-party/webuploader/Uploader.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/third-party/webuploader/Uploader.swf -------------------------------------------------------------------------------- /static/ueditor/lang/en/images/alldeletebtnhoverskin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/lang/en/images/alldeletebtnhoverskin.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/icon_edui_indent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/themes/default/images/icon_edui_indent.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/icons-all29f4d4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/themes/default/images/icons-all29f4d4.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/ueditor_z29f4d5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/themes/default/images/ueditor_z29f4d5.png -------------------------------------------------------------------------------- /static/ueditor/third-party/snapscreen/UEditorSnapscreen.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/third-party/snapscreen/UEditorSnapscreen.exe -------------------------------------------------------------------------------- /static/ueditor/third-party/zeroclipboard/ZeroClipboard.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yiwuyu/vue-ueditor/HEAD/static/ueditor/third-party/zeroclipboard/ZeroClipboard.swf -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /src/components/toolbuttons/toolbtn.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", { "modules": false }], 4 | "stage-2" 5 | ], 6 | "plugins": ["transform-runtime"], 7 | "comments": false, 8 | "ignore": [ 9 | "./static/ueditor/*"], 10 | "env": { 11 | "test": { 12 | "plugins": [ "istanbul" ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Router from 'vue-router'; 3 | import Hello from 'components/Hello'; 4 | import UEditor from 'components/ueditor/ueditor'; 5 | 6 | Vue.use(Router); 7 | 8 | export default new Router({ 9 | routes: [ 10 | { 11 | path: '/', 12 | name: 'Home', 13 | component: Hello 14 | }, 15 | { 16 | path: '/ueditor', 17 | name: 'UEditor', 18 | component: UEditor 19 | } 20 | ] 21 | }); 22 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue'; 4 | import App from './App'; 5 | import router from './router'; 6 | import ElementUI from 'element-ui'; 7 | import 'element-ui/lib/theme-default/index.css'; 8 | 9 | Vue.use(ElementUI); 10 | /* eslint-disable no-new */ 11 | new Vue({ 12 | el: '#app', 13 | router, 14 | template: '', 15 | components: { App } 16 | }); 17 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 24 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/heatmap.js: -------------------------------------------------------------------------------- 1 | (function(b){var k=b.seriesTypes,l=b.each;k.heatmap=b.extendClass(k.map,{colorKey:"z",useMapGeometry:!1,pointArrayMap:["y","z"],translate:function(){var c=this,b=c.options,i=Number.MAX_VALUE,j=Number.MIN_VALUE;c.generatePoints();l(c.data,function(a){var e=a.x,f=a.y,d=a.z,g=(b.colsize||1)/2,h=(b.rowsize||1)/2;a.path=["M",e-g,f-h,"L",e+g,f-h,"L",e+g,f+h,"L",e-g,f+h,"Z"];a.shapeType="path";a.shapeArgs={d:c.translatePath(a.path)};typeof d==="number"&&(d>j?j=d:d 23 | 24 | 25 | 26 | 27 | vue-ueditor 28 | 29 | 30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-ueditor 2 | 3 | > A Vue.js demo base on UEditor, UI from Wechat Media Platform. 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8089 (if you wanna change the port, check out the file[./config/index.js](line:26)) 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | 17 | # build for production and view the bundle analyzer report 18 | npm run build --report 19 | ``` 20 | ## Tips 21 | You'd better check the file(./.eslintrc.js) before cloning the demo into your project. 22 | 23 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 24 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // http://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parser: 'babel-eslint', 6 | parserOptions: { 7 | sourceType: 'module' 8 | }, 9 | env: { 10 | browser: true, 11 | }, 12 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style 13 | extends: 'standard', 14 | // required to lint *.vue files 15 | plugins: [ 16 | 'html' 17 | ], 18 | // add your custom rules here 19 | 'rules': { 20 | // allow paren-less arrow functions 21 | 'arrow-parens': 0, 22 | // allow async-await 23 | 'generator-star-spacing': 0, 24 | // allow debugger during development 25 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 26 | 'semi': ['error', 'always'], 27 | 'no-tabs': 0, 28 | 'indent': 0, 29 | 'space-before-function-paren': 0 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /static/ueditor/themes/iframe.css: -------------------------------------------------------------------------------- 1 | h1,h2,h3,h4,h5,h6{font-weight:400;font-size:16px}*{margin:0;padding:0}a{color:#607fa6;text-decoration:none}html{line-height:1.6;overflow:hidden}body{margin:0;padding:0;font-family:"Helvetica Neue",Helvetica,"Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif}.view{word-break:break-word;cursor:text;min-height:440px;word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden}p{clear:both}img{*zoom:1;max-width:100%;*max-width:96%;height:auto!important}iframe{width:301px!important;border:0;background-color:none}blockquote{margin:0;padding-left:10px;border-left:3px solid #dbdbdb}.vote_area{display:block}.vote_iframe{height:100%;width:100%!important;*width:96%!important}.qqmusic_iframe{width:100%!important;height:75px}.audio_iframe{width:100%!important;height:82px}.video_iframe{background-color:#000;width:100%!important;*width:96%!important;position:static}.shopcard_iframe{width:100%!important;height:95px;margin:14px 0}.topic_iframe{width:100%!important;height:118px;margin:14px 0} -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/heatmap.src.js: -------------------------------------------------------------------------------- 1 | (function (Highcharts) { 2 | var seriesTypes = Highcharts.seriesTypes, 3 | each = Highcharts.each; 4 | 5 | seriesTypes.heatmap = Highcharts.extendClass(seriesTypes.map, { 6 | colorKey: 'z', 7 | useMapGeometry: false, 8 | pointArrayMap: ['y', 'z'], 9 | translate: function () { 10 | var series = this, 11 | options = series.options, 12 | dataMin = Number.MAX_VALUE, 13 | dataMax = Number.MIN_VALUE; 14 | 15 | series.generatePoints(); 16 | 17 | each(series.data, function (point) { 18 | var x = point.x, 19 | y = point.y, 20 | value = point.z, 21 | xPad = (options.colsize || 1) / 2, 22 | yPad = (options.rowsize || 1) / 2; 23 | 24 | point.path = [ 25 | 'M', x - xPad, y - yPad, 26 | 'L', x + xPad, y - yPad, 27 | 'L', x + xPad, y + yPad, 28 | 'L', x - xPad, y + yPad, 29 | 'Z' 30 | ]; 31 | 32 | point.shapeType = 'path'; 33 | point.shapeArgs = { 34 | d: series.translatePath(point.path) 35 | }; 36 | 37 | if (typeof value === 'number') { 38 | if (value > dataMax) { 39 | dataMax = value; 40 | } else if (value < dataMin) { 41 | dataMin = value; 42 | } 43 | } 44 | }); 45 | 46 | series.translateColors(dataMin, dataMax); 47 | }, 48 | 49 | getBox: function () {} 50 | 51 | }); 52 | 53 | }(Highcharts)); 54 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/no-data-to-display.js: -------------------------------------------------------------------------------- 1 | /* 2 | Highcharts JS v3.0.6 (2013-10-04) 3 | Plugin for displaying a message when there is no data visible in chart. 4 | 5 | (c) 2010-2013 Highsoft AS 6 | Author: Øystein Moseng 7 | 8 | License: www.highcharts.com/license 9 | */ 10 | (function(c){function f(){return!!this.points.length}function g(){this.hasData()?this.hideNoData():this.showNoData()}var d=c.seriesTypes,e=c.Chart.prototype,h=c.getOptions(),i=c.extend;i(h.lang,{noData:"No data to display"});h.noData={position:{x:0,y:0,align:"center",verticalAlign:"middle"},attr:{},style:{fontWeight:"bold",fontSize:"12px",color:"#60606a"}};d.pie.prototype.hasData=f;if(d.gauge)d.gauge.prototype.hasData=f;if(d.waterfall)d.waterfall.prototype.hasData=f;c.Series.prototype.hasData=function(){return this.dataMax!== 11 | void 0&&this.dataMin!==void 0};e.showNoData=function(a){var b=this.options,a=a||b.lang.noData,b=b.noData;if(!this.noDataLabel)this.noDataLabel=this.renderer.label(a,0,0,null,null,null,null,null,"no-data").attr(b.attr).css(b.style).add(),this.noDataLabel.align(i(this.noDataLabel.getBBox(),b.position),!1,"plotBox")};e.hideNoData=function(){if(this.noDataLabel)this.noDataLabel=this.noDataLabel.destroy()};e.hasData=function(){for(var a=this.series,b=a.length;b--;)if(a[b].hasData()&&!a[b].options.isInternal)return!0; 12 | return!1};e.callbacks.push(function(a){c.addEvent(a,"load",g);c.addEvent(a,"redraw",g)})})(Highcharts); 13 | -------------------------------------------------------------------------------- /src/components/Hello.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 33 | 34 | 35 | 50 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../dist/index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'static', 10 | assetsPublicPath: '/', 11 | productionSourceMap: true, 12 | // Gzip off by default as many popular static hosts such as 13 | // Surge or Netlify already gzip all static assets for you. 14 | // Before setting to `true`, make sure to: 15 | // npm install --save-dev compression-webpack-plugin 16 | productionGzip: false, 17 | productionGzipExtensions: ['js', 'css'], 18 | // Run the build command with an extra argument to 19 | // View the bundle analyzer report after build finishes: 20 | // `npm run build --report` 21 | // Set to `true` or `false` to always turn it on or off 22 | bundleAnalyzerReport: process.env.npm_config_report 23 | }, 24 | dev: { 25 | env: require('./dev.env'), 26 | port: 8089, 27 | autoOpenBrowser: true, 28 | assetsSubDirectory: 'static', 29 | assetsPublicPath: '/', 30 | proxyTable: {}, 31 | // CSS Sourcemaps off by default because relative paths are "buggy" 32 | // with this option, according to the CSS-Loader README 33 | // (https://github.com/webpack/css-loader#sourcemaps) 34 | // In our experience, they generally work as expected, 35 | // just be aware of this issue when enabling this option. 36 | cssSourceMap: false 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/funnel.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Highcharts funnel module, Beta 4 | 5 | (c) 2010-2012 Torstein Hønsi 6 | 7 | License: www.highcharts.com/license 8 | */ 9 | (function(d){var u=d.getOptions().plotOptions,p=d.seriesTypes,D=d.merge,z=function(){},A=d.each;u.funnel=D(u.pie,{center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",dataLabels:{connectorWidth:1,connectorColor:"#606060"},size:!0,states:{select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}}});p.funnel=d.extendClass(p.pie,{type:"funnel",animate:z,translate:function(){var a=function(k,a){return/%$/.test(k)?a*parseInt(k,10)/100:parseInt(k,10)},g=0,e=this.chart,f=e.plotWidth, 10 | e=e.plotHeight,h=0,c=this.options,C=c.center,b=a(C[0],f),d=a(C[0],e),p=a(c.width,f),i,q,j=a(c.height,e),r=a(c.neckWidth,f),s=a(c.neckHeight,e),v=j-s,a=this.data,w,x,u=c.dataLabels.position==="left"?1:0,y,m,B,n,l,t,o;this.getWidthAt=q=function(k){return k>j-s||j===s?r:r+(p-r)*((j-s-k)/(j-s))};this.getX=function(k,a){return b+(a?-1:1)*(q(k)/2+c.dataLabels.distance)};this.center=[b,d,j];this.centerX=b;A(a,function(a){g+=a.y});A(a,function(a){o=null;x=g?a.y/g:0;m=d-j/2+h*j;l=m+x*j;i=q(m);y=b-i/2;B=y+ 11 | i;i=q(l);n=b-i/2;t=n+i;m>v?(y=n=b-r/2,B=t=b+r/2):l>v&&(o=l,i=q(v),n=b-i/2,t=n+i,l=v);w=["M",y,m,"L",B,m,t,l];o&&w.push(t,o,n,o);w.push(n,l,"Z");a.shapeType="path";a.shapeArgs={d:w};a.percentage=x*100;a.plotX=b;a.plotY=(m+(o||l))/2;a.tooltipPos=[b,a.plotY];a.slice=z;a.half=u;h+=x});this.setTooltipPoints()},drawPoints:function(){var a=this,g=a.options,e=a.chart.renderer;A(a.data,function(f){var h=f.graphic,c=f.shapeArgs;h?h.animate(c):f.graphic=e.path(c).attr({fill:f.color,stroke:g.borderColor,"stroke-width":g.borderWidth}).add(a.group)})}, 12 | sortByAngle:z,drawDataLabels:function(){var a=this.data,g=this.options.dataLabels.distance,e,f,h,c=a.length,d,b;for(this.center[2]-=2*g;c--;)h=a[c],f=(e=h.half)?1:-1,b=h.plotY,d=this.getX(b,e),h.labelPos=[0,b,d+(g-5)*f,b,d+g*f,b,e?"right":"left",0];p.pie.prototype.drawDataLabels.call(this)}})})(Highcharts); 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-ueditor", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project base on UEditor", 5 | "author": "伊吾鱼 lichin https://github.com/yiwuyu", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "build": "node build/build.js", 10 | "lint": "eslint --ext .js,.vue src" 11 | }, 12 | "dependencies": { 13 | "element-ui": "^1.1.6", 14 | "vue": "^2.1.10", 15 | "vue-router": "^2.2.0" 16 | }, 17 | "devDependencies": { 18 | "autoprefixer": "^6.7.2", 19 | "babel-core": "^6.22.1", 20 | "babel-eslint": "^7.1.1", 21 | "babel-loader": "^6.2.10", 22 | "babel-plugin-transform-runtime": "^6.22.0", 23 | "babel-preset-es2015": "^6.22.0", 24 | "babel-preset-stage-2": "^6.22.0", 25 | "babel-register": "^6.22.0", 26 | "chalk": "^1.1.3", 27 | "connect-history-api-fallback": "^1.3.0", 28 | "css-loader": "^0.26.1", 29 | "eslint": "^3.14.1", 30 | "eslint-config-standard": "^6.2.1", 31 | "eslint-friendly-formatter": "^2.0.7", 32 | "eslint-loader": "^1.6.1", 33 | "eslint-plugin-html": "^2.0.0", 34 | "eslint-plugin-promise": "^3.4.0", 35 | "eslint-plugin-standard": "^2.0.1", 36 | "eventsource-polyfill": "^0.9.6", 37 | "express": "^4.14.1", 38 | "extract-text-webpack-plugin": "^2.0.0-rc.2", 39 | "file-loader": "^0.10.0", 40 | "friendly-errors-webpack-plugin": "^1.1.3", 41 | "function-bind": "^1.1.0", 42 | "html-webpack-plugin": "^2.28.0", 43 | "http-proxy-middleware": "^0.17.3", 44 | "opn": "^4.0.2", 45 | "ora": "^1.1.0", 46 | "semver": "^5.3.0", 47 | "shelljs": "^0.7.6", 48 | "stylus": "^0.54.5", 49 | "stylus-loader": "^2.4.0", 50 | "url-loader": "^0.5.7", 51 | "vue-loader": "^10.3.0", 52 | "vue-style-loader": "^2.0.0", 53 | "vue-template-compiler": "^2.1.10", 54 | "webpack": "^2.2.1", 55 | "webpack-bundle-analyzer": "^2.2.1", 56 | "webpack-dev-middleware": "^1.10.0", 57 | "webpack-hot-middleware": "^2.16.1", 58 | "webpack-merge": "^2.6.1" 59 | }, 60 | "engines": { 61 | "node": ">= 4.0.0", 62 | "npm": ">= 3.0.0" 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/themes/skies.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Skies theme for Highcharts JS 3 | * @author Torstein Hønsi 4 | */ 5 | 6 | Highcharts.theme = { 7 | colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"], 8 | chart: { 9 | className: 'skies', 10 | borderWidth: 0, 11 | plotShadow: true, 12 | plotBackgroundImage: 'http://www.highcharts.com/demo/gfx/skies.jpg', 13 | plotBackgroundColor: { 14 | linearGradient: [0, 0, 250, 500], 15 | stops: [ 16 | [0, 'rgba(255, 255, 255, 1)'], 17 | [1, 'rgba(255, 255, 255, 0)'] 18 | ] 19 | }, 20 | plotBorderWidth: 1 21 | }, 22 | title: { 23 | style: { 24 | color: '#3E576F', 25 | font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif' 26 | } 27 | }, 28 | subtitle: { 29 | style: { 30 | color: '#6D869F', 31 | font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif' 32 | } 33 | }, 34 | xAxis: { 35 | gridLineWidth: 0, 36 | lineColor: '#C0D0E0', 37 | tickColor: '#C0D0E0', 38 | labels: { 39 | style: { 40 | color: '#666', 41 | fontWeight: 'bold' 42 | } 43 | }, 44 | title: { 45 | style: { 46 | color: '#666', 47 | font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif' 48 | } 49 | } 50 | }, 51 | yAxis: { 52 | alternateGridColor: 'rgba(255, 255, 255, .5)', 53 | lineColor: '#C0D0E0', 54 | tickColor: '#C0D0E0', 55 | tickWidth: 1, 56 | labels: { 57 | style: { 58 | color: '#666', 59 | fontWeight: 'bold' 60 | } 61 | }, 62 | title: { 63 | style: { 64 | color: '#666', 65 | font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif' 66 | } 67 | } 68 | }, 69 | legend: { 70 | itemStyle: { 71 | font: '9pt Trebuchet MS, Verdana, sans-serif', 72 | color: '#3E576F' 73 | }, 74 | itemHoverStyle: { 75 | color: 'black' 76 | }, 77 | itemHiddenStyle: { 78 | color: 'silver' 79 | } 80 | }, 81 | labels: { 82 | style: { 83 | color: '#3E576F' 84 | } 85 | } 86 | }; 87 | 88 | // Apply the theme 89 | var highchartsOptions = Highcharts.setOptions(Highcharts.theme); 90 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/adapters/mootools-adapter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Highcharts JS v3.0.6 (2013-10-04) 3 | MooTools adapter 4 | 5 | (c) 2010-2013 Torstein Hønsi 6 | 7 | License: www.highcharts.com/license 8 | */ 9 | (function(){var e=window,h=document,f=e.MooTools.version.substring(0,3),i=f==="1.2"||f==="1.1",j=i||f==="1.3",g=e.$extend||function(){return Object.append.apply(Object,arguments)};e.HighchartsAdapter={init:function(a){var b=Fx.prototype,c=b.start,d=Fx.Morph.prototype,e=d.compute;b.start=function(b,d){var e=this.element;if(b.d)this.paths=a.init(e,e.d,this.toD);c.apply(this,arguments);return this};d.compute=function(b,c,d){var f=this.paths;if(f)this.element.attr("d",a.step(f[0],f[1],d,this.toD));else return e.apply(this, 10 | arguments)}},adapterRun:function(a,b){if(b==="width"||b==="height")return parseInt($(a).getStyle(b),10)},getScript:function(a,b){var c=h.getElementsByTagName("head")[0],d=h.createElement("script");d.type="text/javascript";d.src=a;d.onload=b;c.appendChild(d)},animate:function(a,b,c){var d=a.attr,f=c&&c.complete;if(d&&!a.setStyle)a.getStyle=a.attr,a.setStyle=function(){var a=arguments;this.attr.call(this,a[0],a[1][0])},a.$family=function(){return!0};e.HighchartsAdapter.stop(a);c=new Fx.Morph(d?a:$(a), 11 | g({transition:Fx.Transitions.Quad.easeInOut},c));if(d)c.element=a;if(b.d)c.toD=b.d;f&&c.addEvent("complete",f);c.start(b);a.fx=c},each:function(a,b){return i?$each(a,b):Array.each(a,b)},map:function(a,b){return a.map(b)},grep:function(a,b){return a.filter(b)},inArray:function(a,b,c){return b?b.indexOf(a,c):-1},offset:function(a){a=a.getPosition();return{left:a.x,top:a.y}},extendWithEvents:function(a){a.addEvent||(a.nodeName?$(a):g(a,new Events))},addEvent:function(a,b,c){typeof b==="string"&&(b=== 12 | "unload"&&(b="beforeunload"),e.HighchartsAdapter.extendWithEvents(a),a.addEvent(b,c))},removeEvent:function(a,b,c){typeof a!=="string"&&a.addEvent&&(b?(b==="unload"&&(b="beforeunload"),c?a.removeEvent(b,c):a.removeEvents&&a.removeEvents(b)):a.removeEvents())},fireEvent:function(a,b,c,d){b={type:b,target:a};b=j?new Event(b):new DOMEvent(b);b=g(b,c);if(!b.target&&b.event)b.target=b.event.target;b.preventDefault=function(){d=null};a.fireEvent&&a.fireEvent(b.type,b);d&&d(b)},washMouseEvent:function(a){if(a.page)a.pageX= 13 | a.page.x,a.pageY=a.page.y;return a},stop:function(a){a.fx&&a.fx.cancel()}}})(); 14 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/themes/grid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Grid theme for Highcharts JS 3 | * @author Torstein Hønsi 4 | */ 5 | 6 | Highcharts.theme = { 7 | colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'], 8 | chart: { 9 | backgroundColor: { 10 | linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 }, 11 | stops: [ 12 | [0, 'rgb(255, 255, 255)'], 13 | [1, 'rgb(240, 240, 255)'] 14 | ] 15 | }, 16 | borderWidth: 2, 17 | plotBackgroundColor: 'rgba(255, 255, 255, .9)', 18 | plotShadow: true, 19 | plotBorderWidth: 1 20 | }, 21 | title: { 22 | style: { 23 | color: '#000', 24 | font: 'bold 16px "Trebuchet MS", Verdana, sans-serif' 25 | } 26 | }, 27 | subtitle: { 28 | style: { 29 | color: '#666666', 30 | font: 'bold 12px "Trebuchet MS", Verdana, sans-serif' 31 | } 32 | }, 33 | xAxis: { 34 | gridLineWidth: 1, 35 | lineColor: '#000', 36 | tickColor: '#000', 37 | labels: { 38 | style: { 39 | color: '#000', 40 | font: '11px Trebuchet MS, Verdana, sans-serif' 41 | } 42 | }, 43 | title: { 44 | style: { 45 | color: '#333', 46 | fontWeight: 'bold', 47 | fontSize: '12px', 48 | fontFamily: 'Trebuchet MS, Verdana, sans-serif' 49 | 50 | } 51 | } 52 | }, 53 | yAxis: { 54 | minorTickInterval: 'auto', 55 | lineColor: '#000', 56 | lineWidth: 1, 57 | tickWidth: 1, 58 | tickColor: '#000', 59 | labels: { 60 | style: { 61 | color: '#000', 62 | font: '11px Trebuchet MS, Verdana, sans-serif' 63 | } 64 | }, 65 | title: { 66 | style: { 67 | color: '#333', 68 | fontWeight: 'bold', 69 | fontSize: '12px', 70 | fontFamily: 'Trebuchet MS, Verdana, sans-serif' 71 | } 72 | } 73 | }, 74 | legend: { 75 | itemStyle: { 76 | font: '9pt Trebuchet MS, Verdana, sans-serif', 77 | color: 'black' 78 | 79 | }, 80 | itemHoverStyle: { 81 | color: '#039' 82 | }, 83 | itemHiddenStyle: { 84 | color: 'gray' 85 | } 86 | }, 87 | labels: { 88 | style: { 89 | color: '#99b' 90 | } 91 | }, 92 | 93 | navigation: { 94 | buttonOptions: { 95 | theme: { 96 | stroke: '#CCCCCC' 97 | } 98 | } 99 | } 100 | }; 101 | 102 | // Apply the theme 103 | var highchartsOptions = Highcharts.setOptions(Highcharts.theme); 104 | -------------------------------------------------------------------------------- /static/ueditor/themes/default/css/ueditor.css: -------------------------------------------------------------------------------- 1 | /* 编辑器 */ 2 | .edui-editor { 3 | position: relative; 4 | } 5 | /* 右键菜单 */ 6 | .edui-default .edui-popup { 7 | position: absolute; 8 | -webkit-user-select: none; 9 | -moz-user-select: none; 10 | } 11 | .edui-default .edui-popup { 12 | z-index: 3000; 13 | background-color: #fff; 14 | } 15 | 16 | .edui-default .edui-popup .edui-shadow { 17 | position: absolute; 18 | z-index: -1; 19 | } 20 | .edui-default .edui-popup .edui-shadow { 21 | left: 0; 22 | top: 0; 23 | width: 100%; 24 | height: 100%; 25 | } 26 | .edui-default .edui-popup-content { 27 | border: 1px solid #e7e7eb; 28 | -webkit-background-clip: padding-box; 29 | -moz-background-clip: padding; 30 | background-clip: padding-box; 31 | padding: 5px; 32 | background: #fff; 33 | } 34 | .edui-default .edui-menu .edui-popup-content { 35 | padding: 3px; 36 | } 37 | .edui-default .edui-menu-body { 38 | _width: 150px; 39 | min-width: 170px; 40 | background: url(/static/ueditor/themes/default/images/sparator.png) repeat-y 25px; 41 | } 42 | .edui-default .edui-menuitem { 43 | height: 20px; 44 | cursor: default; 45 | vertical-align: top; 46 | } 47 | .edui-default .edui-menuseparator-inner { 48 | border-bottom: 1px solid #e2e3e3; 49 | margin-left: 29px; 50 | margin-right: 1px; 51 | } 52 | .edui-default .edui-menuseparator { 53 | margin: 2px 0; 54 | height: 1px; 55 | overflow: hidden; 56 | } 57 | .edui-default .edui-menu-body .edui-menuitem { 58 | padding: 1px; 59 | } 60 | .edui-default .edui-box { 61 | border: 0; 62 | padding: 0; 63 | margin: 0; 64 | overflow: hidden; 65 | } 66 | div.edui-box { 67 | position: relative; 68 | display: -moz-inline-box!important; 69 | display: inline-block!important; 70 | vertical-align: middle; 71 | } 72 | .edui-default .edui-menuitem .edui-icon { 73 | width: 20px!important; 74 | height: 20px!important; 75 | background: url(/static/ueditor/themes/default/images/icons29f4d4.png) 0 -4000px; 76 | background: url(/static/ueditor/themes/default/images/icons29f4d4.gif) 0 -4000px\9; 77 | } 78 | .edui-default .edui-for-justifyjustify .edui-icon { 79 | background: url(/static/ueditor/themes/default/images/ueditor_z29f4d5.png) 0 -498px no-repeat; 80 | } 81 | .edui-default .edui-hassubmenu .edui-arrow { 82 | height: 20px; 83 | width: 20px; 84 | float: right; 85 | background: url(/static/ueditor/themes/default/images/icons-all29f4d4.gif) no-repeat 10px -233px; 86 | } 87 | .edui-default .edui-label { 88 | cursor: default; 89 | } 90 | .edui-default .edui-label { 91 | font-size: 12px; 92 | line-height: 20px; 93 | height: 20px; 94 | padding-left: 10px; 95 | } 96 | .edui-default .edui-menu-body .edui-state-hover { 97 | padding: 0!important; 98 | background-color: #f4f5f9; 99 | border: 1px solid #e7e7eb; 100 | } 101 | 102 | /* toolbarbox */ 103 | .edui-editor-toolbarbox { 104 | display: none; 105 | } 106 | .edui-editor-bottomContainer { 107 | display: none; 108 | } 109 | /* 粘贴选项 */ 110 | .edui-wordpastepop { 111 | display: none; 112 | } -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/adapters/prototype-adapter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Highcharts JS v3.0.6 (2013-10-04) 3 | Prototype adapter 4 | 5 | @author Michael Nelson, Torstein Hønsi. 6 | 7 | Feel free to use and modify this script. 8 | Highcharts license: www.highcharts.com/license. 9 | */ 10 | var HighchartsAdapter=function(){var f=typeof Effect!=="undefined";return{init:function(a){if(f)Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(b,c,d,g){var e;this.element=b;this.key=c;e=b.attr?b.attr(c):$(b).getStyle(c);if(c==="d")this.paths=a.init(b,b.d,d),this.toD=d,e=0,d=1;this.start(Object.extend(g||{},{from:e,to:d,attribute:c}))},setup:function(){HighchartsAdapter._extend(this.element);if(!this.element._highchart_animation)this.element._highchart_animation={};this.element._highchart_animation[this.key]= 11 | this},update:function(b){var c=this.paths,d=this.element;c&&(b=a.step(c[0],c[1],b,this.toD));d.attr?d.element&&d.attr(this.options.attribute,b):(c={},c[this.options.attribute]=b,$(d).setStyle(c))},finish:function(){this.element&&this.element._highchart_animation&&delete this.element._highchart_animation[this.key]}})},adapterRun:function(a,b){return parseInt($(a).getStyle(b),10)},getScript:function(a,b){var c=$$("head")[0];c&&c.appendChild((new Element("script",{type:"text/javascript",src:a})).observe("load", 12 | b))},addNS:function(a){var b=/^(?:click|mouse(?:down|up|over|move|out))$/;return/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/.test(a)||b.test(a)?a:"h:"+a},addEvent:function(a,b,c){a.addEventListener||a.attachEvent?Event.observe($(a),HighchartsAdapter.addNS(b),c):(HighchartsAdapter._extend(a),a._highcharts_observe(b,c))},animate:function(a,b,c){var d,c=c||{};c.delay=0;c.duration=(c.duration||500)/1E3;c.afterFinish=c.complete;if(f)for(d in b)new Effect.HighchartsTransition($(a), 13 | d,b[d],c);else{if(a.attr)for(d in b)a.attr(d,b[d]);c.complete&&c.complete()}a.attr||$(a).setStyle(b)},stop:function(a){var b;if(a._highcharts_extended&&a._highchart_animation)for(b in a._highchart_animation)a._highchart_animation[b].cancel()},each:function(a,b){$A(a).each(b)},inArray:function(a,b,c){return b?b.indexOf(a,c):-1},offset:function(a){return $(a).cumulativeOffset()},fireEvent:function(a,b,c,d){a.fire?a.fire(HighchartsAdapter.addNS(b),c):a._highcharts_extended&&(c=c||{},a._highcharts_fire(b, 14 | c));c&&c.defaultPrevented&&(d=null);d&&d(c)},removeEvent:function(a,b,c){$(a).stopObserving&&(b&&(b=HighchartsAdapter.addNS(b)),$(a).stopObserving(b,c));window===a?Event.stopObserving(a,b,c):(HighchartsAdapter._extend(a),a._highcharts_stop_observing(b,c))},washMouseEvent:function(a){return a},grep:function(a,b){return a.findAll(b)},map:function(a,b){return a.map(b)},_extend:function(a){a._highcharts_extended||Object.extend(a,{_highchart_events:{},_highchart_animation:null,_highcharts_extended:!0, 15 | _highcharts_observe:function(b,a){this._highchart_events[b]=[this._highchart_events[b],a].compact().flatten()},_highcharts_stop_observing:function(b,a){b?a?this._highchart_events[b]=[this._highchart_events[b]].compact().flatten().without(a):delete this._highchart_events[b]:this._highchart_events={}},_highcharts_fire:function(a,c){var d=this;(this._highchart_events[a]||[]).each(function(a){if(!c.stopped)c.preventDefault=function(){c.defaultPrevented=!0},c.target=d,a.bind(this)(c)===!1&&c.preventDefault()}.bind(this))}})}}}(); 16 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/annotations.js: -------------------------------------------------------------------------------- 1 | (function(i,C){function m(a){return typeof a==="number"}function n(a){return a!==D&&a!==null}var D,p,r,s=i.Chart,t=i.extend,z=i.each;r=["path","rect","circle"];p={top:0,left:0,center:0.5,middle:0.5,bottom:1,right:1};var u=C.inArray,A=i.merge,B=function(){this.init.apply(this,arguments)};B.prototype={init:function(a,d){var c=d.shape&&d.shape.type;this.chart=a;var b,f;f={xAxis:0,yAxis:0,title:{style:{},text:"",x:0,y:0},shape:{params:{stroke:"#000000",fill:"transparent",strokeWidth:2}}};b={circle:{params:{x:0, 2 | y:0}}};if(b[c])f.shape=A(f.shape,b[c]);this.options=A({},f,d)},render:function(a){var d=this.chart,c=this.chart.renderer,b=this.group,f=this.title,e=this.shape,h=this.options,i=h.title,l=h.shape;if(!b)b=this.group=c.g();if(!e&&l&&u(l.type,r)!==-1)e=this.shape=c[h.shape.type](l.params),e.add(b);if(!f&&i)f=this.title=c.label(i),f.add(b);b.add(d.annotations.group);this.linkObjects();a!==!1&&this.redraw()},redraw:function(){var a=this.options,d=this.chart,c=this.group,b=this.title,f=this.shape,e=this.linkedObject, 3 | h=d.xAxis[a.xAxis],v=d.yAxis[a.yAxis],l=a.width,w=a.height,x=p[a.anchorY],y=p[a.anchorX],j,o,g,q;if(e)j=e instanceof i.Point?"point":e instanceof i.Series?"series":null,j==="point"?(a.xValue=e.x,a.yValue=e.y,o=e.series):j==="series"&&(o=e),c.visibility!==o.group.visibility&&c.attr({visibility:o.group.visibility});e=n(a.xValue)?h.toPixels(a.xValue+h.minPointOffset)-h.minPixelPadding:a.x;j=n(a.yValue)?v.toPixels(a.yValue):a.y;if(!isNaN(e)&&!isNaN(j)&&m(e)&&m(j)){b&&(b.attr(a.title),b.css(a.title.style)); 4 | if(f){b=t({},a.shape.params);if(a.units==="values"){for(g in b)u(g,["width","x"])>-1?b[g]=h.translate(b[g]):u(g,["height","y"])>-1&&(b[g]=v.translate(b[g]));b.width&&(b.width-=h.toPixels(0)-h.left);b.x&&(b.x+=h.minPixelPadding);if(a.shape.type==="path"){g=b.d;o=e;for(var r=j,s=g.length,k=0;k-1&&d.splice(c,1);z(["title","shape","group"],function(b){a[b]&&(a[b].destroy(),a[b]=null)});a.group=a.title=a.shape=a.chart=a.options=null},update:function(a,d){t(this.options,a);this.linkObjects();this.render(d)}, 6 | linkObjects:function(){var a=this.chart,d=this.linkedObject,c=d&&(d.id||d.options.id),b=this.options.linkedTo;if(n(b)){if(!n(d)||b!==c)this.linkedObject=a.get(b)}else this.linkedObject=null}};t(s.prototype,{annotations:{add:function(a,d){var c=this.allItems,b=this.chart,f,e;Object.prototype.toString.call(a)==="[object Array]"||(a=[a]);for(e=a.length;e--;)f=new B(b,a[e]),c.push(f),f.render(d)},redraw:function(){z(this.allItems,function(a){a.redraw()})}}});s.prototype.callbacks.push(function(a){var d= 7 | a.options.annotations,c;c=a.renderer.g("annotations");c.attr({zIndex:7});c.add();a.annotations.allItems=[];a.annotations.chart=a;a.annotations.group=c;Object.prototype.toString.call(d)==="[object Array]"&&d.length>0&&a.annotations.add(a.options.annotations);i.addEvent(a,"redraw",function(){a.annotations.redraw()})})})(Highcharts,HighchartsAdapter); 8 | -------------------------------------------------------------------------------- /static/ueditor/third-party/codemirror/codemirror.css: -------------------------------------------------------------------------------- 1 | .CodeMirror { 2 | line-height: 1em; 3 | font-family: monospace; 4 | } 5 | 6 | .CodeMirror-scroll { 7 | overflow: auto; 8 | height: 300px; 9 | /* This is needed to prevent an IE[67] bug where the scrolled content 10 | is visible outside of the scrolling box. */ 11 | position: relative; 12 | } 13 | 14 | .CodeMirror-gutter { 15 | position: absolute; left: 0; top: 0; 16 | z-index: 10; 17 | background-color: #f7f7f7; 18 | border-right: 1px solid #eee; 19 | min-width: 2em; 20 | height: 100%; 21 | } 22 | .CodeMirror-gutter-text { 23 | color: #aaa; 24 | text-align: right; 25 | padding: .4em .2em .4em .4em; 26 | white-space: pre !important; 27 | } 28 | .CodeMirror-lines { 29 | padding: .4em; 30 | } 31 | 32 | .CodeMirror pre { 33 | -moz-border-radius: 0; 34 | -webkit-border-radius: 0; 35 | -o-border-radius: 0; 36 | border-radius: 0; 37 | border-width: 0; margin: 0; padding: 0; background: transparent; 38 | font-family: inherit; 39 | font-size: inherit; 40 | padding: 0; margin: 0; 41 | white-space: pre; 42 | word-wrap: normal; 43 | } 44 | 45 | .CodeMirror-wrap pre { 46 | word-wrap: break-word; 47 | white-space: pre-wrap; 48 | } 49 | .CodeMirror-wrap .CodeMirror-scroll { 50 | overflow-x: hidden; 51 | } 52 | 53 | .CodeMirror textarea { 54 | outline: none !important; 55 | } 56 | 57 | .CodeMirror pre.CodeMirror-cursor { 58 | z-index: 10; 59 | position: absolute; 60 | visibility: hidden; 61 | border-left: 1px solid black; 62 | } 63 | .CodeMirror-focused pre.CodeMirror-cursor { 64 | visibility: visible; 65 | } 66 | 67 | span.CodeMirror-selected { background: #d9d9d9; } 68 | .CodeMirror-focused span.CodeMirror-selected { background: #d2dcf8; } 69 | 70 | .CodeMirror-searching {background: #ffa;} 71 | 72 | /* Default theme */ 73 | 74 | .cm-s-default span.cm-keyword {color: #708;} 75 | .cm-s-default span.cm-atom {color: #219;} 76 | .cm-s-default span.cm-number {color: #164;} 77 | .cm-s-default span.cm-def {color: #00f;} 78 | .cm-s-default span.cm-variable {color: black;} 79 | .cm-s-default span.cm-variable-2 {color: #05a;} 80 | .cm-s-default span.cm-variable-3 {color: #085;} 81 | .cm-s-default span.cm-property {color: black;} 82 | .cm-s-default span.cm-operator {color: black;} 83 | .cm-s-default span.cm-comment {color: #a50;} 84 | .cm-s-default span.cm-string {color: #a11;} 85 | .cm-s-default span.cm-string-2 {color: #f50;} 86 | .cm-s-default span.cm-meta {color: #555;} 87 | .cm-s-default span.cm-error {color: #f00;} 88 | .cm-s-default span.cm-qualifier {color: #555;} 89 | .cm-s-default span.cm-builtin {color: #30a;} 90 | .cm-s-default span.cm-bracket {color: #cc7;} 91 | .cm-s-default span.cm-tag {color: #170;} 92 | .cm-s-default span.cm-attribute {color: #00c;} 93 | .cm-s-default span.cm-header {color: #a0a;} 94 | .cm-s-default span.cm-quote {color: #090;} 95 | .cm-s-default span.cm-hr {color: #999;} 96 | .cm-s-default span.cm-link {color: #00c;} 97 | 98 | span.cm-header, span.cm-strong {font-weight: bold;} 99 | span.cm-em {font-style: italic;} 100 | span.cm-emstrong {font-style: italic; font-weight: bold;} 101 | span.cm-link {text-decoration: underline;} 102 | 103 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} 104 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} 105 | -------------------------------------------------------------------------------- /src/components/toolbuttons/fontSize.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 78 | 137 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/no-data-to-display.src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Highcharts JS v3.0.6 (2013-10-04) 3 | * Plugin for displaying a message when there is no data visible in chart. 4 | * 5 | * (c) 2010-2013 Highsoft AS 6 | * Author: Øystein Moseng 7 | * 8 | * License: www.highcharts.com/license 9 | */ 10 | 11 | (function (H) { // docs 12 | 13 | var seriesTypes = H.seriesTypes, 14 | chartPrototype = H.Chart.prototype, 15 | defaultOptions = H.getOptions(), 16 | extend = H.extend; 17 | 18 | // Add language option 19 | extend(defaultOptions.lang, { 20 | noData: 'No data to display' 21 | }); 22 | 23 | // Add default display options for message 24 | defaultOptions.noData = { 25 | position: { 26 | x: 0, 27 | y: 0, 28 | align: 'center', 29 | verticalAlign: 'middle' 30 | }, 31 | attr: { 32 | }, 33 | style: { 34 | fontWeight: 'bold', 35 | fontSize: '12px', 36 | color: '#60606a' 37 | } 38 | }; 39 | 40 | /** 41 | * Define hasData functions for series. These return true if there are data points on this series within the plot area 42 | */ 43 | function hasDataPie() { 44 | return !!this.points.length; /* != 0 */ 45 | } 46 | 47 | seriesTypes.pie.prototype.hasData = hasDataPie; 48 | 49 | if (seriesTypes.gauge) { 50 | seriesTypes.gauge.prototype.hasData = hasDataPie; 51 | } 52 | 53 | if (seriesTypes.waterfall) { 54 | seriesTypes.waterfall.prototype.hasData = hasDataPie; 55 | } 56 | 57 | H.Series.prototype.hasData = function () { 58 | return this.dataMax !== undefined && this.dataMin !== undefined; 59 | }; 60 | 61 | /** 62 | * Display a no-data message. 63 | * 64 | * @param {String} str An optional message to show in place of the default one 65 | */ 66 | chartPrototype.showNoData = function (str) { 67 | var chart = this, 68 | options = chart.options, 69 | text = str || options.lang.noData, 70 | noDataOptions = options.noData; 71 | 72 | if (!chart.noDataLabel) { 73 | chart.noDataLabel = chart.renderer.label(text, 0, 0, null, null, null, null, null, 'no-data') 74 | .attr(noDataOptions.attr) 75 | .css(noDataOptions.style) 76 | .add(); 77 | chart.noDataLabel.align(extend(chart.noDataLabel.getBBox(), noDataOptions.position), false, 'plotBox'); 78 | } 79 | }; 80 | 81 | /** 82 | * Hide no-data message 83 | */ 84 | chartPrototype.hideNoData = function () { 85 | var chart = this; 86 | if (chart.noDataLabel) { 87 | chart.noDataLabel = chart.noDataLabel.destroy(); 88 | } 89 | }; 90 | 91 | /** 92 | * Returns true if there are data points within the plot area now 93 | */ 94 | chartPrototype.hasData = function () { 95 | var chart = this, 96 | series = chart.series, 97 | i = series.length; 98 | 99 | while (i--) { 100 | if (series[i].hasData() && !series[i].options.isInternal) { 101 | return true; 102 | } 103 | } 104 | 105 | return false; 106 | }; 107 | 108 | /** 109 | * Show no-data message if there is no data in sight. Otherwise, hide it. 110 | */ 111 | function handleNoData() { 112 | var chart = this; 113 | if (chart.hasData()) { 114 | chart.hideNoData(); 115 | } else { 116 | chart.showNoData(); 117 | } 118 | } 119 | 120 | /** 121 | * Add event listener to handle automatic display of no-data message 122 | */ 123 | chartPrototype.callbacks.push(function (chart) { 124 | H.addEvent(chart, 'load', handleNoData); 125 | H.addEvent(chart, 'redraw', handleNoData); 126 | }); 127 | 128 | }(Highcharts)); 129 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/data.js: -------------------------------------------------------------------------------- 1 | /* 2 | Data plugin for Highcharts 3 | 4 | (c) 2012-2013 Torstein Hønsi 5 | Last revision 2013-06-07 6 | 7 | License: www.highcharts.com/license 8 | */ 9 | (function(h){var k=h.each,m=function(b,a){this.init(b,a)};h.extend(m.prototype,{init:function(b,a){this.options=b;this.chartOptions=a;this.columns=b.columns||this.rowsToColumns(b.rows)||[];this.columns.length?this.dataFound():(this.parseCSV(),this.parseTable(),this.parseGoogleSpreadsheet())},getColumnDistribution:function(){var b=this.chartOptions,a=b&&b.chart&&b.chart.type,c=[];k(b&&b.series||[],function(b){c.push((h.seriesTypes[b.type||a||"line"].prototype.pointArrayMap||[0]).length)});this.valueCount= 10 | {global:(h.seriesTypes[a||"line"].prototype.pointArrayMap||[0]).length,individual:c}},dataFound:function(){this.parseTypes();this.findHeaderRow();this.parsed();this.complete()},parseCSV:function(){var b=this,a=this.options,c=a.csv,d=this.columns,f=a.startRow||0,i=a.endRow||Number.MAX_VALUE,j=a.startColumn||0,e=a.endColumn||Number.MAX_VALUE,g=0;c&&(c=c.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(a.lineDelimiter||"\n"),k(c,function(c,h){var n=b.trim(c),p=n.indexOf("#")===0;h>=f&&h<=i&&!p&&n!==""&& 11 | (n=c.split(a.itemDelimiter||","),k(n,function(b,a){a>=j&&a<=e&&(d[a-j]||(d[a-j]=[]),d[a-j][g]=b)}),g+=1)}),this.dataFound())},parseTable:function(){var b=this.options,a=b.table,c=this.columns,d=b.startRow||0,f=b.endRow||Number.MAX_VALUE,i=b.startColumn||0,j=b.endColumn||Number.MAX_VALUE,e;a&&(typeof a==="string"&&(a=document.getElementById(a)),k(a.getElementsByTagName("tr"),function(a,b){e=0;b>=d&&b<=f&&k(a.childNodes,function(a){if((a.tagName==="TD"||a.tagName==="TH")&&e>=i&&e<=j)c[e]||(c[e]=[]), 12 | c[e][b-d]=a.innerHTML,e+=1})}),this.dataFound())},parseGoogleSpreadsheet:function(){var b=this,a=this.options,c=a.googleSpreadsheetKey,d=this.columns,f=a.startRow||0,i=a.endRow||Number.MAX_VALUE,j=a.startColumn||0,e=a.endColumn||Number.MAX_VALUE,g,h;c&&jQuery.getJSON("https://spreadsheets.google.com/feeds/cells/"+c+"/"+(a.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",function(a){var a=a.feed.entry,c,k=a.length,m=0,o=0,l;for(l=0;l=j&&l<=e)d[l-j]=[],d[l-j].length=Math.min(o,i-f);for(l=0;l=j&&h<=e&&g>=f&&g<=i)d[h-j][g-f]=c.content.$t;b.dataFound()})},findHeaderRow:function(){k(this.columns,function(){});this.headerRow=0},trim:function(b){return typeof b==="string"?b.replace(/^\s+|\s+$/g,""):b},parseTypes:function(){for(var b=this.columns,a=b.length,c,d,f,i;a--;)for(c=b[a].length;c--;)d=b[a][c],f=parseFloat(d),i=this.trim(d), 14 | i==f?(b[a][c]=f,f>31536E6?b[a].isDatetime=!0:b[a].isNumeric=!0):(d=this.parseDate(d),a===0&&typeof d==="number"&&!isNaN(d)?(b[a][c]=d,b[a].isDatetime=!0):b[a][c]=i===""?null:i)},dateFormats:{"YYYY-mm-dd":{regex:"^([0-9]{4})-([0-9]{2})-([0-9]{2})$",parser:function(b){return Date.UTC(+b[1],b[2]-1,+b[3])}}},parseDate:function(b){var a=this.options.parseDate,c,d,f;a&&(c=a(b));if(typeof b==="string")for(d in this.dateFormats)a=this.dateFormats[d],(f=b.match(a.regex))&&(c=a.parser(f));return c},rowsToColumns:function(b){var a, 15 | c,d,f,i;if(b){i=[];c=b.length;for(a=0;a1&&(a=b.shift(),this.headerRow===0&&a.shift(),a.isDatetime?c="datetime":a.isNumeric||(c="category"));for(e=0;e1&&j[g].push(b[e+1][g]!==void 0?b[e+1][g]:null),f>2&&j[g].push(b[e+2][g]!==void 0?b[e+2][g]:null),f>3&&j[g].push(b[e+3][g]!==void 0?b[e+3][g]:null),f>4&&j[g].push(b[e+4][g]!==void 0?b[e+4][g]:null);i[k]={name:b[e].name,data:j};e+=f}d.complete({xAxis:{type:c},series:i})}}});h.Data=m;h.data=function(b,a){return new m(b,a)};h.wrap(h.Chart.prototype, 17 | "init",function(b,a,c){var d=this;a&&a.data?h.data(h.extend(a.data,{complete:function(f){a.series&&k(a.series,function(b,c){a.series[c]=h.merge(b,f.series[c])});a=h.merge(f,a);b.call(d,a,c)}}),a):b.call(d,a,c)})})(Highcharts); 18 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/adapters/standalone-framework.js: -------------------------------------------------------------------------------- 1 | /* 2 | Highcharts JS v3.0.6 (2013-10-04) 3 | 4 | Standalone Highcharts Framework 5 | 6 | License: MIT License 7 | */ 8 | var HighchartsAdapter=function(){function o(c){function a(a,b,d){a.removeEventListener(b,d,!1)}function d(a,b,d){d=a.HCProxiedMethods[d.toString()];a.detachEvent("on"+b,d)}function b(b,c){var f=b.HCEvents,i,g,k,j;if(b.removeEventListener)i=a;else if(b.attachEvent)i=d;else return;c?(g={},g[c]=!0):g=f;for(j in g)if(f[j])for(k=f[j].length;k--;)i(b,j,f[j][k])}c.HCExtended||Highcharts.extend(c,{HCExtended:!0,HCEvents:{},bind:function(b,a){var d=this,c=this.HCEvents,g;if(d.addEventListener)d.addEventListener(b, 9 | a,!1);else if(d.attachEvent){g=function(b){a.call(d,b)};if(!d.HCProxiedMethods)d.HCProxiedMethods={};d.HCProxiedMethods[a.toString()]=g;d.attachEvent("on"+b,g)}c[b]===r&&(c[b]=[]);c[b].push(a)},unbind:function(c,h){var f,i;c?(f=this.HCEvents[c]||[],h?(i=HighchartsAdapter.inArray(h,f),i>-1&&(f.splice(i,1),this.HCEvents[c]=f),this.removeEventListener?a(this,c,h):this.attachEvent&&d(this,c,h)):(b(this,c),this.HCEvents[c]=[])):(b(this),this.HCEvents={})},trigger:function(b,a){var d=this.HCEvents[b]|| 10 | [],c=d.length,g,k,j;k=function(){a.defaultPrevented=!0};for(g=0;g=b.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();a=this.options.curAnim[this.prop]= 14 | !0;for(e in b.curAnim)b.curAnim[e]!==!0&&(a=!1);a&&b.complete&&b.complete.call(this.elem);b=!1}else e=c-this.startTime,this.state=e/b.duration,this.pos=b.easing(e,0,1,b.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),b=!0;return b}};this.animate=function(a,d,b){var e,h="",f,i,g;a.stopAnimation=!1;if(typeof b!=="object"||b===null)e=arguments,b={duration:e[2],easing:e[3],complete:e[4]};if(typeof b.duration!=="number")b.duration=400;b.easing=Math[b.easing]||Math.easeInOutSine; 15 | b.curAnim=Highcharts.extend({},d);for(g in d)i=new n(a,b,g),f=null,g==="d"?(i.paths=c.init(a,a.d,d.d),i.toD=d.d,e=0,f=1):a.attr?e=a.attr(g):(e=parseFloat(HighchartsAdapter._getStyle(a,g))||0,g!=="opacity"&&(h="px")),f||(f=parseFloat(d[g])),i.custom(e,f,h)}},_getStyle:function(c,a){return window.getComputedStyle(c).getPropertyValue(a)},getScript:function(c,a){var d=l.getElementsByTagName("head")[0],b=l.createElement("script");b.type="text/javascript";b.src=c;b.onload=a;d.appendChild(b)},inArray:function(c, 16 | a){return a.indexOf?a.indexOf(c):p.indexOf.call(a,c)},adapterRun:function(c,a){return parseInt(HighchartsAdapter._getStyle(c,a),10)},grep:function(c,a){return p.filter.call(c,a)},map:function(c,a){for(var d=[],b=0,e=c.length;b.*?$/,"").replace(/ /g," ").replace(/­/g,"­").replace(//g,'xlink:href="$1"/>').replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" >]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()});return b=b.replace(/(url\(#highcharts-[0-9]+)"/g,"$1").replace(/"/g,"'")},exportChart:function(c,a){var c=c||{},d=this.options.exporting,d=this.getSVG(o({chart:{borderRadius:0}},d.chartOptions,a,{exporting:{sourceWidth:c.sourceWidth|| 16 | d.sourceWidth,sourceHeight:c.sourceHeight||d.sourceHeight}})),c=o(this.options.exporting,c);f.post(c.url,{filename:c.filename||"chart",type:c.type,width:c.width||0,scale:c.scale||2,svg:d})},print:function(){var c=this,a=c.container,d=[],b=a.parentNode,f=j.body,h=f.childNodes;if(!c.isPrinting)c.isPrinting=!0,r(h,function(a,b){if(a.nodeType===1)d[b]=a.style.display,a.style.display="none"}),f.appendChild(a),B.focus(),B.print(),setTimeout(function(){b.appendChild(a);r(h,function(a,b){if(a.nodeType=== 17 | 1)a.style.display=d[b]});c.isPrinting=!1},1E3)},contextMenu:function(c,a,d,b,f,h,g){var e=this,j=e.options.navigation,q=j.menuItemStyle,l=e.chartWidth,m=e.chartHeight,o="cache-"+c,i=e[o],s=D(f,h),v,w,n;if(!i)e[o]=i=k("div",{className:c},{position:"absolute",zIndex:1E3,padding:s+"px"},e.container),v=k("div",null,p({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},j.menuStyle),i),w=function(){u(i,{display:"none"});g&&g.setState(0);e.openMenu=!1},t(i, 18 | "mouseleave",function(){n=setTimeout(w,500)}),t(i,"mouseenter",function(){clearTimeout(n)}),t(document,"mousedown",function(a){e.pointer.inClass(a.target,c)||w()}),r(a,function(a){if(a){var b=a.separator?k("hr",null,null,v):k("div",{onmouseover:function(){u(this,j.menuItemHoverStyle)},onmouseout:function(){u(this,q)},onclick:function(){w();a.onclick.apply(e,arguments)},innerHTML:a.text||e.options.lang[a.textKey]},p({cursor:"pointer"},q),v);e.exportDivElements.push(b)}}),e.exportDivElements.push(v, 19 | i),e.exportMenuWidth=i.offsetWidth,e.exportMenuHeight=i.offsetHeight;a={display:"block"};d+e.exportMenuWidth>l?a.right=l-d-f-s+"px":a.left=d-s+"px";b+h+e.exportMenuHeight>m&&g.alignOptions.verticalAlign!=="top"?a.bottom=m-b-s+"px":a.top=b+h-s+"px";u(i,a);e.openMenu=!0},addButton:function(c){var a=this,d=a.renderer,b=o(a.options.navigation.buttonOptions,c),j=b.onclick,h=b.menuItems,g,e,k={stroke:b.symbolStroke,fill:b.symbolFill},q=b.symbolSize||12;if(!a.btnCount)a.btnCount=0;if(!a.exportDivElements)a.exportDivElements= 20 | [],a.exportSVGElements=[];if(b.enabled!==!1){var l=b.theme,m=l.states,n=m&&m.hover,m=m&&m.select,i;delete l.states;j?i=function(){j.apply(a,arguments)}:h&&(i=function(){a.contextMenu(e.menuClassName,h,e.translateX,e.translateY,e.width,e.height,e);e.setState(2)});b.text&&b.symbol?l.paddingLeft=f.pick(l.paddingLeft,25):b.text||p(l,{width:b.width,height:b.height,padding:0});e=d.button(b.text,0,0,i,l,n,m).attr({title:a.options.lang[b._titleKey],"stroke-linecap":"round"});e.menuClassName=c.menuClassName|| 21 | "highcharts-menu-"+a.btnCount++;b.symbol&&(g=d.symbol(b.symbol,b.symbolX-q/2,b.symbolY-q/2,q,q).attr(p(k,{"stroke-width":b.symbolStrokeWidth||1,zIndex:1})).add(e));e.add().align(p(b,{width:e.width,x:f.pick(b.x,y)}),!0,"spacingBox");y+=(e.width+b.buttonSpacing)*(b.align==="right"?-1:1);a.exportSVGElements.push(e,g)}},destroyExport:function(c){var c=c.target,a,d;for(a=0;a 2 |
3 |
4 | 5 |
6 |
7 |

最近使用颜色

8 | 9 |
10 |
11 |

基本色

12 | 13 |
14 |
15 |
#
16 |
17 |
18 |
19 |
    20 |
  • 21 | 22 | {{item.label}} 23 |
  • 24 |
25 |
26 |
27 |
28 | 29 | 30 | 122 | 242 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/funnel.src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Highcharts funnel module, Beta 4 | * 5 | * (c) 2010-2012 Torstein Hønsi 6 | * 7 | * License: www.highcharts.com/license 8 | */ 9 | 10 | /*global Highcharts */ 11 | (function (Highcharts) { 12 | 13 | 'use strict'; 14 | 15 | // create shortcuts 16 | var defaultOptions = Highcharts.getOptions(), 17 | defaultPlotOptions = defaultOptions.plotOptions, 18 | seriesTypes = Highcharts.seriesTypes, 19 | merge = Highcharts.merge, 20 | noop = function () {}, 21 | each = Highcharts.each; 22 | 23 | // set default options 24 | defaultPlotOptions.funnel = merge(defaultPlotOptions.pie, { 25 | center: ['50%', '50%'], 26 | width: '90%', 27 | neckWidth: '30%', 28 | height: '100%', 29 | neckHeight: '25%', 30 | 31 | dataLabels: { 32 | //position: 'right', 33 | connectorWidth: 1, 34 | connectorColor: '#606060' 35 | }, 36 | size: true, // to avoid adapting to data label size in Pie.drawDataLabels 37 | states: { 38 | select: { 39 | color: '#C0C0C0', 40 | borderColor: '#000000', 41 | shadow: false 42 | } 43 | } 44 | }); 45 | 46 | 47 | seriesTypes.funnel = Highcharts.extendClass(seriesTypes.pie, { 48 | 49 | type: 'funnel', 50 | animate: noop, 51 | 52 | /** 53 | * Overrides the pie translate method 54 | */ 55 | translate: function () { 56 | 57 | var 58 | // Get positions - either an integer or a percentage string must be given 59 | getLength = function (length, relativeTo) { 60 | return (/%$/).test(length) ? 61 | relativeTo * parseInt(length, 10) / 100 : 62 | parseInt(length, 10); 63 | }, 64 | 65 | sum = 0, 66 | series = this, 67 | chart = series.chart, 68 | plotWidth = chart.plotWidth, 69 | plotHeight = chart.plotHeight, 70 | cumulative = 0, // start at top 71 | options = series.options, 72 | center = options.center, 73 | centerX = getLength(center[0], plotWidth), 74 | centerY = getLength(center[0], plotHeight), 75 | width = getLength(options.width, plotWidth), 76 | tempWidth, 77 | getWidthAt, 78 | height = getLength(options.height, plotHeight), 79 | neckWidth = getLength(options.neckWidth, plotWidth), 80 | neckHeight = getLength(options.neckHeight, plotHeight), 81 | neckY = height - neckHeight, 82 | data = series.data, 83 | path, 84 | fraction, 85 | half = options.dataLabels.position === 'left' ? 1 : 0, 86 | 87 | x1, 88 | y1, 89 | x2, 90 | x3, 91 | y3, 92 | x4, 93 | y5; 94 | 95 | // Return the width at a specific y coordinate 96 | series.getWidthAt = getWidthAt = function (y) { 97 | return y > height - neckHeight || height === neckHeight ? 98 | neckWidth : 99 | neckWidth + (width - neckWidth) * ((height - neckHeight - y) / (height - neckHeight)); 100 | }; 101 | series.getX = function (y, half) { 102 | return centerX + (half ? -1 : 1) * ((getWidthAt(y) / 2) + options.dataLabels.distance); 103 | }; 104 | 105 | // Expose 106 | series.center = [centerX, centerY, height]; 107 | series.centerX = centerX; 108 | 109 | /* 110 | * Individual point coordinate naming: 111 | * 112 | * x1,y1 _________________ x2,y1 113 | * \ / 114 | * \ / 115 | * \ / 116 | * \ / 117 | * \ / 118 | * x3,y3 _________ x4,y3 119 | * 120 | * Additional for the base of the neck: 121 | * 122 | * | | 123 | * | | 124 | * | | 125 | * x3,y5 _________ x4,y5 126 | */ 127 | 128 | 129 | 130 | 131 | // get the total sum 132 | each(data, function (point) { 133 | sum += point.y; 134 | }); 135 | 136 | each(data, function (point) { 137 | // set start and end positions 138 | y5 = null; 139 | fraction = sum ? point.y / sum : 0; 140 | y1 = centerY - height / 2 + cumulative * height; 141 | y3 = y1 + fraction * height; 142 | //tempWidth = neckWidth + (width - neckWidth) * ((height - neckHeight - y1) / (height - neckHeight)); 143 | tempWidth = getWidthAt(y1); 144 | x1 = centerX - tempWidth / 2; 145 | x2 = x1 + tempWidth; 146 | tempWidth = getWidthAt(y3); 147 | x3 = centerX - tempWidth / 2; 148 | x4 = x3 + tempWidth; 149 | 150 | // the entire point is within the neck 151 | if (y1 > neckY) { 152 | x1 = x3 = centerX - neckWidth / 2; 153 | x2 = x4 = centerX + neckWidth / 2; 154 | 155 | // the base of the neck 156 | } else if (y3 > neckY) { 157 | y5 = y3; 158 | 159 | tempWidth = getWidthAt(neckY); 160 | x3 = centerX - tempWidth / 2; 161 | x4 = x3 + tempWidth; 162 | 163 | y3 = neckY; 164 | } 165 | 166 | // save the path 167 | path = [ 168 | 'M', 169 | x1, y1, 170 | 'L', 171 | x2, y1, 172 | x4, y3 173 | ]; 174 | if (y5) { 175 | path.push(x4, y5, x3, y5); 176 | } 177 | path.push(x3, y3, 'Z'); 178 | 179 | // prepare for using shared dr 180 | point.shapeType = 'path'; 181 | point.shapeArgs = { d: path }; 182 | 183 | 184 | // for tooltips and data labels 185 | point.percentage = fraction * 100; 186 | point.plotX = centerX; 187 | point.plotY = (y1 + (y5 || y3)) / 2; 188 | 189 | // Placement of tooltips and data labels 190 | point.tooltipPos = [ 191 | centerX, 192 | point.plotY 193 | ]; 194 | 195 | // Slice is a noop on funnel points 196 | point.slice = noop; 197 | 198 | // Mimicking pie data label placement logic 199 | point.half = half; 200 | 201 | cumulative += fraction; 202 | }); 203 | 204 | 205 | series.setTooltipPoints(); 206 | }, 207 | /** 208 | * Draw a single point (wedge) 209 | * @param {Object} point The point object 210 | * @param {Object} color The color of the point 211 | * @param {Number} brightness The brightness relative to the color 212 | */ 213 | drawPoints: function () { 214 | var series = this, 215 | options = series.options, 216 | chart = series.chart, 217 | renderer = chart.renderer; 218 | 219 | each(series.data, function (point) { 220 | 221 | var graphic = point.graphic, 222 | shapeArgs = point.shapeArgs; 223 | 224 | if (!graphic) { // Create the shapes 225 | point.graphic = renderer.path(shapeArgs). 226 | attr({ 227 | fill: point.color, 228 | stroke: options.borderColor, 229 | 'stroke-width': options.borderWidth 230 | }). 231 | add(series.group); 232 | 233 | } else { // Update the shapes 234 | graphic.animate(shapeArgs); 235 | } 236 | }); 237 | }, 238 | 239 | /** 240 | * Funnel items don't have angles (#2289) 241 | */ 242 | sortByAngle: noop, 243 | 244 | /** 245 | * Extend the pie data label method 246 | */ 247 | drawDataLabels: function () { 248 | var data = this.data, 249 | labelDistance = this.options.dataLabels.distance, 250 | leftSide, 251 | sign, 252 | point, 253 | i = data.length, 254 | x, 255 | y; 256 | 257 | // In the original pie label anticollision logic, the slots are distributed 258 | // from one labelDistance above to one labelDistance below the pie. In funnels 259 | // we don't want this. 260 | this.center[2] -= 2 * labelDistance; 261 | 262 | // Set the label position array for each point. 263 | while (i--) { 264 | point = data[i]; 265 | leftSide = point.half; 266 | sign = leftSide ? 1 : -1; 267 | y = point.plotY; 268 | x = this.getX(y, leftSide); 269 | 270 | // set the anchor point for data labels 271 | point.labelPos = [ 272 | 0, // first break of connector 273 | y, // a/a 274 | x + (labelDistance - 5) * sign, // second break, right outside point shape 275 | y, // a/a 276 | x + labelDistance * sign, // landing point for connector 277 | y, // a/a 278 | leftSide ? 'right' : 'left', // alignment 279 | 0 // center angle 280 | ]; 281 | } 282 | 283 | seriesTypes.pie.prototype.drawDataLabels.call(this); 284 | } 285 | 286 | }); 287 | 288 | 289 | }(Highcharts)); 290 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/adapters/mootools-adapter.src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Highcharts JS v3.0.6 (2013-10-04) 3 | * MooTools adapter 4 | * 5 | * (c) 2010-2013 Torstein Hønsi 6 | * 7 | * License: www.highcharts.com/license 8 | */ 9 | 10 | // JSLint options: 11 | /*global Fx, $, $extend, $each, $merge, Events, Event, DOMEvent */ 12 | 13 | (function () { 14 | 15 | var win = window, 16 | doc = document, 17 | mooVersion = win.MooTools.version.substring(0, 3), // Get the first three characters of the version number 18 | legacy = mooVersion === '1.2' || mooVersion === '1.1', // 1.1 && 1.2 considered legacy, 1.3 is not. 19 | legacyEvent = legacy || mooVersion === '1.3', // In versions 1.1 - 1.3 the event class is named Event, in newer versions it is named DOMEvent. 20 | $extend = win.$extend || function () { 21 | return Object.append.apply(Object, arguments); 22 | }; 23 | 24 | win.HighchartsAdapter = { 25 | /** 26 | * Initialize the adapter. This is run once as Highcharts is first run. 27 | * @param {Object} pathAnim The helper object to do animations across adapters. 28 | */ 29 | init: function (pathAnim) { 30 | var fxProto = Fx.prototype, 31 | fxStart = fxProto.start, 32 | morphProto = Fx.Morph.prototype, 33 | morphCompute = morphProto.compute; 34 | 35 | // override Fx.start to allow animation of SVG element wrappers 36 | /*jslint unparam: true*//* allow unused parameters in fx functions */ 37 | fxProto.start = function (from, to) { 38 | var fx = this, 39 | elem = fx.element; 40 | 41 | // special for animating paths 42 | if (from.d) { 43 | //this.fromD = this.element.d.split(' '); 44 | fx.paths = pathAnim.init( 45 | elem, 46 | elem.d, 47 | fx.toD 48 | ); 49 | } 50 | fxStart.apply(fx, arguments); 51 | 52 | return this; // chainable 53 | }; 54 | 55 | // override Fx.step to allow animation of SVG element wrappers 56 | morphProto.compute = function (from, to, delta) { 57 | var fx = this, 58 | paths = fx.paths; 59 | 60 | if (paths) { 61 | fx.element.attr( 62 | 'd', 63 | pathAnim.step(paths[0], paths[1], delta, fx.toD) 64 | ); 65 | } else { 66 | return morphCompute.apply(fx, arguments); 67 | } 68 | }; 69 | /*jslint unparam: false*/ 70 | }, 71 | 72 | /** 73 | * Run a general method on the framework, following jQuery syntax 74 | * @param {Object} el The HTML element 75 | * @param {String} method Which method to run on the wrapped element 76 | */ 77 | adapterRun: function (el, method) { 78 | 79 | // This currently works for getting inner width and height. If adding 80 | // more methods later, we need a conditional implementation for each. 81 | if (method === 'width' || method === 'height') { 82 | return parseInt($(el).getStyle(method), 10); 83 | } 84 | }, 85 | 86 | /** 87 | * Downloads a script and executes a callback when done. 88 | * @param {String} scriptLocation 89 | * @param {Function} callback 90 | */ 91 | getScript: function (scriptLocation, callback) { 92 | // We cannot assume that Assets class from mootools-more is available so instead insert a script tag to download script. 93 | var head = doc.getElementsByTagName('head')[0]; 94 | var script = doc.createElement('script'); 95 | 96 | script.type = 'text/javascript'; 97 | script.src = scriptLocation; 98 | script.onload = callback; 99 | 100 | head.appendChild(script); 101 | }, 102 | 103 | /** 104 | * Animate a HTML element or SVG element wrapper 105 | * @param {Object} el 106 | * @param {Object} params 107 | * @param {Object} options jQuery-like animation options: duration, easing, callback 108 | */ 109 | animate: function (el, params, options) { 110 | var isSVGElement = el.attr, 111 | effect, 112 | complete = options && options.complete; 113 | 114 | if (isSVGElement && !el.setStyle) { 115 | // add setStyle and getStyle methods for internal use in Moo 116 | el.getStyle = el.attr; 117 | el.setStyle = function () { // property value is given as array in Moo - break it down 118 | var args = arguments; 119 | this.attr.call(this, args[0], args[1][0]); 120 | }; 121 | // dirty hack to trick Moo into handling el as an element wrapper 122 | el.$family = function () { return true; }; 123 | } 124 | 125 | // stop running animations 126 | win.HighchartsAdapter.stop(el); 127 | 128 | // define and run the effect 129 | effect = new Fx.Morph( 130 | isSVGElement ? el : $(el), 131 | $extend({ 132 | transition: Fx.Transitions.Quad.easeInOut 133 | }, options) 134 | ); 135 | 136 | // Make sure that the element reference is set when animating svg elements 137 | if (isSVGElement) { 138 | effect.element = el; 139 | } 140 | 141 | // special treatment for paths 142 | if (params.d) { 143 | effect.toD = params.d; 144 | } 145 | 146 | // jQuery-like events 147 | if (complete) { 148 | effect.addEvent('complete', complete); 149 | } 150 | 151 | // run 152 | effect.start(params); 153 | 154 | // record for use in stop method 155 | el.fx = effect; 156 | }, 157 | 158 | /** 159 | * MooTool's each function 160 | * 161 | */ 162 | each: function (arr, fn) { 163 | return legacy ? 164 | $each(arr, fn) : 165 | Array.each(arr, fn); 166 | }, 167 | 168 | /** 169 | * Map an array 170 | * @param {Array} arr 171 | * @param {Function} fn 172 | */ 173 | map: function (arr, fn) { 174 | return arr.map(fn); 175 | }, 176 | 177 | /** 178 | * Grep or filter an array 179 | * @param {Array} arr 180 | * @param {Function} fn 181 | */ 182 | grep: function (arr, fn) { 183 | return arr.filter(fn); 184 | }, 185 | 186 | /** 187 | * Return the index of an item in an array, or -1 if not matched 188 | */ 189 | inArray: function (item, arr, from) { 190 | return arr ? arr.indexOf(item, from) : -1; 191 | }, 192 | 193 | /** 194 | * Get the offset of an element relative to the top left corner of the web page 195 | */ 196 | offset: function (el) { 197 | var offsets = el.getPosition(); // #1496 198 | return { 199 | left: offsets.x, 200 | top: offsets.y 201 | }; 202 | }, 203 | 204 | /** 205 | * Extends an object with Events, if its not done 206 | */ 207 | extendWithEvents: function (el) { 208 | // if the addEvent method is not defined, el is a custom Highcharts object 209 | // like series or point 210 | if (!el.addEvent) { 211 | if (el.nodeName) { 212 | el = $(el); // a dynamically generated node 213 | } else { 214 | $extend(el, new Events()); // a custom object 215 | } 216 | } 217 | }, 218 | 219 | /** 220 | * Add an event listener 221 | * @param {Object} el HTML element or custom object 222 | * @param {String} type Event type 223 | * @param {Function} fn Event handler 224 | */ 225 | addEvent: function (el, type, fn) { 226 | if (typeof type === 'string') { // chart broke due to el being string, type function 227 | 228 | if (type === 'unload') { // Moo self destructs before custom unload events 229 | type = 'beforeunload'; 230 | } 231 | 232 | win.HighchartsAdapter.extendWithEvents(el); 233 | 234 | el.addEvent(type, fn); 235 | } 236 | }, 237 | 238 | removeEvent: function (el, type, fn) { 239 | if (typeof el === 'string') { 240 | // el.removeEvents below apperantly calls this method again. Do not quite understand why, so for now just bail out. 241 | return; 242 | } 243 | 244 | if (el.addEvent) { // If el doesn't have an addEvent method, there are no events to remove 245 | if (type) { 246 | if (type === 'unload') { // Moo self destructs before custom unload events 247 | type = 'beforeunload'; 248 | } 249 | 250 | if (fn) { 251 | el.removeEvent(type, fn); 252 | } else if (el.removeEvents) { // #958 253 | el.removeEvents(type); 254 | } 255 | } else { 256 | el.removeEvents(); 257 | } 258 | } 259 | }, 260 | 261 | fireEvent: function (el, event, eventArguments, defaultFunction) { 262 | var eventArgs = { 263 | type: event, 264 | target: el 265 | }; 266 | // create an event object that keeps all functions 267 | event = legacyEvent ? new Event(eventArgs) : new DOMEvent(eventArgs); 268 | event = $extend(event, eventArguments); 269 | 270 | // When running an event on the Chart.prototype, MooTools nests the target in event.event 271 | if (!event.target && event.event) { 272 | event.target = event.event.target; 273 | } 274 | 275 | // override the preventDefault function to be able to use 276 | // this for custom events 277 | event.preventDefault = function () { 278 | defaultFunction = null; 279 | }; 280 | // if fireEvent is not available on the object, there hasn't been added 281 | // any events to it above 282 | if (el.fireEvent) { 283 | el.fireEvent(event.type, event); 284 | } 285 | 286 | // fire the default if it is passed and it is not prevented above 287 | if (defaultFunction) { 288 | defaultFunction(event); 289 | } 290 | }, 291 | 292 | /** 293 | * Set back e.pageX and e.pageY that MooTools has abstracted away. #1165, #1346. 294 | */ 295 | washMouseEvent: function (e) { 296 | if (e.page) { 297 | e.pageX = e.page.x; 298 | e.pageY = e.page.y; 299 | } 300 | return e; 301 | }, 302 | 303 | /** 304 | * Stop running animations on the object 305 | */ 306 | stop: function (el) { 307 | if (el.fx) { 308 | el.fx.cancel(); 309 | } 310 | } 311 | }; 312 | 313 | }()); 314 | -------------------------------------------------------------------------------- /static/ueditor/third-party/video-js/font/vjs.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This is a custom SVG font generated by IcoMoon. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 23 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 43 | 56 | 57 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/map.js: -------------------------------------------------------------------------------- 1 | /* 2 | Map plugin v0.1 for Highcharts 3 | 4 | (c) 2011-2013 Torstein Hønsi 5 | 6 | License: www.highcharts.com/license 7 | */ 8 | (function(g){function x(a,b,c){for(var d=4,e=[];d--;)e[d]=Math.round(b.rgba[d]+(a.rgba[d]-b.rgba[d])*(1-c));return"rgba("+e.join(",")+")"}var r=g.Axis,y=g.Chart,s=g.Point,z=g.Pointer,l=g.each,v=g.extend,p=g.merge,n=g.pick,A=g.numberFormat,B=g.getOptions(),k=g.seriesTypes,q=B.plotOptions,t=g.wrap,u=g.Color,w=function(){};B.mapNavigation={buttonOptions:{align:"right",verticalAlign:"bottom",x:0,width:18,height:18,style:{fontSize:"15px",fontWeight:"bold",textAlign:"center"}},buttons:{zoomIn:{onclick:function(){this.mapZoom(0.5)}, 9 | text:"+",y:-32},zoomOut:{onclick:function(){this.mapZoom(2)},text:"-",y:0}}};g.splitPath=function(a){var b,a=a.replace(/([A-Za-z])/g," $1 "),a=a.replace(/^\s*/,"").replace(/\s*$/,""),a=a.split(/[ ,]+/);for(b=0;bc?this:e,c=(e.max-e.min)*e.transA,e.minPixelPadding= 11 | (e.len-c)/2});t(y.prototype,"render",function(a){var b=this,c=b.options.mapNavigation;a.call(b);b.renderMapNavigation();c.zoomOnDoubleClick&&g.addEvent(b.container,"dblclick",function(a){b.pointer.onContainerDblClick(a)});c.zoomOnMouseWheel&&g.addEvent(b.container,document.onmousewheel===void 0?"DOMMouseScroll":"mousewheel",function(a){b.pointer.onContainerMouseWheel(a)})});v(z.prototype,{onContainerDblClick:function(a){var b=this.chart,a=this.normalize(a);b.isInsidePlot(a.chartX-b.plotLeft,a.chartY- 12 | b.plotTop)&&b.mapZoom(0.5,b.xAxis[0].toValue(a.chartX),b.yAxis[0].toValue(a.chartY))},onContainerMouseWheel:function(a){var b=this.chart,c,a=this.normalize(a);c=a.detail||-(a.wheelDelta/120);b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&b.mapZoom(c>0?2:0.5,b.xAxis[0].toValue(a.chartX),b.yAxis[0].toValue(a.chartY))}});t(z.prototype,"init",function(a,b,c){a.call(this,b,c);if(c.mapNavigation.enableTouchZoom)this.pinchX=this.pinchHor=this.pinchY=this.pinchVert=!0});v(y.prototype,{renderMapNavigation:function(){var a= 13 | this,b=this.options.mapNavigation,c=b.buttons,d,e,f,i=function(){this.handler.call(a)};if(b.enableButtons)for(d in c)if(c.hasOwnProperty(d))f=p(b.buttonOptions,c[d]),e=a.renderer.button(f.text,0,0,i).attr({width:f.width,height:f.height}).css(f.style).add(),e.handler=f.onclick,e.align(v(f,{width:e.width,height:e.height}),null,"spacingBox")},fitToBox:function(a,b){l([["x","width"],["y","height"]],function(c){var d=c[0],c=c[1];a[d]+a[c]>b[d]+b[c]&&(a[c]>b[c]?(a[c]=b[c],a[d]=b[d]):a[d]=b[d]+b[c]-a[c]); 14 | a[c]>b[c]&&(a[c]=b[c]);a[d]"},states:{normal:{animation:!0}}});r=g.extendClass(s,{applyOptions:function(a,b){var c=s.prototype.applyOptions.call(this,a,b);if(c.path&&typeof c.path==="string")c.path=c.options.path=g.splitPath(c.path);return c},onMouseOver:function(){clearTimeout(this.colorInterval); 16 | s.prototype.onMouseOver.call(this)},onMouseOut:function(){var a=this,b=+new Date,c=u(a.options.color),d=u(a.pointAttr.hover.fill),e=a.series.options.states.normal.animation,f=e&&(e.duration||500);if(f&&c.rgba.length===4&&d.rgba.length===4)delete a.pointAttr[""].fill,clearTimeout(a.colorInterval),a.colorInterval=setInterval(function(){var e=(new Date-b)/f,h=a.graphic;e>1&&(e=1);h&&h.attr("fill",x(d,c,e));e>=1&&clearTimeout(a.colorInterval)},13);s.prototype.onMouseOut.call(a)}});k.map=g.extendClass(k.scatter, 17 | {type:"map",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},colorKey:"y",pointClass:r,trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:w,supportsDrilldown:!0,getExtremesFromAll:!0,useMapGeometry:!0,init:function(a){var b=this,c=a.options.legend.valueDecimals,d=[],e,f,i,h,j,o,m;o=a.options.legend.layout==="horizontal";g.Series.prototype.init.apply(this,arguments);j=b.options.colorRange;if(h=b.options.valueRanges)l(h,function(a){f=a.from;i=a.to;e= 18 | "";f===void 0?e="< ":i===void 0&&(e="> ");f!==void 0&&(e+=A(f,c));f!==void 0&&i!==void 0&&(e+=" - ");i!==void 0&&(e+=A(i,c));d.push(g.extend({chart:b.chart,name:e,options:{},drawLegendSymbol:k.area.prototype.drawLegendSymbol,visible:!0,setState:function(){},setVisible:function(){}},a))}),b.legendItems=d;else if(j)f=j.from,i=j.to,h=j.fromLabel,j=j.toLabel,m=o?[0,0,1,0]:[0,1,0,0],o||(o=h,h=j,j=o),o={linearGradient:{x1:m[0],y1:m[1],x2:m[2],y2:m[3]},stops:[[0,f],[1,i]]},d=[{chart:b.chart,options:{},fromLabel:h, 19 | toLabel:j,color:o,drawLegendSymbol:this.drawLegendSymbolGradient,visible:!0,setState:function(){},setVisible:function(){}}],b.legendItems=d},drawLegendSymbol:k.area.prototype.drawLegendSymbol,drawLegendSymbolGradient:function(a,b){var c=a.options.symbolPadding,d=n(a.options.padding,8),e,f,i=this.chart.renderer.fontMetrics(a.options.itemStyle.fontSize).h,h=a.options.layout==="horizontal",j;j=n(a.options.rectangleLength,200);h?(e=-(c/2),f=0):(e=-j+a.baseline-c/2,f=d+i);b.fromText=this.chart.renderer.text(b.fromLabel, 20 | f,e).attr({zIndex:2}).add(b.legendGroup);f=b.fromText.getBBox();b.legendSymbol=this.chart.renderer.rect(h?f.x+f.width+c:f.x-i-c,f.y,h?j:i,h?i:j,2).attr({zIndex:1}).add(b.legendGroup);j=b.legendSymbol.getBBox();b.toText=this.chart.renderer.text(b.toLabel,j.x+j.width+c,h?e:j.y+j.height-c).attr({zIndex:2}).add(b.legendGroup);e=b.toText.getBBox();h?(a.offsetWidth=f.width+j.width+e.width+c*2+d,a.itemY=i+d):(a.offsetWidth=Math.max(f.width,e.width)+c+j.width+d,a.itemY=j.height+d,a.itemX=c)},getBox:function(a){var b= 21 | Number.MIN_VALUE,c=Number.MAX_VALUE,d=Number.MIN_VALUE,e=Number.MAX_VALUE;l(a||this.options.data,function(a){for(var i=a.path,h=i.length,j=!1,g=Number.MIN_VALUE,m=Number.MAX_VALUE,k=Number.MIN_VALUE,l=Number.MAX_VALUE;h--;)typeof i[h]==="number"&&!isNaN(i[h])&&(j?(g=Math.max(g,i[h]),m=Math.min(m,i[h])):(k=Math.max(k,i[h]),l=Math.min(l,i[h])),j=!j);a._maxX=g;a._minX=m;a._maxY=k;a._minY=l;b=Math.max(b,g);c=Math.min(c,m);d=Math.max(d,k);e=Math.min(e,l)});this.minY=e;this.maxY=d;this.minX=c;this.maxX= 22 | b},translatePath:function(a){var b=!1,c=this.xAxis,d=this.yAxis,e,a=[].concat(a);for(e=a.length;e--;)typeof a[e]==="number"&&(a[e]=b?Math.round(c.translate(a[e])):Math.round(d.len-d.translate(a[e])),b=!b);return a},setData:function(){g.Series.prototype.setData.apply(this,arguments);this.getBox()},translate:function(){var a=this,b=Number.MAX_VALUE,c=Number.MIN_VALUE;a.generatePoints();l(a.data,function(d){d.shapeType="path";d.shapeArgs={d:a.translatePath(d.path)};if(typeof d.y==="number")if(d.y>c)c= 23 | d.y;else if(d.y=i)&&(h===void 0||k<=h)){l=m.color;break}}else e&&k!==void 0&&(m=1-(b-k)/(b-a),l=k===null?c.nullColor:x(i,h,m));if(l)g.color=null,g.options.color=l})},drawGraph:w,drawDataLabels:w,drawPoints:function(){var a=this.xAxis, 24 | b=this.yAxis,c=this.colorKey;l(this.data,function(a){a.plotY=1;if(a[c]===null)a[c]=0,a.isNull=!0});k.column.prototype.drawPoints.apply(this);l(this.data,function(d){var e=d.dataLabels,f=a.toPixels(d._minX,!0),g=a.toPixels(d._maxX,!0),h=b.toPixels(d._minY,!0),j=b.toPixels(d._maxY,!0);d.plotX=Math.round(f+(g-f)*n(e&&e.anchorX,0.5));d.plotY=Math.round(h+(j-h)*n(e&&e.anchorY,0.5));d.isNull&&(d[c]=null)});g.Series.prototype.drawDataLabels.call(this)},animateDrilldown:function(a){var b=this.chart.plotBox, 25 | c=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],d=c.bBox,e=this.chart.options.drilldown.animation;if(!a)a=Math.min(d.width/b.width,d.height/b.height),c.shapeArgs={scaleX:a,scaleY:a,translateX:d.x,translateY:d.y},l(this.points,function(a){a.graphic.attr(c.shapeArgs).animate({scaleX:1,scaleY:1,translateX:0,translateY:0},e)}),delete this.animate},animateDrillupFrom:function(a){k.column.prototype.animateDrillupFrom.call(this,a)},animateDrillupTo:function(a){k.column.prototype.animateDrillupTo.call(this, 26 | a)}});q.mapline=p(q.map,{lineWidth:1,backgroundColor:"none"});k.mapline=g.extendClass(k.map,{type:"mapline",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth",fill:"backgroundColor"},drawLegendSymbol:k.line.prototype.drawLegendSymbol});q.mappoint=p(q.scatter,{dataLabels:{enabled:!0,format:"{point.name}",color:"black",style:{textShadow:"0 0 5px white"}}});k.mappoint=g.extendClass(k.scatter,{type:"mappoint"});g.Map=function(a,b){var c={endOnTick:!1,gridLineWidth:0,labels:{enabled:!1},lineWidth:0, 27 | minPadding:0,maxPadding:0,startOnTick:!1,tickWidth:0,title:null},d;d=a.series;a.series=null;a=p({chart:{type:"map",panning:"xy"},xAxis:c,yAxis:p(c,{reversed:!0})},a,{chart:{inverted:!1}});a.series=d;return new g.Chart(a,b)}})(Highcharts); 28 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/annotations.src.js: -------------------------------------------------------------------------------- 1 | (function (Highcharts, HighchartsAdapter) { 2 | 3 | var UNDEFINED, 4 | ALIGN_FACTOR, 5 | ALLOWED_SHAPES, 6 | Chart = Highcharts.Chart, 7 | extend = Highcharts.extend, 8 | each = Highcharts.each; 9 | 10 | ALLOWED_SHAPES = ["path", "rect", "circle"]; 11 | 12 | ALIGN_FACTOR = { 13 | top: 0, 14 | left: 0, 15 | center: 0.5, 16 | middle: 0.5, 17 | bottom: 1, 18 | right: 1 19 | }; 20 | 21 | 22 | // Highcharts helper methods 23 | var inArray = HighchartsAdapter.inArray, 24 | merge = Highcharts.merge; 25 | 26 | function defaultOptions(shapeType) { 27 | var shapeOptions, 28 | options; 29 | 30 | options = { 31 | xAxis: 0, 32 | yAxis: 0, 33 | title: { 34 | style: {}, 35 | text: "", 36 | x: 0, 37 | y: 0 38 | }, 39 | shape: { 40 | params: { 41 | stroke: "#000000", 42 | fill: "transparent", 43 | strokeWidth: 2 44 | } 45 | } 46 | }; 47 | 48 | shapeOptions = { 49 | circle: { 50 | params: { 51 | x: 0, 52 | y: 0 53 | } 54 | } 55 | }; 56 | 57 | if (shapeOptions[shapeType]) { 58 | options.shape = merge(options.shape, shapeOptions[shapeType]); 59 | } 60 | 61 | return options; 62 | } 63 | 64 | function isArray(obj) { 65 | return Object.prototype.toString.call(obj) === '[object Array]'; 66 | } 67 | 68 | function isNumber(n) { 69 | return typeof n === 'number'; 70 | } 71 | 72 | function defined(obj) { 73 | return obj !== UNDEFINED && obj !== null; 74 | } 75 | 76 | function translatePath(d, xAxis, yAxis, xOffset, yOffset) { 77 | var len = d.length, 78 | i = 0; 79 | 80 | while (i < len) { 81 | if (typeof d[i] === 'number' && typeof d[i + 1] === 'number') { 82 | d[i] = xAxis.toPixels(d[i]) - xOffset; 83 | d[i + 1] = yAxis.toPixels(d[i + 1]) - yOffset; 84 | i += 2; 85 | } else { 86 | i += 1; 87 | } 88 | } 89 | 90 | return d; 91 | } 92 | 93 | 94 | // Define annotation prototype 95 | var Annotation = function () { 96 | this.init.apply(this, arguments); 97 | }; 98 | Annotation.prototype = { 99 | /* 100 | * Initialize the annotation 101 | */ 102 | init: function (chart, options) { 103 | var shapeType = options.shape && options.shape.type; 104 | 105 | this.chart = chart; 106 | this.options = merge({}, defaultOptions(shapeType), options); 107 | }, 108 | 109 | /* 110 | * Render the annotation 111 | */ 112 | render: function (redraw) { 113 | var annotation = this, 114 | chart = this.chart, 115 | renderer = annotation.chart.renderer, 116 | group = annotation.group, 117 | title = annotation.title, 118 | shape = annotation.shape, 119 | options = annotation.options, 120 | titleOptions = options.title, 121 | shapeOptions = options.shape; 122 | 123 | if (!group) { 124 | group = annotation.group = renderer.g(); 125 | } 126 | 127 | 128 | if (!shape && shapeOptions && inArray(shapeOptions.type, ALLOWED_SHAPES) !== -1) { 129 | shape = annotation.shape = renderer[options.shape.type](shapeOptions.params); 130 | shape.add(group); 131 | } 132 | 133 | if (!title && titleOptions) { 134 | title = annotation.title = renderer.label(titleOptions); 135 | title.add(group); 136 | } 137 | 138 | group.add(chart.annotations.group); 139 | 140 | // link annotations to point or series 141 | annotation.linkObjects(); 142 | 143 | if (redraw !== false) { 144 | annotation.redraw(); 145 | } 146 | }, 147 | 148 | /* 149 | * Redraw the annotation title or shape after options update 150 | */ 151 | redraw: function () { 152 | var options = this.options, 153 | chart = this.chart, 154 | group = this.group, 155 | title = this.title, 156 | shape = this.shape, 157 | linkedTo = this.linkedObject, 158 | xAxis = chart.xAxis[options.xAxis], 159 | yAxis = chart.yAxis[options.yAxis], 160 | width = options.width, 161 | height = options.height, 162 | anchorY = ALIGN_FACTOR[options.anchorY], 163 | anchorX = ALIGN_FACTOR[options.anchorX], 164 | resetBBox = false, 165 | shapeParams, 166 | linkType, 167 | series, 168 | param, 169 | bbox, 170 | x, 171 | y; 172 | 173 | if (linkedTo) { 174 | linkType = (linkedTo instanceof Highcharts.Point) ? 'point' : 175 | (linkedTo instanceof Highcharts.Series) ? 'series' : null; 176 | 177 | if (linkType === 'point') { 178 | options.xValue = linkedTo.x; 179 | options.yValue = linkedTo.y; 180 | series = linkedTo.series; 181 | } else if (linkType === 'series') { 182 | series = linkedTo; 183 | } 184 | 185 | if (group.visibility !== series.group.visibility) { 186 | group.attr({ 187 | visibility: series.group.visibility 188 | }); 189 | } 190 | } 191 | 192 | 193 | // Based on given options find annotation pixel position 194 | x = (defined(options.xValue) ? xAxis.toPixels(options.xValue + xAxis.minPointOffset) - xAxis.minPixelPadding : options.x); 195 | y = defined(options.yValue) ? yAxis.toPixels(options.yValue) : options.y; 196 | 197 | if (isNaN(x) || isNaN(y) || !isNumber(x) || !isNumber(y)) { 198 | return; 199 | } 200 | 201 | 202 | if (title) { 203 | title.attr(options.title); 204 | title.css(options.title.style); 205 | resetBBox = true; 206 | } 207 | 208 | if (shape) { 209 | shapeParams = extend({}, options.shape.params); 210 | 211 | if (options.units === 'values') { 212 | for (param in shapeParams) { 213 | if (inArray(param, ['width', 'x']) > -1) { 214 | shapeParams[param] = xAxis.translate(shapeParams[param]); 215 | } else if (inArray(param, ['height', 'y']) > -1) { 216 | shapeParams[param] = yAxis.translate(shapeParams[param]); 217 | } 218 | } 219 | 220 | if (shapeParams.width) { 221 | shapeParams.width -= xAxis.toPixels(0) - xAxis.left; 222 | } 223 | 224 | if (shapeParams.x) { 225 | shapeParams.x += xAxis.minPixelPadding; 226 | } 227 | 228 | if (options.shape.type === 'path') { 229 | translatePath(shapeParams.d, xAxis, yAxis, x, y); 230 | } 231 | } 232 | 233 | // move the center of the circle to shape x/y 234 | if (options.shape.type === 'circle') { 235 | shapeParams.x += shapeParams.r; 236 | shapeParams.y += shapeParams.r; 237 | } 238 | 239 | resetBBox = true; 240 | shape.attr(shapeParams); 241 | } 242 | 243 | group.bBox = null; 244 | 245 | // If annotation width or height is not defined in options use bounding box size 246 | if (!isNumber(width)) { 247 | bbox = group.getBBox(); 248 | width = bbox.width; 249 | } 250 | 251 | if (!isNumber(height)) { 252 | // get bbox only if it wasn't set before 253 | if (!bbox) { 254 | bbox = group.getBBox(); 255 | } 256 | 257 | height = bbox.height; 258 | } 259 | 260 | // Calculate anchor point 261 | if (!isNumber(anchorX)) { 262 | anchorX = ALIGN_FACTOR.center; 263 | } 264 | 265 | if (!isNumber(anchorY)) { 266 | anchorY = ALIGN_FACTOR.center; 267 | } 268 | 269 | // Translate group according to its dimension and anchor point 270 | x = x - width * anchorX; 271 | y = y - height * anchorY; 272 | 273 | if (chart.animation && defined(group.translateX) && defined(group.translateY)) { 274 | group.animate({ 275 | translateX: x, 276 | translateY: y 277 | }); 278 | } else { 279 | group.translate(x, y); 280 | } 281 | }, 282 | 283 | /* 284 | * Destroy the annotation 285 | */ 286 | destroy: function () { 287 | var annotation = this, 288 | chart = this.chart, 289 | allItems = chart.annotations.allItems, 290 | index = allItems.indexOf(annotation); 291 | 292 | if (index > -1) { 293 | allItems.splice(index, 1); 294 | } 295 | 296 | each(['title', 'shape', 'group'], function (element) { 297 | if (annotation[element]) { 298 | annotation[element].destroy(); 299 | annotation[element] = null; 300 | } 301 | }); 302 | 303 | annotation.group = annotation.title = annotation.shape = annotation.chart = annotation.options = null; 304 | }, 305 | 306 | /* 307 | * Update the annotation with a given options 308 | */ 309 | update: function (options, redraw) { 310 | extend(this.options, options); 311 | 312 | // update link to point or series 313 | this.linkObjects(); 314 | 315 | this.render(redraw); 316 | }, 317 | 318 | linkObjects: function () { 319 | var annotation = this, 320 | chart = annotation.chart, 321 | linkedTo = annotation.linkedObject, 322 | linkedId = linkedTo && (linkedTo.id || linkedTo.options.id), 323 | options = annotation.options, 324 | id = options.linkedTo; 325 | 326 | if (!defined(id)) { 327 | annotation.linkedObject = null; 328 | } else if (!defined(linkedTo) || id !== linkedId) { 329 | annotation.linkedObject = chart.get(id); 330 | } 331 | } 332 | }; 333 | 334 | 335 | // Add annotations methods to chart prototype 336 | extend(Chart.prototype, { 337 | annotations: { 338 | /* 339 | * Unified method for adding annotations to the chart 340 | */ 341 | add: function (options, redraw) { 342 | var annotations = this.allItems, 343 | chart = this.chart, 344 | item, 345 | len; 346 | 347 | if (!isArray(options)) { 348 | options = [options]; 349 | } 350 | 351 | len = options.length; 352 | 353 | while (len--) { 354 | item = new Annotation(chart, options[len]); 355 | annotations.push(item); 356 | item.render(redraw); 357 | } 358 | }, 359 | 360 | /** 361 | * Redraw all annotations, method used in chart events 362 | */ 363 | redraw: function () { 364 | each(this.allItems, function (annotation) { 365 | annotation.redraw(); 366 | }); 367 | } 368 | } 369 | }); 370 | 371 | 372 | // Initialize on chart load 373 | Chart.prototype.callbacks.push(function (chart) { 374 | var options = chart.options.annotations, 375 | group; 376 | 377 | group = chart.renderer.g("annotations"); 378 | group.attr({ 379 | zIndex: 7 380 | }); 381 | group.add(); 382 | 383 | // initialize empty array for annotations 384 | chart.annotations.allItems = []; 385 | 386 | // link chart object to annotations 387 | chart.annotations.chart = chart; 388 | 389 | // link annotations group element to the chart 390 | chart.annotations.group = group; 391 | 392 | if (isArray(options) && options.length > 0) { 393 | chart.annotations.add(chart.options.annotations); 394 | } 395 | 396 | // update annotations after chart redraw 397 | Highcharts.addEvent(chart, 'redraw', function () { 398 | chart.annotations.redraw(); 399 | }); 400 | }); 401 | }(Highcharts, HighchartsAdapter)); 402 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/adapters/prototype-adapter.src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Highcharts JS v3.0.6 (2013-10-04) 3 | * Prototype adapter 4 | * 5 | * @author Michael Nelson, Torstein Hønsi. 6 | * 7 | * Feel free to use and modify this script. 8 | * Highcharts license: www.highcharts.com/license. 9 | */ 10 | 11 | // JSLint options: 12 | /*global Effect, Class, Event, Element, $, $$, $A */ 13 | 14 | // Adapter interface between prototype and the Highcharts charting library 15 | var HighchartsAdapter = (function () { 16 | 17 | var hasEffect = typeof Effect !== 'undefined'; 18 | 19 | return { 20 | 21 | /** 22 | * Initialize the adapter. This is run once as Highcharts is first run. 23 | * @param {Object} pathAnim The helper object to do animations across adapters. 24 | */ 25 | init: function (pathAnim) { 26 | if (hasEffect) { 27 | /** 28 | * Animation for Highcharts SVG element wrappers only 29 | * @param {Object} element 30 | * @param {Object} attribute 31 | * @param {Object} to 32 | * @param {Object} options 33 | */ 34 | Effect.HighchartsTransition = Class.create(Effect.Base, { 35 | initialize: function (element, attr, to, options) { 36 | var from, 37 | opts; 38 | 39 | this.element = element; 40 | this.key = attr; 41 | from = element.attr ? element.attr(attr) : $(element).getStyle(attr); 42 | 43 | // special treatment for paths 44 | if (attr === 'd') { 45 | this.paths = pathAnim.init( 46 | element, 47 | element.d, 48 | to 49 | ); 50 | this.toD = to; 51 | 52 | 53 | // fake values in order to read relative position as a float in update 54 | from = 0; 55 | to = 1; 56 | } 57 | 58 | opts = Object.extend((options || {}), { 59 | from: from, 60 | to: to, 61 | attribute: attr 62 | }); 63 | this.start(opts); 64 | }, 65 | setup: function () { 66 | HighchartsAdapter._extend(this.element); 67 | // If this is the first animation on this object, create the _highcharts_animation helper that 68 | // contain pointers to the animation objects. 69 | if (!this.element._highchart_animation) { 70 | this.element._highchart_animation = {}; 71 | } 72 | 73 | // Store a reference to this animation instance. 74 | this.element._highchart_animation[this.key] = this; 75 | }, 76 | update: function (position) { 77 | var paths = this.paths, 78 | element = this.element, 79 | obj; 80 | 81 | if (paths) { 82 | position = pathAnim.step(paths[0], paths[1], position, this.toD); 83 | } 84 | 85 | if (element.attr) { // SVGElement 86 | 87 | if (element.element) { // If not, it has been destroyed (#1405) 88 | element.attr(this.options.attribute, position); 89 | } 90 | 91 | } else { // HTML, #409 92 | obj = {}; 93 | obj[this.options.attribute] = position; 94 | $(element).setStyle(obj); 95 | } 96 | 97 | }, 98 | finish: function () { 99 | // Delete the property that holds this animation now that it is finished. 100 | // Both canceled animations and complete ones gets a 'finish' call. 101 | if (this.element && this.element._highchart_animation) { // #1405 102 | delete this.element._highchart_animation[this.key]; 103 | } 104 | } 105 | }); 106 | } 107 | }, 108 | 109 | /** 110 | * Run a general method on the framework, following jQuery syntax 111 | * @param {Object} el The HTML element 112 | * @param {String} method Which method to run on the wrapped element 113 | */ 114 | adapterRun: function (el, method) { 115 | 116 | // This currently works for getting inner width and height. If adding 117 | // more methods later, we need a conditional implementation for each. 118 | return parseInt($(el).getStyle(method), 10); 119 | 120 | }, 121 | 122 | /** 123 | * Downloads a script and executes a callback when done. 124 | * @param {String} scriptLocation 125 | * @param {Function} callback 126 | */ 127 | getScript: function (scriptLocation, callback) { 128 | var head = $$('head')[0]; // Returns an array, so pick the first element. 129 | if (head) { 130 | // Append a new 'script' element, set its type and src attributes, add a 'load' handler that calls the callback 131 | head.appendChild(new Element('script', { type: 'text/javascript', src: scriptLocation}).observe('load', callback)); 132 | } 133 | }, 134 | 135 | /** 136 | * Custom events in prototype needs to be namespaced. This method adds a namespace 'h:' in front of 137 | * events that are not recognized as native. 138 | */ 139 | addNS: function (eventName) { 140 | var HTMLEvents = /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/, 141 | MouseEvents = /^(?:click|mouse(?:down|up|over|move|out))$/; 142 | return (HTMLEvents.test(eventName) || MouseEvents.test(eventName)) ? 143 | eventName : 144 | 'h:' + eventName; 145 | }, 146 | 147 | // el needs an event to be attached. el is not necessarily a dom element 148 | addEvent: function (el, event, fn) { 149 | if (el.addEventListener || el.attachEvent) { 150 | Event.observe($(el), HighchartsAdapter.addNS(event), fn); 151 | 152 | } else { 153 | HighchartsAdapter._extend(el); 154 | el._highcharts_observe(event, fn); 155 | } 156 | }, 157 | 158 | // motion makes things pretty. use it if effects is loaded, if not... still get to the end result. 159 | animate: function (el, params, options) { 160 | var key, 161 | fx; 162 | 163 | // default options 164 | options = options || {}; 165 | options.delay = 0; 166 | options.duration = (options.duration || 500) / 1000; 167 | options.afterFinish = options.complete; 168 | 169 | // animate wrappers and DOM elements 170 | if (hasEffect) { 171 | for (key in params) { 172 | // The fx variable is seemingly thrown away here, but the Effect.setup will add itself to the _highcharts_animation object 173 | // on the element itself so its not really lost. 174 | fx = new Effect.HighchartsTransition($(el), key, params[key], options); 175 | } 176 | } else { 177 | if (el.attr) { // #409 without effects 178 | for (key in params) { 179 | el.attr(key, params[key]); 180 | } 181 | } 182 | if (options.complete) { 183 | options.complete(); 184 | } 185 | } 186 | 187 | if (!el.attr) { // HTML element, #409 188 | $(el).setStyle(params); 189 | } 190 | }, 191 | 192 | // this only occurs in higcharts 2.0+ 193 | stop: function (el) { 194 | var key; 195 | if (el._highcharts_extended && el._highchart_animation) { 196 | for (key in el._highchart_animation) { 197 | // Cancel the animation 198 | // The 'finish' function in the Effect object will remove the reference 199 | el._highchart_animation[key].cancel(); 200 | } 201 | } 202 | }, 203 | 204 | // um.. each 205 | each: function (arr, fn) { 206 | $A(arr).each(fn); 207 | }, 208 | 209 | inArray: function (item, arr, from) { 210 | return arr ? arr.indexOf(item, from) : -1; 211 | }, 212 | 213 | /** 214 | * Get the cumulative offset relative to the top left of the page. This method, unlike its 215 | * jQuery and MooTools counterpart, still suffers from issue #208 regarding the position 216 | * of a chart within a fixed container. 217 | */ 218 | offset: function (el) { 219 | return $(el).cumulativeOffset(); 220 | }, 221 | 222 | // fire an event based on an event name (event) and an object (el). 223 | // again, el may not be a dom element 224 | fireEvent: function (el, event, eventArguments, defaultFunction) { 225 | if (el.fire) { 226 | el.fire(HighchartsAdapter.addNS(event), eventArguments); 227 | } else if (el._highcharts_extended) { 228 | eventArguments = eventArguments || {}; 229 | el._highcharts_fire(event, eventArguments); 230 | } 231 | 232 | if (eventArguments && eventArguments.defaultPrevented) { 233 | defaultFunction = null; 234 | } 235 | 236 | if (defaultFunction) { 237 | defaultFunction(eventArguments); 238 | } 239 | }, 240 | 241 | removeEvent: function (el, event, handler) { 242 | if ($(el).stopObserving) { 243 | if (event) { 244 | event = HighchartsAdapter.addNS(event); 245 | } 246 | $(el).stopObserving(event, handler); 247 | } if (window === el) { 248 | Event.stopObserving(el, event, handler); 249 | } else { 250 | HighchartsAdapter._extend(el); 251 | el._highcharts_stop_observing(event, handler); 252 | } 253 | }, 254 | 255 | washMouseEvent: function (e) { 256 | return e; 257 | }, 258 | 259 | // um, grep 260 | grep: function (arr, fn) { 261 | return arr.findAll(fn); 262 | }, 263 | 264 | // um, map 265 | map: function (arr, fn) { 266 | return arr.map(fn); 267 | }, 268 | 269 | // extend an object to handle highchart events (highchart objects, not svg elements). 270 | // this is a very simple way of handling events but whatever, it works (i think) 271 | _extend: function (object) { 272 | if (!object._highcharts_extended) { 273 | Object.extend(object, { 274 | _highchart_events: {}, 275 | _highchart_animation: null, 276 | _highcharts_extended: true, 277 | _highcharts_observe: function (name, fn) { 278 | this._highchart_events[name] = [this._highchart_events[name], fn].compact().flatten(); 279 | }, 280 | _highcharts_stop_observing: function (name, fn) { 281 | if (name) { 282 | if (fn) { 283 | this._highchart_events[name] = [this._highchart_events[name]].compact().flatten().without(fn); 284 | } else { 285 | delete this._highchart_events[name]; 286 | } 287 | } else { 288 | this._highchart_events = {}; 289 | } 290 | }, 291 | _highcharts_fire: function (name, args) { 292 | var target = this; 293 | (this._highchart_events[name] || []).each(function (fn) { 294 | // args is never null here 295 | if (args.stopped) { 296 | return; // "throw $break" wasn't working. i think because of the scope of 'this'. 297 | } 298 | 299 | // Attach a simple preventDefault function to skip default handler if called 300 | args.preventDefault = function () { 301 | args.defaultPrevented = true; 302 | }; 303 | args.target = target; 304 | 305 | // If the event handler return false, prevent the default handler from executing 306 | if (fn.bind(this)(args) === false) { 307 | args.preventDefault(); 308 | } 309 | } 310 | .bind(this)); 311 | } 312 | }); 313 | } 314 | } 315 | }; 316 | }()); 317 | -------------------------------------------------------------------------------- /static/ueditor/third-party/video-js/video-js.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Video.js Default Styles (http://videojs.com) 3 | Version 4.3.0 4 | Create your own skin at http://designer.videojs.com 5 | */.vjs-default-skin{color:#ccc}@font-face{font-family:VideoJS;src:url(font/vjs.eot);src:url(font/vjs.eot?#iefix) format('embedded-opentype'),url(font/vjs.woff) format('woff'),url(font/vjs.ttf) format('truetype');font-weight:400;font-style:normal}.vjs-default-skin .vjs-slider{outline:0;position:relative;cursor:pointer;padding:0;background-color:#333;background-color:rgba(51,51,51,.9)}.vjs-default-skin .vjs-slider:focus{-webkit-box-shadow:0 0 2em #fff;-moz-box-shadow:0 0 2em #fff;box-shadow:0 0 2em #fff}.vjs-default-skin .vjs-slider-handle{position:absolute;left:0;top:0}.vjs-default-skin .vjs-slider-handle:before{content:"\e009";font-family:VideoJS;font-size:1em;line-height:1;text-align:center;text-shadow:0 0 1em #fff;position:absolute;top:0;left:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.vjs-default-skin .vjs-control-bar{display:none;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#07141e;background-color:rgba(7,20,30,.7)}.vjs-default-skin.vjs-has-started .vjs-control-bar{display:block;visibility:visible;opacity:1;-webkit-transition:visibility .1s,opacity .1s;-moz-transition:visibility .1s,opacity .1s;-o-transition:visibility .1s,opacity .1s;transition:visibility .1s,opacity .1s}.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{display:block;visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;-moz-transition:visibility 1s,opacity 1s;-o-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-default-skin.vjs-controls-disabled .vjs-control-bar{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-control-bar{display:none}@media \0screen{.vjs-default-skin.vjs-user-inactive.vjs-playing .vjs-control-bar :before{content:""}}.vjs-default-skin .vjs-control{outline:0;position:relative;float:left;text-align:center;margin:0;padding:0;height:3em;width:4em}.vjs-default-skin .vjs-control:before{font-family:VideoJS;font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.5)}.vjs-default-skin .vjs-control:focus:before,.vjs-default-skin .vjs-control:hover:before{text-shadow:0 0 1em #fff}.vjs-default-skin .vjs-control:focus{}.vjs-default-skin .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-default-skin .vjs-play-control{width:5em;cursor:pointer}.vjs-default-skin .vjs-play-control:before{content:"\e001"}.vjs-default-skin.vjs-playing .vjs-play-control:before{content:"\e002"}.vjs-default-skin .vjs-mute-control,.vjs-default-skin .vjs-volume-menu-button{cursor:pointer;float:right}.vjs-default-skin .vjs-mute-control:before,.vjs-default-skin .vjs-volume-menu-button:before{content:"\e006"}.vjs-default-skin .vjs-mute-control.vjs-vol-0:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-0:before{content:"\e003"}.vjs-default-skin .vjs-mute-control.vjs-vol-1:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-1:before{content:"\e004"}.vjs-default-skin .vjs-mute-control.vjs-vol-2:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-2:before{content:"\e005"}.vjs-default-skin .vjs-volume-control{width:5em;float:right}.vjs-default-skin .vjs-volume-bar{width:5em;height:.6em;margin:1.1em auto 0}.vjs-default-skin .vjs-volume-menu-button .vjs-menu-content{height:2.9em}.vjs-default-skin .vjs-volume-level{position:absolute;top:0;left:0;height:.5em;background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-volume-bar .vjs-volume-handle{width:.5em;height:.5em}.vjs-default-skin .vjs-volume-handle:before{font-size:.9em;top:-.2em;left:-.2em;width:1em;height:1em}.vjs-default-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content{width:6em;left:-4em}.vjs-default-skin .vjs-progress-control{position:absolute;left:0;right:0;width:auto;font-size:.3em;height:1em;top:-1em;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin:hover .vjs-progress-control{font-size:.9em;-webkit-transition:all .2s;-moz-transition:all .2s;-o-transition:all .2s;transition:all .2s}.vjs-default-skin .vjs-progress-holder{height:100%}.vjs-default-skin .vjs-progress-holder .vjs-play-progress,.vjs-default-skin .vjs-progress-holder .vjs-load-progress{position:absolute;display:block;height:100%;margin:0;padding:0;left:0;top:0}.vjs-default-skin .vjs-play-progress{background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-load-progress{background:#646464;background:rgba(255,255,255,.4)}.vjs-default-skin .vjs-seek-handle{width:1.5em;height:100%}.vjs-default-skin .vjs-seek-handle:before{padding-top:.1em}.vjs-default-skin .vjs-time-controls{font-size:1em;line-height:3em}.vjs-default-skin .vjs-current-time{float:left}.vjs-default-skin .vjs-duration{float:left}.vjs-default-skin .vjs-remaining-time{display:none;float:left}.vjs-time-divider{float:left;line-height:3em}.vjs-default-skin .vjs-fullscreen-control{width:3.8em;cursor:pointer;float:right}.vjs-default-skin .vjs-fullscreen-control:before{content:"\e000"}.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control:before{content:"\e00b"}.vjs-default-skin .vjs-big-play-button{left:.5em;top:.5em;font-size:3em;display:block;z-index:2;position:absolute;width:4em;height:2.6em;text-align:center;vertical-align:middle;cursor:pointer;opacity:1;background-color:#07141e;background-color:rgba(7,20,30,.7);border:.1em solid #3b4249;-webkit-border-radius:.8em;-moz-border-radius:.8em;border-radius:.8em;-webkit-box-shadow:0 0 1em rgba(255,255,255,.25);-moz-box-shadow:0 0 1em rgba(255,255,255,.25);box-shadow:0 0 1em rgba(255,255,255,.25);-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin.vjs-big-play-centered .vjs-big-play-button{left:50%;margin-left:-2.1em;top:50%;margin-top:-1.4000000000000001em}.vjs-default-skin.vjs-controls-disabled .vjs-big-play-button{display:none}.vjs-default-skin.vjs-has-started .vjs-big-play-button{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-default-skin:hover .vjs-big-play-button,.vjs-default-skin .vjs-big-play-button:focus{outline:0;border-color:#fff;background-color:#505050;background-color:rgba(50,50,50,.75);-webkit-box-shadow:0 0 3em #fff;-moz-box-shadow:0 0 3em #fff;box-shadow:0 0 3em #fff;-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s}.vjs-default-skin .vjs-big-play-button:before{content:"\e001";font-family:VideoJS;line-height:2.6em;text-shadow:.05em .05em .1em #000;text-align:center;position:absolute;left:0;width:100%;height:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;font-size:4em;line-height:1;width:1em;height:1em;margin-left:-.5em;margin-top:-.5em;opacity:.75;-webkit-animation:spin 1.5s infinite linear;-moz-animation:spin 1.5s infinite linear;-o-animation:spin 1.5s infinite linear;animation:spin 1.5s infinite linear}.vjs-default-skin .vjs-loading-spinner:before{content:"\e01e";font-family:VideoJS;position:absolute;top:0;left:0;width:1em;height:1em;text-align:center;text-shadow:0 0 .1em #000}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.vjs-default-skin .vjs-menu-button{float:right;cursor:pointer}.vjs-default-skin .vjs-menu{display:none;position:absolute;bottom:0;left:0;width:0;height:0;margin-bottom:3em;border-left:2em solid transparent;border-right:2em solid transparent;border-top:1.55em solid #000;border-top-color:rgba(7,40,50,.5)}.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;position:absolute;width:10em;bottom:1.5em;max-height:15em;overflow:auto;left:-5em;background-color:#07141e;background-color:rgba(7,20,30,.7);-webkit-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);-moz-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);box-shadow:-.2em -.2em .3em rgba(255,255,255,.2)}.vjs-default-skin .vjs-menu-button:hover .vjs-menu{display:block}.vjs-default-skin .vjs-menu-button ul li{list-style:none;margin:0;padding:.3em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-default-skin .vjs-menu-button ul li.vjs-selected{background-color:#000}.vjs-default-skin .vjs-menu-button ul li:focus,.vjs-default-skin .vjs-menu-button ul li:hover,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover{outline:0;color:#111;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.vjs-default-skin .vjs-menu-button ul li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-default-skin .vjs-subtitles-button:before{content:"\e00c"}.vjs-default-skin .vjs-captions-button:before{content:"\e008"}.vjs-default-skin .vjs-captions-button:focus .vjs-control-content:before,.vjs-default-skin .vjs-captions-button:hover .vjs-control-content:before{-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js{background-color:#000;position:relative;padding:0;font-size:10px;vertical-align:middle;font-weight:400;font-style:normal;font-family:Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js:-moz-full-screen{position:absolute}body.vjs-full-window{padding:0;margin:0;height:100%;overflow-y:auto}.video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0;width:100%!important;height:100%!important;_position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-poster{background-repeat:no-repeat;background-position:50% 50%;background-size:contain;cursor:pointer;height:100%;margin:0;padding:0;position:relative;width:100%}.vjs-poster img{display:block;margin:0 auto;max-height:100%;padding:0;width:100%}.video-js.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-text-track-display{text-align:center;position:absolute;bottom:4em;left:1em;right:1em}.video-js .vjs-text-track{display:none;font-size:1.4em;text-align:center;margin-bottom:.1em;background-color:#000;background-color:rgba(0,0,0,.5)}.video-js .vjs-subtitles{color:#fff}.video-js .vjs-captions{color:#fc6}.vjs-tt-cue{display:block}.vjs-default-skin .vjs-hidden{display:none}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible} -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/modules/drilldown.src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Highcharts Drilldown plugin 3 | * 4 | * Author: Torstein Honsi 5 | * Last revision: 2013-02-18 6 | * License: MIT License 7 | * 8 | * Demo: http://jsfiddle.net/highcharts/Vf3yT/ 9 | */ 10 | 11 | /*global HighchartsAdapter*/ 12 | (function (H) { 13 | 14 | "use strict"; 15 | 16 | var noop = function () {}, 17 | defaultOptions = H.getOptions(), 18 | each = H.each, 19 | extend = H.extend, 20 | wrap = H.wrap, 21 | Chart = H.Chart, 22 | seriesTypes = H.seriesTypes, 23 | PieSeries = seriesTypes.pie, 24 | ColumnSeries = seriesTypes.column, 25 | fireEvent = HighchartsAdapter.fireEvent; 26 | 27 | // Utilities 28 | function tweenColors(startColor, endColor, pos) { 29 | var rgba = [ 30 | Math.round(startColor[0] + (endColor[0] - startColor[0]) * pos), 31 | Math.round(startColor[1] + (endColor[1] - startColor[1]) * pos), 32 | Math.round(startColor[2] + (endColor[2] - startColor[2]) * pos), 33 | startColor[3] + (endColor[3] - startColor[3]) * pos 34 | ]; 35 | return 'rgba(' + rgba.join(',') + ')'; 36 | } 37 | 38 | // Add language 39 | extend(defaultOptions.lang, { 40 | drillUpText: '◁ Back to {series.name}' 41 | }); 42 | defaultOptions.drilldown = { 43 | activeAxisLabelStyle: { 44 | cursor: 'pointer', 45 | color: '#039', 46 | fontWeight: 'bold', 47 | textDecoration: 'underline' 48 | }, 49 | activeDataLabelStyle: { 50 | cursor: 'pointer', 51 | color: '#039', 52 | fontWeight: 'bold', 53 | textDecoration: 'underline' 54 | }, 55 | animation: { 56 | duration: 500 57 | }, 58 | drillUpButton: { 59 | position: { 60 | align: 'right', 61 | x: -10, 62 | y: 10 63 | } 64 | // relativeTo: 'plotBox' 65 | // theme 66 | } 67 | }; 68 | 69 | /** 70 | * A general fadeIn method 71 | */ 72 | H.SVGRenderer.prototype.Element.prototype.fadeIn = function () { 73 | this 74 | .attr({ 75 | opacity: 0.1, 76 | visibility: 'visible' 77 | }) 78 | .animate({ 79 | opacity: 1 80 | }, { 81 | duration: 250 82 | }); 83 | }; 84 | 85 | // Extend the Chart prototype 86 | Chart.prototype.drilldownLevels = []; 87 | 88 | Chart.prototype.addSeriesAsDrilldown = function (point, ddOptions) { 89 | var oldSeries = point.series, 90 | xAxis = oldSeries.xAxis, 91 | yAxis = oldSeries.yAxis, 92 | newSeries, 93 | color = point.color || oldSeries.color, 94 | pointIndex, 95 | level; 96 | 97 | ddOptions = extend({ 98 | color: color 99 | }, ddOptions); 100 | pointIndex = HighchartsAdapter.inArray(this, oldSeries.points); 101 | level = { 102 | seriesOptions: oldSeries.userOptions, 103 | shapeArgs: point.shapeArgs, 104 | bBox: point.graphic.getBBox(), 105 | color: color, 106 | newSeries: ddOptions, 107 | pointOptions: oldSeries.options.data[pointIndex], 108 | pointIndex: pointIndex, 109 | oldExtremes: { 110 | xMin: xAxis && xAxis.userMin, 111 | xMax: xAxis && xAxis.userMax, 112 | yMin: yAxis && yAxis.userMin, 113 | yMax: yAxis && yAxis.userMax 114 | } 115 | }; 116 | 117 | this.drilldownLevels.push(level); 118 | 119 | newSeries = this.addSeries(ddOptions, false); 120 | if (xAxis) { 121 | xAxis.oldPos = xAxis.pos; 122 | xAxis.userMin = xAxis.userMax = null; 123 | yAxis.userMin = yAxis.userMax = null; 124 | } 125 | 126 | // Run fancy cross-animation on supported and equal types 127 | if (oldSeries.type === newSeries.type) { 128 | newSeries.animate = newSeries.animateDrilldown || noop; 129 | newSeries.options.animation = true; 130 | } 131 | 132 | oldSeries.remove(false); 133 | 134 | this.redraw(); 135 | this.showDrillUpButton(); 136 | }; 137 | 138 | Chart.prototype.getDrilldownBackText = function () { 139 | var lastLevel = this.drilldownLevels[this.drilldownLevels.length - 1]; 140 | 141 | return this.options.lang.drillUpText.replace('{series.name}', lastLevel.seriesOptions.name); 142 | 143 | }; 144 | 145 | Chart.prototype.showDrillUpButton = function () { 146 | var chart = this, 147 | backText = this.getDrilldownBackText(), 148 | buttonOptions = chart.options.drilldown.drillUpButton; 149 | 150 | 151 | if (!this.drillUpButton) { 152 | this.drillUpButton = this.renderer.button( 153 | backText, 154 | null, 155 | null, 156 | function () { 157 | chart.drillUp(); 158 | } 159 | ) 160 | .attr(extend({ 161 | align: buttonOptions.position.align, 162 | zIndex: 9 163 | }, buttonOptions.theme)) 164 | .add() 165 | .align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox'); 166 | } else { 167 | this.drillUpButton.attr({ 168 | text: backText 169 | }) 170 | .align(); 171 | } 172 | }; 173 | 174 | Chart.prototype.drillUp = function () { 175 | var chart = this, 176 | level = chart.drilldownLevels.pop(), 177 | oldSeries = chart.series[0], 178 | oldExtremes = level.oldExtremes, 179 | newSeries = chart.addSeries(level.seriesOptions, false); 180 | 181 | fireEvent(chart, 'drillup', { seriesOptions: level.seriesOptions }); 182 | 183 | if (newSeries.type === oldSeries.type) { 184 | newSeries.drilldownLevel = level; 185 | newSeries.animate = newSeries.animateDrillupTo || noop; 186 | newSeries.options.animation = true; 187 | 188 | if (oldSeries.animateDrillupFrom) { 189 | oldSeries.animateDrillupFrom(level); 190 | } 191 | } 192 | 193 | oldSeries.remove(false); 194 | 195 | // Reset the zoom level of the upper series 196 | if (newSeries.xAxis) { 197 | newSeries.xAxis.setExtremes(oldExtremes.xMin, oldExtremes.xMax, false); 198 | newSeries.yAxis.setExtremes(oldExtremes.yMin, oldExtremes.yMax, false); 199 | } 200 | 201 | 202 | this.redraw(); 203 | 204 | if (this.drilldownLevels.length === 0) { 205 | this.drillUpButton = this.drillUpButton.destroy(); 206 | } else { 207 | this.drillUpButton.attr({ 208 | text: this.getDrilldownBackText() 209 | }) 210 | .align(); 211 | } 212 | }; 213 | 214 | PieSeries.prototype.animateDrilldown = function (init) { 215 | var level = this.chart.drilldownLevels[this.chart.drilldownLevels.length - 1], 216 | animationOptions = this.chart.options.drilldown.animation, 217 | animateFrom = level.shapeArgs, 218 | start = animateFrom.start, 219 | angle = animateFrom.end - start, 220 | startAngle = angle / this.points.length, 221 | startColor = H.Color(level.color).rgba; 222 | 223 | if (!init) { 224 | each(this.points, function (point, i) { 225 | var endColor = H.Color(point.color).rgba; 226 | 227 | /*jslint unparam: true*/ 228 | point.graphic 229 | .attr(H.merge(animateFrom, { 230 | start: start + i * startAngle, 231 | end: start + (i + 1) * startAngle 232 | })) 233 | .animate(point.shapeArgs, H.merge(animationOptions, { 234 | step: function (val, fx) { 235 | if (fx.prop === 'start') { 236 | this.attr({ 237 | fill: tweenColors(startColor, endColor, fx.pos) 238 | }); 239 | } 240 | } 241 | })); 242 | /*jslint unparam: false*/ 243 | }); 244 | } 245 | }; 246 | 247 | 248 | /** 249 | * When drilling up, keep the upper series invisible until the lower series has 250 | * moved into place 251 | */ 252 | PieSeries.prototype.animateDrillupTo = 253 | ColumnSeries.prototype.animateDrillupTo = function (init) { 254 | if (!init) { 255 | var newSeries = this, 256 | level = newSeries.drilldownLevel; 257 | 258 | each(this.points, function (point) { 259 | point.graphic.hide(); 260 | if (point.dataLabel) { 261 | point.dataLabel.hide(); 262 | } 263 | if (point.connector) { 264 | point.connector.hide(); 265 | } 266 | }); 267 | 268 | 269 | // Do dummy animation on first point to get to complete 270 | setTimeout(function () { 271 | each(newSeries.points, function (point, i) { 272 | // Fade in other points 273 | var verb = i === level.pointIndex ? 'show' : 'fadeIn'; 274 | point.graphic[verb](); 275 | if (point.dataLabel) { 276 | point.dataLabel[verb](); 277 | } 278 | if (point.connector) { 279 | point.connector[verb](); 280 | } 281 | }); 282 | }, Math.max(this.chart.options.drilldown.animation.duration - 50, 0)); 283 | 284 | // Reset 285 | this.animate = noop; 286 | } 287 | 288 | }; 289 | 290 | ColumnSeries.prototype.animateDrilldown = function (init) { 291 | var animateFrom = this.chart.drilldownLevels[this.chart.drilldownLevels.length - 1].shapeArgs, 292 | animationOptions = this.chart.options.drilldown.animation; 293 | 294 | if (!init) { 295 | 296 | animateFrom.x += (this.xAxis.oldPos - this.xAxis.pos); 297 | 298 | each(this.points, function (point) { 299 | point.graphic 300 | .attr(animateFrom) 301 | .animate(point.shapeArgs, animationOptions); 302 | }); 303 | } 304 | 305 | }; 306 | 307 | /** 308 | * When drilling up, pull out the individual point graphics from the lower series 309 | * and animate them into the origin point in the upper series. 310 | */ 311 | ColumnSeries.prototype.animateDrillupFrom = 312 | PieSeries.prototype.animateDrillupFrom = 313 | function (level) { 314 | var animationOptions = this.chart.options.drilldown.animation, 315 | group = this.group; 316 | 317 | delete this.group; 318 | each(this.points, function (point) { 319 | var graphic = point.graphic, 320 | startColor = H.Color(point.color).rgba; 321 | 322 | delete point.graphic; 323 | 324 | /*jslint unparam: true*/ 325 | graphic.animate(level.shapeArgs, H.merge(animationOptions, { 326 | 327 | step: function (val, fx) { 328 | if (fx.prop === 'start') { 329 | this.attr({ 330 | fill: tweenColors(startColor, H.Color(level.color).rgba, fx.pos) 331 | }); 332 | } 333 | }, 334 | complete: function () { 335 | graphic.destroy(); 336 | if (group) { 337 | group = group.destroy(); 338 | } 339 | } 340 | })); 341 | /*jslint unparam: false*/ 342 | }); 343 | }; 344 | 345 | H.Point.prototype.doDrilldown = function () { 346 | var series = this.series, 347 | chart = series.chart, 348 | drilldown = chart.options.drilldown, 349 | i = drilldown.series.length, 350 | seriesOptions; 351 | 352 | while (i-- && !seriesOptions) { 353 | if (drilldown.series[i].id === this.drilldown) { 354 | seriesOptions = drilldown.series[i]; 355 | } 356 | } 357 | 358 | // Fire the event. If seriesOptions is undefined, the implementer can check for 359 | // seriesOptions, and call addSeriesAsDrilldown async if necessary. 360 | fireEvent(chart, 'drilldown', { 361 | point: this, 362 | seriesOptions: seriesOptions 363 | }); 364 | 365 | if (seriesOptions) { 366 | chart.addSeriesAsDrilldown(this, seriesOptions); 367 | } 368 | 369 | }; 370 | 371 | wrap(H.Point.prototype, 'init', function (proceed, series, options, x) { 372 | var point = proceed.call(this, series, options, x), 373 | chart = series.chart, 374 | tick = series.xAxis && series.xAxis.ticks[x], 375 | tickLabel = tick && tick.label; 376 | 377 | if (point.drilldown) { 378 | 379 | // Add the click event to the point label 380 | H.addEvent(point, 'click', function () { 381 | point.doDrilldown(); 382 | }); 383 | 384 | // Make axis labels clickable 385 | if (tickLabel) { 386 | if (!tickLabel._basicStyle) { 387 | tickLabel._basicStyle = tickLabel.element.getAttribute('style'); 388 | } 389 | tickLabel 390 | .addClass('highcharts-drilldown-axis-label') 391 | .css(chart.options.drilldown.activeAxisLabelStyle) 392 | .on('click', function () { 393 | if (point.doDrilldown) { 394 | point.doDrilldown(); 395 | } 396 | }); 397 | 398 | } 399 | } else if (tickLabel && tickLabel._basicStyle) { 400 | tickLabel.element.setAttribute('style', tickLabel._basicStyle); 401 | } 402 | 403 | return point; 404 | }); 405 | 406 | wrap(H.Series.prototype, 'drawDataLabels', function (proceed) { 407 | var css = this.chart.options.drilldown.activeDataLabelStyle; 408 | 409 | proceed.call(this); 410 | 411 | each(this.points, function (point) { 412 | if (point.drilldown && point.dataLabel) { 413 | point.dataLabel 414 | .attr({ 415 | 'class': 'highcharts-drilldown-data-label' 416 | }) 417 | .css(css) 418 | .on('click', function () { 419 | point.doDrilldown(); 420 | }); 421 | } 422 | }); 423 | }); 424 | 425 | // Mark the trackers with a pointer 426 | ColumnSeries.prototype.supportsDrilldown = true; 427 | PieSeries.prototype.supportsDrilldown = true; 428 | var type, 429 | drawTrackerWrapper = function (proceed) { 430 | proceed.call(this); 431 | each(this.points, function (point) { 432 | if (point.drilldown && point.graphic) { 433 | point.graphic 434 | .attr({ 435 | 'class': 'highcharts-drilldown-point' 436 | }) 437 | .css({ cursor: 'pointer' }); 438 | } 439 | }); 440 | }; 441 | for (type in seriesTypes) { 442 | if (seriesTypes[type].prototype.supportsDrilldown) { 443 | wrap(seriesTypes[type].prototype, 'drawTracker', drawTrackerWrapper); 444 | } 445 | } 446 | 447 | }(Highcharts)); 448 | -------------------------------------------------------------------------------- /static/ueditor/third-party/highcharts/adapters/standalone-framework.src.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Highcharts JS v3.0.6 (2013-10-04) 3 | * 4 | * Standalone Highcharts Framework 5 | * 6 | * License: MIT License 7 | */ 8 | 9 | 10 | /*global Highcharts */ 11 | var HighchartsAdapter = (function () { 12 | 13 | var UNDEFINED, 14 | doc = document, 15 | emptyArray = [], 16 | timers = [], 17 | timerId, 18 | Fx; 19 | 20 | Math.easeInOutSine = function (t, b, c, d) { 21 | return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b; 22 | }; 23 | 24 | 25 | 26 | /** 27 | * Extend given object with custom events 28 | */ 29 | function augment(obj) { 30 | function removeOneEvent(el, type, fn) { 31 | el.removeEventListener(type, fn, false); 32 | } 33 | 34 | function IERemoveOneEvent(el, type, fn) { 35 | fn = el.HCProxiedMethods[fn.toString()]; 36 | el.detachEvent('on' + type, fn); 37 | } 38 | 39 | function removeAllEvents(el, type) { 40 | var events = el.HCEvents, 41 | remove, 42 | types, 43 | len, 44 | n; 45 | 46 | if (el.removeEventListener) { 47 | remove = removeOneEvent; 48 | } else if (el.attachEvent) { 49 | remove = IERemoveOneEvent; 50 | } else { 51 | return; // break on non-DOM events 52 | } 53 | 54 | 55 | if (type) { 56 | types = {}; 57 | types[type] = true; 58 | } else { 59 | types = events; 60 | } 61 | 62 | for (n in types) { 63 | if (events[n]) { 64 | len = events[n].length; 65 | while (len--) { 66 | remove(el, n, events[n][len]); 67 | } 68 | } 69 | } 70 | } 71 | 72 | if (!obj.HCExtended) { 73 | Highcharts.extend(obj, { 74 | HCExtended: true, 75 | 76 | HCEvents: {}, 77 | 78 | bind: function (name, fn) { 79 | var el = this, 80 | events = this.HCEvents, 81 | wrappedFn; 82 | 83 | // handle DOM events in modern browsers 84 | if (el.addEventListener) { 85 | el.addEventListener(name, fn, false); 86 | 87 | // handle old IE implementation 88 | } else if (el.attachEvent) { 89 | 90 | wrappedFn = function (e) { 91 | fn.call(el, e); 92 | }; 93 | 94 | if (!el.HCProxiedMethods) { 95 | el.HCProxiedMethods = {}; 96 | } 97 | 98 | // link wrapped fn with original fn, so we can get this in removeEvent 99 | el.HCProxiedMethods[fn.toString()] = wrappedFn; 100 | 101 | el.attachEvent('on' + name, wrappedFn); 102 | } 103 | 104 | 105 | if (events[name] === UNDEFINED) { 106 | events[name] = []; 107 | } 108 | 109 | events[name].push(fn); 110 | }, 111 | 112 | unbind: function (name, fn) { 113 | var events, 114 | index; 115 | 116 | if (name) { 117 | events = this.HCEvents[name] || []; 118 | if (fn) { 119 | index = HighchartsAdapter.inArray(fn, events); 120 | if (index > -1) { 121 | events.splice(index, 1); 122 | this.HCEvents[name] = events; 123 | } 124 | if (this.removeEventListener) { 125 | removeOneEvent(this, name, fn); 126 | } else if (this.attachEvent) { 127 | IERemoveOneEvent(this, name, fn); 128 | } 129 | } else { 130 | removeAllEvents(this, name); 131 | this.HCEvents[name] = []; 132 | } 133 | } else { 134 | removeAllEvents(this); 135 | this.HCEvents = {}; 136 | } 137 | }, 138 | 139 | trigger: function (name, args) { 140 | var events = this.HCEvents[name] || [], 141 | target = this, 142 | len = events.length, 143 | i, 144 | preventDefault, 145 | fn; 146 | 147 | // Attach a simple preventDefault function to skip default handler if called 148 | preventDefault = function () { 149 | args.defaultPrevented = true; 150 | }; 151 | 152 | for (i = 0; i < len; i++) { 153 | fn = events[i]; 154 | 155 | // args is never null here 156 | if (args.stopped) { 157 | return; 158 | } 159 | 160 | args.preventDefault = preventDefault; 161 | args.target = target; 162 | args.type = name; // #2297 163 | 164 | // If the event handler return false, prevent the default handler from executing 165 | if (fn.call(this, args) === false) { 166 | args.preventDefault(); 167 | } 168 | } 169 | } 170 | }); 171 | } 172 | 173 | return obj; 174 | } 175 | 176 | 177 | return { 178 | /** 179 | * Initialize the adapter. This is run once as Highcharts is first run. 180 | */ 181 | init: function (pathAnim) { 182 | 183 | /** 184 | * Compatibility section to add support for legacy IE. This can be removed if old IE 185 | * support is not needed. 186 | */ 187 | if (!doc.defaultView) { 188 | this._getStyle = function (el, prop) { 189 | var val; 190 | if (el.style[prop]) { 191 | return el.style[prop]; 192 | } else { 193 | if (prop === 'opacity') { 194 | prop = 'filter'; 195 | } 196 | /*jslint unparam: true*/ 197 | val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b) { return b.toUpperCase(); })]; 198 | if (prop === 'filter') { 199 | val = val.replace( 200 | /alpha\(opacity=([0-9]+)\)/, 201 | function (a, b) { 202 | return b / 100; 203 | } 204 | ); 205 | } 206 | /*jslint unparam: false*/ 207 | return val === '' ? 1 : val; 208 | } 209 | }; 210 | this.adapterRun = function (elem, method) { 211 | var alias = { width: 'clientWidth', height: 'clientHeight' }[method]; 212 | 213 | if (alias) { 214 | elem.style.zoom = 1; 215 | return elem[alias] - 2 * parseInt(HighchartsAdapter._getStyle(elem, 'padding'), 10); 216 | } 217 | }; 218 | } 219 | 220 | if (!Array.prototype.forEach) { 221 | this.each = function (arr, fn) { // legacy 222 | var i = 0, 223 | len = arr.length; 224 | for (; i < len; i++) { 225 | if (fn.call(arr[i], arr[i], i, arr) === false) { 226 | return i; 227 | } 228 | } 229 | }; 230 | } 231 | 232 | if (!Array.prototype.indexOf) { 233 | this.inArray = function (item, arr) { 234 | var len, 235 | i = 0; 236 | 237 | if (arr) { 238 | len = arr.length; 239 | 240 | for (; i < len; i++) { 241 | if (arr[i] === item) { 242 | return i; 243 | } 244 | } 245 | } 246 | 247 | return -1; 248 | }; 249 | } 250 | 251 | if (!Array.prototype.filter) { 252 | this.grep = function (elements, callback) { 253 | var ret = [], 254 | i = 0, 255 | length = elements.length; 256 | 257 | for (; i < length; i++) { 258 | if (!!callback(elements[i], i)) { 259 | ret.push(elements[i]); 260 | } 261 | } 262 | 263 | return ret; 264 | }; 265 | } 266 | 267 | //--- End compatibility section --- 268 | 269 | 270 | /** 271 | * Start of animation specific code 272 | */ 273 | Fx = function (elem, options, prop) { 274 | this.options = options; 275 | this.elem = elem; 276 | this.prop = prop; 277 | }; 278 | Fx.prototype = { 279 | 280 | update: function () { 281 | var styles, 282 | paths = this.paths, 283 | elem = this.elem, 284 | elemelem = elem.element; // if destroyed, it is null 285 | 286 | // Animating a path definition on SVGElement 287 | if (paths && elemelem) { 288 | elem.attr('d', pathAnim.step(paths[0], paths[1], this.now, this.toD)); 289 | 290 | // Other animations on SVGElement 291 | } else if (elem.attr) { 292 | if (elemelem) { 293 | elem.attr(this.prop, this.now); 294 | } 295 | 296 | // HTML styles 297 | } else { 298 | styles = {}; 299 | styles[elem] = this.now + this.unit; 300 | Highcharts.css(elem, styles); 301 | } 302 | 303 | if (this.options.step) { 304 | this.options.step.call(this.elem, this.now, this); 305 | } 306 | 307 | }, 308 | custom: function (from, to, unit) { 309 | var self = this, 310 | t = function (gotoEnd) { 311 | return self.step(gotoEnd); 312 | }, 313 | i; 314 | 315 | this.startTime = +new Date(); 316 | this.start = from; 317 | this.end = to; 318 | this.unit = unit; 319 | this.now = this.start; 320 | this.pos = this.state = 0; 321 | 322 | t.elem = this.elem; 323 | 324 | if (t() && timers.push(t) === 1) { 325 | timerId = setInterval(function () { 326 | 327 | for (i = 0; i < timers.length; i++) { 328 | if (!timers[i]()) { 329 | timers.splice(i--, 1); 330 | } 331 | } 332 | 333 | if (!timers.length) { 334 | clearInterval(timerId); 335 | } 336 | }, 13); 337 | } 338 | }, 339 | 340 | step: function (gotoEnd) { 341 | var t = +new Date(), 342 | ret, 343 | done, 344 | options = this.options, 345 | i; 346 | 347 | if (this.elem.stopAnimation) { 348 | ret = false; 349 | 350 | } else if (gotoEnd || t >= options.duration + this.startTime) { 351 | this.now = this.end; 352 | this.pos = this.state = 1; 353 | this.update(); 354 | 355 | this.options.curAnim[this.prop] = true; 356 | 357 | done = true; 358 | for (i in options.curAnim) { 359 | if (options.curAnim[i] !== true) { 360 | done = false; 361 | } 362 | } 363 | 364 | if (done) { 365 | if (options.complete) { 366 | options.complete.call(this.elem); 367 | } 368 | } 369 | ret = false; 370 | 371 | } else { 372 | var n = t - this.startTime; 373 | this.state = n / options.duration; 374 | this.pos = options.easing(n, 0, 1, options.duration); 375 | this.now = this.start + ((this.end - this.start) * this.pos); 376 | this.update(); 377 | ret = true; 378 | } 379 | return ret; 380 | } 381 | }; 382 | 383 | /** 384 | * The adapter animate method 385 | */ 386 | this.animate = function (el, prop, opt) { 387 | var start, 388 | unit = '', 389 | end, 390 | fx, 391 | args, 392 | name; 393 | 394 | el.stopAnimation = false; // ready for new 395 | 396 | if (typeof opt !== 'object' || opt === null) { 397 | args = arguments; 398 | opt = { 399 | duration: args[2], 400 | easing: args[3], 401 | complete: args[4] 402 | }; 403 | } 404 | if (typeof opt.duration !== 'number') { 405 | opt.duration = 400; 406 | } 407 | opt.easing = Math[opt.easing] || Math.easeInOutSine; 408 | opt.curAnim = Highcharts.extend({}, prop); 409 | 410 | for (name in prop) { 411 | fx = new Fx(el, opt, name); 412 | end = null; 413 | 414 | if (name === 'd') { 415 | fx.paths = pathAnim.init( 416 | el, 417 | el.d, 418 | prop.d 419 | ); 420 | fx.toD = prop.d; 421 | start = 0; 422 | end = 1; 423 | } else if (el.attr) { 424 | start = el.attr(name); 425 | } else { 426 | start = parseFloat(HighchartsAdapter._getStyle(el, name)) || 0; 427 | if (name !== 'opacity') { 428 | unit = 'px'; 429 | } 430 | } 431 | 432 | if (!end) { 433 | end = parseFloat(prop[name]); 434 | } 435 | fx.custom(start, end, unit); 436 | } 437 | }; 438 | }, 439 | 440 | /** 441 | * Internal method to return CSS value for given element and property 442 | */ 443 | _getStyle: function (el, prop) { 444 | return window.getComputedStyle(el).getPropertyValue(prop); 445 | }, 446 | 447 | /** 448 | * Downloads a script and executes a callback when done. 449 | * @param {String} scriptLocation 450 | * @param {Function} callback 451 | */ 452 | getScript: function (scriptLocation, callback) { 453 | // We cannot assume that Assets class from mootools-more is available so instead insert a script tag to download script. 454 | var head = doc.getElementsByTagName('head')[0], 455 | script = doc.createElement('script'); 456 | 457 | script.type = 'text/javascript'; 458 | script.src = scriptLocation; 459 | script.onload = callback; 460 | 461 | head.appendChild(script); 462 | }, 463 | 464 | /** 465 | * Return the index of an item in an array, or -1 if not found 466 | */ 467 | inArray: function (item, arr) { 468 | return arr.indexOf ? arr.indexOf(item) : emptyArray.indexOf.call(arr, item); 469 | }, 470 | 471 | 472 | /** 473 | * A direct link to adapter methods 474 | */ 475 | adapterRun: function (elem, method) { 476 | return parseInt(HighchartsAdapter._getStyle(elem, method), 10); 477 | }, 478 | 479 | /** 480 | * Filter an array 481 | */ 482 | grep: function (elements, callback) { 483 | return emptyArray.filter.call(elements, callback); 484 | }, 485 | 486 | /** 487 | * Map an array 488 | */ 489 | map: function (arr, fn) { 490 | var results = [], i = 0, len = arr.length; 491 | 492 | for (; i < len; i++) { 493 | results[i] = fn.call(arr[i], arr[i], i, arr); 494 | } 495 | 496 | return results; 497 | }, 498 | 499 | offset: function (el) { 500 | var left = 0, 501 | top = 0; 502 | 503 | while (el) { 504 | left += el.offsetLeft; 505 | top += el.offsetTop; 506 | el = el.offsetParent; 507 | } 508 | 509 | return { 510 | left: left, 511 | top: top 512 | }; 513 | }, 514 | 515 | /** 516 | * Add an event listener 517 | */ 518 | addEvent: function (el, type, fn) { 519 | augment(el).bind(type, fn); 520 | }, 521 | 522 | /** 523 | * Remove event added with addEvent 524 | */ 525 | removeEvent: function (el, type, fn) { 526 | augment(el).unbind(type, fn); 527 | }, 528 | 529 | /** 530 | * Fire an event on a custom object 531 | */ 532 | fireEvent: function (el, type, eventArguments, defaultFunction) { 533 | var e; 534 | 535 | if (doc.createEvent && (el.dispatchEvent || el.fireEvent)) { 536 | e = doc.createEvent('Events'); 537 | e.initEvent(type, true, true); 538 | e.target = el; 539 | 540 | Highcharts.extend(e, eventArguments); 541 | 542 | if (el.dispatchEvent) { 543 | el.dispatchEvent(e); 544 | } else { 545 | el.fireEvent(type, e); 546 | } 547 | 548 | } else if (el.HCExtended === true) { 549 | eventArguments = eventArguments || {}; 550 | el.trigger(type, eventArguments); 551 | } 552 | 553 | if (eventArguments && eventArguments.defaultPrevented) { 554 | defaultFunction = null; 555 | } 556 | 557 | if (defaultFunction) { 558 | defaultFunction(eventArguments); 559 | } 560 | }, 561 | 562 | washMouseEvent: function (e) { 563 | return e; 564 | }, 565 | 566 | 567 | /** 568 | * Stop running animation 569 | */ 570 | stop: function (el) { 571 | el.stopAnimation = true; 572 | }, 573 | 574 | /** 575 | * Utility for iterating over an array. Parameters are reversed compared to jQuery. 576 | * @param {Array} arr 577 | * @param {Function} fn 578 | */ 579 | each: function (arr, fn) { // modern browsers 580 | return Array.prototype.forEach.call(arr, fn); 581 | } 582 | }; 583 | }()); 584 | -------------------------------------------------------------------------------- /static/ueditor/third-party/zeroclipboard/ZeroClipboard.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ZeroClipboard 3 | * The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface. 4 | * Copyright (c) 2014 Jon Rohan, James M. Greene 5 | * Licensed MIT 6 | * http://zeroclipboard.org/ 7 | * v2.0.0-beta.5 8 | */ 9 | !function(a){"use strict";var b,c={bridge:null,version:"0.0.0",pluginType:"unknown",disabled:null,outdated:null,unavailable:null,deactivated:null,overdue:null,ready:null},d={},e=null,f=0,g={},h=0,i={},j=function(){var a,b,c,d,e="ZeroClipboard.swf";if(!document.currentScript||!(d=document.currentScript.src)){var f=document.getElementsByTagName("script");if("readyState"in f[0])for(a=f.length;a--&&("interactive"!==f[a].readyState||!(d=f[a].src)););else if("loading"===document.readyState)d=f[f.length-1].src;else{for(a=f.length;a--;){if(c=f[a].src,!c){b=null;break}if(c=c.split("#")[0].split("?")[0],c=c.slice(0,c.lastIndexOf("/")+1),null==b)b=c;else if(b!==c){b=null;break}}null!==b&&(d=b)}}return d&&(d=d.split("#")[0].split("?")[0],e=d.slice(0,d.lastIndexOf("/")+1)+e),e}(),k=function(){var a=/\-([a-z])/g,b=function(a,b){return b.toUpperCase()};return function(c){return c.replace(a,b)}}(),l=function(b,c){var d,e,f;return a.getComputedStyle?d=a.getComputedStyle(b,null).getPropertyValue(c):(e=k(c),d=b.currentStyle?b.currentStyle[e]:b.style[e]),"cursor"!==c||d&&"auto"!==d||(f=b.tagName.toLowerCase(),"a"!==f)?d:"pointer"},m=function(b){b||(b=a.event);var c;this!==a?c=this:b.target?c=b.target:b.srcElement&&(c=b.srcElement),L.activate(c)},n=function(a,b,c){a&&1===a.nodeType&&(a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c))},o=function(a,b,c){a&&1===a.nodeType&&(a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c))},p=function(a,b){if(!a||1!==a.nodeType)return a;if(a.classList)return a.classList.contains(b)||a.classList.add(b),a;if(b&&"string"==typeof b){var c=(b||"").split(/\s+/);if(1===a.nodeType)if(a.className){for(var d=" "+a.className+" ",e=a.className,f=0,g=c.length;g>f;f++)d.indexOf(" "+c[f]+" ")<0&&(e+=" "+c[f]);a.className=e.replace(/^\s+|\s+$/g,"")}else a.className=b}return a},q=function(a,b){if(!a||1!==a.nodeType)return a;if(a.classList)return a.classList.contains(b)&&a.classList.remove(b),a;if(b&&"string"==typeof b||void 0===b){var c=(b||"").split(/\s+/);if(1===a.nodeType&&a.className)if(b){for(var d=(" "+a.className+" ").replace(/[\n\t]/g," "),e=0,f=c.length;f>e;e++)d=d.replace(" "+c[e]+" "," ");a.className=d.replace(/^\s+|\s+$/g,"")}else a.className=""}return a},r=function(){var a,b,c,d=1;return"function"==typeof document.body.getBoundingClientRect&&(a=document.body.getBoundingClientRect(),b=a.right-a.left,c=document.body.offsetWidth,d=Math.round(b/c*100)/100),d},s=function(b,c){var d={left:0,top:0,width:0,height:0,zIndex:y(c)-1};if(b.getBoundingClientRect){var e,f,g,h=b.getBoundingClientRect();"pageXOffset"in a&&"pageYOffset"in a?(e=a.pageXOffset,f=a.pageYOffset):(g=r(),e=Math.round(document.documentElement.scrollLeft/g),f=Math.round(document.documentElement.scrollTop/g));var i=document.documentElement.clientLeft||0,j=document.documentElement.clientTop||0;d.left=h.left+e-i,d.top=h.top+f-j,d.width="width"in h?h.width:h.right-h.left,d.height="height"in h?h.height:h.bottom-h.top}return d},t=function(a,b){var c=null==b||b&&b.cacheBust===!0;return c?(-1===a.indexOf("?")?"?":"&")+"noCache="+(new Date).getTime():""},u=function(b){var c,d,e,f,g="",h=[];if(b.trustedDomains&&("string"==typeof b.trustedDomains?f=[b.trustedDomains]:"object"==typeof b.trustedDomains&&"length"in b.trustedDomains&&(f=b.trustedDomains)),f&&f.length)for(c=0,d=f.length;d>c;c++)if(f.hasOwnProperty(c)&&f[c]&&"string"==typeof f[c]){if(e=A(f[c]),!e)continue;if("*"===e){h=[e];break}h.push.apply(h,[e,"//"+e,a.location.protocol+"//"+e])}return h.length&&(g+="trustedOrigins="+encodeURIComponent(h.join(","))),b.forceEnhancedClipboard===!0&&(g+=(g?"&":"")+"forceEnhancedClipboard=true"),g},v=function(a,b,c){if("function"==typeof b.indexOf)return b.indexOf(a,c);var d,e=b.length;for("undefined"==typeof c?c=0:0>c&&(c=e+c),d=c;e>d;d++)if(b.hasOwnProperty(d)&&b[d]===a)return d;return-1},w=function(a){if("string"==typeof a)throw new TypeError("ZeroClipboard doesn't accept query strings.");return"number"!=typeof a.length?[a]:a},x=function(b,c,d,e){e?a.setTimeout(function(){b.apply(c,d)},0):b.apply(c,d)},y=function(a){var b,c;return a&&("number"==typeof a&&a>0?b=a:"string"==typeof a&&(c=parseInt(a,10))&&!isNaN(c)&&c>0&&(b=c)),b||("number"==typeof O.zIndex&&O.zIndex>0?b=O.zIndex:"string"==typeof O.zIndex&&(c=parseInt(O.zIndex,10))&&!isNaN(c)&&c>0&&(b=c)),b||0},z=function(){var a,b,c,d,e,f,g=arguments[0]||{};for(a=1,b=arguments.length;b>a;a++)if(null!=(c=arguments[a]))for(d in c)if(c.hasOwnProperty(d)){if(e=g[d],f=c[d],g===f)continue;void 0!==f&&(g[d]=f)}return g},A=function(a){if(null==a||""===a)return null;if(a=a.replace(/^\s+|\s+$/g,""),""===a)return null;var b=a.indexOf("//");a=-1===b?a:a.slice(b+2);var c=a.indexOf("/");return a=-1===c?a:-1===b||0===c?null:a.slice(0,c),a&&".swf"===a.slice(-4).toLowerCase()?null:a||null},B=function(){var a=function(a,b){var c,d,e;if(null!=a&&"*"!==b[0]&&("string"==typeof a&&(a=[a]),"object"==typeof a&&"number"==typeof a.length))for(c=0,d=a.length;d>c;c++)if(a.hasOwnProperty(c)&&(e=A(a[c]))){if("*"===e){b.length=0,b.push("*");break}-1===v(e,b)&&b.push(e)}};return function(b,c){var d=A(c.swfPath);null===d&&(d=b);var e=[];a(c.trustedOrigins,e),a(c.trustedDomains,e);var f=e.length;if(f>0){if(1===f&&"*"===e[0])return"always";if(-1!==v(b,e))return 1===f&&b===d?"sameDomain":"always"}return"never"}}(),C=function(a){if(null==a)return[];if(Object.keys)return Object.keys(a);var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},D=function(a){if(a)for(var b in a)a.hasOwnProperty(b)&&delete a[b];return a},E=function(){try{return document.activeElement}catch(a){}return null},F=function(a,b){for(var c={},d=0,e=b.length;e>d;d++)b[d]in a&&(c[b[d]]=a[b[d]]);return c},G=function(a,b){var c={};for(var d in a)-1===v(d,b)&&(c[d]=a[d]);return c},H=function(a){var b={},c={};if("object"==typeof a&&a){for(var d in a)if(d&&a.hasOwnProperty(d)&&"string"==typeof a[d]&&a[d])switch(d.toLowerCase()){case"text/plain":case"text":case"air:text":case"flash:text":b.text=a[d],c.text=d;break;case"text/html":case"html":case"air:html":case"flash:html":b.html=a[d],c.html=d;break;case"application/rtf":case"text/rtf":case"rtf":case"richtext":case"air:rtf":case"flash:rtf":b.rtf=a[d],c.rtf=d}return{data:b,formatMap:c}}},I=function(a,b){if("object"!=typeof a||!a||"object"!=typeof b||!b)return a;var c={};for(var d in a)if(a.hasOwnProperty(d)){if("success"!==d&&"data"!==d){c[d]=a[d];continue}c[d]={};var e=a[d];for(var f in e)f&&e.hasOwnProperty(f)&&b.hasOwnProperty(f)&&(c[d][b[f]]=e[f])}return c},J=function(a){return function(b){return a.call(b,0)}}(a.Array.prototype.slice),K=function(){function a(a){var b=a.match(/[\d]+/g);return b.length=3,b.join(".")}function b(a){return!!a&&(a=a.toLowerCase())&&(/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(a)||"chrome.plugin"===a.slice(-13))}function d(c){c&&(h=!0,c.version&&(k=a(c.version)),!k&&c.description&&(k=a(c.description)),c.filename&&(j=b(c.filename)))}var e,f,g,h=!1,i=!1,j=!1,k="";if(navigator.plugins&&navigator.plugins.length)e=navigator.plugins["Shockwave Flash"],d(e),navigator.plugins["Shockwave Flash 2.0"]&&(h=!0,k="2.0.0.11");else if(navigator.mimeTypes&&navigator.mimeTypes.length)g=navigator.mimeTypes["application/x-shockwave-flash"],e=g&&g.enabledPlugin,d(e);else if("undefined"!=typeof ActiveXObject){i=!0;try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),h=!0,k=a(f.GetVariable("$version"))}catch(l){try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),h=!0,k="6.0.21"}catch(m){try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),h=!0,k=a(f.GetVariable("$version"))}catch(n){i=!1}}}}c.disabled=h!==!0,c.outdated=k&&parseFloat(k)<11,c.version=k||"0.0.0",c.pluginType=j?"pepper":i?"activex":h?"netscape":"unknown"};K();var L=function(a){if(!(this instanceof L))return new L(a);if(this.id=""+f++,g[this.id]={instance:this,elements:[],handlers:{}},a&&this.clip(a),"boolean"!=typeof c.ready&&(c.ready=!1),!L.isFlashUnusable()&&null===c.bridge){var b=this,d=O.flashLoadTimeout;"number"==typeof d&&d>=0&&setTimeout(function(){"boolean"!=typeof c.deactivated&&(c.deactivated=!0),c.deactivated===!0&&L.emit({type:"error",name:"flash-deactivated",client:b})},d),c.overdue=!1,P()}};L.prototype.setText=function(a){return L.setData("text/plain",a),this},L.prototype.setHtml=function(a){return L.setData("text/html",a),this},L.prototype.setRichText=function(a){return L.setData("application/rtf",a),this},L.prototype.setData=function(){return L.setData.apply(L,J(arguments)),this},L.prototype.clearData=function(){return L.clearData.apply(L,J(arguments)),this},L.prototype.setSize=function(a,b){return T(a,b),this};var M=function(a){c.ready===!0&&c.bridge&&"function"==typeof c.bridge.setHandCursor?c.bridge.setHandCursor(a):c.ready=!1};L.prototype.destroy=function(){this.unclip(),this.off(),delete g[this.id]};var N=function(){var a,b,c,d=[],e=C(g);for(a=0,b=e.length;b>a;a++)c=g[e[a]].instance,c&&c instanceof L&&d.push(c);return d};L.version="2.0.0-beta.5";var O={swfPath:j,trustedDomains:a.location.host?[a.location.host]:[],cacheBust:!0,forceHandCursor:!1,forceEnhancedClipboard:!1,zIndex:999999999,debug:!1,title:null,autoActivate:!0,flashLoadTimeout:3e4};L.isFlashUnusable=function(){return!!(c.disabled||c.outdated||c.unavailable||c.deactivated)},L.config=function(a){"object"==typeof a&&null!==a&&z(O,a);{if("string"!=typeof a||!a){var b={};for(var c in O)O.hasOwnProperty(c)&&(b[c]="object"==typeof O[c]&&null!==O[c]?"length"in O[c]?O[c].slice(0):z({},O[c]):O[c]);return b}if(O.hasOwnProperty(a))return O[a]}},L.destroy=function(){L.deactivate();for(var a in g)if(g.hasOwnProperty(a)&&g[a]){var b=g[a].instance;b&&"function"==typeof b.destroy&&b.destroy()}var d=c.bridge;if(d){var e=R(d);e&&("activex"===c.pluginType&&"readyState"in d?(d.style.display="none",function f(){if(4===d.readyState){for(var a in d)"function"==typeof d[a]&&(d[a]=null);d.parentNode.removeChild(d),e.parentNode&&e.parentNode.removeChild(e)}else setTimeout(f,10)}()):(d.parentNode.removeChild(d),e.parentNode&&e.parentNode.removeChild(e))),c.ready=null,c.bridge=null,c.deactivated=null}L.clearData()},L.activate=function(a){b&&(q(b,O.hoverClass),q(b,O.activeClass)),b=a,p(a,O.hoverClass),S();var d=O.title||a.getAttribute("title");if(d){var e=R(c.bridge);e&&e.setAttribute("title",d)}var f=O.forceHandCursor===!0||"pointer"===l(a,"cursor");M(f)},L.deactivate=function(){var a=R(c.bridge);a&&(a.removeAttribute("title"),a.style.left="0px",a.style.top="-9999px",T(1,1)),b&&(q(b,O.hoverClass),q(b,O.activeClass),b=null)},L.state=function(){return{browser:F(a.navigator,["userAgent","platform","appName"]),flash:G(c,["bridge"]),zeroclipboard:{version:L.version,config:L.config()}}},L.setData=function(a,b){var c;if("object"==typeof a&&a&&"undefined"==typeof b)c=a,L.clearData();else{if("string"!=typeof a||!a)return;c={},c[a]=b}for(var e in c)e&&c.hasOwnProperty(e)&&"string"==typeof c[e]&&c[e]&&(d[e]=c[e])},L.clearData=function(a){"undefined"==typeof a?(D(d),e=null):"string"==typeof a&&d.hasOwnProperty(a)&&delete d[a]};var P=function(){var b,d,e=document.getElementById("global-zeroclipboard-html-bridge");if(!e){var f=B(a.location.host,O),g="never"===f?"none":"all",h=u(O),i=O.swfPath+t(O.swfPath,O);e=Q();var j=document.createElement("div");e.appendChild(j),document.body.appendChild(e);var k=document.createElement("div"),l="activex"===c.pluginType;k.innerHTML='"+(l?'':"")+'',b=k.firstChild,k=null,b.ZeroClipboard=L,e.replaceChild(b,j)}b||(b=document["global-zeroclipboard-flash-bridge"],b&&(d=b.length)&&(b=b[d-1]),b||(b=e.firstChild)),c.bridge=b||null},Q=function(){var a=document.createElement("div");return a.id="global-zeroclipboard-html-bridge",a.className="global-zeroclipboard-container",a.style.position="absolute",a.style.left="0px",a.style.top="-9999px",a.style.width="1px",a.style.height="1px",a.style.zIndex=""+y(O.zIndex),a},R=function(a){for(var b=a&&a.parentNode;b&&"OBJECT"===b.nodeName&&b.parentNode;)b=b.parentNode;return b||null},S=function(){if(b){var a=s(b,O.zIndex),d=R(c.bridge);d&&(d.style.top=a.top+"px",d.style.left=a.left+"px",d.style.width=a.width+"px",d.style.height=a.height+"px",d.style.zIndex=a.zIndex+1),T(a.width,a.height)}},T=function(a,b){var d=R(c.bridge);d&&(d.style.width=a+"px",d.style.height=b+"px")};L.emit=function(b){var f,g,h,i,j,k,l,m,n;if("string"==typeof b&&b&&(f=b),"object"==typeof b&&b&&"string"==typeof b.type&&b.type&&(f=b.type,g=b),f){if(b=W(f,g),Y(b),"ready"===b.type&&c.overdue===!0)return L.emit({type:"error",name:"flash-overdue"});if(h=!/^(before)?copy$/.test(b.type),b.client)U.call(b.client,b,h);else for(i=b.target&&b.target!==a&&O.autoActivate===!0?Z(b.target):N(),j=0,k=i.length;k>j;j++)l=z({},b,{client:i[j]}),U.call(i[j],l,h);return"copy"===b.type&&(n=H(d),m=n.data,e=n.formatMap),m}};var U=function(b,c){var d=g[this.id]&&g[this.id].handlers[b.type];if(d&&d.length){var e,f,h,i,j=this;for(e=0,f=d.length;f>e;e++)h=d[e],i=j,"string"==typeof h&&"function"==typeof a[h]&&(h=a[h]),"object"==typeof h&&h&&"function"==typeof h.handleEvent&&(i=h,h=h.handleEvent),"function"==typeof h&&x(h,i,[b],c)}return this},V={ready:"Flash communication is established",error:{"flash-disabled":"Flash is disabled or not installed","flash-outdated":"Flash is too outdated to support ZeroClipboard","flash-unavailable":"Flash is unable to communicate bidirectionally with JavaScript","flash-deactivated":"Flash is too outdated for your browser and/or is configured as click-to-activate","flash-overdue":"Flash communication was established but NOT within the acceptable time limit"}},W=function(a,d){if(a||d&&d.type){d=d||{},a=(a||d.type).toLowerCase(),z(d,{type:a,target:d.target||b||null,relatedTarget:d.relatedTarget||null,currentTarget:c&&c.bridge||null});var f=V[d.type];return"error"===d.type&&d.name&&f&&(f=f[d.name]),f&&(d.message=f),"ready"===d.type&&z(d,{target:null,version:c.version}),"error"===d.type&&(d.target=null,/^flash-(outdated|unavailable|deactivated|overdue)$/.test(d.name)&&z(d,{version:c.version,minimumVersion:"11.0.0"})),"copy"===d.type&&(d.clipboardData={setData:L.setData,clearData:L.clearData}),"aftercopy"===d.type&&(d=I(d,e)),d.target&&!d.relatedTarget&&(d.relatedTarget=X(d.target)),d}},X=function(a){var b=a&&a.getAttribute&&a.getAttribute("data-clipboard-target");return b?document.getElementById(b):null},Y=function(a){var e=a.target||b;switch(a.type){case"error":v(a.name,["flash-disabled","flash-outdated","flash-deactivated","flash-overdue"])&&z(c,{disabled:"flash-disabled"===a.name,outdated:"flash-outdated"===a.name,unavailable:"flash-unavailable"===a.name,deactivated:"flash-deactivated"===a.name,overdue:"flash-overdue"===a.name,ready:!1});break;case"ready":var f=c.deactivated===!0;z(c,{disabled:!1,outdated:!1,unavailable:!1,deactivated:!1,overdue:f,ready:!f});break;case"copy":var g,h,i=a.relatedTarget;!d["text/html"]&&!d["text/plain"]&&i&&(h=i.value||i.outerHTML||i.innerHTML)&&(g=i.value||i.textContent||i.innerText)?(a.clipboardData.clearData(),a.clipboardData.setData("text/plain",g),h!==g&&a.clipboardData.setData("text/html",h)):!d["text/plain"]&&a.target&&(g=a.target.getAttribute("data-clipboard-text"))&&(a.clipboardData.clearData(),a.clipboardData.setData("text/plain",g));break;case"aftercopy":L.clearData(),e&&e!==E()&&e.focus&&e.focus();break;case"mouseover":p(e,O.hoverClass);break;case"mouseout":O.autoActivate===!0&&L.deactivate();break;case"mousedown":p(e,O.activeClass);break;case"mouseup":q(e,O.activeClass)}};L.prototype.on=function(a,b){var d,e,f,h={},i=g[this.id]&&g[this.id].handlers;if("string"==typeof a&&a)f=a.toLowerCase().split(/\s+/);else if("object"==typeof a&&a&&"undefined"==typeof b)for(d in a)a.hasOwnProperty(d)&&"string"==typeof d&&d&&"function"==typeof a[d]&&this.on(d,a[d]);if(f&&f.length){for(d=0,e=f.length;e>d;d++)a=f[d].replace(/^on/,""),h[a]=!0,i[a]||(i[a]=[]),i[a].push(b);if(h.ready&&c.ready&&L.emit({type:"ready",client:this}),h.error){var j=["disabled","outdated","unavailable","deactivated","overdue"];for(d=0,e=j.length;e>d;d++)if(c[j[d]]){L.emit({type:"error",name:"flash-"+j[d],client:this});break}}}return this},L.prototype.off=function(a,b){var c,d,e,f,h,i=g[this.id]&&g[this.id].handlers;if(0===arguments.length)f=C(i);else if("string"==typeof a&&a)f=a.split(/\s+/);else if("object"==typeof a&&a&&"undefined"==typeof b)for(c in a)a.hasOwnProperty(c)&&"string"==typeof c&&c&&"function"==typeof a[c]&&this.off(c,a[c]);if(f&&f.length)for(c=0,d=f.length;d>c;c++)if(a=f[c].toLowerCase().replace(/^on/,""),h=i[a],h&&h.length)if(b)for(e=v(b,h);-1!==e;)h.splice(e,1),e=v(b,h,e);else i[a].length=0;return this},L.prototype.handlers=function(a){var b,c=null,d=g[this.id]&&g[this.id].handlers;if(d){if("string"==typeof a&&a)return d[a]?d[a].slice(0):null;c={};for(b in d)d.hasOwnProperty(b)&&d[b]&&(c[b]=d[b].slice(0))}return c},L.prototype.clip=function(a){a=w(a);for(var b=0;bd;d++)f=g[c[d]].instance,f&&f instanceof L&&h.push(f);return h};O.hoverClass="zeroclipboard-is-hover",O.activeClass="zeroclipboard-is-active","function"==typeof define&&define.amd?define(function(){return L}):"object"==typeof module&&module&&"object"==typeof module.exports&&module.exports?module.exports=L:a.ZeroClipboard=L}(function(){return this}()); --------------------------------------------------------------------------------