Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into feature/socket.io-mvc

  • Loading branch information...
commit 9762d1520469e8ba6ab463d570312189ab0c30e8 2 parents e2739b5 + 3037cfc
@Techwraith Techwraith authored
Showing with 3,365 additions and 8,450 deletions.
  1. +2 −0  .gitignore
  2. +8 −9 Jakefile
  3. +6 −0 README.md
  4. +22 −34 bin/cli.js
  5. +1 −1  deps/color.js
  6. +12 −0 deps/templato/lib/engines/handlebars.js
  7. +18 −6 deps/templato/lib/engines/mustache.js
  8. +7 −0 deps/templato/lib/templato.js
  9. +2 −1  examples/todo_app_coffee/config/environment.coffee
  10. +0 −25 examples/todo_app_jade/app/controllers/application.js
  11. +0 −30 examples/todo_app_jade/app/controllers/main.js
  12. +0 −83 examples/todo_app_jade/app/controllers/todos.js
  13. +0 −22 examples/todo_app_jade/app/models/todo.js
  14. +0 −45 examples/todo_app_jade/app/views/layouts/application.html.jade
  15. +0 −6 examples/todo_app_jade/app/views/main/index.html.ejs
  16. +0 −31 examples/todo_app_jade/app/views/todos/_form.html.jade
  17. +0 −2  examples/todo_app_jade/app/views/todos/add.html.jade
  18. +0 −2  examples/todo_app_jade/app/views/todos/edit.html.jade
  19. +0 −14 examples/todo_app_jade/app/views/todos/index.html.jade
  20. +0 −5 examples/todo_app_jade/app/views/todos/show.html.jade
  21. +0 −31 examples/todo_app_jade/config/development.js
  22. +0 −14 examples/todo_app_jade/config/environment.js
  23. +0 −6 examples/todo_app_jade/config/init.js
  24. +0 −32 examples/todo_app_jade/config/production.js
  25. +0 −37 examples/todo_app_jade/config/router.js
  26. +0 −3,363 examples/todo_app_jade/public/css/bootstrap.css
  27. +0 −610 examples/todo_app_jade/public/css/bootstrap.min.css
  28. +0 −567 examples/todo_app_jade/public/css/bootstrap.responsive.css
  29. +0 −3  examples/todo_app_jade/public/css/bootstrap.responsive.min.css
  30. +0 −50 examples/todo_app_jade/public/css/style.css
  31. BIN  examples/todo_app_jade/public/favicon.ico
  32. BIN  examples/todo_app_jade/public/img/glyphicons-halflings-white.png
  33. BIN  examples/todo_app_jade/public/img/glyphicons-halflings.png
  34. BIN  examples/todo_app_jade/public/img/whitey.png
  35. +0 −1,722 examples/todo_app_jade/public/js/bootstrap.js
  36. +0 −1  examples/todo_app_jade/public/js/bootstrap.min.js
  37. +0 −4 examples/todo_app_jade/public/js/jquery.min.js
  38. +76 −69 lib/app.js
  39. +112 −68 lib/base_controller.js
  40. +0 −1  lib/cluster/hack_message_parser.js
  41. +13 −26 lib/cluster/master.js
  42. +3 −4 lib/cluster/master_dispatch.js
  43. +1 −0  lib/cluster/server.js
  44. +1 −1  lib/cluster/worker.js
  45. +2 −3 lib/geddy.js
  46. +0 −2  lib/i18n/index.js
  47. +3 −6 lib/init/i18n.js
  48. +21 −27 lib/model/adapters/mongo.js
  49. +2 −2 lib/model/adapters/riak/index.js
  50. +24 −14 lib/model/index.js
  51. +1 −10 lib/response/errors.js
  52. +4 −3 lib/routers/regexp_router.js
  53. +7 −10 lib/server.js
  54. +2 −8 lib/sessions/stores/memcache.js
  55. +8 −14 lib/sessions/stores/mongodb.js
  56. +8 −13 lib/sessions/stores/redis.js
  57. +0 −14 lib/template/adapters/ejs.js
  58. +7 −27 lib/template/adapters/handlebars.js
  59. +2 −9 lib/template/adapters/jade.js
  60. +10 −26 lib/template/adapters/mustache.js
  61. +7 −4 lib/template/engines/ejs.js
  62. +12 −14 lib/template/helpers/action.js
  63. +108 −227 lib/template/helpers/index.js
  64. +125 −76 lib/template/helpers/utils.js
  65. +4 −3 lib/template/index.js
  66. +1 −0  lib/template/templates/empty.html.ejs
  67. +42 −11 lib/utils/array.js
  68. +57 −0 lib/utils/compat.js
  69. +36 −25 lib/utils/date.js
  70. +78 −2 lib/utils/file.js
  71. +2 −0  lib/utils/index.js
  72. +27 −1 lib/utils/object.js
  73. +231 −28 lib/utils/sorted_collection.js
  74. +475 −137 lib/utils/string.js
  75. +81 −35 lib/utils/uri.js
  76. +215 −165 lib/utils/xml.js
  77. +0 −50 lib/watch_files.js
  78. +1 −1  package.json
  79. +79 −40 site/features.html
  80. +278 −274 site/tutorial.html
  81. +96 −39 templates/Jakefile
  82. +6 −4 templates/resource/model.ejs
  83. +5 −5 templates/scaffold/controller.ejs
  84. +6 −4 templates/scaffold/model.ejs
  85. +15 −15 templates/scaffold/views/ejs/add.html.ejs.ejs
  86. +20 −15 templates/scaffold/views/ejs/edit.html.ejs.ejs
  87. +1 −1  templates/scaffold/views/ejs/index.html.ejs.ejs
  88. +3 −1 templates/scaffold/views/ejs/show.html.ejs.ejs
  89. +0 −6 templates/scaffold/views/handlebars/add.html.hbs
  90. 0  templates/scaffold/views/{mustache/show.html.ms → handlebars/add.html.hbs.ejs}
  91. 0  templates/scaffold/views/{mustache/show.html.hbs → handlebars/edit.html.hbs.ejs}
  92. 0  templates/scaffold/views/{mustache/index.html.ms → handlebars/index.html.hbs.ejs}
  93. 0  templates/scaffold/views/{mustache/layout.html.ms → handlebars/layout.html.hbs.ejs}
  94. 0  templates/scaffold/views/{mustache/edit.html.ms → handlebars/show.html.hbs.ejs}
  95. +15 −15 templates/scaffold/views/jade/add.html.jade.ejs
  96. +21 −17 templates/scaffold/views/jade/edit.html.jade.ejs
  97. +1 −1  templates/scaffold/views/jade/index.html.jade.ejs
  98. +10 −9 templates/scaffold/views/jade/show.html.jade.ejs
  99. 0  templates/scaffold/views/mustache/{add.html.ms → add.html.ms.ejs}
  100. 0  templates/scaffold/views/{handlebars/show.html.hbs → mustache/edit.html.ms.ejs}
  101. 0  templates/scaffold/views/{handlebars/index.html.hbs → mustache/index.html.ms.ejs}
  102. 0  templates/scaffold/views/{handlebars/layout.html.hbs → mustache/layout.html.ms.ejs}
  103. 0  templates/scaffold/views/{handlebars/edit.html.hbs → mustache/show.html.ms.ejs}
  104. +0 −30 test/event_buffer.js
  105. +2 −2 test/model/create_user.js
  106. +2 −2 test/model/datatypes.js
  107. +2 −2 test/{ → routers}/regexp_router.js
  108. +20 −5 test/{ → templates}/ejs.js
  109. +19 −4 test/{ → templates}/handlebars_mustache.js
  110. +75 −5 test/{ → templates}/helpers.js
  111. +19 −4 test/{ → templates}/jade.js
  112. +64 −0 test/utils/array.js
  113. +69 −0 test/utils/date.js
  114. +45 −0 test/utils/event_buffer.js
  115. +86 −0 test/utils/object.js
  116. +19 −5 test/{ → utils}/sorted_collection.js
  117. +287 −0 test/utils/string.js
  118. +137 −0 test/utils/uri.js
  119. +76 −0 test/utils/xml.js
  120. +0 −53 test/xml.js
View
2  .gitignore
@@ -1,3 +1,4 @@
+v8.log
*.swp
*.swo
auth_info.js
@@ -12,3 +13,4 @@ tmtags
examples/*/log/*
.log
npm-debug.log
+doc/
View
17 Jakefile
@@ -42,13 +42,10 @@ var p = new jake.NpmPublishTask('geddy', [
, 'test/**'
]);
-// TODO: This is hacky -- need a better way to poke Jake to
-// set up the package part included in the publish-task
-jake.Task['npm:definePackage'].invoke();
-
testTask = new jake.TestTask('Geddy', function () {
this.testName = 'testBase';
this.testFiles.include('test/*.js');
+ this.testFiles.include('test/**/*.js');
this.showDescription = false;
});
@@ -58,10 +55,12 @@ task('test', function () {
t.addListener('error', function (err) {
var module
, cmd
- , errMsg = err.message;
+ , errMsg = err.message
+ , match = errMsg.match('Cannot find module')
+ , absModuleName = errMsg.match(/'[a-zA-Z]*'/);
- if (errMsg.match('Cannot find module')) {
- module = errMsg.match(/'[a-zA-Z]*'/)[0].replace(/'/g, '')
+ if (match && absModuleName) {
+ module = absModuleName[0].replace(/'/g, '');
cmd = 'npm install ' + module;
jake.logger.log(module + ' is not installed; Jake will attempt to install it for you.');
jake.exec(cmd, function () {
@@ -69,14 +68,14 @@ task('test', function () {
t.addListener('complete', function () {
complete();
});
- t.invoke();
+ t.invoke.apply(t, arguments);
});
}
else {
throw err;
}
});
- t.invoke();
+ t.invoke.apply(t, arguments);
}, {async: true});
testTask = new jake.TestTask('Geddy model-adapters', function () {
View
6 README.md
@@ -158,6 +158,12 @@ Each of these items include a name and an optional type, if there's no type give
to string. The list of supported types are listed in the [model](https://github.com/mde/geddy/wiki/Models) documentation.
If no id property is given then a default id property will be created with the type of string.
+You can also use custom default properties:
+```
+geddy resource user name:default admin:boolean
+```
+The above example will use the property `name`(string) to display the items in the views instead of the default ID property, this way when generating scaffolds, it will look better out of the box.
+
### Routes
Routes are created in a similar fashion to Merb or Rails.
View
56 bin/cli.js
@@ -3,7 +3,6 @@
// Dependencies
var geddy = require('../lib/geddy')
, exec = require('child_process').exec
- , fs = require('fs')
, path = require('path')
, parseopts = require('../lib/parseopts')
, utils = require('../lib/utils/index');
@@ -36,26 +35,26 @@ usage = [
, ' --workers, -w Number of worker processes to start(Default: 2)'
, ' --debug, -d Sets the log level to output debug messages to'
, ' the console'
- , ' --help, -h Output this usage dialog'
- , ' --version, -v Output the version of Geddy that\'s installed'
, ' --jade, -j When generating views this will create Jade'
, ' templates(Default: EJS)'
, ' --handle, -H When generating views this will create Handlebars'
, ' templates(Default: EJS)'
- , ' --Mustache, -m When generating views this will create Mustache'
+ , ' --mustache, -m When generating views this will create Mustache'
, ' templates(Default: EJS)'
+ , ' --help, -h Output this usage dialog'
+ , ' --version, -v Output the version of Geddy that\'s installed'
, ''
, 'Commands:'
- , ' app [name] Create a new Geddy application'
- , ' resource [name] Create a new resource. A resource includes'
- , ' a model, controller and route'
- , ' scaffold [name] Create a new scaffolding. Scaffolding includes'
- , ' the views, a model, controller and route'
- , ' secret Generate a new application secret in'
- , ' `congig/environment`'
- , ' controller [name] Generate a new controller including views'
- , ' and and a route'
- , ' model [name] Generate a new model'
+ , ' app <name> Create a new Geddy application'
+ , ' resource <name> [attrs] Create a new resource. A resource includes'
+ , ' a model, controller and route'
+ , ' scaffold <name> [attrs] Create a new scaffolding. Scaffolding includes'
+ , ' the views, a model, controller and route'
+ , ' secret Generate a new application secret in'
+ , ' `congig/environment`'
+ , ' controller <name> Generate a new controller including an index view'
+ , ' and and a route'
+ , ' model <name> [attrs] Generate a new model'
, ''
, 'Examples:'
, ' geddy Start Geddy on localhost:4000 in development mode'
@@ -67,6 +66,9 @@ usage = [
, ' geddy resource user name admin:boolean'
, ' Generate a users resource with the model properties'
, ' name as a string and admin as a boolean'
+ , ' geddy scaffold user name:string:default'
+ , ' Generate a users scaffolding user name as the default'
+ , ' value to display data with'
, ''
].join('\n');
@@ -179,26 +181,12 @@ if(cmds.length) {
}
// Just `geddy` -- start the server
else {
- var relPath = '';
-
- // Search for the `config` directory needed to run Geddy
- // - up to 5 parent directories then show the usage
- for(var i = 0, len = utils.file.maxParentDir; i <= len; i++) {
- var configPath = path.join(cwd, relPath, 'config')
- , existsSync = typeof fs.existsSync == 'function' ?
- fs.existsSync : path.existsSync
- , geddyApp = existsSync(configPath);
-
- if(geddyApp) {
- break;
+ // Search for 'config' directory in parent directories
+ utils.fileUtils.searchParentPath('config', function(err, filePath) {
+ if(err) {
+ die(usage);
} else {
- // If 5 directories up show usage
- if(i === len) die(usage);
-
- // Add a relative parent directory
- relPath += '../';
- process.chdir(path.join(cwd, relPath));
+ start();
}
- }
- start(); // Start the server up
+ });
}
View
2  deps/color.js
@@ -151,4 +151,4 @@ function zalgo(text, options) {
return result;
};
return heComes(text);
-}
+}
View
12 deps/templato/lib/engines/handlebars.js
@@ -16,6 +16,18 @@ var TemplatoHandlebars = (function() {
return fn(data);
};
+ // Iterate over a object of helpers and assign them by name
+ TemplatoHandlebars.prototype.registerHelper = function(data) {
+ var helper;
+
+ for(helper in data) {
+ // Only functions are allowed to be assigned
+ if(typeof data[helper] === 'function') {
+ this.engine.registerHelper(helper, data[helper]);
+ }
+ }
+ };
+
return TemplatoHandlebars;
})();
View
24 deps/templato/lib/engines/mustache.js
@@ -1,8 +1,8 @@
require('../../color');
-var TemplatoHandlebars = (function() {
+var TemplatoMustache = (function() {
- function TemplatoHandlebars() {
+ function TemplatoMustache() {
try {
this.engine = this.engine || require('handlebars');
} catch(err) {
@@ -14,16 +14,28 @@ var TemplatoHandlebars = (function() {
}
};
- TemplatoHandlebars.prototype.compile = function(template, options) {
+ TemplatoMustache.prototype.compile = function(template, options) {
return this.engine.compile(template, options);
};
- TemplatoHandlebars.prototype.render = function(data, fn) {
+ TemplatoMustache.prototype.render = function(data, fn) {
return fn(data);
};
- return TemplatoHandlebars;
+ // Iterate over a object of helpers and assign them by name
+ TemplatoMustache.prototype.registerHelper = function(data) {
+ var helper;
+
+ for(helper in data) {
+ // Only functions are allowed to be assigned
+ if(typeof data[helper] === 'function') {
+ this.engine.registerHelper(helper, data[helper]);
+ }
+ }
+ };
+
+ return TemplatoMustache;
})();
-module.exports = TemplatoHandlebars;
+module.exports = TemplatoMustache;
View
7 deps/templato/lib/templato.js
@@ -34,6 +34,7 @@ Templato = (function() {
Templato.prototype.set = function(opts) {
opts = opts || {};
this.options = opts.options || {};
+ this.engineName = opts.engine;
this.engine = (function() {
switch(opts.engine) {
@@ -86,6 +87,12 @@ Templato = (function() {
data[helper] = Templato.helpers[helper];
}
+ // If engine is handlebars or mustache register function helpers
+ if(this.engineName === 'handlebars' || this.engineName === 'mustache') {
+ // Register all helpers with handlebars native registerHelpers method
+ this.engine.registerHelper(data);
+ }
+
return this.engine.render(data, this.compile());
};
View
3  examples/todo_app_coffee/config/environment.coffee
@@ -1,6 +1,7 @@
config =
- metrics:
+ ###metrics:
port: 4001
+ ###
module.exports = config
View
25 examples/todo_app_jade/app/controllers/application.js
@@ -1,25 +0,0 @@
-/*
- * Geddy JavaScript Web development framework
- * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
-*/
-
-var Application = function () {
-};
-
-exports.Application = Application;
-
-
-
View
30 examples/todo_app_jade/app/controllers/main.js
@@ -1,30 +0,0 @@
-/*
- * Geddy JavaScript Web development framework
- * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
-*/
-
-var Main = function () {
- this.index = function (req, resp, params) {
- this.respond(params, {
- format: 'html'
- , template: 'app/views/main/index'
- });
- };
-};
-
-exports.Main = Main;
-
-
View
83 examples/todo_app_jade/app/controllers/todos.js
@@ -1,83 +0,0 @@
-
-var Todos = function () {
- this.respondsWith = ['html', 'json', 'js', 'txt'];
-
- this.index = function (req, resp, params) {
- var self = this;
- geddy.model.adapter.Todo.all({status: {'in': ['open','done']}}
- , {sort: {status: -1, title: 1}}
- , function(err, todos){
- self.respond({params: params, todos: todos});
- });
- };
-
- this.add = function (req, resp, params) {
- this.respond({params: params});
- };
-
- this.create = function (req, resp, params) {
- var self = this
- , todo = geddy.model.Todo.create({
- title: params.title
- , id: geddy.string.uuid(10)
- , status: 'open'
- });
- todo.save(function (err, data) {
- if (err) {
- params.errors = err;
- self.transfer('add');
- }
- else {
- self.redirect({controller: self.name});
- }
- });
- };
-
- this.show = function (req, resp, params) {
- var self = this;
- geddy.model.adapter.Todo.load(params.id, function(err, todo){
- self.respond({params: params, todo: todo});
- });
- };
-
- this.edit = function (req, resp, params) {
- var self = this;
- geddy.model.adapter.Todo.load(params.id, function(err, todo){
- self.respond({params: params, todo: todo});
- });
- };
-
- this.update = function (req, resp, params) {
- var self = this;
- geddy.model.adapter.Todo.load(params.id, function (err, todo) {
- todo.status = params.status;
- todo.title = params.title;
- todo.save(function (err, data) {
- if (err) {
- params.errors = err;
- self.transfer('edit');
- }
- else {
- self.redirect({controller: self.name});
- }
- });
- });
- };
-
- this.remove = function (req, resp, params) {
- var self = this;
- geddy.model.adapter.Todo.remove(params.id, function(err){
- if (err) {
- params.errors = err;
- self.transfer('edit');
- }
- else {
- self.redirect({controller: self.name});
- }
- });
- }
-
-};
-
-exports.Todos = Todos;
-
View
22 examples/todo_app_jade/app/models/todo.js
@@ -1,22 +0,0 @@
-
-var Todo = function () {
-
- this.defineProperties({
- title: {type: 'string', required: true}
- , id: {type: 'string', required: true}
- , status: {type: 'string', required: true}
- });
-
- this.validatesPresent('title');
- this.validatesLength('title', {min: 5});
-
- this.validatesWithFunction('status', function (status) {
- return status == 'open' || status == 'done';
- });
-
- this.adapter = "Mongo";
-
-};
-
-Todo = geddy.model.register('Todo', Todo);
-
View
45 examples/todo_app_jade/app/views/layouts/application.html.jade
@@ -1,45 +0,0 @@
-!!! html
-
-html(lang="en")
- head
- meta(charset="utf-8")
- meta(name="description", content="")
- meta(name="author", content="")
- meta(name="viewport", content="width=device-width")
- title Geddy App | This app uses Geddy.js
-
- // The HTML5 shim, for IE6-8 support of HTML elements
- //if lt IE 9
- script(src="http://html5shim.googlecode.com/svn/trunk/html5.js")
-
- != scriptLink('/js/jquery.min.js', {type:'text/javascript'})
- != scriptLink('/js/bootstrap.min.js', {type:'text/javascript'})
-
- != styleLink('/css/bootstrap.min.css', {rel:'stylesheet'})
- != styleLink('/css/style.css', {rel:'stylesheet'})
- != styleLink('/css/bootstrap.responsive.min.css', {rel:'stylesheet'})
-
- // The fav and touch icons
- link(rel="shortcut icon", href="/images/favicon.ico")
- link(rel="apple-touch-icon", href="images/apple-touch-icon.png")
- link(rel="apple-touch-icon", sizes="72x72", href="images/apple-touch-icon-72x72.png")
- link(rel="apple-touch-icon", sizes="114x114", href="images/apple-touch-icon-114x114.png")
-
- body
- .navbar.navbar-fixed-top
- .navbar-inner
- .container
- a.btn.btn-navbar(data-toggle="collapse", data-target=".nav-collapse")
- span.i-bar
- i.icon-chevron-down.icon-white
- a.brand(href="/") Geddy App
- .nav-collapse
- ul.nav
- li.active
- a(href="/") Home
- //li
- a(href="http://geddyjs.org/tutorial.html") Tutorial
- a(href="http://geddyjs.org/docs.html") Docs
-
- .container
- != yield()
View
6 examples/todo_app_jade/app/views/main/index.html.ejs
@@ -1,6 +0,0 @@
-<!-- Lets talk about geddy -->
-<div class="hero-unit geddy-welcome-box">
- <h1>Hello, World!</h1>
- <p>You've created a Geddy app and your server is running. If you already know what you're doing, feel free to jump into your app logic.<!--, if not...</p>
- <p><a href="http://geddyjs.org/tutorial.html" class="btn btn-primary btn-large">Lets get you started »</a></p>-->
-</div>
View
31 examples/todo_app_jade/app/views/todos/_form.html.jade
@@ -1,31 +0,0 @@
-- var isUpdate = params.action == 'edit'
-- var formTitle = isUpdate ? 'Update this To Do Item' : 'Create a new To Do Item'
-- var action = isUpdate ? '/todos/' + todo.id + '?_method=PUT' : '/todos'
-- var deleteAction = isUpdate ? '/todos/' + todo.id + '?_method=DELETE' : ''
-- var btnText = isUpdate ? 'Update' : 'Add'
-- var doneStatus = isUpdate ? 'checked' : ''
-- var titleValue = isUpdate ? todo.title : ''
-- var errors = params.errors;
-
-form#todo-form.form-horizontal(action=action, method="POST")
- fieldset
- legend= formTitle
- .control-group
- label.control-label(for="title") Title
- .controls
- != contentTag('input', titleValue, { placeholder: 'enter title', name: 'title', class: 'span6' })
- - if(errors)
- p
- - for(var p in errors)
- div= errors[p]
- - if(isUpdate)
- .control-group
- label(for="status") Status
- .controls
- select(name="status")
- option open
- option done
- .form-actions
- != contentTag('input', btnText, { type:'submit', class: 'btn btn-primary' })
- - if(isUpdate)
- != contentTag('button', 'Remove', {class:'btn btn-danger', type:'submit', formaction: deleteAction, formmethod:'POST'})
View
2  examples/todo_app_jade/app/views/todos/add.html.jade
@@ -1,2 +0,0 @@
-.hero-unit
- = partial('_form', {params: params})
View
2  examples/todo_app_jade/app/views/todos/edit.html.jade
@@ -1,2 +0,0 @@
-.hero-unit
- = partial('_form', {params: params, todo: todo})
View
14 examples/todo_app_jade/app/views/todos/index.html.jade
@@ -1,14 +0,0 @@
-.hero-unit
- h2 To Do List
- != linkTo('Create a new To Do', { controller: 'todos', action: 'add' }, { class: 'btn pull-right' })
-
-- if(todos && todos.length)
-- for(var i in todos)
- .row.todo-item
- .span8
- h3
- != linkTo(todos[i].title, { controller: 'todos', id: todos[i].id, action: 'edit' })
- .span4
- h3
- i.icon-list-alt
- = todos[i].status
View
5 examples/todo_app_jade/app/views/todos/show.html.jade
@@ -1,5 +0,0 @@
-.hero-unit
- h3 Params
- ul
- - for (var p in params)
- li= p + ':' + params[p]
View
31 examples/todo_app_jade/config/development.js
@@ -1,31 +0,0 @@
-/*
- * Geddy JavaScript Web development framework
- * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
-*/
-
-var config = {
- detailedErrors: true
-, debug: true
-, hostname: null
-, port: 4000
-, sessions: {
- store: 'memory'
- , key: 'sid'
- , expiry: 14 * 24 * 60 * 60
- }
-};
-
-module.exports = config;
View
14 examples/todo_app_jade/config/environment.js
@@ -1,14 +0,0 @@
-var config = {
- db: {
- mongo: {
- db: 'test'
- }
- }
- /*
- metrics: {
- port: 4001
- }
- */
-};
-
-module.exports = config;
View
6 examples/todo_app_jade/config/init.js
@@ -1,6 +0,0 @@
-// Add uncaught-exception handler in prod-like environments
-if (geddy.config.environment != 'development') {
- process.addListener('uncaughtException', function (err) {
- geddy.log.error(JSON.stringify(err));
- });
-}
View
32 examples/todo_app_jade/config/production.js
@@ -1,32 +0,0 @@
-/*
- * Geddy JavaScript Web development framework
- * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
-*/
-
-var config = {
- detailedErrors: false
-, hostname: null
-, port: 4000
-, sessions: {
- store: 'memory'
- , key: 'sid'
- , expiry: 14 * 24 * 60 * 60
- }
-};
-
-module.exports = config;
-
-
View
37 examples/todo_app_jade/config/router.js
@@ -1,37 +0,0 @@
-/*
- * Geddy JavaScript Web development framework
- * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
-*/
-
-
-var router = new geddy.RegExpRouter();
-router.match('/').to({controller: 'Todos', action: 'index'});
-
-// Basic routes
-// router.match('/moving/pictures/:id').to(
-// {controller: 'Moving', action: 'pictures'});
-// router.match('/farewells/:farewelltype/kings/:kingid').to(
-// {controller: 'Farewells', action: 'kings'});
-// Can also match specific HTTP methods only
-// router.match('/xandadu', 'get').to(
-// {controller: 'Xandadu', action: 'specialHandler'});
-//
-// Resource-based routes
-// router.resource('hemispheres');
-
-router.resource('todos');
-exports.router = router;
-
View
3,363 examples/todo_app_jade/public/css/bootstrap.css
@@ -1,3363 +0,0 @@
-/*!
- * Bootstrap v2.0.0
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-nav,
-section {
- display: block;
-}
-audio, canvas, video {
- display: inline-block;
- *display: inline;
- *zoom: 1;
-}
-audio:not([controls]) {
- display: none;
-}
-html {
- font-size: 100%;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
-}
-a:focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-a:hover, a:active {
- outline: 0;
-}
-sub, sup {
- position: relative;
- font-size: 75%;
- line-height: 0;
- vertical-align: baseline;
-}
-sup {
- top: -0.5em;
-}
-sub {
- bottom: -0.25em;
-}
-img {
- max-width: 100%;
- height: auto;
- border: 0;
- -ms-interpolation-mode: bicubic;
-}
-button,
-input,
-select,
-textarea {
- margin: 0;
- font-size: 100%;
- vertical-align: middle;
-}
-button, input {
- *overflow: visible;
- line-height: normal;
-}
-button::-moz-focus-inner, input::-moz-focus-inner {
- padding: 0;
- border: 0;
-}
-button,
-input[type="button"],
-input[type="reset"],
-input[type="submit"] {
- cursor: pointer;
- -webkit-appearance: button;
-}
-input[type="search"] {
- -webkit-appearance: textfield;
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
-}
-input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button {
- -webkit-appearance: none;
-}
-textarea {
- overflow: auto;
- vertical-align: top;
-}
-body {
- margin: 0;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- line-height: 18px;
- color: #333333;
- background-color: #ffffff;
-}
-a {
- color: #0088cc;
- text-decoration: none;
-}
-a:hover {
- color: #005580;
- text-decoration: underline;
-}
-.row {
- margin-left: -20px;
- *zoom: 1;
-}
-.row:before, .row:after {
- display: table;
- content: "";
-}
-.row:after {
- clear: both;
-}
-[class*="span"] {
- float: left;
- margin-left: 20px;
-}
-.span1 {
- width: 60px;
-}
-.span2 {
- width: 140px;
-}
-.span3 {
- width: 220px;
-}
-.span4 {
- width: 300px;
-}
-.span5 {
- width: 380px;
-}
-.span6 {
- width: 460px;
-}
-.span7 {
- width: 540px;
-}
-.span8 {
- width: 620px;
-}
-.span9 {
- width: 700px;
-}
-.span10 {
- width: 780px;
-}
-.span11 {
- width: 860px;
-}
-.span12, .container {
- width: 940px;
-}
-.offset1 {
- margin-left: 100px;
-}
-.offset2 {
- margin-left: 180px;
-}
-.offset3 {
- margin-left: 260px;
-}
-.offset4 {
- margin-left: 340px;
-}
-.offset5 {
- margin-left: 420px;
-}
-.offset6 {
- margin-left: 500px;
-}
-.offset7 {
- margin-left: 580px;
-}
-.offset8 {
- margin-left: 660px;
-}
-.offset9 {
- margin-left: 740px;
-}
-.offset10 {
- margin-left: 820px;
-}
-.offset11 {
- margin-left: 900px;
-}
-.row-fluid {
- width: 100%;
- *zoom: 1;
-}
-.row-fluid:before, .row-fluid:after {
- display: table;
- content: "";
-}
-.row-fluid:after {
- clear: both;
-}
-.row-fluid > [class*="span"] {
- float: left;
- margin-left: 2.127659574%;
-}
-.row-fluid > [class*="span"]:first-child {
- margin-left: 0;
-}
-.row-fluid .span1 {
- width: 6.382978723%;
-}
-.row-fluid .span2 {
- width: 14.89361702%;
-}
-.row-fluid .span3 {
- width: 23.404255317%;
-}
-.row-fluid .span4 {
- width: 31.914893614%;
-}
-.row-fluid .span5 {
- width: 40.425531911%;
-}
-.row-fluid .span6 {
- width: 48.93617020799999%;
-}
-.row-fluid .span7 {
- width: 57.446808505%;
-}
-.row-fluid .span8 {
- width: 65.95744680199999%;
-}
-.row-fluid .span9 {
- width: 74.468085099%;
-}
-.row-fluid .span10 {
- width: 82.97872339599999%;
-}
-.row-fluid .span11 {
- width: 91.489361693%;
-}
-.row-fluid .span12 {
- width: 99.99999998999999%;
-}
-.container {
- width: 940px;
- margin-left: auto;
- margin-right: auto;
- *zoom: 1;
-}
-.container:before, .container:after {
- display: table;
- content: "";
-}
-.container:after {
- clear: both;
-}
-.container-fluid {
- padding-left: 20px;
- padding-right: 20px;
- *zoom: 1;
-}
-.container-fluid:before, .container-fluid:after {
- display: table;
- content: "";
-}
-.container-fluid:after {
- clear: both;
-}
-p {
- margin: 0 0 9px;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- line-height: 18px;
-}
-p small {
- font-size: 11px;
- color: #999999;
-}
-.lead {
- margin-bottom: 18px;
- font-size: 20px;
- font-weight: 200;
- line-height: 27px;
-}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- margin: 0;
- font-weight: bold;
- color: #333333;
- text-rendering: optimizelegibility;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
- font-weight: normal;
- color: #999999;
-}
-h1 {
- font-size: 30px;
- line-height: 36px;
-}
-h1 small {
- font-size: 18px;
-}
-h2 {
- font-size: 24px;
- line-height: 36px;
-}
-h2 small {
- font-size: 18px;
-}
-h3 {
- line-height: 27px;
- font-size: 18px;
-}
-h3 small {
- font-size: 14px;
-}
-h4, h5, h6 {
- line-height: 18px;
-}
-h4 {
- font-size: 14px;
-}
-h4 small {
- font-size: 12px;
-}
-h5 {
- font-size: 12px;
-}
-h6 {
- font-size: 11px;
- color: #999999;
- text-transform: uppercase;
-}
-.page-header {
- padding-bottom: 17px;
- margin: 18px 0;
- border-bottom: 1px solid #eeeeee;
-}
-.page-header h1 {
- line-height: 1;
-}
-ul, ol {
- padding: 0;
- margin: 0 0 9px 25px;
-}
-ul ul,
-ul ol,
-ol ol,
-ol ul {
- margin-bottom: 0;
-}
-ul {
- list-style: disc;
-}
-ol {
- list-style: decimal;
-}
-li {
- line-height: 18px;
-}
-ul.unstyled {
- margin-left: 0;
- list-style: none;
-}
-dl {
- margin-bottom: 18px;
-}
-dt, dd {
- line-height: 18px;
-}
-dt {
- font-weight: bold;
-}
-dd {
- margin-left: 9px;
-}
-hr {
- margin: 18px 0;
- border: 0;
- border-top: 1px solid #e5e5e5;
- border-bottom: 1px solid #ffffff;
-}
-strong {
- font-weight: bold;
-}
-em {
- font-style: italic;
-}
-.muted {
- color: #999999;
-}
-abbr {
- font-size: 90%;
- text-transform: uppercase;
- border-bottom: 1px dotted #ddd;
- cursor: help;
-}
-blockquote {
- padding: 0 0 0 15px;
- margin: 0 0 18px;
- border-left: 5px solid #eeeeee;
-}
-blockquote p {
- margin-bottom: 0;
- font-size: 16px;
- font-weight: 300;
- line-height: 22.5px;
-}
-blockquote small {
- display: block;
- line-height: 18px;
- color: #999999;
-}
-blockquote small:before {
- content: '\2014 \00A0';
-}
-blockquote.pull-right {
- float: right;
- padding-left: 0;
- padding-right: 15px;
- border-left: 0;
- border-right: 5px solid #eeeeee;
-}
-blockquote.pull-right p, blockquote.pull-right small {
- text-align: right;
-}
-q:before,
-q:after,
-blockquote:before,
-blockquote:after {
- content: "";
-}
-address {
- display: block;
- margin-bottom: 18px;
- line-height: 18px;
- font-style: normal;
-}
-small {
- font-size: 100%;
-}
-cite {
- font-style: normal;
-}
-code, pre {
- padding: 0 3px 2px;
- font-family: Menlo, Monaco, "Courier New", monospace;
- font-size: 12px;
- color: #333333;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-code {
- padding: 3px 4px;
- color: #d14;
- background-color: #f7f7f9;
- border: 1px solid #e1e1e8;
-}
-pre {
- display: block;
- padding: 8.5px;
- margin: 0 0 9px;
- font-size: 12px;
- line-height: 18px;
- background-color: #f5f5f5;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, 0.15);
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- white-space: pre;
- white-space: pre-wrap;
- word-break: break-all;
-}
-pre.prettyprint {
- margin-bottom: 18px;
-}
-pre code {
- padding: 0;
- background-color: transparent;
-}
-form {
- margin: 0 0 18px;
-}
-fieldset {
- padding: 0;
- margin: 0;
- border: 0;
-}
-legend {
- display: block;
- width: 100%;
- padding: 0;
- margin-bottom: 27px;
- font-size: 19.5px;
- line-height: 36px;
- color: #333333;
- border: 0;
- border-bottom: 1px solid #eee;
-}
-label,
-input,
-button,
-select,
-textarea {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- font-weight: normal;
- line-height: 18px;
-}
-label {
- display: block;
- margin-bottom: 5px;
- color: #333333;
-}
-input,
-textarea,
-select,
-.uneditable-input {
- display: inline-block;
- width: 210px;
- height: 18px;
- padding: 4px;
- margin-bottom: 9px;
- font-size: 13px;
- line-height: 18px;
- color: #555555;
- border: 1px solid #ccc;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-.uneditable-textarea {
- width: auto;
- height: auto;
-}
-label input, label textarea, label select {
- display: block;
-}
-input[type="image"], input[type="checkbox"], input[type="radio"] {
- width: auto;
- height: auto;
- padding: 0;
- margin: 3px 0;
- *margin-top: 0;
- /* IE7 */
-
- line-height: normal;
- border: 0;
- cursor: pointer;
- border-radius: 0 \0/;
-}
-input[type="file"] {
- padding: initial;
- line-height: initial;
- border: initial;
- background-color: #ffffff;
- background-color: initial;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-input[type="button"], input[type="reset"], input[type="submit"] {
- width: auto;
- height: auto;
-}
-select, input[type="file"] {
- height: 28px;
- /* In IE7, the height of the select element cannot be changed by height, only font-size */
-
- *margin-top: 4px;
- /* For IE7, add top margin to align select with labels */
-
- line-height: 28px;
-}
-select {
- width: 220px;
- background-color: #ffffff;
-}
-select[multiple], select[size] {
- height: auto;
-}
-input[type="image"] {
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-textarea {
- height: auto;
-}
-input[type="hidden"] {
- display: none;
-}
-.radio, .checkbox {
- padding-left: 18px;
-}
-.radio input[type="radio"], .checkbox input[type="checkbox"] {
- float: left;
- margin-left: -18px;
-}
-.controls > .radio:first-child, .controls > .checkbox:first-child {
- padding-top: 5px;
-}
-.radio.inline, .checkbox.inline {
- display: inline-block;
- margin-bottom: 0;
- vertical-align: middle;
-}
-.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
- margin-left: 10px;
-}
-.controls > .radio.inline:first-child, .controls > .checkbox.inline:first-child {
- padding-top: 0;
-}
-input, textarea {
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
- -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
- -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
- transition: border linear 0.2s, box-shadow linear 0.2s;
-}
-input:focus, textarea:focus {
- border-color: rgba(82, 168, 236, 0.8);
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
- -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
- outline: 0;
- outline: thin dotted \9;
- /* IE6-8 */
-
-}
-input[type="file"]:focus, input[type="checkbox"]:focus, select:focus {
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-.input-mini {
- width: 60px;
-}
-.input-small {
- width: 90px;
-}
-.input-medium {
- width: 150px;
-}
-.input-large {
- width: 210px;
-}
-.input-xlarge {
- width: 270px;
-}
-.input-xxlarge {
- width: 530px;
-}
-input[class*="span"],
-select[class*="span"],
-textarea[class*="span"],
-.uneditable-input {
- float: none;
- margin-left: 0;
-}
-input.span1, textarea.span1, .uneditable-input.span1 {
- width: 50px;
-}
-input.span2, textarea.span2, .uneditable-input.span2 {
- width: 130px;
-}
-input.span3, textarea.span3, .uneditable-input.span3 {
- width: 210px;
-}
-input.span4, textarea.span4, .uneditable-input.span4 {
- width: 290px;
-}
-input.span5, textarea.span5, .uneditable-input.span5 {
- width: 370px;
-}
-input.span6, textarea.span6, .uneditable-input.span6 {
- width: 450px;
-}
-input.span7, textarea.span7, .uneditable-input.span7 {
- width: 530px;
-}
-input.span8, textarea.span8, .uneditable-input.span8 {
- width: 610px;
-}
-input.span9, textarea.span9, .uneditable-input.span9 {
- width: 690px;
-}
-input.span10, textarea.span10, .uneditable-input.span10 {
- width: 770px;
-}
-input.span11, textarea.span11, .uneditable-input.span11 {
- width: 850px;
-}
-input.span12, textarea.span12, .uneditable-input.span12 {
- width: 930px;
-}
-input[disabled],
-select[disabled],
-textarea[disabled],
-input[readonly],
-select[readonly],
-textarea[readonly] {
- background-color: #f5f5f5;
- border-color: #ddd;
- cursor: not-allowed;
-}
-.control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline {
- color: #c09853;
-}
-.control-group.warning input, .control-group.warning select, .control-group.warning textarea {
- color: #c09853;
- border-color: #c09853;
-}
-.control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus {
- border-color: #a47e3c;
- -webkit-box-shadow: 0 0 6px #dbc59e;
- -moz-box-shadow: 0 0 6px #dbc59e;
- box-shadow: 0 0 6px #dbc59e;
-}
-.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on {
- color: #c09853;
- background-color: #fcf8e3;
- border-color: #c09853;
-}
-.control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline {
- color: #b94a48;
-}
-.control-group.error input, .control-group.error select, .control-group.error textarea {
- color: #b94a48;
- border-color: #b94a48;
-}
-.control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus {
- border-color: #953b39;
- -webkit-box-shadow: 0 0 6px #d59392;
- -moz-box-shadow: 0 0 6px #d59392;
- box-shadow: 0 0 6px #d59392;
-}
-.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on {
- color: #b94a48;
- background-color: #f2dede;
- border-color: #b94a48;
-}
-.control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline {
- color: #468847;
-}
-.control-group.success input, .control-group.success select, .control-group.success textarea {
- color: #468847;
- border-color: #468847;
-}
-.control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus {
- border-color: #356635;
- -webkit-box-shadow: 0 0 6px #7aba7b;
- -moz-box-shadow: 0 0 6px #7aba7b;
- box-shadow: 0 0 6px #7aba7b;
-}
-.control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on {
- color: #468847;
- background-color: #dff0d8;
- border-color: #468847;
-}
-input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid {
- color: #b94a48;
- border-color: #ee5f5b;
-}
-input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus {
- border-color: #e9322d;
- -webkit-box-shadow: 0 0 6px #f8b9b7;
- -moz-box-shadow: 0 0 6px #f8b9b7;
- box-shadow: 0 0 6px #f8b9b7;
-}
-.form-actions {
- padding: 17px 20px 18px;
- margin-top: 18px;
- margin-bottom: 18px;
- background-color: #f5f5f5;
- border-top: 1px solid #ddd;
-}
-.uneditable-input {
- display: block;
- background-color: #ffffff;
- border-color: #eee;
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
- -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
- cursor: not-allowed;
-}
-:-moz-placeholder {
- color: #999999;
-}
-::-webkit-input-placeholder {
- color: #999999;
-}
-.help-block {
- margin-top: 5px;
- margin-bottom: 0;
- color: #999999;
-}
-.help-inline {
- display: inline-block;
- *display: inline;
- /* IE7 inline-block hack */
-
- *zoom: 1;
- margin-bottom: 9px;
- vertical-align: middle;
- padding-left: 5px;
-}
-.input-prepend, .input-append {
- margin-bottom: 5px;
- *zoom: 1;
-}
-.input-prepend:before,
-.input-append:before,
-.input-prepend:after,
-.input-append:after {
- display: table;
- content: "";
-}
-.input-prepend:after, .input-append:after {
- clear: both;
-}
-.input-prepend input,
-.input-append input,
-.input-prepend .uneditable-input,
-.input-append .uneditable-input {
- -webkit-border-radius: 0 3px 3px 0;
- -moz-border-radius: 0 3px 3px 0;
- border-radius: 0 3px 3px 0;
-}
-.input-prepend input:focus,
-.input-append input:focus,
-.input-prepend .uneditable-input:focus,
-.input-append .uneditable-input:focus {
- position: relative;
- z-index: 2;
-}
-.input-prepend .uneditable-input, .input-append .uneditable-input {
- border-left-color: #ccc;
-}
-.input-prepend .add-on, .input-append .add-on {
- float: left;
- display: block;
- width: auto;
- min-width: 16px;
- height: 18px;
- margin-right: -1px;
- padding: 4px 5px;
- font-weight: normal;
- line-height: 18px;
- color: #999999;
- text-align: center;
- text-shadow: 0 1px 0 #ffffff;
- background-color: #f5f5f5;
- border: 1px solid #ccc;
- -webkit-border-radius: 3px 0 0 3px;
- -moz-border-radius: 3px 0 0 3px;
- border-radius: 3px 0 0 3px;
-}
-.input-prepend .active, .input-append .active {
- background-color: #a9dba9;
- border-color: #46a546;
-}
-.input-prepend .add-on {
- *margin-top: 1px;
- /* IE6-7 */
-
-}
-.input-append input, .input-append .uneditable-input {
- float: left;
- -webkit-border-radius: 3px 0 0 3px;
- -moz-border-radius: 3px 0 0 3px;
- border-radius: 3px 0 0 3px;
-}
-.input-append .uneditable-input {
- border-right-color: #ccc;
-}
-.input-append .add-on {
- margin-right: 0;
- margin-left: -1px;
- -webkit-border-radius: 0 3px 3px 0;
- -moz-border-radius: 0 3px 3px 0;
- border-radius: 0 3px 3px 0;
-}
-.input-append input:first-child {
- *margin-left: -160px;
-}
-.input-append input:first-child + .add-on {
- *margin-left: -21px;
-}
-.search-query {
- padding-left: 14px;
- padding-right: 14px;
- margin-bottom: 0;
- -webkit-border-radius: 14px;
- -moz-border-radius: 14px;
- border-radius: 14px;
-}
-.form-search input,
-.form-inline input,
-.form-horizontal input,
-.form-search textarea,
-.form-inline textarea,
-.form-horizontal textarea,
-.form-search select,
-.form-inline select,
-.form-horizontal select,
-.form-search .help-inline,
-.form-inline .help-inline,
-.form-horizontal .help-inline,
-.form-search .uneditable-input,
-.form-inline .uneditable-input,
-.form-horizontal .uneditable-input {
- display: inline-block;
- margin-bottom: 0;
-}
-.form-search label,
-.form-inline label,
-.form-search .input-append,
-.form-inline .input-append,
-.form-search .input-prepend,
-.form-inline .input-prepend {
- display: inline-block;
-}
-.form-search .input-append .add-on,
-.form-inline .input-prepend .add-on,
-.form-search .input-append .add-on,
-.form-inline .input-prepend .add-on {
- vertical-align: middle;
-}
-.control-group {
- margin-bottom: 9px;
-}
-.form-horizontal legend + .control-group {
- margin-top: 18px;
- -webkit-margin-top-collapse: separate;
-}
-.form-horizontal .control-group {
- margin-bottom: 18px;
- *zoom: 1;
-}
-.form-horizontal .control-group:before, .form-horizontal .control-group:after {
- display: table;
- content: "";
-}
-.form-horizontal .control-group:after {
- clear: both;
-}
-.form-horizontal .control-group > label {
- float: left;
- width: 140px;
- padding-top: 5px;
- text-align: right;
-}
-.form-horizontal .controls {
- margin-left: 160px;
-}
-.form-horizontal .form-actions {
- padding-left: 160px;
-}
-table {
- max-width: 100%;
- border-collapse: collapse;
- border-spacing: 0;
-}
-.table {
- width: 100%;
- margin-bottom: 18px;
-}
-.table th, .table td {
- padding: 8px;
- line-height: 18px;
- text-align: left;
- border-top: 1px solid #ddd;
-}
-.table th {
- font-weight: bold;
- vertical-align: bottom;
-}
-.table td {
- vertical-align: top;
-}
-.table thead:first-child tr th, .table thead:first-child tr td {
- border-top: 0;
-}
-.table tbody + tbody {
- border-top: 2px solid #ddd;
-}
-.table-condensed th, .table-condensed td {
- padding: 4px 5px;
-}
-.table-bordered {
- border: 1px solid #ddd;
- border-collapse: separate;
- *border-collapse: collapsed;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-.table-bordered th + th,
-.table-bordered td + td,
-.table-bordered th + td,
-.table-bordered td + th {
- border-left: 1px solid #ddd;
-}
-.table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td {
- border-top: 0;
-}
-.table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child {
- -webkit-border-radius: 4px 0 0 0;
- -moz-border-radius: 4px 0 0 0;
- border-radius: 4px 0 0 0;
-}
-.table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child {
- -webkit-border-radius: 0 4px 0 0;
- -moz-border-radius: 0 4px 0 0;
- border-radius: 0 4px 0 0;
-}
-.table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child {
- -webkit-border-radius: 0 0 0 4px;
- -moz-border-radius: 0 0 0 4px;
- border-radius: 0 0 0 4px;
-}
-.table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child {
- -webkit-border-radius: 0 0 4px 0;
- -moz-border-radius: 0 0 4px 0;
- border-radius: 0 0 4px 0;
-}
-.table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th {
- background-color: #f9f9f9;
-}
-table .span1 {
- float: none;
- width: 44px;
- margin-left: 0;
-}
-table .span2 {
- float: none;
- width: 124px;
- margin-left: 0;
-}
-table .span3 {
- float: none;
- width: 204px;
- margin-left: 0;
-}
-table .span4 {
- float: none;
- width: 284px;
- margin-left: 0;
-}
-table .span5 {
- float: none;
- width: 364px;
- margin-left: 0;
-}
-table .span6 {
- float: none;
- width: 444px;
- margin-left: 0;
-}
-table .span7 {
- float: none;
- width: 524px;
- margin-left: 0;
-}
-table .span8 {
- float: none;
- width: 604px;
- margin-left: 0;
-}
-table .span9 {
- float: none;
- width: 684px;
- margin-left: 0;
-}
-table .span10 {
- float: none;
- width: 764px;
- margin-left: 0;
-}
-table .span11 {
- float: none;
- width: 844px;
- margin-left: 0;
-}
-table .span12 {
- float: none;
- width: 924px;
- margin-left: 0;
-}
-[class^="icon-"] {
- display: inline-block;
- width: 14px;
- height: 14px;
- vertical-align: text-top;
- background-image: url(../img/glyphicons-halflings.png);
- background-position: 14px 14px;
- background-repeat: no-repeat;
- *margin-right: .3em;
-}
-[class^="icon-"]:last-child {
- *margin-left: 0;
-}
-.icon-white {
- background-image: url(../img/glyphicons-halflings-white.png);
-}
-.icon-glass {
- background-position: 0 0;
-}
-.icon-music {
- background-position: -24px 0;
-}
-.icon-search {
- background-position: -48px 0;
-}
-.icon-envelope {
- background-position: -72px 0;
-}
-.icon-heart {
- background-position: -96px 0;
-}
-.icon-star {
- background-position: -120px 0;
-}
-.icon-star-empty {
- background-position: -144px 0;
-}
-.icon-user {
- background-position: -168px 0;
-}
-.icon-film {
- background-position: -192px 0;
-}
-.icon-th-large {
- background-position: -216px 0;
-}
-.icon-th {
- background-position: -240px 0;
-}
-.icon-th-list {
- background-position: -264px 0;
-}
-.icon-ok {
- background-position: -288px 0;
-}
-.icon-remove {
- background-position: -312px 0;
-}
-.icon-zoom-in {
- background-position: -336px 0;
-}
-.icon-zoom-out {
- background-position: -360px 0;
-}
-.icon-off {
- background-position: -384px 0;
-}
-.icon-signal {
- background-position: -408px 0;
-}
-.icon-cog {
- background-position: -432px 0;
-}
-.icon-trash {
- background-position: -456px 0;
-}
-.icon-home {
- background-position: 0 -24px;
-}
-.icon-file {
- background-position: -24px -24px;
-}
-.icon-time {
- background-position: -48px -24px;
-}
-.icon-road {
- background-position: -72px -24px;
-}
-.icon-download-alt {
- background-position: -96px -24px;
-}
-.icon-download {
- background-position: -120px -24px;
-}
-.icon-upload {
- background-position: -144px -24px;
-}
-.icon-inbox {
- background-position: -168px -24px;
-}
-.icon-play-circle {
- background-position: -192px -24px;
-}
-.icon-repeat {
- background-position: -216px -24px;
-}
-.icon-refresh {
- background-position: -240px -24px;
-}
-.icon-list-alt {
- background-position: -264px -24px;
-}
-.icon-lock {
- background-position: -287px -24px;
-}
-.icon-flag {
- background-position: -312px -24px;
-}
-.icon-headphones {
- background-position: -336px -24px;
-}
-.icon-volume-off {
- background-position: -360px -24px;
-}
-.icon-volume-down {
- background-position: -384px -24px;
-}
-.icon-volume-up {
- background-position: -408px -24px;
-}
-.icon-qrcode {
- background-position: -432px -24px;
-}
-.icon-barcode {
- background-position: -456px -24px;
-}
-.icon-tag {
- background-position: 0 -48px;
-}
-.icon-tags {
- background-position: -25px -48px;
-}
-.icon-book {
- background-position: -48px -48px;
-}
-.icon-bookmark {
- background-position: -72px -48px;
-}
-.icon-print {
- background-position: -96px -48px;
-}
-.icon-camera {
- background-position: -120px -48px;
-}
-.icon-font {
- background-position: -144px -48px;
-}
-.icon-bold {
- background-position: -167px -48px;
-}
-.icon-italic {
- background-position: -192px -48px;
-}
-.icon-text-height {
- background-position: -216px -48px;
-}
-.icon-text-width {
- background-position: -240px -48px;
-}
-.icon-align-left {
- background-position: -264px -48px;
-}
-.icon-align-center {
- background-position: -288px -48px;
-}
-.icon-align-right {
- background-position: -312px -48px;
-}
-.icon-align-justify {
- background-position: -336px -48px;
-}
-.icon-list {
- background-position: -360px -48px;
-}
-.icon-indent-left {
- background-position: -384px -48px;
-}
-.icon-indent-right {
- background-position: -408px -48px;
-}
-.icon-facetime-video {
- background-position: -432px -48px;
-}
-.icon-picture {
- background-position: -456px -48px;
-}
-.icon-pencil {
- background-position: 0 -72px;
-}
-.icon-map-marker {
- background-position: -24px -72px;
-}
-.icon-adjust {
- background-position: -48px -72px;
-}
-.icon-tint {
- background-position: -72px -72px;
-}
-.icon-edit {
- background-position: -96px -72px;
-}
-.icon-share {
- background-position: -120px -72px;
-}
-.icon-check {
- background-position: -144px -72px;
-}
-.icon-move {
- background-position: -168px -72px;
-}
-.icon-step-backward {
- background-position: -192px -72px;
-}
-.icon-fast-backward {
- background-position: -216px -72px;
-}
-.icon-backward {
- background-position: -240px -72px;
-}
-.icon-play {
- background-position: -264px -72px;
-}
-.icon-pause {
- background-position: -288px -72px;
-}
-.icon-stop {
- background-position: -312px -72px;
-}
-.icon-forward {
- background-position: -336px -72px;
-}
-.icon-fast-forward {
- background-position: -360px -72px;
-}
-.icon-step-forward {
- background-position: -384px -72px;
-}
-.icon-eject {
- background-position: -408px -72px;
-}
-.icon-chevron-left {
- background-position: -432px -72px;
-}
-.icon-chevron-right {
- background-position: -456px -72px;
-}
-.icon-plus-sign {
- background-position: 0 -96px;
-}
-.icon-minus-sign {
- background-position: -24px -96px;
-}
-.icon-remove-sign {
- background-position: -48px -96px;
-}
-.icon-ok-sign {
- background-position: -72px -96px;
-}
-.icon-question-sign {
- background-position: -96px -96px;
-}
-.icon-info-sign {
- background-position: -120px -96px;
-}
-.icon-screenshot {
- background-position: -144px -96px;
-}
-.icon-remove-circle {
- background-position: -168px -96px;
-}
-.icon-ok-circle {
- background-position: -192px -96px;
-}
-.icon-ban-circle {
- background-position: -216px -96px;
-}
-.icon-arrow-left {
- background-position: -240px -96px;
-}
-.icon-arrow-right {
- background-position: -264px -96px;
-}
-.icon-arrow-up {
- background-position: -289px -96px;
-}
-.icon-arrow-down {
- background-position: -312px -96px;
-}
-.icon-share-alt {
- background-position: -336px -96px;
-}
-.icon-resize-full {
- background-position: -360px -96px;
-}
-.icon-resize-small {
- background-position: -384px -96px;
-}
-.icon-plus {
- background-position: -408px -96px;
-}
-.icon-minus {
- background-position: -433px -96px;
-}
-.icon-asterisk {
- background-position: -456px -96px;
-}
-.icon-exclamation-sign {
- background-position: 0 -120px;
-}
-.icon-gift {
- background-position: -24px -120px;
-}
-.icon-leaf {
- background-position: -48px -120px;
-}
-.icon-fire {
- background-position: -72px -120px;