Fix theme editor hiding body content.
This commit is contained in:
parent
8d6237fbc0
commit
5e7b5d66ae
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* appchan x - Version 2.10.3 - 2015-01-17
|
* appchan x - Version 2.10.3 - 2015-01-19
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -230,6 +230,9 @@ body {
|
|||||||
outline: none;
|
outline: none;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
|
.editTheme {
|
||||||
|
margin-left: 300px;
|
||||||
|
}
|
||||||
.sidebar-hide body {
|
.sidebar-hide body {
|
||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,29 +71,29 @@ ThemeTools =
|
|||||||
ThemeTools.dialog = $.el "div",
|
ThemeTools.dialog = $.el "div",
|
||||||
id: "themeConf"
|
id: "themeConf"
|
||||||
className: "reply dialog"
|
className: "reply dialog"
|
||||||
innerHTML: "
|
innerHTML: """
|
||||||
<div id=themebar>
|
<div id=themebar>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div id=themecontent>
|
<div id=themecontent>
|
||||||
</div>
|
</div>
|
||||||
<div id=save>
|
<div id=save>
|
||||||
<a href='javascript:;'>Save</a>
|
<a href='javascript:;'>Save</a>
|
||||||
</div>
|
</div>
|
||||||
<div id=upload>
|
<div id=upload>
|
||||||
<a href='javascript:;'>Select Image</a>
|
<a href='javascript:;'>Select Image</a>
|
||||||
</div>
|
</div>
|
||||||
<div id=close>
|
<div id=close>
|
||||||
<a href='javascript:;'>Close</a>
|
<a href='javascript:;'>Close</a>
|
||||||
</div>
|
</div>
|
||||||
"
|
"""
|
||||||
|
|
||||||
header = $.el "div",
|
header = $.el "div",
|
||||||
innerHTML: """
|
innerHTML: """
|
||||||
<input class='field subject' name='Theme' placeholder='Theme' value='#{key}'> by
|
<input class='field subject' name='Theme' placeholder='Theme' value='#{key}'> by
|
||||||
<input class='field name' name='Author' placeholder='Author' value='#{editTheme['Author']}'>
|
<input class='field name' name='Author' placeholder='Author' value='#{editTheme['Author']}'>
|
||||||
<input class='field postertrip' name='Author Tripcode' placeholder='Author Tripcode' value='#{editTheme['Author Tripcode']}'>
|
<input class='field postertrip' name='Author Tripcode' placeholder='Author Tripcode' value='#{editTheme['Author Tripcode']}'>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Setup inputs that are not generated from the layout variable.
|
# Setup inputs that are not generated from the layout variable.
|
||||||
for input in $$("input", header)
|
for input in $$("input", header)
|
||||||
@ -108,7 +108,13 @@ ThemeTools =
|
|||||||
|
|
||||||
div = $.el "div",
|
div = $.el "div",
|
||||||
className: "themevar"
|
className: "themevar"
|
||||||
innerHTML: "<div class=optionname><b>#{item}</b></div><div class=option><input name='#{item}' placeholder='#{if item is "Background Image" then "Shift+Click to upload image" else item}'>"
|
innerHTML: """
|
||||||
|
<div class=optionname>
|
||||||
|
<b>#{item}</b>
|
||||||
|
</div>
|
||||||
|
<div class=option>
|
||||||
|
<input name='#{item}' placeholder='#{if item is "Background Image" then "Shift+Click to upload image" else item}'>
|
||||||
|
"""
|
||||||
|
|
||||||
input = $('input', div)
|
input = $('input', div)
|
||||||
|
|
||||||
@ -155,7 +161,14 @@ ThemeTools =
|
|||||||
|
|
||||||
div = $.el "div",
|
div = $.el "div",
|
||||||
className: "themevar"
|
className: "themevar"
|
||||||
innerHTML: "<div class=optionname><b>Custom CSS</b></div><div class=option><textarea name='Custom CSS' placeholder='Custom CSS'>#{editTheme['Custom CSS']}</textarea>"
|
innerHTML: """
|
||||||
|
<div class=optionname>
|
||||||
|
<b>Custom CSS</b>
|
||||||
|
</div>
|
||||||
|
<div class=option>
|
||||||
|
<textarea name='Custom CSS' placeholder='Custom CSS'>#{editTheme['Custom CSS']}
|
||||||
|
</textarea>
|
||||||
|
"""
|
||||||
|
|
||||||
$.on $('textarea', div), 'blur', ->
|
$.on $('textarea', div), 'blur', ->
|
||||||
editTheme["Custom CSS"] = @value
|
editTheme["Custom CSS"] = @value
|
||||||
@ -169,6 +182,7 @@ ThemeTools =
|
|||||||
$.on $('#close > a', ThemeTools.dialog), 'click', ThemeTools.close
|
$.on $('#close > a', ThemeTools.dialog), 'click', ThemeTools.close
|
||||||
|
|
||||||
$.add d.body, ThemeTools.dialog
|
$.add d.body, ThemeTools.dialog
|
||||||
|
$.addClass doc, 'editTheme'
|
||||||
Style.sheets.theme.textContent = Style.theme editTheme
|
Style.sheets.theme.textContent = Style.theme editTheme
|
||||||
|
|
||||||
apply: ->
|
apply: ->
|
||||||
@ -347,4 +361,5 @@ ThemeTools =
|
|||||||
Conf['editMode'] = false
|
Conf['editMode'] = false
|
||||||
Style.setTheme Themes[Conf['theme']]
|
Style.setTheme Themes[Conf['theme']]
|
||||||
$.rm $.id 'themeConf'
|
$.rm $.id 'themeConf'
|
||||||
|
$.rmClass doc, 'editTheme'
|
||||||
Settings.open 'Themes'
|
Settings.open 'Themes'
|
||||||
Loading…
x
Reference in New Issue
Block a user