Merge branch 'coffee1.7.1' of www.accession.fi:sahli into coffee1.7.1
This commit is contained in:
commit
76157dfa59
2 changed files with 66 additions and 1 deletions
|
|
@ -11,8 +11,11 @@ Editor for Sahli files.
|
||||||
* allow Amiga choices
|
* allow Amiga choices
|
||||||
* colorpicker
|
* colorpicker
|
||||||
- edit existing item
|
- edit existing item
|
||||||
|
- remove item
|
||||||
|
- clear whole file
|
||||||
- copy/clone
|
- copy/clone
|
||||||
- move items around
|
- move items around
|
||||||
|
- sort items
|
||||||
- output to screen (copy into file)
|
- output to screen (copy into file)
|
||||||
* run from node - save filename dialog
|
* run from node - save filename dialog
|
||||||
|
|
||||||
|
|
@ -23,3 +26,62 @@ Title, load existing, and new file options.
|
||||||
Silliness for checking that this works.
|
Silliness for checking that this works.
|
||||||
$(-> $("h1").hide().slideDown(500))
|
$(-> $("h1").hide().slideDown(500))
|
||||||
|
|
||||||
|
Create a split button to choose between the New and Load functionalities
|
||||||
|
(As we aren't going to ever load a file _and_ do a new file.)
|
||||||
|
(If someone wants to do that, they can restart with F5 or something.)
|
||||||
|
|
||||||
|
$(->
|
||||||
|
$("#newsahli")
|
||||||
|
.button { disabled: false}
|
||||||
|
.click -> newsahli 'new'
|
||||||
|
)
|
||||||
|
|
||||||
|
$(->
|
||||||
|
$("#loadsahli")
|
||||||
|
.button { disabled: false}
|
||||||
|
.click -> alert "heyoh!"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
The sahli file definition format is as follows:
|
||||||
|
"file" - the actual filename on disk, "name" - the title of the piece,
|
||||||
|
the boolean 'amiga' indicates if it is ansi or ascii (True = ascii),
|
||||||
|
width is the width (widest point of the file), author the author of the piece,
|
||||||
|
the color and bg items define the color for amiga ascii, and the font
|
||||||
|
defines the font similarly. For PC ansi, this should be 'ansifont.'
|
||||||
|
The three remaining lines are informational and optional.
|
||||||
|
|
||||||
|
The slide format is currently unused, but consists of a background picture,
|
||||||
|
a html template, and a css file.
|
||||||
|
|
||||||
|
class Sahli
|
||||||
|
constructor: ->
|
||||||
|
filedef = {
|
||||||
|
"file": "",
|
||||||
|
"name": "",
|
||||||
|
"amiga": true,
|
||||||
|
"width": "",
|
||||||
|
"author": "",
|
||||||
|
"font": "Propaz",
|
||||||
|
"color": [ 0,0,0,0 ],
|
||||||
|
"bg": [ 0,0,0,0 ],
|
||||||
|
"line1": "",
|
||||||
|
"line2": "",
|
||||||
|
"text": ""
|
||||||
|
}
|
||||||
|
slidesdef = {
|
||||||
|
"background": "",
|
||||||
|
"template": "",
|
||||||
|
"css": ""
|
||||||
|
}
|
||||||
|
blank = {
|
||||||
|
"slides": slidesdef,
|
||||||
|
"filedef": [ filedef ]
|
||||||
|
}
|
||||||
|
|
||||||
|
dumpjson = (obj) ->
|
||||||
|
JSON.stringify(obj)
|
||||||
|
|
||||||
|
newsahli = ->
|
||||||
|
sahli = new Sahli
|
||||||
|
alert dumpjson this.sahli
|
||||||
|
|
@ -9,7 +9,10 @@
|
||||||
<body>
|
<body>
|
||||||
<h1>Sahli Editor</h1>
|
<h1>Sahli Editor</h1>
|
||||||
<div id='editbox'>
|
<div id='editbox'>
|
||||||
<p>form would go here</p>
|
<div>
|
||||||
|
<button id='newsahli'>New</button>
|
||||||
|
<button id='loadsahli'>Load</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue