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

500 commits

Author SHA1 Message Date
Kevin Ansfield
d2a7466b7d 🐛 fix issue with re-uploading a deleted theme (#725)
closes https://github.com/TryGhost/Ghost/issues/8515

- ensure the theme record is removed from the store when deleting because theme IDs get re-used unlike other models
2017-06-01 15:44:04 +02:00
Kevin Ansfield
7eefbba69f 💄🐷 sort-imports eslint rule (#712)
no issue

- adds `eslint-plugin-sort-imports-es6-autofix` dependency
  - implements ESLint's base `sort-imports` rule but has a distinction in that `import {foo} from 'bar';` is considered `multiple` rather than `single`
  - fixes ESLint's autofix behaviour so `eslint --fix` will actually fix the sort order
- updates all unordered import rules by using `eslint --fix`

With the increased number of `import` statements since Ember+ecosystem started moving towards es6 modules I've found it frustrating at times trying to search through randomly ordered import statements. Recently I've been sorting imports manually when I've added new code or touched old code so I thought I'd add an ESLint rule to codify it.
2017-05-29 20:50:03 +02:00
Katharina Irrgang
7727610ee7 🎨 improve importer errors/warnings display (#711)
refs https://github.com/TryGhost/Ghost/issues/5422
- handles errors and warnings from returned from the server and improves visual display
- adds a reset so that errors are cleared when leaving the labs screen
- removes the unnecessary "Import failed" alert - we already show the errors on the screen, no point bugging the user even further
2017-05-24 14:36:59 +01:00
Kevin Ansfield
86d5a6bf57 🐛 fix errors when navigating after successful import
no issue
- the synchronous settings service keeps an internal reference to the settings model, when everything in the store is unloaded during an import that reference breaks and will throw errors when accessing areas of the app that read values from it. This change adds an explicit reload of the settings model during import so that later navigation doesn't break.
2017-05-24 11:58:06 +01:00
Kevin Ansfield
9db932ee48 streamline image uploads in settings/general (#702)
refs TryGhost/Ghost#8455

- ensure `uploadUrls` and `errors` are cleared in `gh-uploader` when new uploads are started
- yield `isUploading` in `gh-uploader` component
- replace image upload modals in settings/general with in-page uploads
2017-05-23 10:50:04 +02:00
Kevin Ansfield
a7323de3c4 🐛 fix disappearing nav after import (#707)
closes https://github.com/TryGhost/Ghost/issues/8307

- Ember 2.13 has a behaviour change to `store.unloadAll` where the records aren't removed until later in the runloop resulting in errors if the store is used to find records before it's completed. See https://github.com/emberjs/data/issues/4963
2017-05-23 10:17:12 +02:00
Aileen Nowak
371b9fd78e 🐛 Make cmd+s work for all save-buttons (#700)
closes TryGhost/Ghost#8443
- Fixes a bug where the keyboard shortcut `cmd+s` would cause a `Maximum call stack size` error and not save.
- Wherever there is a `save` button, the keyboard shortcut to save works now.
2017-05-18 11:48:37 +01:00
Rodney Folz
7457ffb26d 🐛 permit Facebook usernames with less than 5 chars (#632)
refs https://github.com/TryGhost/Ghost/issues/8296
- permit Facebook usernames with less than 5 chars
    - brands are allowed to have Page names with less than 5 chars (ex: facebook.com/nike)
    - current/former employees are allowed to have usernames with less than 5 chars (ex: facebook.com/zuck)
2017-05-15 19:26:34 +01:00
Katharina Irrgang
7169a14568 🔥 Adapt image property changes (#661)
refs https://github.com/TryGhost/Ghost/issues/8348, requires https://github.com/TryGhost/Ghost/pull/8364
- rename all image properties
- e.g. author.image --> author.profile_image
- test all image functionality
2017-04-24 18:22:39 +01:00
Kevin Ansfield
0d385df8b2 🐛 fix setup/signup avatar uploads (#667)
closes https://github.com/TryGhost/Ghost/issues/8375

- `jQuery.ajax` has removed the `.success` and `.error` methods, replacing them with `.done` and `.fail`
2017-04-24 11:28:30 +02:00
Kevin Ansfield
6ef7fcafda 🐛 fix broken sidebar after successful import (#658)
closes TryGhost/Ghost#8307

- unloading the store and refreshing the `session.user` attribute after an import was triggering a rendering edge case where the style was re-computed and a re-render was attempted after the sidebar has been destroyed
- rather than binding a style attribute directly to a CP in `gh-nav-menu` we pass the menu icon in (using `settings.settledIcon` - see below) and manually set the style attribute via the `didReceiveAttrs` hook so that outside changes don't trigger re-computations when we don't expect them and so we can still react to icons being uploaded or removed
- our usage of `settings.icon` is a bit of an odd situation because it's a link to an external resource that will only resolve correctly after a successful save - if we change `settings.icon` in the local store and the nav menu icon style updates before the save has been completed then the server will give us the old icon. To work around this a `settings.settledIcon` attribute has been added that is only updated when we receive data from the store ensuring that our cache-busting technique works correctly
2017-04-19 18:57:56 +02:00
Kevin Ansfield
c1a9726f1b 💄 refactor setup screens to use ember-concurrency (#644)
refs TryGhost/Ghost#7865

💄 refactor signup to use ember-concurrency

refs https://github.com/TryGhost/Ghost/issues/7865
- moves authentication actions from `signup` route to controller
- refactors authentication and signup logic into EC tasks
- replaces use of `gh-spin-button` with `gh-task-button` in signup template

💄 refactor setup screens to use ember-concurrency

refs https://github.com/TryGhost/Ghost/issues/7865
- moves authentication actions from `setup/two` route to controller
- refactors authentication and setup logic into EC tasks
- replaces use of `gh-spin-button` with `gh-task-button`
- fixes some styling issues with the new SVG icons
- adds `app/styles/patterns/icons.css` back to contain per-icon overrides and animations (some SVGs use fills and others use strokes so we sometimes have conflicting styles)
2017-04-19 12:27:32 +02:00
Kevin Ansfield
6e573b7ab9 add "delete post" button to the PSM (#649)
closes https://github.com/TryGhost/Ghost/issues/8332

- moves `toggleDeletePostModal` action from the `edit` controller to the `editor-base-controller` mixin
- adds delete button to the bottom of the PSM unless it's a new post
- adds `deletePost` attribute to `gh-post-settings-menu` to allow a delete post action to be passed in
2017-04-19 11:46:42 +02:00
Kevin Ansfield
85e3bab83c 💄 refactor signup to use ember-concurrency
refs https://github.com/TryGhost/Ghost/issues/7865
- moves authentication actions from `signup` route to controller
- refactors authentication and signup logic into EC tasks
- replaces use of `gh-spin-button` with `gh-task-button` in signup template
2017-04-17 10:21:38 -04:00
Kevin Ansfield
ff1717d1ba 🐛 fix content filters jumping when loading screen is shown
no issue
- ensure content filters in the loading screen have the same styles
- add session injection to `posts-loading` controller so that the authors dropdown doesn't appear when changing filters when logged in as an author
2017-04-13 12:26:04 +01:00
John O'Nolan
9081e33f26 Content filter styling 2017-04-10 13:16:19 +02:00
Kevin Ansfield
57b27e4b9c 🐛 fix sticky dropdown links (#621)
closes https://github.com/TryGhost/Ghost/issues/8269

- swaps the usage of our custom `gh-dropdown` component in the user menu dropdown for the `ember-wormhole` based `ember-basic-dropdown` that is used elsewhere in the app and will fully replace `gh-dropdown` in the future
- adds `gh-basic-dropdown` component that extends from `ember-basic-dropdown` and hooks into our `dropdown` service so that we can programatically close dropdowns from disparate areas of the app
- modifies the `body-event-listener` mixin to pass the click event through to it's consumers
- modifies the `bodyClick` handler in the `dropdown` service to check if the click actually originated from an ember-basic-dropdown element - this body click handler will go away once we've fully switched to `gh-basic-dropdown`
- adds `ember-native-dom-helpers` to provide consistency between acceptance and integration tests (this is the start of another refactor, eventually this addon will disappear as part of ember's [grand testing unification project](https://github.com/rwjblue/rfcs/blob/42/text/0000-grand-testing-unification.md))
2017-04-05 15:26:01 +01:00
Kevin Ansfield
2f56152dbf 🎨 synchronous settings service
no issue
- adds `settings` service that acts as a proxy to the singular settings model with methods to fetch and reload, also prevents accidentally loading only some settings types which has caused problems in the past
- updates app boot, signin, and signup processes to fetch settings ensuring that any part of the app can grab settings synchronously if needed
- removes `timeZone` service, it's no longer needed as we can grab `settings.activeTimezone` directly
- replaces all store queries for the settings model with appropriate `settings` methods
- refactors `apps/*` routes/controllers, they had become a little convoluted with the way they were dealing with settings and the new service helped to clean that up
2017-03-20 07:43:49 -05:00
Kevin Ansfield
092b59fe3f show theme warnings/errors when activating a theme (#576)
closes https://github.com/TryGhost/Ghost/issues/8127
- update theme activation to manually set other themes to `active: false` in the store now that we only the active theme back from `/themes/:name/activate` endpoint
- move theme warning list item rendering into `{{gh-theme-error-li error=x}}`
- add `theme-warnings` modal that accepts a warnings list, title, and optional message
- after activating a theme, check if the theme has any warnings or errors and display an appropriate modal informing the user
2017-03-14 08:54:58 -05:00
Austin Burdine
33db4b538a 🐛 ensure tag property exists before trying to trim it (#578)
no issue
- fixes error thrown when you focus in/focus out of a field in the tags
editor without entering anything
2017-03-14 10:05:59 +00:00
Kevin Ansfield
97300e3531 suspend user feature
requires https://github.com/TryGhost/Ghost/pull/8114
- adds "(Un-)Suspend User" options on user profile page with a modal confirmation screen
- separates team index into "active" and "suspended" users
- adds "suspended" badge to user profile when suspended
2017-03-13 13:00:48 +01:00
Austin Burdine
525e6c85d0 🎨 convert post-settings-menu into a component (#137)
no issue
- cleans up some of the render code
- aligns things with the "ember way"
- move metaTitleScratch and metaDescriptionScratch bindings to post model
2017-03-10 14:30:01 +00:00
Kevin Ansfield
d95b2b1d31 🎨 refactor signin screen to use ember-concurrency & gh-task-button (#571)
refs https://github.com/TryGhost/Ghost/issues/7865
- convert all signin related actions to ember-concurrency tasks and consolidate in the signin controller rather than spread across controller+route
- add `successClass` and `failureClass` params to `gh-task-button` that can be used to override the default success/failure button classes
- prevent clicks on `gh-task-button` from triggering form actions (this behaviour should never be necessary, task buttons should either be separate to the form as in the "forgot?" button or the form action performs the same task and can be triggered by a standard form submit)
2017-03-09 14:48:54 -07:00
Kevin Ansfield
bc4e607661 🎨 refactor settings screens to use ember-concurrency & gh-task-button
refs https://github.com/TryGhost/Ghost/issues/7865
- updates all settings screens to use EC tasks and `gh-task-button` to get save-state save buttons
- removes now-unused `settings-save` mixin
- moves the order of button color CSS so that grey buttons can change to green/red after completing
- removes the heading from `apps-loading` template so that there's no odd flash when loading slack/amp screens directly
2017-03-08 10:00:03 -07:00
Kevin Ansfield
9e34812986 🐛 fix blank PSM meta description placeholder
no issue
- with the new editor there's no longer a `.rendered-markdown` preview element so the meta description placeholder stopped working
- this uses the `post.html` attribute in place of the old preview element, the downside to this is that `post.html` and therefore the meta description placeholder is only updated on save but that's better than not having any placeholder
2017-03-08 09:42:32 -07:00
Kevin Ansfield
df3da411df 🎨 move theme activation to /themes endpoint
requires https://github.com/TryGhost/Ghost/pull/8093
- adds `theme.activate()` method and associated adapter method for activating themes rather than relying on `settings.activeTheme`
- minor refactors to the `modals/upload-theme` component to use a full theme model
2017-03-08 10:46:33 +00:00
Kevin Ansfield
d2449ea5df add "sort by" dropdown to content screen filters (#565)
closes TryGhost/Ghost#7860
- add "sort by" dropdown allowing to order posts by earliest or latest publication date
2017-03-07 10:36:28 -07:00
Kevin Ansfield
0fda67d24c disable email input field when using OAuth, direct users to my.ghost.org for login details (#560)
no issue

- disables user email input field when using Ghost OAuth because email addresses are synced from the central identity management system
- adds a link to my.ghost.org account management when using Ghost OAuth and viewing your own user
2017-03-03 14:24:43 +01:00
Kevin Ansfield
dc351d3073 add dropdown filters for post type, author, and tag (#554)
refs TryGhost/Ghost#7860
- removes post type filter links
- adds dropdown filters for post type, author, and tag
- replaces custom refresh on query params change with Ember's standard `refreshModel` config
2017-03-02 12:35:09 -06:00
Kevin Ansfield
bd45481027 remove unnecessary posts/index route (#545)
no issue
- the index route/controller/template was initially used for a separate loading state within the posts screen layout, this isn't necessary however as the same effect can be achieved with the `posts-loading.hbs` template
- this change also lays the groundwork for more complex dropdown-based filters as it enables the filters and query params to live in the same controller+template
2017-02-23 18:47:52 +00:00
Kevin Ansfield
0f4ea73254 rename settings/navigation -> settings/design, move theme management (#543)
no issue

- following from the `settings/general` redesign, navigation and themes management are now co-located in `settings/design`
2017-02-21 19:04:50 +00:00
Kevin Ansfield
c43974c14b fetch themes from /themes endpoint (#542)
refs https://github.com/TryGhost/Ghost/pull/8022

- use `/themes` API endpoint to fetch list of themes instead of `settings[0].availableThemes`
2017-02-21 18:28:44 +00:00
John O'Nolan
51cdd60b3e Style updates to new app frame for all other screens 2017-02-17 10:14:16 +00:00
Kevin Ansfield
503e8d8263 Update styles for content screen, buttons, and app frame
* Updates styling on content management screen, replaces button styles, tweaks application frame style
2017-02-16 19:50:05 +00:00
Kevin Ansfield
791a8197e3 defer navigation display until user promise is fulfilled 2017-02-01 17:03:38 -06:00
Kevin Ansfield
11dd3b93ff 🔥 remove unused CPs (#509)
no issue
-  `settings/general` controller contained a number of `xImageSource` CPs that are no longer being used
2017-01-26 11:01:49 -06:00
Aileen Nowak
7af0f51b53 Blog icon uplod (#397)
refs TryGhost/Ghost#7688
- Adds new upload functionality for a blog icon in general settings.
- Icons will be uploaded to a new endpoint `uploads/icons` to trigger different validations.
2017-01-26 11:17:34 +00:00
Kevin Ansfield
b73a3f0b29 New content screen prototype (#503)
refs https://github.com/TryGhost/Ghost/issues/7860

- remove preview pane from content screen
- add basic post status filters
- replace custom infinite scroll with ember-infinity and increase trigger threshold for improved scroll behaviour

Commits:
* basic content list + filter using existing infinite scroll and pagination
* swap our custom pagination + infinite loader for `ember-infinity`
* minor cleanups
* reset scroll position when changing filter
* fix tests
* remove client-side sorting step as we no longer have a live collection
* remove unused `mobile-index-route`
* add acceptance tests for content screen filters
2017-01-25 21:05:28 +01:00
Kevin Ansfield
1189c1b505 refactor reset password screen to use ember-concurrency (#502)
refs https://github.com/TryGhost/Ghost/issues/7865
- swap promise based action for an ember-concurrency task
2017-01-25 07:00:58 -06:00
Aileen Nowak
b93fb0443e AMP app integration (#483)
refs TryGhost/Ghost#7769
- adds Google AMP to `apps` in order to disable and enable it on request.
2017-01-20 09:33:54 +00:00
John O'Mahoney
2ea63c6753 Show error message for invalid data in PostsPerPage (#419)
closes TryGhost/Ghost#7746
- Added gh-form-group around PostsPerPage
- Changed focusOut action to validate
- Removed now redundant `checkPostsPerPage()` call
2017-01-08 09:55:19 -06:00
Kevin Ansfield
bd458ba1f9 add extra escaping when using htmlSafe on user input (#469)
no issue
- ensure that we always pre-escape user input when it's used within `htmlSafe` marked output
2017-01-04 08:52:00 -07:00
Kevin Ansfield
4a604ce64f Update code to match eslint rules
no issue
- switch `jscs` and `jshint` inline config to `eslint` config
- fix eslint errors, predominantly in tests where the config now the main app config more closely
2016-11-14 13:26:00 +00:00
Kevin Ansfield
3fe6124745 🐛 fix more asset paths (#360)
no issue
- #309 introduced a change to our asset path but some images, particularly around the team page and user avatars were missed, this fixes those URLs to use the new `ghostPaths.assetRoot` helper
2016-10-21 09:44:25 +01:00
Kevin Ansfield
03096936f5 deps: ember@2.8.2 2016-10-07 17:32:30 +01:00
Kevin Ansfield
1f36c94109 deps: ember-light-table@1.4.2 (#307)
no issue

- update `ember-light-table` to 1.4.2
- remove `gh-light-table` override component as scrolling has been fixed
- disable the infinite scroll acceptance test for now because Chrome has issues detecting the position of the scroll trigger when the app is rendered into the zoomed container during testing
2016-10-07 13:58:53 +01:00
Kevin Ansfield
0a163d7333 Ghost.org OAuth support (#278)
issue TryGhost/Ghost#7452, requires TryGhost/Ghost#7451
- use a `ghostOAuth` config flag to switch between the old-style per-install auth and centralized OAuth auth based on config provided by the server
- add OAuth flows for:
  - setup
  - sign-in
  - sign-up
  - re-authenticate
- add custom `oauth-ghost` authenticator to support our custom data structure
- add test helpers to stub successful/failed oauth authentication
- hide change password form if using OAuth (temporary - a way to change password via oauth provider will be added later)
2016-09-30 13:43:40 +02:00
Kevin Ansfield
5913827646 Separate invites and users (#277)
closes https://github.com/TryGhost/Ghost/issues/7420, requires https://github.com/TryGhost/Ghost/pull/7422
- adds a new `Invite` model with associated serializer and test setup
- updates team screen to use invites rather than existing users with the "invited" property
- updates signup process to work with new invite model
- updates setup process to create invites instead of users
- swaps usage of `gh-select-native` for `one-way-select` in the invite modal so that attributes can be set on the `select` element
- updates resend invite process to account for server returning a new model
- rewrites the invite management tests and fixes mirage mocks for invite endpoints
- sorts invites by email address to avoid jumping invites when re-sending
2016-09-26 18:03:53 +02:00
Kevin Ansfield
1797a6c066 deps: ember-ajax@2.5.1 (#282)
no issue
- update ember-ajax to 2.5.1
- replace custom error checking in setup/two with ember-ajax's `isInvalidError`
- update error normalisation and associated parsing tests to ensure all error types result in the same object structure
2016-09-26 08:07:18 -05:00
Austin Burdine
f4a85294ae fix json db uploads and add checking for subscriber uploads (#241)
closes TryGhost/Ghost#7295
- check json content on db import if type is not specified
- ensure file type/extension is being checked in subscriber upload
2016-09-01 14:08:37 +01:00
Austin Burdine
5326eaaa31 allow windows zip type to be uploaded (#238)
refs TryGhost/Ghost#7292, TryGhost/Ghost#7293
- add 'application/x-zip-compressed' to allowed mime-types for import
  and theme
2016-09-01 08:50:34 +02:00
Aileen Nowak
3d866793cc 🐛 Allow .zip file upload for file import
closes TryGhost/Ghost#7277

Adds `application/zip` to supported import file types.
2016-08-26 18:23:55 +02:00
Kevin Ansfield
3df509a0bb 🐛 fix post-settings-menu slug input (#223)
refs https://github.com/TryGhost/Ghost/issues/7255
- adds missing `slugGenerator` service injection
2016-08-24 06:58:49 -06:00
Kevin Ansfield
5581c6ba5a theme management UI
refs https://github.com/TryGhost/Ghost/issues/7204, requires https://github.com/TryGhost/Ghost/pull/7209

- replaces theme dropdown with a table
- adds theme upload modal
    - validates theme mime type
    - prevents upload of `casper.zip` (default Casper theme can't be overwritten)
    - warns if an upload will overwrite an existing theme
    - gives option of immediately activating the uploaded theme or closing after successful upload
- adds theme activation link/action
- adds theme download link/action
- adds theme deletion modal
    - warns about no undo possibility
    - offers possibility to download theme
- modifies mirage config to handle theme changes
2016-08-23 12:42:38 +01:00
Kevin Ansfield
4d59fdb8fb validate file uploads against "accept" mime-type before uploading (#214)
closes https://github.com/TryGhost/Ghost/issues/7144
- allow the `accept` attr of `gh-file-uploader` and `gh-image-uploader` to be specified
- allows a `validate` action to be passed into `gh-image-uploader` and `gh-file-uploader` components that runs after a file is selected and before the upload starts
- adds a default `validate` action to `gh-image-uploader` and `gh-file-uploader` that triggers the normal `UnsupportedFileType` error when the selected file's mime-type does not match the `accept` attribute
- adds mime type validation to labs importer (basic implementation, should be replaced with uploader components once they have been refactored)
2016-08-22 05:45:33 -06:00
Austin Burdine
e772430bd6 Introducing Concurrency (#147)
* deps: ember-concurrency@0.7.8

* initial conversion of post & user actions to e-concurrency tasks

- add task button which handles auto-spinning of e-concurrency tasks
- fix tests
2016-08-11 07:58:38 +01:00
David Balderston
1915ee0192 Post meta error style fixes (#189)
Closes TryGhost/Ghost#7138

* Fixes red error styling not showing up for meta title and meta
description on posts
2016-08-06 22:52:46 -05:00
Kevin Ansfield
96f2d4088f Handle automatic timezone override
refs https://github.com/TryGhost/Ghost/pull/7142, https://github.com/TryGhost/Ghost/pull/7143
- moves timezone selection template and logic into a component
- detect if the current `activeTimezone` is not in our pre-defined list of timezones, if it isn't:
  - add a line indicating that there has been an override with the current `activeTimezone` value
  - add a blank option to the timezone select list
2016-07-26 11:50:24 +01:00
Kevin Ansfield
ab14b78282 Fix editor error handling (#128)
closes https://github.com/TryGhost/Ghost/issues/7099
- update editor base controller's `showErrorAlert` method to handle `AdapterError` or `AjaxError` objects
- update PSM's error handling so that we don't pass an error object wrapped in an array to `showAPIError`
- add missing title attribute to Mirage's Post factory
- remove some leftover `console.log`s
2016-07-18 17:23:43 -06:00
Kevin Ansfield
690dc9dffb Refactor error handling
closes https://github.com/TryGhost/Ghost/issues/6974
- update "change password" fields/process to use inline validations
- remove `notifications.showErrors` and update all uses of it to `showAPIError`
- display multiple API errors as alerts rather than toaster notifications
- refactor `notifications.showAPIError`
  - remove `notifications.showErrors`, use a loop in `showAPIError` instead
  - properly determine the message from `AjaxError` or `AdapterError` objects
  - determine a unique key if possible so that we don't lose multiple different alerts
- add `ServerUnreachable` error for when we get a status code of 0 (eg, when the ghost service has been shut down)
- simplify error messages for our custom ajax errors
2016-07-08 15:16:54 +01:00
Kevin Ansfield
e4c0aaf7b9 "400 Version Mismatch" error handling
refs https://github.com/TryGhost/Ghost/issues/6949

Handle version mismatch errors by:
- displaying an alert asking the user to copy any data and refresh
- disabling navigation so that unsaved data is not accidentally lost

Detailed changes:
- add `error` action to application route for global route-based error handling
- remove 404-handler mixin, move logic into app route error handler
- update `.catch` in validation-engine so that promises are rejected with the
  original error objects
- add `VersionMismatchError` and `isVersionMismatchError` to ajax service
- add `upgrade-status` service
  - has a method to trigger the alert and toggle the "upgrade required" mode
  - is injected into all routes by default so that it can be checked before
    transitioning
- add `Route` override
  - updates the `willTransition` hook to check the `upgrade-status` service
    and abort the transition if we're in "upgrade required" mode
- update notifications `showAPIError` method to handle version mismatch errors
- update any areas where we were catching ajax errors manually so that the
  version mismatch error handling is obeyed
- fix redirect tests in editor acceptance test
- fix mirage's handling of 404s for unknown posts in get post requests
- adjust alert z-index to to appear above modal backgrounds
2016-07-08 14:56:26 +01:00
Austin Burdine
1fd879343f more shimming of controllers (#110)
refs #101, #95
- shim controllers that were missed initially
2016-07-06 20:47:30 +01:00
Austin Burdine
a9ce94de9f convert ember imports to ember-cli-shim imports where possible (#95) 2016-06-30 11:21:47 +01:00
Kevin Ansfield
ec6c614461 Use Ember.Comparable mixin to sort posts
closes https://github.com/TryGhost/Ghost/issues/7002
- move sorting logic out of the controller and into the Post model

This is a quick attempt at implementing the refactoring referenced in https://github.com/TryGhost/Ghost/issues/7002. The client-side sorting is working but we still have the problem of scheduled posts not appearing in the list until you scroll to the very first published post because the server is returning posts in the wrong order.
2016-06-17 11:33:11 +01:00
Aileen Nowak
dd8d3507f0 Renaming date properties to contain UTC
closes TryGhost/Ghost#6985

- renames all date properties to end with `UTC`:
	- `publishedAt` in `post` model
	- `createdAt` in `post`, `role`, `subscriber`, `tag` and `user` model
	- `updatedAt` in `post`, `role`, `subscriber`, `tag` and `user` model
	- `unsubscribedAt` in `subscriber` model
	- `lastLogin` in `user` model
- adds `attrs` transforms in matching serializers `post`, `tag` and `user`
- new serializers files for `subscribers` and `role` to add `attr` transforms
- adds unit tests for all serializers
- use two variables in `post-settings-menu` controller to handle blog-timezone adjusted date as well as UTC date
2016-06-17 11:09:21 +02:00
Aileen Nowak
6ce7e14fd7 Scheduler UI
refs TryGhost/Ghost#6413 and TryGhost/Ghost#6870

needs TryGhost/Ghost#6861

- **Post Settings Menu (PSM)**:'Publish Date' input accepts a date from now, min. 2 minutes to allow scheduler processing on the server. Also, there will always be some delay between typing the date and clicking on the 'Schedule Post' button. If the user types a future date for an already published post, the date will be reseted and he sees the message, that the post needs to be unpublished first. Once, the date is accepted, the label will change to 'Scheduled Date'.

- adds a CP 'timeScheduled' to post model, which will return `true` if the publish time is currently in the future.

- **Changes to the button flow in editor**:
- if the the CP `timeScheduled` returns true, a different drop-down-menu will be shown: 'Schedule Post' replaces 'Publish Now' and 'Unschedule' replaces 'Unpublish'.

- Covering the _edge cases_, especially when a scheduled post is about to be published, while the user is in the editor.
	- First, a new CP `scheduleCountdown` will return the remaining time, when the estimated publish time is 15 minutes from now. A notification with this live-ticker is shown next to the save button. Once, we reach a 2 minutes limit, another CP `statusFreeze` will return true and causes the save button to only show `Unschedule` in a red state, until we reach the publish time
	- Once the publish time is reached, a CP `scheduledWillPublish` causes the buttons and the existing code to pretend we're already dealing with a publish post. At the moment, there's no way to make a background-fetch of the now serverside-scheduled post model from the server, so Ember doesn't know about the changed state at that time.
	- Changes in the editor, which are done during this 'status freeze'-process will be saved back correctly, once the user hits 'Update Post' after the buttons changed back. A click on 'Unpublish' will change the status back to a draft.
	- The user will get a regular 'toaster' notification that the post has been published.

- adds CP `isScheduled` for scheduled posts
- adds CP `offset` to component `gh-posts-list-item` and helper `gh-format-time-scheduled` to show schedule date in content overview.
- sets timeout in `gh-spin-button` to 10ms for `Ember.testing`
- changes error message in `gh-editor-base-controller` to be in one line, seperated with a `:`

TODOs:
- [x] new sort order for posts (1. scheduled, 2. draft, 3. published) (refs TryGhost/Ghost#6932)
- [ ] Move posts sorting from posts controller to model and refactor to use `Ember.comparable` mixin
- [x] Flows for draft -> scheduled -> published like described in TryGhost/Ghost#6870 incl. edge cases and button behaviour
- [x] Tests
- [x] new PSM behaviour for time/date in future
- [x] display publishedAt date with timezone offset on posts overview
2016-06-13 17:01:42 +02:00
Austin Burdine
7d693c1f96 internal tags feature
refs TryGhost/Ghost#6165
- change behavior to use 'visibility' property
- add tests
2016-06-13 08:21:41 -06:00
Austin Burdine
ed2c5f328d deps: grunt-jscs,ember-suave@3.0.0
replaces #41, #60
- update ember-suave and grunt-jscs to 3.0
- standardize Ember global de-structuring rules across app & tests
2016-06-11 13:39:31 -06:00
Kevin Ansfield
af1f383ff8 Rename "offset" to "blogTimezone"
refs https://github.com/TryGhost/Ghost/pull/6941#issuecomment-224553575
- `blogTimezone` and `timezone` better reflect their values (a string representing a timezone in the format `Europe/Dublin`) than `offset` which suggests a fixed value
2016-06-08 12:09:19 +01:00
Kevin Ansfield
604fda4348 Update package.json details, rename module to ghost-admin
no issue
- updates `package.json` details to better reflect the separation from the `Ghost` package
- update ember config and all import statements to reflect the new `ghost-admin` module name in `package.json`
2016-06-03 16:12:54 +01:00
Aileen Nowak
be8b31ec85 Timezones: Always use the timezone of blog setting
closes TryGhost/Ghost#6406

follow-up PR of #2

- adds a `timeZone` Service to provide the offset (=timezone reg. moment-timezone) of the users blog settings
- `gh-datetime-input` will read the offset of the timezone now and adjust the `publishedAt` date with it. This is the date which will be shown in the PSM 'Publish Date' field. When the user writes a new date/time, the offset is considered and will be deducted again before saving it to the model. This way, we always work with a UTC publish date except for this input field.
- gets `availableTimezones` from `configuration/timezones` API endpoint
- adds a `moment-utc` transform on all date attr (`createdAt`, `updatedAt`, `publishedAt`, `unsubscribedAt` and `lastLogin`) to only work with UTC times on serverside
- when switching the timezone in the select box, the user will be shown the local time of the selected timezone
- `createdAt`-property in `gh-user-invited` returns now `moment(createdAt).fromNow()` as `createdAt` is a moment date already
- added clock service to show actual time ticking below select box
- default timezone is '(GMT) Greenwich Mean Time : Dublin, Edinburgh, London'
- if no timezone is saved in the settings yet, the default value will be used
- shows the local time in 'Publish Date'  in PSM by default, until user overwrites it
- adds dependency `moment-timezone 0.5.4` to `bower.json`

---------

**Tests:**

- sets except for clock service in test env
- adds fixtures to mirage
- adds `service.ajax` and `service:ghostPaths` to navigation-test.js
- adds unit test for `gh-format-timeago` helper
- updates acceptance test `general-setting`
- adds acceptance test for `editor`
- adds integration tests for `services/config` and `services/time-zone`

---------

**Todos:**

- [ ] Integration tests: ~~`services/config`~~, ~~`services/time-zone`~~, `components/gh-datetime-input`
- [x] Acceptance test: `editor`
- [ ] Unit tests: `utils/date-formatting`
- [ ] write issue for renaming date properties (e. g. `createdAt` to `createdAtUTC`) and translate those for server side with serializers
2016-06-03 16:23:39 +02:00
Kevin Ansfield
a45c0884c3 Fix unwanted clearing of social inputs on blur with no edits
no issue
- updates the logic to expect `null` scratch values as the scratch values won't be set until the input value has changed
- adds tests for initial value display and regression tests for the cleared input bug
2016-05-17 19:14:14 +01:00
Aileen Nowak
7923641cb1 Fixes error in validation
closes #6826

- refactors the validation of facebook and twitter input field in `general.js` and `user.js` controller
	- Example validations for facebook:
		- `facebook.com/username` will be corrected to the full URL
		- `user` will show error `Your Page name is not a valid Facebook Page name' for `general.js` and `Your Username is not a valid Facebook Username` for `user.js` as the username in facebook has to be at least 5 characters long
		- `twitter.com/username` will be autocorrected to the valid facebook URL incl. the `username`
	- Example validations for twitter:
		- `twitter.com/user_` will be corrected to the full URL
                - `user:99` will show error `Your Username is not a valid Twitter Username`
                - `facebook.com/username` will be autocorrected to the valid twitter URL incl. the `username`
- updates both acceptance tests
- adds further validation for facebook pages in general settings and user. Submitting a url which incl. `/page/` or `/pages/` will now accept any username followed incl. further `/`.
- adds a custom transform `facebook-url-user` which will extract the username (if it's a facebook page, incl. `pages/`) to store only this in the backend
- uses the `twitter-url-user` transform now also for user
2016-05-17 17:44:23 +01:00
Kevin Ansfield
9d522e38b2 Merge pull request #6830 from acburdine/no-show-nav-menu
Don't show the nav menu when on a 404 route and not signed in
2016-05-16 11:01:44 +02:00
Austin Burdine
2f58e17b7e update document title on blog title change
no issue
- force document.title to recompute when the blog title is changed in settings/general
2016-05-15 18:41:28 -06:00
Austin Burdine
6ebaffa041 don't show the nav menu when on a 404 route and not signed in
no issue
- fixes problem when the nav menu would be shown on an error404 route when the user is not logged in
- adds failing test that passes with this change
2016-05-13 19:02:55 -06:00
Kevin Ansfield
f69c5125e6 Subscribers: Admin UI updates & fixes
Update for synchronous feature service

Add client-side handling of server-side errors when adding subscribers
- display server-provided error message when we get a server error
- fix the ajax util's `getRequestErrorMessage` method so that it works correctly with Ember's `InvalidError` object instead of the previous request object that it was receiving (*TODO:* this really needs looking at properly so we aren't losing details and Ember Data can do it's stuff)

Styling updates
- proper icon for ascending/descending
- change hover colour to green for "Import CSV" button

Delete subscriber button with confirm modal
- display delete button when hovering over a subscriber row (WARN: really ugly button, styles definitely want looking at)
- show confirm modal when clicking the delete button
- delete subscriber, remove from table, and update total on confirm
2016-05-11 11:22:35 +02:00
Kevin Ansfield
67765897b2 Subscribers: Admin User Interface v1
Initial Subscribers screen
- set up mocked api endpoints
- basic subscribers screen with data loading, infinite scroll

"Add Subscriber" screen
- uses modal to display a new subscriber form
- validates subscriber e-mail address
- moves pagination from route into controller to use filtered/sorted CPs on top of a live-query so that new subscribers are added to the list and the total can be properly managed

TODO:
- there is currently a pretty serious performance issue where the whole table is re-rendered when the live-query is updated. `ember-light-table` doesn't allow for live-binding and has no options to easily manipulate it's rows using an external interface - it's possible to move the page loading into the component so we only render new rows but that leaves it difficult to react to new subscribers being added through the UI. I believe the number of components used within the table is also adding to the performance problems.
  - most likely solution is to drop `ember-light-table` in favour of rendering the table directly - glimmer should do a good job of fast updates even though the underlying array will be completely swapped out

"Import subscribers" screen
- uses modal to display an import subscribers CSV file upload form
- displays upload progress
- displays import stats and reloads subscribers table once import has completed
- adds `gh-file-uploader` component (NB. pared down copy of `gh-image-uploader`, ripe for some refactoring)
- fixes subscribers acceptance test failing because fixtures did not have the labs flag enabled

Unfortunately this doesn't have 100% test coverage as we're limited in how we can simulate file uploads 😞

Fix performance issues with subscribers table
- moves the table definition from the component up to the controller
- switches back to manually manipulating table rows instead of using a live-query

This is a quick-fix in that it allows us to continue using the `ember-light-table` component but it does mean that we lose some flexibility that the live-query gave us. For now it's not much of an issue and it allows us to defer deeper performance/flexibility work until we have a concrete need and requirements.

Hook up Export CSV button
- use a hidden iFrame to trigger the browser to hit the CSV export endpoint and download the file

Re-order subscribers table by clicking column headers
- displays currently sorted column and sort direction
- clicking a column header re-fetches the data from the server with the appropriate query params

Fix scroll triggers for infinite pagination + icon change
- adds a debounce as well as the throttle so that we always get a final scroll trigger once scrolling has stopped
- changes the subscribers icon from the temporary team icon to the mail icon
2016-05-11 10:28:11 +02:00
Aileen Nowak
0f9645f97d Structured Data 3.0
closes #6534
- new input fields in general settings incl. validation
- facebook and twitter as new models in settings.js
- adds values for facebook and twitter to default-settings.js
- adds blog helpers for facebook and twittter
- rather than saving the whole URL, the Twitter username incl. '@' will be extracted from URL and saved in the settings. The User will still input the full URL. After saving the blog setting, the stored Twitter username will be parsed again as the full URL and available in the input field. A custom transform is used for this.
- adding meta fields to be rendered in {{ghost_head}}:
	- '<meta property="article:publisher" content="https://www.facebook.com/page" />' and
	- '<meta name="twitter:site" content="@user"/>'
- adds facebook and twitter to unit test for structured data
- adds unit test for general settings
- adds acceptance test for new input fields in general settings
- adds a custom transform for twitter model to save only the username to the server
- adds unit test for transform
2016-05-08 17:43:59 +02:00
Aileen Nowak
e99569b6f4 Slack integration
closes #6584
- Frontend Changes:
	- adds 'Apps' to Navigation Menu
	- adds 'Slack' as nested page to Apps
	- adds `apps.css`
	- adds `slack-integration` model and uses `slack-settings` custom transform to parse JSON file
	- adds validation for `slack` model
	- adds fixtures and `slack/test` API endpoint to Mirage
	- adds acceptance tests for `apps-test` and `slack-test`
	- adds unit tests for `slack-settings` and `slack-integration`
- Backend Changes:
	- adds API endpoint `slack/test` to send Test Notification
	- adds default-values for slack model
	- sends payload to slack:
		- text: the url of the blogpost / test message
		- icon_url: url to ghost logo
		- username: Ghost
	- adds `slack/index.js` to send webhook to slack if
		- a new post is published (if slack webhook url is saved in settings)
		- user clicks on 'Send Test Notification' in UI
	- adds `slack.init()` to `server.index.js` to add event listener
	- adds unit test for `slack/index`
2016-05-08 12:49:15 +02:00
Austin Burdine
6ed59a1a4c remove unused feature controller 2016-04-28 12:22:54 -05:00
Kevin Ansfield
e2f5889600 Use a custom transform to simplify navigation settings
no issue
- moves the `NavItem` object from the navigation controller to an explicit `NavigationItem` model file
- adds a custom transform `navigation-settings` that transforms the navigation settings JSON string to/from an array of `NavigationItem` objects
- simplifies the `settings/navigation` controller as it no longer has to export it's own internal model and handle serialization and deserialization

This pattern should also help simplify the apps/slack integration code if implemented there.
2016-04-26 12:32:29 +01:00
Kevin Ansfield
d4ca5ced75 Don't share errors and hasValidated references between validator instances
no issue
- ensure that each validator instance gets it's own `errors` and `hasValidated` objects
- updates some uses of `ValidationEngine` that were relying on side-effects of the unintended reference sharing
- fixes issue with add subscriber modal displaying an error state after opening if it previously had errors when closing
2016-04-25 10:56:11 +01:00
Hannah Wolfe
1ebe96b284 Merge pull request #6651 from kevinansfield/uploader-js-must-die
Replace jQuery-based uploader.js with ember components
2016-04-14 16:57:57 +01:00
Kevin Ansfield
06d6174036 Merge pull request #6564 from szelpe/publishedDate
Fixed bugs regarding the published date input field validation.
2016-04-06 11:58:00 +01:00
Kevin Ansfield
39a175108b Replace jQuery-based uploader.js with ember components
no issue
- adds `gh-image-uploader` that handles image uploads in a fully ember fashion and with no dependency on `uploader.js`
- adds `gh-image-uploader-with-preview` that can fully replace the old `gh-uploader`
- replace uses of `gh-uploader` in PSM & TSM with `gh-image-uploader-with-preview`
- updates the editor preview image handling to use the new `gh-image-uploader-with-preview` component
- updates the image upload modal to use `gh-image-uploader` (utilises the `saveButton=false` flag which means the preview has to be handled externally to avoid auto-replacement when typing a URL)
- removes all old `uploader.js` related code
- adds custom `RequestEntityTooLargeError` and `UnsupportedMediaTypeError` errors to our `ajax` service
2016-04-05 12:03:20 +01:00
David Balderston
ebbb22a8f5 Remove Nav Item Placeholder and Set as Base Url Value
Closes #6440

* Removed the `.fake-placeholder`class from the input, test, and css
* On adding a nav item, if the url value has not been set by the user,
then set it to the base url as shown in the input
* If url has been set by the user, just do what it has always done
2016-03-22 07:11:20 -07:00
Peter Szel
2f7a206b7e Fixed bugs regarding the published date input field validation.
refs #5777

- removing error message from the previous validation
- only checking if date is in the past if the input date is valid to begin with
- always updating the view, even if the date hasn't changed to make sure the date format stays consistent
2016-02-28 01:33:24 +00:00
Kevin Ansfield
522b625376 Revert "pass post tags as array to ember-cli-selectize"
This reverts commit efff6f62ae.
2016-02-18 17:57:18 +00:00
Kevin Ansfield
aa7a10fc07 Merge pull request #6533 from acburdine/issue-6483
Pass post tags as array to ember-cli-selectize
2016-02-18 09:08:09 +00:00
Austin Burdine
95687e9266 pass post tags as array to ember-cli-selectize
closes #6483
- fix new post => settings/tags transition error
2016-02-17 22:24:16 -06:00
Austin Burdine
13205803ef inject ajax service in settings/labs
closes #6530
- turns out one must inject a service in order to use it
2016-02-17 14:50:40 -06:00
Kevin Ansfield
c3cb2d8741 Merge pull request #6387 from novaugust/post-deletion
Fix post deletion scroll on content and tag screens
2016-02-15 11:02:42 +00:00
Hannah Wolfe
971afd9042 Merge pull request #6468 from kevinansfield/ember-sortable-nav-items
Replace jquery-ui.sortable with ember-sortable for nav items
2016-02-14 13:44:07 +00:00
Kevin Ansfield
8aaf2e1356 Replace jquery-ui.sortable with ember-sortable for nav items
refs #6458, closes #6457
- replaces jquery-ui.sortable with ember-sortable for drag-n-drop handling
- moves the "new/blank" nav item out of the nav items list
  - allows it to be excluded from the draggable list
  - cleans up handling of the `navigationItems` array as there's no longer a need to ignore/exclude this extra item
- clears validation errors when typing in the respective field
- adds acceptance test for adding/removing nav items
- improves acceptance test for saving nav items to cover more edge cases
2016-02-09 22:08:21 +00:00
Matt Enlow
6c7095a9ba Load more posts after post deletion
Closes #6390
- check if more posts should be loaded whenever one is deleted
- delete dead code from posts controller
- delete duplicate component gh-infinite-scroll-box
- simplify posts-list-item `posts.post` or `editor.edit` link logic by modifying `gh-content-view-container` to yield necessary vars directly and use inline ifs in template
- add `gh-tag` component for rendering tags and updating infinite scroll box on `settings/tags` page
2016-02-09 09:08:31 -07:00
Austin Burdine
75f775ec1c convert feature controller to service
closes #6170
- add gh-feature-flag component to create a checkbox (reduce duplicate code)
2016-02-09 08:37:44 -06:00
Kevin Ansfield
83551b8dfb validate nav items when clicking the + button, ignoring last item if blank 2016-02-08 14:20:57 +00:00
Kevin Ansfield
0ead35484f Merge pull request #6373 from kevinkucharczyk/standardise-camelcase
Standardise client property names to camelCase
2016-02-03 16:41:23 +00:00
Fabian Becker
6bee085074 Correctly use POST request to reset password
closes #6423
2016-02-02 12:58:39 +01:00
James Seymour-Lock
b2b1d7a63c Always show current year in copyright text on "About" page
no issue
- add `copyrightYear` CP to about page controller
- displays the current year in the copyright notice
2016-01-25 11:33:10 +00:00
Kevin P. Kucharczyk
24cc72cafd Standardise client property names to camelCase
closes #6018
- added keyForAttribute method in application serializer
- override keyForAttribute in settings serializer to not apply camelCase/underscore conversion
- rename under_scored properties to camelCased
2016-01-23 19:12:22 +01:00
Hannah Wolfe
3e2f6f4eca Merge pull request #6341 from kevinansfield/fix-mixed-content-on-team-page
Move user/cover image files used in admin team area into the client folder
2016-01-21 09:46:00 +00:00
Austin Burdine
b2c91dd3be cleanup usage of Ember.inject 2016-01-19 07:03:27 -06:00
Austin Burdine
e24e85d94a deps: ember-ajax@0.7.1 2016-01-18 09:37:14 -06:00
Austin Burdine
be1bf27285 refactor slug-generator object into a service
refs #6243
2016-01-15 09:43:17 -06:00
Kevin Ansfield
771b6babb0 Move user/cover image files used in admin team area into the client folder
no issue
- fixes potential "mixed content" warnings if non-admin urls are redirected
2016-01-14 16:26:48 +00:00
Kevin Ansfield
97bb577496 Refactor modals
refs #5798, closes #5018
- adds new `gh-fullscreen-modal` component - modals are now specified in-context so that they can have deeper interaction with their surrounding components/controller/route, i.e. a modal component can be a thin confirm/deny wrapper over the underlying controller action keeping all context-sensitive logic in one place
- adds spin-buttons to all modals with async behaviour
- adds/improves behaviour of inline-validation in modals
- improves re-authenticate modal to properly handle validation and authentication errors
2016-01-12 20:53:08 +00:00
Hannah Wolfe
b151185c6c Merge pull request #6317 from kevinansfield/quick-fix-unnecessary-leave-editor-modal
Quick-fix for unnecessary "discard changes" modals
2016-01-12 09:39:59 +00:00
Kevin Ansfield
0120a75a4e Quick-fix for unnecessary "discard changes" modals
closes #6315
- don't set the `slug` attribute if we get an empty string back from the slug generator to prevent dirty attributes being triggered for `null` getting changed to `''`
2016-01-11 15:58:07 +00:00
Kevin Ansfield
ef0be5024b Transition after setup step 3 submission even if invite takes a long time
refs #5779
- adds a timeout of 4 seconds to step 3 submission so that we transition even if we haven't heard back from the server yet. Notification alerts will be displayed asynchronously once all server requests have returned.
- adds a message to check e-mail configuration to step 3 invitation failure alert
2016-01-08 17:06:41 +00:00
Austin Burdine
9b8a149bdc fix authentication error if setup/two is re-submitted
closes #6226
- adds calls to oauth middleware on PUT /authentication/setup/
- prevent setup/two from trying to log in again if user is already logged in
2015-12-18 12:18:13 -07:00
Kevin Ansfield
8b0afa53f6 Fix password reset
closes #6229
- removes `_super` call in the reset route's `setupController` hook to avoid a `model` property being set which was being picked up by the validation engine
- throw the error if we fail in the password reset process from something we aren't expecting
2015-12-15 21:51:36 +00:00
Kevin Ansfield
08e3feee4c Fix changing text and jumping caret in PSM's date input
refs #5777
- adds new `gh-datetime-input` that takes a one-way-bound value and formats it, only triggering the supplied `update` action on focus-out
- fixes bug in PSM's `setPublishedAt` action if model's `published_at` is a Date object not a Moment object
2015-12-08 10:13:17 +00:00
Kevin Ansfield
5dae278efe Remove $ from jshint's predef, always use Ember's $
no issue
- fixes problems with "re-definition of $" errors
2015-12-01 20:52:25 +00:00
Kevin Ansfield
17b3ced8c9 Always call _super when using Ember hooks
no issue
- review use of Ember core hooks and add a call to `this._super` if missing
- fix a few occurrences of using the wrong component lifecycle hooks that could result in multiple/duplicate event handlers being attached

`_super` should always be called when overriding Ember's base hooks so that core functionality or app functionality added through extensions, mixins or addons is not lost. This is important as it guards against issues arising from later refactorings or core changes.

As example of lost functionality, there were a number of routes that extended from `AuthenticatedRoute` but then overrode the `beforeModel` hook without calling `_super` which meant that the route was no longer treated as authenticated.
2015-11-30 12:45:37 +00:00
Kevin Ansfield
7ce3726589 Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00
Kevin Ansfield
976a2e6141 Merge pull request #6108 from mixonic/no-rerender-selectors
Unify mobile state in JS, drop resize
2015-11-30 08:45:03 +00:00
Hannah Wolfe
1c02a4182a Merge pull request #6129 from kevinansfield/invalid-origin-errors
Display error message on setup if origin doesn't match config.js url
2015-11-27 00:25:57 +08:00
Kevin Ansfield
21fc4662ff Display error message on setup if origin doesn't match config.js url
refs #6106
- add error handler for authentication step of blog setup
- move setup acceptance test out of 'settings' folder
2015-11-26 11:22:16 +00:00
Kevin Ansfield
86f52081cc Fix missing error on signin when server has gone away
no issue
- `session.authenticate` calls out to jQuery for the ajax request which then raises it's own error but returns nothing when the server is not reachable. This is a quick fix so that we don't error and can pass through to the default error handler in the authentication step.
2015-11-26 11:15:17 +00:00
Matthew Beale
4d98363c7c Unify mobile state in JS, drop resize
In `gh-content-view-container` the visibility of another DOM node was
being used to detect if a given view was mobile or not. This means the
UI needed to have layout forced (and DOM rendered) before the content
view container would render a second time. This is slow interaction with
the DOM (forcing layout) and slow for Ember's renderer (it needs to
render the container once with a default, then again when the value
changes).

Additionally there were two ways resize was being observed. The
`Window.matchMedia` API was used for some styles and the `ember-resize`
addon used to detect other changes. Here I've unified around just the
`Window.matcheMedia` API but abstracted it behind a service.

Sizes are exposed as properties that can be bound to or used directly in
templates.
2015-11-25 11:54:08 -05:00
Kevin Ansfield
91e86bde61 Update client for tag.post_count -> tag.count.posts rename
refs #6105
- adds `raw` ember-data transform to handle standard JSON `count` attribute
- update mirage factory to return correct `count.posts` format
- rename all uses of `post_count` to `count.posts`
2015-11-23 19:57:56 +00:00
Matthew Beale
056e3e465d Properly use htmlSafe styles 2015-11-20 17:48:48 -05:00
Kevin Ansfield
7db0ffbda2 Fix auth regressions after ESA 1.0 upgrade
refs #6039, closes #6047, closes #6048

- delete old/unused fixtures file
- add failing tests for #6047 & #6048
- redirect to sign-in if we get a 401 when making an API request
- fix incorrect `this.notifications` call in tag controller
- raise `authorizationFailed` action in application route's `sessionInvalidated` hook so that it can be handled by leaf routes (fixes re-auth modal display)
- close "saving failed" alert when successfully re-authenticated
- adds a "window-proxy" util so that we can override `window.*` operations in tests
- fix `gh-selectize` attempting to register event handlers when the component has already been destroyed
2015-11-12 12:56:27 +00:00
Hannah Wolfe
5f68b5477a Merge pull request #6017 from kevinansfield/finalize-debounced-gravatar
Finish changes in #5807 (debounced gravatar load in gh-profile-image)
2015-11-02 18:14:53 +00:00
Hannah Wolfe
63e3c33ea0 Merge pull request #5984 from sebgie/issue#5941
Move Public API behind labs flag
2015-11-02 16:15:50 +00:00
Sebastian Gierlinger
8650f34665 Move Public API behind labs flag
closes #5941
- added UI to labs page
- added method to determine if full authentication is required
- updated public_api tests to enable public api first
2015-11-02 14:18:58 +01:00
Kevin Ansfield
14a182d691 Mobile fixes for tag management UI
refs #5845, #5969
- when on mobile devices tag management UI will only display a list and when a tag is accessed the tag settings form will slide in from the right
- tag settings form header has a 'back' button when on mobile to go back to tags list
- switching from mobile to standard modes will auto load the first tag as per standard tags screen on desktop
- if no tags are present then the blank-slate template will be shown when on mobile
2015-11-02 13:18:10 +00:00
Hannah Wolfe
8d32afdac4 Merge pull request #5969 from kevinansfield/routable-tags
Routable tags
2015-11-01 15:34:33 +00:00
Nazar Gargol
3d6f4d15ba Adds debounced email validation and gravatar loading on second setup/signup screen
closes #5797
- adds debounced email validation as user types
- adds debounced gravatar loading for valid email
2015-10-28 09:40:40 +00:00
Kevin Ansfield
4ecdf182e6 Routable tags
refs #5845
- Updates tag settings screen to match content screen behaviour. Each now tag has it's own route that is link-able from other areas of the app
- Updates a number of places where jQuery event handler code was not wrapped in Ember's run loop
2015-10-27 12:48:41 +00:00
Kevin Ansfield
6ea49f3a03 Update admin area queries to use new filter parameter
refs #6005
- updates use of the query params removed in #6005 to use new `filter` param
2015-10-27 12:13:35 +00:00
Hannah Wolfe
ff17c0191b Merge pull request #5952 from kevinansfield/tag-settings-ui
Minor tag settings validation updates & fixes
2015-10-21 17:40:53 +01:00
Austin Burdine
58f7c8f6b2 fix session data loading in settings/labs
closes #5973
- updating session data loading to new esa 1.0 api
2015-10-20 07:50:41 -05:00
Kevin Ansfield
3759930a77 Minor tag settings validation updates & fixes
refs #5845
- add tests for `tag-settings` validator
- add validation for tag slug length
- fix display of error message when saving tag fails on the server
- add max chars text to description char count, remove error message as the count/input colour already indicates an error
2015-10-19 10:45:41 +01:00
Kevin Ansfield
c3d656ad2c Merge pull request #5955 from acburdine/esa-1.0
deps: ember-simple-auth@1.0.0
2015-10-19 10:40:35 +01:00
Austin Burdine
031a129f0b deps: ember-simple-auth@1.0.0
closes #5951
- update to esa 1.0
2015-10-18 13:17:02 -05:00
John O'Nolan
b3e03ea802 Email error message cleanup 2015-10-16 12:07:09 +02:00
Kevin Ansfield
55840eb57f Avoid duplicate alerts, clear alerts on successful retry or sign-in
closes #5903, refs #5409
- switch alert/notification component tests from unit to integration where appropriate
- rename `notifications.closeAll` to `notifications.clearAll` to better represent it's behaviour
- add concept of a "key" to alerts/notifications and ability to close only specified keys through notifications service
- close duplicate alerts/notifications before showing a new one
- specify a key for all existing alerts
- close failure alerts on successful retries
- clear all currently displayed alerts on successful sign-in
2015-10-12 19:21:30 +01:00
Kevin Ansfield
fbb92476f0 Ember-cli, Ember, & Ember Data 1.13.x upgrades
closes #5630
- upgrade ember-cli to latest version
- upgrade ember to latest 1.13.x release
- upgrade ember data to latest 1.13.x release
    - update custom adapters and serialisers for new internal JSON-API compatible formats [(docs)][1]
    - update all store queries to use new standardised query methods [(docs)][2]
    - add ember-data-filter addon ready for store.filter removal in ember-data 2.0 [(docs)][3]
- remove use of prototype extensions for computed properties and observers
- consolidate pagination into a single route mixin and simplify configuration

[1]: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_transition-to-the-new-jsonserializer-and-restserializer-apis
[2]: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_simplified-find-methods
[3]: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_ds-store-filter-moved-to-an-addon
2015-10-06 16:09:05 +01:00
Kevin Ansfield
d127d79019 Standardize on var-less export default across ember app
no issue
- drops the `var Foo = Ember.Thing.extend({}); export default Foo;` syntax in favour of exporting directly, eg: `export default Ember.Thing.extend({})`
- discussion on this change [here](https://github.com/TryGhost/Ghost/pull/5340#issuecomment-105828423) and [here](https://github.com/TryGhost/Ghost/pull/5694#discussion-diff-37511606)
2015-10-06 10:59:50 +01:00
Kevin Ansfield
0ee1c1ed1b Merge pull request #5871 from cobbspur/preventEnter
Prevent enter button reloading page when focus is on meta-title in PSM
2015-09-27 14:03:47 +01:00
cobbspur
e15d8e5abd Prevent enter button reloading page when focus is on meta-title in PSM
closes #5854

- adds an action that returns false on form submission
2015-09-27 13:59:08 +01:00
Kevin Ansfield
4ebacc7d9c Fix nav regressions in admin client
issue #5841

- fix relative link checks in navlink url input component
- fix navlink url input component sending absolute URLs instead of relative URLs to action handler
- remove URL manipulation in navigation settings controller (url input handles URL manipulation, validator flags anything that's still incorrect)
- capture cmd-s in url input to ensure changes are actioned before save
- automatically add mailto: to e-mail addresses
- add gh-validation-state-container component so .error/.success validation classes can be applied to any container element
- add validation-state mixin that can be mixed in to any other component to give it access to validation status (used in gh-navitem component to keep alignment when inline error message elements are added)
- validate and display inline errors on save
- improve ember test coverage for navigation settings related controller and components
2015-09-23 17:05:41 +01:00
Hannah Wolfe
7a64207827 Adds rudimentary validation to user invite
refs #5652

- with these changes, validation appears, but doesn't properly prevent closing the modal
- this needs revisiting at some point
2015-09-02 22:26:59 +01:00
Hannah Wolfe
f88390af3b Merge pull request #5794 from novaugust/psm-blog-url
Add config.blogUrl key to PSM's seoURL property
2015-09-02 20:50:50 +01:00
Matt Enlow
6ccef929e0 Add config.blogUrl key to PSM's seoURL property
Closes #5793
2015-09-02 12:34:48 -06:00
cobbspur
76d58082f1 Keep spinner running on successful signin
No Issue

- Removes the toggle of spinner for successful authentication
2015-09-02 16:49:04 +01:00
Kevin Ansfield
ebd826f8c8 Minor validations fixes
no issue
- clear private blog password validation errors on enable/disable
- validate maximum tag name length
- fix sticky validations when moving between tags or navigating to/from tags manager
2015-09-02 10:34:22 +01:00
Hannah Wolfe
f9e6bf9835 Form field icons load in default 'grey' state
ref #5652

- validations can be in default, success or error state
- adds check for 'hasValidated' if the validations haven't fired yet, the field is in the default state
- hasValidated is an Ember.Array which tracks the state for each field
2015-09-01 13:02:27 +01:00
Hannah Wolfe
ecece6238f Improve error handling for the PSM
closes #5762

- changes date to use proper inline validation
- changes meta_title & desc to also use inline validation
- meta_title & desc also give proper errors on save
- title too long causes proper error on save
2015-08-30 17:26:52 +01:00
Hannah Wolfe
db9f9a6931 Merge pull request #5760 from cobbspur/emptyValidations
No validations on setup for empty fields
2015-08-28 20:16:15 +01:00
Hannah Wolfe
7346f428b8 Merge pull request #5709 from kevinansfield/tag-name-comma-validation
Validate leading commas in tag names
2015-08-28 19:03:31 +01:00
cobbspur
24179cf9a8 No validations on setup for empty fields
refs #5652

 - new action on focusOut which only calls validate if the fields has a value
2015-08-28 18:55:37 +01:00
Hannah Wolfe
d5dece86cb Merge pull request #5754 from cobbspur/flowstep3
Prevent setup loop on step 3
2015-08-28 17:38:23 +01:00
Kevin Ansfield
ac2caa34df Fix auth token refresh failing on app-boot with expired access_token
issue #5751
- moves `makeRequest` override of simple-auth's OAuth authenticator into our own custom authenticator (previously our override was not taking effect until after ember-simple-auth's initial authentication routines, hence why it was working for post-login token refreshes but failing on app-boot)
2015-08-28 16:00:34 +01:00
Hannah Wolfe
8ae77f5ba2 Merge pull request #5733 from kevinansfield/fix-tag-input-creation-order
Fix post tag input so it keeps the tag order
2015-08-28 12:41:28 +01:00
cobbspur
8a0bb1707f Prevent setup loop on step 3
closes #5747

- change transition event to regardless of user invite success/failure
2015-08-28 12:35:40 +01:00
cobbspur
0e42258319 Fix wording for failed invitations alert
refs #5652

- Use conditional string for single/plural failed invitations
2015-08-27 18:17:13 +01:00
Kevin Ansfield
34ae2f8c99 Fix invite user validation issues in signup
refs #5652
- wrap emails input in `{{gh-form-group}}` component to give element success/error classes
- pull validation messages into submit button
- clean up validation related aspects of step three controller
2015-08-27 14:05:52 +01:00
Kevin Ansfield
0483a59296 Fix post tag input so it keeps the tag order
refs #5732
- patches ember-selectize to send the caret position to the create-item action handler
- updates `addTag` method in PSM controller to insert new tag in the correct place
2015-08-26 21:46:57 +01:00
Hannah Wolfe
87d9ec2c44 Merge pull request #5727 from kevinansfield/fix-disappearing-tags-on-save
Fix new tags disappearing in PSM when saving post
2015-08-26 19:58:31 +01:00
Hannah Wolfe
52d787bd08 Merge pull request #5721 from cobbspur/reset
Change reset page errors to match sign-in page
2015-08-26 14:54:30 +01:00
cobbspur
41c621dc07 Change reset page errors to match sign-in page
No Issue

- Takes the inline validation messages and displays below form
- Removes unnecessary gh-error-message components from signin and reset pages
 - Returns error messages to sign-in validations
2015-08-26 12:00:37 +01:00
Kevin Ansfield
5e303ce07d Fix new tags disappearing in PSM when saving post
closes #5708
- when adding a tag give it a throwaway UUID so that every selected/available tag object has a unique identifier for use with selectize
2015-08-25 23:53:19 +01:00
Hannah Wolfe
7bc3462200 Don't clear password field until setup is complete
ref #5652

- resolves issues with setup flow for the time being
- password is cleared on deactivate, rather than during step 2
- using transitionToRoute instead of transitionTo to remove deprecation warning
2015-08-25 13:16:39 +01:00
Kevin Ansfield
48404e6ac6 Validate tag names don't start with commas
closes #5685
- Adds client and server-side validation for tag names starting with commas
- Trim tag names before adding in PSM (tag attributes are already trimmed before saving in TSM)
2015-08-24 16:55:30 +01:00
Kevin Ansfield
d6bffa4077 Fix alerts disappearing when navigating
closes #5707
- fix disappearing alerts after transitions by not clearing all alerts/notifications when closing menus
- remove `notifications.closeNotifications()` calls left over from needing to clear validation notifications
2015-08-24 16:07:09 +01:00
Hannah Wolfe
2adacd3865 Merge pull request #5694 from kevinansfield/zelda-invite-fixes
Minor UI fixes for invitations
2015-08-24 12:41:43 +01:00
John O'Nolan
c474723eb0 Merge pull request #5702 from kevinansfield/zelda-signin-updates
Fixes for sign-in error handling
2015-08-24 08:00:13 +02:00
Hannah Wolfe
13b82d9838 Merge pull request #5682 from kevinansfield/tags-v4
Replace the current tag input with a selectize based input
2015-08-21 21:34:06 +01:00
Kevin Ansfield
925c55e860 Fixes for sign-in error handling
issue #5652, closes #5641
- removes inline errors for empty fields
- separate validation routines for sign-in and forgot password
- highlight fields with errors when trying to submit
2015-08-21 19:38:44 +01:00
Kevin Ansfield
52f8f2e6b2 Add inline error handling when creating/editing tag
closes #5684
- add inline error checking and display to tag name & meta data fields
- add tests for tags screen
2015-08-21 18:06:52 +01:00
Kevin Ansfield
ad83bca937 Replace the current tag input with a selectize based input
issue #3800, closes #5648
- uses ember-cli-selectize addon for the tag editing functionality in the PSM
2015-08-20 14:40:56 +01:00
Kevin Ansfield
600b598168 Minor UI fixes for invitations
issue #5652
- display "Sending Invite..." text after clicking "RESEND" link
- change "Invitation sent" alert to notification
2015-08-20 10:36:36 +01:00
John O'Mahoney
37fd5fda9a Update signup form to have profile image upload component
closes #5544
- Added profile image into `signup.hbs`
- Added image handling in `signup.js` controller
- Uses session authenticated user to upload image
2015-08-15 13:00:42 +01:00
Hannah Wolfe
4353a32e06 Merge pull request #5654 from cobbspur/bugfixes
Lock out email address on signup page
2015-08-11 18:06:12 +01:00
cobbspur
bd4729cbd7 Fix spinner on settings page
refs #5652

- stops spinner from spinning forever on settings screen when saving
2015-08-11 15:26:24 +01:00
cobbspur
9b777d89a6 Lock out email address on signup page
refs #5653

- disables email field
- pull error message from api response
2015-08-11 14:25:30 +01:00
cobbspur
1549f6dc69 Fix errors for setup and signup
refs #5635

- adds enter action to signup fields
- adds validation text errors
2015-08-10 22:24:10 +01:00
Hannah Wolfe
3e1b84310f Merge pull request #5633 from acburdine/spin-buttons
Add spin buttons
2015-08-10 19:06:32 +01:00
Austin Burdine
3c0bd3e8b2 add spin-button component & implement it
closes #3928
- adds spin-button component & styles
- implements spin-button in places where buttons trigger async tasks
2015-08-10 09:43:50 -06:00
Austin Burdine
87d4731a11 reimplement tag editing component for posts
refs #3800
- remove old tag editor code
- reimplement tag editor as an ember component
- add tag editor component to PSM
2015-08-10 07:22:37 -06:00
Hannah Wolfe
6648de5845 Merge pull request #5640 from cobbspur/errors
Fix server errors for signin
2015-08-10 13:20:53 +01:00
Hannah Wolfe
bca7b173ff Merge pull request #5634 from acburdine/onboard-fixes
Fixes in setup/three
2015-08-10 13:17:28 +01:00
cobbspur
49241e7611 Fix signin errors
refs #5635

- fixes format for server errors
- changes signin-api validation errors to be text rather than alerts
2015-08-10 12:26:45 +01:00
Austin Burdine
dcf292e8ca setup/three fixes
refs #5315
- adds call to loadServerNotifications so that notifications are loaded after setup
- fixes user invite so that you can't invite someone with the same email as you created the owner with
2015-08-09 22:40:27 -06:00
cobbspur
ac28144f24 Fix signup bug
No Issue

- fixes bug that prevents successful signup from invite
2015-08-08 16:04:28 +01:00
Kevin Ansfield
cd72b298a3 WIP: review uses of notifications.showErrors
issue #5409

`notifications.showErrors` was historically used to display multiple error notifications whether from validation errors or responses form the API. This usage needs to be reviewed as inline validations should handle the validation side and we should be displaying alerts for actual errors.

Eventually `notifications.showErrors` should be left unused and therefore removed.
2015-07-28 12:27:57 +01:00
Kevin Ansfield
d4c8892ad5 Replace validation notifications with inline validations
issue #5409 & #5336

- update settings/general
- update signin
- update signup
- update edit user
- update reset password
- update setup/three
- remove `formatErrors` function from validationEngine mixin (it's no longer needed as inline validations should handle this instead)
2015-07-28 12:26:34 +01:00
Kevin Ansfield
1ba6bcc131 Refactor notifications service & components
issue #5409

- change persistent/passive notification status to alert/notification
- replace showSuccess/Info/Warn/Error with showNotification/showAlert
- fix and clean up notification/alert components
2015-07-28 12:26:11 +01:00
Jason Williams
5503fb39cc Merge pull request #5565 from acburdine/profile-debounce
Refactor setup controller to only pass valid email into profile image component
2015-07-22 09:53:30 -05:00
Austin Burdine
704e7448b7 fix setup controller to pass in only a valid email to the profile-image component
closes #5563
2015-07-21 13:19:09 -04:00
cobbspur
36697da6d8 User Onboarding - flow navigation
closes #5317

- Adds back button to steps 2 and 3
- Prevents user navigating from step 1 to step 3 unless blog has been created
- Prevents user navigating from step 2 to step 3 unless blog has been created
2015-07-21 17:23:04 +01:00
Rem Zolotykh
8309b702e0 Allow editing blog details on setup
closes #5526
- when user creates blog we set `blogCreated` flag to true and
  depending on it make `POST` or `PUT` request
2015-07-15 03:17:55 +02:00
Hannah Wolfe
8bf8b820b5 Merge pull request #5534 from Remchi/bug-invite-user
Invited user can sign up successfully
2015-07-13 22:10:16 +01:00
Austin Burdine
848bfae400 fix title of blog not updating after setup
closes #5545
- updates config with new blogTitle after setup is finished
2015-07-11 12:34:54 -04:00
Hannah Wolfe
3b91ebf188 Merge pull request #5531 from acburdine/profile-fixes
Fixes the profile image uploader component
2015-07-11 13:17:48 +01:00
Rem Zolotykh
4cce1dfbcd Invited user can sign up successfully
issue #5525
- add `DS.Errors` to `signup` model
- add check for errors: run `showErrors` method only if errors are defined, like in `signin` controller
2015-07-10 23:20:00 +02:00
Jason Williams
e9c499dc09 Refactor role selects; pause transition if saving
Refs #5501
- Switch role select dropdowns from gh-select based components to
  gh-select-native.
- Prevent transition out of editor while there is an in-flight save.
2015-07-09 12:10:00 -05:00
Austin Burdine
3d886a0fc7 profile image component fixes
closes #5528
- adds empty email message to setup validation
- fixes uploads so they actually work
- fixes gravatar to not disappear when an invalid file is selected
2015-07-07 17:13:45 -04:00
Hannah Wolfe
84be427ae6 Merge pull request #5355 from acburdine/onboard-profile
Add profile image upload component
2015-07-07 17:23:58 +01:00
Hannah Wolfe
596192ae41 Merge pull request #5453 from cobbspur/teampermissions
Change permissions for team area
2015-07-06 20:54:29 +01:00
Austin Burdine
9cc06a061c added profile image component
closes #5334
- adds component for profile images (with optional gravatar)
- integrates image profile component into setup form
2015-07-05 17:37:22 -04:00
Hannah Wolfe
1da43ca2da Merge pull request #5514 from halfdan/fix/5436
Reload user after import
2015-07-05 20:51:39 +01:00
Austin Burdine
8f831a180d adds inline errors to validation
closes #5336
- creates gh-form-group component to handle form group status
- refactors current validation methods to work on a per-property basis
- adds gh-error-message component to render error message
- removes (comments out) tests that pertain to the old notifications until the new inline validation is added
2015-07-05 14:02:06 -04:00
cobbspur
30237ec6cb Change permissions for team area
closes #5434

- remove transition away from team page to user page of authors
- hide invite button from authors
- hide invited users from authors
- adjusted gh-user-can and renamed to gh-user-can-admin
- hide password reset on owners profile from administrators
- hide input field for owner email from administrators pending api fix
- fix up tests
2015-07-03 20:06:45 +01:00
Fabian Becker
74057591d4 Reload user after import
fixes #5436
2015-07-03 13:27:36 +02:00
Hannah Wolfe
5dd186dd70 Merge pull request #5477 from acburdine/title-fix
Fix blog title in nav menu not updating
2015-06-26 20:13:27 +01:00
Jason Williams
89102fdd6c Update Ember to 1.13.2
- Refactor to handle deprecations including removal of
  all Views, ArrayControllers, and ItemControllers.
2015-06-24 11:47:28 -05:00
Austin Burdine
dafbe305ad fix blog title not updating in nav menu
closes #5474
- sets the blogTitle property of config when the title setting is changed
2015-06-23 14:15:36 -04:00
cobbspur
438a2a98af Move users routes out of settings & change to team
issue #5434

- move users routes/views/controllers out of settings
- rename users team
- update nav-menu.hbs
- remove legacy routes
- fix up tests
2015-06-18 19:46:46 +01:00
Austin Burdine
0c5883cae0 removes usage of prototype extensions
No issue
- removes more usage of function prototype extensions in favor of Ember functions
- replaces some event calls with the direct function name
- adds comments to functions replaced with the event name
2015-06-15 14:07:25 -04:00
Jason Williams
d2fa0c3a16 Merge pull request #5414 from novaugust/zelda-menu-continued
Zelda menu z-index and viewport transition finishes
2015-06-14 17:57:35 -05:00
Matt Enlow
036155f667 Zelda menu z-index and viewport transition finishes
- [x] Mobilemenu button is missing from `content` and `editor` views
- [x] Mobilemenu pane slides entire content over, should expand over-top-of-content
- [x] Mobilemenu can't be closed
- [x] gh-view-title no longer generates an extra div; it is the h2.
- [x] gh-autonav-toggle closes the mobile menu on mobile. renamed `gh-menu-toggle`
- [ ] There is weird behaviour with mobile menu when changing from big=>small=>big viewport sizes
- ~~[ ] (Future issue) Ghost should remember (localstorage?) whether desktop menu is expanded or collapsed~~
2015-06-14 13:57:09 -07:00
Joe Wegner
934e171db3 invite users after signing up during setup
closes #5338
- moves skip link to below the submit button
- makes the submit button better represent form status
- posts notifications based on success/failure of notifications
- goes to the invite page after user creation
- actually sends invites!

functional tests passing for onboarding invitations

cleanup for linitng

remove unreachable return

access the notifications service better

use link-to instead of an anchor with an action

failed user creations get caught, and bubble as errors

a slew of other cleanup stuff via jason
2015-06-09 11:50:24 -07:00
Matt Enlow
3671f7a028 Add mobile menu open button and close on click outside nav
- Adds gh-view-title component to implement mobile menu button for titles on any page
- Refactors the `content-cover` out into the application template
- Fix various z-index issues with content-cover and gh-alert
- Move `.settings-menu-expanded` application view state from body to `.gh-viewport`
- Unify nav menu / mobile menu actions and code
2015-06-08 22:13:34 +02:00
John O'Nolan
947b61d65f Fixup broken error page styles 2015-06-08 12:14:58 +01:00
Jason Williams
fccb658452 Fix call to this.notification
Refs #5351
- Injected services need to be accessed via .get().
2015-06-04 00:02:03 -05:00
Austin Burdine
5f28034189 update Ember to 1.12.1/ember-data to 1.0.0-beta.18
No issue
- fixed "{{#each}}" helper in templates to use block syntax
- fixed deprecated ember.controller getter/setter function to use new syntax
- removed unnecessary pass-protect route view
2015-06-02 22:26:16 -06:00
Jason Williams
67a2eaec2d Fix up new setup code
No issue
- Prevent download count ajax request from running forever, even after setup is complete.
- Remove unneeded setup routes and controllers.
- Refactor to use ES6-imported ajax.
- Refactor to use injected services.
2015-05-27 15:10:47 -05:00
Sebastian Gierlinger
3f93963c51 Merge pull request #5316 from ErisDS/onboarding-zelda
First pass at user onboarding screens
2015-05-27 17:23:40 +02:00
Jason Williams
3ef1167815 Use Ember.inject instead of needs and initializers
No Issue
- Switches to the newer style of dependency injection.
- Instead of injection Controllers via "needs," use
  Ember.inject.controller().
- Get rid of initializers that were only injecting objects
  into various factories. Converts these objects into Ember.Service
  objects and declaratively inject them where needed via
  Ember.inject.service().  The added benefit to this is that it's no
  longer a mystery where these properties/methods come from and it's
  straightforward to inject them where needed.
2015-05-27 07:41:42 -05:00
Matt Enlow
b321474c8f Merge pull request #5348 from jaswilli/es6-ajax
ES6 module version of ic-ajax instead of global
2015-05-27 09:34:00 +02:00
Jason Williams
45a4001953 ES6 module version of ic-ajax instead of global 2015-05-26 22:13:25 -05:00
Jason Williams
1d38904636 Clean up Ember router map
No Issue
- Switch resources to routes.
- No longer nest "settings" routes so the router reflects
  the way the templates are rendered.
- Remove renderTemplate override from settings routes.
- Remove unneeded routes, controllers, and views.
- Adjust users page so that infinite scroll loading of users works
  and markup remains the same for Zelda styling.
2015-05-26 16:12:12 -05:00
cobbspur
a64b4d43fc Nuke nprogress
closes #5328

- removes all references to nprogress and loading indicator
2015-05-26 19:24:32 +01:00
Hannah Wolfe
b87fb23cfa Merge pull request #5332 from cobbspur/route
Fix route for About page
2015-05-25 18:37:45 +01:00
Hannah Wolfe
5b4701e545 Merge pull request #5319 from jaswilli/nav
Refactor main nav menu into components
2015-05-25 18:37:37 +01:00
Hannah Wolfe
e0e32b8bf1 First pass at user onboarding screens
refs #5315

- split setup into 3 screens
- add gravatar fetching
- add download counter
- add button handling for invite users
2015-05-25 17:43:12 +01:00
cobbspur
7a374abec4 Fix route for About page
No Issue

- Routes,  views and controllers updated for about page
- fix up tests and add redirect check
2015-05-25 17:06:17 +01:00
Jason Williams
9a1094bdea Fix export db link and access token parameter
Refs #5310
- Access token is now stored at session.secure.access_token.
2015-05-24 10:05:45 -05:00
Jason Williams
0ed941c0ed Refactor main nav menu into components 2015-05-24 01:42:59 -05:00
Jason Williams
1e3e2e853a Update to simple-auth 0.8
No issue
- ember-simple-auth@0.8.0-beta.2.
- Switch from SimpleAuth global to ember-cli-simple-auth and
  ES6 imports.
- Refactor controllers to handle changes in 0.8.
- Introduces a new initializer to override some configuration
  items that are set in environment.js but need to be set with
  information that's only (easily) available at runtime.
2015-05-22 15:21:46 -05:00
Jason Williams
6cda11591b Handle password reset from signin page 2015-05-22 19:05:18 +01:00
John O'Nolan
dec115a1cc Integrate new admin frame 2015-05-22 19:02:05 +01:00
Hannah Wolfe
8c9957a8a5 Fixing lint error causing build to fail 2015-05-13 18:07:38 +01:00
Hannah Wolfe
da172a8c40 Merge pull request #5256 from acburdine/passprotect2
Take password protection out of labs
2015-05-13 17:52:50 +01:00
Hannah Wolfe
2a4e9a8aab Merge pull request #5197 from PaulAdamDavis/new-upgrade-notifications
Move upgrade notification to /settings/about/
2015-05-13 16:47:46 +01:00
Austin Burdine
f52c325a8c finish up password protection
closes #5073
- takes password protection out of labs and moves it to general settings
- adds random-words generator to randomly generate passwords
2015-05-12 12:02:18 -06:00
Austin Burdine
8913d36864 added password protection
closes #4993
- brings password protection to the frontend of blogs
- adds testing for password protection
- upgrades bcrypt-js to 2.1.0
2015-04-30 23:44:43 -05:00
Paul Adam Davis
f78c5ccc7f Move upgrade notification to /settings/about/
Refs #5071

- Move the Upgrade notification from the top of the screen to the About page
2015-04-29 22:34:04 +01:00
Hannah Wolfe
8b15dae439 Don't do autosave on new post
closes #5130

- rather than checking for a model change, noop autosave on new controller
2015-04-11 17:42:44 +01:00
Hannah Wolfe
b7ba284dd3 No more feature flag for Code Injection
closes #1993

- remove the feature/config flag that means code injection has to be enabled
2015-04-09 17:52:41 +01:00
Matt Enlow
3cc7493dc2 Ember 1.11.1
- remove `bind-attr` all over the place
2015-04-05 21:13:30 -06:00
Hannah Wolfe
07471d6c05 Improve the forgotten password flow
- if the user has filled out their email already when they hit 'forgotten password' then automatically  fill out and submit the form
- this will look better when we have spinners on the buttons
2015-04-03 17:32:18 +01:00
Pascal Borreli
a74f7057a3 Fixed typos 2015-03-17 17:43:53 +00:00
Matt Enlow
55472b143f Ember init, bower deps, es6 modules 2015-03-11 12:37:41 -06:00
Matt Enlow
6bbc62d3c2 The great migration (EAK -> ember-cli) 2015-03-11 12:37:41 -06:00