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

29 commits

Author SHA1 Message Date
Hannah Wolfe 58ac0e0451 Merge pull request #3115 from halfdan/2850-post-notifications
Show correct post notificatons based on status.
2014-06-27 21:52:28 +01:00
Fabian Becker bc677a13da New setup screen for blog installation.
fixes #3072
- Change router to handle /ember/setup/
- Adjust doSignup to also handle setup
- Adjust tests and add new where necessary
- Add setup controller, setup validation, setup route
- Adjust casper emberSetup to handle new setup
2014-06-26 15:31:44 +02:00
Fabian Becker 8afd590f63 Show correct post notificatons based on status.
closes #2850
- Add messageMap from old admin
- Add two methods to pick the correct notification based on prev status and current status
2014-06-26 09:42:29 +00:00
Jason Williams 52cf55e369 Enable validation for settings/general screen
Closes #3036 Refs #3012
-Enable validation for settings/general
-Turn on functional tests for the validations
-Move notification closeAll calls so that notifications
 are cleared on attempted saves instead of just on
 successful saves
2014-06-24 13:32:47 +00:00
Hannah Wolfe 4c29002229 Merge pull request #3058 from halfdan/3012-close-notifications
Close notifications on transition or user action.
2014-06-24 13:45:51 +01:00
Fabian Becker 7c0acf926f Close notifications on transition or user action.
closes #3012
- Inject notification object into router
- Listen to didTransition / observe currentPath to close notifications
- Close notifications on successful save actions
2014-06-24 13:51:47 +02:00
Kevin Ansfield 58b33f94bf Ensure incomplete tags aren't lost on save
closes #2991, references #2172, references #2453
- moved and separated tags logic from EditorTagsView into PostTagsInputController/View
- call out to PostTagsInputController when saving post to ensure an incomplete tag is completed before save
- added Tab key support for suggestion selection / tag completion
- don't show suggestions list when input field doesn't have focus
- added code for #2172 but left commented-out as it causes side effects with completion on save
- updated suggestion highlighting so it doesn't bork on html/regex chars (#2453)
2014-06-24 12:14:27 +02:00
Jacob Gable 6b9f9963b9 Add validation for signin/signup
Closes #2976, Closes #3017

- Move logic to signup controller
  - Add ValidationEngine mixin to signup controller
  - Add signup validator with code from clientold login view
- Add signin validator and integrate into signin controller
- Add validation to forgotten controller
  - Switch to button action to support hitting enter in text field to submit
- Clear all notifications in notifications.closeAll
- Modify ValidationEngine.validate to not format errors based on option
- Update casper test for signin to wait for notification before trying
to do another signin
2014-06-23 21:17:57 -05:00
Hannah Wolfe c7d506d664 Update shortcut for zen mode
closes #2988

- includes tests
2014-06-23 22:24:28 +01:00
Hannah Wolfe f481932aba Merge pull request #3024 from morficus/nprogress-loading-indicator
Re-implementing the loading indicator for the Ember admin
2014-06-23 16:11:31 +01:00
Maurice Williams 385afefb46 Re-implementing the loading indicator for the Ember admin
closes #2855 , closes #2848
- New  mixin that utilizes NProgress for displaying a loading indictor for all routes who's model issue a "loading" event (aka: when requesting data from the server during a route change).
- Also removing (the now unnecessary) "loading" template.
2014-06-23 10:01:33 -04:00
Hannah Wolfe 07da720705 Merge pull request #3023 from darvelo/promise-rejection
Fix promise rejection during validation
2014-06-23 11:45:04 +01:00
David Arvelo 9249e20318 Fix promise rejection
fixes #3013
- bubble promise rejection on post model validation/save error so that it doesn't bubble as resolved
- prefer `.catch()` for promise handlers as per recommendations
- check if `.save()` is being called from model.destroyRecord() and forgo validation if so
- normalize output for both `.validate()` and `.save()`
2014-06-22 14:49:09 -04:00
Matt Enlow a269fc5823 Implement Markdown Shortcuts
Closes #2984, #3020
Ref #1463, #3019

 #### Shortcut Values
Shortcut values can now be either strings (as before) or objects like
{action:string, options:hash}.
 #### Markdown shortcuts added
- 'ctrl+alt+u' strkethrough
- 'ctrl+alt+1' h1
- 'ctrl+alt+2' h2
- 'ctrl+alt+3' h3
- 'ctrl+alt+4' h4
- 'ctrl+alt+5' h5
- 'ctrl+alt+6' h6
- 'ctrl+shift+i' image
- 'ctrl/command+k' link
- 'ctrl+l' list

Left behind commented out stubs for additional markdown shortcuts.

 #### Editor Controllers (New and Edit)
- Moved shared init function into editor-base-controller.
- Removed MarkerManager mixin from editor controllers as it's included in
  the base.
2014-06-21 15:10:46 -06:00
Hannah Wolfe 64d8b81a23 Merge pull request #3011 from darvelo/validations
Add Validations Layer and Post Validations
2014-06-21 17:41:28 +01:00
Hannah Wolfe f6db00b0e1 Merge pull request #3002 from novaugust/shortcuts
Implement Shortcuts in Ember
2014-06-21 15:15:50 +01:00
David Arvelo adea43f051 Add Validations Layer and Post Validations
closes #2893, issue #2850, issue #2856
- this is a stable, but quick and dirty validations layer for the time constraints
- this could be replaced with a unified server/client layer later. the infrastructure is there.
- create a validation engine mixin to match validators with models
- override the save method in the mixin to perform validations first
- create a post validator
- fixup calls to .save() to make sure they catch errors properly
2014-06-21 00:12:55 -04:00
Matt Enlow 2da97808a5 Implement Shortcuts in Ember
Closes #2988, #2752
Ref #1463, #2984,
 # Shortcuts via Keymaster
- Added KeyMaster to bower dependencies. KeyMaster is a minimal keyboard
  shortcuts library.
- Added `ShortcutsRouteMixin` for routes that will use shortcuts.
  Currently, only routes can have shortcuts. See the extensive comment
  at the top of `core/client/mixins/shortcuts-route.js` for a
  description of how to implement shortcuts.

 ## Other Changes
- Injected popover service into ApplicationRoute
- Created `EditorRouteBase` mixin for the `editor.new` and
  `editor.edit` routes to mixin.
- `StyleBodyMixin` now calls `this._super()` on `activate` and
  `deactivate` to play nicely with other mixins.

 ## Shortcuts and Stubs implemented
 #### Application-Wide
- `'esc':'closePopups'` shortcut **stub** to close popovers,
 modals, and notifcations

 #### Editor Shortcuts
- `'ctrl+s, command+s': 'save'` note that `command` is the
  `meta` key.
- `'ctrl+alt+p': 'publish'`
- `'ctrl+alt+z': 'toggleZenMode'`
2014-06-19 15:07:42 -06:00
David Arvelo 0603be73ef Fix deletion of Post Model in Editor and Content screens
fixes #2999
- handle undefined argument in openModal function
- catch whether a model is deleted in Editor routes to aid transition
- move updateTags function to the PostModel
- add call to updateTags in delete-post modal
2014-06-19 14:31:56 -04:00
Matt Enlow 59d11b38fd Cleanup Misc Ember Code
No issue

Misc Places
- Removed expired, irrelevant, and fixed todos

FloatingHeaderPartial
- Fixed "Written" vs "Published" text logic

SettingsGeneralController
- Removed single quotes from property names

EditorBaseController, MarkerManagerMixin
- Aligned var declarations

PostItemView
- Commented out unfunctional code for feature request #2398
- Switched `isPage`, `isFeatured` to be computed properties in `Po
- use `toggleProperty` in `PostController.action.toggleFeatured`
2014-06-17 14:59:15 -06:00
Matt Enlow 48d32d87fe Create boundOneWay util function
Closes #2958
- Created `boundOneWay` util to extract common pattern of having a oneWay property that doesn't break its binding after being set
- Changed `EditorControllerMixin.willPublish`,  `PostSettingsMenuController.publishedAtValue` and `.slugValue` to use the new `boundOneWay` util
2014-06-14 15:27:52 -06:00
David Arvelo 445cd9e727 Reach Editor parity with Ember
closes #2426, closes #2781, closes #2913
- Concatenate vendor files on change of js in core/shared/
- Add all the markerManager stuff to its own mixin
- make markers a shared object for all that mix it in. makes it easier to use helper functions in different modules
- add getMarkdown method, returns object with two keys holding the markdown: one with markers, the other without
- Clear markers when codemirror is destroyed
- make Editor subcomponents communicate through the Editor Controller
- Set Codemirror and html preview shared scrolling
- Set CodeMirror, html preview css scroll class with util
- Create 'scratch' property in Editor controller; prevents a model save wiping image markers due to markdown bindings
- Add editor and html preview actions to handle img upload start/finish
- disable codemirror when an image is being uploaded, enables on success or failure
- Fix editor wordcount when there are 0 words
- Add modal dialog when transitioning out of the editor with an unsaved post
- Add window.onbeforeunload handling with `.unloadDirtyMessage()` on editor controller
- and various other things
2014-06-13 18:12:03 -04:00
Matt Enlow 175194fcff Refactored PostSettingsMenuController
Closes #2845.
Ref #1351.
- Refactored `PostSettingsMenuController` to appropriately set and display
  slug and publish date and their placeholders.
- Removed api spam on title change by putting `slugPlaceholder` generation
  inside of an `Ember.run.debounce` call.
- Renamed `gh-blur-text-field` to `gh-blur-input`
- Created `SlugGenerator` class to abstract slug generation.
- Added `timestampVerification` function to `utils/date-formatting`
- `utils/date-formatting` now uses `strict` parsing of dates
- Added more acceptable date formats to accommodate strict parsing
- Moved `isDraft` and `isPublished` computed properties from
  `EditorController` to `PostModel`
2014-06-13 12:14:58 -06:00
David Arvelo 668dbde7fa Fix serializing/deserializing Tags on save from the Editor
closes #2947
- make a PostSerializer to embed the tags objects in the posts POST/PUT request
- on editor save, clear out tags from the post and data store that have `id: null`
2014-06-13 02:44:45 -04:00
Matt Enlow dfd7689ca0 Transition to editor.edit after saving a new post
Closes #2860
- `editor-base-controller`'s `save` action returns a promise with the model
  after saving
- `EditorNewController` will transition to `EditorEditController` upon a
  successful save (model has an id)
- Removed a console.log in editor's save function
2014-06-11 15:44:18 -06:00
Matt Enlow e01ecb4b6f Fix Editor Save Button not allowing unpublish
Closes #2918
2014-06-09 08:37:16 -06:00
David Arvelo 6cb087587b Split PostController amongst new Editor/PostSettingsMenu Controllers
closes #2910
- create EditorController, PostSettingsMenuController
- remove `posts.post` controllerName dependency on EditorRoute/NewRoute
- `{{render}}` the PostSettingsMenuView with its own controller
- break up properties/methods from PostsPostController into all three controllers
- fix EditorRoute pagination options to now be comparable to PostsRoute
- add NewController to force NewRoute to refresh editor with blank model. Identical to Editor's
- EditorController and NewController are based on a shared mixin
- NewView created, templateName is 'editor'
2014-06-08 14:01:32 -04:00
Matt Enlow 3c0516e824 Added popover component
Closes #2418, #2714
Ref #2446, #2565

- Added and injected `popover` service to globally control popovers
- Added `gh-popover-button` component
- Added `popover-mixin` for popover and popover-buttons to mixin
- Added body-event-listener mixin for popover service to watch for body
  clicks with
- Post settings and post save button both now use `gh-popover`
- Added hacks to `ember-hacks.css` to make popovers work until ghost-ui
  consolidates functionality
2014-05-31 17:23:41 -06:00
Manuel Mitasch fba798b27b Amend fixtures & put body classes in styleBody mixin
- Change fixture response of posts route to actual format.
- Extracted classNames logic of routes into style-body mixin.
- Additionally replaced all double-quotes with single-quotes for style conformance.
2014-03-09 15:30:54 +00:00