From d1e2b9d1bf7ab44a790c9f1a15fbed9ba0ae1ab0 Mon Sep 17 00:00:00 2001 From: Iam Naughton Phier Date: Wed, 6 Aug 2014 14:19:30 +0300 Subject: [PATCH] edit location field + saving location field --- editor/sahliedit.js | 7 +++++++ editor/sahliedit.litcoffee | 4 ++++ editor/sahlieditor.html | 29 +++++++++++++++-------------- sahli.js | 11 +++++++---- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/editor/sahliedit.js b/editor/sahliedit.js index ed3498a..dbc6a6b 100644 --- a/editor/sahliedit.js +++ b/editor/sahliedit.js @@ -62,6 +62,7 @@ "file": "", "name": "", "amiga": true, + "filetype": 'plain', "width": "", "author": "", "font": "Propaz", @@ -77,6 +78,7 @@ "css": "" }; this.empty = { + "location": "", "slides": this.emptyslidesdef, "filedata": [] }; @@ -97,6 +99,11 @@ Sahli.prototype.edit = function() { $('#buttonbox').hide(); + $('#dirlocation').change((function(_this) { + return function(event) { + return _this.data.location = event.target.value; + }; + })(this)); $('#listsave').button({ icons: { primary: "ui-icon-disk" diff --git a/editor/sahliedit.litcoffee b/editor/sahliedit.litcoffee index 1788789..34034c5 100644 --- a/editor/sahliedit.litcoffee +++ b/editor/sahliedit.litcoffee @@ -87,6 +87,7 @@ a html template, and a css file. "file": "", "name": "", "amiga": true, + "filetype": 'plain', "width": "", "author": "", "font": "Propaz", @@ -102,6 +103,7 @@ a html template, and a css file. "css": "" } @empty = { + "location": "", "slides": @emptyslidesdef, "filedata": [ ] } @@ -122,6 +124,8 @@ edit button. edit: -> $('#buttonbox').hide() + $('#dirlocation').change (event) => + @.data.location = event.target.value $('#listsave').button {icons: {primary:"ui-icon-disk"}} .click => console.log dumpjson @.data diff --git a/editor/sahlieditor.html b/editor/sahlieditor.html index c666416..7185941 100644 --- a/editor/sahlieditor.html +++ b/editor/sahlieditor.html @@ -7,7 +7,7 @@ --> - + @@ -22,6 +22,7 @@