Should close#37. There are persistent and passive notifications.
Persistent ones:
* are stored on `ghost.notifications`.
* have an api made to add / remove them with client side ajax logic (probably not the most elegant, but works)
* uses a modified `flashes.hbs` template
* will only disappear if user closes the bar
* stack
Passive
* added with backbone view / collection combo
* stack
* disappears on navigation and when user closes it
This fixes the event where text would be selected after manipulation from shortcut, the cursor is now placed after the text. On links and images the url field text is highlighted.
Additional shortcuts;
* Ctrl+U: Make text uppercase
* Ctrl+Shift+U: Make text lowercase
* Ctrl+Alt+Shift+U: Make text titlecase
* Ctrl+Alt+W: Select word
* Ctrl+L: Make into list
- fixed the test that the fixture change broke (sort of). We should be using separate fixtures for tests really, unless we want to test something about a Ghost install.
- updated readme with better docs
- This is a first pass at getting a more logical structure. The focus is on moving from admin/frontend to client/server.
- The location of the databases is highly important, this isn't expected to change again
In the future
- client/assets should probably become public/
- more stuff should be shared (helpers etc)
- cleanup some confusion around tpl and views
- moved template logic out of individual helpers and into Ghost
- simplified template-driven helpers into closures which maintain the context of handlebars
- with handlebars context we have access to data, so don't need to pass data in
- check data to test that it is a simple object and not a function
- moved helpers back into index.js
- provided tests for both template functions in ghost and the nav helper so we are back to where we were
- fixed a bug whereby once you visit the homepage the homepage menu item is always marked as the active page
- this was due to passing the config object being done by reference rather than by value, and therefore setting the selected item was persisted.
- updated navigation and pagination helpers to use SafeString
- nav and pagination don't need triple taches any more
- nav tests updated, and renamed to match helper name
- Removing mocha-as-promised as this seemed to cause problems with later tests.
- Making failure mode for tests consistent.
- increasing timeout for pagination - would love to know why this is needed
The grunt-mocha-test task seems to be causing problems with our
beforeEach handlers in some cases. The grunt-mocha-cli task runs the
mocha command using grunt.util.spawn for more consistent results
- updated fixtures so that even short-term we have valid data
- added methods to the base model that marshall the data in and out of the db so it is always an RFC 2822 date never ISO 8601
- turned off SQL debugging now the bug is resolved
- minor change to the date listing template, as we don't need to check for updated_at now that the data is correct - but should use published date anyway
Some more bits for slug generation
- fixes a bug in generation and some tests
- makes sure that deduplicated slugs get a hyphen before the number
- added %<>|^~£" to reserved chars
- added a few extra comments
- The addition of published/draft statuses to the post model on the frontend was being returned to the server.
- These additional properties are client-side only and are now unset before the model is saved
- issue #154, issue #224 and issue #220
- change port number from 3333 to 2368
- change main file name from app.js to index.js
- update README & package.json to match
- adds dateFormat handlebars helper for client side with extra option to format in time since style
- adds this extra dateFormat option to existing server side helper.
- adds scss for draft and scheduled status
- adds true/false values to post for draft and published to validate in handlebars
- changes admin>content post collection query to order posts by updated_at values in router.js
- adds minified moment.js and links to moment.js and helper.js for clientside
- Adding activePlugins array to config.js
- Adding a loadPlugins function to ghost.js
- Tweaking fancyFirstChar.js so that it works again, getting rid of the function wrapper and constructor
- renamed helper from ghostNav to nav and file from ghostNav to navigation
- switched template to use current-menu-item as per the styles
- cleaned up several unused items from config, and removed default link to admin
- updated tests
- closes#124
- added new middleware to detect if a route should be admin or not
- updated ghostLocals to use this and return different locals
- updated ghost.js#initTheme to use the same test
- adds routes for homepage pagination
- adds helper function to compile template file for pagination
- adds next and prev to post for next and previous page
- adds handlebars template for pagination
In order to remove the iiwf we need to be able to lint backend and frontend code separately.
Changed our devDependency for grunt-jslint to use a fork which has multiTask (PR sent to main repo)
Updated Gruntfile with split rules for the jslint tasks
As a result, a few files failed to pass the new rules, these have been fixed and added to the commit
Added a basic UI and implementation for importing and exporting data.
Hooked up the routes and tested importing and exporting a version 001
file.
Slipped in the TemplateView in base.js but didn't end up using it. I
think it will encapsulate common logic for template views pretty well.
Should close#175.
- adds keys @rowStart and @rowEnd in foreach helper based on an argument passed in for the number of columns desired
- added setKeys function to remove duplication code
Further changes to the data model to ensure created_by, author_id and updated_by are all set to user 1
Updated settings such that the default type is always 'general', and changed the types in the fixtures to be slightly more useful
Added additional assertions to tests to cover more assumptions about data
- ghost.js - split the settings loading out of ghost.init, so that we have a function for loading / reloading settings
- api.js - implemented a new requestHandler, the cachedSettingsRequestHandler which handles all aspects of local caching for settings when making requests
- app.js - updated the settings api routes to use the new cached request handler
- ghost.js - globals/globalConfig has become settings / settingsCache to make it clearer
- app.js - the ghostGlobals local cache is gone, and the use of res.locals has been cleaned up and simplified, although this needs to be properly split into frontend and admin locals (to be finished in #124)
- frontend/index.js - doesn't need to be passed globals and nav properties as res.locals does this for us
Solves #138.
* Removed user and user_roles from fixture
* Restricted user creation to one user. That user is id 1, is admin
* Changed tests so they accommodate for this fact
* Can not create new user (fails on test, flashes on signup)
Accounted for top offset to keep login container centred. Login container fades in on load.
Tested on a variety of window sizes and appears to be centred on all of them (measured it to make sure).
Now included in `$(window).resize();` to update location of Login
container. The login is now more of a visually 'true' centre, with the offset being more towards the top.
Centring on resize, wasn't in original commit to remove one extra event listener.
This also includes the updated Header tag shortcuts.
Also fixes keyboard shortcuts being broken due to `this` not being passed into shortcut each function.
- Fixed broken html
- Added file input to html
- Styling for hidden file input button
- Styling for progress bar and loading
- Added javascript classes for hooking file upload
- Added loading image (cat)
This implements #106.
* Added require-tree which is based off of @ricardobeat's module. Fully async.
* I've moved active theme and active directory to settings from config as well.
* Modified settings.hbs and settings.js to display the raw json under Settings/Appearance
Added & removed many properties as required & fixed tests
Updated & also cleaned up the fixtures, inc images
Added order by published to the findPage query
- Created Role model
- Created Permission model
- Linked Users->Roles with a belongsToMany relationship
- Linked Permissions to Users and Roles with a belongsToMany relationship
- Created permissions helper with functions for initializing and
checking permissions (canThis)
- Unit tests for lots of things
* master:
Adding proper copyright info for Ghost Foundation
Amending pagination test to have a longer timeout until #110 is done
server half of #83, posts are draft by default, browse shows published by default
Adding proper copyright info for Ghost Foundation
- Modified jsonDataProvider to return promises for findAll and save
- Move the dataProvider initialization into the Ghost.init() function.
- Created basic unit test
Currently using jQuery.each not _.each. Can be easily changed with
```
_.each(MarkdownShortcuts, function(short) {
shortcut.add(short.key, function () {
return editor.addMarkdown({style: short.style});
});
});
```
* master:
done handler in final then, to ensure errors in last block are reported
missing a done or two
using grunt validate for npm test, fixing random jslint errors
using promises correctly in tests
adding mocha, getting npm test working
Switching over to abstracted data provider meant that email_address
accidentally got passed to the model as email and therefore could not
be found. This is now resolved.
Also, added trailing slash to register route, which I believe should be there
There is now a login page. Trying to access any authenticated route will redirect you to a login page if you are not logged in.
Logging in works with the same hard-coded username and password & remembers you for a session.
Logging in will redirect you to your original route.
Flashes are present although they don't really appear in the right place.
Moving towards using an API which we can both expose publicly, and use internally.
Due to issues with JugglingDB, this breaks updating contentHTML on edit
Also, language, status, featured etc are all no long set / updated.