From 41a4ee3f3dab22f309a89af91126cff105a69504 Mon Sep 17 00:00:00 2001 From: jdescottes Date: Sun, 6 Jul 2014 12:55:29 +0200 Subject: [PATCH] cleanup of import tab --- src/css/settings.css | 9 ++----- src/js/controller/settings/SaveController.js | 10 +++---- src/templates/settings/import.html | 28 ++++++++++++++++---- src/templates/settings/save.html | 24 ++++++++++------- 4 files changed, 44 insertions(+), 27 deletions(-) diff --git a/src/css/settings.css b/src/css/settings.css index 41fbb4a4..895a4650 100644 --- a/src/css/settings.css +++ b/src/css/settings.css @@ -339,20 +339,15 @@ width: 100%; } -#save-online-status { - margin-top: 10px; -} -#save-local-status { - margin-bottom: 10px; -} .save-status { + margin-bottom: 10px; vertical-align: middle; font-weight: normal; text-shadow: none; font-style: italic; } -.save-local-name { +.save-file-name { white-space: nowrap; font-weight: bold; color: white; diff --git a/src/js/controller/settings/SaveController.js b/src/js/controller/settings/SaveController.js index f3dd63ba..d27c375a 100644 --- a/src/js/controller/settings/SaveController.js +++ b/src/js/controller/settings/SaveController.js @@ -14,14 +14,14 @@ this.descriptionInput = $('#save-description'); this.isPublicCheckbox = $('input[name=save-public-checkbox]'); this.saveOnlineButton = $('#save-online-button'); - this.saveLocalButton = $('#save-local-button'); + this.saveFileButton = $('#save-file-button'); // Only available in app-engine mode ... this.piskelName = $('.piskel-name').get(0); this.saveOnlineStatus = $('#save-online-status'); - this.saveLocalStatus = $('#save-local-status'); + this.saveFileStatus = $('#save-file-status'); this.timestamp = new Date(); var descriptor = this.piskelController.getPiskel().getDescriptor(); @@ -30,7 +30,7 @@ this.isPublicCheckbox.prop('checked', descriptor.isPublic); - this.saveLocalButton.click(this.onSaveLocalClick_.bind(this)); + this.saveFileButton.click(this.onSaveLocalClick_.bind(this)); this.nameInput.keyup(this.updateLocalStatusFilename_.bind(this)); if (pskl.app.isLoggedIn()) { @@ -39,7 +39,7 @@ this.saveOnlineButton.hide(); $('.save-public-section').hide(); this.saveOnlineStatus.html(pskl.utils.Template.get('save-please-login-partial')); - this.saveLocalButton.get(0).classList.add('button-primary'); + this.saveFileButton.get(0).classList.add('button-primary'); this.saveForm.submit(this.onSaveLocalClick_.bind(this)); } @@ -47,7 +47,7 @@ }; ns.SaveController.prototype.updateLocalStatusFilename_ = function () { - this.saveLocalStatus.html(pskl.utils.Template.getAndReplace('save-local-status-template', { + this.saveFileStatus.html(pskl.utils.Template.getAndReplace('save-file-status-template', { name : this.getLocalFilename_() })); }; diff --git a/src/templates/settings/import.html b/src/templates/settings/import.html index 968784cf..954ca5bb 100644 --- a/src/templates/settings/import.html +++ b/src/templates/settings/import.html @@ -1,13 +1,22 @@
- Open Piskel Project + Load from Browser +
+
+ Load a local piskel saved in this Browser +
+ +
+
+
+ Load .piskel file
- Load a .piskel file from your computer. + Load a .piskel file from your computer
- +
-
Supports : PNG, JPG, BMP, Animated GIF ...
+
Supports : PNG, JPG, BMP, Animated GIF ...
- +
+
+ Recover recent sessions +
+
+ Load a backup from a recent session +
+ +
+
\ No newline at end of file diff --git a/src/templates/settings/save.html b/src/templates/settings/save.html index 78be0253..4c5d9542 100644 --- a/src/templates/settings/save.html +++ b/src/templates/settings/save.html @@ -2,13 +2,12 @@
Describe your piskel
-
- - +
+ +
- - +
-
Download Project
+
Save offline in Browser
-
- +
Your piskel will be saved in the browser and will only be accessible from this browser.
+ +
+
Save offline as File
+
+
+
@@ -32,7 +36,7 @@ Login to piskelapp.com to save and share your sprites online ! -
\ No newline at end of file