Commit Graph

171 Commits

Author SHA1 Message Date
Jason Williams
18a433debd 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
Hannah Wolfe
7b241a302a Fixing typo in navbar 2014-06-19 10:08:55 +01:00
Hannah Wolfe
15a2b9f167 Merge pull request #2985 from novaugust/featured-and-page-cleanup
Cleanup PostItemView code
2014-06-17 23:27:46 +01:00
Peter Szel
17d455ceba 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
6972902adb 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
Lucas Holmquist
833699bbb4 Ember Admin - Upload Modal
Issue #2547
2014-06-17 16:18:32 -04:00
Fabian Becker
6deb206e84 Implements page class toggling.
- Toggles page class when post is marked as static/non-static
2014-06-16 17:08:58 +03: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
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
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
John O'Nolan
f79e5f9794 Convert support links from forum to new support site 2014-06-12 12:52:01 +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
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
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
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
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
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
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
Hannah Wolfe
7f3e9da168 Ember cleanup: double quotes + removed bad tag
- All HTML / Handlebars should use double quotes
- Removed a tag I meant to remove earlier
2014-06-01 21:29:25 +01:00
Connor Tumbleson
787182db55 render html in notifications
fixes #2844
2014-06-01 11:45:17 -05:00
Hannah Wolfe
3181dbe9bc Merge pull request #2840 from novaugust/popover-service
Added popover component
2014-06-01 11:10:00 +01:00
Matt Enlow
78643344e4 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
Hannah Wolfe
699111b01a Ember: correct editor layout and other niggles
no issue
- Fixes the editor view so that the layout is correct
- Remove default title
- Fixes a couple of scoping issues with notifications
2014-05-31 19:32:22 +01:00
David Arvelo
6ab475860d Infinite Scroll on Posts List
closes #2414
- Add PostsController with loadNextPage action
- Collect and store pagination info from PostsRoute into PostsController
- Use `store.filter` on PostsRoute model hook to auto-update posts list template as post models are added to the store
- Add content list view and use it to check for scroll event
- Make PostRoute only load a post that's already in the store, until we figure how to load multiple pages on refresh
- Add util function from clientold that concats error messages from server response
2014-05-30 22:14:45 -04:00
Hannah Wolfe
d596d658e8 Merge pull request #2828 from lholmquist/GH-2373
Update Ember Components with proper gh- prefix
2014-05-29 15:31:50 +01:00
Jacob Gable
84c15ac4c4 Ember Data with Posts
Ref #2699

- Introduce ember data dependency
- Add loadInitializers and refactor most initializers into one combined
- Add Post ember data model
- Refactor generateSlug to use title of post and ghostPaths
- Refactor post controller to not reference model.property everywhere
- Use RESTAdapter for posts, users and tags
- Setup author and tag relations in Post model
- Fix broken API calls by adding CSRF header
- Add initiaizer for csrf value
- Use actual User model for current user initializer
- Add action for setting featured post, test with actual api call
- Fix the sending of UUID's up to the server
- Refactor current-user to use ember-data store
- If a user is preloaded in the application, use pushPayload to put it
in the store
- Do a lookup on the store to get an actual User model for injection
- Fix posts/post controllerName in route/new.js
- Alter signup process to push user into ember data store
2014-05-29 07:42:51 -05:00
Lucas Holmquist
323ccb2765 Update Ember Components with proper gh- prefix
GH-ISSUE 2373
2014-05-28 15:26:16 -04:00
Hannah Wolfe
275f467140 Merge pull request #2786 from novaugust/ember-editor-save-and-publish
Ember editor save and publish button functionality
2014-05-25 16:45:19 +03:00
Matt Enlow
bed369d2db Add active class to settings tabs
Closes #2751
2014-05-24 08:02:42 -06:00
Matt Enlow
2cf81164f7 Ember editor save and publish button functionality
Closes #2747
- Added new 'editor-save-button' view and template.
- Added save action to post controller.
- Set a new post as the default model for the /editor/ route.
- Set the `posts/post` controller as the controller for the /editor/
  route.
- Needs ghost-popover #2418 component for full pop-up functionality
2014-05-24 07:47:55 -06:00
Jacob Gable
0229a127fe Implement signup in Ember
Closes #2410

- Add signup action that posts to signup endpoint
- Fix nav bar showing on signup page
- Fix image link when a user hasn't set their image yet
- Redirect to the ember/signin page if requesting an ember page
2014-05-23 12:17:28 -05:00
fabfou
4b695d3b1a Move debug page from /settings/debug to /debug
closes #2743
- remove settings/debug route and associated files
- reimplementation at debug route
2014-05-19 19:18:07 +02:00
Hannah Wolfe
50b4281c9d Merge pull request #2769 from novaugust/ember-settings-fade
Added fade-in to ember settings panes
2014-05-19 20:01:16 +03:00
Hannah Wolfe
0c4ccb705e Merge pull request #2764 from jgable/emberSignin
Improve signin
2014-05-18 15:56:54 +01:00
Hannah Wolfe
687144bd98 Merge pull request #2772 from shindakun/profilelink
Corrected link to user profile settings
2014-05-17 20:23:07 +01:00
Matt Enlow
104adb37a8 Added fade-in to ember settings panes
Closes #2749
- Add fade-in class to settings panes headers and contents
2014-05-15 19:59:06 -06:00
Jacob Gable
8787ec5ba4 Improve signin
Ref #2413

- Remove fixture and use actual API
- Store and send down actual logged in user data
- Refactor isLoggedIn to use computed property on application
- After signin, update user data in dependency container
- Add CSRF to all routes and controllers via initializer
- Update authenticated route to check for user.isLoggedIn
- Add notifications for signin error
- Add notifications.showAPIError helper
- Add plumbing for refreshless signup to doSignUp in admin controller
2014-05-15 09:18:43 -05:00
Steve
a79bbd686f Validate user URL input to ensure protocol is present
closes #1623
- added protocol validation to isURL on user settings validator.
- added placeholder URL to user profile template
- ref: https://github.com/sethlilly/Vapor/issues/10
- ref: https://github.com/oswaldoacauan/ghostium/issues/38
2014-05-15 06:34:07 -07:00
Steve
6f4187c3d7 Corrected link to user profile settings
closes #2745
- Added link
2014-05-15 06:27:38 -07:00
Steve
ff0dc79546 Fixed admin navbar icons
Closes #2708
- Edited classNames to use correct names: settings and editor.
2014-05-07 19:47:35 -07:00
Peter Szel
8ce91adfb6 Ported logic to settings: Debug Tab closes #2424
- Added file upload component
- Added import client logic
- Added e-mail sending client logic
- Added settings model
2014-05-07 20:48:29 +01:00
Hannah Wolfe
f24e3b2d1b Merge pull request #2618 from novaugust/post-settings
[Ember.js] Create Post Settings Menu and its functionality on the Post controller.
2014-05-07 20:22:46 +01:00
Hannah Wolfe
095b700aa8 Merge pull request #2565 from hswolff/ember-popover
[Ember.js] Create GhostPopover component
2014-05-07 20:22:41 +01:00
Jacob Gable
8c73c3794c Ember settings/general
- Settings fixture that doesn't seem to work
- SettingsGeneralRoute with model function calling api
- SettingsGeneralModel with save method stubbed
- SettingsGeneralController with actions for save, uploadLogo and uploadCover
- Let ApplicationRoute handleValidationErrors
- Fix actions hash in controller and use bind-attr
- Refactor to use single SettingsModel
- Implement description word count
- Fix broken ajax reference by actually importing ajax method
- Refactor to use count-words helper
- Refactor isDatedPermalinks into controller
- Refactor the isDatedPermalinks to use a custom setter
- Remove isDatedPermalinks code from the model
2014-05-07 11:32:49 -05:00
Harry Wolff
76ad6cb9bc Create GhostPopover component
issue #2418

- create ghost-popover component and template
- use it for the navigation popover
- still needs to handle global click event on the document
to close the popover
2014-05-07 12:21:26 -04:00
Matt Enlow
e7f5dd3204 Create Post Settings Menu and its functionality on the Post controller.
closes #2419
- Added blur-text-field component, which fires actions on focusOut
- Added utils/date-formatting for moment & date functionality  consolidation
- Added functionality to PostsPostController
- Added fixtures: posts/3 & posts/4, posts/slug/test%20title/
- Added Post model saving
- Set posts.post as controller for EditorRoute
- Added PostSettingsMenuView and template
- Added "showErrors" convenience method to notifications
2014-04-20 13:28:43 -06:00
Hannah Wolfe
9f0365a180 Merge pull request #2472 from halfdan/ember-notifications-2417
[Ember.js] Implement Notifications for Ember
2014-04-16 20:03:00 +01:00
Jason Williams
901d1b1f8c Set user profile website field to type url
closes #2588
2014-04-14 16:22:14 +00:00
Fabian Becker
9da6f15d33 Implement Notifications for Ember
closes #2417
- Adds Notification(s)Component
- Render notifications in application.hbs
- Adds handleError in application route
2014-04-09 00:36:15 +00:00
Peter Szel
ac113b582f Added fancy fade-in effect and autofocus to the login pages (signin, signup, forgotten, reset).
- Added CSS to implement the fade in effect.
- Added 'autofocus' to the attribute bindings of the TextField so they accept it.
2014-04-08 00:02:54 +02:00
Hannah Wolfe
ad4102a693 Merge pull request #2532 from szelpe/ember-reset-2412
Created ResetController.
2014-04-06 23:08:48 +01:00
Harry Wolff
00da1a43b7 Creates Ember Modal infastructure
resolves #2416

This is a pretty large commit but what it's adding are pretty fundamental to the admin app.

- Creates top level actions on the ApplicationRoute for opening and closing modals.  This allows sending the 'openModal' action from any template to open a modal.

- Every modal template lives in 'templates/modals/{{modalName}}'

- Each modal can have a backing controller of the same name that can provide additional control for that modal.  Those controllers reside in 'controllers/modals/{{modalName}}'

- Created the ModalDialog component which is where all the logic for the component resides.  It's not at 100% parity with the existing Ghost modal system but it has the foundation for further fleshing out.  It currently accepts parameters for styling how the modal should appear, which previously was defined in JS files in the Backbone admin.

- This creates the 'delete all posts', 'delete this post', 'markdown', and 'upload' modal.  Some are in more stages of completion than others, but I wanted to just get the foundation in place as fast as possible.

- This also creates the UploadModal component which is a subclass of the ModalDialog component.  The reason for this subclassing is that the UploadModal component directly accesses the DOM and when that occurs in Ember it should remain in a component definition.  It's ready for extending to reach parity.  Note: depending on needs the base ModalDialog class may need to be modified.
2014-04-06 12:45:19 -04:00
Robert Jackson
4dbaf58aba Refactor navbar to eliminate nested {{link-to}}.
no related issue

This is essentially setting up a binding from the `LinkView`'s `active`
status and whatever is set as `alternativeActive` in the `{{link-to}}`
(in our case the `activating-list-item` component.

Screenshots showing that the proper CSS classes are given:

![screenshot](http://monosnap.com/image/tzOH6n82rIVGNEFAUWVOLN52QuASQ4.png)

![screenshot](http://monosnap.com/image/5gmcwJcj0kgEXt8lnET4OKgIZ8KRpH.png)

![screenshot](http://monosnap.com/image/UCVNukTXLMNfVneLhzwVyhkrVlGSBt.png)
2014-04-01 22:36:16 -04:00
Peter Szel
3a72c3ca02 Created ResetController.
closes #2412

- Updated the reset route to accept token parameter and hand it over to the controller.
- Added ResetController which handles the submit action and the button disabled state.
- Added reset action to the user model to handle ajax request.
- Updated reset template.
- Added fixtures to test reset API action.
- Fixed password variable names to camel cased style (e.g. newpassword -> newPassword).
2014-03-31 13:06:28 +02:00
Szél Péter
6c51b5c2f2 Created ForgottenController
closes #2411

- Added ForgottenController which handles the form submit event
- Modified the forgotten template
- Added Paths utility tool to get the root/subpath
- Added ajax fixture
2014-03-30 22:18:15 +02:00
Harry Wolff
2b9d498628 Create SettingsUserController
addresses #2422

- creates settings user controller

- creates user model object

- updates user fixture to be compatible with user model

- updates settings/user template

- add validator to Ember Admin

- use validator to validate user model is valid

- add mock response to /users/me/ path

- creates models/base file for all models to inherit from

- add mock response to /ghost/changepw/ path
2014-03-23 22:51:43 -04:00
Harry Wolff
e9c27bb633 Flesh out more of the Ember admin
no issue

- this ports over screens from old admin to
 allow people to begin working on aspects of the screen

- All logged out screens have been imported: Signup, Signin,
 Forgotten password, reset password

- Those screens are now ready for behavior to be ported over

- This also updates templates to be more in line with how they were
 in the old admin

- Littered through the code are @TODO comments of functionality that is
 missing and will need to be resolved before this is production ready

- Also scaffolds out the settings screen and every tab
2014-03-16 16:01:56 -04:00
Hannah Wolfe
3ba595c702 Merge pull request #2397 from manuelmitasch/ember-add-assets
Ember.js: Add assets img + css (ember-hacks.css) to ember admin
2014-03-15 18:48:50 +00:00
Manuel Mitasch
2239f0d50b Ember.js: Add assets img + css (ember-hacks.css) to ember admin
Closes #2276

- Adds the images to `core/client/assets/img`
- Adds css with ember hacks to `core/client/assets/css`
- Configures middleware to provide assets as static files at url `/ghost/ember`
- Adds ember option to assets helper
- Modifies default-ember.hbs to use ember option on asset helper
- Remove inline style definition in editor.hbs
- Modifies .gitignore to include ember-hacks.css (in ignored `core/client/assets/css` folder)
2014-03-15 00:08:15 +01:00
Manuel Mitasch
b1b15afc5e Ember.js: User fixtures + injection + login
* Adding **user fixtures** for signin

* Adds an initializer for the **current logged in user**.
The created singleton object is injected into all controllers + routes.
It can be used inside routes + controllers with this.get('user').
For simple development the object is instanciated with a userFixture.
Once a proper login and api mock is in place, the fixture needs to be removed.

* Added **route 'login'** on url '/ghost/ember/signin'
* Added authenticated route with an error hook that redirects to the login route, if status 401 (unauthorized) is returned from REST API.
* All "secure" routes now extend from authenticated route
* Add /ghost/ember to noAuthNeeded routes in middleware
2014-03-12 19:26:47 +01:00
Erik Bryn
152ab286b5 Specify itemView on the each helper rather than nesting a view helper.
This avoids the creation of two views per row, which will make a big difference for large blogs.
2014-03-09 14:20:15 -07:00
Manuel Mitasch
275f623278 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
Taras Mankovski
01b49fede8 Minor refactoring of the routers:
- Moved post route under posts resource
- Changed ajax to use ic.ajax.request instead of ic.ajax.raw
2014-03-07 14:01:27 +00:00
Manuel Mitasch
a9a69fa441 Add admin prototype
issue #2270

- from https://github.com/manuelmitasch/ghost-admin-ember-demo
- Not working properly: added ic-ajax mock in app.js but promise not resolving => loading route always active
2014-03-07 14:01:26 +00:00
Taras Mankovski
988a127a3e Added directory structure 2014-02-27 07:20:30 -05:00
Harry Wolff
d456281668 Move Ember Admin to use es6 modules
- adds required dependencies to package.json
 and to bower.json
- added required Grunt tasks to transpile and
 concat ember admin files
2014-02-26 23:48:54 -05:00
Harry Wolff
8b91492830 Add basic template for Ghost admin in Ember
Inspired and derived from:

https://github.com/taras/Ghost/compare/ember-admin
https://github.com/manuelmitasch/ghost-admin-ember-demo
https://github.com/stefanpenner/ember-app-kit
2014-02-26 20:39:45 -05:00