Commit Graph

52 Commits

Author SHA1 Message Date
Hannah Wolfe
08124442cd Merge pull request #492 from gotdibbs/Issue352
Fixed editor actions menu
2013-08-22 11:48:37 -07:00
Hannah Wolfe
ab7857bda6 Improvements to settings pane switching
closes #174

- Triggering router events for navigation between settings panes
caused the route function to be re-executed, which caused all
kinds of fun.
- Wrapped the settings route function in an if statement to preserve
the current view if it already a settings view.
- Added Ghost pub-sub and using that instead of History API
2013-08-22 08:08:43 +01:00
William Dibbern
a15825e42e Fixed editor actions menu
Closes #352
- Updated editor.scss to break out transition shorthand into its
constituent properties so that bourbon appends the correct vendor
prefixes.
- Added full set of publish options to the statusMap.
- Added setActiveStatus function to handle toggling the active action
for the publish menu.
- Cleaned up handleStatus and updatePost functions to match desired
functionality of menu items toggling the selected action and the actual
button on the split button invoking said action.
2013-08-21 21:31:59 -05:00
John O'Nolan
da0d355a99 Merge pull request #485 from matthojo/Login-Fix
Bug Fix: Login form now maintains the right layout on resize
2013-08-21 05:01:27 -07:00
Matthew Harrison-Jones
d6e0835ae2 Bug Fix: Login form now maintains the right layout on reize 2013-08-21 12:45:33 +01:00
Hannah Wolfe
a7f0fe093f Merge pull request #470 from matthojo/Centering-Fix
Bug Fix: Login centering now works correctly
2013-08-20 14:08:00 -07:00
Hannah Wolfe
da0416ff16 Merge pull request #456 from matthojo/Keyboard-Shortcut-Improvements
Keyboard shortcut improvements
2013-08-20 07:05:41 -07:00
Matthew Harrison-Jones
80e7ffd9b0 Bug Fix: Login centering now works correctly
This also adds in additional functionality to the .center() plugin. A choice to animate centering and also the success event fired.
2013-08-20 11:55:44 +01:00
Hannah Wolfe
ac5f668dab Updating password length validation
- setting it back to 7 chars so that people who have 7 char passwords, which were valid, can login.
2013-08-20 10:43:11 +01:00
Hannah Wolfe
4e1b5a8e09 Manually merging pull request #439 from javorszky/iss354
Conflicts:
	core/client/views/login.js
2013-08-20 10:11:09 +01:00
Gabor Javorszky
e2ef9e5ade Added validation for signup and login screens
Closes #374
* Included node-validator as a package
* Implemented server side validation (the client side js is a mess, need a LOT of work)
* Validates email address both on signup and login screens, gives error message on malformed email addresses
* Requires at least 8 chars of password
* Tells user if password is too short
* Tells user if no such user on login
* Tells user if wrong password on login
* Tells user if server responds with a 404 (goes away, dies, etc)
* Added middleware between req and login / signup for validation
2013-08-20 09:42:42 +01:00
Gabor Javorszky
2f6098d653 Removed flash, renamed file, unbroken logout / login request notifications
Closes #354
* Reintroduced the redirect functionality (not logged in, tries to go to `/settings/user/`, is sent to `/login/` with info notification, after login user is taken to `/settings/user/)
* Reintroduced the "Successfully logged out" message
* Added middleware to scrub passive notifications from `ghost.notifications` after one use basically mimicing client side passive notifications
* Removed flash from everywhere. Even from package.json.
* Renamed flashed.hbs to notifications.hbs, modified default.hbs accordingly
* Added function to parse GET variables on client side
2013-08-20 08:15:06 +01:00
cobbspur
faa38a31b4 stops image/file drop onto editor markdown causing havoc
closes #391

 - added dragDrop falsey value to codemirror instance
2013-08-19 20:23:44 +01:00
Matthew Harrison-Jones
211f0ff9c6 Included missing Mac 'code' keyboard shortcut 2013-08-19 15:10:53 +01:00
Jacob Gable
a1dd8ef26c Show validation error when saving post
Show the model.validationError if one is present and also coalesce the
empty title for a more meaningful message.  Also, reset the button text
after failure.
2013-08-18 15:01:21 -05:00
Jacob Gable
59984c2df8 Edit Post Permissions 2013-08-18 12:28:05 -05:00
Hannah Wolfe
b59575d26b Merge pull request #404 from matthojo/mobile-interactions
Mobile interactions
2013-08-18 09:19:06 -07:00
Hannah Wolfe
f097e89f39 Merge pull request #393 from matthojo/Modal-Fixes
Several Modal Fixes
2013-08-18 09:05:49 -07:00
Gabor Javorszky
b114c8cfef Current user added
Closes #340. Closes #375
* Replaced session with id of current user
* Added method to ghostlocals to always send profile picture and full name to templates (template checks if falsy)
* Modified user saving (`forge().set(new).save()` died on me, `forge().save(new)` didn't)
* If user has profile picture, that will be used
* If user has name, that will be used
* Password changing doesn't care about your email. Uses cookies. Tasty!
* User pane uses current user id. Had to set path to me, otherwise goes to `browse` instead of `read`.
* Added logic to user api to check for `id === 'me'`, and then use the cookie value
* User data saves are now correct
* There is no logout error
2013-08-17 22:02:46 +01:00
Matthew Harrison-Jones
9d6a4f52e1 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-08-16 12:44:11 +01:00
Gabor Javorszky
3c16fc909b 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
Matthew Harrison-Jones
76357947e9 Improved modals styling and code formatting
Solves:
* max-height 120px less than height of viewport
* fade-in a dark overlay as well as blur
* animation speeds/transitions should be smoother
* modal sizing fucks up when viewport is resized

Also improves Modal code compliance to Ghost Backbone coding patterns
2013-08-14 14:49:16 +01:00
William Dibbern
5d9f19fa80 Fixed word count grammar
Closes #349
- Added utility function to pluralize when appropriate.
2013-08-11 11:55:42 -05:00
Hannah Wolfe
cd5c954aae Minor code cleanup, docs and other bits & pieces 2013-08-06 22:24:40 +01:00
Hannah Wolfe
10f4bd0311 Merge pull request #339 from javorszky/iss282
Users can change password
2013-08-06 01:17:43 -07:00
Hannah Wolfe
ae7921104d Merge pull request #338 from cobbspur/upload-plugin
Added image upload reusable plugin
2013-08-06 01:02:30 -07:00
Hannah Wolfe
1e954aace0 Fixing unused variables 2013-08-06 09:00:12 +01:00
Hannah Wolfe
559edb10a6 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
54415baf37 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
8030aca3fd 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
4bc3af4039 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
Gabor Javorszky
50c807cb9a 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
Matthew Harrison-Jones
98dbf8e7ce Moved delete post confirm alert to new modal format 2013-08-05 10:16:31 +01:00
Hannah Wolfe
30a64b0a4d 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
4cd6ff903f 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
Matthew Harrison-Jones
4a319d3103 Removed admin-ui-temp.js and moved code to it's relative places 2013-08-01 15:28:13 +01:00
Gabor Javorszky
d62f0d4a61 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
Matthew Harrison-Jones
2a44225994 Improved modal creation, now includes info and action types. 2013-07-26 15:32:44 +01:00
Matthew Harrison-Jones
e85c53bb07 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
Matthew Harrison-Jones
950f2690e7 Reworked modals to take content from modal content templates.
This also includes the example modal, which needs to be replaced with content.
2013-07-24 11:29:20 +01:00
Hannah Wolfe
0219e8f292 Merge pull request #298 from matthojo/Markdown-Fixes
Additional Keyboard Shortcuts and improvements to text highlighting
2013-07-23 11:44:14 -07:00
Hannah Wolfe
7031ce1169 Merge pull request #297 from matthojo/Editor-Scrolling
Debounce scrolling on editor
2013-07-22 08:00:15 -07:00
Matthew Harrison-Jones
d76bdcaeb9 Move notification dismissal events to Backbone
Also removes stray notification alert comments
2013-07-22 14:41:28 +01:00
ErisDS
56fc1ce25b Bug Fix: title of deleted post in content view notification is now correct 2013-07-22 14:41:28 +01:00
Gabor Javorszky
ef2570e082 Fixes undefined this in settings.js
Because this and self. Missed it from previous commit :/
2013-07-22 14:41:27 +01:00
Gabor Javorszky
1421bbc675 Adding notifications to settings and content pages
Closes #290. In theory.
* moved flashviews to base.js, renamed to notifications
* added failures to post editor screen
* added notifications to settings (success, failure)
* added notifications when deleting posts

Most of these are not visible due to CSS rules, as overhauling that
is a task in and of itself. The notifications do show up in the inspector
though, so all is well.
2013-07-22 14:41:27 +01:00
Gabor Javorszky
6086f9e6f0 Notifications on front end
Should close #37. There are persistent and passive notifications.

Persistent ones:
* are stored on `ghost.notifications`.
* have an api made to add / remove them with client side ajax logic (probably not the most elegant, but works)
* uses a modified `flashes.hbs` template
* will only disappear if user closes the bar
* stack

Passive
* added with backbone view / collection combo
* stack
* disappears on navigation and when user closes it
2013-07-22 14:41:27 +01:00
Matthew Harrison-Jones
cd1835a3cf Added the ability to copy as HTML. 2013-07-22 13:50:50 +01:00
Matthew Harrison-Jones
f6f095b381 Additional Keyboard Shortcuts and improvements to text highlighting
This fixes the event where text would be selected after manipulation from shortcut, the cursor is now placed after the text. On links and images the url field text is highlighted.
Additional shortcuts;

* Ctrl+U: Make text uppercase
* Ctrl+Shift+U: Make text lowercase
* Ctrl+Alt+Shift+U: Make text titlecase
* Ctrl+Alt+W: Select word
* Ctrl+L: Make into list
2013-07-18 14:02:54 +01:00
Matthew Harrison-Jones
2ed9a17a66 Debounce scrolling on editor 2013-07-18 12:06:52 +01:00