Fix theme editor hiding body content.

This commit is contained in:
Zixaphir 2015-01-19 09:03:47 -07:00
parent 8d6237fbc0
commit 5e7b5d66ae
5 changed files with 55 additions and 33 deletions

View File

@ -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.
* 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

View File

@ -230,6 +230,9 @@ body {
outline: none;
min-height: 100%;
}
.editTheme {
margin-left: 300px;
}
.sidebar-hide body {
margin: 0 2px;
}

View File

@ -71,29 +71,29 @@ ThemeTools =
ThemeTools.dialog = $.el "div",
id: "themeConf"
className: "reply dialog"
innerHTML: "
<div id=themebar>
</div>
<hr>
<div id=themecontent>
</div>
<div id=save>
<a href='javascript:;'>Save</a>
</div>
<div id=upload>
<a href='javascript:;'>Select Image</a>
</div>
<div id=close>
<a href='javascript:;'>Close</a>
</div>
"
innerHTML: """
<div id=themebar>
</div>
<hr>
<div id=themecontent>
</div>
<div id=save>
<a href='javascript:;'>Save</a>
</div>
<div id=upload>
<a href='javascript:;'>Select Image</a>
</div>
<div id=close>
<a href='javascript:;'>Close</a>
</div>
"""
header = $.el "div",
innerHTML: """
<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 postertrip' name='Author Tripcode' placeholder='Author Tripcode' value='#{editTheme['Author Tripcode']}'>
"""
<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 postertrip' name='Author Tripcode' placeholder='Author Tripcode' value='#{editTheme['Author Tripcode']}'>
"""
# Setup inputs that are not generated from the layout variable.
for input in $$("input", header)
@ -108,7 +108,13 @@ ThemeTools =
div = $.el "div",
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)
@ -155,7 +161,14 @@ ThemeTools =
div = $.el "div",
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', ->
editTheme["Custom CSS"] = @value
@ -169,6 +182,7 @@ ThemeTools =
$.on $('#close > a', ThemeTools.dialog), 'click', ThemeTools.close
$.add d.body, ThemeTools.dialog
$.addClass doc, 'editTheme'
Style.sheets.theme.textContent = Style.theme editTheme
apply: ->
@ -347,4 +361,5 @@ ThemeTools =
Conf['editMode'] = false
Style.setTheme Themes[Conf['theme']]
$.rm $.id 'themeConf'
$.rmClass doc, 'editTheme'
Settings.open 'Themes'