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
92b6ac68
Commit
92b6ac68
authored
May 02, 2017
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
#12285 去掉编辑器更新入口
parent
51d67ec7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
src/main/java/org/b3log/solo/processor/console/PreferenceConsole.java
...a/org/b3log/solo/processor/console/PreferenceConsole.java
+2
-1
src/main/java/org/b3log/solo/service/PreferenceMgmtService.java
...in/java/org/b3log/solo/service/PreferenceMgmtService.java
+7
-13
src/main/webapp/admin-preference.ftl
src/main/webapp/admin-preference.ftl
+2
-0
No files found.
src/main/java/org/b3log/solo/processor/console/PreferenceConsole.java
View file @
92b6ac68
...
...
@@ -369,6 +369,7 @@ public class PreferenceConsole {
* "allowVisitDraftViaPermalink": boolean,
* "allowRegister": boolean,
* "articleListStyle": "",
* "editorType": "",
* "commentable": boolean,
* "feedOutputMode: "",
* "feedOutputCnt": int
...
...
src/main/java/org/b3log/solo/service/PreferenceMgmtService.java
View file @
92b6ac68
...
...
@@ -48,7 +48,7 @@ import static org.b3log.solo.util.Skins.setDirectoryForTemplateLoading;
* Preference management service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.2.1
1, Feb 18
, 2017
* @version 1.3.2.1
2, May 2
, 2017
* @since 0.4.0
*/
@Service
...
...
@@ -57,7 +57,7 @@ public class PreferenceMgmtService {
/**
* Logger.
*/
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
PreferenceMgmtService
.
class
.
getName
()
);
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
PreferenceMgmtService
.
class
);
/**
* Preference query service.
...
...
@@ -79,7 +79,6 @@ public class PreferenceMgmtService {
/**
* Loads skins for the specified preference and initializes templates loading.
*
* <p>
* If the skins directory has been changed, persists the change into preference.
* </p>
...
...
@@ -120,8 +119,7 @@ public class PreferenceMgmtService {
if
(!
skinDirNames
.
contains
(
currentSkinDirName
))
{
LOGGER
.
log
(
Level
.
WARN
,
"Configred skin[dirName={0}] can not find, try to use "
+
"default skin[dirName="
+
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
+
"] instead."
,
currentSkinDirName
);
+
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
+
"] instead."
,
currentSkinDirName
);
if
(!
skinDirNames
.
contains
(
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
))
{
LOGGER
.
log
(
Level
.
ERROR
,
"Can not find skin[dirName="
+
Option
.
DefaultPreference
.
DEFAULT_SKIN_DIR_NAME
+
"]"
);
...
...
@@ -137,7 +135,6 @@ public class PreferenceMgmtService {
}
final
String
skinsString
=
skinArray
.
toString
();
if
(!
skinsString
.
equals
(
preference
.
getString
(
SKINS
)))
{
LOGGER
.
debug
(
"The skins directory has been changed, persists the change into preference"
);
preference
.
put
(
SKINS
,
skinsString
);
...
...
@@ -147,7 +144,6 @@ public class PreferenceMgmtService {
setDirectoryForTemplateLoading
(
preference
.
getString
(
SKIN_DIR_NAME
));
final
String
localeString
=
preference
.
getString
(
Option
.
ID_C_LOCALE_STRING
);
if
(
"zh_CN"
.
equals
(
localeString
))
{
TimeZones
.
setTimeZone
(
"Asia/Shanghai"
);
}
...
...
@@ -193,9 +189,7 @@ public class PreferenceMgmtService {
* @throws ServiceException service exception
*/
public
void
updatePreference
(
final
JSONObject
preference
)
throws
ServiceException
{
@SuppressWarnings
(
"unchecked"
)
final
Iterator
<
String
>
keys
=
preference
.
keys
();
while
(
keys
.
hasNext
())
{
final
String
key
=
keys
.
next
();
...
...
@@ -216,11 +210,9 @@ public class PreferenceMgmtService {
for
(
final
String
dirName
:
skinDirNames
)
{
final
JSONObject
skin
=
new
JSONObject
();
skinArray
.
put
(
skin
);
final
String
name
=
Latkes
.
getSkinName
(
dirName
);
skin
.
put
(
Skin
.
SKIN_NAME
,
name
);
skin
.
put
(
Skin
.
SKIN_DIR_NAME
,
dirName
);
}
...
...
@@ -280,7 +272,9 @@ public class PreferenceMgmtService {
optionRepository
.
update
(
Option
.
ID_C_COMMENTABLE
,
commentableOpt
);
final
JSONObject
editorTypeOpt
=
optionRepository
.
get
(
Option
.
ID_C_EDITOR_TYPE
);
editorTypeOpt
.
put
(
Option
.
OPTION_VALUE
,
preference
.
optString
(
Option
.
ID_C_EDITOR_TYPE
));
// https://github.com/b3log/solo/issues/12285
// editorTypeOpt.put(Option.OPTION_VALUE, preference.optString(Option.ID_C_EDITOR_TYPE));
editorTypeOpt
.
put
(
Option
.
OPTION_VALUE
,
Option
.
DefaultPreference
.
DEFAULT_EDITOR_TYPE
);
optionRepository
.
update
(
Option
.
ID_C_EDITOR_TYPE
,
editorTypeOpt
);
final
JSONObject
enableArticleUpdateHintOpt
=
optionRepository
.
get
(
Option
.
ID_C_ENABLE_ARTICLE_UPDATE_HINT
);
...
...
src/main/webapp/admin-preference.ftl
View file @
92b6ac68
...
...
@@ -161,6 +161,7 @@
</select>
</td>
</tr>
<#-- https://github.com/b3log/solo/issues/12285
<tr>
<th>
<label for="editorType">${editType1Label}</label>
...
...
@@ -173,6 +174,7 @@
</select>
</td>
</tr>
-->
<tr>
<th>
<label for="articleListDisplay">${articleListDisplay1Label}</label>
...
...
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