bugfix: ansi/ascii toggle when using existing data
This commit is contained in:
parent
84c4bd9e9f
commit
ca2374dc56
1 changed files with 18 additions and 2 deletions
|
|
@ -154,14 +154,16 @@ does not alter the array. Alternately, _have_ it alter the array.
|
|||
}]
|
||||
}
|
||||
|
||||
$("#smt").click (event) ->
|
||||
$("#smt").click (event) =>
|
||||
event.preventDefault()
|
||||
alert 'bob'
|
||||
|
||||
|
||||
data.amiga = booltoint data.amiga
|
||||
|
||||
$("#entryname").val data.name
|
||||
$("#entryauthor").val data.author
|
||||
$("#entryamiga").val data.amiga
|
||||
$("#entryamiga").children()[1].textContent = ansiorascii data.amiga
|
||||
$("#entryfont").val data.font
|
||||
|
||||
fix these color entries to supply rgb() bits
|
||||
|
|
@ -181,6 +183,20 @@ A Helper function to dump json out of an object as text:
|
|||
dumpjson = (obj) ->
|
||||
JSON.stringify(obj)
|
||||
|
||||
Boolean / integer Helpers
|
||||
|
||||
booltoint = (bool) ->
|
||||
bool + 1 - 1
|
||||
|
||||
inttobool = (intstr) ->
|
||||
(intstr == 1).toString()
|
||||
|
||||
Resolve ansi or ascii status
|
||||
|
||||
ansiorascii = (status) ->
|
||||
if status is 0 then "Ansi" else "Ascii"
|
||||
|
||||
|
||||
Color conversion from array to color item:
|
||||
|
||||
This decimal to hex conversion only handles 00-FF but it's fine for this purpose;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue