Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
solo
Commits
89452f26
Commit
89452f26
authored
Aug 29, 2012
by
Vanessa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TinyMCE 跨域临时解决方案,admin js 加载顺序跳转
parent
06a68bb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
war/src/main/webapp/admin-index.ftl
war/src/main/webapp/admin-index.ftl
+9
-9
war/src/main/webapp/skins/ease/js/ease.min.js
war/src/main/webapp/skins/ease/js/ease.min.js
+2
-2
No files found.
war/src/main/webapp/admin-index.ftl
View file @
89452f26
...
...
@@ -10,15 +10,6 @@
<link
type=
"text/css"
rel=
"stylesheet"
href=
"${staticServePath}/js/lib/CodeMirror/codemirror.css?${staticResourceVersion}"
/>
</
#
if>
<link
rel=
"icon"
type=
"image/png"
href=
"${staticServePath}/favicon.png"
/>
<script
src=
"${staticServePath}/js/lib/jquery/jquery.min.js"
></script>
<script
src=
"${staticServePath}/js/lib/jquery/jquery.bowknot.min.js?${staticResourceVersion}"
></script>
<
#if
"
tinyMCE
"
==
editorType
>
<script
src=
"${staticServePath}/js/lib/tiny_mce/tiny_mce.js"
></script>
<
#elseif
"
KindEditor
"
==
editorType
>
<script
src=
"${staticServePath}/js/lib/KindEditor/kindeditor-min.js"
></script>
<
#else
>
<script
src=
"${staticServePath}/js/lib/CodeMirror/codemirror.js"
></script>
</
#
if>
</head>
<body
onhashchange=
"admin.setCurByHash();"
>
<div
class=
"tip"
><span
id=
"loadMsg"
>
${loadingLabel}
</span></div>
...
...
@@ -143,6 +134,15 @@
<span
style=
"color: orangered; font-weight: bold;"
>
Solo
</span></a>
, ver ${version}
</div>
</div>
<script
src=
"${staticServePath}/js/lib/jquery/jquery.min.js"
></script>
<script
src=
"${staticServePath}/js/lib/jquery/jquery.bowknot.min.js?${staticResourceVersion}"
></script>
<
#if
"
tinyMCE
"
==
editorType
>
<script
src=
"${servePath}/js/lib/tiny_mce/tiny_mce.js"
></script>
<
#elseif
"
KindEditor
"
==
editorType
>
<script
src=
"${staticServePath}/js/lib/KindEditor/kindeditor-min.js"
></script>
<
#else
>
<script
src=
"${staticServePath}/js/lib/CodeMirror/codemirror.js"
></script>
</
#
if>
<script
src=
"${staticServePath}/js/common${miniPostfix}.js"
></script>
<
#if
""
==
miniPostfix
>
<script
src=
"${staticServePath}/js/admin/admin.js"
></script>
...
...
war/src/main/webapp/skins/ease/js/ease.min.js
View file @
89452f26
...
...
@@ -16,5 +16,5 @@
* @fileoverview ease js.
*
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.1.3, Aug 6, 2012
*/
var
goTranslate
=
function
(){
window
.
open
(
"
http://translate.google.com/translate?sl=auto&tl=auto&u=
"
+
location
.
href
)},
getNextPage
=
function
(){
var
e
=
$
(
"
.article-next
"
);
currentPage
+=
1
;
var
t
=
"
/articles/
"
;
if
(
location
.
pathname
.
indexOf
(
"
tags
"
)
>-
1
){
var
n
=
location
.
pathname
.
split
(
"
/tags/
"
),
r
=
n
[
1
].
split
(
"
/
"
);
t
=
"
/articles/tags/
"
+
r
[
0
]
+
"
/
"
}
else
if
(
location
.
pathname
.
indexOf
(
"
archives
"
)
>-
1
){
var
i
=
location
.
pathname
.
split
(
"
/archives/
"
),
s
=
i
[
1
].
split
(
"
/
"
);
t
=
"
/articles/archives/
"
+
s
[
0
]
+
"
/
"
+
s
[
1
]
+
"
/
"
}
$
.
ajax
({
url
:
latkeConfig
.
staticServePath
+
t
+
currentPage
,
type
:
"
GET
"
,
beforeSend
:
function
(){
e
.
css
(
"
background
"
,
"
url(
"
+
latkeConfig
.
staticServePath
+
"
/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe
"
)},
success
:
function
(
t
,
n
){
if
(
!
t
.
sc
)
return
;
var
r
=
""
,
i
=
t
.
rslts
.
pagination
;
for
(
var
s
=
0
;
s
<
t
.
rslts
.
articles
.
length
;
s
++
){
var
o
=
t
.
rslts
.
articles
[
s
],
u
=
""
;
t
.
rslts
.
articles
.
length
-
1
===
s
&&
(
u
=
"
article-last
"
),
r
+=
'
<li class="article
'
+
u
+
'
">
'
+
'
<div class="article-title">
'
+
"
<h2>
"
+
'
<a rel="bookmark" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
o
.
articlePermalink
+
'
">
'
+
o
.
articleTitle
+
"
</a>
"
,
o
.
hasUpdated
&&
(
r
+=
"
<sup>
"
+
Label
.
updatedLabel
+
"
</sup>
"
),
o
.
articlePutTop
&&
(
r
+=
"
<sup>
"
+
Label
.
topArticleLabel
+
"
</sup>
"
),
r
+=
'
</h2><div class="right"><a rel="nofollow" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
o
.
articlePermalink
+
'
#comments">
'
+
+
o
.
articleCommentCount
+
"
"
+
Label
.
commentLabel
+
"
</a>
"
+
'
<a rel="nofollow" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
o
.
articlePermalink
+
'
">
'
+
o
.
articleViewCount
+
"
"
+
Label
.
viewLabel
+
"
</a>
"
+
"
</div>
"
+
'
<div class="clear"></div>
'
+
"
</div>
"
+
'
<div class="article-body">
'
+
'
<div id="abstract
'
+
o
.
oId
+
'
">
'
+
o
.
articleAbstract
+
"
</div>
"
+
'
<div id="content
'
+
o
.
oId
+
'
" class="none"></div>
'
+
"
</div>
"
+
'
<div class="right ft-gray">
'
,
o
.
hasUpdated
?
r
+=
Util
.
toDate
(
o
.
articleUpdateDate
,
"
yy-MM-dd HH:mm
"
):
r
+=
Util
.
toDate
(
o
.
articleCreateDate
,
"
yy-MM-dd HH:mm
"
),
r
+=
'
<a href="
'
+
latkeConfig
.
servePath
+
"
/authors/
"
+
o
.
authorId
+
'
">
'
+
o
.
authorName
+
"
</a>
"
+
"
</div>
"
+
'
<div class="left ft-gray">
'
+
Label
.
tag1Label
+
"
"
;
var
a
=
o
.
articleTags
.
split
(
"
,
"
);
for
(
var
f
=
0
;
f
<
a
.
length
;
f
++
)
r
+=
'
<a rel="tag" href="
'
+
latkeConfig
.
servePath
+
"
/tags/
"
+
encodeURIComponent
(
a
[
f
])
+
'
">
'
+
a
[
f
]
+
"
</a>
"
,
f
<
a
.
length
-
1
&&
(
r
+=
"
,
"
);
r
+=
'
</div><div class="clear"></div></li>
'
}
$
(
"
.article-last
"
).
removeClass
(
"
article-last
"
),
$
(
"
.main>.wrapper>ul
"
).
append
(
r
),
i
.
paginationPageCount
===
currentPage
?
e
.
remove
():
e
.
css
(
"
background
"
,
"
none
"
)}})},
ease
=
{
$header
:
$
(
"
.header
"
),
headerH
:
103
,
$body
:
$
(
"
.main > .wrapper
"
),
$nav
:
$
(
"
.nav
"
),
getCurrentPage
:
function
(){
var
e
=
$
(
"
.article-next
"
);
e
.
length
>
0
&&
(
window
.
currentPage
=
e
.
data
(
"
page
"
))},
setNavCurrent
:
function
(){
$
(
"
.nav ul a
"
).
each
(
function
(){
var
e
=
$
(
this
);
e
.
attr
(
"
href
"
)
===
latkeConfig
.
servePath
+
location
.
pathname
?
e
.
addClass
(
"
current
"
):
/
\/[
0-9
]
+$/
.
test
(
location
.
pathname
)
&&
(
$
(
"
.nav ul li
"
)[
0
].
className
=
"
current
"
)})},
initCommon
:
function
(){
Util
.
init
(),
Util
.
replaceSideEm
(
$
(
"
.recent-comments-content
"
)),
Util
.
buildTags
(
"
tagsSide
"
)},
initArchives
:
function
(){
var
e
=
$
(
"
.archives
"
);
if
(
e
.
length
<
1
)
return
;
$
(
"
.footer
"
).
css
(
"
marginTop
"
,
"
30px
"
);
var
t
=
[],
n
=
e
.
find
(
"
span
"
).
each
(
function
(){
var
e
=
$
(
this
).
data
(
"
year
"
),
n
=!
0
;
for
(
var
r
=
0
;
r
<
t
.
length
;
r
++
)
if
(
e
===
t
[
r
]){
n
=!
1
;
break
}
n
&&
t
.
push
(
e
)}),
r
=
""
;
for
(
var
i
=
0
;
i
<
t
.
length
;
i
++
){
var
s
=
""
;
for
(
var
o
=
0
;
o
<
n
.
length
;
o
++
){
var
u
=
$
(
n
[
o
]);
u
.
data
(
"
year
"
)
===
t
[
i
]
&&
(
s
+=
u
.
html
())}
r
+=
"
<div><h3 class='ft-gray'>
"
+
t
[
i
]
+
"
</h3>
"
+
s
+
"
</div>
"
}
e
.
html
(
r
);
var
a
=
$
(
"
.archives>div
"
),
f
=
0
,
l
=
0
,
c
=
[];
for
(
var
h
=
0
;
h
<
a
.
length
;
h
++
){
for
(
var
p
=
0
;
p
<
3
;
p
++
){
if
(
h
>=
a
.
length
)
break
;
a
[
h
].
style
.
left
=
p
*
310
+
"
px
"
,
f
>
0
?(
a
[
h
-
3
].
style
.
top
!==
""
&&
(
l
=
parseInt
(
a
[
h
-
3
].
style
.
top
)),
a
[
h
].
style
.
top
=
$
(
a
[
h
-
3
]).
height
()
+
60
+
l
+
"
px
"
,
c
[
p
]
=
parseInt
(
a
[
h
].
style
.
top
)
+
$
(
a
[
h
]).
height
()
+
60
):
c
[
p
]
=
$
(
a
[
h
]).
height
()
+
60
,
p
<
2
&&
(
h
+=
1
)}
f
+=
1
}
e
.
height
(
c
.
sort
()[
c
.
length
-
1
])},
scrollEvent
:
function
(){
var
e
=
this
;
$
(
window
).
scroll
(
function
(){
var
t
=
$
(
window
).
scrollTop
(),
n
=
0
;
$
(
"
#top
"
).
css
(
"
display
"
)
===
"
block
"
&&
(
n
=
$
(
"
#top
"
).
height
()),
t
>=
e
.
headerH
+
n
?(
e
.
$nav
.
css
(
"
position
"
,
"
fixed
"
),
e
.
$body
.
css
(
"
marginTop
"
,
"
55px
"
)):(
e
.
$nav
.
css
(
"
position
"
,
"
inherit
"
),
e
.
$body
.
css
(
"
marginTop
"
,
"
0
"
));
if
(
t
>
e
.
headerH
){
var
r
=
$
(
window
).
height
(),
i
=
t
+
r
-
21
;
$
(
"
body
"
).
height
()
-
58
<=
t
+
r
&&
(
i
=
$
(
"
.footer
"
).
offset
().
top
-
21
),
$
(
"
#goTop
"
).
fadeIn
(
"
slow
"
).
css
(
"
top
"
,
i
)}
else
$
(
"
#goTop
"
).
hide
()})},
setDynamic
:
function
(){
var
e
=
$
(
"
.dynamic
"
);
if
(
$
(
"
.dynamic
"
).
length
<
1
)
return
;
var
t
=
e
.
find
(
"
.side-comments
"
),
n
=
e
.
find
(
"
.side-tags
"
),
r
=
e
.
find
(
"
.side-most-comment
"
),
i
=
e
.
find
(
"
.side-most-view
"
);
t
.
height
()
>
n
.
height
()?
n
.
height
(
t
.
height
()):
t
.
height
(
n
.
height
()),
r
.
height
()
>
i
.
height
()?
i
.
height
(
r
.
height
()):
r
.
height
(
i
.
height
()),
$
(
"
.article-body
"
).
each
(
function
(){
this
.
innerHTML
=
Util
.
replaceEmString
(
$
(
this
).
html
())})}};(
function
(){
ease
.
getCurrentPage
(),
ease
.
initCommon
(),
ease
.
scrollEvent
(),
ease
.
setNavCurrent
(),
ease
.
initArchives
(),
ease
.
setDynamic
()})();
\ No newline at end of file
* @version 1.0.1.4, Aug 29, 2012
*/
var
goTranslate
=
function
(){
window
.
open
(
"
http://translate.google.com/translate?sl=auto&tl=auto&u=
"
+
location
.
href
)},
getNextPage
=
function
(){
var
e
=
$
(
"
.article-next
"
);
currentPage
+=
1
;
var
t
=
"
/articles/
"
;
if
(
location
.
pathname
.
indexOf
(
"
tags
"
)
>-
1
){
var
n
=
location
.
pathname
.
split
(
"
/tags/
"
),
r
=
n
[
1
].
split
(
"
/
"
);
t
=
"
/articles/tags/
"
+
r
[
0
]
+
"
/
"
}
else
if
(
location
.
pathname
.
indexOf
(
"
archives
"
)
>-
1
){
var
i
=
location
.
pathname
.
split
(
"
/archives/
"
),
s
=
i
[
1
].
split
(
"
/
"
);
t
=
"
/articles/archives/
"
+
s
[
0
]
+
"
/
"
+
s
[
1
]
+
"
/
"
}
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
t
+
currentPage
,
type
:
"
GET
"
,
beforeSend
:
function
(){
e
.
css
(
"
background
"
,
"
url(
"
+
latkeConfig
.
staticServePath
+
"
/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe
"
)},
success
:
function
(
t
,
n
){
if
(
!
t
.
sc
)
return
;
var
r
=
""
,
i
=
t
.
rslts
.
pagination
;
for
(
var
s
=
0
;
s
<
t
.
rslts
.
articles
.
length
;
s
++
){
var
o
=
t
.
rslts
.
articles
[
s
],
u
=
""
;
t
.
rslts
.
articles
.
length
-
1
===
s
&&
(
u
=
"
article-last
"
),
r
+=
'
<li class="article
'
+
u
+
'
">
'
+
'
<div class="article-title">
'
+
"
<h2>
"
+
'
<a rel="bookmark" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
o
.
articlePermalink
+
'
">
'
+
o
.
articleTitle
+
"
</a>
"
,
o
.
hasUpdated
&&
(
r
+=
"
<sup>
"
+
Label
.
updatedLabel
+
"
</sup>
"
),
o
.
articlePutTop
&&
(
r
+=
"
<sup>
"
+
Label
.
topArticleLabel
+
"
</sup>
"
),
r
+=
'
</h2><div class="right"><a rel="nofollow" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
o
.
articlePermalink
+
'
#comments">
'
+
+
o
.
articleCommentCount
+
"
"
+
Label
.
commentLabel
+
"
</a>
"
+
'
<a rel="nofollow" class="ft-gray" href="
'
+
latkeConfig
.
servePath
+
o
.
articlePermalink
+
'
">
'
+
o
.
articleViewCount
+
"
"
+
Label
.
viewLabel
+
"
</a>
"
+
"
</div>
"
+
'
<div class="clear"></div>
'
+
"
</div>
"
+
'
<div class="article-body">
'
+
'
<div id="abstract
'
+
o
.
oId
+
'
">
'
+
o
.
articleAbstract
+
"
</div>
"
+
'
<div id="content
'
+
o
.
oId
+
'
" class="none"></div>
'
+
"
</div>
"
+
'
<div class="right ft-gray">
'
,
o
.
hasUpdated
?
r
+=
Util
.
toDate
(
o
.
articleUpdateDate
,
"
yy-MM-dd HH:mm
"
):
r
+=
Util
.
toDate
(
o
.
articleCreateDate
,
"
yy-MM-dd HH:mm
"
),
r
+=
'
<a href="
'
+
latkeConfig
.
servePath
+
"
/authors/
"
+
o
.
authorId
+
'
">
'
+
o
.
authorName
+
"
</a>
"
+
"
</div>
"
+
'
<div class="left ft-gray">
'
+
Label
.
tag1Label
+
"
"
;
var
a
=
o
.
articleTags
.
split
(
"
,
"
);
for
(
var
f
=
0
;
f
<
a
.
length
;
f
++
)
r
+=
'
<a rel="tag" href="
'
+
latkeConfig
.
servePath
+
"
/tags/
"
+
encodeURIComponent
(
a
[
f
])
+
'
">
'
+
a
[
f
]
+
"
</a>
"
,
f
<
a
.
length
-
1
&&
(
r
+=
"
,
"
);
r
+=
'
</div><div class="clear"></div></li>
'
}
$
(
"
.article-last
"
).
removeClass
(
"
article-last
"
),
$
(
"
.main>.wrapper>ul
"
).
append
(
r
),
i
.
paginationPageCount
===
currentPage
?
e
.
remove
():
e
.
css
(
"
background
"
,
"
none
"
)}})},
ease
=
{
$header
:
$
(
"
.header
"
),
headerH
:
103
,
$body
:
$
(
"
.main > .wrapper
"
),
$nav
:
$
(
"
.nav
"
),
getCurrentPage
:
function
(){
var
e
=
$
(
"
.article-next
"
);
e
.
length
>
0
&&
(
window
.
currentPage
=
e
.
data
(
"
page
"
))},
setNavCurrent
:
function
(){
$
(
"
.nav ul a
"
).
each
(
function
(){
var
e
=
$
(
this
);
e
.
attr
(
"
href
"
)
===
latkeConfig
.
servePath
+
location
.
pathname
?
e
.
addClass
(
"
current
"
):
/
\/[
0-9
]
+$/
.
test
(
location
.
pathname
)
&&
(
$
(
"
.nav ul li
"
)[
0
].
className
=
"
current
"
)})},
initCommon
:
function
(){
Util
.
init
(),
Util
.
replaceSideEm
(
$
(
"
.recent-comments-content
"
)),
Util
.
buildTags
(
"
tagsSide
"
)},
initArchives
:
function
(){
var
e
=
$
(
"
.archives
"
);
if
(
e
.
length
<
1
)
return
;
$
(
"
.footer
"
).
css
(
"
marginTop
"
,
"
30px
"
);
var
t
=
[],
n
=
e
.
find
(
"
span
"
).
each
(
function
(){
var
e
=
$
(
this
).
data
(
"
year
"
),
n
=!
0
;
for
(
var
r
=
0
;
r
<
t
.
length
;
r
++
)
if
(
e
===
t
[
r
]){
n
=!
1
;
break
}
n
&&
t
.
push
(
e
)}),
r
=
""
;
for
(
var
i
=
0
;
i
<
t
.
length
;
i
++
){
var
s
=
""
;
for
(
var
o
=
0
;
o
<
n
.
length
;
o
++
){
var
u
=
$
(
n
[
o
]);
u
.
data
(
"
year
"
)
===
t
[
i
]
&&
(
s
+=
u
.
html
())}
r
+=
"
<div><h3 class='ft-gray'>
"
+
t
[
i
]
+
"
</h3>
"
+
s
+
"
</div>
"
}
e
.
html
(
r
);
var
a
=
$
(
"
.archives>div
"
),
f
=
0
,
l
=
0
,
c
=
[];
for
(
var
h
=
0
;
h
<
a
.
length
;
h
++
){
for
(
var
p
=
0
;
p
<
3
;
p
++
){
if
(
h
>=
a
.
length
)
break
;
a
[
h
].
style
.
left
=
p
*
310
+
"
px
"
,
f
>
0
?(
a
[
h
-
3
].
style
.
top
!==
""
&&
(
l
=
parseInt
(
a
[
h
-
3
].
style
.
top
)),
a
[
h
].
style
.
top
=
$
(
a
[
h
-
3
]).
height
()
+
60
+
l
+
"
px
"
,
c
[
p
]
=
parseInt
(
a
[
h
].
style
.
top
)
+
$
(
a
[
h
]).
height
()
+
60
):
c
[
p
]
=
$
(
a
[
h
]).
height
()
+
60
,
p
<
2
&&
(
h
+=
1
)}
f
+=
1
}
e
.
height
(
c
.
sort
()[
c
.
length
-
1
])},
scrollEvent
:
function
(){
var
e
=
this
;
$
(
window
).
scroll
(
function
(){
var
t
=
$
(
window
).
scrollTop
(),
n
=
0
;
$
(
"
#top
"
).
css
(
"
display
"
)
===
"
block
"
&&
(
n
=
$
(
"
#top
"
).
height
()),
t
>=
e
.
headerH
+
n
?(
e
.
$nav
.
css
(
"
position
"
,
"
fixed
"
),
e
.
$body
.
css
(
"
marginTop
"
,
"
55px
"
)):(
e
.
$nav
.
css
(
"
position
"
,
"
inherit
"
),
e
.
$body
.
css
(
"
marginTop
"
,
"
0
"
));
if
(
t
>
e
.
headerH
){
var
r
=
$
(
window
).
height
(),
i
=
t
+
r
-
21
;
$
(
"
body
"
).
height
()
-
58
<=
t
+
r
&&
(
i
=
$
(
"
.footer
"
).
offset
().
top
-
21
),
$
(
"
#goTop
"
).
fadeIn
(
"
slow
"
).
css
(
"
top
"
,
i
)}
else
$
(
"
#goTop
"
).
hide
()})},
setDynamic
:
function
(){
var
e
=
$
(
"
.dynamic
"
);
if
(
$
(
"
.dynamic
"
).
length
<
1
)
return
;
var
t
=
e
.
find
(
"
.side-comments
"
),
n
=
e
.
find
(
"
.side-tags
"
),
r
=
e
.
find
(
"
.side-most-comment
"
),
i
=
e
.
find
(
"
.side-most-view
"
);
t
.
height
()
>
n
.
height
()?
n
.
height
(
t
.
height
()):
t
.
height
(
n
.
height
()),
r
.
height
()
>
i
.
height
()?
i
.
height
(
r
.
height
()):
r
.
height
(
i
.
height
()),
$
(
"
.article-body
"
).
each
(
function
(){
this
.
innerHTML
=
Util
.
replaceEmString
(
$
(
this
).
html
())})}};(
function
(){
ease
.
getCurrentPage
(),
ease
.
initCommon
(),
ease
.
scrollEvent
(),
ease
.
setNavCurrent
(),
ease
.
initArchives
(),
ease
.
setDynamic
()})();
\ 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