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

564 commits

Author SHA1 Message Date
Kevin Ansfield
e8c852e774 Remove unused {{gh-datetime-input}} and related helper 2017-11-30 17:06:48 +07:00
Kevin Ansfield
312bd68f4c Always use closure actions
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/closure-actions.md
2017-11-25 09:49:49 +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
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
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
Kevin Ansfield
3aa44c9f21
🐛 Fixed "Someone else is editing" errors showing when no-one else is editing (#901)
closes https://github.com/TryGhost/Ghost/issues/8969

Collision detection errors were appearing incorrectly because the save routines in the post settings menu bypass the sequential saves in the main editor controller and so are prone to having stale data if a previous save is still in progress.

- added a new `savePost` task that is part of the `saveTasks` group so that all post saves are sequential
- pass the `savePost` task to the `{{gh-post-settings-menu}}` component
- use `savePost` task in `gh-post-settings-menu` instead of calling `save()` directly on the model instance
2017-11-02 09:47:52 +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
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
Kevin Ansfield
68442c5676 Custom Post Templates UI (#878)
refs https://github.com/TryGhost/Ghost/issues/9060

- add `{{gh-psm-template-select}}` component
  - allows selection of a custom template for a post if the active theme has custom templates
  - loads themes on render, only hitting the server if not already in the store
  - disables select if post slug matches a `post-*.hbs` or `page-*.hbs` template
- adds `customTemplate` attr to `Post` model
- adds `templates` attr to `Theme` model with CPs to pull out custom vs post/page override templates
- add `.gh-select.disabled` styles to make disabled selects look visually disabled
2017-10-10 14:26:19 +02:00
Kevin Ansfield
0ef0af5f7b Limited simultaneous upload requests (#890)
closes https://github.com/TryGhost/Ghost/issues/9120

- use `ember-concurrency` to enqueue uploads in `{{gh-uploader}}
- set simultaneous upload limit to 2
2017-10-09 18:21:57 +07: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
b4bb4887b5 🎨 Added keyboard shortcuts for editor modes (#821)
closes https://github.com/TryGhost/Ghost/issues/8863

- Spellcheck shortcut: <kbd>Ctrl-Alt-S</kbd>
- Render preview shortcut: <kbd>Ctrl-Alt-R</kbd>
- Side-by-side preview shortcut: <kbd>Ctrl-Alt-P</kbd>
- fix "Hemmingway" typo
- update simplemde fork to add a bypass of the Ctrl->⌘ transformation in toolbar button tooltips
2017-10-03 12:31:10 +07:00
Kevin Ansfield
75c5a021ff 🐛 Fixed search losing focus when removing search term (#883)
closes https://github.com/TryGhost/Ghost/issues/9075

- ensure we re-focus the input element after closing the dropdown so that it's not necessary to click on the search input again after using backspace
- removes unnecessary use of `run.scheduleOnce`
  - this was causing the error in TryGhost/Ghost#9075 because search was happening out of sync with the open/close of the dropdown in turn causing `ember-basic-dropdown` to try measuring non-existent elements
  - alternative fix would be to wrap each open/close, focus, and search call in separate `run.scheduleOnce('afterRender', ...)` calls
- remove use of `invokeAction`, it's not been necessary in Ember for a while now and we should be calling methods directly where possible for easier debugging
2017-10-03 12:00:25 +07:00
Kevin Ansfield
c994022511 🐛 Fixed error when navigating to tag from admin search box (#881)
closes https://github.com/TryGhost/Ghost/issues/9074

- remove unused pagination route attrs that were interfering with routing service - these were a pre-1.0 hangover from when the tags screen had infinite scroll
- change `Posts` to `Stories` in the search dropdown for consistency
- add general fix for `adapter returned an array for the primary data of a 'queryRecord' response` deprecations by ensuring that `normalizeResponse` in our application serializer transforms the array we get from the server into a "single" JSON-API response
  - this deprecation was being triggered when loading a tag route directly
- fix `defaultValue` complex object deprecations raised from `Setting.unsplash` attr
2017-10-03 11:54:24 +07:00
Aileen Nowak
6f107a82a4 🐛 Fixed admin search not handling certain characters (#877)
closes TryGhost/Ghost#8959

- Treated the search input as a literal string rather than `RegExp` to allow characters that need escaping in `RegExp` and disable `RegExp` characterslike `|`.
- Replaced any non-word characters in `highlighted-text` fn with escaped characters, so they're working with `RegExp`.
2017-09-28 11:25:13 +01:00
Yanke Guo
7dd2090d64 🐛 Fixed blog icon display in admin menu when using a storage adapter (#831)
refs https://github.com/TryGhost/Ghost/issues/8885
- detect an absolute URL when setting the icon style in `{{gh-nav-menu}}`
2017-09-25 11:55:25 +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
a1f7f6b845 Flatten nested components (#854)
no issue
- the upcoming Module Unification re-organisation in Ember will no longer support nested components
- this PR pre-emptively moves our usage of nested components into a flat file structure
2017-09-11 14:41:17 +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
39a976cd9d Upgrade to Ember 2.15.0
no issue
- bumped `ember`, `ember-cli`, `ember-data` and related dependencies
- bumped yarn.lock sub-dependencies
- use new public `router` service in place of the private `-routing` service
2017-09-02 16:18:10 -04:00
Kevin Ansfield
a5c89e24b0 🐛 Fixed post saving indicator only indicating autosaves (#842)
refs https://github.com/TryGhost/Ghost/issues/8932

- show "Saving..." text when autosave or manual save tasks are running
- remove minimum period "Saving..." is shown for in tests
2017-08-29 13:33:13 +02: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
Kevin Ansfield
67ee5c1ede 🐛 Fix missing Unsplash icons in uploaders when using config override (#829)
no issue
- the `config` injection in `gh-image-uploader` was missing so the Unsplash button was only being displayed for the length of the session after visiting the Unsplash app screen (creates in-memory settings record based on config) or more permanently by saving the Unsplash settings (in which case the image uploader component reads the settings from the DB rather than config)
2017-08-17 16:19:36 +07: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
100ec859d9 Remove unused gh-infinite-scroll component and infinite-scroll mixin
no issue
- this component and mixin has been replaced by `ember-infinity`
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
Kevin Ansfield
cbb96b4467 🐛 Fix order of multiple upload results (#825)
no issue
- push upload results into an array at the same index as the passed in files array
2017-08-14 09:35:41 +07:00
Aileen Nowak
837f37de26 Added Twitter & Facebook data override fields to PSM (#814)
refs https://github.com/TryGhost/Ghost/issues/8334, requires https://github.com/TryGhost/Ghost/pull/8827
- added open graph and twitter fields to `Post` model
- added facebook and twitter card pane to PSM
- 💅🏼 Added preview styles for custom FB/Twitter cards
2017-08-03 15:45:14 +04:00
Aileen Nowak
01469369a0 🎨 Improved theme validation messages (#812)
closes TryGhost/Ghost#8530

- Changed the wording for activation and uploading a theme to separate between error and warnings in the title and the body text for the modal
- Changed the wording of "Activated successful with warnings/errors" to "Activation successful with (warnings || errors)"
2017-08-02 14:30:47 +04:00
Kevin Ansfield
7c1f6e14b8 ️ Added per-post code injection fields to PSM (#811)
- Remove gh-tab* components
    - The PSM was the only place where the `gh-tabs-manager`, `gh-tab`, and `gh-tab-pane` components were being used. These were very old components and did not work well with newer Ember versions and best practices.
    - 🔥 remove `gh-tab*` components
    - 💄 fix indents in `gh-post-settings-menu` template
    - 🎨 add support for named subviews ready for additional PSM panes

- Added per-post code injection fields to PSM
    - add "Code Injection" pane to the PSM
    - implement `codeinjectionHead` and `codeinjectionFoot`  attributes on `Post` model and save values from PSM
    - use CodeMirror for the PSM code injection fields
2017-08-02 13:32:51 +04:00
Kevin Ansfield
45210fb8bf ️ Add "Excerpt" field to post settings menu (#810)
refs TryGhost/Ghost#8793

- add `customExcerpt` attr to Post model + reorder attrs to be alphabetical
- add "Excerpt" field to PSM
- add validation for `customExcerpt` length (max 300 chars)
- add style adjustments for custom excerpt UI
2017-08-01 12:24:46 +04:00
Aileen Nowak
a0de451961 🙅 Disable image upload save btn when uploading (#805)
closes TryGhost/#8724

Adds a `isUploading` action that disables the `save` button for `upload-image` component until the upload process is finished.
2017-07-31 13:44:26 +04:00
Kevin Ansfield
e94a97d23b ️ hemingway editor mode (disable backspace) (#803)
no issue
- adds Hemmingway Mode toggle to the editor toolbar that disables
backspace
- shortcut is <kbd>Ctrl+Alt+H</kbd>
2017-07-28 17:21:09 +04:00
Kevin Ansfield
84a8f102ca 🎨 fix download count position on setup/one (#801)
no issue
- default component tag of `<div>` forced the download count to appear
on it's own line, setting `tagName: ''` returns the desired inline
behaviour
2017-07-26 13:03:09 +04:00
Kevin Ansfield
68fe624078 🎨 use blue instead of yellow for warning alerts (#792)
closes https://github.com/TryGhost/Ghost/issues/8680
2017-07-20 16:00:41 +02:00
Kevin Ansfield
addba04701 🐛 fix broken editor at mobile sizes (#790)
closes https://github.com/TryGhost/Ghost/issues/8657
- add checks for the toolbar being present before attempting to set classes on the buttons
2017-07-20 18:37:18 +07:00
Kevin Ansfield
5e85cbe0f3 🐛 fix editor fenced code block handling (#781)
closes https://github.com/TryGhost/Ghost/issues/8695
- non-spellchecker mode should be "gfm" not "markdown" so that fenced
code blocks are displayed correctly and other markdown behaviour better
matches the preview/rendering
2017-07-20 17:59:24 +07:00
Aileen Nowak
ab67f40600 🎨 Publish menu wording and saving states improvements (#788)
closes TryGhost/Ghost#8696

- Changes the `gh-save-button` component to allow a custom `runningText` which would be rendered in the button when the current task is running.
- Adds a `runningText` CP to `gh-publishmenu` component, which will render (depending of post status and desired save type) 'Unpublishing', 'Publishing', 'Scheduling', 'Updating', 'Unpublishing', 'Rescheduling', and 'Unscheduling'.
2017-07-20 11:46:31 +01:00
Aileen Nowak
3756f8a7da 💄 Theme upload modal style improvements (#784)
no issue

With GScan sending error details now, the modal was a bit overloaded.

This PR adds a toggle for each error rule which - when clicked - shows the details and the affected files.
2017-07-20 11:30:45 +01: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
6ec459047e 🐛 empty posts shouldn't be publishable (#776)
closes https://github.com/TryGhost/Ghost/issues/8501

- don't show publish menu for new posts - the publishmenu options don't make much sense for a post that hasn't been saved yet
- show post status as "new" when a post is unsaved rather than "draft"
2017-07-10 17:24:21 +02: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
8aaf7f3502 🐛 fix PSM throbber bugs (#777)
closes https://github.com/TryGhost/Ghost/issues/8611
- fix positioning of "static page" throbber
- fix PSM throbbers re-appearing after PSM close/open (need to use `pushObject` instead of `push` so that it's KVO compliant and the `_activeThrobbers` CP is updated)
- fix order of `willDestroyElement` so that we don't attempt to use `get` after the component is destroyed
- fix issue in Chrome that was preventing the Meta Data link from sliding the PSM panels
2017-07-10 19:15:20 +07:00
Katharina Irrgang
37dd638946 Merge pull request #773 from kevinansfield/soo-many-tags
🚀 supercharge tags performance
2017-07-09 14:31:06 +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
246d77811e 🐛 fix display/message bugs in re-auth modal (#770)
closes https://github.com/TryGhost/Ghost/issues/8656
- prevents button stretching from flexbox and adds margin between input and button
- use the `context` attribute returned from the server instead of the `message` so the error is now `Your password is incorrect.` instead of `You are not authorised to make this request.`
- return truthy/falsy values from the auth tasks so that the save-state button shows the correct state
2017-07-06 17:18:19 +07:00
Fixer
5cd6335b57 Additional check of privacy.useGravatar for gh-profile-image component (#761)
closes TryGhost/Ghost#8612

* Additional check of privacy.useGravatar for gh-profile-image component
- added a check for privacy.useGravatar flag
- checked: tests are OK

* fix other issues in gh-profile-image
- we had CPs with side-effects 🤢
  - replace CP with basic properties that can be set within the component
  - use `didReceiveAttrs` and `ember-concurrency` to debounce changes to the email property and make the functionality easier to reason about
- fix the broken fade-in animation when the avatar changes
- fix tests - `.to.be.blank` was always returning true, replaced with `to.be.empty` which caused the tests to fail properly then replaced them with the expectations for the actual values
2017-07-06 16:33:15 +07:00
Patrick Kim
bace776989 🐛 fix broken image upload button (#766)
closes https://github.com/TryGhost/Ghost/issues/8637
- add a default object to `_openImageFileDialog` args so that destructuring with default params works when not passed a value
2017-07-04 11:11:54 +01:00
Hannah Wolfe
a1e814be53 Minimal client extensions (#759)
no issue

- Add minimal extensibility to Ghost Admin

- Adds 3 sections of semi-flexible customisation to Ghost Admin
- Options:
   - Menu: a list of links with icons and text and hrefs, also has a title
   - Dropdown: another list of links
   - Script: a custom container and a script file

- All of this can be provided via the blog config
- Also adds 2 extra icons for use with these menus

- 🎨 Improve extensibility
2017-06-22 20:37:04 +02: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
David Wolfe
13f23d9125 Disable simpleMDE image shortcut (#758)
no issue

- disables simpleMDE image shortcut when using cmd+alt+i
2017-06-22 17:36:40 +02:00
Kevin Ansfield
6c64b6ce64 ctrl/cmd-shift-i triggers image file dialog (#750)
closes https://github.com/TryGhost/Ghost/issues/8523
- use shortcuts mixin to register `cmd-shift-i` shortcut in
`gh-markdown-editor` that triggers the image insertion dialog
- joins multiple uploaded images with new lines instead of a space for
easier editing post-upload
- add `captureSelection` option to `_openImageFileDialog` so that
insertion shortcut triggered when editor doesn't have focus doesn't
insert at the last focused char position
- if image insertion happens with no cursor position add two newlines
before the inserted image markdown for easier editing (previously it
would be inserted immediately after the last char in the post)
- removes unused `editor-shortcuts.js` file
2017-06-22 13:02:38 +01:00
Kevin Ansfield
6ed32c0069 set spellchecker to "off" by default (#747)
closes https://github.com/TryGhost/Ghost/issues/8566
- sets codemirror into "markdown" mode during initialisation
2017-06-19 11:32:37 +01:00
David Wolfe
fd52adeb1f Update post save button texts (#736)
closes https://github.com/TryGhost/Ghost/issues/8536, closes https://github.com/TryGhost/Ghost/issues/8500

- Post save button will now display publish/un-publish/schedule/un-schedule/re-schedule/update
- On successful save button will display published/un-published/scheduled/un-scheduled/re-scheduled/updated
2017-06-15 18:35:23 +01:00
Kevin Ansfield
baac2db056 🐛 fix Cmd-S save with cursor in slug field
closes https://github.com/TryGhost/Ghost/issues/8551
- move `updateSlug` logic from `gh-post-settings-menu` component to `editor-base-controller` mixin
- put `updateSlug` and `save` into a task group so that concurrent calls are queued - means that pressing Cmd-S with the cursor still in the slug field will first trigger the `updateSlug` call (triggered by the field blur) then trigger the `save` call (triggered by Cmd-S) when `updateSlug` has finished so there are no conflicts and you still see the "saved" notification
2017-06-13 16:04:09 +01:00
Kevin Ansfield
d8e1375af4 welcome tour (#527)
refs https://github.com/TryGhost/Ghost/issues/5168
- adds a `tour` service that handles syncing and management of tour throbbers & content
- adds a `gh-tour-item` component that handles the display of a throbber and it's associated popover when clicked
- uses settings API endpoint to populate viewed tour items on app boot/signin
- adds `liquid-tether@2.0.3` dependency for attaching throbbers and popups
- adds initial tour contents
2017-06-08 22:00:10 +07:00
Katharina Irrgang
7ffc3c47ab 🎨 improve theme results (#726)
closes TryGhost/Ghost#8222

- there are fatal and normal errors
- fatal === can't activate a theme
- the normal errors are only returned in development mode (!)
- Separate between `fatal` and normal errors and group them
2017-06-06 13:09:52 +07:00
Kevin Ansfield
590006af89 🎨 fully fix Code Injection styles (#723)
closes https://github.com/TryGhost/Ghost/issues/8504

- allow `.settings-code-editor` to inherit from `.gh-input` - fixes border colours
- change `gh-cm-editor`'s "focused" class from `.focused` to `.focus` so it can inherit `.gh-input` styles
- add lazy loading of CM styles back in `gh-cm-editor` but prevent `lib/codemirror.css` from being compiled into the codemirror styles so that we get the theme colours without causing conflicts with the main editor
2017-06-01 23:01:43 +02:00
Kevin Ansfield
0d40a60aba 🐛 fix lazy-loading of CodeMirror interfering with editor (#717)
closes https://github.com/TryGhost/Ghost/issues/8488

- don't lazy-load the CodeMirror styles in `gh-cm-editor` as they are already loaded and overridden
2017-05-30 15:31:18 +02:00
Kevin Ansfield
efb66b16e1 🎨 remove Fullscreen button from editor toolbar (#714)
closes https://github.com/TryGhost/Ghost/issues/8480

- removes fullscreen button from toolbar but keeps the "fullscreen" routines so that styling and other behaviour doesn't need to be updated
- side-by-side toggle now toggles fullscreen on/off (previously only toggled fullscreen on)
2017-05-30 15:17:47 +02:00
Kevin Ansfield
3f2e802f27 🐛 fix missing meta description preview (#719)
refs #718, refs https://github.com/TryGhost/Ghost/pull/8305

- meta description preview in the PSM was relying on the `html` field which is no longer queried - see #718 and https://github.com/TryGhost/Ghost/pull/8305
- restores live preview that was in LTS but removed whilst implementing mobiledoc because we had no quick way of rendering mobiledoc->text
- adds a boolean argument to the `formatMarkdown` util that can disable the replacement of `<script>` and `<iframe>` tags so that the inserted text isn't rendered when converting HTML to text
2017-05-30 15:07:12 +02:00
Katharina Irrgang
221ca16c67 🎨 use formats query param (#718)
refs https://github.com/TryGhost/Ghost/issues/8275
- ask Ghost for `mobiledoc` and `plaintext`
- Ghost returns `html` by default
- use plaintext for `{{subText}}` for posts overview
2017-05-30 10:15:46 +01: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
Aileen Nowak
6e841064d2 🐛 Reset publish date in PSM when leaving menu (#708)
closes TryGhost/Ghost#8360
- when changing the publish time of an already scheduled post in the publish menu and leaving the menu with clicking outside of the menu, the time wouldn't reset properly and be shown in the PSM. With the usage of an `isClosing` property which is passed to the underlying `gh-publishmenu-scheduling` component, we prevent the changed time from being saved and reset it properly instead.
2017-05-23 14:30:00 +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
263cadb1dc add tests for gh-uploader component (#701)
no issue

- filled in tests ready to start work on https://github.com/TryGhost/Ghost/issues/8455
2017-05-23 10:18:03 +02:00
Katharina Irrgang
0b9db0ec1a 🐛 fix published_at is null (#704)
no issue
- add safety check to avoid crashing if a scheduled post someone has no `published_at` value
2017-05-22 17:03:04 +01:00
Kevin Ansfield
ef9381b489 add spellcheck toggle (#697)
closes https://github.com/TryGhost/Ghost/issues/8461
- adds toggle spellcheck button to the `gh-markdown-editor` toolbar
- adds custom styles to fake a spellcheck icon
- updates `simplemde` fork
  - adds `spellcheck` to the list of toolbar buttons that don't have their `active` class removed based on cursor position
  - removes bundled `marked` dependency that we no longer use
2017-05-18 19:08:50 +09:00
Kevin Ansfield
d49484ac95 auto-expanding editor title input (#699)
closes https://github.com/TryGhost/Ghost/issues/8463
- move generic text input handling into `text-input` mixin so it applies to text inputs and textareas
- adds `autoExpand` property to `gh-textarea` that accepts a selector to watch for resize changes, if the property is set then auto-expanding behaviour is triggered any time the textarea value is changed or when the selector element is resized (this prevents change in textarea width from toggling nav or split screen mode resulting in textarea content being hidden or the textarea being taller than it's contents)
- adds `ember-element-resize-detector` addon to allow watching of element resizes rather than window resizes (this was already included as a sub-dependency via `ember-light-table`->`ember-scrollable`->`ember-element-resize-detector`)
2017-05-18 17:01:30 +09:00
Kevin Ansfield
8066b2ef7c use image name as alt text when inserting images (#698)
closes https://github.com/TryGhost/Ghost/issues/8462
- grab image filename and remove extension before inserting it as `alt` text when uploading images
2017-05-17 20:27:27 +09:00
Kevin Ansfield
6de16a3c55 use markdown-it for markdown previews (#690)
 use markdown-it for markdown previews

no issue

- replaces SimpleMDE's default `marked` rendering with `markdown-it`
- add ember-browserify and markdown-it plugins
2017-05-15 18:51:19 +02:00
Kevin Ansfield
fbb46dc72c 🎨 disable buttons in preview, fix preview overlap (#689)
no issue

- when entering preview mode (not split-screen preview) the toolbar buttons are now disabled. This is usually built in to SimpleMDE but that wasn't working because we've moved the location of the toolbar in the DOM
- hides the markdown editor when entering preview mode to prevent the markdown code appearing at the bottom of the preview when the markdown length is longer than the preview length
2017-05-12 10:06:56 +02:00
Kevin Ansfield
841090a6ad 🐛 fix editor image uploads in Edge (#687)
no issue

- babel's transpilation of the `for...of` loops was resulting in an error in MS Edge, dropping back to an old `for` loop fixed it
2017-05-12 10:02:33 +02:00
Kevin Ansfield
ec86139662 open file dialog and upload images via editor toolbar (#685)
no issue

- adds a hidden file input to the `gh-markdown-editor` component
- when the editor image toolbar button is clicked, capture the current selection (it gets during the file upload), trigger the file dialog then when files are selected initiate the same upload+insert process as drag/drop image uploads
2017-05-10 17:16:36 +02:00
Kevin Ansfield
52522a60d5 🐛 fix visible scroll bars and disable standard preview in split-screen (#686)
no issue

- fix visible scroll bars were rendered to the right and bottom of the internal editor area in certain browser/OS configurations
- disable the preview button when in split-screen mode as it's not any use there
- exit SimpleMDE preview mode if it's active when entering split-screen mode
2017-05-10 14:36:07 +02:00
Kevin Ansfield
bed6089aaa 🔥 remove unused gh-spin-button component
closes https://github.com/TryGhost/Ghost/issues/7865
- `gh-spin-button` has been replaced with `gh-task-button`
2017-05-09 16:37:59 -05:00
Jimmy Cai
8749cb55c5 fix missing user avatars in team list (#677)
closes https://github.com/TryGhost/Ghost/issues/8389
- changed `user.image` to `user.profileImage`
2017-05-09 17:23:24 +01:00
Kevin Ansfield
a14efa9e16 Fix split screen editor (#684)
no issue

* fix title input padding and placeholder weight
* 🔥 remove unused showdown-ghost dependency
* implement full screen mode via CSS rather than autonav toggle
* implement custom split pane editor preview
    - replace SimpleMDE's split pane handling with our own so that we have more control over the element positioning, toggling of our custom fullscreen code, and so that the preview pane can be scrolled separately as per our old editor
* use forked version of simplemde that has the latest CodeMirror compiled
    - SimpleMDE hasn't been updated for 11 months and the version of CodeMirror is baked into the SimpleMDE code, to get an up to date version I've forked and re-compiled
    - pull in the unminified SimpleMDE source so that it's easier to debug in development, our asset compilation steps will take care of minifying it for production
* fix gh-markdown-editor teardown
2017-05-08 19:15:56 +01:00
Kevin Ansfield
4b48328e6d SimpleMDE editor (#682)
no issue

* move "save on first change" behaviour into editor controller
* allow TAB events to be specified in keyEvents hash of gh-input
* replace mobiledoc-kit/gh-koenig with a SimpleMDE based editor
    - remove `gh-koenig` in-repo-addon from `package.json` so that test files etc aren't loaded
    - remove `mobiledoc-kit` dependencies
    - extends `gh-editor` to handle file drag/drop
    - adds `gh-uploader` and `gh-progress-bar` components to handle file uploads in a more composable manner
    - adds `gh-simplemde` component that wraps SimpleMDE
2017-05-08 11:35:42 +01:00
Kevin Ansfield
5c36ee4b9d Editor refactors (#679)
no issue

* split key commands and text expansions into separate files for easier file searches

* basic formatting, added a few comments

* move editor title input into addon
- the editor and title are now tightly integrated so that it's possible to use up/down cursor navigation so it makes more sense to keep them together
- start of a deeper component restructure so that we don't need to leak properties/actions to parent components

* first pass at refactor of gh-koenig and koenig-title-input
- remove need for editor reference to be held outside of the `gh-koenig` component by yielding it from the component so that the integrated title element can sit inside the container's scope
- refactor `gh-koenig` to more closely match the default ember mobiledoc addon
  - fixes runloop issues by starting/ending a manual runloop
- refactored the mutation observer and event handlers in `koenig-title-input` so that we're not doing unecessary work on every render/key press
- rename CSS classes to be more specific (these may still need more separation between `.gh` and `.kg` later)
  - `.editor-holder` to `.gh-koenig-container`
  - `.surface` to `.gh-koenig-surface`

* fix tests and start testing refactor

* move gh-koenig integration tests into addon, remove empty test files

* first-pass at component template cleanup

* first pass at koenig-toolbar-button refactor
2017-05-08 10:44:02 +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
Ryan McCarvill
df8bb6fbe7 🐝 Strip HTML from title (#665)
closes https://github.com/TryGhost/Ghost/issues/8353
- if a user pastes or inserts HTML into the title in some other way (modifying the dom, having a plugin mutate the dom, etc) then strip the HTML and insure that the title is always unstyled and plain text
2017-04-24 12:37:30 +01:00
Kevin Ansfield
bab4aba942 🐛 clear date error when closing the PSM (#657)
closes https://github.com/TryGhost/Ghost/issues/8359

- if the date/time picker is in an error state when the PSM is closed, reset it to the currently saved time
- resolves the problem with the flash of an error as the publish menu is closed as it's no longer possible to be in a hidden error state
2017-04-24 09:29:41 +02:00
Ryan McCarvill
054c237404 Range handling improvements. (#656)
closes https://github.com/TryGhost/Ghost/issues/8323
closes https://github.com/TryGhost/Ghost/issues/8191

Fixes some of the range issues that we're seeing across browsers also simplifies the positioning code for UI elements.
1. For the title the cursor is now placed in the correct place on key up and down.
2. For the body Safari now displays the `/` menu correctly.
2017-04-20 11:01:08 +01: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
48c45aa5b1 🐛 fix password change button not showing success state (#659)
closes https://github.com/TryGhost/Ghost/issues/8358

- the change password task was not returning a truthy value on success so you always saw the "X Retry" state
- adds option to pass `idleClass` and `runningClass` to `gh-task-button` - this is so that colour classes can be set in the "base" state without overriding the success/failure colors (some colours would have preference based on the order the colours are defined in the CSS file, eg. setting `gh-btn-red` as a base CSS class would override the `gh-btn-green` that is added after a successful save)
2017-04-19 18:21:47 +02:00
Kevin Ansfield
b219391c1a match 0.11.x's auto-save behaviour (#652)
refs https://github.com/TryGhost/Ghost/issues/8331

- rather than always saving every 60 seconds, the 60 seconds timer is a fallback for when the user has made changes to the post content for 60 seconds without triggering the 3 second debounced timer
- don't perform a save if there have been no changes to the post - this should prevent unnecessary collision errors when multiple people are viewing a post
- adds guards to `gh-publishmenu` so that we don't try to call actions that weren't passed in
2017-04-19 18:09:31 +02:00
Kevin Ansfield
c01110f597 🎨 responsive editor header (#653)
closes https://github.com/TryGhost/Ghost/issues/8271
- adds `gh-editor` wrapper component that checks the editor position and will apply a `.gh-editor-header-small` class if the editor content will overlap the view actions
- adds `.gh-editor-header-small` class that minifies the header and applies a solid background so that there's no conflict between editor content and header elements
- modifies `.gh-editor-header` z-index so that there's no hidden non-selectable area at the top of the screen
2017-04-20 01:20:42 +12: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
08edc266d1 🐛 Fix HTML card not launching in edit mode (#647)
* replace `isEditing` observers with `didReceiveAttrs` hook

* 🐛 Fix HTML card not launching in edit mode

closes https://github.com/TryGhost/Ghost/issues/8310
- adds `autofocus=true` attribute to `gh-cm-editor` that will use CodeMirror's built-in autofocus behaviour
- set HTML card's launch mode to `edit` and ensure that the `autofocus` attribute is passed
- refactor `gh-cm-editor` for more robust event handling
- re-work `ch-cm-editor` tests to take into account CMs events not being triggered within a single run-loop and to still work when the browser window isn't focused (should fix the random test failures on Travis and the issues where the CM tests will fail locally)
2017-04-18 19:20:38 +12:00
Kevin Ansfield
d01469428c 💄 replace DownloadCountPoller with gh-download-count
closes https://github.com/TryGhost/Ghost/issues/8321
- adds `gh-download-count` component that uses ember-concurrency to poll the count endpoint
- removes the no-longer-needed `setup/one` route as ember-concurrency now handles the setInterval bookkeeping for us
2017-04-17 10:04:53 -04:00
Aileen Nowak
b1e5399657 No more icon font: {{inline-svg}} - Part 2 (#642)
closes TryGhost/Ghost#8107
- replaces all icons in Ghost-Admin with SVGs by using our new helper {{inline-svg}}.
- removes all ghosticon fonts.

This is the second and final batch of the refactor.
2017-04-14 17:22:14 +01:00
Kevin Ansfield
9795557d5b Fix linting error 🙈 2017-04-14 16:33:46 +01:00
Kevin Ansfield
5c76346cd0 🎨 animated retry icon
refs https://github.com/TryGhost/Ghost/issues/7515
- add a `retry` icon that better matches button text dimensions
- add a spin animation for the retry icon
- use the new retry icon in the default `gh-task-button` template
- add a "restart animation" method to `gh-task-button` so that repeated clicks on a button appear to register the action when local validation means that there's no transition from failed->running->failed
2017-04-14 16:16:52 +01:00
Kevin Ansfield
5fbcd6e4ff 🎨 first pass at animated icons for save-state buttons (#637)
refs https://github.com/TryGhost/Ghost/issues/7515
- adds animated spinner and check SVG icons
- improves SVG sizing/alignment in buttons
- disables old technique of fixing button size because it doesn't work now that buttons have more than a single spinner when running/saved/failed
- fixes broken spinner in `gh-spin-button` components
2017-04-11 16:44:37 +01:00
Kevin Ansfield
34cb65df5c new publish menu and date/time picker (#588)
closes https://github.com/TryGhost/Ghost/issues/8249

- replaces the old split-button publish/schedule/update button with a less confusing menu system
- adds a `{{gh-date-time-picker}}` component that contains a datepicker with separate time input
- replaces the date text input in the post settings menu with `{{gh-date-time-picker}}`
  - disabled when post is scheduled, only way to update a scheduled time is via the publish menu
  - validates date is in the past when draft/published so there's no confusion with scheduling
- displays saving status in top-left of editor screen
- refactor editor (auto)saving processes to use ember-concurrency

Other minor changes:
- adds `post.publishedAtBlog{TZ,Date,Time}` properties to Post model to allow working with `publishedAt` datetime in the selected blog timezone rather than UTC
- adds a `beforeSave` hook to `validation-engine` that is called after successful validation and before the Ember Data save call is made
- adds validation of `publishedAtBlog{Date,Time}` to post validator
- prevent gh-task-button showing last task state on first render
- fixes bug where clicking into and out of the published date input in the PSM without making any changes saves a published date for draft posts
2017-04-11 14:39:45 +01:00
Aileen Nowak
0a09c244cb 🐛 Use correct blog icon URL with subdirectory (#636)
refs TryGhost/Ghost#7688
- Fixes a bug in subdirectory setup where the blog icon URL would be concatenated with a double subdirectory in the URL.
- Uses `RegExp` to strip it from `settings.icon` and concat it without trailing slash.
2017-04-11 14:09:15 +01:00
Ryan McCarvill
2ed58d5253 🐜 Navigating from the title to a card. (#631)
refs https://github.com/TryGhost/Ghost/issues/8194
- Allows you to navigate to the title and body if the first element in the document is a card.
- Adjust toolbar and + menu button for mobile screen.
- Put in place resize throttling for moving of in-code positioned elements on screen resize.
2017-04-11 10:57:52 +01:00
Kevin Ansfield
e0c9ee633b add power-select/trigger template override 2017-04-10 10:53:27 +01:00
Ryan McCarvill
4f33b83035 🐜 fix key up to empty title (#629)
closes https://github.com/TryGhost/Ghost/issues/8293
- when a title is empty it has no textnode to get a length of so we automaticlly put the horizontal offset of the cursor to 0
2017-04-10 10:12:04 +01:00
Ryan McCarvill
4670d3fe03 General Editor UI improvements. (#630)
refs https://github.com/TryGhost/Ghost/issues/8248
refs https://github.com/TryGhost/Ghost/issues/8194
closes https://github.com/TryGhost/Ghost/issues/8192

Miscellaneous editor reliability and usability fixes. 
- Improve the reliability of selection.
- Ensure that the + menu appears even if there is a blank document (which meant the events weren't firing from mobiledoc itself)
- When cards are added they are automatically selected and if possible go straight into edit mode (only works on the markdown card).
- Fixes issues in Safari desktop, Safari mobile, and Firefox.
- Tries to position UI on screen at all times.
- Removes fastclick.
2017-04-10 10:10:53 +01:00
Ryan McCarvill
eb9e7726ee Editor title improvements (#614)
closes: https://github.com/TryGhost/Ghost/issues/8292
- Title improvements:
- Clean up the connection between the editor and title.
- Encapsulate all title related events in the title component.
- Fix tab support.
- Fixed an issue where pressing up from an empty paragraph would select the title
- Ensure the empty content psuedo element is always below the cursor and make sure it always displays when the title is blank.
2017-04-07 21:05:43 +01:00
Aileen Nowak
1c8448aba8 🐝 Refresh publication icon after upload (#626)
refs TryGhost/Ghost#7688
- Instead of using a hardcoded `favicon.ico` URL to request the blog/publication icon, we read the settings which get updated as soon as a icon is uploaded.
2017-04-06 17:26:05 +01:00
Kevin Ansfield
5e9e3cd027 switch to ember-cli-moment-shim (#622)
no issue

- preparation for using `ember-pikaday` that utilizes `ember-cli-moment-shim`
- removes usage of `moment` global
- removes custom imports of `moment` and `moment-timezone` libraries
2017-04-05 19:45:35 +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
75f6fe3a08 🔥 remove unused popover components (#620)
no issue

- `gh-popover` and `gh-popover-button` are no longer used in the codebase
- removing them seems prudent as we are moving towards a different approach for dropdowns/popovers/tethers etc
2017-04-05 14:08:29 +01:00
Ryan McCarvill
f5fc35fb98 improved card selection behaviour (#608)
Refs: https://github.com/TryGhost/Ghost/issues/8191
Refs: https://github.com/TryGhost/Ghost/issues/8194

Changes the selection behaviour of mobiledoc-cards:
If you navigate to a card with a keyboard or click on the new editor toolbar it "hard selects".
If you click into the body of a card to edit it it "soft selects".

When a card is "hard selected" you can navigate out of the card and to the previous or following blocks within the mobiledoc with the keyboard, you can delete the current card with the backspace or delete button, and you can create a new block following the card with the enter key.

When a card is soft selected it is simply displayed as selected and allows the user to edit content within the card.

New card toolbar:
Allows a user to delete the card, save the card, and "hard select" a card.

New title behaviour:
Pressing the enter key within the title "splits" the title at the cursor point, if multiple characters are selected they are first deleted, and creates a new paragraph at the top of the document with the trailing characters after the split.

gh-cm-editor updates:
Adds an on-focus event to gh-cm-editor
2017-03-30 15:29:08 +01:00
Kevin Ansfield
eb36bb4f53 minor refactors for recent/up-coming deprecations 2017-03-28 18:17:59 +01:00
Ryan McCarvill
4ebb184184 Multi line title. (#595)
refs https://github.com/TryGhost/Ghost/issues/7754

The title is now a contenteditable div which stretches and wraps to behave like the editor.

It also tries to seemlessly move the cursor between the editor and title to make one coherent editing experience.
2017-03-21 23:42:14 +00: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
7661212b1b Revert "Multi line title (#575)"
This reverts commit b5a7fef6f9.
2017-03-14 16:37:47 +00: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
Ryan McCarvill
b5a7fef6f9 Multi line title (#575)
refs https://github.com/TryGhost/Ghost/issues/7754
- The title is now a contenteditable div which stretches and wraps to behave like the editor.
- It also tries to seemlessly move the cursor between the editor and title to make one coherent editing experience.
2017-03-14 13:50:30 +00:00
Austin Burdine
319cf2aa31 fix(psm): fix author dropdown in post-settings-menu
closes https://github.com/TryGhost/Ghost/issues/8122
- because the PSM is now a component, some of the component lifecycle
hooks can be employed to load things
2017-03-14 10:12:06 +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
Austin Burdine
35ffe11661 various test deprecation cleanup
no issue
- cleans up a lot of the deprecation noise in tests
- remove ember-cli-deprecation-workflow dependency
2017-03-08 18:56:30 +00: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
bd65c1efd4 success/failure state spinner buttons (#566)
refs https://github.com/TryGhost/Ghost/issues/7515
- changes to `gh-task-button`:
  - can take `buttonText` (default: "Save"), `runningText` ("Saving"), `successText` ("Saved"), and `failureText` ("Retry") params
  - positional param for `buttonText`
  - default button display can be overridden by passing in a block, in that scenario the component will yield a hash containing all states to be used in this fashion:
    ```
    {{#gh-task-button task=myTask as |task|}}
    {{if task.isIdle "Save me"}}
    {{if task.isRunning "Saving"}}
    {{if task.isSuccess "Thank you!"}}
    {{if task.isFailure "Nooooooo!"}}
    {{/gh-task-button}}
    ```
- update existing uses of `gh-task-button` to match new component signature
2017-03-07 10:28:52 -07:00
Kevin Ansfield
89776fb169 🔥 remove URL input option from image upload components
refs https://github.com/TryGhost/Ghost/issues/8032
- `fileStorage: false` config is going away, it predates storage engines and will simplify future image optimisation work
- simplifies UI, it can be brought back in the future in a more robust fashion if required
2017-03-03 11:01:55 -06:00
Austin Burdine
e834c96061 🎨 make lazyLoader return a promise for loadStyle method
no issue
- cleans up the interface to maintain consistency between loadScript and
loadStyle
- update gh-cm-editor component to await result of loadStyle
2017-03-03 16:54:50 +00:00
Kevin Ansfield
90be933bfe 🐛 display correct expired/expires text for invites (#550)
closes https://github.com/TryGhost/Ghost/issues/8055

- use `expired` if the date is in the past, otherwise `expires`
- fix mirage factories to use `moment.valueOf` instead of `moment.unix` for invite `expires` attributes
2017-02-27 13:11:39 +00:00
John O'Nolan
ae1007c58d Update design screen styles, fix login bugs
Refs https://github.com/TryGhost/Ghost/issues/8021
2017-02-27 13:31:01 +07: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
15b73a810d Prototype mobile navbar 2017-02-17 12:31:12 -06:00
Austin Burdine
c97f8141e0 🐛 don't destroy codemirror editor if it doesn't exist (#530)
closes TryGhost/Ghost#7855
- check if codemirror has been initialized before trying to destroy it
2017-02-17 10:15:28 +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
942d01cd04 Content link resets filter if already viewing content screen (#521)
no issue

- the content filter will be remembered if you navigate away from then back to the content screen
- this PR changes the behaviour slightly so that clicking the sidebar "Content" link whilst viewing the content screen will act as a shortcut to reset the filter
2017-02-10 14:24:13 +01:00
Kevin Ansfield
6d26685b65 bring keyboard navigation back to the content screen
refs https://github.com/TryGhost/Ghost/issues/7860
- restores the previous up/down/enter/cmd+backspace functionality
- modifies the `delete-post` modal to accept a hash with an `onSuccess` action
2017-02-04 09:01:52 -06:00
Kevin Ansfield
9abe999bc8 clean up content screen prototype
refs https://github.com/TryGhost/Ghost/issues/7860
- load 30 posts per page
- clean up unnecessary styles, match class name to component name
- start moving towards desired content/styles end goal
2017-02-04 09:01:52 -06:00
Kevin Ansfield
7f584b3509 remove unused gh-content-preview-content component 2017-02-01 17:03:38 -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
Greenkeeper
526a2392bb Update ember-one-way-controls to version 2.0.0 🚀 (#475)
* chore(package): update ember-one-way-controls to version 2.0.0
* update yarn.lock
* update `gh-trim-focus-input` for removal of `sanitizeInput` in `ember-one-way-controls`
2017-01-23 12:03:05 +00:00
Kevin Ansfield
6139731632 switch all modals over to ember-concurrency and gh-task-button 2017-01-20 10:03:38 +00:00
Kevin Ansfield
0aa8b81ebb de-couple gh-task-button from gh-spin-button 2017-01-20 10:03:38 +00:00
Kevin Ansfield
7652969747 🏃 improve navigation responsiveness with loading substates (#495)
no issue
- add loading substates for all routes that previously blocked transitions until their model had finished loading
  - enables immediate response on navigation click
  - loading templates include the title bar to provide immediate indication of which page is loading
  - loading templates include a new `{{gh-loading-spinner}}` component that will only show the spinner after 200ms to avoid flashing a spinner for users on fast connections
- updated Version Mismatch tests to match new behaviour of intermediate transitions when navigating
2017-01-17 17:44:08 -06:00
Austin Burdine
6d6cc56ae1 deps: ember-cli-active-link-wrapper@0.3.2
- we were using borrowed code from an older version, now that ember-cli-active-link-wrapper has a built-in mixin we can just use that
- this fixes render issues with ember 2.10
2017-01-13 13:26:38 +00: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
Ryan McCarvill
aa8112d5a1 Removed local markdown editor within ghost (#379) 2016-11-07 15:59:48 +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
Austin Burdine
3335596d50 🎨 fix path of nav menu ghost icon (#317)
refs TryGhost/Ghost#7503
2016-10-08 12:16:45 +01:00
Austin Burdine
04731704ae Merge pull request #272 from kevinansfield/ember-2.8.0
Update ember & ember-cli to version 2.8.x
2016-10-07 18:51:52 -05:00
Hannah Wolfe
9edd8e3286 🎨 Change asset path to /ghost/assets (#309)
refs #7503

- Having assets served from the same directory as the admin makes this tricky to refactor server side
- It's also much harder to optimise for 404s
2016-10-07 16:16:26 -05:00
Kevin Ansfield
03096936f5 deps: ember@2.8.2 2016-10-07 17:32:30 +01:00
Kevin Ansfield
7e4d385de8 refactor gh-fullscreen-modal component to use liquid-wormhole directly (#281)
no issue

- remove `liquid-tether` dependency
- add `liquid-wormhole` dependency (previously a dependency of liquid-tether)
- refactor `gh-fullscreen-modal` to simplify and use `liquid-wormhole` directly instead of `liquid-tether` as we don't need the positioning ability that `liquid-tether` provides
- fixes broken View/Component tree in Ember Inspector 🎉
2016-10-07 14:27:39 +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
87e1c5afa5 use ember-ajax in place of ember-data's networking (#283)
closes #7014
- uses the `AjaxServiceSupport` mixin from `ember-ajax` to replace Ember Data's internal `ajax` method with our own ajax service
- normalizes all error handling to use `ember-ajax` style errors
- default to the `application/vnd.api+json` content-type so that we don't have a mix of urlencoded and plain JSON content
- fix `normalizeErrorResponse` in our `ajax` service so that it doesn't add an empty `errors` array to payloads
2016-09-26 11:59:04 -05:00
Kevin Ansfield
3afc43e2d2 replace gh-select-native with one-way-select (#286)
no issue
- removes `gh-select-native` component as ember-one-way-control's `one-way-select` component offers the same one-way-binding but also allows element attributes to be set
2016-09-26 11:39:43 -05: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
Kenneth Ashley
54e41b2f78 Safari doesn't show dragged-over state for file uploads (#288)
closes TryGhost/Ghost#7310
- Removes double dashes from modifier classes as safari won’t allow this.
2016-09-24 11:10:08 +02:00
John O'Nolan
3d8c79d018 Double default gravatar size (#268) 2016-09-19 14:38:42 +01:00
Kevin Ansfield
1ee787ed42 display warnings after theme upload (#262)
refs TryGhost/Ghost#7362, requires TryGhost/Ghost#7367
- display any gscan warnings we get back from a successful upload to cater for the downgrade of missing `{{asset}}` helpers from an error to a warning
2016-09-14 18:34:07 +01:00
Ryan McCarvill
05d88916ab Replaces non ascii characters to dashes so that it's consistent with … (#260)
refs #7313

- theme name normalisation
- detect duplicates to show a popup to override a theme
2016-09-14 17:23:04 +00:00
Austin Burdine
a05a5d7f7b 🐛 fix typing a space in search input (#261)
closes TryGhost/Ghost#7369
- temporary fix for spacebar selecting until eps 1.0 is finalized
2016-09-14 16:11:41 +01:00
Austin Burdine
a13502972c remove mime-type validations in favor of extension validation (#256)
refs TryGhost/Ghost#7292
- remove accept mime type validations
- validate on file extension only
- fix tests
2016-09-14 09:54:16 +01: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
Kevin Ansfield
a9f17cbfb6 detailed theme validation errors (#226)
no issue
- display the detailed validation errors that we get back from gscan so that users know how to fix their themes
2016-08-24 20:22:20 +02:00
Kevin Ansfield
e543392137 🐛 fix highlighted number of posts when deleting a user (#144)
closes https://github.com/TryGhost/Ghost/issues/7136
- pass user into the modal when displaying
- fix the user->model alias in the modal component
- update mirage user endpoints to respect `?include=count.posts` param
2016-08-24 07:26:29 -06:00
Kevin Ansfield
b82d192046 🐛 prevent task-buttons dropping clicks when multiple tasks enqueued simultaneously (#222)
refs https://github.com/TryGhost/Ghost/issues/7255
- adds a `.appear-disabled` CSS class that doesn't prevent pointer events like `.disabled`
- updates `gh-task-button`:
  - use `.appear-disabled` class instead of actually disabling button
  - add check to guard against the button's assigned task being run multiple times whilst the spinner is running

This resolves the [user profile slug issue](https://github.com/TryGhost/Ghost/issues/7255) where clicking the Save button whilst the slug input has focus would only trigger the input's focus-out event due to it immediately disabling the button.
2016-08-24 07:14:36 -06:00
Kevin Ansfield
eb0db3fafe indicate folder names to tell duplicate themes apart
refs https://github.com/TryGhost/Ghost-Admin/pull/210
- removes unused `activeTheme` property on `gh-theme-table`
- updates label generation in `gh-theme-table` to add folder names when there are duplicate package.json name+version combos
2016-08-23 16:55:32 +01: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
5735b98a4c add fileSelected action to upload components
no issue
- upload components will now trigger a passed-in `fileSelected` action upon file selection - useful when users of the components want to utilise the file object without supplying a custom validation action
2016-08-23 12:32:11 +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
dc77a419bc Fix new url field focus bug (#194)
Closes TryGhost/Ghost#7140

* Now checks to see if it is new or not before editing the url
2016-08-10 08:31:16 -06:00
Austin Burdine
a3a00bfd34 fix cross-browser support (#164)
closes https://github.com/TryGhost/Ghost/issues/7149
- fix tests in Safari
- fix template tag issue in IE and edge
- various IE css fixes
2016-08-06 09:04:06 +02:00
David Balderston
c55420265f Fix url field focus (#174)
Closes #7140

* Even if the url was blank, it was always appending a `/` at the end
which would cause isBlank to return false. Added logic that if the url
was blank, don’t try to then add the trailing slash.
2016-08-06 08:59:52 +02: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
Austin Burdine
7fc02c1007 fix image uploader text handling (again) (#140)
closes TryGhost/Ghost#7127
- image uploader now handles "text" and "alt text" differently
2016-07-24 10:19:49 +01:00
Kevin Ansfield
198b7e9517 Fix blank signup screen (#135)
closes https://github.com/TryGhost/Ghost/issues/7117
- adds guard to `sanitizeInput` method of `gh-trim-focus-input` for null/undefined values
- adds acceptance test for successful signup screen flow
- removes unneeded validation/update handling for a non-editable email field
- adds "At least 8 characters" placeholder to password field
- fixes enter key not submitting the form when name or password field has focus
2016-07-22 07:36:50 -06:00
Vijay Kandy
96f1b6342d Added upgrade notification component to About page. (#102)
- Picked some fixes https://github.com/TryGhost/Ghost/pull/5670/files
- Destructured Ember properties
- Removed unused imports and fixed unit test errors.
2016-07-15 16:58:35 -06:00
Austin Burdine
a82181fdd6 fix image component displaying alt text in uploader (#105)
closes TryGhost/Ghost#7064
- pull alt text from parsed markdown
- move text to image uploader component proper
2016-07-14 13:27:18 +01: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
666a3e7f1a lazy-load codemirror on code injection screen (#99)
refs TryGhost/Ghost#6149
- concats codemirror.js and css on build, keeping them out of vendor.js
- add lazy-loader service to enable loading of external scripts
2016-07-05 17:30:14 +01:00
Austin Burdine
2dff7edd3d convert remainder of components to use ember-cli-shims (#101)
follow up from #95
- converts components to use ember-cli-shims
2016-06-30 19:14:25 +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
9fd82f06da Fix un-bound HTML attributes for gh-trim-focus-input
no issue
- updates `gh-trim-focus-input` to extend from `gh-input`/`one-way-input` to get the auto-binding attribute behaviour for passed-in HTML attributes
- renames `focus` property to `shouldFocus` so that we're not overriding default DOM functions
- fixes signin page issues with missing placeholders and no autofocus
2016-06-20 15:20:25 +01:00
Austin Burdine
c1367dac34 convert inputs to one-way inputs
no issue
- moves all inputs to use the data-down-actions-up component paradigm
2016-06-18 07:44:23 -04: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
bf8c05a990 deps: ember-ajax@2.4.1
no issue
- update ember-ajax
- update error handling to match recommended approach
- update error normalization for handling a returned array of strings
2016-06-06 11:54:15 +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
3ce26bc347
Improve uploader tests + test subscribers CSV import
no issue
- override `x-file-input` in `gh-file-input` to look for a custom property on the change event if we are in testing mode (this is necessary because Ember 2.5+ use native rather than jQuery events so `target.files` is readonly, see https://github.com/emberjs/ember.js/issues/13540)
- migrate unit tests for the uploader components to the integration tests
- add skipped acceptance tests for the subscribers CSV import now that it's possible to simulate file uploads
2016-05-27 13:34:31 +01:00
Kevin Ansfield
44409b5467 Fix broken editor when content contains wrapped images
no issue
- don't assume that the upload element that is being replaced is top-level, target the element's parentNode rather than the overall fragment
2016-05-18 21:52:07 +01:00
Kevin Ansfield
2a16e2ec26 Fix drag-n-drop files from Chrome's download bar
closes #6850
- HTML5 drag-n-drop has some weird inconsistencies around the `dragOver` event where it defaults the "drop" behaviour to nothing so you need to cancel the defaults and override
	- http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar
2016-05-18 09:53:10 +01:00
Kevin Ansfield
6a07a0a985 Fix display of server-provided validation error when adding subscriber
no issue
- make the check for "email" in the server provided error case-insensitive
2016-05-11 19:56:58 +02:00
John O'Nolan
bf8571c73c Merge pull request #6764 from TryGhost/subscribe
Subscribers
2016-05-11 13:53:53 +02:00
kirrg001
db0ef4a677 Subscribers: Move read CSV into separate utility
- split out read CSV function into utility and add tests
- update API response to follow JSONAPI more closely
- update the UI to match the new API response
2016-05-11 11:22:35 +02: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
Kevin Ansfield
cf7cf3c9be Improve gh-profile-image tests for #6640
refs #6640
- add `NotFoundError` to ajax service and test against that when catching errors in `gh-profile-image`
- don't use `passthrough` in Mirage for gravatar requests to avoid network calls during testing
- add additional tests for `gh-profile-image` and put the debounced gravatar test back in place
2016-05-09 22:14:12 +02:00
David Balderston
d238b82b01 Fix Transparent Background in Gravatar Showing Background Image
Closes #5882

* If a gravatar image is available, remove the default image behind it
* If gravatar image is not available, keep or replace the default image
2016-05-09 22:09:27 +02:00
Hannah Wolfe
48fa708b85 Merge pull request #6788 from kevinansfield/synchronous-labs-flags
Synchronous feature service
2016-05-08 13:59:31 +02:00
Kevin Ansfield
11261e9b96 Fix editor image perf and upload bug
no issue
- ~10x speedup in processing time taken on each keypress when there are many images/image upload components in the editor
  - edit DOM in memory before changing it in the page to avoid double-render
  - keep upload components around and re-assign them on re-render, adding or removing an image will still re-generate everything
- adds a throttle to the preview rendering so that renders don't get queued up
- fixes occasional bug where uploading an image didn't update the markdown correctly due to a timing issue
2016-05-08 12:55:56 +02:00
Kevin Ansfield
f05d566a78 Synchronous feature service
supersedes #6773
- update `feature` service and `gh-feature-flag` component to work synchronously rather than async
- use the application route's `afterModel` hook so that settings are loaded before first load
- override `session` service's `authenticate` method to load the settings after successful authentication before any other routes are processed
2016-05-07 15:00:06 +02:00
Austin Burdine
9f0b760ce4 convert more action calls to the ember-invoke-action syntax 2016-04-28 10:34:36 -05:00
Austin Burdine
d957f52508 deps: ember-invoke-action@1.3.0
no issue
- replace instances of `this.get('action')()` with ember-invoke-action syntax
2016-04-26 16:32:17 -05:00
Austin Burdine
678274ae72 replace gh-selectize with power-select in gh-search-input
refs #6458
2016-04-19 10:55:10 -05: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
Austin Burdine
6154628886 fix leave editor modal
no issue
- following up from 6680, fixes a missing set of parentheses
2016-04-12 14:04:59 -05:00
Kevin Ansfield
02e89fbdfc Avoid use of this.attrs for closure actions
no issue
- `this.attrs` is a glimmer-component thing (which doesn't exist in Ghost yet), to avoid confusion we should avoid using it
- https://locks.svbtle.com/to-attrs-or-not-to-attrs
- https://github.com/cibernox/ember-power-select/issues/233#issuecomment-170352572
2016-04-09 10:46:19 +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
Austin Burdine
72e6f2be9f replace hardcoded AWS image url with static image url 2016-03-31 12:09:54 -05: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
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
2a3dc231b7 Fix mixed content security warnings due to gravatar images
no issue
- switches gravatar URL generation to use protocol-relative URLs in `gh-profile-image` component
2016-02-05 16:48:15 +00:00
Kevin Ansfield
0fcafaebd6 Merge pull request #6430 from halfdan/6428-add-trailing
Add trailing slashes on relative URL unless [.?#]
2016-02-03 17:36:34 +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
59379ab99b Add trailing slashes on relative URL unless [.?#]
closes #6428
2016-02-03 17:11:44 +01:00
Kevin Ansfield
dc42e93b06 Merge pull request #6365 from acburdine/remove-on
remove more usage of Ember.on
2016-01-25 11:42:32 +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
6d50b45272 remove more usage of Ember.on 2016-01-19 10:00:44 -06: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
Kevin P. Kucharczyk
82c691a583 Clear images in gh-uploader when navigating between items
closes #6198
- clear img src in gh-uploader when navigating to item with image
- always reset uploader component when new image is not empty
2016-01-16 21:54:02 +01: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
ce70ebb1a8 Isolate all markdown editor behaviour into gh-editor component
no issue
- move all existing markdown editor behaviour out of the editor controller and isolate it into a single component that can be swapped out
- split the `register/remove` functions of the `shortcuts-route` out into a separate `shortcuts` mixin
2016-01-13 12:01:31 +00:00
Hannah Wolfe
95268bfadb Merge pull request #6088 from kevinansfield/liquid-tether-modals
Modals refactor
2016-01-12 21:11:38 +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
Kevin Ansfield
30b5b32dd3 Remove use of Ember.on
no issue
- removes the few uses of `Ember.on` for lifecycle hooks or event hooks where order may be important

`Ember.on` use is discouraged so although we haven't used it often I felt like we should ensure we're consistent throughout the codebase. There's a great article with details of why it's discouraged here: http://notmessenger.com/proper-use-of-ember-on/
2016-01-12 20:48:15 +00:00
Hannah Wolfe
4c67216555 Merge pull request #6300 from kevinansfield/fix-missing-tags-bug
Fix disappearing tags when tag input's selection is swapped out
2016-01-09 16:32:59 +00:00
Hannah Wolfe
a994162889 Merge pull request #6286 from kevinansfield/fix-slow-post-navigation
Fix posts navigation slowdown when lots of posts are loaded
2016-01-09 12:42:21 +00:00
Hannah Wolfe
35f8b96c9e Merge pull request #6285 from kevinansfield/fix-unresponsive-search
Fix unresponsive search
2016-01-08 17:21:59 +00:00
Hannah Wolfe
37e6aab856 Merge pull request #6254 from kevinansfield/fix-profile-image
Fix teardown of gh-profile-image when fileStorage=false
2016-01-08 15:54:25 +00:00
Kevin Ansfield
1db6d94dc9 Fix disappearing tags when input's selection is swapped out
closes #6257
- update the `_onChange` event handler in `gh-selectize` component so that the re-ordering process isn't hit when the underlying objects have changed
2016-01-06 12:21:39 +00:00