Commit Graph

84 Commits

Author SHA1 Message Date
Jason Williams
b05da0f1e4 Auto-save changes
Refs #4259
- Auto-save new post when title loses focus.
- If a post has '(Untitled)' for a title, regenerate slugs
  on all title changes--same behavior as a new post that does
  not yet have a slug.
- Adjust some functional tests to handle the automatic transition
  from editor/new to editor/editor and the URL changes that go
  along with it.
2014-10-17 22:52:43 +00:00
Hannah Wolfe
6e3fa3a2cf Merge pull request #4259 from novaugust/auto-save
Auto save draft posts
2014-10-17 19:04:07 +03:00
Hannah Wolfe
d44a97405b Merge pull request #4220 from felixrieseberg/iss4211
Shorter user slugs (if possible)
2014-10-16 21:23:50 +03:00
Paul Adam Davis
028b878721 Rename .object-list to .user-list
No issue
References todo comment in [users.scss](91c07e37bf/core/client/assets/sass/layouts/users.scss (L6-L7))

- Renames anything starting with `.object-list` to `.user-list`
- Adjusts tests to match
2014-10-13 22:43:03 +01:00
Matt Enlow
a9fb2af7ea Autosave Draft posts
Ref #1413
- If the user stops typing for 5 seconds, a "typingPause" action is sent from the GhCodemirrorComponent
- Editor-base-controller ties the "typingPause" action to its "autosave"
- If a post is being saved and does not have a title, the title is set to "(Untitled)"
- Cleanup editor base controller property dependencies and code
2014-10-13 15:28:27 -06:00
Felix Rieseberg
0025f3d6de Shorter user slugs (if possible)
Closes #4211
2014-10-01 23:27:21 +02:00
Fabian Becker
aed5d346a7 Static page and feature options in new PSM
closes #4109
- Add featured option
- Move static page/featured to other place
- Change wording on static page
2014-09-24 12:29:17 +00:00
Harry Wolff
469aaa398c Add jscs task to grunt file and clean up files to adhere to jscs rules.
resolves #1920

- updates all files to conform to style settings.
2014-09-17 21:44:29 -04:00
Fabian Becker
961ab5f064 Post Settings Menu - Step 1
closes #3936
- Implement new PSM
- Hook up close action
- Automatically close when view is destroyed
- Close on click and when pressing ESC
2014-09-10 17:31:19 +02:00
Jason Williams
1d6b1f9667 Prevent editor title from being overwritten
Closes #3955
- Change titleScratch from being bound to the title to being
  set when entering the editor so it is not overwritten on a
  model refresh.
- Ensure that the "unsaved content" dialog is shown when there are
  changes to the "scratch" fields after a post-settings-menu change.
- Add tests to prevent regression.
2014-09-04 19:27:59 +00:00
Fabian Becker
bc558cf0d2 Apply JSHint to test files.
closes #2666
- Add new jshint:test task
- Fix jshint errors
2014-09-03 20:33:58 +02:00
Hannah Wolfe
25e08d6af5 Merge pull request #3882 from JohnONolan/fix-profile
Fix up user profile
2014-08-26 12:30:00 +01:00
Hannah Wolfe
5e126dfcd9 Fixing settings tests 2014-08-26 12:18:00 +01:00
Hannah Wolfe
c40535775f Update editor markdown tests
closes #1299

- update tests to check for full strings with spaces now that this is no
  longer an issue
- reorganise duplicated test for images
2014-08-23 14:22:43 +01:00
Hannah Wolfe
edc9f5e164 Merge pull request #3816 from felixrieseberg/iss3671
'Autocorrect' for posts per page setting
2014-08-20 13:44:29 +01:00
Hannah Wolfe
6c96d00bcc Merge pull request #3767 from jaswilli/clear-ws-slug 2014-08-19 10:13:45 +01:00
Felix Rieseberg
acf8ffc1fb 'Autocorrect' for posts per page setting
See #3671
- As @JohnONolan’s suggestion, if the user enters an invalid value for
the ‘posts per page’ setting, the number autocorrects to 5, iOS
autocorrect-style
2014-08-18 23:24:59 -06:00
Jason Williams
c4fb17d2d7 Reset slug input text box after invalid input.
No Issue
- When an invalid, all whitespace slug is entered into the
  slug input in the post settings menu, it's rejected but
  the input's value still remains the same.  This resets the
  input back to its original value.
- Added test for the above behavior.
- Only show success notification if slug was actually changed.
- Convert whitespace from tabs to spaces in post-settings-menu.hbs
2014-08-18 21:10:57 +01:00
Hannah Wolfe
02ca955a00 Merge pull request #3766 from jaswilli/user-slug
Correct behavior on updating user slug.
2014-08-18 20:55:54 +01:00
Jason Williams
e73468fb1e Fix and enable general and user settings tests.
Conflicts:
	core/test/functional/client/settings_test.js
2014-08-18 20:44:26 +01:00
Hannah Wolfe
3bf3d497cf Fixing tests, PSM and settings pane
- resolving test failures where number of tests changed
- fixing issue with PSM label
- re-removing app settings screen code
2014-08-18 18:16:09 +01:00
John O'Nolan
04536b3916 God damn tests 2014-08-17 22:23:00 +03:00
John O'Nolan
85b7819791 Implement new button markup 2014-08-17 14:57:07 +03:00
Hannah Wolfe
e8ad143705 Merge pull request #3785 from jaswilli/post-status
Revert post status on failed save.
2014-08-15 18:27:47 +01:00
Hannah Wolfe
260d9562e4 Merge pull request #3670 from felixrieseberg/iss3641
Validation fix for number of posts/page
2014-08-15 18:27:14 +01:00
Jason Williams
1c4c4eb5de Correct behavior on updating user slug.
No Issue
- Defer save until after slug is checked.
- If new slug is empty or all whitespace, reset to previous value.
- If new slug is the same as existing slug except for an increment
  value (e.g. ghost-user-2), use the original slug.
- If the slug has changed, change the URL path to reflect the
  change so that the browser refresh and back button still work.
- Added tests.
2014-08-15 04:00:19 +00:00
Jason Williams
24a97db1be Revert post status on failed save.
Refs #3667, Refs #3776
- If saving a post fails, revert its status back to the
  pre-save value.
- Added tests to check post status after failed save attempt
  on both new and existing posts.
2014-08-15 00:22:10 +00:00
Hannah Wolfe
868219d0a9 Merge pull request #3776 from felixrieseberg/iss3667
Ensure editor awareness if publishing fails
2014-08-14 21:19:21 +01:00
Felix Rieseberg
6e8c98e27c Ensure editor awareness if publishing fails
closes #3667
- If the ‘save’ function on a new post fails, the local Ember model
still beliefs that the status is ‘published’, resulting in wrong
buttons. A simple catch fixes that.
2014-08-14 11:05:05 -07:00
Felix Rieseberg
f19c2be6fe Validation fix for number of posts/page
closes #3641
- Reworded error messages, remove “please” (credits go to @YouriAckx)
2014-08-13 12:08:09 -07:00
Jason Williams
2eb9a48c48 Fix and enable general and user settings tests. 2014-08-13 14:14:29 +00:00
Paul Adam Davis
a11e25c12b Add ghost logo anchor tag
Amends #3736, references #3623

With `button.ghost-logo`, there's no `href`, so cannot be opened in a new window. This changes it back to an anchor and appends the blog URL to a href attribute. Win!

Bumps Ghost-UI version to 0.8.13 bring in related CSS changes.
2014-08-11 12:08:08 +01:00
Hannah Wolfe
e5771b0b3f Merge pull request #3736 from novaugust/ghost-burgers
Fix -navbar events attachment
2014-08-10 22:45:50 +01:00
Matt Enlow
d61e37e799 Fix -navbar events attachment
Closes #3623
- Move hamburger logic to action with terrible name, "toggleSidebarOrGoHome"
- Move ".js-close-sidebar" events to a document.on(event, *selector*, f) to make sure they attach even when the js-close-sidebars aren't on page (ie, hidenav)
2014-08-10 15:31:47 -06:00
Hannah Wolfe
32d72d5daa Expose blog URL to client app
fixes #3724

 - provide config.url to the ember client app via a data attribute
 - create server and client side helpers to output the URL
 - wire up the client side helper
 - add a class for testing, and add tests for both the server and client side
2014-08-10 18:49:37 +01:00
Paul Adam Davis
6615f7aad3 Swap notification close link for a button
No issue

- Swap out notification <a> close link for <button> (gains a native hover state)
2014-08-05 20:08:03 +01:00
Sebastian Gierlinger
c62d7ba43e Improve spam prevention
closes #3544
- limit forgotten password requests to five requests per IP per hour
for different email addresses
- limit forgotten password requests to five requests per email address
- limit signin requests to ten failed requests per IP per hour
- removed special treatment for tests
2014-08-05 12:58:58 +02:00
Paul Adam Davis
a7b5c72e68 Change user menu link to a button
Closes #3546

- Change user menu popover toggle from a <a> to a <button>
- Change tests accordingly
2014-08-01 10:56:03 +01:00
Hannah Wolfe
59953c6610 Merge pull request #3486 from sebgie/issue#3468
Update spam prevention
2014-08-01 00:10:50 +01:00
Sebastian Gierlinger
3792598a31 Update spam prevention
closes #3468
- added rate limit to deny more than 5 attempt every hour
- updated spam prevention to be configurable
- added config values spamTimeout, ratePeriod, rateAttempts
- added ratePeriod:1 to config.example.js to prevent functional tests
from hitting the rate limit
- commented spam test, I’ll fix it tomorrow
2014-08-01 00:58:32 +02:00
John O'Nolan
854a3041fd Shorter notifications
Basic notifications are unnecessarily verbose and, in some instances, even cause line-wrapping to occur. This change shortens them to short, concsise statements to indicate what action has taken place.
2014-07-31 19:19:47 +03:00
Matt Enlow
21abed7f9a Add User Role Dropdown
Closes #3402, Closes #3428

-------------------

 ### Components
- Added GhostSelectComponent to handle async select creation (h/t @rwjblue)
- Added GhostRolesSelector (extends GhostSelect) for displaying user role options
- Created StoreInjector for surgically inserting the store into things that normally wouldn't have them.

 ### Users Settings
- InviteNewUserModal now uses GhostRolesSelector & defaults to Author
- The role dropdown for user settings has permissions set per 3402

 ### User Model
- Added `role` property as an interface to getting and setting `roles`
- Refactored anything that set `roles` to set `role`
- isAdmin, isAuthor, isOwner and isEditor are all keyed off of `role` now

 ### Tests
- Added functional tests for Settings.Users
- updated settings.users and settings.users.user screens
- fix spacing on screens

 ### Server Fixtures
- Fixed owner fixture's roles
2014-07-30 17:59:14 -06:00
Jason Williams
725d4aac7d Fixup signin and signout
No Issue
- Move authentication related handlers to the Application route.
- Switch Sign Out from a button to a link.  Use the signout route
  to handle invalidating the session and redirecting instead of
  an action from a button.
- Clear error messages on signin page when pressing log in button.
- Errors are now always shown on sign in screen and a success
  notification is shown after sign out.
- Update functional tests.
2014-07-29 20:58:43 +00:00
Sebastian Gierlinger
d895238571 Add XSS prevention
closes #3387
- added placeholder for <script> and <iframe>
- added google-caja sanitizer
- changed title in posts overview to ‚double-stash‘
2014-07-27 23:03:01 +02:00
Paul Adam Davis
93051fcbdb Change signout link to button
References https://github.com/TryGhost/Ghost-UI/issues/65

- Swap signout link from an `<a>` tag to `<button>`
- Changed tests to match new element
2014-07-23 22:12:45 +01:00
Hannah Wolfe
4c276603ec Fix tests tripping spam protection 2014-07-21 14:33:42 +01:00
Sebastian Gierlinger
ab456638c1 Fix tests failing because of spam protection
closes #3128 (now really)
- added express variable disableLoginLimiter
- added disableLoginLimiter to all tests that use Ghost as module and
do authentication
- fixed isSetup not working for status other than active
- removed ‚Ensure a User is Registered‘ test as this is covered by the
new setup test
2014-07-17 14:22:32 +02:00
Sebastian Gierlinger
42f461cb6d Restored spam prevention
closes #3128
- added spam prevention middleware
- restored tests
2014-07-17 14:22:07 +02:00
Hannah Wolfe
5c1a7a7349 Revert "Restore spam prevention" 2014-07-17 12:11:23 +01:00
Hannah Wolfe
ef8c280635 Merge pull request #3282 from sebgie/issue#3128
Restore spam prevention
2014-07-16 19:39:32 +01:00