From 085adf6f03b2275b477e3b64df1fae977b082a8b Mon Sep 17 00:00:00 2001 From: Howland Owl Date: Sun, 6 Apr 2014 15:08:32 +0300 Subject: [PATCH 1/2] buttons. - took too much time trying to get the better coffeescript bundle to do something sane. --- editor/sahliedit.litcoffee | 12 ++++++++++++ editor/sahlieditor.html | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/editor/sahliedit.litcoffee b/editor/sahliedit.litcoffee index a4f3ec3..3158a51 100644 --- a/editor/sahliedit.litcoffee +++ b/editor/sahliedit.litcoffee @@ -11,8 +11,11 @@ Editor for Sahli files. * allow Amiga choices * colorpicker - edit existing item +- remove item +- clear whole file - copy/clone - move items around +- sort items - output to screen (copy into file) * run from node - save filename dialog @@ -23,3 +26,12 @@ Title, load existing, and new file options. Silliness for checking that this works. $(-> $("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} ) + $(-> $("#loadsahli").button { disabled: false} ) + + + \ No newline at end of file diff --git a/editor/sahlieditor.html b/editor/sahlieditor.html index 406e28b..c52a2bb 100644 --- a/editor/sahlieditor.html +++ b/editor/sahlieditor.html @@ -9,7 +9,10 @@

Sahli Editor

-

form would go here

+
+ + +
From 4ae2a68fec6be3f4407001c32e769c0d43157529 Mon Sep 17 00:00:00 2001 From: Howland Owl Date: Mon, 14 Apr 2014 13:47:01 +0300 Subject: [PATCH 2/2] Things I worked on before the openssl issue took me away --- editor/sahliedit.litcoffee | 56 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/editor/sahliedit.litcoffee b/editor/sahliedit.litcoffee index 3158a51..f7da78c 100644 --- a/editor/sahliedit.litcoffee +++ b/editor/sahliedit.litcoffee @@ -30,8 +30,58 @@ 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} ) - $(-> $("#loadsahli").button { disabled: false} ) + $(-> + $("#newsahli") + .button { disabled: false} + .click -> newsahli 'new' + ) + + $(-> + $("#loadsahli") + .button { disabled: false} + .click -> alert "heyoh!" + ) - \ No newline at end of file +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 \ No newline at end of file