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

350 commits

Author SHA1 Message Date
Jakob Gillich
b1b340fefb Add Customisable Permalinks 2013-11-23 17:02:17 +01:00
Jacob Gable
41eff2c4db Improved Password Reset Tool
Closes #1471

- add api and User model methods for generating and validating tokens
- add routes and handlers for reset password pages
- add client styles and views for reset password form
- some basic integration tests for User model methods
2013-11-22 10:46:19 -06:00
Hannah Wolfe
69b78c7729 Merge pull request #1353 from thgaskell/1350-static-page-checkbox
Allow user to set static page before saving
2013-11-19 03:29:35 -08:00
Hannah Wolfe
4723a8c4ad Merge pull request #1440 from JohnONolan/post-settings
Post settings refactor
2013-11-12 03:50:56 -08:00
Jacob Gable
02abfe2fea Allow published_at times to be specified
Fixes #907

- Modified the PostSettings view to use moment.js formats that include hours and minutes
- Add 12:00 to value if it is not specified
2013-11-11 14:43:47 -06:00
Hannah Wolfe
1f76a04ec9 Preventing incorrectly shown unload alert
issue #1327

- IE9 fires an unload when using Backbone.history.navigate which meant the alert always got shown on first save when the url changes from from /editor/ to /editor/id. Not sure if other browsers do this, but this workaround fixes it
2013-11-11 09:36:29 +00:00
Hannah Wolfe
4932ae5ae1 Moving dirty editor handling out of uploadMgr
issue #1327

- just moved to be in editor obj, everything else is the same
2013-11-11 09:14:18 +00:00
Zach Geis
d93952b97e Displays alert if editor is dirty before unload
closes #1327
- Prevents user from accidently losing changes
2013-11-11 09:00:15 +00:00
John O'Nolan
2dea1445e1 Kill iCheck cause Hannah says it has genital warts. 2013-11-08 14:38:23 +01:00
Fabian Becker
680f7f40bf Properly format publish date.
fixes #1335
2013-11-05 17:44:13 +00:00
Hannah Wolfe
1bbf2827e6 Merge pull request #1345 from halfdan/944-crazy-notifications
Fix notification stacking.
2013-11-01 09:00:56 -07:00
Ben Gladwell
5fb9a02eee Remove unparam:true from jslint config in Gruntfile.js
issue #1365
- added /*jslint unparam:true*/ to functions where absolutely necessary
- added /*jslint unparam:true*/ to functions in which keeping parameter
  list added clarity to the underlying api, even when those parameters
  are not currently used
- removed unused parameters in a few places
2013-10-31 14:02:34 -04:00
Tony Gaskell
7920047adb Allow user to set static page before saving
fixes #1350
- jQuery event.preventDefault() stops the user from selecting the checkbox
2013-10-30 02:33:58 -10:00
Fabian Becker
c6e3427d03 Fix notification stacking.
fixes #944
2013-10-30 01:24:21 +00:00
Fabian Becker
69705e97c6 Allow user to mark a post as static page
- Increased post-settings width to properly display "Static Page"
- Changed templates to display "Static Page" if set
- Added unit test for body_class helper

fixes #969
2013-10-28 22:01:03 +00:00
Fabian Becker
4db87cc6bf Prevent default drag/drop action. 2013-10-25 20:19:51 +00:00
Hannah Wolfe
779c253241 Merge pull request #1122 from gotdibbs/Issue814
Simplify publish date checks
2013-10-24 10:53:55 -07:00
Hannah Wolfe
ea689a80e6 Merge pull request #1258 from gotdibbs/Issue1242
Fix duplication of entries in infinite scroll
2013-10-24 08:17:41 -07:00
Hannah Wolfe
9ecbae2883 Merge pull request #1251 from sebgie/api-refactor-move
Move /api to /ghost/api
2013-10-24 07:52:49 -07:00
Hannah Wolfe
3199524833 Merge pull request #1245 from StevenMcD/issue/1007
Issue/1007: Corrected the behaviour of the HOME and END keys on the Code...
2013-10-24 07:24:41 -07:00
Matt DuVall
4a4618baf9 Allow only images to be uploaded in the upload modal
Fixes #1221

- This changes the accepted encodings on the files upload input field to
  be only "image/*" now
-
2013-10-24 14:37:08 +01:00
Sebastian Gierlinger
030bd29b22 Move /api to /ghost/api
closes #1249
- changed routes
- changed apiRoots
2013-10-24 14:50:17 +02:00
William Dibbern
3c15b7c2b1 Fix duplication of entries in infinite scroll
Fixes #1242

- Switched to render each new item as its added to the collection when
retrieving via scroll checks.
- Added check to remove all subviews whenever `render` is called on
`ContentList` as a preventative measure.
- Cached the jquery reference to the ordered list in `render`.
2013-10-24 01:19:09 -05:00
StevenMcD
c3b8f6784a Issue/1007: Corrected the behaviour of the HOME and END keys on the CodeMirror editor by overriding their calls in the extraKeys config of the editor 2013-10-23 15:56:53 +02:00
Enrique Chavez
bd7f83f284 Validate negative numbers in the posts per page setting
issue #1236
- added validation to not allow number less than 0
2013-10-22 23:15:38 +01:00
Hannah Wolfe
97ae13c365 Merge pull request #1119 from halfdan/featured-post-button
Posts can now be featured by clicking on the star icon
2013-10-22 12:38:43 -07:00
Hannah Wolfe
fd4f2b9bc3 Merge pull request #1051 from nason/settingsResetOnImageUpload
Fixes #1017. Save all settings when the logo or cover is saved
2013-10-22 09:05:38 -07:00
Hannah Wolfe
6b1e94fd44 Merge branch '0.3.3-wip'
Conflicts:
	core/client/views/blog.js
	core/server/api.js
	core/server/views/default.hbs
	package.json
2013-10-20 10:09:39 +01:00
Hannah Wolfe
749e9ba677 Fixing URL-based image uploads on settings screen 2013-10-17 21:54:51 +01:00
Hannah Wolfe
e56ed30284 Fixes for content screen
fixes #1125

- fixes an error in the console when there are no posts
- resolves the issue whereby content disappears after scroll
2013-10-17 21:06:01 +01:00
Sebastian Gierlinger
c9599362ba Security improvements
no issue
- added CSRF protection
- changed session handling to express.session
- changed session handling to change session id
- added config property useCookieSession
- added file extension check for /ghost/upload
- removed /ghost/debug/db/reset
2013-10-17 15:28:28 +02:00
Fabian Becker
3886286d3f Posts can now be featured by clicking on the star icon
fixes #1111
2013-10-16 19:06:03 +00:00
William Dibbern
4fef292908 Simplify publish date checks
Fixes #814

- Changed to compare instances of `moment` using it's built in
comparison function instead of string compare with the date from the
database.
- Ensure compared date is parsed with the correct formats that we were
supporting before #1107.
- Moved date formats to variables to reduce chance for error in future.
2013-10-16 11:32:20 -05:00
Michael Nason
78d6f5c500 Save all settings when the logo or cover save button is clicked.
Fixes #1017.
- Call saveSettings for cover and blog logo photos
- Call saveUser for profile and profile cover photos
2013-10-16 08:39:24 -07:00
Karolis Dzeja
0ebb882a5b Fix notification bug
The date stored in the model is in a different format and needs to be converted before being checked. Otherwise, any blur event will trigger the notification that the date has been changed, even if the date is the same.
2013-10-16 00:30:25 -05:00
buddhamagnet
2ac4704753 Cache selector in afterRender function
- cache selector in a variable to prevent recomputing it in the function.
2013-10-14 20:56:20 +01:00
Hannah Wolfe
e1da1c46ae Merge branch '0.3.2-wip'
Conflicts:
	core/client/assets/lib/uploader.js
2013-10-11 20:56:15 +01:00
cobbspur
e94ff0494f fixed image upload url synchronicity and url removed on cancel
closes #988, closes #956, closes #975

- fixed multiple ids and refactored triggers
- persistence requirement overridden
- trash can now removes url in editor
- if empty url is saved http:// is inserted and dropzone initialized

Conflicts:
	core/client/assets/lib/uploader.js
2013-10-11 18:15:17 +01:00
Hannah Wolfe
bbd92be61b Merge branch '0.3.2-wip'
Conflicts:
	core/test/unit/api_posts_spec.js
2013-10-10 16:37:35 +01:00
Hannah Wolfe
58edf713bc Merge pull request #925 from matthojo/New-line
Added new paragraph keyboard shortcut
2013-10-09 11:32:43 -07:00
Hannah Wolfe
85267d2394 Swapping escape to sanitze
issue #938

- rather than using escape, use node-validatiors santize function which is designed for preventing xss vectors
- added listener for changes to both editor and settings page
- added more sanitization to the user model
- consistently use triple-braces when outputting blog post titles
2013-10-09 19:13:16 +01:00
Matthew Harrison-Jones
1399633b4c Added in functionality for a working loading bar 2013-10-08 16:39:07 +01:00
Hannah Wolfe
3f70ba89a0 Merge pull request #954 from jgable/fixChangePasswordEnter
Fix pressing enter key on user settings
2013-10-05 12:25:26 -07:00
Hannah Wolfe
225a6c8a35 Merge pull request #918 from gotdibbs/Issue877
Fix a couple of issues when there are no posts
2013-10-03 07:40:11 -07:00
Sebastian Gierlinger
44fc396f6a Disable filestorage
closes #937
- fixed bug where ![] is replaced with ![](http://) for image url
- added fileStorage setting to uploader
- added fileStorage helper (could become standard way of providing config data for frontend???)
- added data element to editor and settings
- if no config value is set fileStorage: true is default
2013-10-02 11:39:34 +02:00
Jacob Gable
edee068e8e Fix pressing enter key on user settings
Specified type='button' for the buttons in the form so they don't get
pseudo clicked on enter key in inputs.  Added a keyup handler to check
for enter keys in the inputs and do the proper action based on where you
are in the form.
2013-10-01 10:05:12 -05:00
Matthew Harrison-Jones
0a85908482 Added new paragraph keyboard shortcut
`Ctrl / Cmd + Enter` now enters a new paragraph, but only if the user is not on a new line.
2013-09-27 14:41:38 +01:00
William Dibbern
c00c61e266 Fix couple of issues when there are no posts
Fixes #877

- Updated the blog/content view to check `collection.length` before
attempting to pull another record.
- In the event an item is removed and the collection now has zero items,
still redraw the preview pane, just with no data.
2013-09-26 23:44:01 -05:00
Hannah Wolfe
f820afbd19 Treat markdown as text in editor
closes #857

- markdown is inserted into codemirror with .text() not .html()
2013-09-26 21:06:52 +01:00
Hannah Wolfe
0400469076 Correct validation message for short passwords
closes #833
2013-09-19 08:41:04 +01:00
Hannah Wolfe
9e88aaa0e6 Client & Server side validation for posts per page
closes #839

- caused a 500 error
2013-09-19 07:55:37 +01:00
William Dibbern
343ffb2915 Expanded spelling of chars to characters
Fixes #834

- Updated error message for password length to use "characters" instead
of "chars".
2013-09-18 21:51:56 -05:00
Hannah Wolfe
e6b38bfcc1 Fixing tag save event
- lost in a bad merge somewhere
2013-09-18 20:04:39 +01:00
Hannah Wolfe
ec7ceb3729 Default user image and cover
closes #812

- replace defaults with consistently named .png files
- change the settings saving code so that it doesn't double-save images and save the defaults to the db
2013-09-18 15:54:52 +01:00
Hannah Wolfe
9ebfebf31c Clear notifications before adding new ones
closes #783

 - I think there's probably a nicer solution than putting clearEverything() everywhere, but that would also probably involve significant refactoring.
2013-09-18 02:48:38 +01:00
John O'Nolan
cf842b01ec Throttle scrolling. LIKE A BAWS.
See #481
2013-09-18 02:09:21 +01:00
Hannah Wolfe
cfe63e7793 Post settings menu success notifications
closes #786
2013-09-18 01:46:10 +01:00
ericterpstra
e4db88351c Set post-settings date to 12:00 2013-09-17 18:54:01 -05:00
Hannah Wolfe
5a1b7c72f0 Editor notification cleanup
closes #666

- no more split messaging
2013-09-17 21:35:30 +01:00
James Inman
5800956c5d Notification cleanup
Closes #666.

* Adding new error notifications (removed post name, cleaned up statuses) when creating/updating a post
* Removing scheduled from the maps and changing the text of publish-on
* Made temporary "Scheduled publishing is not supported yet." message display in a proper error container, plus a slight grammar fix.
* Removed ; from the start of validation errors on post error, as the previous sentence finishes with a .
2013-09-17 21:19:07 +01:00
Matthew Harrison-Jones
c6d77a495c Complete Modal Refactor
* Smoother animations
* Removed blurring in Chrome temporarily
* Centering is now done in CSS (the height is calculated in JS to work in FF and Opera)
* Modals now need close: true to be set to enable the close icon and shortcuts for closing (ESC key, background clicking)
2013-09-17 20:40:19 +01:00
cobbspur
4d51400d69 Added url functionality for image uploads
closes #701, closes #702

- if image upload is called from editor the url icon provides a text field and a save button
- if on settings pages (general and user) the save button will capture the entered url or uploaded url
- both modes have the reset button
- fixed bug that is created by url when image is dragged onto window
2013-09-17 19:15:32 +01:00
Hannah Wolfe
92472b96a5 Post settings menu tweaks
closes #782, #783

- delete button hidden until ID
- publish date works before publish
2013-09-17 11:51:24 +01:00
Hannah Wolfe
16e41c9469 Post settings gets published_at
closes #773

- listen for change events on published_at
- change all listeners in views to use this.listenTo
2013-09-17 10:26:28 +01:00
William Dibbern
6689097981 Ability to spawn multiple notifications
Fixes #696

- Updated notifications logic to deal directly with the individual
notification, rather than the notification container.
2013-09-16 22:43:18 -05:00
cobbspur
7404952abb Adds slashes to urls
ref issue #448

- adds slashes to urls, templates and tests

TODO

Add function to add slash to urls automatically
2013-09-17 02:39:55 +01:00
Hannah Wolfe
624270e1c0 Save image uploads in the editor
closes #295

- Maintain a list of markers for CodeMirror which reference image codes
- Upload start triggers a selection
- Upload success replaces the selection
- No ref-style image markdown handling
- Showdown image URL handling improved at the expense of titles
- Tests updated
2013-09-16 18:08:49 +01:00
Hannah Wolfe
b92e694254 Merge pull request #764 from matthojo/Flash-Bar
Renamed the notifications container
2013-09-16 06:07:55 -07:00
Hannah Wolfe
203ee2bbf0 Merge pull request #710 from matthojo/Mobile-Tags
Improved Post tagging on Mobile devices
2013-09-16 02:34:28 -07:00
Matthew Harrison-Jones
59d1a38b7f Renamed the notifications container
Renamed from `#flashbar` to `#notifications`
2013-09-16 09:46:29 +01:00
Hannah Wolfe
eb258e7e05 Merge pull request #763 from sebgie/issue#600
Improve error message
2013-09-16 01:32:53 -07:00
Sebastian Gierlinger
43df167ca1 Improve error message
closes #600
- replaced '?' with 'Server was not available'
- added request.statusText
2013-09-16 10:16:42 +02:00
Hannah Wolfe
7a44f79f0d Merge pull request #762 from ericterpstra/402-pub-date
Enabled post setting to change published date
2013-09-16 01:10:33 -07:00
Matthew Harrison-Jones
df8edae755 Bug Fix: Clicking on a Tag on the Mobile Tag view screen will no longer shrink the view 2013-09-16 08:59:10 +01:00
Matthew Harrison-Jones
23a80e36bd Bug Fixes: Tags no longer overlap 'settings' icon and scroll bars have been removed 2013-09-16 08:34:38 +01:00
Matthew Harrison-Jones
4a6a09455a Improved Post tagging on non Mobile devices 2013-09-16 08:34:38 +01:00
Matthew Harrison-Jones
c17d5ff8d9 Improved Post tagging on Mobile devices 2013-09-16 08:34:38 +01:00
ericterpstra
8e8270f289 Enabled post setting to change published date
closes #402
2013-09-15 22:19:53 -05:00
William Dibbern
b77d09173a Infinite Scroll Pagination for content screen
Fixes #258

- Modified post collection to have default values for paging.
- Added scroll handler to content view to check for more posts and load
as appropriate.
- Sanitized result from server-side post paging, ensure page # is
returned as an integer.
- Added a functional test stub.
2013-09-15 18:34:23 -05:00
William Dibbern
85c8190fbd Publish button amendments
Fixes #667

- Removed superfluous as-of-yet-unused options in the publish menu.
- Adjusted display names of publish buttons according to differing
states the publish menu can be in (new post, saved draft, published
post).
- Added red highlight style to "important" status change options in the
publish menu (draft => published, published => unpublished).
- Added suite of functional tests around new labels and classes.
2013-09-15 14:52:09 -05:00
Hannah Wolfe
de6839e158 Merge pull request #752 from sebgie/settingsapi
Add setting filter
2013-09-15 09:53:23 -07:00
Hannah Wolfe
acf11a9dca Merge pull request #750 from cobbspur/images
Fixed settings general pane to display current blog cover in uploader
2013-09-15 09:15:24 -07:00
Hannah Wolfe
d66100771d Merge pull request #751 from cobbspur/hover
Added hover state for blog-logo and blog-cover using existing ids
2013-09-15 09:14:54 -07:00
Hannah Wolfe
497a1517e5 Automatically focus title on editor
closes #719
2013-09-15 17:10:57 +01:00
Sebastian Gierlinger
1a07129021 Add setting filter
closes #172
- added type to ghost.settings()
- added /api/settings?type=<filter>
- added availableThemes to settingsCache
- removed cachedSettingsRequestHandler
- removed /api/themes (including front end)
- changed activePlugins to type "plugin" in default-settings.json
2013-09-15 18:04:01 +02:00
cobbspur
74e779e4fb Added hover state for blog-logo and blog-cover using existing ids
- blog-logo and blog-cover now have a hover state of cursor: pointer
2013-09-15 16:47:38 +01:00
cobbspur
28283d7490 Fixed settings general pane to display current blog cover in uploader
- removed unused ids and options.id from uploadImage modal template
2013-09-15 15:54:12 +01:00
Hannah Wolfe
e4de21ca15 Mass renaming of things
Conflicts:
	core/client/views/settings.js
	core/server/models/user.js
2013-09-14 21:56:07 +01:00
Sebastian Gierlinger
d2194bab48 Clean up config (drop 'env')
closes #628
- removed .env from config.js
- ghost.config() returns correct config for NODE_ENV
- removed .env[process.env.NODE_ENV]
- updated tests
- deleted users.hbs, plugins.hbs, appearance.hbs (forgot to delete in PR #649)
2013-09-14 13:14:00 +01:00
Gabor Javorszky
fd0abee9e5 Added client side validation
Closes #581.

* Basically adds the client side of node validator, that we're already using
* Validator is plonked onto `Ghost.Validator`
* Usage is identical as to https://github.com/chriso/node-validator
* Has sanitizing values et al
* `Ghost.Validator.error` is redefined, it populates Ghost.Validator._errors (Array)
* `Ghost.Validator.handleErrors` is supposed to print out the multiple error messages, if there are multiple (this is broken due to how notifications are presented `.html` instead of `.append`), and also apply class to element
* The ajax calls are wrapped in an if to prevent network traffic if something's not right on client side
* Added validation to general settings and user settings screens.
* On validation error, optionally adds `.input-error` to whatever element you reference, see below (if `el` exists on the error object). This is the only place where usage is different to the original implementation. Redeclared `error()` function in `init.js`
* Usage: `Ghost.Validate.check(valueToCheck, {message: "the error message", el: $('#the element')}).isEmail()`
* The element above will receive the `.input-error` class. `isEmail()` is one of the stuff you can check against.
2013-09-14 10:52:27 +01:00
ericterpstra
60956b79f2 Added post-settings menu with edit permalink field
closes #370
- Added new Backbone view for post settings menu
- Moved sass styles to global.scss for post settings menu items
- Added field to change post slug (permalink) using existing slug
  validation
2013-09-13 12:36:38 -05:00
Hannah Wolfe
40b6c657a4 Merge pull request #686 from matthojo/Sign-up-screen-UI
Improved Auth screen markup and validation checks
2013-09-12 06:25:27 -07:00
Hannah Wolfe
a8b932074b Merge pull request #703 from matthojo/Dashboard-Removal
Temporarily removed the Dashboard and all references
2013-09-12 06:19:59 -07:00
Matthew Harrison-Jones
926b91c207 Improved Auth screen markup and validation checks
* Signup now focuses on 'name' on load
* Fixed fade in on auth forms to work with `display: table`
* The 'name' field is required on Sign up forms
* The length check on the Signup form is in order of inputs
* Added check for password length
* Changed the auth form class names to better represent individual pages
* Updated CasperJS tests
2013-09-12 09:59:58 +01:00
Sebastian Gierlinger
bb987c1b9a Fix for image upload with clean database
no issue
- reversed workaround for PUT to model
- changed save function for image to unset availableThemes
2013-09-11 16:45:59 +00:00
Matthew Harrison-Jones
dc87a50397 Temporarily removed the Dashboard and all references
This also updates the CasperJS to match the new changes.
2013-09-11 15:38:09 +01:00
Hannah Wolfe
0087433fe3 Merge pull request #698 from skattyadz/issue-642
Allow UPPERCASE in tag names
2013-09-11 06:53:24 -07:00
Hannah Wolfe
4feb2b39d2 Merge pull request #693 from gotdibbs/Issue511
Remove publish status reversion on failed save
2013-09-11 06:38:37 -07:00
Adam Howard
a37b47ccdc Allow UPPERCASE in tag names
Fixes #642

Fairly self-explanatory
2013-09-11 00:38:45 +01:00
William Dibbern
389a5c650c Remove publish status reversion on failed save
Fixes #511

- Removed logic to revert publish status back to page default on error.
2013-09-10 09:42:27 -05:00
William Dibbern
46b9646e5a Publish button fixes
Fixes #352

- Ensure publish button's default status is set in the `render`
function.
- Ensure publish button's popup arrow has animation reverted when a
status has been selected.
- Bumped up timeout in failing mocha test for exports-002.
2013-09-10 09:32:02 -05:00
Hannah Wolfe
d15c7789d8 Merge pull request #678 from matthojo/iOS-White-Space-Bug
Bug Fix: Fixed extra white space on landscape to portrait orientation change
2013-09-10 02:53:49 -07:00
Matthew Harrison-Jones
e52d4cebf5 Bug Fix: Fixed extra white space on landscape to portrait orientation change
This breaks focus on focused element to keep layout. This is because the
layout still breaks if an element is focused, and you cannot trigger
the system keyboard through Javascript to refocus an element after.
2013-09-10 10:21:43 +01:00
Hannah Wolfe
44908808b3 Added blog cover image
closes #571

- added blog cove beneath logo, wired it up to the {{@blog}} globals
- updated casper
- also deleted settings/content
2013-09-09 18:13:19 +01:00
Hannah Wolfe
22d26d4b7d Merge pull request #648 from jfi/iss545
Notifications are too long
2013-09-09 04:48:41 -07:00
Hannah Wolfe
8d08f8fd68 Merge pull request #656 from JohnONolan/signup-screen
Signup screen
2013-09-09 01:59:32 -07:00
Hannah Wolfe
733b476b1c Merge pull request #649 from sebgie/issue#345
Clean up settings/general screen
2013-09-09 01:32:35 -07:00
Hannah Wolfe
361d28b1eb Merge pull request #655 from cobbspur/userprofile
User Profile Image Upload
2013-09-09 00:59:57 -07:00
Sebastian Gierlinger
91c112f63f Clean up settings/general screen
Closes #345
- added blog description to general screen
- removed content screen from sidebar
- removed beforeRender from settings front end
- removed content screen from tests
2013-09-08 22:12:48 +02:00
John O'Nolan
7654a9ab84 New signup screen styling + new name field. 2013-09-08 20:39:55 +02:00
cobbspur
45087de78c User Profile Image Upload
closes #280

- adds image uploader to user profile page.
- click on cover picture or change cover button to open file upload modal.
- created new upload modal that extends model to reduce some code duplication
2013-09-08 17:19:57 +01:00
John O'Nolan
164520e818 Center login form with CSS instead of JS 2013-09-08 17:12:25 +02:00
James Inman
84586cf7ac Notifications are too long
Closes #560, #436, #545, #437

* Added .s to the end of all post notification messages, per #437.
* Added nice message when saving a draft per #436, also for other post statuses (your post will be published), etc.
* Removed post name from notifications per #560 and #545.
* Changed delete post error message to be "Your post could not be deleted. Please try again."

NB: There may be an issue with the format of error messages which could be a separate bug?
2013-09-07 17:18:23 +01:00
Hannah Wolfe
8136ef5986 Merge pull request #634 from sebgie/issue#593
Add setting for posts per page
2013-09-06 08:45:44 -07:00
Matthew Harrison-Jones
33a4c1da63 Updated the animation option on Upload Modals to new format 2013-09-06 15:39:26 +01:00
Matthew Harrison-Jones
f7857434ad Bug Fix: Action modals now have centered content and correct spacing
This also adds functionality to Modals, so they can have multiple
styles, e.g 'wide' and 'centered'.
2013-09-06 15:36:16 +01:00
Sebastian Gierlinger
29e2220585 Add setting for posts per page
closes #593
- added default setting of 6 posts per page
- added posts per page to settings page
- added limit to frontend.js (setting does not change API behavior)
2013-09-05 14:56:09 +02:00
Hannah Wolfe
e4c89125dd Merge pull request #629 from matthojo/Scroll-Shadows
Fixed scroll shadows not appearing
2013-09-05 03:09:24 -07:00
Matthew Harrison-Jones
b28fc1d563 Design fixes for the user settings panel
* Bio field now counts down.
* Bio filed count now turns red when < 20
* Cover image now has gradient
* Change button now has square corners
* Removed "forgot password" link
* Change password button is now red
* Change password button is now aligned with the form
* Hover state on the profile picture now reads "Edit Picture"
2013-09-05 10:00:52 +01:00
Hannah Wolfe
d5eccac418 Merge pull request #617 from cobbspur/dropzone2
Adds modal Image uploader on settings page
2013-09-04 14:55:04 -07:00
cobbspur
86f958aced Adds modal Image uploader on settings page
issue #432

adds a modal template for image uploads
adds buttons to settings page to upload images for blog logo and icon
once image is uploaded displays an 'X' to reset back to dropzone
saves image and renders settings page.

ToDo

add url field when clicking on url icon

fix position of 'X' for both settings and editor
2013-09-04 22:03:55 +01:00
Hannah Wolfe
8a670b2cfc Removing api calls from server side
closes #603, issue #395

- Changed hard-coded 'JOE BLOGGS' to use author data
- We still had api calls loading data server side before rendering pages.. which is unnecessary.
- Only thing using this was editor title, which is now populated client side
- May improve content screen load time.
2013-09-04 21:51:54 +01:00
Matthew Harrison-Jones
507e6d5722 Fixed scroll shadows not appearing
Implemented scroll classes into a jQuery plugin and fixed shadows not appearing when scrolled
2013-09-04 17:21:50 +01:00
Sebastian
baf64d12d2 Fix for settings view
no issue
- removed/added availableThemes before/after saving the model
2013-09-04 16:24:59 +01:00
Hannah Wolfe
3578a56455 Merge pull request #602 from jgable/fixCtrlS
Fix Ctrl-S saving
2013-09-03 13:00:52 -07:00
Hannah Wolfe
6e0b78e27e Merge pull request #605 from jgable/settingsBackButton
Fix settings back button functionality
2013-09-03 04:20:25 -07:00
Hannah Wolfe
ddedd1fbfc Merge pull request #587 from javorszky/iss288
Email sending with Sendgrid plus password reset
2013-09-02 15:44:48 -07:00
Hannah Wolfe
71265375de Merge pull request #585 from cobbspur/dropzone2
Updates to modals
2013-09-02 15:36:53 -07:00
Hannah Wolfe
6b3a44fcd9 Merge pull request #574 from sebgie/issue#488-2
Adding theme switcher to settings/general
2013-09-02 03:25:10 -07:00
Jacob Gable
d32bc38bd3 Fix settings back button functionality
Added a redirect call to the router instead of defaulting the pane. To
handle using the back button after clicking through to other tabs I
added an event listener on the route:settings event.
2013-09-01 22:54:19 -05:00
Hannah Wolfe
22694d3a95 Merge pull request #564 from skattyadz/tags-squashed
Add post tagging functionality
2013-09-01 17:50:21 -07:00
Jacob Gable
db7e6bdd6e Fix Ctrl-S saving
Refactored into separate button handler that passes the status.
Although, it doesn't look like the status is on the button element any
more.
2013-09-01 19:38:06 -05:00
cobbspur
57c2104ef0 Updates to modals
issue #432

- adds configurable button classes
- adds optional title
- added afterRender callback
- changed context for accept and reject methods
2013-09-01 19:44:31 +01:00
Gabor Javorszky
b09f6f4b9a Repaired email sending, implement password reset
Closes #288
* I use SendGrid for sending the emails, and it works fine (provided you supply the correct credentials in `config.mail` in `config.js`)
* Generates a random 12 char long alphanumeric password, replaces user's pw, and sends an email about it.
2013-09-01 00:20:12 +02:00
Adam Howard
4adc54fe39 Add post tagging functionality
closes #367
closes #368

- Adds Tag model with a many-to-many relationship with Post
- Adds Tag API to retrieve all previously used Tags (needed for suggestions)
- Allows setting and retrieval of Tags for a post through the Post's existing API endpoints.
- Hooks up the editor's tag suggestion box to the Ghost install's previously used tags
- Tidies the client code for adding tags, and encapsulates the functionality into a Backbone view
2013-08-30 16:20:22 +01:00
Hannah Wolfe
96455590fb Merge pull request #569 from gotdibbs/Issue469
Strip whitespace on post titles
2013-08-30 07:23:13 -07:00
William Dibbern
d9e2951efe Strip whitespace on titles
Fixes #469

- Added client-side trimming of title on blur if it is not already
trimmed.
- Added server-side trimming of title on 'saving' event of post model.
2013-08-30 08:04:32 -05:00
Sebastian
6811c7d0b9 Adding theme switcher to settings/general
closes #488 and #107
- added dropdown for theme selection on general page
- added GET /api/v0.1/themes to retrieve available themes
- modified settings model to get available themes
- modified updateSettignsCache to remove path from settings.activeTheme
2013-08-30 13:20:30 +02:00
William Dibbern
6f31558e77 Save post button now stays spun up
Fixes #352

- Removed one-off styles and code for the publish button. Publish button
now uses data-toggle attribute wired up in toggle.js and forms.scss.
- Ensured split button common styles are up to date to conform with
vendor prefixing of transform properties.
2013-08-29 22:16:16 -05:00
Hannah Wolfe
ae2cd77164 Merge pull request #555 from jfi/iss371
Adding fade transitions between settings tabs.
2013-08-29 13:46:20 -07:00
James Inman
6197c14ab3 Adding fade transitions between settings tabs.
Closes #371
- Added a hide and fadeIn() to the render method in Settings.Pane
- Any Settings.Pane which overwrites render should now make sure the parent is called
- Run through grunt validate, all OK.
2013-08-29 18:36:33 +01:00
Hannah Wolfe
ac5080b824 Merge pull request #559 from matthojo/Notification-Animations
Improved notification animations
2013-08-29 07:40:44 -07:00
Hannah Wolfe
1c4218689d Merge pull request #554 from matthojo/Modal-Improvements
Improved Modals transitions
2013-08-29 07:40:35 -07:00
Hannah Wolfe
ca867e5b8c Adding Github Flavored Markdown support
closes #422, issue #295

- Added GFM mode to codemirror
- Took the github.js extension for Showdown and added all useful behaviour
- Now supports strikethrough, line breaking and
  multiple underscores, and auto linking urls & emails without breaking
  definition urls
- Also added definition url handling in preparation for #295
- Added unit tests for the extentions individually and integrated with
  showdown
2013-08-29 14:32:09 +01:00
Matthew Harrison-Jones
64ab9f15b2 Improved notification animations
Notifications now slide down and fade in, and then fade out and slide
up.
2013-08-29 11:06:16 +01:00
Matthew Harrison-Jones
98428f07fb Improved Modals transitions
This also includes a new jQuery function to get the transition duration of an element.

Modals animations now start when `.in` is applied to the modal container.
2013-08-28 14:23:36 +01:00
Hannah Wolfe
485a4632e8 Validation consistency
- introduced validation method in the post and user model
- moved signup validation onto model
- consistent use of validation & error messaging in the admin UI
- helper methods in base view moved to a utils object
2013-08-25 18:10:12 +01:00
William Dibbern
ab4c51ce31 Rename /logout/ to /signout/ and /login/ to /signin/
Closes #443
- Renamed routes
- Added redirects for old routes
- Added unit test for redirect
- Updated references to old routes in templates, html
2013-08-24 22:38:48 -05:00
Hannah Wolfe
8e888be92f Merge pull request #492 from gotdibbs/Issue352
Fixed editor actions menu
2013-08-22 11:48:37 -07:00
Hannah Wolfe
d67a294c28 Improvements to settings pane switching
closes #174

- Triggering router events for navigation between settings panes
caused the route function to be re-executed, which caused all
kinds of fun.
- Wrapped the settings route function in an if statement to preserve
the current view if it already a settings view.
- Added Ghost pub-sub and using that instead of History API
2013-08-22 08:08:43 +01:00
William Dibbern
8ee52a63c4 Fixed editor actions menu
Closes #352
- Updated editor.scss to break out transition shorthand into its
constituent properties so that bourbon appends the correct vendor
prefixes.
- Added full set of publish options to the statusMap.
- Added setActiveStatus function to handle toggling the active action
for the publish menu.
- Cleaned up handleStatus and updatePost functions to match desired
functionality of menu items toggling the selected action and the actual
button on the split button invoking said action.
2013-08-21 21:31:59 -05:00
John O'Nolan
11f1cd4bd2 Merge pull request #485 from matthojo/Login-Fix
Bug Fix: Login form now maintains the right layout on resize
2013-08-21 05:01:27 -07:00
Matthew Harrison-Jones
d6c626d372 Bug Fix: Login form now maintains the right layout on reize 2013-08-21 12:45:33 +01:00
Hannah Wolfe
efa988c1c4 Merge pull request #470 from matthojo/Centering-Fix
Bug Fix: Login centering now works correctly
2013-08-20 14:08:00 -07:00
Hannah Wolfe
a6b6c2af34 Merge pull request #456 from matthojo/Keyboard-Shortcut-Improvements
Keyboard shortcut improvements
2013-08-20 07:05:41 -07:00
Matthew Harrison-Jones
641c44adc3 Bug Fix: Login centering now works correctly
This also adds in additional functionality to the .center() plugin. A choice to animate centering and also the success event fired.
2013-08-20 11:55:44 +01:00
Hannah Wolfe
a85385b2f1 Updating password length validation
- setting it back to 7 chars so that people who have 7 char passwords, which were valid, can login.
2013-08-20 10:43:11 +01:00
Hannah Wolfe
cff5d218b8 Manually merging pull request #439 from javorszky/iss354
Conflicts:
	core/client/views/login.js
2013-08-20 10:11:09 +01:00
Gabor Javorszky
f521a88db1 Added validation for signup and login screens
Closes #374
* Included node-validator as a package
* Implemented server side validation (the client side js is a mess, need a LOT of work)
* Validates email address both on signup and login screens, gives error message on malformed email addresses
* Requires at least 8 chars of password
* Tells user if password is too short
* Tells user if no such user on login
* Tells user if wrong password on login
* Tells user if server responds with a 404 (goes away, dies, etc)
* Added middleware between req and login / signup for validation
2013-08-20 09:42:42 +01:00
Gabor Javorszky
1b0b4b2285 Removed flash, renamed file, unbroken logout / login request notifications
Closes #354
* Reintroduced the redirect functionality (not logged in, tries to go to `/settings/user/`, is sent to `/login/` with info notification, after login user is taken to `/settings/user/)
* Reintroduced the "Successfully logged out" message
* Added middleware to scrub passive notifications from `ghost.notifications` after one use basically mimicing client side passive notifications
* Removed flash from everywhere. Even from package.json.
* Renamed flashed.hbs to notifications.hbs, modified default.hbs accordingly
* Added function to parse GET variables on client side
2013-08-20 08:15:06 +01:00
cobbspur
1227693e25 stops image/file drop onto editor markdown causing havoc
closes #391

 - added dragDrop falsey value to codemirror instance
2013-08-19 20:23:44 +01:00
Matthew Harrison-Jones
433e9681d9 Included missing Mac 'code' keyboard shortcut 2013-08-19 15:10:53 +01:00
Jacob Gable
776c8c2eca Show validation error when saving post
Show the model.validationError if one is present and also coalesce the
empty title for a more meaningful message.  Also, reset the button text
after failure.
2013-08-18 15:01:21 -05:00
Jacob Gable
5bedb4e744 Edit Post Permissions 2013-08-18 12:28:05 -05:00
Hannah Wolfe
8ce7118bb3 Merge pull request #404 from matthojo/mobile-interactions
Mobile interactions
2013-08-18 09:19:06 -07:00
Hannah Wolfe
5a1668280b Merge pull request #393 from matthojo/Modal-Fixes
Several Modal Fixes
2013-08-18 09:05:49 -07:00
Gabor Javorszky
ab08e07300 Current user added
Closes #340. Closes #375
* Replaced session with id of current user
* Added method to ghostlocals to always send profile picture and full name to templates (template checks if falsy)
* Modified user saving (`forge().set(new).save()` died on me, `forge().save(new)` didn't)
* If user has profile picture, that will be used
* If user has name, that will be used
* Password changing doesn't care about your email. Uses cookies. Tasty!
* User pane uses current user id. Had to set path to me, otherwise goes to `browse` instead of `read`.
* Added logic to user api to check for `id === 'me'`, and then use the cookie value
* User data saves are now correct
* There is no logout error
2013-08-17 22:02:46 +01:00
Matthew Harrison-Jones
9362ee7f02 Improved mobile interactions
This is simply a commit which improves the mobile interactions. This does not fix UI problems on mobiles.

New interactions;

Menu
* Swipe right on header to show sidebar
* Swipe left on sidebar to hide

Content
* Tap / Swipe left on item to show preview
* Swipe right to show content list

Settings
* Tap / Swipe left on link to show settings
* Swipe right on settings to show links
2013-08-16 12:44:11 +01:00
Gabor Javorszky
51fcd043fb Passive notifications are dismissed on settings pane change
Closes #342.
It would be totally cool if we could have a Ghost.PubSub so we could hurl events there and pick them up somewhere else. For some reason all the backbone bits work on models, like `trigger` and `listenTo` and `delegateEvents`.
2013-08-15 23:18:10 +01:00
Matthew Harrison-Jones
dade7c1512 Improved modals styling and code formatting
Solves:
* max-height 120px less than height of viewport
* fade-in a dark overlay as well as blur
* animation speeds/transitions should be smoother
* modal sizing fucks up when viewport is resized

Also improves Modal code compliance to Ghost Backbone coding patterns
2013-08-14 14:49:16 +01:00
William Dibbern
dbb9b3bbfe Fixed word count grammar
Closes #349
- Added utility function to pluralize when appropriate.
2013-08-11 11:55:42 -05:00
Hannah Wolfe
2e8875fb75 Minor code cleanup, docs and other bits & pieces 2013-08-06 22:24:40 +01:00
Hannah Wolfe
6440596d5e Merge pull request #339 from javorszky/iss282
Users can change password
2013-08-06 01:17:43 -07:00
Hannah Wolfe
af6d3e1c23 Merge pull request #338 from cobbspur/upload-plugin
Added image upload reusable plugin
2013-08-06 01:02:30 -07:00
Hannah Wolfe
af1051720e Fixing unused variables 2013-08-06 09:00:12 +01:00
Hannah Wolfe
bf3ba76037 Minor update to notification frontend api
- motivation was an error message on the settings screen
 - now requires slightly less code to add a notification
2013-08-06 08:55:47 +01:00
Gabor Javorszky
0dcb9d0c9a Users can change password
Closes #282
* Added a new route
* Added new methods
* Triple security!
* Passwords are actually changed
* Also added a change password button, because 'save' has too much baggage.

On security: checks whether you're logged in. Then checks whether your old password is actually the one that belongs to you (gets value from the email field for the email, see caveat no2). Checks the new passwords for === and length > 6 on client and server side as well. And THEN changes passwords.

Caveats:
* didn't add a test, as mocha fails spectacularly on my machine. SQLITE_CORRUPT: database disk image is malformed. Cute, huh?
* Because we don't have / I'm not aware of / could not find a "currentuser" variable, I need to get the email address of the user we want to change from the email field. Theoretically if they replace that with another user's email address, and supply their pw, they will change THEIR password instead of their own.
2013-08-06 00:49:06 +01:00
cobbspur
0891ff4376 Added image upload reusable plugin
issue #40 and issue #280

- Adds uploader jquery plugin
- includes settings for enabling/disabling upload progress bar
- adds routing for image uploads
- adds directories by year and month based on upload date
- Implements plugin on settings - general pane
- Implements plugin on editor
- adjusted general tab to save uploaded image src

TODO:
- Add error handling
- Storing information on editor
- Add events
2013-08-05 23:01:48 +01:00
Hannah Wolfe
4d5d68511e Editable user profiles in settings screen
closes #276

 - settings screen now loads a model when a pane is requested, rather than when the whole screen is requested
 - added browse, read and edit methods and routes for users to the API
 - added user model & template to client and wired everything up.
 - provided default images for cover and profile picture
2013-08-05 18:26:44 +01:00
Gabor Javorszky
94887bff71 Fixed persistent success notifications
Closes #333
* Refactored the Ghost.Notifications View bundle
* Added a new initialization of the NotificationCollection (hacky, but at least satisfies JSLint). This was needed as the reason the persistent success notification couldn't be dismissed was that prerendered DOM elements weren't picked up as BB Views beforehand, and thus no events were bound to them.
2013-08-05 13:56:30 +01:00
Matthew Harrison-Jones
61249508e9 Moved delete post confirm alert to new modal format 2013-08-05 10:16:31 +01:00
Hannah Wolfe
33d00f781b Bugfix for signup screen
caused by issue #326
 - implementing fade in and center on signup form by applying the functionality to a shared view
 - login and signup now both extend the shared view
2013-08-03 19:24:06 +01:00
Hannah Wolfe
67b517fbbd Backbone template cleanup
- Ghost.View now extends Ghost.TemplateView giving all views access to subviews and templates
- Views which implemented templates no longer need to
- Some views needed to re-override render which is a bit annoying
- Settings screen now has sub-templates for each pane and for the sidebar
- Additional Casper tests for settings screen
2013-08-03 16:37:06 +01:00
Matthew Harrison-Jones
845c55d1ad Removed admin-ui-temp.js and moved code to it's relative places 2013-08-01 15:28:13 +01:00
Gabor Javorszky
a856087580 Login / Signup forms now use Backbone
* Moved most of control code to `core/client`
* Implemented ajax checks
2013-08-01 02:11:45 +01:00
Matthew Harrison-Jones
45f3f2a143 Improved modal creation, now includes info and action types. 2013-07-26 15:32:44 +01:00
Matthew Harrison-Jones
7bb92d508d First pass at creating a usuable modal for the copy to HTML keyboard shortcut.
Has an issue where Google Chrome does not persist to keep code selected.
2013-07-25 16:00:41 +01:00
Matthew Harrison-Jones
b44c870520 Reworked modals to take content from modal content templates.
This also includes the example modal, which needs to be replaced with content.
2013-07-24 11:29:20 +01:00
Hannah Wolfe
21250f7102 Merge pull request #298 from matthojo/Markdown-Fixes
Additional Keyboard Shortcuts and improvements to text highlighting
2013-07-23 11:44:14 -07:00
Hannah Wolfe
b1353db433 Merge pull request #297 from matthojo/Editor-Scrolling
Debounce scrolling on editor
2013-07-22 08:00:15 -07:00
Matthew Harrison-Jones
a2b4ca56bf Move notification dismissal events to Backbone
Also removes stray notification alert comments
2013-07-22 14:41:28 +01:00
ErisDS
68d384b43b Bug Fix: title of deleted post in content view notification is now correct 2013-07-22 14:41:28 +01:00
Gabor Javorszky
416a6848fc Fixes undefined this in settings.js
Because this and self. Missed it from previous commit :/
2013-07-22 14:41:27 +01:00
Gabor Javorszky
b724e12d88 Adding notifications to settings and content pages
Closes #290. In theory.
* moved flashviews to base.js, renamed to notifications
* added failures to post editor screen
* added notifications to settings (success, failure)
* added notifications when deleting posts

Most of these are not visible due to CSS rules, as overhauling that
is a task in and of itself. The notifications do show up in the inspector
though, so all is well.
2013-07-22 14:41:27 +01:00
Gabor Javorszky
73202f5be7 Notifications on front end
Should close #37. There are persistent and passive notifications.

Persistent ones:
* are stored on `ghost.notifications`.
* have an api made to add / remove them with client side ajax logic (probably not the most elegant, but works)
* uses a modified `flashes.hbs` template
* will only disappear if user closes the bar
* stack

Passive
* added with backbone view / collection combo
* stack
* disappears on navigation and when user closes it
2013-07-22 14:41:27 +01:00
Matthew Harrison-Jones
53be53eb3b Added the ability to copy as HTML. 2013-07-22 13:50:50 +01:00
Matthew Harrison-Jones
9de10810a3 Additional Keyboard Shortcuts and improvements to text highlighting
This fixes the event where text would be selected after manipulation from shortcut, the cursor is now placed after the text. On links and images the url field text is highlighted.
Additional shortcuts;

* Ctrl+U: Make text uppercase
* Ctrl+Shift+U: Make text lowercase
* Ctrl+Alt+Shift+U: Make text titlecase
* Ctrl+Alt+W: Select word
* Ctrl+L: Make into list
2013-07-18 14:02:54 +01:00
Matthew Harrison-Jones
62c85a846a Debounce scrolling on editor 2013-07-18 12:06:52 +01:00
Matthew Harrison-Jones
0a7182100d Fixes back button breaking settings panels 2013-07-15 18:09:10 +01:00
Hannah Wolfe
5ff84fcc68 App restructure - closes #245
- This is a first pass at getting a more logical structure. The focus is on moving from admin/frontend to client/server.
- The location of the databases is highly important, this isn't expected to change again
In the future
- client/assets should probably become public/
- more stuff should be shared (helpers etc)
- cleanup some confusion around tpl and views
2013-07-11 20:23:34 +01:00