mirror of https://github.com/halo-dev/halo
Replace themeName with themeId
parent
feeecc30b2
commit
e46c1f8740
|
@ -97,7 +97,7 @@ public class StartedListener implements ApplicationListener<ApplicationStartedEv
|
||||||
*/
|
*/
|
||||||
private void cacheActiveTheme() {
|
private void cacheActiveTheme() {
|
||||||
try {
|
try {
|
||||||
configuration.setSharedVariable("themeName", themeService.getActivatedThemeId());
|
configuration.setSharedVariable("themeId", themeService.getActivatedThemeId());
|
||||||
} catch (TemplateModelException e) {
|
} catch (TemplateModelException e) {
|
||||||
log.error("", e);
|
log.error("", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -331,7 +331,7 @@ public class ThemeServiceImpl implements ThemeService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// TODO Refactor here in the future
|
// TODO Refactor here in the future
|
||||||
configuration.setSharedVariable("themeName", themeId);
|
configuration.setSharedVariable("themeId", themeId);
|
||||||
configuration.setSharedVariable("options", optionService.listOptions());
|
configuration.setSharedVariable("options", optionService.listOptions());
|
||||||
} catch (TemplateModelException e) {
|
} catch (TemplateModelException e) {
|
||||||
throw new ServiceException("Failed to set shared variable", e).setErrorData(themeId);
|
throw new ServiceException("Failed to set shared variable", e).setErrorData(themeId);
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
*/
|
*/
|
||||||
function updateTheme(theme, e) {
|
function updateTheme(theme, e) {
|
||||||
$(e).button('loading');
|
$(e).button('loading');
|
||||||
$.get('/admin/themes/pull',{'themeName': theme},function (data) {
|
$.get('/admin/themes/pull',{'themeId': theme},function (data) {
|
||||||
if (data.code === 1) {
|
if (data.code === 1) {
|
||||||
halo.showMsgAndParentRedirect(data.msg, 'success', 1000, '/admin/themes');
|
halo.showMsgAndParentRedirect(data.msg, 'success', 1000, '/admin/themes');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue