Commit Graph

1970 Commits

Author SHA1 Message Date
Hannah Wolfe
5ca558fe06 Merge pull request #3278 from jaswilli/prod-prep
Move inline templates to standalone template file
2014-07-15 17:00:01 +01:00
Hannah Wolfe
4d610268c6 Merge pull request #3259 from novaugust/settings-mobile-routing
Refactor Settings routing and mobile interactions
2014-07-15 16:55:02 +01:00
Jason Williams
b98163c713 Move inline templates to standalone template file
Refs #3161
- Move two inline template snippets from the post tags input
  component into the .hbs template file so they can be
  pre-compiled.  Needed when shipping only the handlebars runtime
  in production mode.
2014-07-15 15:21:44 +00:00
Matt Enlow
58b635203c Remove minor notifications; Close persistent notifications even on error
Closes #3105, Closes #3175

- Removed notification on successful post's `page` status change
- Removed notification on successful post `featured` status change
- Added `closePassive()` notifications on error in the post-settings-menu
- Persistent notifications will close whether their `DELETE` request was
  successful or not.

 #### Misc
- Added `name` attribute to `post-setting-menu.hbs` inputs to facilitate testing
- Removed `return <Promise>` from action in `PostSettingsMenuController`. Actions should only return `true`
- Toggling `post.featured` won't fire NProgress.
2014-07-15 09:03:18 -06:00
Matt Enlow
153f76aa7c Refactor settings routing and mobile interactions
Closes #3254, closes #3138, closes #3245
 ### Settings Routing and View refactoring
- Refactored `SettingsView` to handle transitions between mobile and desktop layouts
- `SettingsRoute` will only transition to `settings.general` if the screen is large enough to show both the menu and the content
- Added `SettingsIndexView` to handle showing the settings menu on mobile screens
- Added `SettingsContentBaseView` to be inherited by any settings view that is not index.
- Updated Settings templates appropriately to work with new views
- Removed extraneous `active` class from `settings-content`
- Changed settings menu to use `gh-activating-list-item`
- Retooled settings tests

 ### Mobile Utils
- Renamed file to `mobile.js`, since it's inside of `utils/`
- Added `mobileQuery` MediaQueryList to help detect layout changes
- Removed unused `hasTouchScreen`, `device.js` should be used instead.
- Removed unused `smallScreen` function
- Moved FastClickInit to codemirror-mobile
2014-07-14 17:36:48 -06:00
Hannah Wolfe
3ff9146d9e Server side cleanup
- remove sessions
- remove all references to csrf
- create a shared base model for the 2 types of token
2014-07-14 21:50:12 +01:00
Jason Williams
ef1858b6c7 Fix validations on user settings page
Closes #3271
- Change validations on both server and client to allow the
  Website field to be empty or a valid URL.
- Add new schema validation helper isEmptyOrURL.
- Remove duplicate call to UserValidator in the save action
  of the SettingsUser controller.
- User.last_login and User.created_at are already Moment objects
  so Moment#fromNow can be called on them directly.
2014-07-14 18:12:57 +00:00
Hannah Wolfe
6cdf9e5999 Merge pull request #3238 from ErisDS/issue-2600
Refactor fixtures & fixture migrations to 003
2014-07-14 17:03:08 +01:00
Hannah Wolfe
0565027900 Refactoring fixtures
refs #2600, refs #2379

Refactoring fixtures to make permission management a little easier
- Separate fixtures into JSON file and split permissions fixtures from other fixtures
- make fixture migrations more robust by fetching objects, not relying on
  ids and checking before adding
- changed owner fixture slightly to remove any confusion between the 'Owner' role and 'Ghost Owner' user.
- moved 003 fixture versions out of config into logic, possibly not a good
  idea
- refactored permissions fixtures and added permissions_roles fixtures to
  make it easier to read / add
2014-07-14 15:52:47 +01:00
Harry Wolff
4f727ed068 Settings: Admin User Tab
closes #2422

- updated to use new change password method
- have all save settings use notifications
- create assetUrl helper for creating asset paths with subdir's properly
 prefixed
- move all url based helpers onto a url object in ghost-paths
2014-07-14 08:52:06 -04:00
Hannah Wolfe
e20c773e5d Merge pull request #3260 from sebgie/invited-pending
Add status invited-pending for users
2014-07-14 11:14:13 +01:00
Sebastian Gierlinger
db5e02da2b Add status invited-pending for users
no issue
- added status invited-pending for invited users where sending the
invitation email failed
- removed console.log() from authentication.js
2014-07-14 11:13:23 +02:00
Matt Enlow
0fa3ab807c Fire NProgress on User, Post, and Settings save
Closes #3037
- Created `NProgressSaveMixin`, which extends the `save` method of a model
  to fire NProgress.
- Extended `UserModel`, `PostModel`, and `SettingModel` with the new
  mixin.
- NProgress can be disabled by passing an options hash to the save function with the `{disableNProgress:true}`
- Now that the ValidationEngine isn't the only thing playing with options inside of `model#save`, refactored it to pass the options down the super chain.
2014-07-13 14:19:27 -06:00
Hannah Wolfe
a8f99df63f Merge pull request #3258 from ErisDS/model-registry
Use bookshelf's model registry plugin
2014-07-13 21:15:25 +01:00
Hannah Wolfe
6b59639331 Merge pull request #3256 from PaulAdamDavis/fix-notification-flicker
Check the end of notification fade-out animation
2014-07-13 21:14:31 +01:00
Hannah Wolfe
0e93f7fa65 Merge pull request #3248 from jaswilli/issue-3246
Add validation to invite new user form.
2014-07-13 21:13:33 +01:00
Hannah Wolfe
b03ecd9ebc Use bookshelf's model registry plugin
Refs #2170

This removes the circular dependency problem from our models thanks to
https://github.com/tgriesser/bookshelf/issues/181
- add the registry plugin
- switch all models and collections to be registered
- switch relationships to be defined using a string, which calls from the registry
2014-07-13 18:18:25 +01:00
Paul Adam Davis
b08a4b1fe5 Check the end of notification fade-out animation 2014-07-13 15:00:25 +01:00
Paul Adam Davis
718adb6c3b Re-add back to Users button and make whole user item a link. 2014-07-13 13:33:21 +01:00
Jason Williams
af51e94cf0 Add validation to invite new user form.
Closes #3246
- Add a UserValidator to the validation engine that runs a set
  of validations based on the user status.
- Added validations for invited users and active users.
2014-07-11 19:09:34 +00:00
Jason Williams
1bf975af90 Turn on update notifications for Ember admin
Issue #3160
- Use notifications API to display available update notification.
- Remove update_notification handlebars helper as now both the
  check for an available update and the notification handling
  is run from the server's admin controller index method.
- Bind the notification's location property to a css class
  for styling.
- Refactor Ember notifications to better handle notification
  objects.  Move responsibility for css class generation onto
  the notification component.
- Refactor gh-notifications component to take a location argument
  that's used to assign a css class and filter notifications.
2014-07-11 15:02:26 +00:00
Hannah Wolfe
ef1207cc0d Merge pull request #3213 from hswolff/lazy-load-models
Preparation for lazy loading of models
2014-07-11 15:29:46 +01:00
Sebastian Gierlinger
8c2258dc4c Move setup to API
closes #3136
- moved setup to authentication API
- added `POST /ghost/api/v0.1/authentication/setup` to execute the
setup process
- added `GET /ghost/api/v0.1/authentication/setup` to check if blog is
already set up (needed for #3145)
- removed unused methods from api/users.js
2014-07-11 14:17:09 +02:00
Jason Williams
4ef4d0f97a Fix handling of async db calls in fixtures
Closes #3167
- Change fixture loading methods to keep track of promises
  returned from async database calls so that aggregators function
  correctly.
2014-07-11 02:39:06 +00:00
Hannah Wolfe
49b08c3bdc Merge pull request #3236 from sebgie/issue#3074
Setup hijacks owner user
2014-07-10 21:52:41 +01:00
Sebastian Gierlinger
215badc663 Setup hijacks owner user
closes #3074
- user generated by fixture is hijacked
- user is updated with name, email, password, slug and status
- creates new user if db is migrated but no user exists
- previously removed tests are back
2014-07-10 19:29:51 +02:00
Harry Wolff
25076ab087 Fix slowdown of tests by reverting back to using knex in test/utils 2014-07-10 08:05:03 -04:00
Harry Wolff
cddd23f926 Only reference model properties through the models module.
This frees us up to enforce one single point of access, thus paving
the way towards allowing us to initialize the models at are request,
and not when it's require().

addresses #2170
2014-07-10 08:04:32 -04:00
Harry Wolff
e3520feeec Move creation of knex instance to config module
addresses #2170
2014-07-10 08:00:24 -04:00
Hannah Wolfe
b69b5e7638 Merge pull request #3230 from jaswilli/issue-3226
Fix active theme selector.  Add validation to API.
2014-07-10 12:52:01 +01:00
Hannah Wolfe
f0ce3f2d02 Merge pull request #3235 from sebgie/issue#3073
Add owner fixture
2014-07-10 12:03:47 +01:00
Sebastian Gierlinger
5e4fae6f11 Add owner fixture
closes #3073
- added fixture for owner role
- added fixture for initial user (new db)
- added conversion administrator -> owner (existing db)
- changed tests to take over owner user
- removed some functional tests until /setup works with owner user
2014-07-10 12:00:51 +02:00
Jordan Sexton
66ae7e5669 Removed duplicative and unreferenced resources section 2014-07-09 18:48:00 -05:00
Jason Williams
fddf2ee42f Fix active theme selector. Add validation to API.
Closes #3226
- Remove dependent property from the computed content property
  that is used to build the active theme selector.
- Add validation to the Settings model so that it rejects
  attempts to set an activeTheme that is not installed.
2014-07-09 22:14:33 +00:00
Hannah Wolfe
d2cc9e5046 Merge pull request #3223 from ErisDS/issue-3187
Move post slug endpoint & add endpoints for users
2014-07-09 21:21:01 +01:00
Hannah Wolfe
a593cbfb53 Move post slug endpoint & add endpoints for users
closes #3187

- move slug endpoint to post/slug/:slug
- create similar  slug and email endpoint for users
- add/update tests
2014-07-09 16:55:34 +01:00
Sebastian Gierlinger
5b0b308513 Owner has all user permissions
closes #3075
- added special treatment for role with name ‚Owner‘
2014-07-09 13:34:38 +02:00
Hannah Wolfe
09e03f4d78 Merge pull request #3221 from sebgie/issue#3197
Add role to user object
2014-07-08 17:18:22 +01:00
Hannah Wolfe
84309e47eb Merge pull request #3219 from JohnONolan/email
New HTML email template
2014-07-08 17:06:48 +01:00
Sebastian Gierlinger
035fb04d34 closes #3197
- added role to user obj (only returned from the user endpoint)
- added `/users/?include=roles` and
`/users/?include=roles,roles.permissions` query parameters
- added and updated tests
2014-07-08 18:00:59 +02:00
Maurice Williams
889239b326 Wiring up "resend" and "revoke" button on user management screen
fixes #3214
- new ```resendInvite``` method on the User model encapsulates all logic
- only sending users email address when re-inviting, since the user already exists on the back-end
- ```revoke``` calls DELETE on /ghost/api/v0.1/users/:user_id
2014-07-08 11:32:34 -04:00
John O'Nolan
474e888b8f New HTML email template
See #3082
2014-07-07 22:47:34 +02:00
Hannah Wolfe
56b680a689 Merge pull request #3217 from PaulAdamDavis/new-form-style
New form styles
2014-07-07 20:38:22 +01:00
Hannah Wolfe
0febf71c97 Merge pull request #3216 from novaugust/mobile-menu
Fix mobile sidebar menu
2014-07-07 20:38:04 +01:00
Hannah Wolfe
4fe37c00b5 Merge pull request #3211 from novaugust/yearless-date-parsing
Add yearless date as an acceptable format for moment parsing
2014-07-07 20:13:13 +01:00
Paul Adam Davis
4f5f84e02a Aditional classes in settings and invite user modal for the new form style 2014-07-07 17:00:47 +01:00
Matt Enlow
77941275ed Fix mobile sidebar menu
Closes #3110
- Created `ApplicationView`
- Added `js-close-sidebar` classes to navbar navigation links
- Clicking on a navigation link in the sidebar will close it
2014-07-07 08:55:22 -06:00
Hannah Wolfe
906634ab68 Merge pull request #3207 from morficus/invite-new-user-modal
Implementation of "invite a new user" modal
2014-07-07 15:05:35 +01:00
Matt Enlow
c1dc9841c7 Add yearless date as an acceptable format for moment parsing
Closes #2331
2014-07-06 20:49:15 -06:00
Maurice Williams
972831c733 Implementation of "invite a new user" modal
Closes #3079
- new controller and template for invite-new-user-modal
- actually triggers email invite via POST /ghost/api/v0.1/users/
- setting default language value (on the client) when creating a user
- only available role is "Author" - pending 3196
- updates to UsersIndexController to allow dynamic property calculation and template rending
2014-07-06 16:18:51 -04:00