Commit Graph

674 Commits

Author SHA1 Message Date
David Arvelo
aa9db35cfe 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
7412493575 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
79647ab95b Merge pull request #2895 from appleYaks/editor-parity
Reach Editor parity with Ember
2014-06-14 18:43:36 +02:00
Hannah Wolfe
f0259eb467 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
77b0f4f7a1 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
aae6e5d5f3 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
bfd484f064 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
8ab29e57b3 Label 'for' attribute value literal have no delimiter.
Closes #2954
2014-06-13 23:32:13 -05:00
David Arvelo
2151d8a49f 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
165be0fa72 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
57641cffe4 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
b58573ded5 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
beb409dd5f 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
5eafa15b1b 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
f79e5f9794 Convert support links from forum to new support site 2014-06-12 12:52:01 +02:00
Matt Enlow
25f692cdf6 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
52de600f42 Merge pull request #2933 from novaugust/editor-resource-routing
Refactored Editor Routes
2014-06-11 23:07:59 +02:00
Matt Enlow
f0283ddb5a Refactored Editor Routing
- Moved `new` route into `editor` resource (`editor.new`)
- Moved the current editor controller, view, and route to `editor.edit`
- Added `editor.index`, which automatically transitions into `editor.new`
- Moved controllers, views, templates, and routes to match new router config. Also changed links to `editor` into `editor.new` and `editor.edit` as appropriate.
2014-06-11 12:18:44 -06:00
Hannah Wolfe
3ae652b6ab Merge pull request #2919 from novaugust/editor-button-unpublish-fix
Fix Editor Save Button not allowing unpublish
2014-06-11 19:35:47 +02:00
Hannah Wolfe
12ef319d73 Merge pull request #2915 from rjackson/make-exports-consistent
Make exports more consistent.
2014-06-09 22:38:06 +02:00
Hannah Wolfe
ff4904cb8a Merge pull request #2922 from lholmquist/user_model
Update user model logic for Ember Inspector.
2014-06-09 20:14:53 +02:00
Robert Jackson
a9608d77ae Make exports consitent.
Previously, the exports were somewhat random with some files declaring
local variables then immediately exporting them, and others simply
doing the work needed in the export itself.
2014-06-09 13:58:35 -04:00
Hannah Wolfe
ad7622d39d Merge pull request #2917 from jaswilli/debug-cleanup
Make debug an authenticated route
2014-06-09 19:58:17 +02:00
Hannah Wolfe
012ef17dff Merge pull request #2889 from novaugust/post-model-dates
Changed ember models to use moment for dates
2014-06-09 19:57:36 +02:00
Lucas Holmquist
4df64da911 Update user model logic for Ember Inspector.
Fixes #2921.
2014-06-09 13:16:53 -04:00
Matt Enlow
70e22807a3 Fix Editor Save Button not allowing unpublish
Closes #2918
2014-06-09 08:37:16 -06:00
Jason Williams
509d0671a7 Handle invalid post ids in editor route
No issue
-fail fast if an invalid post id is passed into the
 editor route to prevent an unnecessary network request
 for all posts
-if post id is valid but post does not exist, transition
 to Content screen instead of returning an invalid model
2014-06-09 12:59:21 +00:00
Hannah Wolfe
ea994ee93d Merge pull request #2914 from rjackson/use-loader-from-bower
Use loader.js from bower.
2014-06-09 09:40:19 +02:00
Hannah Wolfe
dcb8d45594 Merge pull request #2907 from appleYaks/shadows
Add shadows to PostsListView and the adjacent HTML Preview; Fix preview
2014-06-09 09:38:10 +02:00
Jason Williams
a8932a7a24 Make debug an authenticated route 2014-06-09 02:05:40 +00:00
Robert Jackson
66616849ec Use loader.js from bower. 2014-06-08 19:39:45 -04:00
David Arvelo
f1a02b88a9 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
Hannah Wolfe
fccb5eaf26 Merge pull request #2909 from novaugust/publish-button-reset
Fixed publish button not updating with model  change
2014-06-08 19:55:10 +02:00
Hannah Wolfe
fd9b8fac48 Merge pull request #2886 from lholmquist/wrap_uploader
Generic Uploader component
2014-06-08 19:54:21 +02:00
Matt Enlow
5d5fec6539 Fixed publish button not updating with model change
Closes #2908
- Changes `willPublish` from `oneWay` property to computed property.
2014-06-08 11:03:12 -06:00
David Arvelo
e88519613f Add shadows to PostsListView and the adjacent HTML Preview; Fix preview render
closes #2906
- add a utility function to add classnames to targets, retrofitted from clientold to accommodate `Ember.run.bind`
- create a content-preview view that tracks its scrolling
- add a scroll handler to the existing PostsListView
- The `posts/post` template now takes its HTML from the post model instead of using the editor's markdown component
2014-06-08 12:53:54 -04:00
Hannah Wolfe
4ea3675263 Merge pull request #2905 from appleYaks/preview-markdown
Fix HTML preview rendering on the main screen
2014-06-08 18:31:55 +02:00
Lucas Holmquist
7fba359d31 Implement a Generic Uploader - #2886 2014-06-07 19:58:16 -04:00
David Arvelo
a03a0046ab Fix HTML preview rendering on the main screen
closes #2904
- The `posts/post` template now takes its HTML from the post model instead of using the editor's markdown component
2014-06-07 14:19:42 -04:00
Harry Wolff
1818f631bd Implement the Tag Editor view
closes #2425

- creates custom view for the tag editor
2014-06-06 23:02:56 -04:00
Hannah Wolfe
145dffbc73 Merge pull request #2892 from appleYaks/draft-404
Fix Editor/:postId 404 on draft
2014-06-06 21:43:59 +02:00
Jason Williams
d9d5649cdf Close post settings popover menu after delete post
No issue
-inject popover:service into modal component delete post
 controller so popover close can be triggered as part of
 the delete action
-remove unnecessary 'needs' from the delete post controller
2014-06-06 04:04:49 +00:00
David Arvelo
3425cb4aed Fix Editor/:postId 404 on draft
closes #2857
- in EditorRoute, get model from the datastore if it's there
- if page is refreshed, get model from `/posts` API with `{status: 'all'}`
2014-06-05 13:23:28 -04:00
Matt Enlow
fc28cddb8d Changed ember models to use moment for dates
Closes #2888

-Added moment-date `DS.Transform`
-`models/post` and `models/user` both use `DS.attr('moment-date')` in
place of `date` now.
2014-06-05 10:30:28 -06:00
Hannah Wolfe
fd48a12b42 Merge pull request #2873 from jaswilli/2849-delete-posts
delete posts from post settings menu
2014-06-04 15:15:37 +01:00
Hannah Wolfe
5016f3db69 Merge pull request #2875 from novaugust/popover-cleanup
Removed unused popover code in PostsPostController
2014-06-04 15:06:19 +01:00
Jason Williams
5ecc74e87a Enable post deletion from Ember admin
Closes #2849
-wire up delete post action in ember admin
-refactor ember modal dialog
-override RESTAdapter.deleteRecord to workaround Ember expecting
 an empty response body on DELETEs
2014-06-04 13:19:57 +00:00
Matt Enlow
39b16a2893 Removed holdover popover code in PostsPostController
Ref #2840
-Removed unused isEditingSettings and isViewingSaveTypes from PostsPostController
2014-06-03 16:30:46 -06:00
Hannah Wolfe
718d7536df Merge pull request #2862 from morficus/master
refreshless user logout
2014-06-03 19:19:14 +01:00
Maurice Williams
aa35c17d79 refreshless user logout
fixes #2842
- new Ember route for signout
- new API route to allow async signout
2014-06-02 17:12:02 -04:00