Skip to content

Commit

Permalink
Add Aloha editor
Browse files Browse the repository at this point in the history
Add aloha editor for editing your content
  • Loading branch information
srsgores authored and richtera committed Jan 5, 2013
1 parent 7a20c12 commit f1caf41
Show file tree
Hide file tree
Showing 486 changed files with 12,587 additions and 671 deletions.
286 changes: 121 additions & 165 deletions .idea/workspace.xml

Large diffs are not rendered by default.

946 changes: 535 additions & 411 deletions lib/cli/Download.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions modules/core/assets/templates/list.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<% contents.forEach(function(item) { %>
<div class = 'content-list-item content-list-item-<%- item.status %> content-type-<%- item.contentType %>'>
<section class = 'content-list-item content-list-item-<%- item.status %> content-type-<%- item.contentType %>'>
<h2><a href = '/<%= item.alias %>.html'><%- item.title %></a></h2>

<p><%- item.teaser %> ... <a href = '/<%= item.alias %>.html'>more</a></p>
</div>
</section>
<% }); %>
<%- pager %>
3 changes: 2 additions & 1 deletion modules/core/assets/templates/show.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div class = 'asset-item'>
<h2><a href = '/<%= content.alias %>.html'><%- content.title %></a></h2>

<p class = 'by'>By <a href = '/user/profile/<%- content.author %>'><%- content.displayAuthor.name %></a></small>
<p class = 'by'>By
<a href = '/user/profile/<%- content.author %>'><small><%- content.displayAuthor.name %></small></a></p>

<p class = 'status'><%- content.status %></p>

Expand Down
1 change: 1 addition & 0 deletions modules/downloaded/calipso-aloha-master/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.redcar/
90 changes: 90 additions & 0 deletions modules/downloaded/calipso-aloha-master/aloha.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/**
* Enable rich forms (Aloha Editor)
*/
var rootpath = process.cwd() + '/',
path = require('path'),
calipso = require(path.join(rootpath, 'lib/calipso'));

/**
* Turns form date elements into jQUery UI Datepickers
* REQUIRES jQuery & jQuery UI to be included in the theme ...
*/
exports = module.exports = {
init: init,
route: route,
disable: disable,
reload: reload,
depends:["content","contentTypes"]
};

/**
* ROute
*/
function route(req, res, module, app, next) {

module.router.route(req, res, next);

};

/**
*Init
*/
function init(module, app, next) {

calipso.lib.step(
function defineRoutes() {
// Add a route to every page, ideally just do it on form pages, but can't tell atm
module.router.addRoute(/.*/, allPages, {
end: false,
template: 'aloha.script',
block: 'scripts.aloha'
}, this.parallel());
module.router.addRoute(/.*/, allPages, {
end: false,
template: 'aloha.style',
block: 'styles.aloha'
}, this.parallel());
},
function done() {
app.use(calipso.lib.express["static"](__dirname + '/static'));
next();
});
};

/**
* Every page block function
*/
function allPages(req, res, template, block, next) {

calipso.theme.renderItem(req, res, template, block, {}, next);

};

/**
* Show a blank page to enable the rich form preview
* This requires that you have a layout called preview, that basically has no header, footer, navigation
* etc. or you wont get desired results.
*/
function showPreview(req, res, template, block, next) {

res.layout = "preview";
next();

};


/*
* Disable - same as reload
*/
function disable() {
reload();
}

/**
* Reload
*/
function reload() {

// Reset the Form methods to their defaults
// TODO!
}
12 changes: 12 additions & 0 deletions modules/downloaded/calipso-aloha-master/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "aloha",
"label": "Aloha Rich Text Editor",
"description": "Enables the Aloha editor for text area controls.",
"version": "0.1.0",
"homepage": "http://github.com/nhemsley/calipso-aloha",
"repository": {
"type": "git",
"url": "git://github.com/nhemsley/calipso-aloha.git"
},
"author": "Nicholas Hemsley <[email protected]>"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.GENTICS_editable {
display: inline-block;
outline: #62555E solid 3px;
width: 70%;
min-height: 20em;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.9.3
2010-11-26 12:56:25

Large diffs are not rendered by default.

327 changes: 327 additions & 0 deletions modules/downloaded/calipso-aloha-master/static/js/aloha/aloha.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2010 John Resig, http://jquery.com/

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Binary file not shown.
Loading

0 comments on commit f1caf41

Please sign in to comment.