Commit Graph

977 Commits

Author SHA1 Message Date
Gabor Javorszky
3a7be0c2fd Made ember version of reset password work
Closes #2843

* Implemnted the ember validator correctly for both reset request and actual reset (with the token)
* added reset validator
* changed the request route addresses to be `/authentication/passwordreset`
* changed the format of data to be `{ thing: [ {data } ] }`

Missing:
* notifications
* tests for these use cases
2014-06-30 14:37:49 +01:00
Sebastian Gierlinger
1c226dca60 Signin after Signup
closes #3125
- added manual authentication after signin
- added manual authentication after setup
2014-06-30 15:34:36 +02:00
Sebastian Gierlinger
9550205d33 oAuth
closes #2759
closes #3027

- added oauth2orize library for server side oAuth handling
- added ember-simple-auth library for admin oAuth handling
- added tables for client, accesstoken and refreshtoken
- implemented RFC6749 4.3 Ressouce Owner Password Credentials Grant
- updated api tests with oAuth
- removed session, authentication is now token based

Known issues:
- Restore spam prevention #3128
- Signin after Signup #3125
- Signin validation #3125

**Attention**
- oldClient doesn't work with this PR anymore, session authentication
was
removed
2014-06-30 14:58:10 +02:00
Paul Adam Davis
27e2c6a3a4 About page HTML
No issue

This is the non-functional, non-Ember markup for the [About page](https://github.com/TryGhost/Ghost-UI/issues/23) from Ghost-UI
2014-06-30 09:54:52 +01:00
David Arvelo
9f9749d123 New posts pass PostsController sorting function at the top
- PostsController orderBy function sorts posts with isNew to the top, otherwise their undefined dates fail to compare
- also catch when `updated_at` is undefined, happens when model is being written with results from the server
- catch objects of type Error in validation engine, helps catching client errors
- join server errors with BR tag in ajax util
- add `emberBuild` task to `grunt test-functional`
- add a test helper, `thenTransitionAndWaitForScreenLoad`, to test transitioning to major parts of the app
- add a test that transitions from Content to the Editor, and back to Content
2014-06-29 21:49:32 -04:00
David Arvelo
f8d1e7fe15 Fix tag updating on model save in editor controller
closes #3131
- create a hook in the editor controller that fires on a model's save events
- use this hook to perform all the things that need to happen on save, regardless of where the save originated
- remove logic from instances of model.save() that now belongs in the modelSaved hook
- detach the model event listeners on willTransition in the editor routes
2014-06-28 23:50:24 -04:00
David Arvelo
1255adfcee Calls to POST API have include=tags
closes #2998
- update PostSerializer to use DS.EmbeddedRecordsMixin
- create PostAdapter to include include=tags in query params for POST and PUT
- set include=tags for various GET post requests
- change PostModel to have { embedded: always } instead of { async: true }
- update Ember-Data to beta8 from beta7
- make call to get tags from model in editor.edit route synchronous since the tags now exist in the store
- change casper test to wait for call to posts api with `?include=tags`
2014-06-28 03:13:31 -04:00
Hannah Wolfe
47eb354a7b Ember post order matches server post order
fixes #3008

- this effectively breaks the sort order on the client, because the serverside order is marginally broken.
2014-06-27 21:57:59 +01:00
Hannah Wolfe
2fa4a00dac Merge pull request #3115 from halfdan/2850-post-notifications
Show correct post notificatons based on status.
2014-06-27 21:52:28 +01:00
Hannah Wolfe
0e99e3ad70 Merge pull request #3111 from halfdan/3105-notifications
Close notifications on user action properly.
2014-06-27 21:35:29 +01:00
John O'Nolan
1caae3a63c Merge pull request #3113 from ErisDS/issue-3106
Change text on leave modal cancel button
2014-06-27 19:00:11 +02:00
Fabian Becker
b359d4122b 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
e148a98106 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
Hannah Wolfe
5df10dad97 Change text on leave modal cancel button
issue #3106
2014-06-26 09:04:52 +01:00
Fabian Becker
a4dc5f8bee Close notifications on user action properly.
fixes #3105, refs #3012
- Add additional closeAll() calls where users interact with data
2014-06-25 16:56:09 +00:00
Hannah Wolfe
b71e99a333 Merge pull request #3108 from novaugust/touch-editor-off
Add off as a noop function to touch editor.
2014-06-25 17:06:38 +01:00
Matt Enlow
51b20d91eb Add off as a noop function to touch editor.
Closes #3107
2014-06-25 10:04:00 -06:00
Jason Williams
332a9c1a4b Stay on posts.index route when no posts exist
No Issue
2014-06-25 14:56:41 +00:00
Fabian Becker
37af382771 Allow tabbing responsive editor when not on mobile.
fixes #3095
- Add `click` event to floatingheader
2014-06-25 12:30:57 +00:00
Jason Williams
f5e05c8d9f Finish Debug screen for Ember admin
Closes #2847
2014-06-25 04:36:17 +00:00
Hannah Wolfe
5edfb8966e Set edit post shortcut to 'enter'
closes #2308
2014-06-24 23:58:43 +01:00
Hannah Wolfe
3c003a791f Merge pull request #3052 from ErisDS/issue-2851
Add error template, routes and controller
2014-06-24 23:52:29 +01:00
Hannah Wolfe
c34c7ebee9 Merge pull request #3055 from darvelo/mobile-interactions
Mobile Interactions
2014-06-24 23:52:14 +01:00
David Arvelo
54eda5c03c Mobile Interactions
closes #3018
- split clientold mobile interactions into their respective Ember routes/views
- create PostsView and SettingsView with mobile interactions
- place interactions for the publish bar into ApplicationRoute on init
2014-06-24 18:33:59 -04:00
David Arvelo
11a8391fec Implement Mobile Editor
closes #2957
- add FastClick library to Gruntfile.js
- add touch-editor to client/assets/lib/
- add mobile-specific utils to util/mobile-utils.js
- add codemirror util to set up TouchEditor only if we're really on mobile
- change gh-codemirror from having a default action to a named action. prevents Ember.TextArea firing action on change
- change gh-codemirror `cm.getDoc().getValue()` to `cm.getValue()` for portability
- change codemirror-shortcuts ES6 export/import style
- changed ghostimagepreview.js to check for Ember.touchEditor in addition to Ghost.touchEditor
2014-06-24 18:33:43 -04:00
Hannah Wolfe
96d23447ad Add error template, route and controller
closes #2851

- adds asset paths to ghostPaths as we don't have an asset helper
- sends any invalid routes to 404
2014-06-24 23:33:02 +01:00
Hannah Wolfe
968e339a1e Merge pull request #3054 from jaswilli/issue-3036-settings
Enable validation for settings/general screen
2014-06-24 23:00:56 +01:00
Hannah Wolfe
2e7c637527 Merge pull request #3066 from kevinansfield/fix-sticky-incomplete-tags
Fix incomplete tags sticking between post edits
2014-06-24 21:07:27 +01:00
Paul Adam Davis
a3a4e3960d Remove ember-hacks.css file
No issue

- Removes `ember-hacks.css` file and move some of its styles into Ghost-UI
2014-06-24 14:49:37 +01:00
Jason Williams
f4de1199d1 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
Kevin Ansfield
48f6567835 Fixes incomplete tags showing when switching to edit a different post
closes #3065
- send 'reset' action to PostTagsInputController when associated view is destroyed
2014-06-24 15:09:11 +02:00
Hannah Wolfe
61f4d90428 Merge pull request #3062 from halfdan/transition-to-route
Use transitionToRoute in controllers.
2014-06-24 13:46:18 +01:00
Hannah Wolfe
ffa4d4933d Merge pull request #3059 from PaulAdamDavis/1558-notifications-ui
Prevent notifications from being too tall and unclosable
2014-06-24 13:46:11 +01:00
Hannah Wolfe
e8d30fd35e Merge pull request #3058 from halfdan/3012-close-notifications
Close notifications on transition or user action.
2014-06-24 13:45:51 +01:00
Paul Adam Davis
a188f96715 Prevent notifications from being too tall and unclosable
Closes #1558

- Adds a wrapping tag around the notification message
- Change tests to look for new wrapping tag

For the fix to work properly, it needs styles from the [0.8 branch](b98029911c) of Ghost-UI
2014-06-24 13:30:33 +01:00
Hannah Wolfe
3d18c6f3c5 Merge pull request #3005 from kevinansfield/ensure-incomplete-tags-arent-lost
Ensure incomplete tags aren't lost on save
2014-06-24 13:19:22 +01:00
Fabian Becker
644991351b Use transitionToRoute in controllers.
refs #3051
2014-06-24 13:52:55 +02:00
Fabian Becker
989d19837e 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
Hannah Wolfe
9e8d902d0a Uncomment signin validation test + test cleanup
closes #2989

- classing this as finishing the casper tests for now
- adding a name to the description in the settings template
2014-06-24 12:17:40 +01:00
Kevin Ansfield
07e18dac86 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
Hannah Wolfe
38fa7c42f1 Merge pull request #3051 from jgable/loginValidation
Add validation for signin/signup
2014-06-24 09:48:33 +01:00
Hannah Wolfe
a3cd63bd1f Merge pull request #3053 from jgable/fix3016
Close modals on escape
2014-06-24 04:05:40 +01:00
Jacob Gable
2242d8b564 Close modals on escape
Closes #3016

- Disconnect modal outlet on escape key in closePopups action handler
2014-06-23 21:57:52 -05:00
Jacob Gable
ab97c8c861 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
6b068ac4f5 Ember admin works with subdirectory
fixes #3047
2014-06-24 03:14:28 +01:00
Hannah Wolfe
1fe9238dd6 Setting Ghost logo to correct URL 2014-06-24 00:24:13 +01:00
Hannah Wolfe
8636d2f2e9 Merge pull request #3045 from ErisDS/issue-2956
Add fileStorage config to frontend
2014-06-24 00:00:59 +01:00
Hannah Wolfe
b904729576 Add fileStorage config to frontend
closes #2956

- adds fileStorage to config passed to ember, and then grabs it in the relevant places.
2014-06-23 23:33:14 +01:00
Hannah Wolfe
9c9c81697b Update shortcut for zen mode
closes #2988

- includes tests
2014-06-23 22:24:28 +01:00
Hannah Wolfe
d943651a16 Merge pull request #3042 from halfdan/3040-trim-title
Trim title in editor on blue/focusOut
2014-06-23 22:16:13 +01:00
Hannah Wolfe
5d14267375 Merge pull request #3044 from halfdan/3035-character-count
Implements character count helper.
2014-06-23 22:14:15 +01:00
Hannah Wolfe
c318b99c6b Merge pull request #3043 from jaswilli/initializers
Switch Ember initializers to public API methods
2014-06-23 21:43:04 +01:00
Hannah Wolfe
52340936ad Merge pull request #3041 from ErisDS/issue-3031
Hide settings/apps unless apps:true is in config.js
2014-06-23 21:42:10 +01:00
Fabian Becker
8ab1ed1f13 Trim title in editor on blue/focusOut
closes #3040, fixes #3038
- Properly trim title
- Re-add casper test/adjust where necessary
- Rename gh-focus-input component
2014-06-23 20:07:34 +00:00
Fabian Becker
de53f09f79 Implements character count helper.
closes #3035
- New character count helper
- Re-add casper test for bio count
- Change settings.general and settings.user to show character count
2014-06-23 20:02:09 +00:00
Hannah Wolfe
725e00442d Hide settings/apps unless apps:true is in config.js
fixes #3031

- Adds an initializer for passing config to the frontend, it's not pretty but it works
- Forwards the apps route and hides the apps menu item if apps:true is not present in config.js
2014-06-23 20:27:51 +01:00
Jason Williams
e2bfc04737 Switch Ember initializers to public API methods 2014-06-23 18:35:39 +00:00
Matt Enlow
3cae5a55dd Better editor entry
Ref #2308

- Double clicking a PostItemView on the content screen will open that post
  in the editor.
- Added `'ctrl+e, command+e': 'openEditor'` shortcut will open editor as well
2014-06-23 10:15:06 -06:00
Hannah Wolfe
bcc135360c Merge pull request #3014 from ErisDS/issue-3013
Check for undefined model
2014-06-23 16:31:10 +01:00
Hannah Wolfe
13053ff321 Merge pull request #3039 from halfdan/3038-focus-title
Focus title in editor when opening page.
2014-06-23 16:13:27 +01:00
Hannah Wolfe
3b5c0a474c Merge pull request #3034 from ErisDS/more-tests
Adding more tests for settings
2014-06-23 16:13:13 +01:00
Hannah Wolfe
b0e556d304 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
Hannah Wolfe
999aea27e5 Adding more ember admin tests
- improving the implementation of thenOpenAndWaitForPageLoad
- adding a class into the settings templates to more easily test which pane we are on
- adding more, and updating more of the settings tests
- added the editor tests
2014-06-23 15:53:31 +01:00
Fabian Becker
3fcbe15168 Focus title in editor when opening page.
closes #3038
- Adds new gh-focus-input component
- Uses new component in editor
2014-06-23 16:28:34 +02:00
Maurice Williams
2afc1ff04f 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
bc2e4d8ebd Fix warning about transitionTo being deprecated 2014-06-23 12:14:41 +01:00
Hannah Wolfe
18b85d96ab Merge pull request #3033 from halfdan/fix-word-count
Fix word count in ember.
2014-06-23 12:11:19 +01:00
Hannah Wolfe
d6914e26c5 Merge pull request #3023 from darvelo/promise-rejection
Fix promise rejection during validation
2014-06-23 11:45:04 +01:00
Fabian Becker
a3191eee8d Fix word count in ember. 2014-06-22 19:33:44 +00:00
David Arvelo
1f9751f753 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
Hannah Wolfe
42c9a272a7 Merge pull request #3022 from novaugust/codemirror-shortcuts
Implement Markdown Shortcuts
2014-06-22 10:42:37 +01:00
Hannah Wolfe
dcf2f88d57 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
ce302a2591 Merge pull request #2967 from szelpe/settings-apps
Ported settings/apps logic to Ember.
2014-06-22 09:04:14 +01:00
David Arvelo
4faa35e9bf 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
52118c16e3 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
aa9dfd97d1 Removing unneeded file 2014-06-21 18:45:01 +01:00
Hannah Wolfe
1256c3c2fe Merge pull request #3011 from darvelo/validations
Add Validations Layer and Post Validations
2014-06-21 17:41:28 +01:00
Hannah Wolfe
44f3adc85c 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
700e9644e2 Merge pull request #3002 from novaugust/shortcuts
Implement Shortcuts in Ember
2014-06-21 15:15:50 +01:00
David Arvelo
af47f88648 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
c6dc8c0eea 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
bdbafc1831 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
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
Matt Enlow
71bee2fd46 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
2dd5c5218a 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
7b241a302a Fixing typo in navbar 2014-06-19 10:08:55 +01:00
Paul Adam Davis
b24926c87c Temporary HTML for the User Management screen & Setup screen 2014-06-18 14:00:47 +01:00
Hannah Wolfe
04fd16ad7a 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
15a2b9f167 Merge pull request #2985 from novaugust/featured-and-page-cleanup
Cleanup PostItemView code
2014-06-17 23:27:46 +01:00
Hannah Wolfe
6bc99ecaf8 Merge pull request #2897 from lholmquist/modal_uploader
Modal Uploader
2014-06-17 23:22:26 +01:00
David Arvelo
7658cd2ee8 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
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
Hannah Wolfe
32fc61686f Merge pull request #2981 from jaswilli/fix-observer
Fix removeObserver for title property
2014-06-17 21:56:08 +01:00
Lucas Holmquist
833699bbb4 Ember Admin - Upload Modal
Issue #2547
2014-06-17 16:18:32 -04:00
Hannah Wolfe
2bd3a77fa7 Merge pull request #2972 from halfdan/2748-featured-post
Implement featured post / page
2014-06-17 20:58:25 +01:00
Hannah Wolfe
b21948ded5 Merge pull request #2975 from jaswilli/csrf
Fix csrfSecret handling
2014-06-17 20:16:26 +01:00
Jason Williams
38df3972c7 Fix removeObserver for title property 2014-06-17 15:47:03 +00:00
Jason Williams
7bc4d9f455 Show notification on successful sign out
Closes #2977
2014-06-16 22:54:21 +00:00
Jason Williams
d9a21c8d0c 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
6a49b95980 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
6deb206e84 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
a7daeecbf2 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
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
Hannah Wolfe
683568892c Ember: jshint single quotes
- also remove .jshintrc from releases
2014-06-02 20:12:02 +01:00
Hannah Wolfe
1c269d0dbc Merge pull request #2864 from lholmquist/jshint_separate
Move jshint logic out of Gruntfile.js and into .jshintrc files
2014-06-02 19:56:07 +01:00
Hannah Wolfe
a94e00bd41 Ember: correcting code style 2014-06-02 19:55:37 +01:00
Lucas Holmquist
157523cd00 Move jshint logic out of Gruntfile.js and into .jshintrc files 2014-06-02 10:55:49 -04:00
Hannah Wolfe
78088820d6 Ember cleanup: single quotes for JS
- All JS should use single quotes
2014-06-01 21:53:16 +01: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
Jason Williams
832340e4c8 Use new slug endpoint in ember admin
Closes #2831
-use new slug endpoint in fixture
-use new slug endpoint in post model
-do not try to generate slug for zero length titles
2014-05-29 15:31:02 +00: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
41ceea1c16 Merge pull request #2807 from novaugust/ember-user-cover-default
Fix default user cover on ember settings pane
2014-05-25 16:48:15 +03: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
Hannah Wolfe
4946223ec6 Merge pull request #2804 from novaugust/ember-settings-currently-active-pane
Add active class to settings tabs
2014-05-25 16:03:25 +03:00
Steve
f4c3406545 Update ember post fixture data.
closes #2803
- corrected status published string
- corrected page to not use invalid choices
- updated id integer to start at 1 and not 0
- updated to repeat 31, added a note about removing post id:0
2014-05-24 11:14:33 -07:00
Matt Enlow
cc12fb701c Fix default user cover on settings pane
Closes #2806
- Ensures that the user's cover property is a string, otherwise uses the
  default cover.
2014-05-24 08:43:53 -06: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
Hannah Wolfe
c6d037b595 Merge pull request #2795 from appleYaks/fix-editor-scroll
fix mirrored scrolling in markdown editor
2014-05-24 09:43:12 +03:00
Hannah Wolfe
a2caaf193d Merge pull request #2780 from jgable/ember-signup
Implement signup in Ember
2014-05-24 09:29:39 +03:00
Jacob Gable
edfbfd7336 Add ghostPaths util and initializer
No Issue

- Move the ghostPaths from base model to utils
- Add initializer that injects it into every route, model and controller
- Add a adminUrl and apiUrl helper method
2014-05-24 08:52:47 +02: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
David Arvelo
1ce2a12818 fix mirrored scrolling in markdown editor
issue #2426
- ember markdown component now looks for preview element as a DOM ancestor rather than a descendent
2014-05-22 18:35:43 -04:00
Hannah Wolfe
d0e70501fb Merge pull request #2782 from morficus/master
updating fixtures for posts data
2014-05-20 21:02:04 +03:00
Maurice Williams
1e1e247c2a Modifying "posts" fixture to match the new API data structure
closes #2415
- data now match the new Posts API data structure
- has enough entries to allow for scrolling
- also including the generator template (as a txt file) used in json-generator.com
2014-05-20 09:37:31 -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
72603b8a2c Merge pull request #2771 from halfdan/2741-trailing-slashes
Correct behaviour for trailing slashes
2014-05-17 20:27:58 +01:00
Hannah Wolfe
31949952d6 Merge pull request #2765 from novaugust/ember-content-redirect
Add /content redirect to Ember admin.
2014-05-17 20:24:10 +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
Matt Enlow
8c2987cf01 Add /content redirect to Ember admin.
Closes #2746
- Adds content route to router
- Content route transitions to posts route in the beforeModel hook.
2014-05-15 18:52:10 -06:00
Fabian Becker
db4994e954 Correct behaviour for trailing slashes
fixes #2741
- Extend HistoryLocation
- Add trailing slash to path
2014-05-15 22:28:05 +00: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
Hannah Wolfe
95d4732aef Adding READMEs to clarify the 2 client folders
- seemed like  a good idea.
2014-05-07 22:51:51 +01:00
Hannah Wolfe
70f7161d4b Merge branch 'ember'
Conflicts:
	Gruntfile.js
	core/client/models/post.js
	core/client/models/settings.js
	core/client/models/user.js
	core/client/router.js
	package.json
2014-05-07 22:28:29 +01: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
Fabian Becker
6647b57164 Move to new API format for Settings.
refs #2606
- Use new API format when updating settings from the client side
- Add additional test to test new API format
- Adjust functional tests to work with the new format
2014-05-06 19:02:55 +00:00
Sebastian Gierlinger
fc667832c3 Change error message response
closes #2643
- added error type
- added error property for validations
- wrapped errors in an array
- returns multiple errors for validation
- updated tests and admin
2014-05-05 15:51:21 +02:00
Hannah Wolfe
2d95159a6f Move user API to primary document format
closes #2593

- added new format to user API methods
- changed all places where the user api was used
- updated tests and added more coverage
- little bit of cleanup in utils/api
2014-05-02 20:50:44 +01:00
Hannah Wolfe
21acce5391 Merge pull request #2661 from jgable/settingsPrimaryDocument
Settings API Primary Document refactor
2014-05-02 15:55:31 +01:00
Jarrod Mosen
761bb3d55d Improving uploader "too big" error to help with debug
#994
2014-05-02 08:35:49 +12:00
Jacob Gable
fd415c376a Settings API Primary Document refactor
Closes #2606

- Refactor settings api responses to { settings: [ ] } format
- Update all code using api.settings to handle new response format
- Update test stubs to return new format
- Update client site settings model to parse new format into one object of key/value pairs
- Refactor to include all setting values
- Remove unused settingsCollection method
- Update settingsCache to store all attributes
- Update settingsResult to send all attributes
- Remove unnecessary when() wraps
- Reject if editing a setting that doesn't exist
- Reject earlier if setting key is empty
- Update tests with new error messages
- Use setting.add instead of edit that was incorrectly adding
- Update importer to properly import activePlugins and installedPlugins
- Update expected setting result fields
- Fix a weird situation where hasOwnProperty didn't exist 🤷
2014-04-30 23:15:27 -05:00
Sebastian Gierlinger
254b6618f3 Add include parameter for posts API
closes #2609
- added include parameter to api.posts.*
- changed toJSON to omit objects that are not included
- added include parameter to admin
- added include parameter to frontend.js
- updated tests
- removed duplicate code from posts model

**Known Issue:** It is not possible to attach a tag using an ID.
2014-04-27 18:58:34 +02:00
shindakun
8d2cf655c2 Correct link shortcut so that it inserts, selects text or moves cursor properly
Closes #2614
 - Determine proper place for selection, or simply move the cursor.
 - When no text is selected insert link markdown and move cursor to a into the [].
 - When text is selected insert link markdown and move selection to http:// so URL can be pasted.
2014-04-21 14:55:12 -07:00
Hannah Wolfe
330f4c943d Update & grunt-groc and fix docs errors
issue #2622

- Updated grunt-groc to 0.4.5
- Fixed the few places which made the docs fail to generate
- There is still a mix of styles
2014-04-21 19:04:20 +01:00
Hannah Wolfe
9db24568e9 Merge pull request #2551 from szelpe/email-test
[API] Added email sending endpoint to the API.
2014-04-21 18:41:08 +02:00
Jacob Gable
5ddfe279f1 Tag API: Primary Document Format
Closes #2605

- Change tags browse() response to { tags: [...] }
- Update client side collection to use nested tags document
- Update test references to use response.tags
2014-04-20 19:48:59 -05: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
Sebastian Gierlinger
52197d3a38 Post response move pagination -> meta
closes #2604
- moved ‚pagination‘ to ‚meta‘ property
- added response test for pagination property
- changed ‚next‘ and ‚prev‘ to be set to null and exist on every
response
- removed unnecessary call to API for RSS author
2014-04-19 17:03:20 +02: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
Sebastian Gierlinger
ff5ae21a9e Move post API to primary document format
closes #2580
- added new format to post API methods
- added post object parsing and wrapping to admin
- removed unused ‚user‘ object from API response
- updated tests
2014-04-16 12:09:03 +02:00
Jason Williams
901d1b1f8c Set user profile website field to type url
closes #2588
2014-04-14 16:22:14 +00:00
Jason Williams
3dbd11994c Set input field types to match expected input values
ref #2588
- Change name field in User Profile to be type text
- Change website field in User Profile to be type url
2014-04-14 16:18:17 +00:00
Peter Szel
91a0c7c666 Added email sending endpoint to the API.
closes #2550

- Added new API module named 'mail'
- Added routes for the mail endpoint
- Added 'send a test email' button to the debug settigns page
- Added handler to this button which sends and AJAX request to the mail API endpoint
2014-04-09 23:56:21 +02:00
Renyu Liu
61db2dc335 OSX shortcut fix.
closes #2573
- separate different shortcuts by OS detection in markdownEditor.js
2014-04-09 09:31:38 +08: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
Sebastian Gierlinger
12b8014441 Remove second PUT request on image save
closes #2557
- replaced model.save() with model.set()
2014-04-06 17:46:04 +02: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
Hannah Wolfe
878e31f56c Merge pull request #2439 from sebgie/move-slug
Rename getSlug to slug
2014-03-28 17:12:55 +00:00
Hannah Wolfe
e9fb7ae044 Merge pull request #2496 from halfdan/more-tag-fuddling
Escape regex special characters in tag finder
2014-03-24 20:20:51 +00:00
Fabian Becker
8e6d484ada Escape regex special characters in tag finder
refs #2149
- Properly highlight tags with special characters ($,[,],^,etc.)
2014-03-24 12:09:15 +00:00
Fabian Becker
8881656c26 Prevent adding duplicate tags with different casing
fixes #2478
- Check for existing tags with different case
2014-03-24 11:43:18 +01: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
cobbspur
dbf6da54e8 clears notifications on clicking featured icon
closes #2479

- adds a cleareverything command to toggleFeatured in blog.js to stop stacking of notifications on multiple clicks of featured icon
2014-03-23 17:24:27 +00:00
Lucas Churchill
f4f4dc08e3 Adding event preventDefault on toggleFeatured function 2014-03-23 00:27:53 -03:00
Hannah Wolfe
a9d239f5f1 Merge pull request #2150 from halfdan/2149-tag-display
Properly display escaped tags in tag editor.
2014-03-20 19:01:47 +00:00
Hannah Wolfe
2393042c76 Improving the showdown extensions
fixes #2381

- renamed the ghost extensions
- added new html tests
2014-03-20 17:08:13 +00:00
Fabian Becker
badd4a0655 Properly display escaped tags in editor.
fixes #2149, fixes #2453
- Escape tag before displaying in editor tag widget
2014-03-20 15:49:08 +01:00
Hannah Wolfe
4c3bb83df0 Removing typography extension
issue #2312

- The typography extension is still interfering in HTML blocks, reference style links and other bits and pieces it probably shouldn't be :(
- We'll add it back when it's ready.
2014-03-20 13:22:28 +00:00
Hannah Wolfe
88818104e9 Merge pull request #2405 from nicksahler/master
Fixed modal inconsistent fade problem
2014-03-19 16:15:14 +00:00
nicksahler
e4ff9643a9 Fixes modal fading inconsistency problem by disabling jQuery's
transition and allowing CSS to do its thing

closes #2400
- Removed fadeIn, jQuery's animation
- Added show(), which only manages display, giving transitions to CSS
2014-03-19 08:07:49 -04:00
Hannah Wolfe
db66e7ab21 Merge pull request #2438 from ErisDS/cm-mobile
Add shim for codemirror on touchscreens
2014-03-19 09:59:21 +00:00
Hannah Wolfe
dac8eac101 Add shim for codemirror on touchscreens
fixes #2385

- stolen the CM shim from js-bin
- if we're on a touchscreen device, don't use CM
- if we're on a touchscreen device, show a coming soon message for uploads
2014-03-19 09:26:45 +00:00
Hannah Wolfe
c4d2263a6a Merge pull request #2437 from ErisDS/cm-scroll
Force preview to scroll to the end
2014-03-19 08:24:45 +00:00
Hannah Wolfe
8b6a37dd69 Merge pull request #2428 from Decad/master
Fix scoping issue on signup
2014-03-18 22:24:16 +00:00
Sebastian Gierlinger
b13b5a925b Rename getSlug to slug
another 2 % of #2124
- renamed `/ghost/api/v0.1/posts/getSlug/ to
`/ghost/api/v0.1/posts/slug/`
- renamed method getSlug to generateSlug
2014-03-18 14:00:33 +01:00
Hannah Wolfe
72b4e3bf4d Force preview to scroll to the end
fixes #958, fixes #535

- If the cursor is within the last 5 lines, then scroll to the end of the preview window, rather than using a ratio
2014-03-17 23:23:55 +00:00
Hannah Wolfe
545fc6e911 Fix undo bug
issue #2436
2014-03-17 23:06:15 +00:00
Hannah Wolfe
c0c5058eea Upgrade CodeMirror
closes #2108

- upgrade to 4.0.1
- requires removing the deprecated setLine method
2014-03-17 23:06:14 +00:00