Fix theme and mascot editors.

Sorry, they've been broken awhile and no one told me.
This commit is contained in:
Zixaphir 2013-05-08 23:19:00 -07:00
parent 76c1401c7b
commit df47d68235
5 changed files with 54 additions and 35 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1604,6 +1604,8 @@ article li {
.section-script fieldset { .section-script fieldset {
width: 200px; width: 200px;
} }
#mascotcontent,
#themecontent,
.suboptions { .suboptions {
overflow: auto; overflow: auto;
position: absolute; position: absolute;

View File

@ -151,16 +151,20 @@ ThemeTools =
$.on input, 'blur', -> $.on input, 'blur', ->
depth = 0 depth = 0
toggle1 = false
toggle2 = false
len = @value.length
unless @value.length > 1000 unless len > 1000
for i in [0..@value.length - 1] i = 0
switch @value[i] while i < len
when '(' then depth++ switch @value[i++]
when ')' then depth-- when '(' then ++depth
when '"' then toggle1 = not toggle1 when ')' then --depth
when "'" then toggle2 = not toggle2 when '"' then toggle1 = !toggle1
when "'" then toggle2 = !toggle2
if depth != 0 or toggle1 or toggle2 if (depth isnt 0) or toggle1 or toggle2
return alert "Syntax error on #{@name}." return alert "Syntax error on #{@name}."
if @className == "colorfield" if @className == "colorfield"
@ -168,6 +172,7 @@ ThemeTools =
@nextSibling.color.importColor() @nextSibling.color.importColor()
editTheme[@name] = @value editTheme[@name] = @value
Style.addStyle(editTheme)
nodes.push div nodes.push div