Commit Graph

1350 Commits

Author SHA1 Message Date
Hannah Wolfe
1783a895de Merge pull request #2137 from jgillich/patch-1
Don't require mail.options to be set
2014-02-08 15:22:50 +00:00
Aia Patag
4e5c624d9f Updated downsize to 0.0.5
closes #2106
- downsize 0.0.5 contains the fix to accept single quote found inside a double-quote string or vice-versa
- created unit tests to properly check this scenario
2014-02-08 15:13:33 +00:00
Hannah Wolfe
37b7907c09 Merge pull request #1858 from hswolff/improve-bootstrap-flow
Improve bootstrap flow of a Ghost application
2014-02-08 14:36:29 +00:00
Garrett Murphey
89aa7c6f81 Tweaking slug logic in post settings.
Closes #2136.
- sets slug to placeholder text if slug is blank
2014-02-07 21:59:33 -05:00
Harry Wolff
f16dc290b7 Improve bootstrap flow of a Ghost application
addresses #1789, #1364

- Moves ./core/server/loader -> ./core/bootstrap.
The bootstrap file is only accessed once during startup,
and it’s sole job is to ensure a config.js file exists
(creating one if it doesn’t) and then validates
the contents of the config file.

Since this is directly related to the initializing 
the application is is appropriate to have 
it in the ./core folder, named bootstrap as that
is what it does.

This also improves the dependency graph, as now
the bootstrap file require’s the ./core/server/config
module and is responsible for passing in the validated
config file.

Whereas before we had ./core/server/config
require’ing ./core/server/loader and running its
init code and then passing that value back to itself,
the flow is now more straight forward of
./core/bootstrap handling initialization and then
instatiation of config module

- Merges ./core/server/config/paths into 
./core/server/config
This flow was always confusing me to that some config
options were on the config object, and some were on
the paths object.

This change now incorporates all of the variables
previously defined in config/paths directly
into the config module, and in extension,
the config.js file.

This means that you now have the option of deciding
at startup where the content directory for ghost
should reside.

- broke out loader tests in config_spec to bootstrap_spec

- updated all relevant files to now use config().paths

- moved urlFor and urlForPost function into 
 ./server/config/url.js
2014-02-07 17:34:21 -05:00
Hannah Wolfe
0dc0a9bb7c Merge pull request #2126 from aiampogi/issue-2114-rssFeeds
Removed author tag inside channel tag in RSS
2014-02-07 11:52:41 +00:00
Hannah Wolfe
160bdf0c8c Merge pull request #2094 from xuduo35/master
Tag needs escaping. Wrongly call showSuggestions.
2014-02-07 10:50:32 +00:00
Hannah Wolfe
d165217aad Merge pull request #2063 from JohnONolan/robots
Introduce default robots.txt
2014-02-07 10:43:25 +00:00
Jakob Gillich
5e4db70fd0 Don't require mail.options to be set 2014-02-07 11:17:22 +01:00
Fabian Becker
bb4e48bf50 Removed mailto auto-linking.
fixes #1617
- Removed test
- Removed auto-linking from showdown gfm extension
2014-02-06 15:34:13 +00:00
John-David Dalton
6eab7b3f92 Replace underscore with lodash. 2014-02-06 14:08:34 +00:00
Hannah Wolfe
ca01b732b2 Fixing App unit test on Windows
- switched test from exact string to regex to match both types of paths
2014-02-06 11:58:58 +00:00
balduv
eadbf7dffb Removed author tag inside channel tag in RSS
closes #2114
- instead of putting author in feedOptions of node-rss, it was moved to itemOptions
- supplying author: user ? user.name : null in itemOptions will still result to creating a dc:creator tag inside item tags so the info needed to have the author is still there like before
- node-rss should however still fix this quirk to not have that nasty author tag in channel tag when you supply author in feedOptions
2014-02-05 13:59:07 +08:00
Jacob Gable
c7713c1d27 Load Apps Sandboxed
- Based on suggestions from hswolff loading with a Module class approach
- Loads relative modules in child sandboxes
2014-02-04 15:46:31 -06:00
Xie JinBin
bcc57b677a Tag needs escaping. Wrongly call showSuggestions.
close #2087, fix #2089
- escape tag.
- do not call showSuggestions when key is UP/DOWN. or the selected tag will
  always be clear.
2014-02-04 23:31:50 +08:00
Zach Geis
d7e46f4aee Disable publish button until deffered is resolved
closes #2040
- save post disables the publish button
- publish button remains disabled until deffered object is resolved
2014-02-01 16:38:40 -06:00
John O'Nolan
79e1356b66 Override border on login input:focus
Fixes #2088
2014-01-31 18:30:14 +07:00
John O'Nolan
51fd62c118 Spit & Polish 2014-01-30 23:53:07 +07:00
Hannah Wolfe
5491f296ac Merge branch '0.4-maintenance' 2014-01-30 13:17:58 +00:00
Sebastian Gierlinger
d28bf3de4c Improve password reset token
no issue
- added check that a combination of email + expires is rejected after
10 attempts
- changed comparison to time independent method

Thanks to @chiiph for reporting this issue!
2014-01-30 13:00:30 +00:00
Hannah Wolfe
47c5e5aca4 Post settings published_at date improvements & fixes
closes #1866, fixes #2067, fixes #2068

- Upgrade client side moment to 2.4.0 to match the server side script.
- Add a guard to pub date to fix #2067
- Add new format to close #1866
2014-01-29 22:33:43 +00:00
Hannah Wolfe
c2bb793c36 Merge pull request #2052 from Borkason/patch-1
Fix dash-to-triple-hyphen replacement in generateSlug function.
2014-01-28 12:38:20 -08:00
Daniel Niccoli
d092b4ecd2 Altered integration test to cover dashes in slug 2014-01-28 21:27:05 +01:00
John O'Nolan
0750c34f3f Introduce default robots.txt 2014-01-28 20:05:59 +07:00
Hannah Wolfe
be9afc439c Merge branch '0.4-maintenance' 2014-01-28 09:25:38 +00:00
John O'Nolan
cf805181e6 Hide extra space taken up by update notification
See #1995
2014-01-28 09:07:36 +00:00
Hannah Wolfe
b4b7783ebd Merge pull request #2054 from ErisDS/issue-1995
Add body class if update is available
2014-01-28 00:53:45 -08:00
Hannah Wolfe
b429e1cfaf Merge pull request #2020 from redwallhp/master
Minor code cleanup of editor keyboard shortcut actions.
2014-01-27 14:36:20 -08:00
Hannah Wolfe
1f32428296 Merge pull request #1972 from jgillich/character-limit
Show character limit below blog description textarea
2014-01-27 14:32:52 -08:00
Lev Gimelfarb
6cf586aae6 Fix error page resources loading when forceAdminSSL is true
closes #1837
- moved admin theme static resource service above 'checkSSL', otherwise
  when forceAdminSSL is true it will try to redirect them to HTTPS, and
  error pages will be unstyled
2014-01-27 21:57:58 +00:00
Lev Gimelfarb
1df6ac3b94 Detect SSL connection whether or not behind a proxy
closes #1836
- adding server.enable('trust proxy') to let connect framework do the work
  of detecting X-Forwarded-Proto header
- replacing explicit checking for the X-Forwarded-Proto header with just
  'req.secure' boolean check
2014-01-27 21:55:32 +00:00
Paul Adam Davis
fa98a1ed18 Move styling from some elements from IDs to classes
Closes #1605

* Move styling for `#signup`, `#forgotten`, `#reset`, `#login`, `#usermenu` and `#notifications` to classes

No IDs have been added or removed, so any events shouldn't be affected and it passes all tests.
2014-01-27 21:50:19 +00:00
Hannah Wolfe
5e97bcb950 Merge pull request #2036 from xuduo35/0.4-maintenance
bug caused by unidecode's bug
2014-01-27 13:45:42 -08:00
Mikkel Hoegh
d45d036ecb Refactor click handlers on upload button.
closes #2028
- Instead of binding and unbinding the click event, bind the data to the
  outer scope so we can use a standard click handler.
- Use removeProp instead of setting the property to false when enabling.
- Use the `disabled` as value when disabling.
2014-01-27 21:35:24 +00:00
Hannah Wolfe
63ac0aa665 Merge pull request #2049 from javorszky/iss-1841
Guard against multiple signup events
2014-01-27 13:33:55 -08:00
Hannah Wolfe
b42962c97a Merge pull request #2035 from ErisDS/issue-1908
Post settings don't render on change
2014-01-27 13:29:28 -08:00
Hannah Wolfe
b9e426478d Add body class if update is available
issue #1995
2014-01-27 21:24:53 +00:00
Hannah Wolfe
485ab376c0 Post settings don't render on change
fixes #1908

- each individual update function handles rendering its own item on success or failure, rather than re-rendering the whole group
- also resolved a bug where the published date didn't get reset properly on error
2014-01-27 10:55:22 +00:00
Gabor Javorszky
f3e67f9a76 Guard against multiple signup events
Fixes #1841
* Added initial flag "no" for submission into Signup View
* Flag set to "yes" if submit button clicked
* Error thrown if flag is "yes", thus no subsequent submission sent to API
* Flag set to "no" if ajax returns with error
2014-01-26 22:38:50 +00:00
Hannah Wolfe
199a92d9cb Merge branch '0.4-maintenance'
Conflicts:
	core/server/config/paths.js
	core/test/unit/config_spec.js
2014-01-26 16:11:02 +00:00
Hannah Wolfe
7049d0f338 Improvement for published posts with no published_at
issue #2015

- this is another little workaround / improvement to try to reduce the number of people who end up with a published post with no published_at set
- I assume we need to complete #1655 to fix this properly
2014-01-26 12:05:27 +00:00
Xie JinBin
1d1caada6b bug caused by unidecode's bug
close #1986
- remove URL reserved chars after unidecode, because unidecode will produce some URL reserved chars.
2014-01-26 19:31:19 +08:00
Hannah Wolfe
b0345b6238 Merge pull request #2024 from jgillich/0.4-maintenance
Use absolute path when storing images
2014-01-26 02:45:24 -08:00
Harry Wolff
0ea22ab8d0 Have NProgress called for all ajax calls
fixes #2011

- rather than trigger NProgress for fetch calls
 I’ve moved it to be used for all sync calls

- issue #2011 was a result of NProgress only being
 called during a fetch() call, which when saving
 is not used - save() is.  Sync is used by all
 ajax calls.
2014-01-26 00:09:01 -05:00
redwallhp
03759cd03c Minor code cleanup of editor keyboard shortcut actions.
Signed-off-by: redwallhp <matt@ntugo.com>
2014-01-25 21:23:17 -05:00
Hannah Wolfe
951385ec2d Merge pull request #2025 from ErisDS/issue-2000
Start up safely when the activeTheme is not present
2014-01-25 13:06:41 -08:00
Hannah Wolfe
631c0f1900 Merge pull request #2018 from ErisDS/issue-1991
Catch errors when rendering the error template
2014-01-25 13:06:33 -08:00
Hannah Wolfe
b2e5ef4154 Catch errors when rendering the error template
fixes #1991

- if there's an error when rendering the error template, default to sending a plain response detailing both errors.
2014-01-25 20:43:28 +00:00
Hannah Wolfe
6ec7c42947 Start up safely when the activeTheme is not present
fixes #2000

- resolves errors when attempting to start Ghost without the active theme present
- the frontend will render a 500 error page safely
- issues with themes that have an error template are resolved separately in #2018
2014-01-24 22:14:56 +00:00
Hannah Wolfe
0322676657 Merge pull request #1979 from sebgie/fix-session-1
Fix for session handling
2014-01-24 13:20:01 -08:00
Jakob Gillich
1ee70e3849 Use absolute path when storing images
closes #1983
2014-01-24 16:16:57 +01:00
Hannah Wolfe
3961b7173f Upgrade express-hbs, and switch to using registerPartial
fixes #1964, fixes #1975

 - Issues with partial handling which caused #1964  have been part fixed by handlebars, part worked around by express-hbs, we must use `registerPartials` to ensure partials are handled correctly.
 - Issue with error handling which caused #1975 has also been fixed in express-hbs, which now catches the error from handlebars and passes it to express so that we can handle the error with an error page.
2014-01-24 11:08:15 +00:00
Hannah Wolfe
cccc19842e Merge pull request #2004 from ErisDS/issue-1992
Adding guard to meta_title
2014-01-22 12:38:53 -08:00
Hannah Wolfe
91f59e74af Merge pull request #1949 from jolros/symlinked-themes-bugfix
Including theme partials in a way that supports symbolically linked directories
2014-01-22 11:05:33 -08:00
Hannah Wolfe
20f4af2eb4 Adding guard to meta_title
fixes #1992
2014-01-21 17:24:24 +00:00
John O'Nolan
7ebd104f3f Rename 'plugins' to 'apps'
Fixes #1988
2014-01-21 15:45:27 +07:00
John O'Nolan
185f3c65cd Larger min-height for textareas, and size based on font size 2014-01-21 14:35:47 +07:00
John O'Nolan
b05f00087a Prevent form field descriptions from becoming unwieldily long
Yes that’s a word. As of now.
2014-01-21 14:33:05 +07:00
Hannah Wolfe
2aa7288777 Merge pull request #1948 from sebgie/issue#1932-1
Fix display update notification
2014-01-20 07:24:02 -08:00
Hannah Wolfe
d44555d3f1 Merge pull request #1950 from Damiya/1893-fix
Enable Escape key to close tag suggestion popup
2014-01-20 06:28:15 -08:00
Hannah Wolfe
7cd87c5a3c Merge pull request #1951 from Damiya/1902-fix
Prevent stacking of password mismatch notification on /reset/
2014-01-20 06:12:25 -08:00
Hannah Wolfe
39b9c1cf6b Merge pull request #1927 from schneidmaster/fix-1907
Fixed issue with adding multiple new tags to a post
2014-01-20 06:04:59 -08:00
Hannah Wolfe
6c222df83d Merge pull request #1956 from jaswilli/issue-1782
Show message and don't start if javascript files have not been built
2014-01-20 05:59:01 -08:00
Hannah Wolfe
f185a5d616 General cleanup
- Cleanup some todos, comments, and unused variables
2014-01-19 21:08:39 +00:00
Sebastian Gierlinger
2d75497ecf Fix for session handling
closes #1978
- wait for async calls before callback()
2014-01-18 20:14:38 +01:00
Jakob Gillich
02473ce852 Show character limit below blog description textarea
closes #1970
2014-01-17 21:39:43 +01:00
Jason Williams
d7c3dbb17e Show message and don't start if javascript files have not been built
fixes #1782
- added builtFilesExist function to check for files during startup.
  If built files do not exist Ghost startup is stopped and a link
  to the documentation is displayed.
- exported a scriptFiles object from server/helpers.
- added a builtScriptPath to the paths module.
- removed "js-msg" about missing javascript from the UI.
2014-01-15 19:10:43 +00:00
Hannah Wolfe
c1290d77a6 Merge pull request #1954 from ErisDS/issue-1498
Adding case-insensitive User.getByEmail method
2014-01-15 05:57:58 -08:00
Sebastian Gierlinger
03cbc89a53 Fix posts.html and posts.markdown field type
closes #1947
- added fieldtype: medium for posts.html
- changed fieldtype: medium for posts.markdown
- added method to fix databases created with wrong field type
- added tests for database version 002
2014-01-15 14:29:23 +01:00
Hannah Wolfe
6098b83152 Adding case-insensitive User.getByEmail method
fixes #1498

- emails are no longer converted to lowercase, local mailbox can validly
  be mixed case
- getByEmail uses JS to compare emails to ensure we can support unicode
- tests that users can be retrieved by their email address with case
  insensitivity
2014-01-15 10:39:40 +00:00
Kate von Roeder
03fec0763e Prevent stacking of password mismatch notification on /reset/
closes #1902
- Missing call to clearEverything caused the new notifications to pile up on multiple failed submissions
2014-01-14 13:58:38 -08:00
Kate von Roeder
4dbf57f2d3 Enable Escape key to close tag suggestion popup
closes #1893
- Checking the contents of search term after evaluating the keycode caused the suggestion box to be hidden and immediately reshown
- Moving the if/else to the top of the function enables us to fix the issue without complicating the suggestion update logic
2014-01-14 13:17:06 -08:00
Sebastian Gierlinger
fd4f3051e6 Fix display update notification
closes #1932

- added showUpdateNotification with version check
- added temp workaround for boolean values in database
- changed default value from false to null
- updated tests
2014-01-14 20:46:36 +01:00
Joel Rosenberg
6437f343c1 Including theme partials in a way that supports symbolically linked directories
closes #1937
 - using fs.stat() instead of hasOwnProperty() to test for directory existence
2014-01-14 11:43:23 -08:00
Zach Schneider
fa7bd62857 Fixed issue with adding multiple new tags to a post
Fixes #1907

Refactored `updateTags` to correct a loop issue where the `insert`
method was mistakingly being passed rather than `update`, triggering a
duplicate PK SQL error.
2014-01-13 09:29:40 -05:00
Hannah Wolfe
f71ce8ac07 Publish date and time display fix
no issue

- add @ symbol to ensure date and time are clear
2014-01-13 02:39:08 +00:00
Hannah Wolfe
c8917cab4d Error message updates
no issue

- couple of tweaks to the messaging of non-fatal errors that can be output when running Ghost
2014-01-12 21:49:24 +00:00
Hannah Wolfe
9f0dea0559 Minor fixes to asset helper and tests
no issue

- asset helper ignores it if theme devs specify the asset dir
- asset helper strips leading slashes
- static asset tests were wrong
2014-01-12 21:48:34 +00:00
Hannah Wolfe
3dea6431df Ensure cookies are only ever set for admin
fixes #1901

- Adds a trailing slash to the cookie path
- Resolves random log-outs
- Adds a test which proves the case
2014-01-12 17:08:48 +00:00
Hannah Wolfe
198e936423 No select or text cursor on rendered preview
fixes #1595

- prevents the backspace key from doing terrible things
2014-01-11 16:05:33 +00:00
Hannah Wolfe
d6f4312255 Improve errors on image upload 2014-01-11 13:40:21 +00:00
Zach Schneider
09b3fb6b3f Prevented duplicate binding of upload button on debug importer
Fixes #1899
2014-01-10 18:08:24 -05:00
Hannah Wolfe
b11e6e066b Change help text wording on settings page 2014-01-10 20:05:38 +00:00
Hannah Wolfe
c833946e54 Merge pull request #1894 from ErisDS/issue-1558
Notifications can be dismissed with ESC
2014-01-09 13:24:41 -08:00
Hannah Wolfe
eae2147265 Notifications can be dismissed with ESC
issue #1558

- this is a partial / short term fix for the problem with extra long notifications, so that there is at least one way to remove them.
2014-01-09 20:34:16 +00:00
Matt Florence
d1b265be4a Shims for deleted (refactored away) files
closes #1873.
During file system merge upgrades of new releases, old files are not removed and node's require loads the old file instead of all the new ones in the new directory. The files in this commit act as a delegate for all other dependent scripts. These shim files explicitly require the new index.js.
2014-01-09 09:21:09 -06:00
Hannah Wolfe
629e622561 Merge pull request #1888 from hswolff/additional-ux
Update placeholder of published data in editor
2014-01-09 05:04:09 -08:00
Hannah Wolfe
5eadaa441a Merge pull request #1886 from jgable/progressBarOnDelete
Fix hanging loading bar on deleting a post
2014-01-09 03:50:11 -08:00
Harry Wolff
0fd718f700 Update placeholder of published data in editor
fixes #1351

- when a post has a published_at value show a blank
placeholder

- when a post doesn’t have a published_at
value then show the required published at value
format
2014-01-07 23:13:16 -05:00
Jacob Gable
d255746b53 Fix hanging loading bar on deleting a post
Closes #1869

- Added an additional event listener for destroy event, then a listener
on the model for the sync event to finish the progress bar loader
2014-01-07 18:56:00 -06:00
nicovalencia
e8746a2375 Add rss to the list of reserved post titles/slugs.
closes #1880
- added `rss` to core/server/models `generateSlug` reserved keywords
- added integration test for safe slug generation to core/test/integration/model/model_posts_spec.js
2014-01-07 17:30:53 -07:00
John O'Nolan
8f02b3341b Fixed tag display issues
The tags UI is pretty messed up all round. This fix makes it work properly at least on desktop. Mobile needs a lot more love. This is a followup to #1774 and most problems stemming originally from #710
2014-01-07 23:29:59 +01:00
Jakob Gillich
f8299ed769 Fix TypeError due to missing mail config 2014-01-07 22:35:22 +01:00
John O'Nolan
5a638ed421 Fix John being stupid
See #1878
2014-01-07 22:20:32 +01:00
John O'Nolan
3dd8f76a27 Speed up heinous slow animations 2014-01-07 22:19:52 +01:00
John O'Nolan
066637aca1 Update post settings checkbox
* Fixed display bug in firefox, cause firefox is utter shit. Closes #1878
* Fixed minor animation bug where checkmark was missing transitions on click
2014-01-07 21:54:16 +01:00
Hannah Wolfe
7a5e5d7f1f Merge pull request #1877 from JohnONolan/old-todos
Get rid of old todos
2014-01-07 10:53:35 -08:00
Hannah Wolfe
bbcabcb849 Merge pull request #1876 from JohnONolan/comment-tweak
Amended comment
2014-01-07 10:53:03 -08:00
Hannah Wolfe
03a8200fa0 Merge pull request #1875 from wangsai/fix-date
fix missused Date obj
2014-01-07 10:52:41 -08:00
John O'Nolan
c8bc6fe7bf Get rid of old todos
Cause they’re already fucking done
2014-01-07 19:20:16 +01:00