Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
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-1
Commits
f0acf426
Unverified
Commit
f0acf426
authored
Mar 29, 2019
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
#12724
parent
b0490929
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
36 deletions
+44
-36
src/main/webapp/error/401.ftl
src/main/webapp/error/401.ftl
+1
-1
src/main/webapp/error/404.ftl
src/main/webapp/error/404.ftl
+1
-1
src/main/webapp/js/admin/themeList.js
src/main/webapp/js/admin/themeList.js
+42
-34
No files found.
src/main/webapp/error/401.ftl
View file @
f0acf426
...
@@ -23,6 +23,6 @@
...
@@ -23,6 +23,6 @@
<h2>401 Unauthorized!</h2>
<h2>401 Unauthorized!</h2>
<img class="img-error" src="${staticServePath}/images/401.png" alt="401" title="401 Unauthorized!" />
<img class="img-error" src="${staticServePath}/images/401.png" alt="401" title="401 Unauthorized!" />
<div class="a-error">
<div class="a-error">
Please <a href="${loginURL}">
S
tart</a> or return to <a href="${servePath}">Index</a>.
Please <a href="${loginURL}">
s
tart</a> or return to <a href="${servePath}">Index</a>.
</div>
</div>
</@commonPage>
</@commonPage>
src/main/webapp/error/404.ftl
View file @
f0acf426
...
@@ -23,6 +23,6 @@
...
@@ -23,6 +23,6 @@
<h2>404 Not Found!</h2>
<h2>404 Not Found!</h2>
<img class="img-error" src="${staticServePath}/images/404.gif" title="404" alt="404 Not Found!"/>
<img class="img-error" src="${staticServePath}/images/404.gif" title="404" alt="404 Not Found!"/>
<div class="a-error">
<div class="a-error">
Please <a href="${loginURL}">
S
tart</a> or return to <a href="${servePath}">Index</a>.
Please <a href="${loginURL}">
s
tart</a> or return to <a href="${servePath}">Index</a>.
</div>
</div>
</@commonPage>
</@commonPage>
\ No newline at end of file
src/main/webapp/js/admin/themeList.js
View file @
f0acf426
...
@@ -24,12 +24,14 @@
...
@@ -24,12 +24,14 @@
/* theme list 相关操作 */
/* theme list 相关操作 */
admin
.
themeList
=
{
admin
.
themeList
=
{
skinDirName
:
''
,
mobileSkinDirName
:
''
,
/*
/*
* 初始化
* 初始化
*/
*/
init
:
function
()
{
init
:
function
()
{
$
.
ajax
({
$
.
ajax
({
url
:
Label
.
servePath
+
'
/console/
preference/
'
,
url
:
Label
.
servePath
+
'
/console/
skin
'
,
type
:
'
GET
'
,
type
:
'
GET
'
,
cache
:
false
,
cache
:
false
,
success
:
function
(
result
,
textStatus
)
{
success
:
function
(
result
,
textStatus
)
{
...
@@ -39,40 +41,47 @@ admin.themeList = {
...
@@ -39,40 +41,47 @@ admin.themeList = {
return
return
}
}
var
preference
=
result
.
preference
admin
.
themeList
.
skinDirName
=
result
.
skin
.
skinDirName
admin
.
themeList
.
mobileSkinDirName
=
result
.
skin
.
mobileSkinDirName
// skin
var
skins
=
JSON
.
parse
(
result
.
skin
.
skins
)
var
skins
=
eval
(
'
(
'
+
preference
.
skins
+
'
)
'
)
var
skinsHTML
=
''
var
skinsHTML
=
''
for
(
var
i
=
0
;
i
<
skins
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
skins
.
length
;
i
++
)
{
var
selectedClass
=
''
var
selectedClass
=
''
if
(
skins
[
i
].
skinName
===
preference
.
skinName
if
(
skins
[
i
].
skinDirName
===
result
.
skin
.
skinDirName
)
{
&&
skins
[
i
].
skinDirName
===
preference
.
skinDirName
)
{
selectedClass
=
'
selected
'
selectedClass
+=
'
selected
'
}
}
skinsHTML
+=
'
<div class="fn__left skinItem
'
+
selectedClass
+
skinsHTML
+=
'
<div class="fn__left skinItem
'
+
selectedClass
+
'
"><div class="ft__center">
'
+
'
"><div class="ft__center">
'
+
skins
[
i
].
skinDirName
skins
[
i
].
skinName
+
'
</div><img class="skinPreview" src="
'
+
'
</div><img class="skinPreview" src="
'
+
Label
.
staticServePath
+
'
/skins/
'
+
skins
[
i
].
skinDirName
+
Label
.
staticServePath
+
'
/skins/
'
+
skins
[
i
].
skinDirName
+
'
/preview.png"/><div><button class="small update fn__left" data-name="
'
+
+
'
/preview.png"/><div>
'
skins
[
i
].
skinDirName
+
'
">
'
+
Label
.
enableLabel
+
'
</button><button class="small fn__right" onclick="window.open(
\'
'
+
if
(
skins
[
i
].
skinDirName
!==
result
.
skin
.
skinDirName
)
{
Label
.
servePath
+
'
?skin=
'
+
skins
[
i
].
skinName
+
'
\'
)">
'
skinsHTML
+=
'
<button class="small update fn__left" data-name="
'
+
+
Label
.
previewLabel
+
'
</button><button class="small mobile fn__left">
'
+
skins
[
i
].
skinDirName
+
'
">
'
+
Label
.
enableLabel
+
Label
.
setMobileLabel
+
'
</button></div></div>
'
'
</button>
'
}
if
(
skins
[
i
].
skinDirName
!==
result
.
skin
.
mobileSkinDirName
)
{
skinsHTML
+=
'
<button class="small mobile fn__left" data-name="
'
+
skins
[
i
].
skinDirName
+
'
">
'
+
Label
.
setMobileLabel
+
'
</button>
'
}
skinsHTML
+=
'
<button class="small fn__right" onclick="window.open(
\'
'
+
Label
.
servePath
+
'
?skin=
'
+
skins
[
i
].
skinDirName
+
'
\'
)">
'
+
Label
.
previewLabel
+
'
</button></div></div>
'
}
}
$
(
'
#skinMain
'
).
append
(
skinsHTML
+
'
<div class=
\'
fn__clear
\'
></div>
'
)
$
(
'
#skinMain
'
).
append
(
skinsHTML
+
'
<div class=
\'
fn__clear
\'
></div>
'
)
$
(
'
.skinItem .update
'
).
click
(
function
()
{
$
(
'
.skinItem .update
'
).
click
(
function
()
{
$
(
'
.skinItem
'
).
removeClass
(
'
selected
'
)
admin
.
preference
.
update
(
$
(
this
).
data
(
'
name
'
),
'
pc
'
)
$
(
this
).
closest
(
'
.skinItem
'
).
addClass
(
'
selected
'
)
admin
.
preference
.
update
()
})
})
$
(
'
.skinItem .mobile
'
).
click
(
function
()
{
$
(
'
.skinItem .mobile
'
).
click
(
function
()
{
$
(
'
.skinItem
'
).
removeClass
(
'
selected
'
)
admin
.
preference
.
update
(
$
(
this
).
data
(
'
name
'
),
'
mobile
'
)
$
(
this
).
closest
(
'
.skinItem
'
).
addClass
(
'
selected
'
)
admin
.
preference
.
update
()
})
})
$
(
'
#loadMsg
'
).
text
(
''
)
$
(
'
#loadMsg
'
).
text
(
''
)
...
@@ -82,22 +91,25 @@ admin.themeList = {
...
@@ -82,22 +91,25 @@ admin.themeList = {
/*
/*
* @description 更新
* @description 更新
*/
*/
update
:
function
()
{
update
:
function
(
skinDirName
,
type
)
{
if
(
!
admin
.
preference
.
validate
())
{
return
}
$
(
'
#tipMsg
'
).
text
(
''
)
$
(
'
#tipMsg
'
).
text
(
''
)
$
(
'
#loadMsg
'
).
text
(
Label
.
loadingLabel
)
$
(
'
#loadMsg
'
).
text
(
Label
.
loadingLabel
)
var
requestJSONObject
=
{
var
requestJSONObject
=
{
'
preference
'
:
{
skin
:
{
'
skinDirName
'
:
$
(
'
#skinMain
'
).
data
(
'
skinDirName
'
),
skinDirName
:
admin
.
themeList
.
skinDirName
,
mobileSkinDirName
:
admin
.
themeList
.
mobileSkinDirName
,
},
},
}
}
if
(
type
===
'
pc
'
)
{
requestJSONObject
.
skin
.
skinDirName
=
skinDirName
}
else
{
requestJSONObject
.
skin
.
mobileSkinDirName
=
skinDirName
}
$
.
ajax
({
$
.
ajax
({
url
:
Label
.
servePath
+
'
/console/
preference/
'
,
url
:
Label
.
servePath
+
'
/console/
skin
'
,
type
:
'
PUT
'
,
type
:
'
PUT
'
,
cache
:
false
,
cache
:
false
,
data
:
JSON
.
stringify
(
requestJSONObject
),
data
:
JSON
.
stringify
(
requestJSONObject
),
...
@@ -107,11 +119,7 @@ admin.themeList = {
...
@@ -107,11 +119,7 @@ admin.themeList = {
$
(
'
#loadMsg
'
).
text
(
''
)
$
(
'
#loadMsg
'
).
text
(
''
)
return
return
}
}
admin
.
preference
.
init
()
if
(
$
(
'
#localeString
'
).
val
()
!==
admin
.
preference
.
locale
)
{
window
.
location
.
reload
()
}
$
(
'
#loadMsg
'
).
text
(
''
)
$
(
'
#loadMsg
'
).
text
(
''
)
},
},
})
})
...
...
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