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

547 commits

Author SHA1 Message Date
Kevin Ansfield
f884eb891d Fixed sticky validation errors when editing webhooks
refs https://github.com/TryGhost/Ghost/issues/10137
- when closing the edit webhook modal we were rolling back the changed attributes of the webhook model but not clearing the errors object which meant a validation error was shown when re-opening the edit webhook modal
- add `reset()` method to the webhook edit controller and call that when leaving the edit route instead of only rolling back the changed attributes
2018-11-13 11:40:24 +00:00
Kevin Ansfield
4795658554
🎨 Changed tags list, filter dropdown, and select input to sort alphabetically (#1066)
no issue
- switch tags sorting from ID based to alphabetical
- pre-requisite to nested tags sorting
2018-11-07 15:06:28 +00:00
Kevin Ansfield
9b9944bfa2
Added custom integrations - Content API Keys and "Site rebuild" webhooks (#1063)
closes TryGhost/Ghost#9942
- move custom integrations UI out from behind the developer experiments flag
- put Admin API key and web hook secret fields behind the developer experiments flag
- do not show "unsaved changes" modal when adding/editing a webhook
- fixed all webhooks showing for each custom integration
2018-11-06 10:59:47 +00:00
Rishabh Garg
4ca1cc556e Fixed sanitization of user invited emails for notification message (#1060)
no issue

- Escaped email ids string sent to notification message during blog setup

Credits: Antony Garand
2018-10-29 12:19:46 +00:00
Peter Zimon
5f6d9d2c89 Integration UI refinements (#1059)
no issue
* Integration detail page design refinements
* Fixing error message layout on integration detail screen
* Heading details
* Margin refinements
* Refine webhooks modal
* Lines and font sizes
* Replace integrations icon
2018-10-24 14:04:17 +01:00
Kevin Ansfield
1142729697
Added ability to upload integration icons (#1058)
no issue
- add `{{aspect-ratio-box}}` to make it easier to adjust box sizes at a fixed ratio based on container height which isn't possible with CSS directly
- used `{{gh-uploader}}` to add upload facility to the icon shown on the integration screen
2018-10-23 10:29:49 +01:00
Kevin Ansfield
d58363513c Minor cleanups
no issue
- replace unnecessary destructuring with direct import
- remove unused action
2018-10-22 21:00:02 +01:00
Fabien O'Carroll
11ec0835f6 Added ability to delete integrations (#1057)
no issue
- adds delete integration modal, and delete button on the integration page to trigger it
2018-10-19 17:37:27 +01:00
Kevin Ansfield
eeaa5f0999
Added edit webhook modal (#1056)
requires https://github.com/TryGhost/Ghost/pull/10033
- added `settings.integration.webhooks.edit` route
  - `/integrations/:integration_id/webhooks/:webhook_id`
- added error handling to the webhook form modal that copes with the actual errors we get back from the server
- added `event-name` helper to display humanised event names in the webhooks list
- added delete button to the webhooks list and associated confirmation modal
2018-10-19 17:34:53 +01:00
Kevin Ansfield
af058008d6 Improved api key clipboard copy behaviour
no issue
- display "last seen" time if available for API keys
- use CSS to for hover behaviour instead of JS toggle
- add background to "copy" button so it's visible when on top of key data
- use ember-concurrency tasks instead of actions and used the derived state to show a temporary "copied to clipboard" message in place of the "last seen at" time
2018-10-19 00:09:05 +01:00
Kevin Ansfield
519b736015
Added initial custom integrations UI (#1051)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942

- `integration`, `api-key`, and `webhook` models and respective mirage mocks
- moves integration routes around to match ember's concept of nested routes (nested routes reflect nested UI not nested URLs)
- adds custom integrations list to integrations screen
- adds custom integration screen
  - allow editing of integration details
  - show list of webhooks
  - webhook creation modal

NB: the `enableDeveloperExperiments` flag needs to be enabled in the `config.development.json` file for the custom integrations UI to be displayed until it's out of development.
2018-10-18 00:18:29 +01:00
Kevin Ansfield
0cbc8f5eaf
Adjust post URL handling for API v2's absolute URLs (#1055)
no issue
- API v2 outputs absolute URLs so we no longer need to construct full URLs ourselves
2018-10-16 16:54:15 +01:00
Kevin Ansfield
24befb7a5c
🐛 Fixed theme download links (#1053)
closes https://github.com/TryGhost/Ghost/issues/10011
- theme download URLs were missing the `/download/` portion
2018-10-15 13:18:44 +02:00
Fabien O'Carroll
42912cf39b Use Admin API v2 with session auth (#1046)
refs #9865
- removed all `oauth2` and token-based ESA auth
- added new `cookie` authenticator which handles session creation
- updated the session store to extend from the `ephemeral` in-memory store and to restore by fetching the currently logged in user and using the success/failure state to indicate authentication state
  - ESA automatically calls this `.restore()` method on app boot
  - the `session` service caches the current-user query so there's no unnecessary requests being made for the "logged in" state
- removed the now-unnecessary token refresh and logout routines from the `application` route
- removed the now-unnecessary token refresh routines from the `ajax` service
- removed `access_token` query param from iframe file downloaders
- changed Ember Data adapters and `ghost-paths` to use the `/ghost/api/v2/admin/` namespace
2018-10-05 19:46:33 +01:00
Kevin Ansfield
d878d2e31f Fixed non-admin redirects on integration routes
no issue
- after un-nesting the built-in integration routes they no longer had the automatic redirect for non-admins
- added our non-admin redirect behaviour to all of the integration routes
- added our non-admin redirect behaviour to the Zapier route which didn't even have an authenticated redirect previously
- added acceptance test for Zapier route so verify the new behaviour
- wrapped the Zapier widget `<script>` tag in an "is testing" conditional so that the external script doesn't get loaded during tests
2018-10-04 12:16:41 +01:00
Kevin Ansfield
a86f8d01ae Re-jigged integrations routes to support nested modal route
no issue
- moves integration routes around to match ember's concept of nested routes (nested routes reflect nested UI not nested URLs)
- sets us up for having a `settings.integrations.new` modal route that sits on top of the index screen
2018-10-04 11:10:17 +01:00
Kevin Ansfield
5390f51e36
Renamed Apps to Integrations (#1050)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942
- Apps are becoming Integrations that cover the existing built-in integrations as well as new custom integrations
- custom Integrations will comprise of API keys for the Admin and Content APIs and custom-registered webhooks
2018-10-04 11:02:36 +01:00
Kevin Ansfield
9dd545cbb5 Fixed submit-on-enter and password manager issues on signup
closes https://github.com/TryGhost/Ghost/issues/9868
- moved submit action to the `<form>` which allowed removal of the per-input enter key handlers
- changed submit button to trigger the form submit
- improved markup for password managers
  - linked labels with inputs
  - changed button to a "submit" type and linked it with the form
  - added hidden email input at the bottom of the form in case password managers do not take disabled inputs into account
2018-09-17 16:03:58 +01:00
Kevin Ansfield
345d7c61d3 Improved variable naming in labs downloadFile action
no issue
2018-09-17 11:48:13 +01:00
Katharina Irrgang
065d39ee0f
Updated links to use v2 docs (#1036)
no issue

- found some more v1 links
2018-08-15 23:35:17 +02:00
Kevin Ansfield
11e301b63c Made Koenig the default editor, removed Koenig labs flag 2018-08-14 17:49:50 +01:00
Kevin Ansfield
05eb7db8e9 Removed dated permalinks setting
no issue
- permalink config is now handled through `routes.yaml`
2018-08-14 17:49:50 +01:00
Kevin Ansfield
02f45c2a3a Added routes.yaml upload to Labs screen
refs https://github.com/TryGhost/Ghost/issues/9744
- adds `routes.yaml` upload using the same UI as the `redirects.json` upload
  - upload: `POST /settings/routes/yaml/`
  - download: `GET /settings/routes/yaml/`
2018-08-14 17:49:50 +01:00
Kevin Ansfield
b6bc7d6a61 Koenig - Fixed full-width images not respecting fullscreen mode
refs https://github.com/TryGhost/Ghost-Admin/pull/1030
- fixed typo
2018-07-26 13:28:02 +01:00
Kevin Ansfield
faf20c42d5
🎨 Koenig - Hide sidebar when editing (#1030)
refs https://github.com/TryGhost/Ghost/issues/9724
- when Koenig is active, toggle `ui.isFullscreen` when entering/leaving the editor route
- add `ui.isFullscreen` to the `showNavMenu` CP in the application controller
- when in fullscreen mode, display a "< Stories" link in the editor header
- refine editor header style
2018-07-26 12:53:23 +01:00
Kevin Ansfield
09a8c7fa88 Koenig - Added reading time and word count display
refs https://github.com/TryGhost/Ghost/issues/9724
- add `registerComponent` hook to cards so that `{{koenig-editor}}` can fetch properties from card components directly
- add word count and reading time utilities
- add throttled word count update routine to `{{koenig-editor}}` that walks all sections and counts text words or fetches word/image counts from card components
- add `wordCountDidChange` hook to `{{koenig-editor}}` so that word count + reading time can be exposed
- modify editor controller to update it's own word count property when koenig triggers it's action
- modified the editor template to show reading time + word count next to the post status
2018-07-20 15:53:21 +01:00
Kevin Ansfield
fd9fe42296 🎨 Koenig - Keep posts free of blank cards
refs https://github.com/TryGhost/Ghost/issues/9623
- add new `deleteIfEmpty` option when defining cards
- add `.cleanup()` method to `{{koenig-editor}}` that will remove any blank cards
- pass `{{koenig-editor}}` instance up to the editor controller when it is initialised
- call `.cleanup()` in the editor controller when performing full saves, when leaving the editor with a draft, and when opening the editor with a draft
2018-06-14 16:55:02 +01:00
Zimo
150f68e826 Koenig Editor Beta Release
refs https://github.com/TryGhost/Ghost/issues/9505
- see https://forum.ghost.org/t/koenig-beta-release/1284 for full details
- moved Koenig editor checkbox from experimental to Beta
- added info message support in editor screen
- removed alert when opening markdown-incompatible post with Koenig disabled
2018-05-17 12:01:00 +01:00
Kevin Ansfield
902e361e22 Add {{background-image-style}} helper
no issue
- cleans up multiple CPs that were only outputting a background image style
- moves URL decoding/encoding and `htmlSafe` output into one place
2018-05-14 13:04:53 +01:00
Kevin Ansfield
c71437048a 🐛 Fixed low-resolution gravatar images on Team/User screens
closes https://github.com/TryGhost/Ghost/issues/9563
- fixes incorrect gravatar URLs by removing incorrect HTML encoding of the URL and enforcing URL encoding
- centralise image URL generation in the User model so that default image logic isn't spread across the app
- remove unnecessary proxy mixin from `ghost-paths` service (allows property access without `.get()`)
2018-05-14 12:15:08 +01:00
Kevin Ansfield
87bbf924a4 Remove more import Ember via module imports
refs https://github.com/TryGhost/Ghost/issues/8927
- removes usage of `Ember.testing`
- removes usage of `Ember.uuid`
- removes usage of `Ember.Debug.registerWarnHandler`
2018-05-03 17:52:39 +01:00
Kevin Ansfield
8c23d5acef Removed used of ember-data-filter
closes https://github.com/TryGhost/Ghost/issues/9591
- swapped use of `store.filter` for a combination `store.peekAll` and CPs to filter the result set
2018-04-30 13:54:09 +01:00
Kevin Ansfield
61031c35a3 🐛 Fixed admin URL not updating when changing tag slug
closes https://github.com/TryGhost/Ghost/issues/9571
- uses `window.replaceState` to update the URL when a tag is saved with a new URL
    - ensures back button doesn't result in 404
    - use `windowProxy` util so that behaviour can be tested
2018-04-30 12:29:43 +01:00
Kevin Ansfield
f6ec2f23f5 Move mobiledoc knowledge out of {{gh-markdown-editor}}
no issue
- pre-requisite for using `{{gh-markdown-editor}}` inside a Koenig card
- switch to passing markdown into `{{gh-markdown-editor}}`
- move markdown->mobiledoc logic into the `editor` controller
2018-04-20 15:43:44 +01:00
Kevin Ansfield
351c7adf89 Fixed post autosave for changes to nested objects in mobiledoc
no issue
- fixes a problem that appeared after the first save of a post; refs for nested objects in the `mobiledoc` object didn't change so any time they were updated in the `scratch` object they were also updated in the `mobiledoc` object which broke our dirty attributes tracking
- by creating a deep copy during save we ensure `scratch` and `mobiledoc` are kept separate without causing unnecessary copying (saves occur much less frequently than scratch updates)
2018-04-19 17:29:01 +01:00
Austin Burdine
fd6f2551bb Bower => NPM (#972)
no issue

- Convert validator to an npm dependency
  - clean up validator imports
  - fix validator function imports
  - remove unused validator extensions
- Convert devicejs to an npm dependency
- Convert remaining used bower deps to npm deps
- 🔥 Remove bower & unused bower dependencies
- remove globals imports in favor of direct module imports where possible
2018-03-19 17:56:09 +00:00
Kevin Ansfield
cbcf09e4fc Fixed asset rewriting for default user images
no issue
- ember-cli's asset rewriting was not picking up the asset URLs when they were directly embedded in a template string, fix is to ensure the image location is unambiguous by assigning it to a variable first
2018-03-19 15:31:35 +00:00
Kevin Ansfield
e648de4e7e ESLint fixes for latest eslint-plugin-ember
no issue
2018-03-19 13:05:02 +00:00
Hey24sheep
09fe424eb1 🐛 Fixed "Are you sure" modal being shown incorrectly after toggling private mode (#964)
closes TryGhost/Ghost#9472
- add `changedAttributes()` passthrough to `settings` service
- use `changedAttributes()` in general settings `toggleIsPrivate` method to reset the password to the last known value when disabling private mode
2018-03-09 14:42:27 +00:00
Austin Burdine
ae3b9f97d9 Contributor Role (#948)
refs https://github.com/TryGhost/Ghost/issues/9314

* added save button for contributor
* hide tag filter & redirect to posts.index if post is published
* update editor controller test to need session service
2018-02-07 10:42:46 +01:00
Kevin Ansfield
3bbd488ff2 🐛 Fixed editor autofocus when starting a new post
no issue
- we were setting the `shouldFocusEditor` value correctly but then immediately resetting it again 🙈
- updated the logic to change the value when going from new->edit as well as setting it correctly _after_ all of the controller values are reset in the `setPost` method
2018-01-25 13:14:50 +00:00
Kevin Ansfield
41b3521cf1
Resurrect the old alpha Koenig editor (#916)
requires https://github.com/TryGhost/Ghost/pull/9277

- added a `koenigEditor` feature flag
  - modified the feature service to accept a `developer` boolean on the options object passed into the internal `feature` method, if `true` the feature flag won't be enabled unless the `enableDeveloperExperiments` config option is also enabled
  - added "developer feature testing" section in labs that's only visible if `enableDeveloperExperiments` config flag is enabled
  - added koenig editor toggle to the developer section in labs

- enabled a switch between the markdown and koenig editors
  - modified the default value of the `mobiledoc` attr in the Post model to be a blank mobiledoc or blank markdown mobiledoc depending on the feature flag
  - modified the `autofocus` switch in editor controller's `setPost` method so that it is always switched, even for new->edit where the post model isn't swapped
  - added a compatibility check to the editor controller's `setPost` method that shows an alert and force enables the koenig editor if the koenig flag is not enabled and the opened post is not compatible with the markdown editor

- fixed various issues that have appeared due to the old koenig alpha becoming out of sync with master
2018-01-18 15:36:01 +00:00
Kevin Ansfield
51e890b991
Refactor new->edit transition to avoid editor re-renders (#949)
closes TryGhost/Ghost#8287
closes TryGhost/Ghost#8750
- moved all editor model functionality into the new `editor` route+controller
- moved editor template from `editor/edit.hbs` to `editor.hbs`
- refactored `editor` controller and the `editor.new`/`editor.edit` routes to work with a persistent editor rather than a teardown/re-render when transitioning from new->edit
- fixed issue in `{{gh-markdown-editor}}` for `autofocus` behaviour when the component isn't re-rendered
- fixed issue in `{{gh-simplemde}}` that was causing multiple updates to the `value` property when a new value is passed in to the component
- added `{{gh-scheduled-post-countdown}}` component to lower the noise in the editor controller
- removed editor route/controller mixins
- removed the `editor.edit` and `editor.new` controllers
2018-01-17 13:27:37 +00:00
Kevin Ansfield
ac16e6504c ESLint: Consistent ember property/method ordering
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-components.md
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-controllers.md
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-routes.md
2018-01-12 12:17:56 +00:00
Kevin Ansfield
0ef503f23d ESLint: Don't use observers if possible
closes https://github.com/TryGhost/Ghost/issues/8690
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-observers.md
- remove observers where possible
- move night shift toggle behaviour to the feature service
	- refresh feature service after import to fix stuck night shift toggle
2018-01-12 12:17:56 +00:00
Kevin Ansfield
050f4d99b6 ESLint: Alias model in controllers
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/HEAD/docs/rules/alias-model-in-controller.md
- replace `model` with a meaningful property name everywhere possible
- refactor `design` and `general` settings controllers to use a directly injected settings service rather than passing it in as a "model" to be more explicit
2018-01-12 12:17:56 +00:00
Kevin Ansfield
7afb88a0c2 Switch to eslint-plugin-ghost extending plugin:ghost/ember
no issue
- fix lint errors in lib/gh-koenig
- fix ghost:base eslint errors
- update ember plugin refs, remove ember-suave plugin refs
- remove old jshint refs
- add `lint:js` script
- switch to `eslint-plugin-ghost` extending `plugin:ghost/ember`
2018-01-12 12:17:56 +00:00
Kevin Ansfield
63fe1b1a88
🎨 Move "Update available" notification to the About screen (#894)
refs https://github.com/TryGhost/Ghost/issues/5071

Upgrade messages are now shown on the About screen rather than as alerts. Notifications that are marked as `top` or `custom` are still shown as alerts to allow for certain upgrade messages to be given more visibility.

- remove old `upgrade-notification` service
- update the `upgrade-status` service:
  - add a `message` property that contains an upgrade notification if any exists
  - add a `handleUpgradeNotification` method that accepts a Notification model instance and extracts the `notification.message` property into a html safe string for use in templates
- when loading server notifications during app boot, pass notifications that aren't marked as `top` or `custom` to the new `handleUpgradeNotification` method
- update the `about.hbs` template to pull the upgrade message from the `upgradeStatus` service
2018-01-09 14:23:36 +00:00
Kevin Ansfield
b8fc5606b8 Added Zapier app with pre-built zap templates list (#943)
no issue

- add Zapier app to Apps screen
- use Zapier's zap template embed widget to list our pre-built templates
2018-01-09 11:36:41 +01:00
Abijeet Patro
d28ed0064c Prevent "Invalid URL" errors due to trailing spaces when editing Slack Webhook URL (#925)
no issue
- trim the slack URL in the `updateURL` action
2018-01-08 10:31:53 +00:00
Kevin Ansfield
b8970820e0
🐛 Fixed missing error message for unexpected errors during import (#936)
no issue
- show an error message when a non-Ghost error is received, eg. when a proxy server times out due to a large import
2018-01-03 12:30:42 +00:00
Kevin Ansfield
a51fcba8cb
Don't destructure Ember.testing (#933)
no issue
- `Ember.testing` is or will soon be a getter/setter in Ember with the value set during a test, however destructuring will read the value when the module is evaluated
- moves all uses of `Ember.testing` inline
2018-01-02 10:19:59 +00:00
Kevin Ansfield
756439fc75 🐛 Fixed unresponsive upload buttons
closes https://github.com/TryGhost/Ghost/issues/9292
- fix a global find/replace error that caused the wrong element classes in the general and labs file dialog trigger events
2017-11-30 07:00:25 +00:00
Kevin Ansfield
b696c750b8 Use computed property brace expansion
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/use-brace-expansion.md
2017-11-25 09:49:49 +00:00
Kevin Ansfield
f8c7d606c7 Avoid leaking state in Ember objects
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/avoid-leaking-state-in-ember-objects.md
2017-11-25 09:49:49 +00:00
Kevin Ansfield
c903dc9efc Remove unused top notification count functionality
no issue

- in a very old iteration of the admin design we needed a data attribute containing the number of notifications in order to add extra spacing in the styles. This hasn't been necessary for a long time and there are easier ways to do it now than using observers.
2017-11-24 11:15:59 +00:00
Kevin Ansfield
14aa87ed39 Clean up markdown help toggle
no issue

The markdown help link was removed from the sidebar so the only link to toggle the markdown help modal is now the markdown editor yet we we still had a more general implementation with a confusing pass-through of closure actions.

- move the markdown modal toggle and display into the `{{gh-markdown-editor}}` component
2017-11-24 11:15:59 +00:00
Kevin Ansfield
74428efd8b
🐛 Fixed inability to re-upload the same redirects file (#912)
closes https://github.com/TryGhost/Ghost/issues/9266
- `emberx-file-input` passes a `resetInput` function through to it's action handler but we weren't doing that in our override component. Added the missing functionality and updated all of our handlers to use that instead of doing manual resets
- added a `setFiles` action to `{{gh-uploader}}` and yield it for use in block invocations
2017-11-22 17:04:48 +00:00
Kevin Ansfield
99c60d5060 🐛 Fixed missing errors on failed import
no issue
- bug was introduced in https://github.com/TryGhost/Ghost-Admin/pull/902 where the change to `response.payload.errors` from `error.errors` was missed
2017-11-16 14:04:33 +00:00
Kevin Ansfield
539f9cabb4
🎨 Added "Featured posts" filter and badge to stories list (#907)
closes https://github.com/TryGhost/Ghost/issues/9234
- add `featured` badge to stories/pages that have the featured flag
- add "Featured posts" to the post type filter dropdown
- simplified badge logic in `{{gh-posts-list-item}}`
2017-11-10 17:36:27 +00:00
Kevin Ansfield
ea34d49c89
🐛 Fixed failing Facebook URL validation for group urls (#906)
closes https://github.com/TryGhost/Ghost/issues/9160
- simplified FB validation to allow any valid FB url (autocomplete of raw usernames and facebook-like URLs is still in place)
- fixed a bug with sticky Twitter validation message, if you entered an invalid URL then changed it to an invalid username you still saw the invalid URL message (surfaced through new test helpers for validating facebook/twitter fields)
2017-11-10 16:38:30 +00:00
Kevin Ansfield
82d1473406 use windowProxy to avoid mangling URL during team acceptance tests 2017-11-10 14:27:47 +00:00
Kevin Ansfield
ddc7b857b5
Bump ember-ajax dependency (#902)
no issue
- upgrade `ember-ajax` to 3.0.0
- `ember-ajax` [now passes the payload through directly](https://github.com/ember-cli/ember-ajax/releases/tag/v3.0.0) rather than trying to normalize it so all our error handling needed to be updated
2017-11-03 22:59:39 +00:00
Aileen Nowak
6ef4c622ad 🎨 Added confirmation dialogs when leaving screens with unsaved changes (#891)
closes TryGhost/Ghost#9119, refs TryGhost/Ghost#8483

- Apps - AMP
   - Added `leave-settings-modal` component to Settings - Apps - AMP
- Apps - Slack
   - Added `leave-settings-modal` component to Settings - Apps - Slack
   - Added a `triggerDirtyState` action that will uses a new Array with the input data to trigger the dirty state on the parent settings model
- Apps - Unsplash
   - Added `leave-settings-modal` component to Settings - Apps - Unsplash
   - Used manual tracking of changes with using a custom `dirtyAttributes` property and a `rollbackValue` to manually rollback the `isActive` attribute on the model
- Code injection
   - Added `leave-settings-modal` component to Settings - Code injection
- Design
   - Added `leave-settings-modal` component to Settings - Design (only for navigation model)
   - Used manual tracking of changes with using a custom `dirtyAttributes`
   - Added an additional `updateLabel` action to underlying `gh-navitem` component which gets fired on the `focusOut` event, to detect changes on the label
- Team - User
   - Added `leave-settings-modal` component to Team - User
   - Used manual tracking of changes with using a custom `dirtyAttributes` to track changes in slug and role properties
2017-10-31 15:27:25 +00:00
Kevin Ansfield
72ff75b935
New tags input, drop selectize & jquery-ui deps (#892)
closes https://github.com/TryGhost/Ghost/issues/6458
- swap `ember-sortable` for `ember-drag-drop` in navigation UI
- extract PSM tag input into new `{{gh-psm-tags-input}}`
- add new `{{gh-token-input}}` that wraps `ember-power-select` and `ember-drag-drop` to replicate the previous selectize based tags input
- enhance `{{gh-psm-tags-input}}` behaviour to highlight selected primary tag and show "primary/internal" in selected tag titles
- 🔥 remove `selectize`
- 🔥 remove `jquery-ui`
- 🔥 remove unused `{{gh-navigation}}` component
2017-10-31 09:10:49 +00:00
Kevin Ansfield
238983a5df Match service/controller import to ember-modules-codemod style for consistency
no issue

Automated tools, code generators, and editor integrations are increasingly standardising on the import style used in `ember-modules-codemod`. Our import style differed a little with regards to service/controller injection imports which meant we were starting to see inconsistent naming.
2017-10-30 09:38:01 +00:00
Aileen Nowak
4eff42bdac Match client-side password validation to new server-side rules (#899)
refs TryGhost/Ghost#9150

- added a new validator for password validations that will take care of the rules client side
- Passwort rules added:
   - Disallow obviously bad passwords: 1234567890, qwertyuiop, asdfghjkl; and asdfghjklm
   - Disallow passwords that contain the words "password" or "ghost"
   - Disallow passwords that match the user's email address
   - Disallow passwords that match the blog domain or blog title
   - Disallow passwords that include 50% or more of the same characters: 'aaaaaaaaaa', '1111111111' and 'ababababab' for example.
- When changing the own password, the old password is not affected by the new validations
- Validation are running on
   - setup
   - signup
   - password change in Team - User (only new passwords are validated)
   - passwort reset
2017-10-26 11:02:17 +01:00
Kevin Ansfield
3da1702af9 Fix Ember deprecations and warnings (#895)
no issue 

- `controller.content` will no longer be an alias to `controller.model`
- split relationships and `attrs` in Post model, add missing transforms
- fix unknown `error` field in payload warning when `/users/me` returns 404 during tests
- fix unsafe style binding warnings
2017-10-13 16:39:49 +07:00
Katharina Irrgang
cb576b14d3 Display private RSS feed url in general settings (#888)
refs https://github.com/TryGhost/Ghost/issues/9001

- show private feed url if private blogging is enabled
- added a `.avoid-break-out` CSS utility class to prevent layout issues caused by non-breaking text such as long links
2017-10-05 10:59:14 +01:00
Aileen Nowak
bbbe6038b2 🎨 Added confirmation dialog when leaving settings screen with unsaved changes (#871)
closes TryGhost/Ghost#8483

- Added a new modal component that gets rendered when leaving general/settings after changes have been done but not saved
- Removed independent saving logic for social URL for consistent UX
2017-10-04 11:49:30 +01:00
Kevin Ansfield
56ba6e2171 🐛 Fixed missing "file too large" text for import uploads (#867)
closes https://github.com/TryGhost/Ghost/issues/8660

- detect a `413` when uploading an import and show the appropriate message
- refactor `{{gh-file-upload}}` to use closure actions
- add test selectors to import errors HTML
- note: doesn't include tests because `{{gh-file-upload}}` doesn't rely on the file input's `change` event (as used by our other uploader components to facilitate testing) and browsers don't allow us to artificially set and submit files
2017-09-22 21:59:05 +02:00
Kevin Ansfield
6cf39d49af Upload/Download redirects UI
closes TryGhost/Ghost#9028

- add upload/download UI to labs screen
  - displays success/failure state in the button for 5 secs after uploading
- minor refactor to remove redundant `{{#if}}` conditionals in general settings screen
- minor naming refactor of `onUploadFail` -> `onUploadFailure` for `{{gh-uploader}}`'s closure action
2017-09-21 17:01:40 +02:00
Kevin Ansfield
2e12987938 🎨 Enabled Unsplash integration by default (#862)
no issue

- Unsplash integration is enabled by default for all users
- it's no longer necessary to create your own Unsplash application and configure your application ID
2017-09-20 12:19:48 +02:00
Kevin Ansfield
d4faa15f46 Upgrade eslint dependencies (#855)
no issue

- bump ember-cli-eslint and eslint-plugin-ember
- fix indentation & "unnecessary escape chars" lint errors
2017-09-11 14:56:11 +07:00
Kevin Ansfield
6cb04e4c41 Removed defunct Ghost OAuth code (#848)
refs https://github.com/TryGhost/Ghost/issues/8958

- Ghost OAuth isn't coming back, time for the code to disappear and simply all the things
- fixes the `Usage of router is deprecated` notices that flood the console/test logs when testing
2017-09-04 21:17:04 +02:00
Kevin Ansfield
27c169b59b 🐛 Fixed "active" state of apps on apps index screen (#843)
no issue

On the apps index screen there were conditionals for each app so that active apps show "Active" instead of "Configure" when they are activated - the conditionals weren't working because the properties they check for weren't available in the template's context.

- add a new `settings/apps/index` controller that imports the `settings` service
- updates template conditionals to check for properties on the `settings` service
2017-08-30 14:31:04 +02:00
Erik Hanchett
e1c3ff26f9 🐛 Fix field focus when adding navigation items (#835)
closes TryGhost/Ghost#8764
- when adding a new nav item in the `design` controller, use jQuery to give focus to the name field of the last navigation item
2017-08-24 12:53:14 +01:00
Kevin Ansfield
8c2f054b04 🐛 Fix save button showing "Retry" when user slug field loses focus (#834)
no issue
- the `updateSlug` task never returned a value if there was no change needed, this meant that giving the slug field focus then blurring it again caused the "Save" button to become red with "Retry" text
- always return true from `updateSlug` - this stops the button from showing "Retry" and will instead show "Saved" which is a little less confusing
2017-08-22 14:59:49 +07:00
Kevin Ansfield
88449ed639 Switched from ember-cli-shims to new module imports (#779)
no issue

- add eslint-plugin-ember, configure no-old-shims rule
- run `eslint --fix` on `app`, `lib`, `mirage`, and `tests` to move imports to the new module imports
- further cleanup of Ember globals usage
- remove event-dispatcher initializer now that `canDispatchToEventManager` is deprecated
2017-08-22 14:53:26 +07:00
Kevin Ansfield
852b9eec05 Remove usage of jquery-file-upload (#815)
closes https://github.com/TryGhost/Ghost/issues/6661
- refactor `gh-profile-image` component to use native browser functionality
- remove `jquery-file-upload` bower dependency
2017-08-18 10:27:42 +07:00
Seth Lilly
947017427a 🎨 Fix positioning of direction arrows in subscribers table (#824)
closes TryGhost/Ghost #8876
- Changed arrow styles to enable correct positioning. The sort arrow displayed below the `th` label; this CSS change fixes it.
- Capitalization change: opinionated, but changing capitalization of “Address” to match “Subscription Date”.
2017-08-17 11:46:10 +01:00
Kevin Ansfield
1e3191b811 Unsplash integration
closes https://github.com/TryGhost/Ghost/issues/8859, requires https://github.com/TryGhost/Ghost/pull/8895
- adds Unsplash app to app settings
  - enable/disable toggle
  - validation and testing of Unsplash App ID
  - Unsplash App ID field hidden if provided via Ghost config
  - adds `fetchPrivate` method to `config` service to pull config that requires authentication and updates authentication routines to fetch private config
- adds Unsplash buttons to editor toolbar and `{{gh-image-uploader}}`
  - only present when Unsplash app is enabled
  - opens Unsplash image selector when clicked
  - `{{gh-image-uploader}}` has a new `allowUnsplash` attribute to control display of the unsplash button on a per-uploader basis
- adds Unsplash image selector (`{{gh-unsplash}}`)
  - uses new `unsplash` service to handle API requests and maintain state
  - search
  - infinite scroll
  - zoom image
  - insert image
  - download image
- adds `{{gh-scroll-trigger}}` that will fire an event when the component is rendered into or enters the visible screen area via scrolling
- updates `ui` service
  - adds `isFullscreen` property and updates `gh-editor` so that it gets set/unset when toggling editor fullscreen mode
  - adds `hasSideNav` and `isSideNavHidden` properties
- updates `media-queries` service so that it fires an event each time a breakpoint is entered/exited
  - removes the need for observers in certain circumstances
2017-08-15 16:01:12 +01:00
Kevin Ansfield
0eac658b91 Refactor general UI state into a service
no issue
- moves general UI state control such as menu display, autonav, settings menu, etc into a `ui` service for easier use within components
- no longer required to jump through hoops passing state and actions down from application controller into components
- removes indirect "route" actions in favour of calling actions/methods directly on the `ui` service
2017-08-15 16:01:12 +01:00
John O'Nolan
ece1d8cef1 Resolve nightshift visual bugs
Closes https://github.com/TryGhost/Ghost/issues/8731, closes https://github.com/TryGhost/Ghost/issues/8742

- Visual bugs resolved
- Slack test message converted from alert to notiftication
- Slack test message notification copy update
- Increased size for notifications
2017-07-31 11:49:49 +04:00
Kevin Ansfield
c4ad8b78b0 🐛 fix filter dropdown issues
closes https://github.com/TryGhost/Ghost/issues/8729, closes https://github.com/TryGhost/Ghost/issues/8728
- remove the duplicated `max-height` rules for different parts of the power select dropdowns - they were interacting with each other and causing a large part of the lists to be unreachable
- bump the `bufferSize` so that enough dropdown items are rendered to fill the dropdown list
- filter the temporary tags that are created when using the PSM tags input so duplicates aren't visible in the tags dropdown filter
2017-07-21 19:01:54 -04:00
Kevin Ansfield
33be8ebcec 🐛 fix "failed" button flash on password reset (#791)
closes https://github.com/TryGhost/Ghost/issues/8688
- `reset` task wasn't returning a truthy value on success so `gh-task-button` flashed the "retry" state before the transition happened
2017-07-20 19:12:33 +07:00
Kevin Ansfield
6113b1a743 🐛 fix guard for inviting owner in setup/three (#786)
refs https://github.com/TryGhost/Ghost/issues/8692

- fixes the guard on setup/three against inviting the owner user set up
on setup/two (we were sending invites for every e-mail in the list
rather than only valid e-mails)
- adds a check to see if we get any invalid errors from the server and
will show those separately to the `x emails failed to send` alert
2017-07-20 12:08:34 +02:00
Kevin Ansfield
69539563c7 🐛 fix double-click on post to open editor (#780)
closes https://github.com/TryGhost/Ghost/issues/8675
- move `gh-posts-list-item` to closure actions
- add missing `openEditor` action in posts controller
2017-07-13 16:55:13 +07:00
Kevin Ansfield
ab41d8b84e 🎨 Focus editor content area by default (#768)
closes TryGhost/Ghost#8525

- always give focus to the editor content area by default when loading the editor
- allow content autosave to work for new posts (it was previously turned off for new posts)
- move transition-on-save behaviour from editor/new controller into the controller mixin's save routine
- cancel background autosave when "are you sure you want to leave?" modal is shown as it can cause the "leave" option to fail because it attempts to delete the post record that can be in flight (plus if we're saving anyway it doesn't make much sense to ask the user  🙈) - this is quite an edge-case as it will only happen if the user makes a content change to a draft post then tries to leave the screen within 3 seconds
- change the editor placeholder text
- wait for any save task to finish before exiting the new post route (fixes infinite loop and popup of "are you sure you want to leave?" modal that is then closed automatically straight away
- add a guard to the `gh-post-settings-menu` component so that if the authors query takes a while we don't end up trying to set a value when the component has already been removed
2017-07-10 17:09:50 +02:00
Kevin Ansfield
e7b378ea05 🚀 supercharge tags performance
closes https://github.com/TryGhost/Ghost/issues/8540
- use `{{vertical-collection}}` in the tags dropdown filter list, opening the dropdown is now virtually instant as it's not attempting to immediately render components for every tag in the list
- remove pagination/infinite scroll from tags screen
- load all tags when accessing the tags screen
  - will pause to show spinner if no tags have previously been loaded
  - if tags exist in the ember data store, show the list immediately and load/update list in the background
- use `{{vertical-collection}}` to render enough tags to fill the scrollable area with a small buffer and use occlusion and element re-use to swap tags in whilst scrolling (suuuuper fast no matter number of tags loaded)
- scroll tags into view when they are selected (keyboard nav now makes a lot more sense)
- tested with 875 tags and 2x/5x CPU throttling with no major slowdowns 🎉
2017-07-07 17:53:08 +01:00
Kevin Ansfield
016d3f882d 🔥 remove content screen keyboard shortcuts
closes https://github.com/TryGhost/Ghost/issues/8662
- removes `k`, `j`, `up`, `down` shortcuts for changing the active post (these were already mostly unusable in 1.0) and the associated `enter` and `ctrl/cmd+backspace` commands for opening and triggering the delete modal respectively
- removes the `c` shortcut for opening the new post screen
2017-07-07 10:37:24 +01:00
Aileen Nowak
a270d2b183 💅🏼 Imprve theme activation error messages (#756)
refs TryGhost/Ghost#8530

This PR takes care that the modals for theme activation gets the same treatment as theme upload modal:
- differentiate between normal and fatal errors
- list headings for each error type (fatal, normal or warning)
- update test
2017-06-22 19:19:01 +02:00
Kevin Ansfield
54416cbb7a 🐛 fix title not updating after import (#749)
closes https://github.com/TryGhost/Ghost/issues/8508
- manually set `config.blogTitle` when reloading settings after a
successful import
2017-06-22 11:51:38 +01:00
Katharina Irrgang
dfbbd53265 🐛 fix image upload for icons: reset input (#754)
closes TryGhost/Ghost#8545
2017-06-20 16:54:27 +07:00
Kevin Ansfield
7e5317ba0b 📖 update all support.ghost.org links to docs/help.ghost.org (#740)
no issue
- support.ghost.org has gone away, we now have self-host/dev
documentation on https://docs.ghost.org and user documentation at
https://help.ghost.org
2017-06-15 18:19:12 +01:00
Kevin Ansfield
f1c337c5f9 🐛 fix saving users when slug has been changed (#731)
closes https://github.com/TryGhost/Ghost/issues/8547
- `window.history.state` is no longer a thing (not sure if it's a recent browser change or because we switched to hash-urls) so the URL change logic after a successful user save needs to use `window.location.hash` instead
2017-06-09 00:04:16 +07:00
Kevin Ansfield
43a18115ba 🐛 fix IE11 bugs and styles (#724)
closes https://github.com/TryGhost/Ghost/issues/8384

- fixes image uploads on settings/general by reverting to jQuery for triggering the file dialog because IE11 doesn't support `MouseEvent` events or have the `.closest` method on native DOM elements
- gives all SVG elements an explicit `width` and `height` - if one property is set to `auto` or not specified IE11 will treat it as 100% of the container
- fixes horizontal scroll + scrollbar on the main app viewport
2017-06-01 23:02:03 +02:00
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