Commit Graph

66 Commits

Author SHA1 Message Date
Hannah Wolfe
119b0ea430 Merge branch '0.3.2-wip'
Conflicts:
	core/client/assets/lib/uploader.js
2013-10-11 20:56:15 +01:00
cobbspur
c52a10cd1a 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
9466a9753b Merge branch '0.3.2-wip'
Conflicts:
	core/test/unit/api_posts_spec.js
2013-10-10 16:37:35 +01:00
Hannah Wolfe
f5d617d8d4 Merge pull request #925 from matthojo/New-line
Added new paragraph keyboard shortcut
2013-10-09 11:32:43 -07:00
Hannah Wolfe
95f9fce3be 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
Sebastian Gierlinger
0220cf2448 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
Matthew Harrison-Jones
32aebc40d3 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
Hannah Wolfe
fc881229f4 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
eb7a63bd1d Fixing tag save event
- lost in a bad merge somewhere
2013-09-18 20:04:39 +01:00
Hannah Wolfe
00b60a7a74 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
60bb02ad6a Throttle scrolling. LIKE A BAWS.
See #481
2013-09-18 02:09:21 +01:00
Hannah Wolfe
ae01e5eeae Editor notification cleanup
closes #666

- no more split messaging
2013-09-17 21:35:30 +01:00
James Inman
38ae87524d 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
Hannah Wolfe
357cb9f201 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
cobbspur
713e4c0d5c 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
0021fb7a95 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
William Dibbern
07629dd9ab 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
a4016b857c Automatically focus title on editor
closes #719
2013-09-15 17:10:57 +01:00
Hannah Wolfe
d968495996 Mass renaming of things
Conflicts:
	core/client/views/settings.js
	core/server/models/user.js
2013-09-14 21:56:07 +01:00
ericterpstra
e2bc5257a6 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
d89b457257 Merge pull request #693 from gotdibbs/Issue511
Remove publish status reversion on failed save
2013-09-11 06:38:37 -07:00
William Dibbern
48a4c30fef 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
2329b34be7 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
Matthew Harrison-Jones
0e3cefa770 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
James Inman
ad46b853c4 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
Matthew Harrison-Jones
44deb1c0df 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
Hannah Wolfe
0f70007028 Merge pull request #629 from matthojo/Scroll-Shadows
Fixed scroll shadows not appearing
2013-09-05 03:09:24 -07:00
Hannah Wolfe
ddcc7b78b6 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
3e3987754a 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
Hannah Wolfe
4059747424 Merge pull request #602 from jgable/fixCtrlS
Fix Ctrl-S saving
2013-09-03 13:00:52 -07:00
Hannah Wolfe
7570599252 Merge pull request #564 from skattyadz/tags-squashed
Add post tagging functionality
2013-09-01 17:50:21 -07:00
Jacob Gable
67901ff699 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
Adam Howard
d90df55b75 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
5a908bd3d3 Merge pull request #569 from gotdibbs/Issue469
Strip whitespace on post titles
2013-08-30 07:23:13 -07:00
William Dibbern
94f262a697 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
William Dibbern
9a089ecee3 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
94b3200af0 Merge pull request #554 from matthojo/Modal-Improvements
Improved Modals transitions
2013-08-29 07:40:35 -07:00
Hannah Wolfe
f318d164d4 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
f68cf7d868 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
41e36cca7e 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
31dc45768a 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
Hannah Wolfe
2b0c544e3e Merge pull request #456 from matthojo/Keyboard-Shortcut-Improvements
Keyboard shortcut improvements
2013-08-20 07:05:41 -07:00
cobbspur
a7feb04894 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
20bcaa4339 Included missing Mac 'code' keyboard shortcut 2013-08-19 15:10:53 +01:00
Jacob Gable
d41d002467 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
bbe5105048 Edit Post Permissions 2013-08-18 12:28:05 -05:00
Matthew Harrison-Jones
6bd3333d6d 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
b92980ce6d Fixed word count grammar
Closes #349
- Added utility function to pluralize when appropriate.
2013-08-11 11:55:42 -05:00
Hannah Wolfe
226e641602 Merge pull request #338 from cobbspur/upload-plugin
Added image upload reusable plugin
2013-08-06 01:02:30 -07:00
Hannah Wolfe
4537843359 Fixing unused variables 2013-08-06 09:00:12 +01:00