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

14 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
17b3ced8c9 Always call _super when using Ember hooks
no issue
- review use of Ember core hooks and add a call to `this._super` if missing
- fix a few occurrences of using the wrong component lifecycle hooks that could result in multiple/duplicate event handlers being attached

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

As example of lost functionality, there were a number of routes that extended from `AuthenticatedRoute` but then overrode the `beforeModel` hook without calling `_super` which meant that the route was no longer treated as authenticated.
2015-11-30 12:45:37 +00:00
Kevin Ansfield
7ce3726589 Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00
Matthew Beale
4d3e0d664f Use private properties for unobserved render state
* Drop set for local private editor property
* Only run preview setup on didInsertElement
* Drop set for local scrollWrapper prop
* Selectize setup on afterRender instead of next
* Use local props for editor save timers
2015-11-21 09:25:21 -05:00
Kevin Ansfield
4ecdf182e6 Routable tags
refs #5845
- Updates tag settings screen to match content screen behaviour. Each now tag has it's own route that is link-able from other areas of the app
- Updates a number of places where jQuery event handler code was not wrapped in Ember's run loop
2015-10-27 12:48:41 +00:00
Kevin Ansfield
d127d79019 Standardize on var-less export default across ember app
no issue
- drops the `var Foo = Ember.Thing.extend({}); export default Foo;` syntax in favour of exporting directly, eg: `export default Ember.Thing.extend({})`
- discussion on this change [here](https://github.com/TryGhost/Ghost/pull/5340#issuecomment-105828423) and [here](https://github.com/TryGhost/Ghost/pull/5694#discussion-diff-37511606)
2015-10-06 10:59:50 +01:00
Austin Burdine
d3bc24f0d7 add code editor component
closes #4995
- adds code mirror editor component
- converted code-injection editor fields to gh-cm-editor component
2015-04-05 11:57:18 -05:00