Permalink
Browse files

Add aloha as core module

Module from srsgores/devel moved from downloaded/calipso-aloha-master to core/aloha
  • Loading branch information...
1 parent b46b380 commit 09248969c408692272ec99110db9973731f1ced4 @richtera richtera committed Jan 5, 2013
Showing 1,574 changed files with 207,896 additions and 0 deletions.
@@ -0,0 +1 @@
+.redcar/
@@ -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!
+}
@@ -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 <nick.hems@gmail.com>"
+}
@@ -0,0 +1,23 @@
+/* This file should only contain import statements, only one each for
+ * the core and plugins, so that it is easy to make variations of this
+ * file that exclude some plugins.
+ */
+@import "aloha-core.css";
+@import "../plugins/common/abbr/css/abbr.css";
+@import "../plugins/common/ui/css/ui.css";
+@import "../plugins/common/link/css/link.css";
+@import "../plugins/common/characterpicker/css/characterpicker.css";
+@import "../plugins/common/highlighteditables/css/highlighteditables.css";
+@import "../plugins/common/horizontalruler/css/horizontalruler.css";
+@import "../plugins/common/block/css/block.css";
+@import "../plugins/common/align/css/align.css";
+@import "../plugins/common/image/css/image.css";
+@import "../plugins/common/table/css/table.css";
+@import "../plugins/extra/cite/css/cite.css";
+@import "../plugins/extra/formatlesspaste/css/formatless.css";
+@import "../plugins/extra/wai-lang/css/wai-lang.css";
+@import "../plugins/extra/numerated-headers/css/numerated-headers.css";
+@import "../plugins/extra/ribbon/css/ribbon.css";
+@import "../plugins/extra/headerids/css/headerids.css";
+@import "../plugins/extra/metaview/css/metaview.css";
+
@@ -0,0 +1,21 @@
+@import "aloha-reset.css";
+@import "aloha-sidebar.css";
+@import "../lib/vendor/repository-browser/css/repository-browser.css";
+
+.aloha-editable {
+ min-height: 1.2em;
+ outline: none;
+}
+
+.aloha-editable ::selection,
+.aloha-editable ::-moz-selection {
+ background: #80B5F2;
+ color: white;
+}
+
+.aloha-textarea {
+ overflow: hidden;
+ border: 1px solid #ccc;
+ padding: 6px;
+ overflow: auto;
+}
@@ -0,0 +1,25 @@
+/**
+ * Aloha CSS reset.
+ * Original by Eric Meyer. Modified for use in Aloha.
+ * Every element used in the Aloha Editor UI should have a an appropriate reset here.
+ */
+
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+
+.aloha div, .aloha span, .aloha button, .aloha a, .aloha img,
+.aloha ol, .aloha ul, .aloha li, .aloha label {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+
+/* HTML5 display-role reset for older browsers */
+.aloha ol, .aloha ul {
+ list-style: none;
+}
@@ -0,0 +1,218 @@
+.aloha-sidebar-bar {
+ z-index: 999999999;
+ position: fixed;
+ top: 0;
+ left: 0;
+ text-align: left;
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ border-right: 1px solid #888;
+ -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, .5);
+ -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, .5);
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, .5);
+}
+
+.aloha-sidebar-bar.aloha-sidebar-right {
+ left: auto;
+ right: 0;
+ border-right-width: 0;
+ border-left: 1px solid #888;
+}
+
+.aloha-sidebar-inner {
+ position: relative;
+ background-color: #ccc;
+ background-image: -webkit-radial-gradient(rgba(0, 0, 0, 0.0) 20%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0.3) 100%);
+ background-image: -moz-radial-gradient(rgba(0, 0, 0, 0.0) 20%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0.3) 100%);
+}
+
+.aloha-sidebar-panels {
+ margin: 0;
+ padding: 15px 0;
+}
+
+.aloha-sidebar-panels li {
+ overflow: hidden;
+ margin: 0;
+ padding: 0 15px;
+}
+
+.aloha-sidebar-panel-top {
+ -webkit-border-top-left-radius: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -moz-border-radius-topleft: 5px;
+ -moz-border-radius-topright: 5px;
+}
+
+.aloha-sidebar-panel-content.aloha-sidebar-panel-bottom {
+ padding-bottom: 0;
+ -webkit-border-bottom-left-radius: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ -moz-border-radius-bottomright: 5px;
+ border-bottom-width: 1px;
+}
+
+.aloha-sidebar-panel-title {
+ position: relative;
+ overflow: hidden;
+ padding: 8px 0 0 8px;
+ border: 1px solid rgba(0, 0, 0, 0.3);
+ border-bottom-width: 0;
+ background-color: #303539;
+ background-image: -webkit-gradient(linear, center top, center bottom, color-stop(0.00, #6c6f74), color-stop(0.05, #4c4f54), color-stop(0.10, #3f4448), color-stop(0.45, #383d41), color-stop(0.50, #303539), color-stop(0.95, #33363b));
+ background-image: -moz-linear-gradient(center top, #6c6f74 0%, #4c4f54 5%, #3f4448 10%, #383d41 45%, #303539 50%, #33363b 95%);
+ color: #ccc;
+ cursor: pointer;
+ font-size: 13px;
+ font-weight: bold;
+ line-height: 1.5em;
+ text-shadow: 0 0 6px #23262b;
+}
+
+.aloha-sidebar-panel-title:hover {
+ color: #fff;
+}
+
+.aloha-sidebar-panel-title-arrow {
+ position: absolute;
+ top: 8px;
+ left: 8px;
+ width: 16px;
+ height: 16px;
+ background: url(../img/arrow.png) no-repeat center center;
+ opacity: 0.3;
+}
+
+.aloha-sidebar-panel-title:hover .aloha-sidebar-panel-title-arrow {
+ opacity: 0.9;
+}
+
+.aloha-sidebar-panel-title .aloha-sidebar-panel-title-arrow.aloha-sidebar-panel-title-arrow-down {
+ background-image: url(../img/arrow-down.png);
+}
+
+.aloha-sidebar-panel-title-text {
+ margin-left: 24px;
+ white-space: nowrap;
+}
+
+.aloha-sidebar-panel-content {
+ overflow: hidden;
+ height: 5px;
+ background: #303539;
+}
+
+.aloha-sidebar-panel-content-inner {
+ margin: 5px 0 0;
+ padding: 0;
+ color: #888;
+ background: #fff;
+ background-image: -webkit-radial-gradient(rgba(0, 0, 0, 0.0) 50%, rgba(0, 0, 0, 0.1) 90%, rgba(0, 0, 0, 0.2) 100%);
+ background-image: -moz-radial-gradient(rgba(0, 0, 0, 0.0) 50%, rgba(0, 0, 0, 0.1) 90%, rgba(0, 0, 0, 0.2) 100%);
+}
+
+.aloha-sidebar-panel-content input {
+ margin: 5px;
+ padding: 5px;
+}
+
+.aloha-sidebar-handle {
+ position: absolute;
+ top: 30px;
+ right: -30px;
+ width: 40px;
+ height: 30px;
+ overflow: hidden;
+ background-color: #303539;
+ background-image: -webkit-gradient(linear, center top, center bottom, color-stop(0.00, #6c6f74), color-stop(0.05, #4c4f54), color-stop(0.10, #3f4448), color-stop(0.45, #383d41), color-stop(0.50, #303539), color-stop(0.95, #33363b));
+ background-image: -moz-linear-gradient(center top, #6c6f74 0%, #4c4f54 5%, #3f4448 10%, #383d41 45%, #303539 50%, #33363b 95%);
+ cursor: pointer;
+
+ -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, .5);
+ -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, .5);
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, .5);
+
+ border-top-right-radius: 5px;
+ border-bottom-right-radius: 5px;
+ -moz-border-radius-topright: 5px;
+ -moz-border-radius-bottomright: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+}
+
+.aloha-sidebar-right .aloha-sidebar-handle {
+ left: -30px;
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0px;
+ -moz-border-radius-topright: 0px;
+ -moz-border-radius-bottomright: 0px;
+ -webkit-border-top-right-radius: 0px;
+ -webkit-border-bottom-right-radius: 0px;
+
+ border-top-left-radius: 5px;
+ border-bottom-left-radius: 5px;
+ -moz-border-radius-topleft: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ -webkit-border-top-left-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+}
+
+.aloha-sidebar-handle-icon {
+ display: block;
+ position: absolute;
+ top: 5px;
+ right: 5px;
+ background: url(../img/arrow.png) no-repeat center center;
+ width: 20px;
+ height: 20px;
+ opacity: 0.5;
+}
+
+.aloha-sidebar-right .aloha-sidebar-handle-icon {
+ left: 5px;
+ right: auto;
+}
+
+.aloha-sidebar-handle-icon.aloha-sidebar-handle-icon-left {
+ background-image: url(../img/arrow-left.png);
+}
+
+.aloha-sidebar-panel-parent-path {
+ background-color: #303539;
+ background-image: -webkit-gradient(linear, center top, center bottom, color-stop(0.00, #6c6f74), color-stop(0.05, #4c4f54), color-stop(0.10, #3f4448), color-stop(0.45, #383d41), color-stop(0.50, #303539), color-stop(0.95, #33363b));
+ background-image: -moz-linear-gradient(center top, #6c6f74 0%, #4c4f54 5%, #3f4448 10%, #383d41 45%, #303539 50%, #33363b 95%);
+ color: #fff;
+ cursor: pointer;
+ font-size: 12px;
+ text-shadow: 0 0 6px #23262b;
+ white-space: nowrap;
+ line-height: 1em;
+}
+
+.aloha-sidebar-panel-parent-path:hover {
+ opacity: 0.9;
+}
+
+.aloha-sidebar-panel-parent-path span {
+ display: inline-block;
+ padding: 0 10px 0 5px;
+ background: url(../img/breadcrumb-divider.png) no-repeat right center;
+ opacity: 0.25;
+ line-height: 1.6em;
+}
+
+.aloha-sidebar-panel-parent-path span:first-child {
+ font-weight: bold;
+ opacity: 0.8;
+}
+
+.aloha-sidebar-panel-parent-path span:last-child {
+ background: none;
+}
+
+.aloha-sidebar-panel-parent-content {
+ padding: 4px;
+ background-image: -webkit-gradient(linear, center top, center bottom, color-stop(0.0, rgba(0, 0, 0, 0.25)), color-stop(0.05, rgba(0, 0, 0, 0.0)));
+ background-image: -moz-linear-gradient(center top, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.0) 5%);
+}
Oops, something went wrong.

0 comments on commit 0924896

Please sign in to comment.