Commit Graph

714 Commits

Author SHA1 Message Date
Hannah Wolfe
b165dd3e62 Merge pull request #787 from cgiffard/new-404-handling
Initial 404 Error Handling Support
2013-09-17 07:07:19 -07:00
John O'Nolan
438279a1a0 ONE. PIXEL. 2013-09-17 13:04:43 +01:00
John O'Nolan
14d07ef98a Restyled delete post-settings menu item 2013-09-17 13:02:20 +01:00
John O'Nolan
d674996dce Fix wonky settings icon alignment 2013-09-17 12:32:56 +01:00
Christopher Giffard
48b75fa396 Initial 404 Error Handling Support
Fixes #356

- Adds new generic methods for handling errors to errorHandling.js
- Initialises generic methods as middleware
- Created error.hbs view in admin
- Error handler searches for error.hbs view file in user theme folder
  and renders it if available, otherwise lets the error fall through
  to express.

- We *could* change the final behaviour to render a default ghost
  template should the user template be missing
- Because it currently isn't possible to require(ghost) in errorHandling.js,
  it was necessary to duplicate some aspects of the ghost path init code
  inside errorhandling.js. This should be cleaned up and moved back
  into ghost.js when possible.
2013-09-17 20:56:05 +10:00
Hannah Wolfe
83e655701c 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
John O'Nolan
b6b019621a Make user profile images always fit their circle
Closes #778
2013-09-17 11:03:55 +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
William Dibbern
9f4122d0cd 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
Hannah Wolfe
750c19014a Populating admin email with user signup email
closes #775
2013-09-17 03:08:36 +01:00
Hannah Wolfe
ce57b46358 More trailing slashes 2013-09-17 02:52:29 +01:00
John O'Nolan
650bdce220 Merge pull request #777 from nicoburns/notification-color-fix
Fix notification link color
2013-09-16 18:48:52 -07:00
Hannah Wolfe
c052fe82d8 Merge pull request #749 from cobbspur/urls2 2013-09-17 02:42:28 +01:00
Hannah Wolfe
6a276668bc Default to trailing slashes on the end of URLs
issue #448
2013-09-17 02:41:44 +01:00
Hannah Wolfe
16329ac6f0 Removing i18n until it's done properly 2013-09-17 02:41:40 +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
30a2cfe6e2 Clear the view cache completely
- directly clear the cache rather than relying on disabling it to clear it.
2013-09-17 02:26:28 +01:00
Hannah Wolfe
79f75865a1 Error handling for the frontend routes 2013-09-17 01:54:36 +01:00
Hannah Wolfe
de7143bc62 Refactoring Ghost middleware
closes #657, closes #761

- Got rid of initTheme from ghost.js (yay)
- Divided up the logic for static assets and views
- Ghost admin static assets are now served from /ghost/
- New logic to figure out if we're on the admin, or a theme and which theme we are on
- Activate theme method reregisters static access and uncaches views
- Re-ordered all of the middleware, and ensured we had a 404 handler at the end
- Activate theme method ensures that middleware maintains order
2013-09-17 01:49:08 +01:00
Hannah Wolfe
42a5e74ddb Cleaning up code that is not needed 2013-09-17 01:49:00 +01:00
Hannah Wolfe
8c26249d46 Adding extra paths to not allow slugs for 2013-09-17 01:48:56 +01:00
nicoburns
09008672b2 Fix notification link color
Closes #772
- Changed notification link color inherit, and added underline
2013-09-17 01:32:59 +01:00
Hannah Wolfe
8c76706bb0 Merge pull request #758 from ErisDS/uploads-in-editor
Save image uploads in the editor
2013-09-16 13:37:49 -07:00
John O'Nolan
0b89335339 Fix debug tools layout 2013-09-16 18:53:09 +01:00
Hannah Wolfe
e3bc0b3151 Mail documentation link is clickable
closes #760

Also updating notification template missed in issue #729
2013-09-16 18:34:20 +01:00
Hannah Wolfe
2c6dd77b1d Merge pull request #768 from matthojo/Image-Keyboard-Shortcut
Improved Image keyboard shortcut
2013-09-16 10:13:46 -07: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
Matthew Harrison-Jones
0dd1e72897 Improved Image keyboard shortcut
Image keyboard shortcut now inserts a new line when on a line with text
2013-09-16 15:18:33 +01:00
Hannah Wolfe
84e84b0612 Merge pull request #767 from sebgie/issue#715
Escape RSS post title
2013-09-16 06:34:11 -07:00
Hannah Wolfe
cefa0e14ef Merge pull request #764 from matthojo/Flash-Bar
Renamed the notifications container
2013-09-16 06:07:55 -07:00
Sebastian Gierlinger
141361c40e Escape RSS post title
closes #755
- added html escape for post title
- changed author for rss feed to current user
- added simple test to check rss is working
2013-09-16 13:11:53 +02:00
Hannah Wolfe
cb38bb961a Merge pull request #710 from matthojo/Mobile-Tags
Improved Post tagging on Mobile devices
2013-09-16 02:34:28 -07:00
Hannah Wolfe
522f47a217 Logo in admin goes to blog front
closes #537
2013-09-16 10:25:45 +01:00
Hannah Wolfe
4c52428d7b Fixing path to jquery.min.map
closes #766
2013-09-16 10:09:00 +01:00
John O'Nolan
03419f12e0 Tweak icon mixin adjustments to reduce compiled filesize
See #509
2013-09-16 10:04:16 +01:00
U-nico-laptop\nico
957ca3c58b Fixed 'extend' compile errors in SASS 3.3
closes #509
- Replaced @extend directive with a functionally equivalent mixin
2013-09-16 10:04:16 +01:00
Hannah Wolfe
1ee0d51660 Merge pull request #730 from jgable/gruntClientFiles
Compile assets with grunt
2013-09-16 01:57:08 -07:00
Matthew Harrison-Jones
2fe7eda8e2 Renamed the notifications container
Renamed from `#flashbar` to `#notifications`
2013-09-16 09:46:29 +01:00
Hannah Wolfe
32be5aaf8b Merge pull request #763 from sebgie/issue#600
Improve error message
2013-09-16 01:32:53 -07:00
Sebastian Gierlinger
d5b197656b Improve error message
closes #600
- replaced '?' with 'Server was not available'
- added request.statusText
2013-09-16 10:16:42 +02:00
Hannah Wolfe
8af09e2dd1 Merge pull request #762 from ericterpstra/402-pub-date
Enabled post setting to change published date
2013-09-16 01:10:33 -07:00
Hannah Wolfe
281177d08e Merge pull request #757 from gotdibbs/Issue258
Infinite Scroll Pagination for content screen
2013-09-16 01:05:27 -07:00
Matthew Harrison-Jones
d5ea96eb20 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
7f296c9886 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
9cfa053dd1 Improved Post tagging on non Mobile devices 2013-09-16 08:34:38 +01:00
Matthew Harrison-Jones
0c8f787186 Improved Post tagging on Mobile devices 2013-09-16 08:34:38 +01:00
ericterpstra
71c99913f6 Enabled post setting to change published date
closes #402
2013-09-15 22:19:53 -05:00
William Dibbern
4b8806ec1d 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
Hannah Wolfe
881e861295 Merge pull request #754 from gotdibbs/Iss667
Publish button amendments
2013-09-15 15:16:41 -07:00
John O'Nolan
fe17e1f385 User profile refactor
Fixes #708
2013-09-15 22:42:30 +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
John O'Nolan
aa982c2d31 CSS code standards cleanup 2013-09-15 20:18:37 +01:00
Jacob Gable
63eb9581ea Compile assets with grunt
- Made a helper called ghostScriptTags that will spit out the relevant
  script tags with version parameter; 4 unminified files in development,
  1 minified file in production.
- Added grunt concat and uglify tasks to build files into core/built
- Fixed some unit tests by making them native date objects
2013-09-15 14:06:42 -05:00
John O'Nolan
c7fcdb625f Set input:focus to less extreme border / code standards cleanup 2013-09-15 19:33:40 +01:00
John O'Nolan
6abc9ea3c5 Introduce button active state
Fixes #740
2013-09-15 19:28:06 +01:00
Hannah Wolfe
03f2fd87bb Merge pull request #753 from sebgie/settingsapi-2
Make settings() 'magic'
2013-09-15 11:12:06 -07:00
Sebastian Gierlinger
8f22737f04 Make settings() 'magic'
- access value directly by using ghost.settings('key')
- removed use of <key>.value
- removed workaround for activeTheme path
2013-09-15 19:52:37 +02:00
Hannah Wolfe
0b0dc15c8e Handling HTML in notifications
closes #729
2013-09-15 18:19:56 +01:00
Hannah Wolfe
7635ddee78 Getting frontend notifications back
closes #738
2013-09-15 18:19:11 +01:00
Hannah Wolfe
117f70dcfd Merge pull request #752 from sebgie/settingsapi
Add setting filter
2013-09-15 09:53:23 -07:00
Hannah Wolfe
9338d93b26 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
5128e1ce62 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
a4016b857c Automatically focus title on editor
closes #719
2013-09-15 17:10:57 +01:00
Hannah Wolfe
8d038b8bf2 One exporter to rule them all
closes #733

- Exporter will read meta data to determine the tables which are present and export all data from those tables
- Exporter figures out which version to export, rather than requiring that information
- deleted old exporters
2013-09-15 17:04:42 +01:00
Sebastian Gierlinger
bd8db968ea 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
2e6e7afe93 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
d86d26b957 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
596c1dccd2 Updating example config file
- url first, replaced with temporary URL with documentation
- mail config is a commented out example
- mail documentation link in config and mail file
- no more staging
- gruntfile updated to generate correct docs
2013-09-15 15:45:18 +01:00
Hannah Wolfe
71a92194ca Improved error messaging
closes #748

- Removed the alpha software warning
- Better error message output for the whole app - can now specify an error, a context, and a help message
- Improved invalid node version, start and stop messaging
- Listens for Ctrl+C and exits nicely
- Minor improvements to handling and errors with old DBs (temporary)
2013-09-15 13:52:58 +01:00
Hannah Wolfe
9fa659aeee Merge branch 'new-data-model' 2013-09-15 00:36:54 +01:00
Hannah Wolfe
a144d677e6 Updating unit tests
- Commented out import/export tests until they are refactored
- Updating tests to ensure they create objects which conform to the new much stricter schema.
2013-09-15 00:22:16 +01:00
Hannah Wolfe
02436645fe Migration adds fixtures on first run only
closes #731, closes #732

- fixtures are imported using the models, rather than knex
- migration treats fresh installs differently
- migration throws errors for un-initialisable databases
- small amount of extra code to deal with old DBs still using currentVersion & give them a nice error message
2013-09-15 00:22:13 +01:00
John O'Nolan
bc3b3b8669 Tweak breakpoint 2013-09-14 23:51:49 +01:00
John O'Nolan
51df11c1a4 Fix #744 2013-09-14 23:50:04 +01:00
John O'Nolan
2aabad3c58 Bump settings save button up to navbar 2013-09-14 23:27:34 +01:00
John O'Nolan
19272a03cc New post title placeholder 2013-09-14 23:18:35 +01:00
Hannah Wolfe
b902f8109c Renaming default to defaultValue as default is reserved 2013-09-14 22:39:31 +01:00
Hannah Wolfe
9fcc0a6ed6 Renamed currentVersion setting to databaseVersion to avoid confusion with software version 2013-09-14 22:13:59 +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
John O'Nolan
f5216db326 Fix favicon reference 2013-09-14 21:03:51 +01:00
Hannah Wolfe
d587a845d4 Set migrations to use new 000 schema
issue #632

- removed old schemas
- updated base model to reflect all of the consistent behaviours and properties across the models
- updated all models to match the new schema

TODO

- no fixtures are currently loaded except settings
- need to rename properties across the codebase
2013-09-14 20:01:46 +01:00
Hannah Wolfe
72229fa8ea Adding the new schema - it doesn't do anything yet
issue #632

- shiny new 000 file contains the new much more detailed schema
2013-09-14 19:17:41 +01:00
Hannah Wolfe
70824a247f Merge branch 'migrations-003' into new-version
Conflicts:
	.gitignore
	config.example.js
	core/server/models/post.js
	package.json
2013-09-14 19:15:04 +01:00
Hannah Wolfe
0b1ffcd1f5 Updating settings types
- issue #573, issue #632
2013-09-14 19:04:41 +01:00
Hannah Wolfe
dea7ac56ac Fixing config path in email 2013-09-14 18:34:21 +01:00
Hannah Wolfe
3fab1f708a Merge pull request #728 from skattyadz/default-settings-validations
Conflicts:
	Gruntfile.js
	core/server.js
	core/server/data/default-settings.json
	core/test/unit/admin_spec.js
2013-09-14 14:37:52 +01:00
Adam Howard
3823d10c35 Restructure default-settings.json and add validations to important settings. 2013-09-14 14:29:27 +01:00
Sebastian Gierlinger
7aca800f53 Remove path from activeTheme
no issue
- obvious
2013-09-14 14:08:38 +01:00
Hannah Wolfe
63d8cbb87c Unit tests require config file to be present.
Conflicts:
	Gruntfile.js
	core/test/unit/admin_spec.js
2013-09-14 14:07:05 +01:00
Adam Howard
c5fa7ae1a6 Refactor the initial boot of Ghost, allowing Ghost updates to keep current configuration intact.
Extracts all express-server-related code in index.js to core/server.js, leaving index.js purely for booting up Ghost's core components in a sensible order.

Aside from the project's tidiness, this means that we can perform asynchronous configuration loading/checks before requiring any modules that read the config.
2013-09-14 14:04:08 +01:00
Sebastian Gierlinger
35a32279d9 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
Hannah Wolfe
486c2b4eea Use software version in RSS
closes #723

 Still waiting on https://github.com/dylang/node-rss/pull/16 to get this to actually output
2013-09-14 12:12:27 +01:00
Gabor Javorszky
6c99b67ab3 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
Hannah Wolfe
d00392973f Merge pull request #727 from sethlilly/issue-700
Replaced default user image for navbar
2013-09-13 14:32:36 -07:00
Hannah Wolfe
486b2406b1 Merge pull request #722 from ericterpstra/370-post-settings-permalink
Added post-settings menu with edit permalink field
2013-09-13 14:31:49 -07:00
Seth Lilly
3ca843e962 Replaced default user image for navbar
Replaced default user image for navbar

closes #700
- Replaced photo of John (sorry, man) with a smaller version of the default heart user photo
2013-09-13 16:48:04 -04:00
Hannah Wolfe
420986de62 Updating tag saving logic to never save duplicates 2013-09-13 21:38:53 +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
e9d2646997 Refactoring tests to always run as expected
closes #721

- we now have grunt test-unit for safely running unit tests.
2013-09-13 15:12:38 +01:00
Hannah Wolfe
01f6551bf2 Small model update for tags and users
- tags are now created with uuid & timestamps
- user role is no longer a model, just a join done with attach
2013-09-13 15:06:17 +01:00