Commit Graph

3768 Commits

Author SHA1 Message Date
Jason Williams
aa333363fe Merge pull request #5479 from ErisDS/author-relation
Use 'author' for relation instead of 'author_id'
2015-06-24 09:01:20 -05:00
John O'Nolan
648f006fc5 Firefucks
Firefox can't do flexbox, because why would a modern browser be able to do flexbox? Cray.
Closes #5438, Closes #5401 - same fix but vh unit because % unit is hella unreliable.
2015-06-24 12:17:49 +01:00
John O'Nolan
0928ed118e Fight fire with overflow.
Prevents firefox from allowing blog title to overflow. This is an incredibly stupid fix for an incredibly stupid browser bug. Firefox is the worst modern browser in the world at basic layout rendering. Could someone let them know please? Closes #5430 as replacement.
2015-06-24 12:16:58 +01:00
John O'Nolan
b9793c0364 First pass colour audit
This gets rid of old and un-used, or lesser-used colour variables.
2015-06-24 12:15:48 +01:00
Hannah Wolfe
7705e30995 Use 'author' for relation instead of 'author_id'
- this clears a todo in the codebase & gets rid of a few lines of unnecessary code
2015-06-24 10:00:24 +01:00
cobbspur
8a8e90e9a2 Take Trashcan off of url screen for image uploader
closes #5433
- add gh-input class to inputs
- stop the incorrect addition of trash can on url page
- fix trigger of upload success to show loading in editor
- fix duplicate url field for images outside of editor when there is no file storage
2015-06-23 13:14:04 +01:00
Jason Williams
78361c25af Fix up editor/preview scroll and post list loading
Refs #5381
- Invoke this._super() so mixed in lifecycle hooks run.
2015-06-22 11:35:17 -05:00
Sebastian Gierlinger
564d64bac4 Merge pull request #5444 from ErisDS/api-pagination3
Abstract findPage & add pagination Bookshelf plugin
2015-06-22 17:48:10 +02:00
Hannah Wolfe
7761873db7 Abstract findPage & add pagination Bookshelf plugin
closes #2896

- move default options / custom code into model functions
- move most of the filtering logic into base/utils.filtering (to be relocated)
- move the remainder of findPage back into base/index.js and remove from posts/users&tags
- move pagination-specific logic to a separate 'plugin' file
- pagination provides new fetchPage function, similar to fetchAll but handling pagination
- findPage model method uses fetchPage
- plugin is fully unit-tested and documented
2015-06-22 10:20:47 +01:00
Hannah Wolfe
cb2aedf52e Merge pull request #5455 from jomahoney/grunt-failure
Removes whitespace issue that was preventing grunt init from working
2015-06-20 23:54:46 +01:00
Austin Burdine
adff47704f update simple-auth to 0.8.0 2015-06-19 23:51:30 -04:00
John O'Mahoney
4ac3d1718a Removes whitespace issue that was preventing grunt init from working
closes #5454
- removed the second email therefore removing whitespace issue
2015-06-19 19:43:53 +01:00
Hannah Wolfe
6ea411c3b4 Merge pull request #5452 from jaswilli/issue-5450
Always get latest post from API when editing
2015-06-19 15:04:22 +01:00
Jason Williams
1cd703f775 Merge pull request #5451 from cobbspur/userRoutes
Move users routes out of settings & change to team
2015-06-18 14:20:06 -05:00
cobbspur
f67147a685 Move users routes out of settings & change to team
issue #5434

- move users routes/views/controllers out of settings
- rename users team
- update nav-menu.hbs
- remove legacy routes
- fix up tests
2015-06-18 19:46:46 +01:00
Jason Williams
7e3cf6efd9 Always get latest post from API when editing
Closes #5450
- No longer provide the edit route a model when transitioning from the
  posts list/content screen and no longer check to see if a copy of the
  post already exists in the store from the model hook.
2015-06-18 11:53:40 -05:00
Hannah Wolfe
8fe8f8a07b Merge pull request #5447 from kevinansfield/signin-no-email-notification
Provide a more intuitive error message on sign-in for missing email
2015-06-18 17:24:33 +01:00
Sebastian Gierlinger
7adad8da9d Merge pull request #5449 from jaswilli/issue-5411
Ensure sqlite3 uses a single database connection
2015-06-18 08:37:22 +02:00
Jason Williams
c16db084a1 Ensure sqlite3 uses a single database connection
Closes #5411
- Using rewire on the config package circumvents the
  singleton nature of required packages, resulting in a
  second instance of knex and a second connection to the
  sqlite3 database.
2015-06-18 00:54:23 -05:00
Kevin Ansfield
db558e38ea Provide a more intuitive error message on sign-in for missing email
issue 4651#issuecomment-112141801
- display "Please enter an email" validation message rather than "Invalid Email" when no email is entered
2015-06-17 22:56:38 +01:00
Hannah Wolfe
4b90c3c308 Merge pull request #5442 from JohnONolan/noposts-fix
Fixes alignment bug on content management empty state
2015-06-17 22:40:06 +01:00
Kevin Ansfield
6d8bce86b8 Display correct minimum character count in setup's password field
issue #5314
- replace 7 (incorrect) with 8 (correct) in setup's password field placeholder text
2015-06-17 21:50:47 +01:00
Jason Williams
e7398b0694 Merge pull request #5445 from cobbspur/canHelper
Hide Nav Settings based on permissions
2015-06-17 14:47:15 -05:00
cobbspur
453833cd11 Hide Nav Settings based on permissions
closes #5403

- adds gh-user-can helper to group user by minimum permissions
- hide Nav settings menu for users below admin level
2015-06-17 19:20:57 +01:00
John O'Nolan
3f6b648394 Fixes alignment bug on content management empty state
When buttons changed to flexbox they lost some alignment properties. This change makes the container for the empty content state use a flexbox container and align its containing items correctly. Also removes some old media queries which are no longer needed.
2015-06-17 14:41:29 +01:00
Sebastian Gierlinger
f79a4f336b Merge pull request #5432 from ErisDS/api-pagination2
Refactor pagination count query
2015-06-17 15:35:18 +02:00
Kevin Ansfield
42b25a00e3 Ensure settings routes redirect to /signin when not authenticated
closes #5412
- call this._super() in beforeModel hooks so that simple-auth can handle the transition before we hit any protected API endpoints
2015-06-17 00:24:01 +01:00
Hannah Wolfe
3061247a7e Merge pull request #5431 from kowsheek/5370-settings-model-events
Add events to settings model
2015-06-16 20:46:15 +01:00
Kowsheek Mahmood
33e241ab4e Add events to settings model
issue #5370
- Add emit method to settings model
- Update settings spec to test for events emitted
- Fix formatting on tags spec
2015-06-16 23:57:52 +06:00
Hannah Wolfe
70e5554129 Merge pull request #5421 from augbog/augbog-feature
Issue #5371 added support for GET endpoint `/tags/slug/:slug`
2015-06-16 18:31:38 +01:00
Augustus Yuan
05fe09293f Add support for GET /tags/slug/:slug with unit tests
closes #5371
- added new endpoint to the api routes
- created unit tests based on PostModel and PostAPI for testing slug links
2015-06-16 09:22:12 -07:00
John O'Nolan
cc571da90d Fix signin form width bug
No issue. Fixes bug where signin form was not expanding to its full width as a result of some earlier global changes. This sets an explicit fluid width with a max-width fallback so that it's always the correct size.
2015-06-16 09:58:56 +01:00
Matt Enlow
906504e43b Merge pull request #5381 from acburdine/remove-extensions
Remove function prototype extensions
2015-06-15 14:21:49 -06:00
Hannah Wolfe
4cd2865021 Refactor pagination count query
refs #2896

- remove duplicate query-building code
- use the same approach for creating the count query from the main query
- restructure the code to match more closely across the 3 findPage functions (prep for further refactoring)
2015-06-15 19:24:47 +01:00
Austin Burdine
86e47ee4a9 removes usage of prototype extensions
No issue
- removes more usage of function prototype extensions in favor of Ember functions
- replaces some event calls with the direct function name
- adds comments to functions replaced with the event name
2015-06-15 14:07:25 -04:00
Hannah Wolfe
16f98ee80b Move pagination formatting into a util
refs #2896

- moves repeated code out of models
- creates a new file for unit-testable code (this should be moved in future)
- adds a default for `page` as that seems sensible
- adds 100% test coverage for the new file
2015-06-15 16:46:42 +01:00
Jason Williams
b6cbd2d4bd Merge pull request #5427 from ErisDS/api-reshuffle
API mini-cleanup + 405 errors
2015-06-15 10:26:11 -05:00
Jason Williams
225dc84367 Merge pull request #5417 from ErisDS/rss-url
Use urlJoin in RSS + test coverage
2015-06-15 10:23:41 -05:00
Hannah Wolfe
254e0f0597 Improve API error handling
close #2757, refs #5286

- moves error formatting from api/index into errors lib
- moves error handling from api/index into its own middleware
- adds extra middleware for method not allowed which captures all unsupported routes
2015-06-15 10:08:30 +01:00
Fabian Becker
b15f1daf5a Throw 405 - Method not allowed for api routes
closes #2757
- New error MethodNotAllowed
- Throw 405 if valid path but invalid method is used is apiRouter
- Adds api base tests
2015-06-15 09:43:39 +01:00
Hannah Wolfe
177cdf1eb1 Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
Jason Williams
8ae1447e78 Merge pull request #5408 from novaugust/cleanup-mobile-views
Remove legacy mobile view code
2015-06-14 17:59:44 -05:00
Jason Williams
e5a1fa7ad6 Merge pull request #5414 from novaugust/zelda-menu-continued
Zelda menu z-index and viewport transition finishes
2015-06-14 17:57:35 -05:00
Matt Enlow
df1c04b8d8 Remove legacy mobile view logic
No issue
- Move editor-base-view mixin into editor/edit view
- Also deletes mobile views and modifies files that were using it
- Helps pave the way for Ember 2.0, where views do not exist
2015-06-14 14:42:21 -07:00
Matt Enlow
6681ad4a7d Zelda menu z-index and viewport transition finishes
- [x] Mobilemenu button is missing from `content` and `editor` views
- [x] Mobilemenu pane slides entire content over, should expand over-top-of-content
- [x] Mobilemenu can't be closed
- [x] gh-view-title no longer generates an extra div; it is the h2.
- [x] gh-autonav-toggle closes the mobile menu on mobile. renamed `gh-menu-toggle`
- [ ] There is weird behaviour with mobile menu when changing from big=>small=>big viewport sizes
- ~~[ ] (Future issue) Ghost should remember (localstorage?) whether desktop menu is expanded or collapsed~~
2015-06-14 13:57:09 -07:00
Jason Williams
e00823626a Update ember-simple-auth to 0.8.0-beta.3 2015-06-12 16:35:40 -05:00
Alex Kleissner
05e49d9a96 Move uncapitalize into its own file.
refs #5286
- Moved the logic into its own file
- Added unit tests
2015-06-10 12:21:15 -07:00
John O'Nolan
596faf0009 Fix a wholelotta setup-screen bullshit
Merging setup screen into the new app wrapper had some knock-on effects due to new flexbox parent elements. As a result things were vertically collapsing in unexpected ways on narrow viewports. This is cleaned up here, with some other minor visual bugfixes.
2015-06-10 19:49:50 +01:00
Hannah Wolfe
c1e3bd0786 Merge pull request #5415 from hex337/move-decide-is-admin
Moves the decideIsAdmin into its own file.
2015-06-10 09:51:48 +01:00
Hannah Wolfe
34b22eefa2 Use urlJoin in RSS + test coverage
refs #1833

- move RSS tests to be in rss_spec.js
- improve RSS test coverage
- fix a bug with RSS title generation for tag RSS feeds
- replace custom code in processUrls with urlJoin
2015-06-10 09:18:52 +01:00