Commit Graph

707 Commits

Author SHA1 Message Date
Hannah Wolfe
3fc9075383 Merge pull request #3022 from novaugust/codemirror-shortcuts
Implement Markdown Shortcuts
2014-06-22 10:42:37 +01:00
Hannah Wolfe
743def8386 Merge pull request #3026 from darvelo/delete-new-post
Remove "Delete This Post" option from New Post publish bar menu items
2014-06-22 09:07:00 +01:00
Hannah Wolfe
93c2da55e0 Merge pull request #2967 from szelpe/settings-apps
Ported settings/apps logic to Ember.
2014-06-22 09:04:14 +01:00
David Arvelo
953087e7e8 Remove "Delete This Post" option from New Post publish bar menu items
closes #3025
- adds 'unsaved' class to entry-controls when the post model/controller isNew evaluates to true
2014-06-21 18:21:44 -04:00
Matt Enlow
8393c01be9 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
ae728534ea Removing unneeded file 2014-06-21 18:45:01 +01:00
Hannah Wolfe
bb88b3664f Merge pull request #3011 from darvelo/validations
Add Validations Layer and Post Validations
2014-06-21 17:41:28 +01:00
Hannah Wolfe
64b36468b4 Merge pull request #3003 from jaswilli/issue-2846-settings
Convert general settings page to ember data
2014-06-21 15:25:23 +01:00
Hannah Wolfe
d159a5cced Merge pull request #3002 from novaugust/shortcuts
Implement Shortcuts in Ember
2014-06-21 15:15:50 +01:00
David Arvelo
6020702462 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
Hannah Wolfe
962accfec7 Functional tests for Ember
issue #2989

- Adds lodash for bind and isNumber - looking for a better solution for this
- Still needs the editor and flow tests porting
- Some of the tests are commented out awaiting further implementations
2014-06-20 15:20:59 +01:00
Hannah Wolfe
74205134ef Remove limit from ember post API calls
ref #3004

- this is unnecessary and causing bugs
2014-06-20 11:40:32 +01:00
Jason Williams
1453a1d04e Convert general settings page to ember data
Issue #2846
-Implement custom RESTAdapter and serializer for settings data.
-Convert theme selector to Ember.Select.
-Finish upload modal and wire into settings page.
2014-06-20 04:38:41 +00:00
Matt Enlow
e10c0f20cf 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
b891b2b778 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
Hannah Wolfe
115865010e Fixing typo in navbar 2014-06-19 10:08:55 +01:00
Paul Adam Davis
6d4266dd56 Temporary HTML for the User Management screen & Setup screen 2014-06-18 14:00:47 +01:00
Hannah Wolfe
35f7d8ac9b Merge pull request #2884 from darvelo/sort-posts-list
Get single post from API by id and query params; Auto-sort posts list
2014-06-17 23:45:53 +01:00
Hannah Wolfe
d03d2a239a Merge pull request #2985 from novaugust/featured-and-page-cleanup
Cleanup PostItemView code
2014-06-17 23:27:46 +01:00
Hannah Wolfe
4822cf99cd Merge pull request #2897 from lholmquist/modal_uploader
Modal Uploader
2014-06-17 23:22:26 +01:00
David Arvelo
85f7e1d269 Get single post from API by id and query params; Auto-sort posts list
closes #2883, closes #2951
- introduce custom findQuery in ApplicationAdapter
- posts/post route and editor/edit route now use custom findQuery to find a single post by id with query params
- create a sorting function in PostsController for out-of-order loading
- refresh updated posts in posts.index to make PostsList highlight latest draft after returning from a save in editor
2014-06-17 18:10:11 -04:00
Peter Szel
c614a652cb Ported settings/apps logic to Ember.
Closes #2423

- Created the apps route to fetch apps from server
- Created controller for a single app
- Modified the template of the apps page to use this controller
- Created the Apps model
- Created AppAdapter to use the FixtureAdapter for Ember Data
2014-06-17 23:25:24 +02:00
Matt Enlow
b04dfd52c1 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
Hannah Wolfe
11ab89951b Merge pull request #2981 from jaswilli/fix-observer
Fix removeObserver for title property
2014-06-17 21:56:08 +01:00
Lucas Holmquist
fab34d878c Ember Admin - Upload Modal
Issue #2547
2014-06-17 16:18:32 -04:00
Hannah Wolfe
f11a81067a Merge pull request #2972 from halfdan/2748-featured-post
Implement featured post / page
2014-06-17 20:58:25 +01:00
Hannah Wolfe
6d9f2571a1 Merge pull request #2975 from jaswilli/csrf
Fix csrfSecret handling
2014-06-17 20:16:26 +01:00
Jason Williams
e4a5906f70 Fix removeObserver for title property 2014-06-17 15:47:03 +00:00
Jason Williams
bf5ef6dd65 Show notification on successful sign out
Closes #2977
2014-06-16 22:54:21 +00:00
Jason Williams
a595817b8c Fix csrfSecret handling
Closes #2974
-use req.session.csrfSecret instead of _csrfSecret.
-clear username and password properties from the signin controller.
2014-06-16 20:32:51 +00:00
Jason Williams
9dd3e90e7a Fix slug create and update logic for posts
-Remove unnecessary calls to the slug API endpoint on the
 content screen.
-Only make slug API endpoint calls in editor when the post is new.
-Improve logic for when to update the slug.
2014-06-16 14:09:46 +00:00
Fabian Becker
b1ba9f5957 Implements page class toggling.
- Toggles page class when post is marked as static/non-static
2014-06-16 17:08:58 +03:00
Fabian Becker
c649d23936 Content screen: Featured posts
fixes #2748
- Properly handle marking post as featured/non-featured
- Show correct notifications
2014-06-16 09:32:40 +00:00
David Arvelo
6aab6c5904 Fix trailing slashes output app-wide
closes #2963, closes #2964
- override Ember's `HistoryLocation.formatURL`
- remove overridden `HistoryLocation.setURL`
2014-06-15 16:55:12 -04:00
Matt Enlow
e3b302676b 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
Hannah Wolfe
9112c1f469 Merge pull request #2895 from appleYaks/editor-parity
Reach Editor parity with Ember
2014-06-14 18:43:36 +02:00
Hannah Wolfe
fd8cc542b5 Merge pull request #2946 from halfdan/fix-page
Fixes static pages when permalinks are active.
2014-06-14 18:12:39 +02:00
Hannah Wolfe
0e81f3a20e Merge pull request #2952 from novaugust/ember-signin-transition
Transition user to original destination on login
2014-06-14 18:12:31 +02:00
Hannah Wolfe
7503c20e74 Merge pull request #2955 from jasonsturges/attribute-delimiter
Label 'for' attribute value literal have no delimiter.
2014-06-14 08:16:26 +02:00
Hannah Wolfe
b9c6a8bbcb Merge pull request #2953 from novaugust/authenticate-ember-routes
Change `posts`, `post`, and `signout` routes to be `AuthenticatedRoute`s
2014-06-14 08:15:48 +02:00
Jason Sturges
93ae69b1d0 Label 'for' attribute value literal have no delimiter.
Closes #2954
2014-06-13 23:32:13 -05:00
David Arvelo
eb949aafae 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
49e4403730 Transition user to original destination after signin
Closes #2943
- `AuthenticatedRoute` now stores the user's original destination on the
  `ApplicationController`.
- The `SignIn` route's `login` action checks if the `loginTransition` property is set on the
  `ApplicationController`, and if so, retries that transition after a
  successful login.
2014-06-13 14:28:35 -06:00
Matt Enlow
065cbc569d Change posts, post and signout routes to be AuthenticatedRoutes
No issue
The following is a list of routes which are not authenticated
- placeholder routes: `editor` and `content`
- `application`
- password routes: `forgotten`, `reset`, `signin`, `signup`
2014-06-13 14:13:07 -06:00
Matt Enlow
b1176a8a67 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
16190ffe25 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
Fabian Becker
21a7e3ebb2 Fixes static pages when permalinks are active.
fixes #2938
- Fix `page === 1` occurences
- Fix ember logic
2014-06-13 01:00:18 +02:00
John O'Nolan
ec05677737 Convert support links from forum to new support site 2014-06-12 12:52:01 +02:00
Matt Enlow
ca422dc1a4 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
Hannah Wolfe
26d62fe775 Merge pull request #2933 from novaugust/editor-resource-routing
Refactored Editor Routes
2014-06-11 23:07:59 +02:00