Commit Graph

81 Commits

Author SHA1 Message Date
Hannah Wolfe
879b6afbc5 Display serverside HTML notifications correctly
refs #4964

- persistent notifcations from the server contain HTML and should be marked HTML safe
2015-02-28 17:41:38 +00:00
Hannah Wolfe
31880e7cfa Merge pull request #4880 from jaswilli/client-model-tests
Add tests for admin client models
2015-02-02 19:03:40 +00:00
Jason Williams
d60fff9519 Add tests for admin client models 2015-02-01 21:41:55 +00:00
Harry Hope
6361976c39 ignore non-words in word counter 2015-02-01 01:22:20 -05:00
Jason Williams
1c07273f5a Update grunt-jscs dependency
No Issue
- grunt-jscs@1.2.0
- Clean up some instances of multiple spaces.
- Remove jscs:disable for regexes now that jscs better supports them.
2015-01-16 18:06:20 +00:00
Jason Williams
e6fd1b89c0 Rework Labs feature toggling
Refs #4750
- Make "Feature" a Controller with promise support.
- Use via 'needs' instead of injecting from an initializer because
  we need authenticated access to the API.
- Check whether feature is enabled when entering Code Injection route.
2015-01-04 20:05:25 +00:00
Jason Williams
7c7dbb911c Merge pull request #4750 from ErisDS/labs-thing
Labs page checkboxes
2015-01-04 13:44:47 -06:00
Hannah Wolfe
c0fc7c5bcd Adds global feature manager
closes #4409
2015-01-03 14:25:04 +00:00
Robert Jackson
a1ed9adf92
Remove ObjectController proxying behavior.
Ember.ObjectController (and Ember.ArrayController) will be deprecated in
Ember 1.11 (and removed from core in Ember 2.0). The reasoning is
detailed in the Ember 2.0 RFC.

This PR does the following:

* Updates templates/controllers/views to explicitly reference model
  properties (instead of relying on proxying behavior).
* Clearly delineate where certain properties are being set or retrieved
  from (for example it was not clear exactly where `scratch` and
  `titleScratch` were stored).
* Remove usage of `Ember.ObjectController`.
* Add JSCS rule to prevent future PR's from adding regressions.
2015-01-01 21:51:20 -05:00
cobbspur
53d12a9659 Add view post link on published and updated posts
closes #1756

- adds a post url link to 'post updated' and 'post published' in editor
- adds join function in ghost paths
- adds a '/' detection to makeRoute method
- adds test for join function
2014-12-15 12:18:47 +00:00
Nazar Gargol
7e16ef328d Adds ctrl/cmd+s shortcut to whole application with a noop default
closes #4516
- shortcut for ctrl/cmd+s on application level
- shortens a syntax for any route that is using 'save' method, shortcuts object doesn't have to be defined at all, only the save action.
2014-12-08 19:08:40 +01:00
Nazar Gargol
df5a598718 Cleans up HTML data attributes on body in default.hbs
closes #4485

- removes data attributes used on body in default.hbs
- introduces new way to generate configuration through meta tags
- config initializer consumes configurations from the meta tags using parser
- moves blog_title helper/value to be a property in a configuration api
2014-11-29 17:09:43 +01:00
Felix Rieseberg
7c4381c812 Dynamic Titles in Ghost Admin
- Every route can set a title token that is combined with the blog’s
title, resulting in titles like ‘Content - Test Blog’.
- Subroutes are supported (‘Settings - General - Test Blog’)
- The blog’s name is applied to and taken from the `config` object to
spare Ember a REST call via `store.find(‘settings’)`.
- Tests have been changed to test for the new titles.
- The initially proposed solution
(https://github.com/paddle8/ember-document-title) doesn’t play nice
with EAK, which is why I went with this solution
(https://gist.github.com/machty/8413411) by Ember.JS core dev @Machty.
2014-11-27 15:41:00 -08:00
Hannah Wolfe
c0155c208e Revert "Update PSM Date and Time to be Selectable Instead of Text" 2014-11-17 17:09:01 +00:00
David Balderston
dff9751105 Update PSM Date to be Selectable 2014-11-16 11:59:09 -08:00
Nazar Gargol
a9cb2efe8c Adds 'save' shortcut to settings screens
closes #4414
- adds `ctrl/cmd+s` shortcuts to `settings/general` screen
- adds `ctrl/cmd+s` shortcuts to `settings/user/xx` screen
- extracts `ctrlOrCmd` variable to separate module for reuse
2014-11-13 19:36:31 +01:00
Matt Enlow
b5af691a61 Save meta title and meta desc on post save
Closes #4369
- Renamed `editor-route-base` -> `editor-base-route` to bring it in alignment with the view and controller mixins
- Consolidated editor route code into editor-base-route
- Removed `serialize` from EditorEditRoute, as it reimplemented the ember default
2014-11-03 21:11:04 -07:00
Jason Williams
0f17378b26 Enable JSCS checking on client.
Refs #4001
- grunt-jscs@0.8.1 which provides ES6 support.
2014-10-25 16:13:04 +00:00
Robert Jackson
a3456b7e1c Remove lodash from admin client.
* Adds `bind`, `isFinite`, and `isNumber` utility functions from lodash.
* Use new util funtions instead of lodash throughout the codebase.
* Remove lodash from vendor builds.
2014-10-23 18:27:09 +00:00
Paul Adam Davis
6fd27796f4 Implement popovers 2014-10-20 22:09:45 +01:00
Mattias Cibien
f2b2cf2519 Clean up hardcoded ghost paths
closes #4144
- made contributors template use the `gh-path` helper
- Removing blogRoot from application.js
- made error image use the `gh-path` helper
2014-10-06 16:33:58 +02:00
Hannah Wolfe
086f96489e Merge pull request #4147 from ErisDS/shortcuts
Minor shortcut amends
2014-09-25 16:50:31 +01:00
Robert Jackson
5b30a51adf Enable cycling header levels with ctrl+h.
closes #3019

* Remove preexisting `ctrl+h` keymap.
* Add logic to cycle the header level.
  * Loops around after h3.
  * Sets cursor position to end of heading
  * Set initial level to h2.
* Remove `ctrl+alt+${NUM}` keymaps (as they do not work
  internationally).
2014-09-24 18:14:04 +01:00
Hannah Wolfe
4508ca2fa3 Minor shortcut amends
issue #1463

- disables some of codemirrors default shortcuts to prevent them clashing
- minor cleanup of shortcut listing
2014-09-24 16:11:17 +01:00
Matt Enlow
09fb17a2be Abstract mobile transition interactions
Closes #4032
- Created "mobile" views: `parent-view`, `content-view` and `index-view`
- `mobile/parent-view` has three callbacks for managing layout, and a mediaQuery listener to keep in sync with the user
- content-view and index-view use their parent-views callbacks to bring themselves into and out of the viewport as appropriate
- fixed media queries for post content list from 800px to 900px
- Created `mobile-index-route` to intelligently transition to a new route on desktops (used by both PostsIndexRoute and SettingsIndexRoute)
- Extract mobile interactions from settings views to new mobile utility views
- `js-` prefixed settings view transitions
- removed unused openEditor action from PostsRoute
- removed unused mobile util "responsiveAction"
2014-09-16 07:28:03 -06:00
Fabian Becker
1f8b323285 Remove active class from buttons.
refs #3989
- Remove active class from {{#link-to tagName="button" ..}}
2014-09-09 22:21:39 +00:00
Paul Adam Davis
53a4a6a010 Enlarge mobile matchMedia max-width
Closes #3941

It now matches the mobile MQ in CSS - https://github.com/TryGhost/Ghost/blob/master/core/client/assets/sass/components/navigation.scss#L163
2014-09-02 22:20:16 +01:00
Matt Enlow
737ea3f65e Implement About Ghost page
Closes #3568
- Deleted html placeholders in client
- Added new grunt task, buildAboutPage, which 1)creates -contributors.hbs partial and 2) downloads contributor avatars
- buildAboutPage is called by anything that does an emberTemplates task
- Removed unused code from ghostpaths
2014-09-02 13:49:01 -06:00
Jake Wright
349fd649f8 Fix markdown/preview tab for mobile
Fixes #3813

- Add togglePreview action to controller
- Implement action and bind attributes
- Remove the now pointless
- Update to comply with issue suggestions
2014-08-21 17:13:30 +01:00
Matt Enlow
20f40e7e32 Change Ember function.property() to Ember.computed
Closes #3417
2014-08-19 10:01:17 -06:00
Felix Rieseberg
6710a1da89 Working CopyHTML shortcut
closes #3481
- Pressing Ctrl/CMD+Shift+C in the editor will open up a modal that
contains the generated HTML for either the selected text or the whole
post
2014-08-19 15:05:26 +01:00
Robert Jackson
493fe8183b
Activate specific tab that is tapped/clicked. 2014-08-07 09:32:10 -04:00
Hannah Wolfe
0d5e199632 Merge pull request #3580 from felixrieseberg/iss3543
Insert inline code shortcut for editor
2014-08-03 17:28:39 +01:00
Felix Rieseberg
ec188c66d8 Insert inline code shortcut for editor
closes #3543
- Wired up existing code shortcut in codemirror-shortcuts.js in
editor-shortcuts.js
2014-08-02 23:40:12 -07:00
Maurice Williams
da279de71b Replacing "touch start" with "tap" event, provided by hammer.js
fixes #3502
2014-08-03 01:36:46 -04:00
Jason Williams
dd50cca97a Refactor notifications to prevent stacking.
Closes #3511, Closes #3512, Closes #3526
- show* methods now close existing passive notifications by
  default.  They also now take an optional options object where
  existing parameters such as "delayed" and "defaultErrorText"
  can be passed in as well as the new "doNotClosePassive" flag.
- Removed all explicit calls to notifications.closePassive except
  for the few places where it makes sense to call it separately.
2014-08-01 16:57:29 +00:00
Sebastian Gierlinger
3792598a31 Update spam prevention
closes #3468
- added rate limit to deny more than 5 attempt every hour
- updated spam prevention to be configurable
- added config values spamTimeout, ratePeriod, rateAttempts
- added ratePeriod:1 to config.example.js to prevent functional tests
from hitting the rate limit
- commented spam test, I’ll fix it tomorrow
2014-08-01 00:58:32 +02:00
Robert Jackson
3cf9034c90 Cleanup CodeMirror shortcuts.
* Add titleize utility function.
  * Capitalizes first word.
  * Capitalizes all words not contained in simple article/conjunction
    list.
* Enable shortcuts for `uppercase`, `lowercase`, and `titlecase`.
* Fix header shortcuts
  * Ensure that header shortcuts do not duplicate text.
  * Make headers idempotent (pressing `ctrl+alt+1` then
    `ctrl+alt+2` does not make `# # # blah`.
2014-07-31 10:53:13 -04:00
Matt Enlow
a7444bf338 Keyboard shortcuts for Mac vs All
Closes #3029, Ref #3469
- Editor shortcuts are now built in a separate file, which uses `ctrlOrCmd` to correctly set OS specific shortcuts.
- Removed `newLine` and `selectWord` shortcuts
2014-07-31 08:00:52 -06:00
Hannah Wolfe
0ffc5e6d47 Improve importer error messaging
closes #3274

- Ensure that validation errors are always handled by moving them into the
  importer
- Ensure that db errors are handled consistently across sqlite and mysql
- Change the errors to be output in a table, with a short failure notification
- Add tests for 003 importing bad files
2014-07-29 12:02:18 +01:00
Sebastian Gierlinger
d895238571 Add XSS prevention
closes #3387
- added placeholder for <script> and <iframe>
- added google-caja sanitizer
- changed title in posts overview to ‚double-stash‘
2014-07-27 23:03:01 +02:00
Hannah Wolfe
4d610268c6 Merge pull request #3259 from novaugust/settings-mobile-routing
Refactor Settings routing and mobile interactions
2014-07-15 16:55:02 +01:00
Matt Enlow
58b635203c Remove minor notifications; Close persistent notifications even on error
Closes #3105, Closes #3175

- Removed notification on successful post's `page` status change
- Removed notification on successful post `featured` status change
- Added `closePassive()` notifications on error in the post-settings-menu
- Persistent notifications will close whether their `DELETE` request was
  successful or not.

 #### Misc
- Added `name` attribute to `post-setting-menu.hbs` inputs to facilitate testing
- Removed `return <Promise>` from action in `PostSettingsMenuController`. Actions should only return `true`
- Toggling `post.featured` won't fire NProgress.
2014-07-15 09:03:18 -06:00
Matt Enlow
153f76aa7c Refactor settings routing and mobile interactions
Closes #3254, closes #3138, closes #3245
 ### Settings Routing and View refactoring
- Refactored `SettingsView` to handle transitions between mobile and desktop layouts
- `SettingsRoute` will only transition to `settings.general` if the screen is large enough to show both the menu and the content
- Added `SettingsIndexView` to handle showing the settings menu on mobile screens
- Added `SettingsContentBaseView` to be inherited by any settings view that is not index.
- Updated Settings templates appropriately to work with new views
- Removed extraneous `active` class from `settings-content`
- Changed settings menu to use `gh-activating-list-item`
- Retooled settings tests

 ### Mobile Utils
- Renamed file to `mobile.js`, since it's inside of `utils/`
- Added `mobileQuery` MediaQueryList to help detect layout changes
- Removed unused `hasTouchScreen`, `device.js` should be used instead.
- Removed unused `smallScreen` function
- Moved FastClickInit to codemirror-mobile
2014-07-14 17:36:48 -06:00
Harry Wolff
4f727ed068 Settings: Admin User Tab
closes #2422

- updated to use new change password method
- have all save settings use notifications
- create assetUrl helper for creating asset paths with subdir's properly
 prefixed
- move all url based helpers onto a url object in ghost-paths
2014-07-14 08:52:06 -04:00
Jason Williams
1bf975af90 Turn on update notifications for Ember admin
Issue #3160
- Use notifications API to display available update notification.
- Remove update_notification handlebars helper as now both the
  check for an available update and the notification handling
  is run from the server's admin controller index method.
- Bind the notification's location property to a css class
  for styling.
- Refactor Ember notifications to better handle notification
  objects.  Move responsibility for css class generation onto
  the notification component.
- Refactor gh-notifications component to take a location argument
  that's used to assign a css class and filter notifications.
2014-07-11 15:02:26 +00:00
Hannah Wolfe
0febf71c97 Merge pull request #3216 from novaugust/mobile-menu
Fix mobile sidebar menu
2014-07-07 20:38:04 +01:00
Matt Enlow
77941275ed Fix mobile sidebar menu
Closes #3110
- Created `ApplicationView`
- Added `js-close-sidebar` classes to navbar navigation links
- Clicking on a navigation link in the sidebar will close it
2014-07-07 08:55:22 -06:00
Matt Enlow
c1dc9841c7 Add yearless date as an acceptable format for moment parsing
Closes #2331
2014-07-06 20:49:15 -06:00
Kevin Ansfield
7e2e8b3376 Persistent notifications
closes #3057
- add Notification model
- update injected Notifications object to handle persistent notifications
- load server notifications on setup if logged in otherwise on successful sign-in
- changed all existing notifications.closeAll calls to closePassive
- fixed dismissable/dismissible spelling in server API & tests
- add notifications.closeNotification method so DELETE calls can be made for server-originating notifications
2014-07-01 11:36:21 +02:00