4237375e by 杨炀

init

0 parents
Showing 616 changed files with 2462 additions and 0 deletions
1 # 页面标题
2 VITE_APP_TITLE = 中跆协后台管理系统
3
4 # 开发环境配置
5 VITE_APP_ENV = 'development'
6
7 # 中跆协管理系统/开发环境
8 VITE_APP_BASE_API = '/dev-api'
9
10 # 应用访问路径 例如使用前缀 /admin/
11 VITE_APP_CONTEXT_PATH = '/'
12
13 # 监控地址
14 VITE_APP_MONITRO_ADMIN = 'http://localhost:9090/admin/login'
15
16 # xxl-job 控制台地址
17 VITE_APP_XXL_JOB_ADMIN = 'http://localhost:9100/xxl-job-admin'
18
19 VITE_APP_SOCKET_URL='http://192.168.1.133:8088'
20
21 VITE_TICKET_BASE_API = 'ticket'
22
23 declare module 'particles.vue3';
1 # 页面标题
2 VITE_APP_TITLE = 中跆协后台管理系统
3
4 # 生产环境配置
5 VITE_APP_ENV = 'production'
6
7 # 应用访问路径 例如使用前缀 /admin/
8 VITE_APP_CONTEXT_PATH = '/'
9
10 # 监控地址
11 VITE_APP_MONITRO_ADMIN = '/admin/login'
12
13 # 监控地址
14 VITE_APP_XXL_JOB_ADMIN = '/xxl-job-admin'
15
16 # 中跆协管理系统/测试环境
17 VITE_APP_BASE_API = '/stage-api'
18
19 # 是否在打包时开启压缩,支持 gzip 和 brotli
20 VITE_BUILD_COMPRESS = gzip
21
22 VITE_APP_SOCKET_URL='http://192.168.1.133:8088'
23
24 VITE_TICKET_BASE_API = 'https://ticketh5.wdsfwuxicenter.com/ticket'
1 # 页面标题
2 VITE_APP_TITLE = 中跆协后台管理系统
3
4 # 生产环境配置
5 VITE_APP_ENV = 'production'
6
7 # 应用访问路径 例如使用前缀 /admin/
8 VITE_APP_CONTEXT_PATH = '/'
9
10 # 监控地址
11 VITE_APP_MONITRO_ADMIN = '/admin/login'
12
13 # 监控地址
14 VITE_APP_XXL_JOB_ADMIN = '/xxl-job-admin'
15
16 # 中跆协管理系统/测试环境
17 VITE_APP_BASE_API = '/stage-api'
18
19 # 是否在打包时开启压缩,支持 gzip 和 brotli
20 VITE_BUILD_COMPRESS = gzip
21
22 VITE_APP_SOCKET_URL='http://192.168.1.133:8088'
23
24 VITE_TICKET_BASE_API = 'https://jijin.wtwuxicenter.com/ticket/'
1 .DS_Store
2 node_modules/
3 dist/
4 npm-debug.log*
5 yarn-debug.log*
6 yarn-error.log*
7 **/*.log
8
9 tests/**/coverage/
10 tests/e2e/reports
11 selenium-debug.log
12
13 # Editor directories and files
14 .idea
15 .vscode
16 *.suo
17 *.ntvs*
18 *.njsproj
19 *.sln
20 *.local
21 *.zip
22 *.pdf
23 package-lock.json
24 yarn.lock
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5 <meta charset="utf-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7 <meta name="renderer" content="webkit">
8 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
9 <link rel="icon" href="/favicon.ico">
10 <title>vue3-element-plus</title>
11 <!-- <script src="./browser.js"></script>-->
12 <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
13
14 <script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=QTBBZ-N5J6C-7Z42F-AEBA6-JV3LV-ABFOE"></script>
15 <style>
16 html,
17 body,
18 #app {
19 height: 100%;
20 margin: 0px;
21 padding: 0px;
22 }
23
24 .chromeframe {
25 margin: 0.2em 0;
26 background: #ccc;
27 color: #000;
28 padding: 0.2em 0;
29 }
30
31 #loader-wrapper {
32 position: fixed;
33 top: 0;
34 left: 0;
35 width: 100%;
36 height: 100%;
37 z-index: 999999;
38 }
39
40 #loader {
41 display: block;
42 position: relative;
43 left: 50%;
44 top: 50%;
45 width: 150px;
46 height: 150px;
47 margin: -75px 0 0 -75px;
48 border-radius: 50%;
49 border: 3px solid transparent;
50 border-top-color: #FFF;
51 -webkit-animation: spin 2s linear infinite;
52 -ms-animation: spin 2s linear infinite;
53 -moz-animation: spin 2s linear infinite;
54 -o-animation: spin 2s linear infinite;
55 animation: spin 2s linear infinite;
56 z-index: 1001;
57 }
58
59 #loader:before {
60 content: "";
61 position: absolute;
62 top: 5px;
63 left: 5px;
64 right: 5px;
65 bottom: 5px;
66 border-radius: 50%;
67 border: 3px solid transparent;
68 border-top-color: #FFF;
69 -webkit-animation: spin 3s linear infinite;
70 -moz-animation: spin 3s linear infinite;
71 -o-animation: spin 3s linear infinite;
72 -ms-animation: spin 3s linear infinite;
73 animation: spin 3s linear infinite;
74 }
75
76 #loader:after {
77 content: "";
78 position: absolute;
79 top: 15px;
80 left: 15px;
81 right: 15px;
82 bottom: 15px;
83 border-radius: 50%;
84 border: 3px solid transparent;
85 border-top-color: #FFF;
86 -moz-animation: spin 1.5s linear infinite;
87 -o-animation: spin 1.5s linear infinite;
88 -ms-animation: spin 1.5s linear infinite;
89 -webkit-animation: spin 1.5s linear infinite;
90 animation: spin 1.5s linear infinite;
91 }
92
93
94 @-webkit-keyframes spin {
95 0% {
96 -webkit-transform: rotate(0deg);
97 -ms-transform: rotate(0deg);
98 transform: rotate(0deg);
99 }
100
101 100% {
102 -webkit-transform: rotate(360deg);
103 -ms-transform: rotate(360deg);
104 transform: rotate(360deg);
105 }
106 }
107
108 @keyframes spin {
109 0% {
110 -webkit-transform: rotate(0deg);
111 -ms-transform: rotate(0deg);
112 transform: rotate(0deg);
113 }
114
115 100% {
116 -webkit-transform: rotate(360deg);
117 -ms-transform: rotate(360deg);
118 transform: rotate(360deg);
119 }
120 }
121
122
123 #loader-wrapper .loader-section {
124 position: fixed;
125 top: 0;
126 width: 51%;
127 height: 100%;
128 background: #7171C6;
129 z-index: 1000;
130 -webkit-transform: translateX(0);
131 -ms-transform: translateX(0);
132 transform: translateX(0);
133 }
134
135 #loader-wrapper .loader-section.section-left {
136 left: 0;
137 }
138
139 #loader-wrapper .loader-section.section-right {
140 right: 0;
141 }
142
143
144 .loaded #loader-wrapper .loader-section.section-left {
145 -webkit-transform: translateX(-100%);
146 -ms-transform: translateX(-100%);
147 transform: translateX(-100%);
148 -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
149 transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
150 }
151
152 .loaded #loader-wrapper .loader-section.section-right {
153 -webkit-transform: translateX(100%);
154 -ms-transform: translateX(100%);
155 transform: translateX(100%);
156 -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
157 transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
158 }
159
160 .loaded #loader {
161 opacity: 0;
162 -webkit-transition: all 0.3s ease-out;
163 transition: all 0.3s ease-out;
164 }
165
166 .loaded #loader-wrapper {
167 visibility: hidden;
168 -webkit-transform: translateY(-100%);
169 -ms-transform: translateY(-100%);
170 transform: translateY(-100%);
171 -webkit-transition: all 0.3s 1s ease-out;
172 transition: all 0.3s 1s ease-out;
173 }
174
175 .no-js #loader-wrapper {
176 display: none;
177 }
178
179 .no-js h1 {
180 color: #222222;
181 }
182
183 #loader-wrapper .load_title {
184 font-family: 'Open Sans';
185 color: #FFF;
186 font-size: 19px;
187 width: 100%;
188 text-align: center;
189 z-index: 9999999999999;
190 position: absolute;
191 top: 60%;
192 opacity: 1;
193 line-height: 30px;
194 }
195
196 #loader-wrapper .load_title span {
197 font-weight: normal;
198 font-style: italic;
199 font-size: 13px;
200 color: #FFF;
201 opacity: 0.5;
202 }
203 </style>
204 </head>
205
206 <body>
207 <div id="app">
208 <div id="loader-wrapper">
209 <div id="loader"></div>
210 <div class="loader-section section-left"></div>
211 <div class="loader-section section-right"></div>
212 <!-- <div class="load_title">正在加载系统资源,请耐心等待</div>-->
213 </div>
214 </div>
215 <script type="module" src="/src/main.js"></script>
216 </body>
217
218 </html>
1 {
2 "name": "HyBoot",
3 "version": "1.1.0",
4 "description": "中跆协后台管理系统",
5 "author": "huayan",
6 "license": "MIT",
7 "scripts": {
8 "dev": "vite",
9 "build:prod": "vite build",
10 "build:stage": "vite build --mode staging",
11 "preview": "vite preview"
12 },
13 "dependencies": {
14 "@chenfengyuan/vue-countdown": "^2.1.1",
15 "@dataview/datav-vue3": "^0.0.0-test.1672506674342",
16 "@element-plus/icons-vue": "2.0.10",
17 "@formkit/auto-animate": "^0.8.2",
18 "@jiaminghi/data-view": "^2.10.0",
19 "@tsparticles/vue3": "^3.0.1",
20 "@videojs-player/vue": "^1.0.0",
21 "@vueup/vue-quill": "1.1.1",
22 "@vueuse/core": "^10.1.2",
23 "axios": "0.27.2",
24 "crypto-js": "^4.1.1",
25 "datav-vue3": "^1.0.0",
26 "echarts": "^5.5.1",
27 "echarts-liquidfill": "^3.1.0",
28 "echarts-wordcloud": "^2.1.0",
29 "element-plus": "2.6.1",
30 "file-saver": "2.0.5",
31 "flag-icon-css": "^4.1.7",
32 "fullpage.js": "^4.0.28",
33 "fuse.js": "6.6.2",
34 "guid": "^0.0.12",
35 "js-cookie": "3.0.1",
36 "jsencrypt": "3.3.1",
37 "jszip": "^3.10.1",
38 "katex": "^0.16.6",
39 "lodash": "^4.17.21",
40 "md5js": "^1.0.7",
41 "mysql": "^2.18.1",
42 "nprogress": "0.2.0",
43 "particles.vue3": "^2.12.0",
44 "pinia": "2.0.35",
45 "qrcode": "^1.5.3",
46 "qrcode.vue": "^3.4.1",
47 "quill-image-resize-module": "^3.0.0",
48 "rc-tween-one": "^3.0.6",
49 "require": "^2.4.20",
50 "swiper": "^8.4.7",
51 "tsparticles-engine": "^2.12.0",
52 "v-charts": "^1.19.0",
53 "vant": "^4.0.9",
54 "video.js": "^8.5.2",
55 "vue": "3.3.4",
56 "vue-awesome-swiper": "^5.0.1",
57 "vue-cropper": "1.0.3",
58 "vue-fullpage.js": "^0.2.18",
59 "vue-router": "^4.4.3",
60 "vue-router-transition": "^1.0.9",
61 "vue-socket.io": "^3.0.10",
62 "vue-ueditor-wrap": "3.x",
63 "vue3-particles": "^1.43.1",
64 "vue3-puzzle-vcode": "^1.1.7",
65 "vuedraggable": "^4.1.0",
66 "zxcvbn": "^4.4.2"
67 },
68 "devDependencies": {
69 "@rollup/plugin-commonjs": "^24.1.0",
70 "@rollup/plugin-inject": "^5.0.3",
71 "@vitejs/plugin-legacy": "^4.1.1",
72 "@vitejs/plugin-vue": "^4.1.0",
73 "@vue/compiler-sfc": "3.2.45",
74 "babel-eslint": "^10.1.0",
75 "eslint": "^7.32.0",
76 "eslint-plugin-html": "^6.2.0",
77 "eslint-plugin-vue": "^8.7.1",
78 "less": "^4.2.0",
79 "sass": "1.56.1",
80 "terser": "^5.19.2",
81 "typescript": "^5.0.2",
82 "unplugin-auto-import": "0.11.4",
83 "vite": "^4.4.9",
84 "vite-plugin-compression": "0.5.1",
85 "vite-plugin-svg-icons": "2.0.1",
86 "vite-plugin-vue-setup-extend-plus": "^0.1.0"
87 }
88 }
This diff could not be displayed because it is too large.
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6 <title></title>
7 <style type="text/css">
8 *{color: #838383;margin: 0;padding: 0}
9 html,body {font-size: 12px;overflow: hidden; }
10 .content{padding:5px 0 0 15px;}
11 input{width:210px;height:21px;line-height:21px;margin-left: 4px;}
12 </style>
13 </head>
14 <body>
15 <div class="content">
16 <span><var id="lang_input_anchorName"></var></span><input id="anchorName" value="" />
17 </div>
18 <script type="text/javascript" src="../internal.js"></script>
19 <script type="text/javascript">
20 var anchorInput = $G('anchorName'),
21 node = editor.selection.getRange().getClosedNode();
22 if(node && node.tagName == 'IMG' && (node = node.getAttribute('anchorname'))){
23 anchorInput.value = node;
24 }
25 anchorInput.onkeydown = function(evt){
26 evt = evt || window.event;
27 if(evt.keyCode == 13){
28 editor.execCommand('anchor', anchorInput.value);
29 dialog.close();
30 domUtils.preventDefault(evt)
31 }
32 };
33 dialog.onok = function (){
34 editor.execCommand('anchor', anchorInput.value);
35 dialog.close();
36 };
37 $focus(anchorInput);
38 </script>
39 </body>
40 </html>
...\ No newline at end of file ...\ No newline at end of file
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="UTF-8">
5 <title>ueditor图片对话框</title>
6 <script type="text/javascript" src="../internal.js"></script>
7
8 <!-- jquery -->
9 <script type="text/javascript" src="../../third-party/jquery-1.10.2.min.js"></script>
10
11 <!-- webuploader -->
12 <script src="../../third-party/webuploader/webuploader.min.js"></script>
13 <link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css">
14
15 <!-- attachment dialog -->
16 <link rel="stylesheet" href="attachment.css" type="text/css" />
17 </head>
18 <body>
19
20 <div class="wrapper">
21 <div id="tabhead" class="tabhead">
22 <span class="tab focus" data-content-id="upload"><var id="lang_tab_upload"></var></span>
23 <span class="tab" data-content-id="online"><var id="lang_tab_online"></var></span>
24 </div>
25 <div id="tabbody" class="tabbody">
26 <!-- 上传图片 -->
27 <div id="upload" class="panel focus">
28 <div id="queueList" class="queueList">
29 <div class="statusBar element-invisible">
30 <div class="progress">
31 <span class="text">0%</span>
32 <span class="percentage"></span>
33 </div><div class="info"></div>
34 <div class="btns">
35 <div id="filePickerBtn"></div>
36 <div class="uploadBtn"><var id="lang_start_upload"></var></div>
37 </div>
38 </div>
39 <div id="dndArea" class="placeholder">
40 <div class="filePickerContainer">
41 <div id="filePickerReady"></div>
42 </div>
43 </div>
44 <ul class="filelist element-invisible">
45 <li id="filePickerBlock" class="filePickerBlock"></li>
46 </ul>
47 </div>
48 </div>
49
50 <!-- 在线图片 -->
51 <div id="online" class="panel">
52 <div id="fileList"><var id="lang_imgLoading"></var></div>
53 </div>
54
55 </div>
56 </div>
57 <script type="text/javascript" src="attachment.js"></script>
58
59 </body>
60 </html>
...\ No newline at end of file ...\ No newline at end of file
1 .wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative}
2 .tabbody{height:225px;}
3 .tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;}
4 .tabbody .focus { display: block;}
5
6 body{font-size: 12px;color: #888;overflow: hidden;}
7 input,label{vertical-align:middle}
8 .clear{clear: both;}
9 .pl{padding-left: 18px;padding-left: 23px\9;}
10
11 #imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;}
12 #imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;}
13 #imageList img {cursor: pointer;border: 2px solid white;}
14
15 .bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;}
16 .content div{margin: 10px 0 10px 5px;}
17 .content .iptradio{margin: 0px 5px 5px 0px;}
18 .txt{width:280px;}
19
20 .wrapcolor{height: 19px;}
21 div.color{float: left;margin: 0;}
22 #colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;}
23 div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
24 #custom input{height: 15px;min-height: 15px;width:20px;}
25 #repeatType{width:100px;}
26
27
28 /* 图片管理样式 */
29 #imgManager {
30 width: 100%;
31 height: 225px;
32 }
33 #imgManager #imageList{
34 width: 100%;
35 overflow-x: hidden;
36 overflow-y: auto;
37 }
38 #imgManager ul {
39 display: block;
40 list-style: none;
41 margin: 0;
42 padding: 0;
43 }
44 #imgManager li {
45 float: left;
46 display: block;
47 list-style: none;
48 padding: 0;
49 width: 113px;
50 height: 113px;
51 margin: 9px 0 0 19px;
52 background-color: #eee;
53 overflow: hidden;
54 cursor: pointer;
55 position: relative;
56 }
57 #imgManager li.clearFloat {
58 float: none;
59 clear: both;
60 display: block;
61 width:0;
62 height:0;
63 margin: 0;
64 padding: 0;
65 }
66 #imgManager li img {
67 cursor: pointer;
68 }
69 #imgManager li .icon {
70 cursor: pointer;
71 width: 113px;
72 height: 113px;
73 position: absolute;
74 top: 0;
75 left: 0;
76 z-index: 2;
77 border: 0;
78 background-repeat: no-repeat;
79 }
80 #imgManager li .icon:hover {
81 width: 107px;
82 height: 107px;
83 border: 3px solid #1094fa;
84 }
85 #imgManager li.selected .icon {
86 background-image: url(images/success.png);
87 background-position: 75px 75px;
88 }
89 #imgManager li.selected .icon:hover {
90 width: 107px;
91 height: 107px;
92 border: 3px solid #1094fa;
93 background-position: 72px 72px;
94 }
...\ No newline at end of file ...\ No newline at end of file
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
5 <script type="text/javascript" src="../internal.js"></script>
6 <link rel="stylesheet" type="text/css" href="background.css">
7 </head>
8 <body>
9 <div id="bg_container" class="wrapper">
10 <div id="tabHeads" class="tabhead">
11 <span class="focus" data-content-id="normal"><var id="lang_background_normal"></var></span>
12 <span class="" data-content-id="imgManager"><var id="lang_background_local"></var></span>
13 </div>
14 <div id="tabBodys" class="tabbody">
15 <div id="normal" class="panel focus">
16 <fieldset class="bgarea">
17 <legend><var id="lang_background_set"></var></legend>
18 <div class="content">
19 <div>
20 <label><input id="nocolorRadio" class="iptradio" type="radio" name="t" value="none" checked="checked"><var id="lang_background_none"></var></label>
21 <label><input id="coloredRadio" class="iptradio" type="radio" name="t" value="color"><var id="lang_background_colored"></var></label>
22 </div>
23 <div class="wrapcolor pl">
24 <div class="color">
25 <var id="lang_background_color"></var>:
26 </div>
27 <div id="colorPicker"></div>
28 <div class="clear"></div>
29 </div>
30 <div class="wrapcolor pl">
31 <label><var id="lang_background_netimg"></var>:</label><input class="txt" type="text" id="url">
32 </div>
33 <div id="alignment" class="alignment">
34 <var id="lang_background_align"></var>:<select id="repeatType">
35 <option value="center"></option>
36 <option value="repeat-x"></option>
37 <option value="repeat-y"></option>
38 <option value="repeat"></option>
39 <option value="self"></option>
40 </select>
41 </div>
42 <div id="custom" >
43 <var id="lang_background_position"></var>:x:<input type="text" size="1" id="x" maxlength="4" value="0">px&nbsp;&nbsp;y:<input type="text" size="1" id="y" maxlength="4" value="0">px
44 </div>
45 </div>
46 </fieldset>
47
48 </div>
49 <div id="imgManager" class="panel">
50 <div id="imageList" style=""></div>
51 </div>
52 </div>
53 </div>
54 <script type="text/javascript" src="background.js"></script>
55 </body>
56 </html>
1 /*
2 * 图表配置文件
3 * */
4
5
6 //不同类型的配置
7 var typeConfig = [
8 {
9 chart: {
10 type: 'line'
11 },
12 plotOptions: {
13 line: {
14 dataLabels: {
15 enabled: false
16 },
17 enableMouseTracking: true
18 }
19 }
20 }, {
21 chart: {
22 type: 'line'
23 },
24 plotOptions: {
25 line: {
26 dataLabels: {
27 enabled: true
28 },
29 enableMouseTracking: false
30 }
31 }
32 }, {
33 chart: {
34 type: 'area'
35 }
36 }, {
37 chart: {
38 type: 'bar'
39 }
40 }, {
41 chart: {
42 type: 'column'
43 }
44 }, {
45 chart: {
46 plotBackgroundColor: null,
47 plotBorderWidth: null,
48 plotShadow: false
49 },
50 plotOptions: {
51 pie: {
52 allowPointSelect: true,
53 cursor: 'pointer',
54 dataLabels: {
55 enabled: true,
56 color: '#000000',
57 connectorColor: '#000000',
58 formatter: function() {
59 return '<b>'+ this.point.name +'</b>: '+ ( Math.round( this.point.percentage*100 ) / 100 ) +' %';
60 }
61 }
62 }
63 }
64 }
65 ];
1 html, body {
2 width: 100%;
3 height: 100%;
4 margin: 0;
5 padding: 0;
6 overflow-x: hidden;
7 }
8
9 .main {
10 width: 100%;
11 overflow: hidden;
12 }
13
14 .table-view {
15 height: 100%;
16 float: left;
17 margin: 20px;
18 width: 40%;
19 }
20
21 .table-view .table-container {
22 width: 100%;
23 margin-bottom: 50px;
24 overflow: scroll;
25 }
26
27 .table-view th {
28 padding: 5px 10px;
29 background-color: #F7F7F7;
30 }
31
32 .table-view td {
33 width: 50px;
34 text-align: center;
35 padding:0;
36 }
37
38 .table-container input {
39 width: 40px;
40 padding: 5px;
41 border: none;
42 outline: none;
43 }
44
45 .table-view caption {
46 font-size: 18px;
47 text-align: left;
48 }
49
50 .charts-view {
51 /*margin-left: 49%!important;*/
52 width: 50%;
53 margin-left: 49%;
54 height: 400px;
55 }
56
57 .charts-container {
58 border-left: 1px solid #c3c3c3;
59 }
60
61 .charts-format fieldset {
62 padding-left: 20px;
63 margin-bottom: 50px;
64 }
65
66 .charts-format legend {
67 padding-left: 10px;
68 padding-right: 10px;
69 }
70
71 .format-item-container {
72 padding: 20px;
73 }
74
75 .format-item-container label {
76 display: block;
77 margin: 10px 0;
78 }
79
80 .charts-format .data-item {
81 border: 1px solid black;
82 outline: none;
83 padding: 2px 3px;
84 }
85
86 /* 图表类型 */
87
88 .charts-type {
89 margin-top: 50px;
90 height: 300px;
91 }
92
93 .scroll-view {
94 border: 1px solid #c3c3c3;
95 border-left: none;
96 border-right: none;
97 overflow: hidden;
98 }
99
100 .scroll-container {
101 margin: 20px;
102 width: 100%;
103 overflow: hidden;
104 }
105
106 .scroll-bed {
107 width: 10000px;
108 _margin-top: 20px;
109 -webkit-transition: margin-left .5s ease;
110 -moz-transition: margin-left .5s ease;
111 transition: margin-left .5s ease;
112 }
113
114 .view-box {
115 display: inline-block;
116 *display: inline;
117 *zoom: 1;
118 margin-right: 20px;
119 border: 2px solid white;
120 line-height: 0;
121 overflow: hidden;
122 cursor: pointer;
123 }
124
125 .view-box img {
126 border: 1px solid #cecece;
127 }
128
129 .view-box.selected {
130 border-color: #7274A7;
131 }
132
133 .button-container {
134 margin-bottom: 20px;
135 text-align: center;
136 }
137
138 .button-container a {
139 display: inline-block;
140 width: 100px;
141 height: 25px;
142 line-height: 25px;
143 border: 1px solid #c2ccd1;
144 margin-right: 30px;
145 text-decoration: none;
146 color: black;
147 -webkit-border-radius: 2px;
148 -moz-border-radius: 2px;
149 border-radius: 2px;
150 }
151
152 .button-container a:HOVER {
153 background: #fcfcfc;
154 }
155
156 .button-container a:ACTIVE {
157 border-top-color: #c2ccd1;
158 box-shadow:inset 0 5px 4px -4px rgba(49, 49, 64, 0.1);
159 }
160
161 .edui-charts-not-data {
162 height: 100px;
163 line-height: 100px;
164 text-align: center;
165 }
...\ No newline at end of file ...\ No newline at end of file
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>chart</title>
5 <meta chartset="utf-8">
6 <link rel="stylesheet" type="text/css" href="charts.css">
7 <script type="text/javascript" src="../internal.js"></script>
8 </head>
9 <body>
10 <div class="main">
11 <div class="table-view">
12 <h3><var id="lang_data_source"></var></h3>
13 <div id="tableContainer" class="table-container"></div>
14 <h3><var id="lang_chart_format"></var></h3>
15 <form name="data-form">
16 <div class="charts-format">
17 <fieldset>
18 <legend><var id="lang_data_align"></var></legend>
19 <div class="format-item-container">
20 <label>
21 <input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="1" checked="checked">
22 <var id="lang_chart_align_same"></var>
23 </label>
24 <label>
25 <input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="-1">
26 <var id="lang_chart_align_reverse"></var>
27 </label>
28 <br>
29 </div>
30 </fieldset>
31 <fieldset>
32 <legend><var id="lang_chart_title"></var></legend>
33 <div class="format-item-container">
34 <label>
35 <var id="lang_chart_main_title"></var><input type="text" name="title" class="data-item">
36 </label>
37 <label>
38 <var id="lang_chart_sub_title"></var><input type="text" name="sub-title" class="data-item not-pie-item">
39 </label>
40 <label>
41 <var id="lang_chart_x_title"></var><input type="text" name="x-title" class="data-item not-pie-item">
42 </label>
43 <label>
44 <var id="lang_chart_y_title"></var><input type="text" name="y-title" class="data-item not-pie-item">
45 </label>
46 </div>
47 </fieldset>
48 <fieldset>
49 <legend><var id="lang_chart_tip"></var></legend>
50 <div class="format-item-container">
51 <label>
52 <var id="lang_cahrt_tip_prefix"></var>
53 <input type="text" id="tipInput" name="tip" class="data-item" disabled="disabled">
54 </label>
55 <p><var id="lang_cahrt_tip_description"></var></p>
56 </div>
57 </fieldset>
58 <fieldset>
59 <legend><var id="lang_chart_data_unit"></var></legend>
60 <div class="format-item-container">
61 <label><var id="lang_chart_data_unit_title"></var><input type="text" name="unit" class="data-item"></label>
62 <p><var id="lang_chart_data_unit_description"></var></p>
63 </div>
64 </fieldset>
65 </div>
66 </form>
67 </div>
68 <div class="charts-view">
69 <div id="chartsContainer" class="charts-container"></div>
70 <div id="chartsType" class="charts-type">
71 <h3><var id="lang_chart_type"></var></h3>
72 <div class="scroll-view">
73 <div class="scroll-container">
74 <div id="scrollBed" class="scroll-bed"></div>
75 </div>
76 <div id="buttonContainer" class="button-container">
77 <a href="#" data-title="prev"><var id="lang_prev_btn"></var></a>
78 <a href="#" data-title="next"><var id="lang_next_btn"></var></a>
79 </div>
80 </div>
81 </div>
82 </div>
83 </div>
84 <script src="../../third-party/jquery-1.10.2.min.js"></script>
85 <script src="../../third-party/highcharts/highcharts.js"></script>
86 <script src="chart.config.js"></script>
87 <script src="charts.js"></script>
88 </body>
89 </html>
...\ No newline at end of file ...\ No newline at end of file
1 .jd img{
2 background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
3 cursor:pointer;width:35px;height:35px;display:block;
4 }
5 .pp img{
6 background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
7 cursor:pointer;width:25px;height:25px;display:block;
8 }
9 .ldw img{
10 background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
11 cursor:pointer;width:35px;height:35px;display:block;
12 }
13 .tsj img{
14 background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
15 cursor:pointer;width:35px;height:35px;display:block;
16 }
17 .cat img{
18 background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
19 cursor:pointer;width:35px;height:35px;display:block;
20 }
21 .bb img{
22 background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
23 cursor:pointer;width:35px;height:35px;display:block;
24 }
25 .youa img{
26 background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
27 cursor:pointer;width:35px;height:35px;display:block;
28 }
29
30 .smileytable td {height: 37px;}
31 #tabPanel{margin-left:5px;overflow: hidden;}
32 #tabContent {float:left;background:#FFFFFF;}
33 #tabContent div{display: none;width:480px;overflow:hidden;}
34 #tabIconReview.show{left:17px;display:block;}
35 .menuFocus{background:#ACCD3C;}
36 .menuDefault{background:#FFFFFF;}
37 #tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;}
38 img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;}
39
40 .wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;}
41 .tabbody table{width: 100%;}
42 .tabbody td{border:1px solid #BAC498;}
43 .tabbody td span{display: block;zoom:1;padding:0 4px;}
...\ No newline at end of file ...\ No newline at end of file
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title></title>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6 <meta name="robots" content="noindex, nofollow"/>
7 <script type="text/javascript" src="../internal.js"></script>
8 <link rel="stylesheet" type="text/css" href="emotion.css">
9 </head>
10 <body>
11 <div id="tabPanel" class="wrapper">
12 <div id="tabHeads" class="tabhead">
13 <span><var id="lang_input_choice"></var></span>
14 <span><var id="lang_input_Tuzki"></var></span>
15 <span><var id="lang_input_lvdouwa"></var></span>
16 <span><var id="lang_input_BOBO"></var></span>
17 <span><var id="lang_input_babyCat"></var></span>
18 <span><var id="lang_input_bubble"></var></span>
19 <span><var id="lang_input_youa"></var></span>
20 </div>
21 <div id="tabBodys" class="tabbody">
22 <div id="tab0"></div>
23 <div id="tab1"></div>
24 <div id="tab2"></div>
25 <div id="tab3"></div>
26 <div id="tab4"></div>
27 <div id="tab5"></div>
28 <div id="tab6"></div>
29 </div>
30 </div>
31 <div id="tabIconReview">
32 <img id='faceReview' class='review' src="../../themes/default/images/spacer.gif"/>
33 </div>
34 <script type="text/javascript" src="emotion.js"></script>
35 <script type="text/javascript">
36 var emotion = {
37 tabNum:7, //切换面板数量
38 SmilmgName:{ tab0:['j_00', 84], tab1:['t_00', 40], tab2:['w_00', 52], tab3:['B_00', 63], tab4:['C_00', 20], tab5:['i_f', 50], tab6:['y_00', 40] }, //图片前缀名
39 imageFolders:{ tab0:'jx2/', tab1:'tsj/', tab2:'ldw/', tab3:'bobo/', tab4:'babycat/', tab5:'face/', tab6:'youa/'}, //图片对应文件夹路径
40 imageCss:{tab0:'jd', tab1:'tsj', tab2:'ldw', tab3:'bb', tab4:'cat', tab5:'pp', tab6:'youa'}, //图片css类名
41 imageCssOffset:{tab0:35, tab1:35, tab2:35, tab3:35, tab4:35, tab5:25, tab6:35}, //图片偏移
42 SmileyInfor:{
43 tab0:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '打酱油', '俯卧撑', '气愤', '?', '吻', '怒', '胜利', 'HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '微笑', '亲吻', '调皮', '惊恐', '耍酷', '发火', '害羞', '汗水', '大哭', '', '加油', '困', '你NB', '晕倒', '开心', '偷笑', '大哭', '滴汗', '叹气', '超赞', '??', '飞吻', '天使', '撒花', '生气', '被砸', '吓傻', '随意吐'],
44 tab1:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '摊手', '睡觉', '瘫坐', '无聊', '星星闪', '旋转', '也不行', '郁闷', '正Music', '抓墙', '撞墙至死', '歪头', '戳眼', '飘过', '互相拍砖', '砍死你', '扔桌子', '少林寺', '什么?', '转头', '我爱牛奶', '我踢', '摇晃', '晕厥', '在笼子里', '震荡'],
45 tab2:['大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '我错了', 'money', '气愤', '挑逗', '吻', '怒', '胜利', '委屈', '受伤', '说啥呢?', '闭嘴', '不', '逗你玩儿', '飞吻', '眩晕', '魔法', '我来了', '睡了', '我打', '闭嘴', '打', '打晕了', '刷牙', '爆揍', '炸弹', '倒立', '刮胡子', '邪恶的笑', '不要不要', '爱恋中', '放大仔细看', '偷窥', '超高兴', '晕', '松口气', '我跑', '享受', '修养', '哭', '汗', '啊~', '热烈欢迎', '打酱油', '俯卧撑', '?'],
46 tab3:['HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '泪眼', '流泪', '生气', '吐舌', '喜欢', '旋转', '再见', '抓狂', '汗', '鄙视', '拜', '吐血', '嘘', '打人', '蹦跳', '变脸', '扯肉', '吃To', '吃花', '吹泡泡糖', '大变身', '飞天舞', '回眸', '可怜', '猛抽', '泡泡', '苹果', '亲', '', '骚舞', '烧香', '睡', '套娃娃', '捅捅', '舞倒', '西红柿', '爱慕', '摇', '摇摆', '杂耍', '招财', '被殴', '被球闷', '大惊', '理想', '欧打', '呕吐', '碎', '吐痰'],
47 tab4:['发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '顶', '幸运', '爱心', '躲', '送花', '选择'],
48 tab5:['微笑', '亲吻', '调皮', '惊讶', '耍酷', '发火', '害羞', '汗水', '大哭', '得意', '鄙视', '困', '夸奖', '晕倒', '疑问', '媒婆', '狂吐', '青蛙', '发愁', '亲吻', '', '爱心', '心碎', '玫瑰', '礼物', '哭', '奸笑', '可爱', '得意', '呲牙', '暴汗', '楚楚可怜', '困', '哭', '生气', '惊讶', '口水', '彩虹', '夜空', '太阳', '钱钱', '灯泡', '咖啡', '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'],
49 tab6:['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上']
50 }
51 };
52 </script>
53 </body>
54 </html>
...\ No newline at end of file ...\ No newline at end of file
1 window.onload = function () {
2 editor.setOpt({
3 emotionLocalization:false
4 });
5
6 emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/";
7 emotion.SmileyBox = createTabList( emotion.tabNum );
8 emotion.tabExist = createArr( emotion.tabNum );
9
10 initImgName();
11 initEvtHandler( "tabHeads" );
12 };
13
14 function initImgName() {
15 for ( var pro in emotion.SmilmgName ) {
16 var tempName = emotion.SmilmgName[pro],
17 tempBox = emotion.SmileyBox[pro],
18 tempStr = "";
19
20 if ( tempBox.length ) return;
21 for ( var i = 1; i <= tempName[1]; i++ ) {
22 tempStr = tempName[0];
23 if ( i < 10 ) tempStr = tempStr + '0';
24 tempStr = tempStr + i + '.gif';
25 tempBox.push( tempStr );
26 }
27 }
28 }
29
30 function initEvtHandler( conId ) {
31 var tabHeads = $G( conId );
32 for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) {
33 var tabObj = tabHeads.childNodes[i];
34 if ( tabObj.nodeType == 1 ) {
35 domUtils.on( tabObj, "click", (function ( index ) {
36 return function () {
37 switchTab( index );
38 };
39 })( j ) );
40 j++;
41 }
42 }
43 switchTab( 0 );
44 $G( "tabIconReview" ).style.display = 'none';
45 }
46
47 function InsertSmiley( url, evt ) {
48 var obj = {
49 src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
50 };
51 obj._src = obj.src;
52 editor.execCommand( 'insertimage', obj );
53 if ( !evt.ctrlKey ) {
54 dialog.popup.hide();
55 }
56 }
57
58 function switchTab( index ) {
59
60 autoHeight( index );
61 if ( emotion.tabExist[index] == 0 ) {
62 emotion.tabExist[index] = 1;
63 createTab( 'tab' + index );
64 }
65 //获取呈现元素句柄数组
66 var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ),
67 tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ),
68 i = 0, L = tabHeads.length;
69 //隐藏所有呈现元素
70 for ( ; i < L; i++ ) {
71 tabHeads[i].className = "";
72 tabBodys[i].style.display = "none";
73 }
74 //显示对应呈现元素
75 tabHeads[index].className = "focus";
76 tabBodys[index].style.display = "block";
77 }
78
79 function autoHeight( index ) {
80 var iframe = dialog.getDom( "iframe" ),
81 parent = iframe.parentNode.parentNode;
82 switch ( index ) {
83 case 0:
84 iframe.style.height = "380px";
85 parent.style.height = "392px";
86 break;
87 case 1:
88 iframe.style.height = "220px";
89 parent.style.height = "232px";
90 break;
91 case 2:
92 iframe.style.height = "260px";
93 parent.style.height = "272px";
94 break;
95 case 3:
96 iframe.style.height = "300px";
97 parent.style.height = "312px";
98 break;
99 case 4:
100 iframe.style.height = "140px";
101 parent.style.height = "152px";
102 break;
103 case 5:
104 iframe.style.height = "260px";
105 parent.style.height = "272px";
106 break;
107 case 6:
108 iframe.style.height = "230px";
109 parent.style.height = "242px";
110 break;
111 default:
112
113 }
114 }
115
116
117 function createTab( tabName ) {
118 var faceVersion = "?v=1.1", //版本号
119 tab = $G( tabName ), //获取将要生成的Div句柄
120 imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径
121 positionLine = 11 / 2, //中间数
122 iWidth = iHeight = 35, //图片长宽
123 iColWidth = 3, //表格剩余空间的显示比例
124 tableCss = emotion.imageCss[tabName],
125 cssOffset = emotion.imageCssOffset[tabName],
126 textHTML = ['<table class="smileytable">'],
127 i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage,
128 sUrl, realUrl, posflag, offset, infor;
129
130 for ( ; i < imgNum; ) {
131 textHTML.push( '<tr>' );
132 for ( var j = 0; j < imgColNum; j++, i++ ) {
133 faceImage = emotion.SmileyBox[tabName][i];
134 if ( faceImage ) {
135 sUrl = imagePath + faceImage + faceVersion;
136 realUrl = imagePath + faceImage;
137 posflag = j < positionLine ? 0 : 1;
138 offset = cssOffset * i * (-1) - 1;
139 infor = emotion.SmileyInfor[tabName][i];
140
141 textHTML.push( '<td class="' + tableCss + '" border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center" bgcolor="transparent" onclick="InsertSmiley(\'' + realUrl.replace( /'/g, "\\'" ) + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">' );
142 textHTML.push( '<span>' );
143 textHTML.push( '<img style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>' );
144 textHTML.push( '</span>' );
145 } else {
146 textHTML.push( '<td width="' + iColWidth + '%" bgcolor="#FFFFFF">' );
147 }
148 textHTML.push( '</td>' );
149 }
150 textHTML.push( '</tr>' );
151 }
152 textHTML.push( '</table>' );
153 textHTML = textHTML.join( "" );
154 tab.innerHTML = textHTML;
155 }
156
157 function over( td, srcPath, posFlag ) {
158 td.style.backgroundColor = "#ACCD3C";
159 $G( 'faceReview' ).style.backgroundImage = "url(" + srcPath + ")";
160 if ( posFlag == 1 ) $G( "tabIconReview" ).className = "show";
161 $G( "tabIconReview" ).style.display = 'block';
162 }
163
164 function out( td ) {
165 td.style.backgroundColor = "transparent";
166 var tabIconRevew = $G( "tabIconReview" );
167 tabIconRevew.className = "";
168 tabIconRevew.style.display = 'none';
169 }
170
171 function createTabList( tabNum ) {
172 var obj = {};
173 for ( var i = 0; i < tabNum; i++ ) {
174 obj["tab" + i] = [];
175 }
176 return obj;
177 }
178
179 function createArr( tabNum ) {
180 var arr = [];
181 for ( var i = 0; i < tabNum; i++ ) {
182 arr[i] = 0;
183 }
184 return arr;
185 }
186
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <title></title>
7 <script type="text/javascript" src="../internal.js"></script>
8 <style type="text/css">
9 .content{width:530px; height: 350px;margin: 10px auto;}
10 .content table{width: 100%}
11 .content table td{vertical-align: middle;}
12 #address{width:220px;height:21px;background: #FFF;border:1px solid #d7d7d7; line-height: 21px;}
13 </style>
14 <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
15 </head>
16 <body>
17 <div class="content">
18 <table>
19 <tr>
20 <td><label for="address"><var id="lang_input_address"></var></label></td>
21 <td><input id="address" type="text" /></td>
22 <td><a id="doSearch" href="javascript:void(0)" class="button"><var id="lang_input_search"></var></a></td>
23 </tr>
24 </table>
25 <div id="container" style="width: 100%; height: 340px;margin: 5px auto; border: 1px solid gray;"></div>
26 </div>
27 <script type="text/javascript">
28 domUtils.on(window,"load",function(){
29 var map = new google.maps.Map(document.getElementById('container'), {
30 zoom: 3,
31 streetViewControl: false,
32 scaleControl: true,
33 mapTypeId: google.maps.MapTypeId.ROADMAP
34 });
35 var imgcss;
36 var marker = new google.maps.Marker({
37 map: map,
38 draggable: true
39 });
40 function doSearch(){
41 var address = document.getElementById('address').value;
42 var geocoder = new google.maps.Geocoder();
43 geocoder.geocode( { 'address': address}, function (results, status) {
44 if (status == google.maps.GeocoderStatus.OK) {
45 var bounds = results[0].geometry.viewport;
46 map.fitBounds(bounds);
47 marker.setPosition(results[0].geometry.location);
48 marker.setTitle(address);
49 } else alert(lang.searchError);
50 });
51 }
52 $G('address').onkeydown = function (evt){
53 evt = evt || event;
54 if (evt.keyCode == 13) {
55 doSearch();
56 }
57 };
58 $G("doSearch").onclick = doSearch;
59 dialog.onok = function (){
60 var center = map.getCenter();
61 var point = marker.getPosition();
62 var url = "http://maps.googleapis.com/maps/api/staticmap?center=" + center.lat() + ',' + center.lng() + "&zoom=" + map.zoom + "&size=520x340&maptype=" + map.getMapTypeId() + "&markers=" + point.lat() + ',' + point.lng() + "&sensor=false";
63 editor.execCommand('inserthtml', '<img width="520" height="340" src="' + url + '"' + (imgcss ? ' style="' + imgcss + '"' :'') + '/>');
64 };
65
66 function getPars(str,par){
67 var reg = new RegExp(par+"=((\\d+|[.,])*)","g");
68 return reg.exec(str)[1];
69 }
70 var img = editor.selection.getRange().getClosedNode();
71 if(img && img.src.indexOf("http://maps.googleapis.com/maps/api/staticmap")!=-1){
72 var url = img.getAttribute("src");
73 var centers = getPars(url,"center").split(",");
74 point = new google.maps.LatLng(Number(centers[0]),Number(centers[1]));
75 map.setCenter(point);
76 map.setZoom(Number(getPars(url,"zoom")));
77 centers = getPars(url,"markers").split(",");
78 marker.setPosition(new google.maps.LatLng(Number(centers[0]),Number(centers[1])));
79 imgcss = img.style.cssText;
80 }else{
81 setTimeout(function(){
82 doSearch();
83 },30)
84 }
85 });
86
87 </script>
88 </body>
89 </html>
...\ No newline at end of file ...\ No newline at end of file
1 .wrapper{width: 370px;margin: 10px auto;zoom: 1;}
2 .tabbody{height: 360px;}
3 .tabbody .panel{width:100%;height: 360px;position: absolute;background: #fff;}
4 .tabbody .panel h1{font-size:26px;margin: 5px 0 0 5px;}
5 .tabbody .panel p{font-size:12px;margin: 5px 0 0 5px;}
6 .tabbody table{width:90%;line-height: 20px;margin: 5px 0 0 5px;;}
7 .tabbody table thead{font-weight: bold;line-height: 25px;}
...\ No newline at end of file ...\ No newline at end of file
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <title>帮助</title>
6 <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
7 <script type="text/javascript" src="../internal.js"></script>
8 <link rel="stylesheet" type="text/css" href="help.css">
9 </head>
10 <body>
11 <div class="wrapper" id="helptab">
12 <div id="tabHeads" class="tabhead">
13 <span class="focus" tabsrc="about"><var id="lang_input_about"></var></span>
14 <span tabsrc="shortcuts"><var id="lang_input_shortcuts"></var></span>
15 </div>
16 <div id="tabBodys" class="tabbody">
17 <div id="about" class="panel">
18 <h1>UEditor</h1>
19 <p id="version"></p>
20 <p><var id="lang_input_introduction"></var></p>
21 </div>
22 <div id="shortcuts" class="panel">
23 <table>
24 <thead>
25 <tr>
26 <td><var id="lang_Txt_shortcuts"></var></td>
27 <td><var id="lang_Txt_func"></var></td>
28 </tr>
29 </thead>
30 <tbody>
31 <tr>
32 <td>ctrl+b</td>
33 <td><var id="lang_Txt_bold"></var></td>
34 </tr>
35 <tr>
36 <td>ctrl+c</td>
37 <td><var id="lang_Txt_copy"></var></td>
38 </tr>
39 <tr>
40 <td>ctrl+x</td>
41 <td><var id="lang_Txt_cut"></var></td>
42 </tr>
43 <tr>
44 <td>ctrl+v</td>
45 <td><var id="lang_Txt_Paste"></var></td>
46 </tr>
47 <tr>
48 <td>ctrl+y</td>
49 <td><var id="lang_Txt_undo"></var></td>
50 </tr>
51 <tr>
52 <td>ctrl+z</td>
53 <td><var id="lang_Txt_redo"></var></td>
54 </tr>
55 <tr>
56 <td>ctrl+i</td>
57 <td><var id="lang_Txt_italic"></var></td>
58 </tr>
59 <tr>
60 <td>ctrl+u</td>
61 <td><var id="lang_Txt_underline"></var></td>
62 </tr>
63 <tr>
64 <td>ctrl+a</td>
65 <td><var id="lang_Txt_selectAll"></var></td>
66 </tr>
67 <tr>
68 <td>shift+enter</td>
69 <td><var id="lang_Txt_visualEnter"></var></td>
70 </tr>
71 <tr>
72 <td>alt+z</td>
73 <td><var id="lang_Txt_fullscreen"></var></td>
74 </tr>
75 </tbody>
76 </table>
77 </div>
78 </div>
79 </div>
80 <script type="text/javascript" src="help.js"></script>
81 </body>
82 </html>
...\ No newline at end of file ...\ No newline at end of file
1 /**
2 * Created with JetBrains PhpStorm.
3 * User: xuheng
4 * Date: 12-9-26
5 * Time: 下午1:06
6 * To change this template use File | Settings | File Templates.
7 */
8 /**
9 * tab点击处理事件
10 * @param tabHeads
11 * @param tabBodys
12 * @param obj
13 */
14 function clickHandler( tabHeads,tabBodys,obj ) {
15 //head样式更改
16 for ( var k = 0, len = tabHeads.length; k < len; k++ ) {
17 tabHeads[k].className = "";
18 }
19 obj.className = "focus";
20 //body显隐
21 var tabSrc = obj.getAttribute( "tabSrc" );
22 for ( var j = 0, length = tabBodys.length; j < length; j++ ) {
23 var body = tabBodys[j],
24 id = body.getAttribute( "id" );
25 body.onclick = function(){
26 this.style.zoom = 1;
27 };
28 if ( id != tabSrc ) {
29 body.style.zIndex = 1;
30 } else {
31 body.style.zIndex = 200;
32 }
33 }
34
35 }
36
37 /**
38 * TAB切换
39 * @param tabParentId tab的父节点ID或者对象本身
40 */
41 function switchTab( tabParentId ) {
42 var tabElements = $G( tabParentId ).children,
43 tabHeads = tabElements[0].children,
44 tabBodys = tabElements[1].children;
45
46 for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
47 var head = tabHeads[i];
48 if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
49 head.onclick = function () {
50 clickHandler(tabHeads,tabBodys,this);
51 }
52 }
53 }
54 switchTab("helptab");
55
56 document.getElementById('version').innerHTML = parent.UE.version;
...\ No newline at end of file ...\ No newline at end of file
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="UTF-8">
5 <title>ueditor图片对话框</title>
6 <script type="text/javascript" src="../internal.js"></script>
7
8 <!-- jquery -->
9 <script type="text/javascript" src="../../third-party/jquery-1.10.2.min.js"></script>
10
11 <!-- webuploader -->
12 <script src="../../third-party/webuploader/webuploader.min.js"></script>
13 <link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css">
14
15 <!-- image dialog -->
16 <link rel="stylesheet" href="image.css" type="text/css" />
17 </head>
18 <body>
19
20 <div class="wrapper">
21 <div id="tabhead" class="tabhead">
22 <span class="tab" data-content-id="remote"><var id="lang_tab_remote"></var></span>
23 <span class="tab focus" data-content-id="upload"><var id="lang_tab_upload"></var></span>
24 <span class="tab" data-content-id="online"><var id="lang_tab_online"></var></span>
25 <span class="tab" data-content-id="search"><var id="lang_tab_search"></var></span>
26 </div>
27 <div class="alignBar">
28 <label class="algnLabel"><var id="lang_input_align"></var></label>
29 <span id="alignIcon">
30 <span id="noneAlign" class="none-align focus" data-align="none"></span>
31 <span id="leftAlign" class="left-align" data-align="left"></span>
32 <span id="rightAlign" class="right-align" data-align="right"></span>
33 <span id="centerAlign" class="center-align" data-align="center"></span>
34 </span>
35 <input id="align" name="align" type="hidden" value="none"/>
36 </div>
37 <div id="tabbody" class="tabbody">
38
39 <!-- 远程图片 -->
40 <div id="remote" class="panel">
41 <div class="top">
42 <div class="row">
43 <label for="url"><var id="lang_input_url"></var></label>
44 <span><input class="text" id="url" type="text"/></span>
45 </div>
46 </div>
47 <div class="left">
48 <div class="row">
49 <label><var id="lang_input_size"></var></label>
50 <span><var id="lang_input_width">&nbsp;&nbsp;</var><input class="text" type="text" id="width"/>px </span>
51 <span><var id="lang_input_height">&nbsp;&nbsp;</var><input class="text" type="text" id="height"/>px </span>
52 <span><input id="lock" type="checkbox" disabled="disabled"><span id="lockicon"></span></span>
53 </div>
54 <div class="row">
55 <label><var id="lang_input_border"></var></label>
56 <span><input class="text" type="text" id="border"/>px </span>
57 </div>
58 <div class="row">
59 <label><var id="lang_input_vhspace"></var></label>
60 <span><input class="text" type="text" id="vhSpace"/>px </span>
61 </div>
62 <div class="row">
63 <label><var id="lang_input_title"></var></label>
64 <span><input class="text" type="text" id="title"/></span>
65 </div>
66 </div>
67 <div class="right"><div id="preview"></div></div>
68 </div>
69
70 <!-- 上传图片 -->
71 <div id="upload" class="panel focus">
72 <div id="queueList" class="queueList">
73 <div class="statusBar element-invisible">
74 <div class="progress">
75 <span class="text">0%</span>
76 <span class="percentage"></span>
77 </div><div class="info"></div>
78 <div class="btns">
79 <div id="filePickerBtn"></div>
80 <div class="uploadBtn"><var id="lang_start_upload"></var></div>
81 </div>
82 </div>
83 <div id="dndArea" class="placeholder">
84 <div class="filePickerContainer">
85 <div id="filePickerReady"></div>
86 </div>
87 </div>
88 <ul class="filelist element-invisible">
89 <li id="filePickerBlock" class="filePickerBlock"></li>
90 </ul>
91 </div>
92 </div>
93
94 <!-- 在线图片 -->
95 <div id="online" class="panel">
96 <div id="imageList"><var id="lang_imgLoading"></var></div>
97 </div>
98
99 <!-- 搜索图片 -->
100 <div id="search" class="panel">
101 <div class="searchBar">
102 <input id="searchTxt" class="searchTxt text" type="text" />
103 <select id="searchType" class="searchType">
104 <option value="&s=4&z=0"></option>
105 <option value="&s=1&z=19"></option>
106 <option value="&s=2&z=0"></option>
107 <option value="&s=3&z=0"></option>
108 </select>
109 <input id="searchReset" type="button" />
110 <input id="searchBtn" type="button" />
111 </div>
112 <div id="searchList" class="searchList"><ul id="searchListUl"></ul></div>
113 </div>
114
115 </div>
116 </div>
117 <script type="text/javascript" src="image.js"></script>
118
119 </body>
120 </html>
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5 <title></title>
6 <script type="text/javascript" src="../internal.js"></script>
7 <style type="text/css">
8 .warp {width: 320px;height: 153px;margin-left:5px;padding: 20px 0 0 15px;position: relative;}
9 #url {width: 290px; margin-bottom: 2px; margin-left: -6px; margin-left: -2px\9;*margin-left:0;_margin-left:0; }
10 .format span{display: inline-block; width: 58px;text-align: center; zoom:1;}
11 table td{padding:5px 0;}
12 #align{width: 65px;height: 23px;line-height: 22px;}
13 </style>
14 </head>
15 <body>
16 <div class="warp">
17 <table width="300" cellpadding="0" cellspacing="0">
18 <tr>
19 <td colspan="2" class="format">
20 <span><var id="lang_input_address"></var></span>
21 <input style="width:200px" id="url" type="text" value=""/>
22 </td>
23 </tr>
24 <tr>
25 <td colspan="2" class="format"><span><var id="lang_input_width"></var></span><input style="width:200px" type="text" id="width"/> px</td>
26
27 </tr>
28 <tr>
29 <td colspan="2" class="format"><span><var id="lang_input_height"></var></span><input style="width:200px" type="text" id="height"/> px</td>
30 </tr>
31 <tr>
32 <td><span><var id="lang_input_isScroll"></var></span><input type="checkbox" id="scroll"/> </td>
33 <td><span><var id="lang_input_frameborder"></var></span><input type="checkbox" id="frameborder"/> </td>
34 </tr>
35
36 <tr>
37 <td colspan="2"><span><var id="lang_input_alignMode"></var></span>
38 <select id="align">
39 <option value=""></option>
40 <option value="left"></option>
41 <option value="right"></option>
42 </select>
43 </td>
44 </tr>
45 </table>
46 </div>
47 <script type="text/javascript">
48 var iframe = editor._iframe;
49 if(iframe){
50 $G("url").value = iframe.getAttribute("src")||"";
51 $G("width").value = iframe.getAttribute("width")||iframe.style.width.replace("px","")||"";
52 $G("height").value = iframe.getAttribute("height") || iframe.style.height.replace("px","") ||"";
53 $G("scroll").checked = (iframe.getAttribute("scrolling") == "yes") ? true : false;
54 $G("frameborder").checked = (iframe.getAttribute("frameborder") == "1") ? true : false;
55 $G("align").value = iframe.align ? iframe.align : "";
56 }
57 function queding(){
58 var url = $G("url").value.replace(/^\s*|\s*$/ig,""),
59 width = $G("width").value,
60 height = $G("height").value,
61 scroll = $G("scroll"),
62 frameborder = $G("frameborder"),
63 float = $G("align").value,
64 newIframe = editor.document.createElement("iframe"),
65 div;
66 if(!url){
67 alert(lang.enterAddress);
68 return false;
69 }
70 newIframe.setAttribute("src",/http:\/\/|https:\/\//ig.test(url) ? url : "http://"+url);
71 /^[1-9]+[.]?\d*$/g.test( width ) ? newIframe.setAttribute("width",width) : "";
72 /^[1-9]+[.]?\d*$/g.test( height ) ? newIframe.setAttribute("height",height) : "";
73 scroll.checked ? newIframe.setAttribute("scrolling","yes") : newIframe.setAttribute("scrolling","no");
74 frameborder.checked ? newIframe.setAttribute("frameborder","1",0) : newIframe.setAttribute("frameborder","0",0);
75 float ? newIframe.setAttribute("align",float) : newIframe.setAttribute("align","");
76 if(iframe){
77 iframe.parentNode.insertBefore(newIframe,iframe);
78 domUtils.remove(iframe);
79 }else{
80 div = editor.document.createElement("div");
81 div.appendChild(newIframe);
82 editor.execCommand("inserthtml",div.innerHTML);
83 }
84 editor._iframe = null;
85 dialog.close();
86 }
87 dialog.onok = queding;
88 $G("url").onkeydown = function(evt){
89 evt = evt || event;
90 if(evt.keyCode == 13){
91 queding();
92 }
93 };
94 $focus($G( "url" ));
95
96 </script>
97 </body>
98 </html>
...\ No newline at end of file ...\ No newline at end of file
1 (function () {
2 var parent = window.parent;
3 //dialog对象
4 dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )];
5 //当前打开dialog的编辑器实例
6 editor = dialog.editor;
7
8 UE = parent.UE;
9
10 domUtils = UE.dom.domUtils;
11
12 utils = UE.utils;
13
14 browser = UE.browser;
15
16 ajax = UE.ajax;
17
18 $G = function ( id ) {
19 return document.getElementById( id )
20 };
21 //focus元素
22 $focus = function ( node ) {
23 setTimeout( function () {
24 if ( browser.ie ) {
25 var r = node.createTextRange();
26 r.collapse( false );
27 r.select();
28 } else {
29 node.focus()
30 }
31 }, 0 )
32 };
33 utils.loadFile(document,{
34 href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(),
35 tag:"link",
36 type:"text/css",
37 rel:"stylesheet"
38 });
39 lang = editor.getLang(dialog.className.split( "-" )[2]);
40 if(lang){
41 domUtils.on(window,'load',function () {
42
43 var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
44 //针对静态资源
45 for ( var i in lang["static"] ) {
46 var dom = $G( i );
47 if(!dom) continue;
48 var tagName = dom.tagName,
49 content = lang["static"][i];
50 if(content.src){
51 //clone
52 content = utils.extend({},content,false);
53 content.src = langImgPath + content.src;
54 }
55 if(content.style){
56 content = utils.extend({},content,false);
57 content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath)
58 }
59 switch ( tagName.toLowerCase() ) {
60 case "var":
61 dom.parentNode.replaceChild( document.createTextNode( content ), dom );
62 break;
63 case "select":
64 var ops = dom.options;
65 for ( var j = 0, oj; oj = ops[j]; ) {
66 oj.innerHTML = content.options[j++];
67 }
68 for ( var p in content ) {
69 p != "options" && dom.setAttribute( p, content[p] );
70 }
71 break;
72 default :
73 domUtils.setAttributes( dom, content);
74 }
75 }
76 } );
77 }
78
79
80 })();
81
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <title></title>
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
7 <script type="text/javascript" src="../internal.js"></script>
8 <style type="text/css">
9 *{margin:0;padding:0;color: #838383;}
10 table{font-size: 12px;margin: 10px;line-height: 30px}
11 .txt{width:300px;height:21px;line-height:21px;border:1px solid #d7d7d7;}
12 </style>
13 </head>
14 <body>
15 <table>
16 <tr>
17 <td><label for="text"> <var id="lang_input_text"></var></label></td>
18 <td><input class="txt" id="text" type="text" disabled="true"/></td>
19 </tr>
20 <tr>
21 <td><label for="href"> <var id="lang_input_url"></var></label></td>
22 <td><input class="txt" id="href" type="text" /></td>
23 </tr>
24 <tr>
25 <td><label for="title"> <var id="lang_input_title"></var></label></td>
26 <td><input class="txt" id="title" type="text"/></td>
27 </tr>
28 <tr>
29 <td colspan="2">
30 <label for="target"><var id="lang_input_target"></var></label>
31 <input id="target" type="checkbox"/>
32 </td>
33 </tr>
34 <tr>
35 <td colspan="2" id="msg"></td>
36 </tr>
37 </table>
38 <script type="text/javascript">
39 var range = editor.selection.getRange(),
40 link = range.collapsed ? editor.queryCommandValue( "link" ) : editor.selection.getStart(),
41 url,
42 text = $G('text'),
43 rangeLink = domUtils.findParentByTagName(range.getCommonAncestor(),'a',true),
44 orgText;
45 link = domUtils.findParentByTagName( link, "a", true );
46 if(link){
47 url = utils.html(link.getAttribute( '_href' ) || link.getAttribute( 'href', 2 ));
48
49 if(rangeLink === link && !link.getElementsByTagName('img').length){
50 text.removeAttribute('disabled');
51 orgText = text.value = link[browser.ie ? 'innerText':'textContent'];
52 }else{
53 text.setAttribute('disabled','true');
54 text.value = lang.validLink;
55 }
56
57 }else{
58 if(range.collapsed){
59 text.removeAttribute('disabled');
60 text.value = '';
61 }else{
62 text.setAttribute('disabled','true');
63 text.value = lang.validLink;
64 }
65
66 }
67 $G("title").value = url ? link.title : "";
68 $G("href").value = url ? url: '';
69 $G("target").checked = url && link.target == "_blank" ? true : false;
70 $focus($G("href"));
71
72 function handleDialogOk(){
73 var href =$G('href').value.replace(/^\s+|\s+$/g, '');
74 if(href){
75 if(!hrefStartWith(href,["http","/","ftp://",'#'])) {
76 href = "http://" + href;
77 }
78 var obj = {
79 'href' : href,
80 'target' : $G("target").checked ? "_blank" : '_self',
81 'title' : $G("title").value.replace(/^\s+|\s+$/g, ''),
82 '_href':href
83 };
84 //修改链接内容的情况太特殊了,所以先做到这里了
85 //todo:情况多的时候,做到command里
86 if(orgText && text.value != orgText){
87 link[browser.ie ? 'innerText' : 'textContent'] = obj.textValue = text.value;
88 range.selectNode(link).select()
89 }
90 if(range.collapsed){
91 obj.textValue = text.value;
92 }
93 editor.execCommand('link',utils.clearEmptyAttrs(obj) );
94 dialog.close();
95 }
96 }
97 dialog.onok = handleDialogOk;
98 $G('href').onkeydown = $G('title').onkeydown = function(evt){
99 evt = evt || window.event;
100 if (evt.keyCode == 13) {
101 handleDialogOk();
102 return false;
103 }
104 };
105 $G('href').onblur = function(){
106 if(!hrefStartWith(this.value,["http","/","ftp://",'#'])){
107 $G("msg").innerHTML = "<span style='color: red'>"+lang.httpPrompt+"</span>";
108 }else{
109 $G("msg").innerHTML = "";
110 }
111 };
112
113 function hrefStartWith(href,arr){
114 href = href.replace(/^\s+|\s+$/g, '');
115 for(var i=0,ai;ai=arr[i++];){
116 if(href.indexOf(ai)==0){
117 return true;
118 }
119 }
120 return false;
121 }
122
123
124 </script>
125 </body>
126 </html>
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title></title>
6 <script type="text/javascript" src="../internal.js"></script>
7 <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.1&services=true"></script>
8 <style type="text/css">
9 .content{width:530px; height: 350px;margin: 10px auto;}
10 .content table{width: 100%}
11 .content table td{vertical-align: middle;}
12 #city,#address{height:21px;background: #FFF;border:1px solid #d7d7d7; line-height: 21px;}
13 #city{width:60px}
14 #address{width:130px}
15 #is_dynamic_label span{vertical-align:middle;margin: 3px 0px 3px 3px;}
16 #is_dynamic_label input{vertical-align:middle;margin: 3px 3px 3px 50px;}
17 </style>
18 </head>
19 <body>
20 <div class="content">
21 <table>
22 <tr>
23 <td><var id="lang_city"></var>:</td>
24 <td><input id="city" type="text" /></td>
25 <td><var id="lang_address"></var>:</td>
26 <td><input id="address" type="text" value="" /></td>
27 <td><a href="javascript:doSearch()" class="button"><var id="lang_search"></var></a></td>
28 <td><label id="is_dynamic_label" for="is_dynamic"><input id="is_dynamic" type="checkbox" name="is_dynamic" /><span><var id="lang_dynamicmap"></var></span></label></td>
29 </tr>
30 </table>
31 <div style="width:100%;height:340px;margin:5px auto;border:1px solid gray" id="container"></div>
32
33 </div>
34 <script type="text/javascript">
35 var map = new BMap.Map("container"),marker,point,styleStr;
36 map.enableScrollWheelZoom();
37 map.enableContinuousZoom();
38 function doSearch(){
39 if (!document.getElementById('city').value) {
40 alert(lang.cityMsg);
41 return;
42 }
43 var search = new BMap.LocalSearch(document.getElementById('city').value, {
44 onSearchComplete: function (results){
45 if (results && results.getNumPois()) {
46 var points = [];
47 for (var i=0; i<results.getCurrentNumPois(); i++) {
48 points.push(results.getPoi(i).point);
49 }
50 if (points.length > 1) {
51 map.setViewport(points);
52 } else {
53 map.centerAndZoom(points[0], 13);
54 }
55 point = map.getCenter();
56 marker.setPoint(point);
57 } else {
58 alert(lang.errorMsg);
59 }
60 }
61 });
62 search.search(document.getElementById('address').value || document.getElementById('city').value);
63 }
64 //获得参数
65 function getPars(str,par){
66 var reg = new RegExp(par+"=((\\d+|[.,])*)","g");
67 return reg.exec(str)[1];
68 }
69 function init(){
70 var mapNode = editor.selection.getRange().getClosedNode(),
71 isMapImg = mapNode && /api[.]map[.]baidu[.]com/ig.test(mapNode.getAttribute("src")),
72 isMapIframe = mapNode && domUtils.hasClass(mapNode, 'ueditor_baidumap');
73 if(isMapImg || isMapIframe){
74 var url, centerPos, markerPos;
75 if(isMapIframe) {
76 url = decodeURIComponent(mapNode.getAttribute("src"));
77 $G('is_dynamic').checked = true;
78 styleStr = mapNode.style.cssText;
79 } else {
80 url = mapNode.getAttribute("src");
81 styleStr = mapNode.style.cssText;
82 }
83
84 centerPos = getPars(url,"center").split(",");
85 markerPos = getPars(url, "markers").split(",");
86 point = new BMap.Point(Number(centerPos[0]),Number(centerPos[1]));
87 marker = new BMap.Marker(new BMap.Point(Number(markerPos[0]), Number(markerPos[1])));
88 map.addControl(new BMap.NavigationControl());
89 map.centerAndZoom(point, Number(getPars(url,"zoom")));
90 }else{
91 point = new BMap.Point(116.404, 39.915); // 创建点坐标
92 marker = new BMap.Marker(point);
93 map.addControl(new BMap.NavigationControl());
94 map.centerAndZoom(point, 10); // 初始化地图,设置中心点坐标和地图级别。
95 }
96 marker.enableDragging();
97 map.addOverlay(marker);
98 }
99 init();
100 document.getElementById('address').onkeydown = function (evt){
101 evt = evt || event;
102 if (evt.keyCode == 13) {
103 doSearch();
104 }
105 };
106 dialog.onok = function (){
107 var center = map.getCenter();
108 var zoom = map.zoomLevel;
109 var size = map.getSize();
110 var mapWidth = size.width;
111 var mapHeight = size.height;
112 var point = marker.getPoint();
113
114 if($G('is_dynamic').checked) {
115 var URL = editor.options.UEDITOR_HOME_URL,
116 url = [URL + (/\/$/.test(URL) ? '':'/') + "dialogs/map/show.html" +
117 '#center=' + center.lng + ',' + center.lat,
118 '&zoom=' + zoom,
119 '&width=' + mapWidth,
120 '&height=' + mapHeight,
121 '&markers=' + point.lng + ',' + point.lat,
122 '&markerStyles=' + 'l,A'].join('');
123 editor.execCommand('inserthtml', '<iframe class="ueditor_baidumap" src="' + url + '"' + (styleStr ? ' style="' + styleStr + '"' :'') + ' frameborder="0" width="' + (mapWidth+4) + '" height="' + (mapHeight+4) + '"></iframe>');
124 } else {
125 var url = "http://api.map.baidu.com/staticimage?center=" + center.lng + ',' + center.lat +
126 "&zoom=" + zoom + "&width=" + size.width + '&height=' + size.height + "&markers=" + point.lng + ',' + point.lat;
127 editor.execCommand('inserthtml', '<img width="'+ size.width +'"height="'+ size.height +'" src="' + url + '"' + (styleStr ? ' style="' + styleStr + '"' :'') + '/>');
128 }
129 };
130 document.getElementById("address").focus();
131 </script>
132
133
134 </body>
135 </html>
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta charset="utf-8"/>
6 <meta name="keywords" content="百度地图,百度地图API,百度地图自定义工具,百度地图所见即所得工具"/>
7 <meta name="description" content="百度地图API自定义地图,帮助用户在可视化操作下生成百度地图"/>
8 <title>百度地图API自定义地图</title>
9 <!--引用百度地图API-->
10 <style type="text/css">
11 html, body {
12 margin: 0;
13 padding: 0;
14 overflow: hidden;
15 }
16 </style>
17 <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
18 </head>
19
20 <body onload="initMap();">
21 <!--百度地图容器-->
22 <div style="width:697px;height:550px;border:#ccc solid 1px;" id="dituContent"></div>
23 </body>
24 <script type="text/javascript">
25 function getParam(name) {
26 return location.href.match(new RegExp('[?#&]' + name + '=([^?#&]+)', 'i')) ? RegExp.$1 : '';
27 }
28 var map, marker;
29 var centerParam = getParam('center');
30 var zoomParam = getParam('zoom');
31 var widthParam = getParam('width');
32 var heightParam = getParam('height');
33 var markersParam = getParam('markers');
34 var markerStylesParam = getParam('markerStyles');
35
36 //创建和初始化地图函数:
37 function initMap() {
38 // [FF]切换模式后报错
39 if (!window.BMap) {
40 return;
41 }
42 var dituContent = document.getElementById('dituContent');
43 dituContent.style.width = widthParam + 'px';
44 dituContent.style.height = heightParam + 'px';
45
46 createMap();//创建地图
47 setMapEvent();//设置地图事件
48 addMapControl();//向地图添加控件
49
50 // 创建标注
51 var markersArr = markersParam.split(',');
52 var point = new BMap.Point(markersArr[0], markersArr[1]);
53 marker = new BMap.Marker(point);
54 marker.enableDragging();
55 map.addOverlay(marker); // 将标注添加到地图中
56
57 if(parent.editor && parent.document.body.contentEditable=="true") { //在编辑状态下
58 setMapListener();//地图改变修改外层的iframe标签src属性
59 }
60 }
61
62 //创建地图函数:
63 function createMap() {
64 map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
65 var centerArr = centerParam.split(',');
66 var point = new BMap.Point(parseFloat(centerArr[0]), parseFloat(centerArr[1]));//定义一个中心点坐标
67 map.centerAndZoom(point, parseInt(zoomParam));//设定地图的中心点和坐标并将地图显示在地图容器中
68 }
69
70 //地图事件设置函数:
71 function setMapEvent() {
72 map.enableDragging();//启用地图拖拽事件,默认启用(可不写)
73 map.enableScrollWheelZoom();//启用地图滚轮放大缩小
74 map.enableDoubleClickZoom();//启用鼠标双击放大,默认启用(可不写)
75 map.enableKeyboard();//启用键盘上下左右键移动地图
76 }
77
78 //地图控件添加函数:
79 function addMapControl() {
80 //向地图中添加缩放控件
81 var ctrl_nav = new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_LARGE});
82 map.addControl(ctrl_nav);
83 //向地图中添加缩略图控件
84 var ctrl_ove = new BMap.OverviewMapControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 1});
85 map.addControl(ctrl_ove);
86 //向地图中添加比例尺控件
87 var ctrl_sca = new BMap.ScaleControl({anchor: BMAP_ANCHOR_BOTTOM_LEFT});
88 map.addControl(ctrl_sca);
89 }
90
91 function setMapListener() {
92 var editor = parent.editor, containerIframe,
93 iframes = parent.document.getElementsByTagName('iframe');
94 for (var key in iframes) {
95 if (iframes[key].contentWindow == window) {
96 containerIframe = iframes[key];
97 break;
98 }
99 }
100 if (containerIframe) {
101 map.addEventListener('moveend', mapListenerHandler);
102 map.addEventListener('zoomend', mapListenerHandler);
103 marker.addEventListener('dragend', mapListenerHandler);
104 }
105
106 function mapListenerHandler() {
107 var zoom = map.getZoom(),
108 center = map.getCenter(),
109 marker = window.marker.getPoint();
110 containerIframe.src = containerIframe.src.
111 replace(new RegExp('([?#&])center=([^?#&]+)', 'i'), '$1center=' + center.lng + ',' + center.lat).
112 replace(new RegExp('([?#&])markers=([^?#&]+)', 'i'), '$1markers=' + marker.lng + ',' + marker.lat).
113 replace(new RegExp('([?#&])zoom=([^?#&]+)', 'i'), '$1zoom=' + zoom);
114 editor.fireEvent('saveScene');
115 }
116 }
117 </script>
118 </html>
...\ No newline at end of file ...\ No newline at end of file
1 .wrapper{margin: 5px 10px;}
2
3 .searchBar{height:30px;padding:7px 0 3px;text-align:center;}
4 .searchBtn{font-size:13px;height:24px;}
5
6 .resultBar{width:460px;margin:5px auto;border: 1px solid #CCC;border-radius: 5px;box-shadow: 2px 2px 5px #D3D6DA;overflow: hidden;}
7
8 .listPanel{overflow: hidden;}
9 .panelon{display:block;}
10 .paneloff{display:none}
11
12 .page{width:220px;margin:20px auto;overflow: hidden;}
13 .pageon{float:right;width:24px;line-height:24px;height:24px;margin-right: 5px;background: none;border: none;color: #000;font-weight: bold;text-align:center}
14 .pageoff{float:right;width:24px;line-height:24px;height:24px;cursor:pointer;background-color: #fff;
15 border: 1px solid #E7ECF0;color: #2D64B3;margin-right: 5px;text-decoration: none;text-align:center;}
16
17 .m-box{width:460px;}
18 .m-m{float: left;line-height: 20px;height: 20px;}
19 .m-h{height:24px;line-height:24px;padding-left: 46px;background-color:#FAFAFA;border-bottom: 1px solid #DAD8D8;font-weight: bold;font-size: 12px;color: #333;}
20 .m-l{float:left;width:40px; }
21 .m-t{float:left;width:140px;}
22 .m-s{float:left;width:110px;}
23 .m-z{float:left;width:100px;}
24 .m-try-t{float: left;width: 60px;;}
25
26 .m-try{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/try_music.gif') no-repeat ;}
27 .m-trying{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/stop_music.gif') no-repeat ;}
28
29 .loading{width:95px;height:7px;font-size:7px;margin:60px auto;background:url(http://static.tieba.baidu.com/tb/editor/images/loading.gif) no-repeat}
30 .empty{width:300px;height:40px;padding:2px;margin:50px auto;line-height:40px; color:#006699;text-align:center;}
...\ No newline at end of file ...\ No newline at end of file
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="content-type" content="text/html; charset=utf-8">
5 <title>插入音乐</title>
6 <script type="text/javascript" src="../internal.js"></script>
7 <link rel="stylesheet" type="text/css" href="music.css">
8 </head>
9 <body>
10 <div class="wrapper">
11 <div class="searchBar">
12 <input id="J_searchName" type="text"/>
13 <input type="button" class="searchBtn" id="J_searchBtn">
14 </div>
15 <div class="resultBar" id="J_resultBar">
16 <div class="loading" style="display:none"></div>
17 <div class="empty"><var id="lang_input_tips"></var></div>
18 </div>
19 <div id="J_preview"></div>
20 </div>
21 <script type="text/javascript" src="music.js"></script>
22 <script type="text/javascript">
23 var music = new Music;
24 dialog.onok = function () {
25 music.exec();
26 };
27 dialog.oncancel = function () {
28 $G('J_preview').innerHTML = "";
29 };
30 </script>
31 </body>
32 </html>
...\ No newline at end of file ...\ No newline at end of file
1 function Music() {
2 this.init();
3 }
4 (function () {
5 var pages = [],
6 panels = [],
7 selectedItem = null;
8 Music.prototype = {
9 total:70,
10 pageSize:10,
11 dataUrl:"http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.search.common",
12 playerUrl:"http://box.baidu.com/widget/flash/bdspacesong.swf",
13
14 init:function () {
15 var me = this;
16 domUtils.on($G("J_searchName"), "keyup", function (event) {
17 var e = window.event || event;
18 if (e.keyCode == 13) {
19 me.dosearch();
20 }
21 });
22 domUtils.on($G("J_searchBtn"), "click", function () {
23 me.dosearch();
24 });
25 },
26 callback:function (data) {
27 var me = this;
28 me.data = data.song_list;
29 setTimeout(function () {
30 $G('J_resultBar').innerHTML = me._renderTemplate(data.song_list);
31 }, 300);
32 },
33 dosearch:function () {
34 var me = this;
35 selectedItem = null;
36 var key = $G('J_searchName').value;
37 if (utils.trim(key) == "")return false;
38 key = encodeURIComponent(key);
39 me._sent(key);
40 },
41 doselect:function (i) {
42 var me = this;
43 if (typeof i == 'object') {
44 selectedItem = i;
45 } else if (typeof i == 'number') {
46 selectedItem = me.data[i];
47 }
48 },
49 onpageclick:function (id) {
50 var me = this;
51 for (var i = 0; i < pages.length; i++) {
52 $G(pages[i]).className = 'pageoff';
53 $G(panels[i]).className = 'paneloff';
54 }
55 $G('page' + id).className = 'pageon';
56 $G('panel' + id).className = 'panelon';
57 },
58 listenTest:function (elem) {
59 var me = this,
60 view = $G('J_preview'),
61 is_play_action = (elem.className == 'm-try'),
62 old_trying = me._getTryingElem();
63
64 if (old_trying) {
65 old_trying.className = 'm-try';
66 view.innerHTML = '';
67 }
68 if (is_play_action) {
69 elem.className = 'm-trying';
70 view.innerHTML = me._buildMusicHtml(me._getUrl(true));
71 }
72 },
73 _sent:function (param) {
74 var me = this;
75 $G('J_resultBar').innerHTML = '<div class="loading"></div>';
76
77 utils.loadFile(document, {
78 src:me.dataUrl + '&query=' + param + '&page_size=' + me.total + '&callback=music.callback&.r=' + Math.random(),
79 tag:"script",
80 type:"text/javascript",
81 defer:"defer"
82 });
83 },
84 _removeHtml:function (str) {
85 var reg = /<\s*\/?\s*[^>]*\s*>/gi;
86 return str.replace(reg, "");
87 },
88 _getUrl:function (isTryListen) {
89 var me = this;
90 var param = 'from=tiebasongwidget&url=&name=' + encodeURIComponent(me._removeHtml(selectedItem.title)) + '&artist='
91 + encodeURIComponent(me._removeHtml(selectedItem.author)) + '&extra='
92 + encodeURIComponent(me._removeHtml(selectedItem.album_title))
93 + '&autoPlay='+isTryListen+'' + '&loop=true';
94 return me.playerUrl + "?" + param;
95 },
96 _getTryingElem:function () {
97 var s = $G('J_listPanel').getElementsByTagName('span');
98
99 for (var i = 0; i < s.length; i++) {
100 if (s[i].className == 'm-trying')
101 return s[i];
102 }
103 return null;
104 },
105 _buildMusicHtml:function (playerUrl) {
106 var html = '<embed class="BDE_try_Music" allowfullscreen="false" pluginspage="http://www.macromedia.com/go/getflashplayer"';
107 html += ' src="' + playerUrl + '"';
108 html += ' width="1" height="1" style="position:absolute;left:-2000px;"';
109 html += ' type="application/x-shockwave-flash" wmode="transparent" play="true" loop="false"';
110 html += ' menu="false" allowscriptaccess="never" scale="noborder">';
111 return html;
112 },
113 _byteLength:function (str) {
114 return str.replace(/[^\u0000-\u007f]/g, "\u0061\u0061").length;
115 },
116 _getMaxText:function (s) {
117 var me = this;
118 s = me._removeHtml(s);
119 if (me._byteLength(s) > 12)
120 return s.substring(0, 5) + '...';
121 if (!s) s = "&nbsp;";
122 return s;
123 },
124 _rebuildData:function (data) {
125 var me = this,
126 newData = [],
127 d = me.pageSize,
128 itembox;
129 for (var i = 0; i < data.length; i++) {
130 if ((i + d) % d == 0) {
131 itembox = [];
132 newData.push(itembox)
133 }
134 itembox.push(data[i]);
135 }
136 return newData;
137 },
138 _renderTemplate:function (data) {
139 var me = this;
140 if (data.length == 0)return '<div class="empty">' + lang.emptyTxt + '</div>';
141 data = me._rebuildData(data);
142 var s = [], p = [], t = [];
143 s.push('<div id="J_listPanel" class="listPanel">');
144 p.push('<div class="page">');
145 for (var i = 0, tmpList; tmpList = data[i++];) {
146 panels.push('panel' + i);
147 pages.push('page' + i);
148 if (i == 1) {
149 s.push('<div id="panel' + i + '" class="panelon">');
150 if (data.length != 1) {
151 t.push('<div id="page' + i + '" onclick="music.onpageclick(' + i + ')" class="pageon">' + (i ) + '</div>');
152 }
153 } else {
154 s.push('<div id="panel' + i + '" class="paneloff">');
155 t.push('<div id="page' + i + '" onclick="music.onpageclick(' + i + ')" class="pageoff">' + (i ) + '</div>');
156 }
157 s.push('<div class="m-box">');
158 s.push('<div class="m-h"><span class="m-t">' + lang.chapter + '</span><span class="m-s">' + lang.singer
159 + '</span><span class="m-z">' + lang.special + '</span><span class="m-try-t">' + lang.listenTest + '</span></div>');
160 for (var j = 0, tmpObj; tmpObj = tmpList[j++];) {
161 s.push('<label for="radio-' + i + '-' + j + '" class="m-m">');
162 s.push('<input type="radio" id="radio-' + i + '-' + j + '" name="musicId" class="m-l" onclick="music.doselect(' + (me.pageSize * (i-1) + (j-1)) + ')"/>');
163 s.push('<span class="m-t">' + me._getMaxText(tmpObj.title) + '</span>');
164 s.push('<span class="m-s">' + me._getMaxText(tmpObj.author) + '</span>');
165 s.push('<span class="m-z">' + me._getMaxText(tmpObj.album_title) + '</span>');
166 s.push('<span class="m-try" onclick="music.doselect(' + (me.pageSize * (i-1) + (j-1)) + ');music.listenTest(this)"></span>');
167 s.push('</label>');
168 }
169 s.push('</div>');
170 s.push('</div>');
171 }
172 t.reverse();
173 p.push(t.join(''));
174 s.push('</div>');
175 p.push('</div>');
176 return s.join('') + p.join('');
177 },
178 exec:function () {
179 var me = this;
180 if (selectedItem == null) return;
181 $G('J_preview').innerHTML = "";
182 editor.execCommand('music', {
183 url:me._getUrl(false),
184 width:400,
185 height:95
186 });
187 }
188 };
189 })();
190
191
192
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6 <style>
7 html,body{
8 height:100%;
9 width:100%;
10 padding:0;
11 margin:0;
12 }
13 #preview{
14 width:100%;
15 height:100%;
16 padding:0;
17 margin:0;
18 }
19 #preview *{font-family:sans-serif;font-size:16px;}
20 </style>
21 <script type="text/javascript" src="../internal.js"></script>
22 <script src="../../ueditor.parse.js"></script>
23 <title></title>
24 </head>
25 <body class="view">
26 <div id="preview" style="margin:8px">
27
28 </div>
29 </body>
30 <script>
31 document.getElementById('preview').innerHTML = editor.getContent();
32 uParse('#preview',{
33 rootPath : '../../',
34 chartContainerHeight:500
35 })
36 dialog.oncancel = function(){
37 document.getElementById('preview').innerHTML = '';
38 }
39 </script>
40 </html>
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This file is too large to display.
No preview for this file type
This diff is collapsed. Click to expand it.
No preview for this file type
This file is too large to display.
No preview for this file type
This file is too large to display.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!