bugfix: ansi/ascii status saves correctly
This commit is contained in:
parent
30d588247f
commit
e635fa3ae3
3 changed files with 31 additions and 27 deletions
|
|
@ -124,7 +124,8 @@ edit button.
|
||||||
$('#buttonbox').hide()
|
$('#buttonbox').hide()
|
||||||
$('#listsave').button {icons: {primary:"ui-icon-disk"}}
|
$('#listsave').button {icons: {primary:"ui-icon-disk"}}
|
||||||
.click =>
|
.click =>
|
||||||
alert 'SAVE ME'
|
console.log dumpjson @.data
|
||||||
|
|
||||||
|
|
||||||
You need to save the order, and extract these in that order; moving around
|
You need to save the order, and extract these in that order; moving around
|
||||||
does not alter the array. Alternately, _have_ it alter the array.
|
does not alter the array. Alternately, _have_ it alter the array.
|
||||||
|
|
@ -160,6 +161,21 @@ insert it into the array at end position. A la the draggon-dropping.
|
||||||
entry.dblclick =>
|
entry.dblclick =>
|
||||||
@.editline item,pos
|
@.editline item,pos
|
||||||
|
|
||||||
|
save: ->
|
||||||
|
pos = $("#entryindex").val()
|
||||||
|
entry = @data.filedata[pos]
|
||||||
|
entry.name = $("#entryname").val()
|
||||||
|
entry.author = $("#entryauthor").val()
|
||||||
|
entry.amiga = statustobool $("#entryamiga").children()[1].textContent
|
||||||
|
console.log $("#entryamiga").children()[1].textContent,entry.amiga,entry.author
|
||||||
|
entry.color = colortoarray $("#entrycolor").val()
|
||||||
|
entry.bg = colortoarray $("#entrybg").val()
|
||||||
|
entry.width = $("#entrywidth").val()
|
||||||
|
entry.line1 = $("#entryline1").val()
|
||||||
|
entry.line2 = $("#entryline2").val()
|
||||||
|
entry.text = $("#entrytext").val()
|
||||||
|
entry.file = $("#entryfile").val()
|
||||||
|
|
||||||
editline: (data,pos) ->
|
editline: (data,pos) ->
|
||||||
$("#formica").dialog {
|
$("#formica").dialog {
|
||||||
width:'800',
|
width:'800',
|
||||||
|
|
@ -173,30 +189,15 @@ insert it into the array at end position. A la the draggon-dropping.
|
||||||
},{
|
},{
|
||||||
text: "Save",
|
text: "Save",
|
||||||
icons: {primary: 'ui-icon-disk'},
|
icons: {primary: 'ui-icon-disk'},
|
||||||
click: ->
|
click: ((_this) ->
|
||||||
$('#smt').click()
|
(event) ->
|
||||||
$(@).dialog "close"
|
event.preventDefault()
|
||||||
|
_this.save()
|
||||||
|
$(this).dialog "close"
|
||||||
|
)(this)
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#smt").click (event) =>
|
|
||||||
event.preventDefault()
|
|
||||||
pos = $("#entryindex").val()
|
|
||||||
entry = @data.filedata[pos]
|
|
||||||
entry.name = $("#entryname").val()
|
|
||||||
entry.author = $("#entryauthor").val()
|
|
||||||
entry.amiga = inttobool $("#entryamiga").val()
|
|
||||||
entry.color = colortoarray $("#entrycolor").val()
|
|
||||||
entry.bg = colortoarray $("#entrybg").val()
|
|
||||||
entry.width = $("#entrywidth").val()
|
|
||||||
entry.line1 = $("#entryline1").val()
|
|
||||||
entry.line2 = $("#entryline2").val()
|
|
||||||
entry.text = $("#entrytext").val()
|
|
||||||
entry.file = $("#entryfile").val()
|
|
||||||
console.log entry
|
|
||||||
|
|
||||||
|
|
||||||
data.amiga = booltoint data.amiga
|
data.amiga = booltoint data.amiga
|
||||||
|
|
||||||
$("#entryindex").val pos
|
$("#entryindex").val pos
|
||||||
|
|
@ -217,7 +218,7 @@ insert it into the array at end position. A la the draggon-dropping.
|
||||||
A Helper function to dump json out of an object as text:
|
A Helper function to dump json out of an object as text:
|
||||||
|
|
||||||
dumpjson = (obj) ->
|
dumpjson = (obj) ->
|
||||||
JSON.stringify(obj)
|
JSON.stringify obj,null,"\t"
|
||||||
|
|
||||||
Boolean / integer Helpers
|
Boolean / integer Helpers
|
||||||
|
|
||||||
|
|
@ -227,6 +228,9 @@ Boolean / integer Helpers
|
||||||
inttobool = (intstr) ->
|
inttobool = (intstr) ->
|
||||||
(intstr == 1).toString()
|
(intstr == 1).toString()
|
||||||
|
|
||||||
|
statustobool = (status) ->
|
||||||
|
if status is 'Ascii' then true else false
|
||||||
|
|
||||||
Resolve ansi or ascii status
|
Resolve ansi or ascii status
|
||||||
|
|
||||||
ansiorascii = (status) ->
|
ansiorascii = (status) ->
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@
|
||||||
<li>
|
<li>
|
||||||
<input type="text" id="entryindex" value="" class='hidden'>
|
<input type="text" id="entryindex" value="" class='hidden'>
|
||||||
<label for="file">File name:</label>
|
<label for="file">File name:</label>
|
||||||
<input id='entryfile' type="hidden" name="file" value="" placeholder="">
|
<input id='entryfile' type="text" name="file" value="" placeholder="">
|
||||||
<input id='entryfilepick' type="file" name="pickfile" value="" placeholder="">
|
<input id='entryfilepick' type="file" class='hidden' name="pickfile" value="" placeholder="">
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label for="file">Title:</label>
|
<label for="file">Title:</label>
|
||||||
|
|
@ -135,7 +135,6 @@
|
||||||
<textarea id='entrytext' name='text'></textarea>
|
<textarea id='entrytext' name='text'></textarea>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<li><input type="submit" name="smt" id="smt" class="hidden" value=""></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
3
todo.txt
3
todo.txt
|
|
@ -18,10 +18,11 @@ x 2014-04-16 (A) - create interface @EDITOR
|
||||||
x 2014-04-16 @EDITOR edit item saves data routine
|
x 2014-04-16 @EDITOR edit item saves data routine
|
||||||
@EDITOR update the line item when saving
|
@EDITOR update the line item when saving
|
||||||
@EDITOR text/bg colors change 'SAHLI' thing
|
@EDITOR text/bg colors change 'SAHLI' thing
|
||||||
@EDITOR fix filename 'holdover' from previous bit
|
@EDITOR fix filename 'holdover' from previous bit, 'escape/cancel' reset as well
|
||||||
@EDITOR fix filenames
|
@EDITOR fix filenames
|
||||||
@EDITOR dump to screen or file, not to console when saving
|
@EDITOR dump to screen or file, not to console when saving
|
||||||
@EDITOR delete an entry
|
@EDITOR delete an entry
|
||||||
|
@EDITOR BUGFIX - ansi/ascii toggle/saving
|
||||||
(A) - parse files for 'info' @EDITOR @SAUCE
|
(A) - parse files for 'info' @EDITOR @SAUCE
|
||||||
|
|
||||||
x 2014-03-24 (B) Get with dfox on the partymeister package version
|
x 2014-03-24 (B) Get with dfox on the partymeister package version
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue