Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhgh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhou Yang
zhgh
Commits
149cb38d
Commit
149cb38d
authored
Feb 19, 2019
by
Zhou Yang
🍋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
富文本编辑器换成了simditor
parent
42192484
Pipeline
#31
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
14 deletions
+39
-14
organization.html
...uts-web/src/main/webapp/WEB-INF/page/jk/organization.html
+8
-9
organization.js
beansprouts-web/src/main/webapp/js/jk/organization.js
+31
-5
No files found.
beansprouts-web/src/main/webapp/WEB-INF/page/jk/organization.html
View file @
149cb38d
...
@@ -8,12 +8,11 @@
...
@@ -8,12 +8,11 @@
<link
href=
"${rc.contextPath}/js/jk/bootstrap-datetimepicker.min.css"
type=
"text/css"
rel=
"stylesheet"
>
<link
href=
"${rc.contextPath}/js/jk/bootstrap-datetimepicker.min.css"
type=
"text/css"
rel=
"stylesheet"
>
<link
href=
"${rc.contextPath}/css/dropzone.css"
type=
"text/css"
rel=
"stylesheet"
>
<link
href=
"${rc.contextPath}/css/dropzone.css"
type=
"text/css"
rel=
"stylesheet"
>
<
!--<
link rel="stylesheet" type="text/css" href="${rc.contextPath}/simditor-2.3.23/site/assets/styles/simditor.css" />
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${rc.contextPath}/simditor-2.3.23/site/assets/styles/simditor.css"
/>
<script
type=
"text/javascript"
src=
"${rc.contextPath}/simditor-2.3.23/site/assets/scripts/module.js"
></script>
<script
type=
"text/javascript"
src=
"${rc.contextPath}/simditor-2.3.23/site/assets/scripts/module.js"
></script>
<script
type=
"text/javascript"
src=
"${rc.contextPath}/simditor-2.3.23/site/assets/scripts/hotkeys.js"
></script>
<script
type=
"text/javascript"
src=
"${rc.contextPath}/simditor-2.3.23/site/assets/scripts/hotkeys.js"
></script>
<script
type=
"text/javascript"
src=
"${rc.contextPath}/simditor-2.3.23/site/assets/scripts/uploader.js"
></script>
<script
type=
"text/javascript"
src=
"${rc.contextPath}/simditor-2.3.23/site/assets/scripts/uploader.js"
></script>
<script
type=
"text/javascript"
src=
"${rc.contextPath}/simditor-2.3.23/site/assets/scripts/simditor.js"
></script>
<script
type=
"text/javascript"
src=
"${rc.contextPath}/simditor-2.3.23/site/assets/scripts/simditor.js"
></script>
-->
<script
type=
"text/javascript"
src=
"${rc.contextPath}/statics/plugins/umeditor/third-party/template.min.js"
></script>
<script
type=
"text/javascript"
src=
"${rc.contextPath}/statics/plugins/umeditor/third-party/template.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${rc.contextPath}/statics/plugins/umeditor/umeditor.config.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${rc.contextPath}/statics/plugins/umeditor/umeditor.config.js"
></script>
...
@@ -108,20 +107,20 @@
...
@@ -108,20 +107,20 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<!--
<div class="form-group">
<div class="col-sm-2 control-label">内容</div>
<div class="col-sm-2 control-label">内容</div>
<div class="col-sm-10">
<div class="col-sm-10">
<script type="text/plain" id="myEditor" style="width: 700px; height: 250px;"></script>
<script type="text/plain" id="myEditor" style="width: 700px; height: 250px;"></script>
</div>
</div>
</div>
</div>
-->
<
!--<
div class="form-group">
<div
class=
"form-group"
>
<div
class=
"col-sm-2 control-label"
>
内容
</div>
<div
class=
"col-sm-2 control-label"
>
内容
</div>
<div
class=
"col-sm-10"
>
<div
class=
"col-sm-10"
>
<div
style=
"width: 700px; "
>
<div
style=
"width: 700px; "
>
<textarea
id=
"editorByFancy"
></textarea>
<textarea
id=
"editorByFancy"
></textarea>
</div>
</div>
</div>
</div>
</div>
-->
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<div
class=
"col-sm-2 control-label"
>
是否轮播
</div>
<div
class=
"col-sm-2 control-label"
>
是否轮播
</div>
...
@@ -167,10 +166,10 @@
...
@@ -167,10 +166,10 @@
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
function
(){
$
(
function
(){
//实例化编辑器
//实例化编辑器
var
um
=
UM
.
getEditor
(
'myEditor'
);
/*
var um = UM.getEditor('myEditor');
um.focus();
um.focus();
um
.
execCommand
(
'forecolor'
,
'#000'
);
um.execCommand('forecolor','#000');
*/
/* var editor,toolba
r;
/* var edito
r;
Simditor.locale = 'zh-CN';
Simditor.locale = 'zh-CN';
editor = new Simditor({
editor = new Simditor({
textarea: $('#editorByFancy'),
textarea: $('#editorByFancy'),
...
...
beansprouts-web/src/main/webapp/js/jk/organization.js
View file @
149cb38d
...
@@ -2,6 +2,7 @@ var id = T.p("id");
...
@@ -2,6 +2,7 @@ var id = T.p("id");
var
photo
;
var
photo
;
var
isUsedPhotoOrFile
=
false
;
var
isUsedPhotoOrFile
=
false
;
var
myname
;
var
myname
;
var
editor
;
$
(
function
()
{
$
(
function
()
{
$
(
"#jqGrid"
).
jqGrid
({
$
(
"#jqGrid"
).
jqGrid
({
url
:
'../jk/jgsubject/list'
,
url
:
'../jk/jgsubject/list'
,
...
@@ -152,6 +153,23 @@ var vm = new Vue({
...
@@ -152,6 +153,23 @@ var vm = new Vue({
}
}
}
}
})
})
Simditor
.
locale
=
'zh-CN'
;
editor
=
new
Simditor
({
textarea
:
$
(
'#editorByFancy'
),
toolbar
:
[
'title'
,
'bold'
,
'italic'
,
'underline'
,
'strikethrough'
,
'fontScale'
,
'color'
,
'|'
,
'ol'
,
'ul'
,
'blockquote'
,
'code'
,
'table'
,
'|'
,
'link'
,
'image'
,
'hr'
,
'|'
,
'indent'
,
'outdent'
,
'alignment'
],
pasteImage
:
true
,
//允许粘贴图片
upload
:
{
url
:
'../sys/oss/ToLeadImg'
,
//文件上传的接口地址
params
:
null
,
//键值对,指定文件上传接口的额外参数,上传的时候随文件一起提交
fileKey
:
'upfile'
,
//服务器端获取文件数据的参数名
connectionCount
:
1
,
leaveConfirm
:
'正在上传文件'
}
//optional options
});
},
},
methods
:
{
methods
:
{
query
:
function
()
{
query
:
function
()
{
...
@@ -167,7 +185,11 @@ var vm = new Vue({
...
@@ -167,7 +185,11 @@ var vm = new Vue({
vm
.
jgSubject
.
flag
=
0
;
vm
.
jgSubject
.
flag
=
0
;
UM
.
getEditor
(
'myEditor'
).
setContent
(
""
,
false
);
//UM.getEditor('myEditor').setContent("",false);
editor
.
setValue
(
''
)
$
(
"#photo"
).
empty
();
$
(
"#photo"
).
empty
();
$
(
"#photo"
).
append
(
"drop files here to upload"
);
$
(
"#photo"
).
append
(
"drop files here to upload"
);
...
@@ -198,8 +220,10 @@ var vm = new Vue({
...
@@ -198,8 +220,10 @@ var vm = new Vue({
vm
.
jgSubject
.
pubDate
=
$
(
"#pubDate"
).
val
();
vm
.
jgSubject
.
pubDate
=
$
(
"#pubDate"
).
val
();
vm
.
jgSubject
.
atta
=
photo
;
vm
.
jgSubject
.
atta
=
photo
;
vm
.
jgSubject
.
file
=
myname
;
vm
.
jgSubject
.
file
=
myname
;
vm
.
jgSubject
.
content
=
UM
.
getEditor
(
'myEditor'
).
getContent
();
//vm.jgSubject.content = UM.getEditor('myEditor').getContent();
var
url
=
vm
.
jgSubject
.
id
==
null
?
"../jk/jgsubject/save"
:
"../jk/jgsubject/update"
;
vm
.
jgSubject
.
content
=
editor
.
getValue
();
var
url
=
vm
.
jgSubject
.
id
==
null
?
"../jk/jgsubject/save"
:
"../jk/jgsubject/update"
;
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
url
,
url
:
url
,
...
@@ -245,7 +269,9 @@ var vm = new Vue({
...
@@ -245,7 +269,9 @@ var vm = new Vue({
getInfo
:
function
(
id
){
getInfo
:
function
(
id
){
$
.
get
(
"../jk/jgsubject/info/"
+
id
,
function
(
r
){
$
.
get
(
"../jk/jgsubject/info/"
+
id
,
function
(
r
){
vm
.
jgSubject
=
r
.
jgSubject
;
vm
.
jgSubject
=
r
.
jgSubject
;
UM
.
getEditor
(
'myEditor'
).
setContent
(
vm
.
jgSubject
.
content
,
false
);
//UM.getEditor('myEditor').setContent(vm.jgSubject.content,false);
editor
.
setValue
(
vm
.
jgSubject
.
content
)
if
(
vm
.
jgSubject
.
atta
!=
null
){
if
(
vm
.
jgSubject
.
atta
!=
null
){
$
(
"#photo"
).
append
(
'<img src="../doc/'
+
vm
.
jgSubject
.
atta
+
'" style="height: 110px;width: 220px;"/>'
);
$
(
"#photo"
).
append
(
'<img src="../doc/'
+
vm
.
jgSubject
.
atta
+
'" style="height: 110px;width: 220px;"/>'
);
}
else
{
}
else
{
...
@@ -286,5 +312,5 @@ var vm = new Vue({
...
@@ -286,5 +312,5 @@ var vm = new Vue({
$
(
function
(){
$
(
function
(){
UM
.
getEditor
(
'myEditor'
)
//
UM.getEditor('myEditor')
})
})
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment