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 {
width: 200px;
}
#mascotcontent,
#themecontent,
.suboptions {
overflow: auto;
position: absolute;

View File

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