Commit Graph

315 Commits

Author SHA1 Message Date
Gabor Javorszky
1d9b2d916e Passive notifications are dismissed on settings pane change
Closes #342.
It would be totally cool if we could have a Ghost.PubSub so we could hurl events there and pick them up somewhere else. For some reason all the backbone bits work on models, like `trigger` and `listenTo` and `delegateEvents`.
2013-08-15 23:18:10 +01:00
cobbspur
66278534dc fixes extensions bug for image uploader
- extensions set to lowercase
- changed navigation images to hyphenated names and corrected references
2013-08-13 21:04:07 +01:00
Hannah Wolfe
c9ec5df9d6 Merge pull request #394 from ErisDS/path-rejig
Improving the use of paths in Ghost
2013-08-12 08:10:31 -07:00
Hannah Wolfe
0e5277c6ad Merge pull request #388 from gotdibbs/Fixed-word-count-grammar
Fixed word count grammar
2013-08-12 08:09:05 -07:00
Hannah Wolfe
cbcd3c8efe Improving the use of paths in Ghost
fixes #392

- adds appRoot, and uses this to calculate other paths
- removes path calculations from loader
- remove the themedir setting in config.. completely unnecessary
- highlights just how important #360 is
2013-08-12 15:37:23 +01:00
William Dibbern
b92980ce6d Fixed word count grammar
Closes #349
- Added utility function to pluralize when appropriate.
2013-08-11 11:55:42 -05:00
John O'Nolan
8762f531a7 Removed my personal information from fixtures as Ghost is starting to get deployed more frequently now for testing purposes.
Don't want random test sites accidentally ranking in search engines for my name.
2013-08-10 15:42:54 +02:00
Christopher Giffard
e484d9224e Themes: Added truncation to hbs content helper
Fixes #256

- Developed and linked new module, downsize, for tag-safe truncation
- Altered existing content handler to accept options for truncation
- Added tests for handler

Using truncation:

{{content words=10}}
{{content characters=256}}
2013-08-07 19:45:37 +10:00
Hannah Wolfe
2f11f053ab Minor code cleanup, docs and other bits & pieces 2013-08-06 22:24:40 +01:00
Hannah Wolfe
eac3047d45 Merge pull request #339 from javorszky/iss282
Users can change password
2013-08-06 01:17:43 -07:00
Hannah Wolfe
226e641602 Merge pull request #338 from cobbspur/upload-plugin
Added image upload reusable plugin
2013-08-06 01:02:30 -07:00
Hannah Wolfe
4537843359 Fixing unused variables 2013-08-06 09:00:12 +01:00
Hannah Wolfe
a56b77f733 Minor update to notification frontend api
- motivation was an error message on the settings screen
 - now requires slightly less code to add a notification
2013-08-06 08:55:47 +01:00
Gabor Javorszky
071f9769c6 Users can change password
Closes #282
* Added a new route
* Added new methods
* Triple security!
* Passwords are actually changed
* Also added a change password button, because 'save' has too much baggage.

On security: checks whether you're logged in. Then checks whether your old password is actually the one that belongs to you (gets value from the email field for the email, see caveat no2). Checks the new passwords for === and length > 6 on client and server side as well. And THEN changes passwords.

Caveats:
* didn't add a test, as mocha fails spectacularly on my machine. SQLITE_CORRUPT: database disk image is malformed. Cute, huh?
* Because we don't have / I'm not aware of / could not find a "currentuser" variable, I need to get the email address of the user we want to change from the email field. Theoretically if they replace that with another user's email address, and supply their pw, they will change THEIR password instead of their own.
2013-08-06 00:49:06 +01:00
cobbspur
558c9d6caa Added image upload reusable plugin
issue #40 and issue #280

- Adds uploader jquery plugin
- includes settings for enabling/disabling upload progress bar
- adds routing for image uploads
- adds directories by year and month based on upload date
- Implements plugin on settings - general pane
- Implements plugin on editor
- adjusted general tab to save uploaded image src

TODO:
- Add error handling
- Storing information on editor
- Add events
2013-08-05 23:01:48 +01:00
Hannah Wolfe
1815656778 Merge pull request #267 from jgable/pluginApi
Initial Plugin API Implementation
2013-08-05 12:29:19 -07:00
Hannah Wolfe
52dc22c952 Editable user profiles in settings screen
closes #276

 - settings screen now loads a model when a pane is requested, rather than when the whole screen is requested
 - added browse, read and edit methods and routes for users to the API
 - added user model & template to client and wired everything up.
 - provided default images for cover and profile picture
2013-08-05 18:26:44 +01:00
Jacob Gable
0238909281 Initial Plugin API Implementation
Implements basic functionality described in #227 for loading plugins
from a specific directory and having a specific workflow with an init()
method and a disable() method.
2013-08-05 11:15:17 -05:00
ErisDS
8d7336a1fb Persistent notifications should not fade out
issue #333
- css fix
2013-08-05 13:56:30 +01:00
Gabor Javorszky
6c48505701 Fixed persistent success notifications
Closes #333
* Refactored the Ghost.Notifications View bundle
* Added a new initialization of the NotificationCollection (hacky, but at least satisfies JSLint). This was needed as the reason the persistent success notification couldn't be dismissed was that prerendered DOM elements weren't picked up as BB Views beforehand, and thus no events were bound to them.
2013-08-05 13:56:30 +01:00
Hannah Wolfe
338109c762 Data models import, export, and reset for 002
- added line to index.js to set node_env to development if it is not set
 - fixed a small bug with the persistent notifications and used them on debug page from server side
 - added 002 files to manage export and import for 002
 - 002 import is somewhat smarter than 001, merging settings (except version), replacing user & clearing primary keys
 - added reset to models and migration, which does the down operation the same way that init does the up operation
 - import and reset clear session & redirect to login / signup
 - additional unit tests
2013-08-05 13:56:30 +01:00
ErisDS
2a5e7ad516 Data model additions for post tags, custom data and uploads
closes #171, closes #314, closes #315

- added settings for blog logo and icon
- all other settings will need to be added as needed as it's impossible to guess what the default value should be
- added tables for post tags
- added tables for post custom data
- added location column to users
- fixeed minor bug in migrations
2013-08-05 13:56:30 +01:00
Jacob Gable
9393a956f4 Magnificent Migrations of Magical Majesty 2013-08-05 13:56:30 +01:00
Hannah Wolfe
11be64c544 Merge pull request #336 from matthojo/Delete-modals
Moved delete post confirm alert to new modal format
2013-08-05 03:49:16 -07:00
ErisDS
ec3c322652 Casper tests for CodeMirror editor
There are still some issues surrounding spaces and new lines which will need to be worked out, but we can at least start to test some of the markdown.
2013-08-05 10:31:04 +01:00
Matthew Harrison-Jones
6b791a4c10 Moved delete post confirm alert to new modal format 2013-08-05 10:16:31 +01:00
Hannah Wolfe
ec1ced9089 Bugfix for signup screen
caused by issue #326
 - implementing fade in and center on signup form by applying the functionality to a shared view
 - login and signup now both extend the shared view
2013-08-03 19:24:06 +01:00
Hannah Wolfe
2d8b5ea8c1 Backbone template cleanup
- Ghost.View now extends Ghost.TemplateView giving all views access to subviews and templates
- Views which implemented templates no longer need to
- Some views needed to re-override render which is a bit annoying
- Settings screen now has sub-templates for each pane and for the sidebar
- Additional Casper tests for settings screen
2013-08-03 16:37:06 +01:00
Hannah Wolfe
bb9a5226a8 Merge pull request #331 from jgable/overrideTemplates
Allow theme partials to override helper templates
2013-08-03 07:21:57 -07:00
Hannah Wolfe
c30187ad20 Merge pull request #326 from matthojo/admin-temp-removal
Removed `admin-ui-temp.js` and moved code to it's relative places
2013-08-03 07:21:10 -07:00
Jacob Gable
d40c08218e Allow theme partials to override helper templates
Added an existence check to the loadTemplates function
2013-08-02 13:36:37 -05:00
Hannah Wolfe
373f64a2bd Revert "Merge pull request #318 from matthojo/mobile-interactions"
This reverts commit f18c7f22c3, reversing
changes made to 4ea9d77b11.
2013-08-01 22:19:20 +01:00
Matthew Harrison-Jones
41aa2b9012 Removed admin-ui-temp.js and moved code to it's relative places 2013-08-01 15:28:13 +01:00
Hannah Wolfe
46ed73ee86 Merge pull request #325 from matthojo/Dashboard-Padding
Bug Fix: Dashboard now has correct bottom padding
2013-08-01 06:24:26 -07:00
Hannah Wolfe
a15210d2dc Merge pull request #323 from javorszky/iss278
Login / Signup forms now use Backbone
2013-08-01 06:20:05 -07:00
Matthew Harrison-Jones
3cb0af1f8f Bug Fix: Dashboard now has correct bottom padding 2013-08-01 13:34:14 +01:00
Hannah Wolfe
f18c7f22c3 Merge pull request #318 from matthojo/mobile-interactions
Improved mobile interactions
2013-08-01 00:12:25 -07:00
Christopher Giffard
d72dab071c Added simple unit tests for ghostdown extensions
(RE: discussion in pull #317)

-   Unit tests enforce well formedness of ghostdown processor function
    and what it returns.
-   Ensures image markup is recognised and replaced accurately.
2013-08-01 16:04:42 +10:00
Christopher Giffard
09ada68d9b Updated Ghostdown image regex
Updated dropzone regex to capture existing URL flag. Also supports the shorter markdown image syntax, and corrects issues with special characters in the alt field, fixing issue #146.
2013-08-01 15:53:31 +10:00
Gabor Javorszky
f36dc3c942 Login / Signup forms now use Backbone
* Moved most of control code to `core/client`
* Implemented ajax checks
2013-08-01 02:11:45 +01:00
Hannah Wolfe
68cc640d23 Merge pull request #319 from ErisDS/test-playground
Added functional tests for Ghost Admin UI using Casperjs
2013-07-31 05:14:26 -07:00
Matthew Harrison-Jones
efeede877d Improved the semantics of the Settings page
This introduces a new class of `.form-group` to replace the label containing the elements.

I have also included `name=""` attributes to inputs where there were non.
2013-07-31 12:40:46 +01:00
Hannah Wolfe
6a2851e9ca JSLint fixes for new version
- forgot to force install
- had to clean up grunt task now we no longer need the 'm' alias
- cleaned up a couple of issues it wasn't picking up before
2013-07-31 09:21:22 +01:00
Hannah Wolfe
2b9be5376e Added functional tests for Ghost Admin UI using Casperjs
Hacky implementation of a suite of casper tests. This is here so that we can start to build up some tests.
Main thing missing is being able to simulate keypresses for CodeMirror
Making the tests run nicely with grunt, travis and be independent rather than interdependent can all come later.
- See tests/functional/base.js for full usage instructions & implementation notes
2013-07-31 08:33:28 +01:00
Matthew Harrison-Jones
27b85744f1 Improved mobile interactions
This is simply a commit which improves the mobile interactions. This does not fix UI problems on mobiles.

New interactions;

Menu
* Swipe right on header to show sidebar
* Swipe left on sidebar to hide

Content
* Tap / Swipe left on item to show preview
* Swipe right to show content list

Settings
* Tap / Swipe left on link to show settings
* Swipe right on settings to show links
2013-07-30 15:27:38 +01:00
Hannah Wolfe
97eb827d47 Replaced user menu label with current Ghost version no
closes #286
- added current version as an app.local variable available on both client and server
- swapped out the user menu label for the version no
2013-07-30 12:56:16 +01:00
Matthew Harrison-Jones
b089e67154 Improved modal creation, now includes info and action types. 2013-07-26 15:32:44 +01:00
Matthew Harrison-Jones
3057945b70 Refactored menu fading to be a plugin for extendability.
Need to find suitable place for the `.overlay` hideAway function call.
2013-07-26 12:32:26 +01:00
Hannah Wolfe
8b0763ee9c Merge pull request #311 from matthojo/copy-to-html-modal
First pass at creating a usuable modal for the copy to HTML keyboard shortcut.
2013-07-25 10:42:18 -07:00
Matthew Harrison-Jones
0786ec5862 First pass at creating a usuable modal for the copy to HTML keyboard shortcut.
Has an issue where Google Chrome does not persist to keep code selected.
2013-07-25 16:00:41 +01:00