1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Commit graph

47 commits

Author SHA1 Message Date
Hannah Wolfe
efa988c1c4 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
a6b6c2af34 Merge pull request #456 from matthojo/Keyboard-Shortcut-Improvements
Keyboard shortcut improvements
2013-08-20 07:05:41 -07:00
Matthew Harrison-Jones
641c44adc3 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
a85385b2f1 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
cff5d218b8 Manually merging pull request #439 from javorszky/iss354
Conflicts:
	core/client/views/login.js
2013-08-20 10:11:09 +01:00
Gabor Javorszky
f521a88db1 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
1b0b4b2285 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
1227693e25 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
433e9681d9 Included missing Mac 'code' keyboard shortcut 2013-08-19 15:10:53 +01:00
Jacob Gable
776c8c2eca 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
5bedb4e744 Edit Post Permissions 2013-08-18 12:28:05 -05:00
Hannah Wolfe
8ce7118bb3 Merge pull request #404 from matthojo/mobile-interactions
Mobile interactions
2013-08-18 09:19:06 -07:00
Hannah Wolfe
5a1668280b Merge pull request #393 from matthojo/Modal-Fixes
Several Modal Fixes
2013-08-18 09:05:49 -07:00
Gabor Javorszky
ab08e07300 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
9362ee7f02 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
51fcd043fb 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
dade7c1512 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
dbb9b3bbfe Fixed word count grammar
Closes #349
- Added utility function to pluralize when appropriate.
2013-08-11 11:55:42 -05:00
Hannah Wolfe
2e8875fb75 Minor code cleanup, docs and other bits & pieces 2013-08-06 22:24:40 +01:00
Hannah Wolfe
6440596d5e Merge pull request #339 from javorszky/iss282
Users can change password
2013-08-06 01:17:43 -07:00
Hannah Wolfe
af6d3e1c23 Merge pull request #338 from cobbspur/upload-plugin
Added image upload reusable plugin
2013-08-06 01:02:30 -07:00
Hannah Wolfe
af1051720e Fixing unused variables 2013-08-06 09:00:12 +01:00
Hannah Wolfe
bf3ba76037 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
0dcb9d0c9a 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
0891ff4376 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
4d5d68511e 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
94887bff71 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
61249508e9 Moved delete post confirm alert to new modal format 2013-08-05 10:16:31 +01:00
Hannah Wolfe
33d00f781b 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
67b517fbbd 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
845c55d1ad Removed admin-ui-temp.js and moved code to it's relative places 2013-08-01 15:28:13 +01:00
Gabor Javorszky
a856087580 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
45f3f2a143 Improved modal creation, now includes info and action types. 2013-07-26 15:32:44 +01:00
Matthew Harrison-Jones
7bb92d508d 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
b44c870520 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
21250f7102 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
b1353db433 Merge pull request #297 from matthojo/Editor-Scrolling
Debounce scrolling on editor
2013-07-22 08:00:15 -07:00
Matthew Harrison-Jones
a2b4ca56bf Move notification dismissal events to Backbone
Also removes stray notification alert comments
2013-07-22 14:41:28 +01:00
ErisDS
68d384b43b Bug Fix: title of deleted post in content view notification is now correct 2013-07-22 14:41:28 +01:00
Gabor Javorszky
416a6848fc 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
b724e12d88 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
73202f5be7 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
53be53eb3b Added the ability to copy as HTML. 2013-07-22 13:50:50 +01:00
Matthew Harrison-Jones
9de10810a3 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
62c85a846a Debounce scrolling on editor 2013-07-18 12:06:52 +01:00
Matthew Harrison-Jones
0a7182100d Fixes back button breaking settings panels 2013-07-15 18:09:10 +01:00
Hannah Wolfe
5ff84fcc68 App restructure - closes #245
- This is a first pass at getting a more logical structure. The focus is on moving from admin/frontend to client/server.
- The location of the databases is highly important, this isn't expected to change again
In the future
- client/assets should probably become public/
- more stuff should be shared (helpers etc)
- cleanup some confusion around tpl and views
2013-07-11 20:23:34 +01:00