├── app ├── version.node.txt ├── templates │ ├── index.html │ └── README ├── assets │ ├── README │ └── favicon.gif ├── files │ └── README ├── styles │ └── README ├── sims │ └── README ├── node_modules │ └── README ├── libs │ └── README ├── balancer.node.js ├── master.node.js ├── scripts │ ├── index.js │ ├── failedconnection.js │ ├── cookiesdisabled.js │ ├── README │ └── load.js ├── server.node.js ├── index.html ├── worker.node.js └── README.md ├── samples ├── chat │ ├── version.node.txt │ ├── templates │ │ ├── chatlist.html │ │ ├── README │ │ └── chatbox.html │ ├── assets │ │ ├── README │ │ └── favicon.gif │ ├── files │ │ └── README │ ├── styles │ │ ├── README │ │ └── styles.css │ ├── scripts │ │ ├── README │ │ ├── failedconnection.js │ │ ├── cookiesdisabled.js │ │ └── index.js │ ├── sims │ │ ├── README │ │ └── chat.node.js │ ├── libs │ │ └── README │ ├── node_modules │ │ └── README │ ├── worker.node.js │ ├── balancer.node.js │ ├── master.node.js │ ├── server.node.js │ ├── index.html │ └── README.md ├── memo │ ├── version.node.txt │ ├── assets │ │ ├── README │ │ └── favicon.gif │ ├── files │ │ └── README │ ├── templates │ │ ├── README │ │ ├── add_note_dialog.html │ │ ├── login.html │ │ ├── notes_table.html │ │ └── main.html │ ├── styles │ │ ├── README │ │ └── main.css │ ├── scripts │ │ ├── README │ │ ├── failedconnection.js │ │ ├── cookiesdisabled.js │ │ └── index.js │ ├── sims │ │ ├── README │ │ ├── auth.node.js │ │ └── notes.node.js │ ├── node_modules │ │ └── README │ ├── libs │ │ └── README │ ├── balancer.node.js │ ├── server.node.js │ ├── worker.node.js │ ├── index.html │ ├── master.node.js │ └── README.md ├── security │ ├── version.node.txt │ ├── templates │ │ ├── index.html │ │ └── README │ ├── assets │ │ ├── README │ │ └── favicon.gif │ ├── files │ │ └── README │ ├── styles │ │ └── README │ ├── sims │ │ └── README │ ├── node_modules │ │ └── README │ ├── libs │ │ └── README │ ├── balancer.node.js │ ├── scripts │ │ ├── index.js │ │ ├── failedconnection.js │ │ ├── cookiesdisabled.js │ │ └── README │ ├── master.node.js │ ├── server.node.js │ ├── index.html │ ├── keys │ │ ├── key.pem │ │ ├── enc_key.pem │ │ └── cert.pem │ ├── worker.node.js │ └── README.md ├── uploader │ ├── version.node.txt │ ├── assets │ │ ├── README │ │ └── favicon.gif │ ├── files │ │ └── README │ ├── templates │ │ └── README │ ├── styles │ │ └── README │ ├── scripts │ │ ├── README │ │ ├── index.js │ │ ├── failedconnection.js │ │ └── cookiesdisabled.js │ ├── sims │ │ └── README │ ├── node_modules │ │ └── README │ ├── libs │ │ └── README │ ├── worker.node.js │ ├── balancer.node.js │ ├── server.node.js │ ├── master.node.js │ ├── index.html │ └── README.md ├── angular_todo │ ├── version.node.txt │ ├── assets │ │ ├── README │ │ └── favicon.gif │ ├── files │ │ └── README │ ├── templates │ │ ├── README │ │ └── index.html │ ├── styles │ │ ├── README │ │ └── main.css │ ├── scripts │ │ ├── README │ │ ├── failedconnection.js │ │ ├── cookiesdisabled.js │ │ └── index.js │ ├── sims │ │ ├── README │ │ └── projects.js │ ├── node_modules │ │ └── README │ ├── libs │ │ └── README │ ├── worker.node.js │ ├── balancer.node.js │ ├── server.node.js │ ├── master.node.js │ ├── index.html │ └── README.md ├── angular_projects │ ├── version.node.txt │ ├── assets │ │ ├── README │ │ └── favicon.gif │ ├── files │ │ └── README │ ├── templates │ │ ├── README │ │ ├── index.html │ │ ├── list.html │ │ └── detail.html │ ├── styles │ │ ├── README │ │ └── main.css │ ├── scripts │ │ ├── README │ │ ├── failedconnection.js │ │ ├── cookiesdisabled.js │ │ ├── store.js │ │ └── index.js │ ├── sims │ │ ├── README │ │ └── projects.node.js │ ├── node_modules │ │ └── README │ ├── libs │ │ └── README │ ├── worker.node.js │ ├── balancer.node.js │ ├── server.node.js │ ├── master.node.js │ ├── index.html │ └── README.md ├── dynamic_linking │ ├── version.node.txt │ ├── assets │ │ ├── README │ │ └── favicon.gif │ ├── files │ │ └── README │ ├── templates │ │ └── README │ ├── scripts │ │ ├── d.js │ │ ├── README │ │ ├── c.js │ │ ├── b.js │ │ ├── failedconnection.js │ │ ├── cookiesdisabled.js │ │ ├── a.js │ │ └── index.js │ ├── styles │ │ └── README │ ├── sims │ │ └── README │ ├── node_modules │ │ └── README │ ├── libs │ │ └── README │ ├── worker.node.js │ ├── balancer.node.js │ ├── master.node.js │ ├── server.node.js │ ├── index.html │ └── README.md └── static_linking │ ├── version.node.txt │ ├── assets │ ├── README │ └── favicon.gif │ ├── files │ └── README │ ├── templates │ └── README │ ├── scripts │ ├── d.js │ ├── README │ ├── c.js │ ├── a.js │ ├── b.js │ ├── failedconnection.js │ ├── cookiesdisabled.js │ └── index.js │ ├── styles │ └── README │ ├── sims │ └── README │ ├── node_modules │ └── README │ ├── libs │ └── README │ ├── worker.node.js │ ├── balancer.node.js │ ├── master.node.js │ ├── server.node.js │ ├── index.html │ └── README.md ├── index.js ├── client ├── assets │ ├── README │ ├── logo.png │ └── favicon.gif ├── scripts │ ├── README │ ├── failedconnection.js │ └── cookiesdisabled.js ├── styles │ ├── fileuploader │ │ └── loading.gif │ ├── bootstrap │ │ └── assets │ │ │ ├── glyphicons-halflings.png │ │ │ └── glyphicons-halflings-white.png │ ├── jqueryui │ │ ├── base │ │ │ └── images │ │ │ │ ├── animated-overlay.gif │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ ├── ui-icons_888888_256x240.png │ │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ └── ui-lightness │ │ │ └── images │ │ │ ├── animated-overlay.gif │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_228ef1_256x240.png │ │ │ ├── ui-icons_ef8c08_256x240.png │ │ │ ├── ui-icons_ffd27a_256x240.png │ │ │ ├── ui-icons_ffffff_256x240.png │ │ │ ├── ui-bg_flat_10_000000_40x100.png │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ │ └── ui-bg_highlight-soft_100_eeeeee_1x100.png │ ├── README │ ├── nombo.css │ ├── angular-ui.css │ └── fileuploader.css ├── libs │ ├── README │ ├── jquery │ │ ├── effects │ │ │ ├── fade.js │ │ │ ├── transfer.js │ │ │ ├── blind.js │ │ │ ├── highlight.js │ │ │ ├── pulsate.js │ │ │ ├── clip.js │ │ │ ├── slide.js │ │ │ ├── drop.js │ │ │ ├── fold.js │ │ │ ├── shake.js │ │ │ ├── explode.js │ │ │ ├── bounce.js │ │ │ └── scale.js │ │ └── cookie.js │ ├── angular │ │ ├── ui-ieshiv.js │ │ └── resource.js │ ├── bootstrap │ │ ├── tests │ │ │ ├── unit │ │ │ │ ├── bootstrap-scrollspy.js │ │ │ │ ├── bootstrap-alerts.js │ │ │ │ ├── bootstrap-buttons.js │ │ │ │ ├── bootstrap-dropdown.js │ │ │ │ ├── bootstrap-tabs.js │ │ │ │ ├── bootstrap-popover.js │ │ │ │ └── bootstrap-twipsy.js │ │ │ └── index.html │ │ ├── bootstrap-dropdown.js │ │ ├── bootstrap-buttons.js │ │ ├── bootstrap-tabs.js │ │ ├── bootstrap-popover.js │ │ ├── bootstrap-scrollspy.js │ │ └── bootstrap-alerts.js │ ├── json2.js │ └── spin.js └── plugins │ └── README ├── license_mit.txt ├── nombo-worker-bootstrap.node.js ├── nombo-balancer.node.js ├── package.json ├── smartcachemanager.js └── README.md /app/version.node.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/templates/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/chat/version.node.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/memo/version.node.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/security/version.node.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/uploader/version.node.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/angular_todo/version.node.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/security/templates/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/angular_projects/version.node.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/dynamic_linking/version.node.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/static_linking/version.node.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./nombo.node.js'); -------------------------------------------------------------------------------- /app/assets/README: -------------------------------------------------------------------------------- 1 | This directory holds assets for use by the application. -------------------------------------------------------------------------------- /app/files/README: -------------------------------------------------------------------------------- 1 | This contains files uploaded to the application by end-users. -------------------------------------------------------------------------------- /samples/chat/templates/chatlist.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /samples/chat/assets/README: -------------------------------------------------------------------------------- 1 | This directory holds assets for use by the application. -------------------------------------------------------------------------------- /samples/memo/assets/README: -------------------------------------------------------------------------------- 1 | This directory holds assets for use by the application. -------------------------------------------------------------------------------- /client/assets/README: -------------------------------------------------------------------------------- 1 | This directory contains assets which are part of the framework core. -------------------------------------------------------------------------------- /samples/chat/files/README: -------------------------------------------------------------------------------- 1 | This contains files uploaded to the application by end-users. -------------------------------------------------------------------------------- /samples/memo/files/README: -------------------------------------------------------------------------------- 1 | This contains files uploaded to the application by end-users. -------------------------------------------------------------------------------- /samples/security/assets/README: -------------------------------------------------------------------------------- 1 | This directory holds assets for use by the application. -------------------------------------------------------------------------------- /samples/uploader/assets/README: -------------------------------------------------------------------------------- 1 | This directory holds assets for use by the application. -------------------------------------------------------------------------------- /samples/angular_projects/assets/README: -------------------------------------------------------------------------------- 1 | This directory holds assets for use by the application. -------------------------------------------------------------------------------- /samples/angular_todo/assets/README: -------------------------------------------------------------------------------- 1 | This directory holds assets for use by the application. -------------------------------------------------------------------------------- /samples/dynamic_linking/assets/README: -------------------------------------------------------------------------------- 1 | This directory holds assets for use by the application. -------------------------------------------------------------------------------- /samples/security/files/README: -------------------------------------------------------------------------------- 1 | This contains files uploaded to the application by end-users. -------------------------------------------------------------------------------- /samples/static_linking/assets/README: -------------------------------------------------------------------------------- 1 | This directory holds assets for use by the application. -------------------------------------------------------------------------------- /samples/uploader/files/README: -------------------------------------------------------------------------------- 1 | This contains files uploaded to the application by end-users. -------------------------------------------------------------------------------- /app/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/app/assets/favicon.gif -------------------------------------------------------------------------------- /client/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/assets/logo.png -------------------------------------------------------------------------------- /samples/angular_projects/files/README: -------------------------------------------------------------------------------- 1 | This contains files uploaded to the application by end-users. -------------------------------------------------------------------------------- /samples/angular_todo/files/README: -------------------------------------------------------------------------------- 1 | This contains files uploaded to the application by end-users. -------------------------------------------------------------------------------- /samples/chat/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains template files for use by the application. -------------------------------------------------------------------------------- /samples/dynamic_linking/files/README: -------------------------------------------------------------------------------- 1 | This contains files uploaded to the application by end-users. -------------------------------------------------------------------------------- /samples/memo/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains template files for use by the application. -------------------------------------------------------------------------------- /samples/static_linking/files/README: -------------------------------------------------------------------------------- 1 | This contains files uploaded to the application by end-users. -------------------------------------------------------------------------------- /app/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains all stylesheets and related assets for use by the application. -------------------------------------------------------------------------------- /client/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/assets/favicon.gif -------------------------------------------------------------------------------- /client/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains scripts which the framework uses for various purposes. -------------------------------------------------------------------------------- /samples/angular_todo/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains template files for use by the application. -------------------------------------------------------------------------------- /samples/uploader/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains template files for use by the application. -------------------------------------------------------------------------------- /samples/angular_projects/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains template files for use by the application. -------------------------------------------------------------------------------- /samples/dynamic_linking/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains template files for use by the application. -------------------------------------------------------------------------------- /samples/static_linking/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains template files for use by the application. -------------------------------------------------------------------------------- /samples/chat/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/samples/chat/assets/favicon.gif -------------------------------------------------------------------------------- /samples/chat/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains all stylesheets and related assets for use by the application. -------------------------------------------------------------------------------- /samples/memo/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/samples/memo/assets/favicon.gif -------------------------------------------------------------------------------- /samples/memo/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains all stylesheets and related assets for use by the application. -------------------------------------------------------------------------------- /app/sims/README: -------------------------------------------------------------------------------- 1 | This directory contains server interfaces (node modules) for use by the application on the client-side. -------------------------------------------------------------------------------- /samples/security/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains all stylesheets and related assets for use by the application. -------------------------------------------------------------------------------- /samples/uploader/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains all stylesheets and related assets for use by the application. -------------------------------------------------------------------------------- /samples/angular_projects/templates/index.html: -------------------------------------------------------------------------------- 1 |
2 |

Projects

3 |
4 |
-------------------------------------------------------------------------------- /samples/angular_todo/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains all stylesheets and related assets for use by the application. -------------------------------------------------------------------------------- /samples/chat/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains all .js script files that make-up the client-side of the application. -------------------------------------------------------------------------------- /samples/dynamic_linking/scripts/d.js: -------------------------------------------------------------------------------- 1 | exports.someMethod = function() { 2 | return 'This is someMethod() of script d'; 3 | } -------------------------------------------------------------------------------- /samples/dynamic_linking/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains all stylesheets and related assets for use by the application. -------------------------------------------------------------------------------- /samples/memo/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains all .js script files that make-up the client-side of the application. -------------------------------------------------------------------------------- /samples/security/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/samples/security/assets/favicon.gif -------------------------------------------------------------------------------- /samples/static_linking/scripts/d.js: -------------------------------------------------------------------------------- 1 | exports.someMethod = function() { 2 | return 'This is someMethod() of script d'; 3 | }; -------------------------------------------------------------------------------- /samples/static_linking/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains all stylesheets and related assets for use by the application. -------------------------------------------------------------------------------- /samples/uploader/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/samples/uploader/assets/favicon.gif -------------------------------------------------------------------------------- /client/styles/fileuploader/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/fileuploader/loading.gif -------------------------------------------------------------------------------- /samples/angular_projects/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains all stylesheets and related assets for use by the application. -------------------------------------------------------------------------------- /samples/angular_todo/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains all .js script files that make-up the client-side of the application. -------------------------------------------------------------------------------- /samples/chat/sims/README: -------------------------------------------------------------------------------- 1 | This directory contains server interfaces (node modules) for use by the application on the client-side. -------------------------------------------------------------------------------- /samples/memo/sims/README: -------------------------------------------------------------------------------- 1 | This directory contains server interfaces (node modules) for use by the application on the client-side. -------------------------------------------------------------------------------- /samples/uploader/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains all .js script files that make-up the client-side of the application. -------------------------------------------------------------------------------- /app/node_modules/README: -------------------------------------------------------------------------------- 1 | This directory holds custom app-specific node modules. These modules can be used inside server interfaces. -------------------------------------------------------------------------------- /samples/angular_projects/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains all .js script files that make-up the client-side of the application. -------------------------------------------------------------------------------- /samples/angular_todo/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/samples/angular_todo/assets/favicon.gif -------------------------------------------------------------------------------- /samples/dynamic_linking/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains all .js script files that make-up the client-side of the application. -------------------------------------------------------------------------------- /samples/security/sims/README: -------------------------------------------------------------------------------- 1 | This directory contains server interfaces (node modules) for use by the application on the client-side. -------------------------------------------------------------------------------- /samples/static_linking/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/samples/static_linking/assets/favicon.gif -------------------------------------------------------------------------------- /samples/static_linking/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains all .js script files that make-up the client-side of the application. -------------------------------------------------------------------------------- /samples/uploader/sims/README: -------------------------------------------------------------------------------- 1 | This directory contains server interfaces (node modules) for use by the application on the client-side. -------------------------------------------------------------------------------- /samples/angular_projects/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/samples/angular_projects/assets/favicon.gif -------------------------------------------------------------------------------- /samples/angular_todo/sims/README: -------------------------------------------------------------------------------- 1 | This directory contains server interfaces (node modules) for use by the application on the client-side. -------------------------------------------------------------------------------- /samples/dynamic_linking/assets/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/samples/dynamic_linking/assets/favicon.gif -------------------------------------------------------------------------------- /samples/dynamic_linking/sims/README: -------------------------------------------------------------------------------- 1 | This directory contains server interfaces (node modules) for use by the application on the client-side. -------------------------------------------------------------------------------- /samples/memo/node_modules/README: -------------------------------------------------------------------------------- 1 | This directory holds custom app-specific node modules. These modules can be used inside server interfaces. -------------------------------------------------------------------------------- /samples/static_linking/sims/README: -------------------------------------------------------------------------------- 1 | This directory contains server interfaces (node modules) for use by the application on the client-side. -------------------------------------------------------------------------------- /samples/angular_projects/sims/README: -------------------------------------------------------------------------------- 1 | This directory contains server interfaces (node modules) for use by the application on the client-side. -------------------------------------------------------------------------------- /samples/security/node_modules/README: -------------------------------------------------------------------------------- 1 | This directory holds custom app-specific node modules. These modules can be used inside server interfaces. -------------------------------------------------------------------------------- /samples/uploader/node_modules/README: -------------------------------------------------------------------------------- 1 | This directory holds custom app-specific node modules. These modules can be used inside server interfaces. -------------------------------------------------------------------------------- /samples/angular_todo/node_modules/README: -------------------------------------------------------------------------------- 1 | This directory holds custom app-specific node modules. These modules can be used inside server interfaces. -------------------------------------------------------------------------------- /samples/static_linking/node_modules/README: -------------------------------------------------------------------------------- 1 | This directory holds custom app-specific node modules. These modules can be used inside server interfaces. -------------------------------------------------------------------------------- /samples/angular_projects/node_modules/README: -------------------------------------------------------------------------------- 1 | This directory holds custom app-specific node modules. These modules can be used inside server interfaces. -------------------------------------------------------------------------------- /samples/dynamic_linking/node_modules/README: -------------------------------------------------------------------------------- 1 | This directory holds custom app-specific node modules. These modules can be used inside server interfaces. -------------------------------------------------------------------------------- /client/styles/bootstrap/assets/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/bootstrap/assets/glyphicons-halflings.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/animated-overlay.gif -------------------------------------------------------------------------------- /app/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains the .js script (lib) files that make-up the client-side of the application. The content of libs are loaded into the global scope. -------------------------------------------------------------------------------- /client/styles/bootstrap/assets/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/bootstrap/assets/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/animated-overlay.gif -------------------------------------------------------------------------------- /samples/chat/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains the .js script (lib) files that make-up the client-side of the application. The content of libs are loaded into the global scope. -------------------------------------------------------------------------------- /samples/memo/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains the .js script (lib) files that make-up the client-side of the application. The content of libs are loaded into the global scope. -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /samples/security/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains the .js script (lib) files that make-up the client-side of the application. The content of libs are loaded into the global scope. -------------------------------------------------------------------------------- /samples/static_linking/scripts/c.js: -------------------------------------------------------------------------------- 1 | exports.ClassC = function() { 2 | this.getMessage = function() { 3 | return 'This is getMessage() method of ClassC from script c'; 4 | } 5 | }; -------------------------------------------------------------------------------- /samples/uploader/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains the .js script (lib) files that make-up the client-side of the application. The content of libs are loaded into the global scope. -------------------------------------------------------------------------------- /samples/angular_todo/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains the .js script (lib) files that make-up the client-side of the application. The content of libs are loaded into the global scope. -------------------------------------------------------------------------------- /samples/dynamic_linking/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains the .js script (lib) files that make-up the client-side of the application. The content of libs are loaded into the global scope. -------------------------------------------------------------------------------- /samples/static_linking/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains the .js script (lib) files that make-up the client-side of the application. The content of libs are loaded into the global scope. -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /samples/angular_projects/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains the .js script (lib) files that make-up the client-side of the application. The content of libs are loaded into the global scope. -------------------------------------------------------------------------------- /samples/chat/node_modules/README: -------------------------------------------------------------------------------- 1 | This directory holds custom app-specific node modules. These modules can be used inside server interfaces - Use require('../node_modules/module_name.node.js') -------------------------------------------------------------------------------- /client/styles/README: -------------------------------------------------------------------------------- 1 | This directory contains convenience libs which can be bundled into apps. 2 | Libs are loaded into the global scope so care must be taken to ensure that namespaces do not clash. -------------------------------------------------------------------------------- /client/styles/jqueryui/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /samples/chat/worker.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo worker instance. 3 | Middleware functions should be added here. 4 | */ 5 | 6 | module.exports.run = function (nombo) { 7 | 8 | } -------------------------------------------------------------------------------- /app/balancer.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo LoadBalancer instance. 3 | Middleware functions can be added here. 4 | */ 5 | 6 | module.exports.run = function (loadBalancer) { 7 | 8 | }; -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /samples/uploader/worker.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo worker instance. 3 | Middleware functions should be added here. 4 | */ 5 | 6 | module.exports.run = function (nombo) { 7 | 8 | } -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /samples/angular_todo/worker.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo worker instance. 3 | Middleware functions should be added here. 4 | */ 5 | 6 | module.exports.run = function (nombo) { 7 | 8 | } -------------------------------------------------------------------------------- /samples/static_linking/worker.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo worker instance. 3 | Middleware functions should be added here. 4 | */ 5 | 6 | module.exports.run = function (nombo) { 7 | 8 | } -------------------------------------------------------------------------------- /client/libs/README: -------------------------------------------------------------------------------- 1 | This directory contains convenience libs which can be bundled into apps. 2 | Libs are loaded into the global scope so care must be taken to ensure that no two framework library uses the same namespace. -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /client/styles/jqueryui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jondubois/nombo/HEAD/client/styles/jqueryui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /samples/angular_projects/worker.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo worker instance. 3 | Middleware functions should be added here. 4 | */ 5 | 6 | module.exports.run = function (nombo) { 7 | 8 | } -------------------------------------------------------------------------------- /samples/chat/balancer.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo LoadBalancer instance. 3 | Middleware functions can be added here. 4 | */ 5 | 6 | module.exports.run = function (loadBalancer) { 7 | 8 | }; -------------------------------------------------------------------------------- /samples/dynamic_linking/worker.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo worker instance. 3 | Middleware functions should be added here. 4 | */ 5 | 6 | module.exports.run = function (nombo) { 7 | 8 | } -------------------------------------------------------------------------------- /samples/memo/balancer.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo LoadBalancer instance. 3 | Middleware functions can be added here. 4 | */ 5 | 6 | module.exports.run = function (loadBalancer) { 7 | 8 | }; -------------------------------------------------------------------------------- /client/styles/nombo.css: -------------------------------------------------------------------------------- 1 | html { 2 | width: 100%; 3 | height: 100%; 4 | } 5 | 6 | body { 7 | margin: 0px; 8 | padding: 0px; 9 | width: 100%; 10 | height: 100%; 11 | font-family: Arial, Helvetica, sans-serif; 12 | } -------------------------------------------------------------------------------- /samples/security/balancer.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo LoadBalancer instance. 3 | Middleware functions can be added here. 4 | */ 5 | 6 | module.exports.run = function (loadBalancer) { 7 | 8 | }; -------------------------------------------------------------------------------- /samples/uploader/balancer.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo LoadBalancer instance. 3 | Middleware functions can be added here. 4 | */ 5 | 6 | module.exports.run = function (loadBalancer) { 7 | 8 | }; -------------------------------------------------------------------------------- /client/plugins/README: -------------------------------------------------------------------------------- 1 | This directory contains client side scripts which extend the client side functionality of Nombo. 2 | Unlike libs which are standalone, plugins depend and make explicit reference to the Nombo client side code. -------------------------------------------------------------------------------- /samples/angular_projects/balancer.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo LoadBalancer instance. 3 | Middleware functions can be added here. 4 | */ 5 | 6 | module.exports.run = function (loadBalancer) { 7 | 8 | }; -------------------------------------------------------------------------------- /samples/angular_todo/balancer.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo LoadBalancer instance. 3 | Middleware functions can be added here. 4 | */ 5 | 6 | module.exports.run = function (loadBalancer) { 7 | 8 | }; -------------------------------------------------------------------------------- /samples/dynamic_linking/balancer.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo LoadBalancer instance. 3 | Middleware functions can be added here. 4 | */ 5 | 6 | module.exports.run = function (loadBalancer) { 7 | 8 | }; -------------------------------------------------------------------------------- /samples/static_linking/balancer.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo LoadBalancer instance. 3 | Middleware functions can be added here. 4 | */ 5 | 6 | module.exports.run = function (loadBalancer) { 7 | 8 | }; -------------------------------------------------------------------------------- /samples/dynamic_linking/scripts/c.js: -------------------------------------------------------------------------------- 1 | // $n.ready is not really needed here since this file has no dependencies. 2 | 3 | exports.ClassC = function() { 4 | this.getMessage = function() { 5 | return 'This is getMessage() method of ClassC from script c'; 6 | } 7 | }; -------------------------------------------------------------------------------- /samples/static_linking/scripts/a.js: -------------------------------------------------------------------------------- 1 | var b = require('./b'); 2 | 3 | exports.foo = function() { 4 | var c = new b.ClassC(); 5 | var dataFromDScript = b.run(); 6 | 7 | return 'This is a.foo(), ' + b.foo() + ', ' + c.getMessage() + ', ' + dataFromDScript; 8 | }; -------------------------------------------------------------------------------- /app/master.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed once by the master process. 3 | This is where configuration tasks and resource bundling should happen. 4 | It is also an ideal place to spawn daemon processes. 5 | */ 6 | 7 | module.exports.run = function (nombo) { 8 | 9 | }; -------------------------------------------------------------------------------- /app/scripts/index.js: -------------------------------------------------------------------------------- 1 | $n.ready(function() { 2 | var text = "Thank you for downloading Nombo. For more info on how to get started, please visit http://nombo.io/."; 3 | $(document.body).html('
' + text + '
'); 4 | }); -------------------------------------------------------------------------------- /samples/static_linking/scripts/b.js: -------------------------------------------------------------------------------- 1 | var c = require('./c'); 2 | 3 | exports.foo = function() { 4 | return 'This is b.foo()'; 5 | }; 6 | 7 | exports.ClassC = c.ClassC; 8 | 9 | exports.run = function() { 10 | var d = require('./d'); 11 | return d.someMethod(); 12 | }; -------------------------------------------------------------------------------- /samples/security/scripts/index.js: -------------------------------------------------------------------------------- 1 | $n.ready(function() { 2 | var text = "Thank you for downloading Nombo. For more info on how to get started, please visit http://nombo.io/."; 3 | $(document.body).html('
' + text + '
'); 4 | }); -------------------------------------------------------------------------------- /samples/security/master.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed once by the master process. 3 | This is where configuration tasks and resource bundling should happen. 4 | It is also an ideal place to spawn daemon processes. 5 | */ 6 | 7 | module.exports.run = function (nombo) { 8 | 9 | }; -------------------------------------------------------------------------------- /samples/dynamic_linking/master.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed once by the master process. 3 | This is where configuration tasks and resource bundling should happen. 4 | It is also an ideal place to spawn daemon processes. 5 | */ 6 | 7 | module.exports.run = function (nombo) { 8 | 9 | } -------------------------------------------------------------------------------- /samples/static_linking/master.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed once by the master process. 3 | This is where configuration tasks and resource bundling should happen. 4 | It is also an ideal place to spawn daemon processes. 5 | */ 6 | 7 | module.exports.run = function (nombo) { 8 | 9 | } -------------------------------------------------------------------------------- /samples/chat/templates/chatbox.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | {{{chatArea}}} 5 |
6 | 7 | 8 |
-------------------------------------------------------------------------------- /app/server.node.js: -------------------------------------------------------------------------------- 1 | var argv = require('optimist').argv; 2 | var port = argv._[0] ? argv._[0] : 8000; 3 | var release = argv.hasOwnProperty('r'); 4 | var Master = require('nombo').Master; 5 | 6 | var options = { 7 | port: port, 8 | release: release 9 | }; 10 | 11 | var nombo = new Master(options); 12 | nombo.start(); -------------------------------------------------------------------------------- /samples/memo/templates/add_note_dialog.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 | 9 |
10 | 11 |
-------------------------------------------------------------------------------- /samples/memo/templates/login.html: -------------------------------------------------------------------------------- 1 |
2 | Login
3 |
4 |
5 |
6 |
7 |
8 | 9 |
10 | -------------------------------------------------------------------------------- /samples/static_linking/server.node.js: -------------------------------------------------------------------------------- 1 | var argv = require('optimist').argv; 2 | var port = argv._[0] ? argv._[0] : 8000; 3 | var release = argv.hasOwnProperty('r'); 4 | var Master = require('nombo').Master; 5 | 6 | var options = { 7 | port: port, 8 | release: release 9 | }; 10 | 11 | var nombo = new Master(options); 12 | nombo.start(); -------------------------------------------------------------------------------- /samples/dynamic_linking/server.node.js: -------------------------------------------------------------------------------- 1 | var argv = require('optimist').argv; 2 | var port = argv._[0] ? argv._[0] : 8000; 3 | var release = argv.hasOwnProperty('r'); 4 | var Master = require('nombo').Master; 5 | 6 | var options = { 7 | port: port, 8 | release: release 9 | }; 10 | 11 | var nombo = new Master(options); 12 | nombo.start(); -------------------------------------------------------------------------------- /samples/uploader/server.node.js: -------------------------------------------------------------------------------- 1 | var argv = require('optimist').argv; 2 | var port = argv._[0] ? argv._[0] : 8000; 3 | var release = argv.hasOwnProperty('r'); 4 | var Master = require('nombo').Master; 5 | 6 | var options = { 7 | port: port, 8 | release: release, 9 | allowUploads: true 10 | }; 11 | 12 | var nombo = new Master(options); 13 | nombo.start(); -------------------------------------------------------------------------------- /samples/memo/templates/notes_table.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{#each notes}} 4 | 5 | 6 | 7 | 8 | 9 | {{/each}} 10 |
TitleMessageShare
{{this.title}}{{this.message}}
11 | -------------------------------------------------------------------------------- /samples/angular_projects/styles/main.css: -------------------------------------------------------------------------------- 1 | .main { 2 | margin-top: 20px; 3 | margin-right: auto; 4 | margin-left: auto; 5 | width: 300px; 6 | min-height: 200px; 7 | padding: 20px; 8 | background: #eee; 9 | -moz-border-radius: 10px; 10 | border-radius: 10px; 11 | } 12 | 13 | .main table { 14 | margin-top: 10px; 15 | } 16 | 17 | .main td { 18 | padding-right: 10px; 19 | } -------------------------------------------------------------------------------- /samples/uploader/master.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed once by the master process. 3 | This is where configuration tasks and resource bundling should happen. 4 | It is also an ideal place to spawn daemon processes. 5 | */ 6 | 7 | module.exports.run = function (nombo) { 8 | nombo.bundle.framework.style('fileuploader'); 9 | nombo.bundle.framework.lib('fileuploader'); 10 | } -------------------------------------------------------------------------------- /client/styles/angular-ui.css: -------------------------------------------------------------------------------- 1 | .ui-resetwrap{position:relative;display:inline-block}.ui-reset{position:absolute;top:0;right:0;z-index:2;display:none;height:100%;cursor:pointer}.ui-resetwrap:hover .ui-reset{display:block}.ui-currency-pos{color:green}.ui-currency-neg{color:red}.ui-currency-zero{color:blue}.ui-currency-pos.ui-bignum,.ui-currency-neg.ui-smallnum{font-size:110%}.ui-match{background:yellow} -------------------------------------------------------------------------------- /samples/angular_todo/server.node.js: -------------------------------------------------------------------------------- 1 | var argv = require('optimist').argv; 2 | var port = argv._[0] ? argv._[0] : 8000; 3 | var release = argv.hasOwnProperty('r'); 4 | var Master = require('nombo').Master; 5 | 6 | var options = { 7 | port: port, 8 | release: release, 9 | sessionTimeout: 5000, 10 | title: 'Todo App' 11 | }; 12 | 13 | var nombo = new Master(options); 14 | nombo.start(); -------------------------------------------------------------------------------- /samples/angular_projects/server.node.js: -------------------------------------------------------------------------------- 1 | var argv = require('optimist').argv; 2 | var port = argv._[0] ? argv._[0] : 8000; 3 | var release = argv.hasOwnProperty('r'); 4 | var Master = require('nombo').Master; 5 | 6 | var options = { 7 | port: port, 8 | release: release, 9 | sessionTimeout: 5000, 10 | title: 'Projects App' 11 | }; 12 | 13 | var nombo = new Master(options); 14 | nombo.start(); -------------------------------------------------------------------------------- /app/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains template files for use by the application. 2 | If AngularJS is enabled, index.html will be used as the main template by default. 3 | Note that this template will be embeded inside the tag of the DOM - Manipulation of the head element 4 | such as bundling of scripts and setting an app title) should be done through Nombo start options (see app/server.node.js). -------------------------------------------------------------------------------- /samples/memo/styles/main.css: -------------------------------------------------------------------------------- 1 | .main { 2 | padding: 20px; 3 | } 4 | 5 | .login-screen { 6 | position: absolute; 7 | width: 220px; 8 | height: 160px; 9 | left: 50%; 10 | top: 50%; 11 | margin-left: -110px; 12 | margin-top: -80px; 13 | } 14 | 15 | .main { 16 | padding: 20px; 17 | } 18 | 19 | .error-text { 20 | color: #e00; 21 | } 22 | 23 | .dialog { 24 | display: none; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /samples/angular_todo/styles/main.css: -------------------------------------------------------------------------------- 1 | .main { 2 | margin-top: 20px; 3 | margin-right: auto; 4 | margin-left: auto; 5 | width: 300px; 6 | min-height: 200px; 7 | padding: 20px; 8 | background: #eee; 9 | -moz-border-radius: 10px; 10 | border-radius: 10px; 11 | } 12 | 13 | .main input { 14 | margin-right: 5px; 15 | } 16 | 17 | .done-true { 18 | text-decoration: line-through; 19 | color: grey; 20 | } -------------------------------------------------------------------------------- /samples/security/templates/README: -------------------------------------------------------------------------------- 1 | This directory contains template files for use by the application. 2 | If AngularJS is enabled, index.html will be used as the main template by default. 3 | Note that this template will be embeded inside the tag of the DOM - Manipulation of the head element 4 | such as bundling of scripts and setting an app title) should be done through Nombo start options (see app/server.node.js). -------------------------------------------------------------------------------- /samples/uploader/scripts/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | We do not have to use $n.ready() because we are not loading any assets dynamically. 3 | We have already pre-bundled them in app/server.node.js. 4 | */ 5 | 6 | $(document.body).html('
Upload your files!

'); 7 | 8 | var uploader = new qq.FileUploader({ 9 | element: $('.file-uploader')[0], 10 | action: '/~upload' 11 | }); -------------------------------------------------------------------------------- /samples/memo/server.node.js: -------------------------------------------------------------------------------- 1 | var argv = require('optimist').argv; 2 | var port = argv._[0] ? argv._[0] : 8000; 3 | var release = argv.hasOwnProperty('r'); 4 | var Master = require('nombo').Master; 5 | 6 | var options = { 7 | port: port, 8 | release: release, 9 | sessionTimeout: 10, 10 | workers: [{port: 9022}], 11 | stores: [{port: 9020}, {port: 9021}], 12 | title: 'Memo App' 13 | }; 14 | 15 | var nombo = new Master(options); 16 | nombo.start(); -------------------------------------------------------------------------------- /samples/chat/master.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed once by the master process. 3 | This is where configuration tasks and resource bundling should happen. 4 | It is also an ideal place to spawn daemon processes. 5 | */ 6 | 7 | module.exports.run = function (nombo) { 8 | nombo.on('fail', function (err) { 9 | console.log('FAIL:', err.origin, err.message); 10 | }); 11 | nombo.on('notice', function (err) { 12 | console.log('NOTICE:', err.origin, err.message); 13 | }); 14 | } -------------------------------------------------------------------------------- /samples/dynamic_linking/scripts/b.js: -------------------------------------------------------------------------------- 1 | var c = $n.grab.app.script('c'); 2 | 3 | $n.ready(function() { 4 | exports.foo = function() { 5 | return 'This is b.foo()'; 6 | } 7 | 8 | exports.ClassC = c.ClassC; 9 | 10 | exports.dynamicLoadAndRun = function(callback) { 11 | var d = $n.grab.app.script('d'); 12 | // Wait for d script to load before calling its someMethod method and returning the result asynchronously via callback 13 | $n.ready(function() { 14 | callback(d.someMethod()); 15 | }); 16 | } 17 | }); -------------------------------------------------------------------------------- /samples/angular_todo/master.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed once by the master process. 3 | This is where configuration tasks and resource bundling should happen. 4 | It is also an ideal place to spawn daemon processes. 5 | */ 6 | 7 | module.exports.run = function (nombo) { 8 | // These files will be included as part of preload process 9 | nombo.bundle.framework.style('bootstrap'); 10 | nombo.bundle.app.style('main'); 11 | nombo.bundle.framework.lib('angular'); 12 | nombo.bundle.app.template('index'); 13 | } -------------------------------------------------------------------------------- /samples/angular_projects/master.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed once by the master process. 3 | This is where configuration tasks and resource bundling should happen. 4 | It is also an ideal place to spawn daemon processes. 5 | */ 6 | 7 | module.exports.run = function (nombo) { 8 | // These files will be included as part of preload process 9 | nombo.bundle.framework.style('bootstrap'); 10 | nombo.bundle.framework.lib('angular'); 11 | nombo.bundle.framework.lib('angular/rout'); 12 | nombo.bundle.app.template('index'); 13 | nombo.bundle.app.style('main'); 14 | } -------------------------------------------------------------------------------- /samples/security/server.node.js: -------------------------------------------------------------------------------- 1 | var argv = require('optimist').argv; 2 | var port = argv._[0] ? argv._[0] : 8000; 3 | var release = argv.hasOwnProperty('r'); 4 | var Master = require('nombo').Master; 5 | var fs = require('fs'); 6 | 7 | var options = { 8 | port: port, 9 | release: release, 10 | protocol: 'https', 11 | protocolOptions: { 12 | key: fs.readFileSync(__dirname + '/keys/enc_key.pem', 'utf8'), 13 | cert: fs.readFileSync(__dirname + '/keys/cert.pem', 'utf8'), 14 | passphrase: 'apple' 15 | } 16 | }; 17 | 18 | var nombo = new Master(options); 19 | nombo.start(); -------------------------------------------------------------------------------- /app/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /client/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /app/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/chat/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/memo/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/security/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/uploader/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /client/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/angular_todo/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/angular_projects/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/chat/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/dynamic_linking/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/memo/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/static_linking/scripts/failedconnection.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | Server connection failed due to the following error: ' + NOMBO_ERROR + '.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/chat/server.node.js: -------------------------------------------------------------------------------- 1 | var argv = require('optimist').argv; 2 | var port = argv._[0] ? argv._[0] : 8000; 3 | var release = argv.hasOwnProperty('r'); 4 | var Master = require('nombo').Master; 5 | var fs = require('fs'); 6 | 7 | var options = { 8 | port: port, 9 | release: release, 10 | balancerCount: 1, 11 | workers: [9100], 12 | stores: [9120], 13 | addressSocketLimit: 4, 14 | connectTimeout: 10, 15 | spinner: true, 16 | spinnerOptions: { 17 | lines: 10, 18 | radius: 15, 19 | color: '#8cc84b' 20 | }, 21 | logLevel: 2 22 | }; 23 | 24 | var nombo = new Master(options); 25 | nombo.start(); -------------------------------------------------------------------------------- /samples/security/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/uploader/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/angular_projects/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/angular_todo/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/dynamic_linking/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/static_linking/scripts/cookiesdisabled.js: -------------------------------------------------------------------------------- 1 | var content = '
\ 2 | Nombo\ 3 |
\ 4 | This app requires cookies. Please enable cookies in your browser and reload this page.\ 5 |
\ 6 |
'; 7 | 8 | document.body.innerHTML = content; -------------------------------------------------------------------------------- /samples/dynamic_linking/scripts/a.js: -------------------------------------------------------------------------------- 1 | var b = $n.grab.app.script('b'); 2 | 3 | $n.ready(function() { 4 | // This script will have a foo(callback) method. Note that you can also use module.exports in the place of exports 5 | exports.foo = function(callback) { 6 | var c = new b.ClassC(); 7 | // This function is taken from scrpt b, it dynamically requires the d script and calls a method on it 8 | b.dynamicLoadAndRun(function(dataFromDScript) { 9 | // Here functions are being evoked on all subdependencies 10 | callback('This is a.foo(), ' + b.foo() + ', ' + c.getMessage() + ', ' + dataFromDScript); 11 | }); 12 | } 13 | }); -------------------------------------------------------------------------------- /samples/static_linking/scripts/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | To load scripts statically (at launch), you need to call require(). 3 | Embedding dependencies in this way allows you to treat client-side scripts as though they were Node.js modules. 4 | Effectively, all the linking and bundling happens at launch so that when a script executes, all its dependencies have already been loaded. 5 | This avoids the need for waiting for scripts to load asyncronously. 6 | This is the simplest and recommended way to link script dependencies. 7 | */ 8 | 9 | var a = require('./a'); 10 | 11 | $(document.body).html('
' + a.foo() + '
'); -------------------------------------------------------------------------------- /client/libs/jquery/effects/fade.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Fade 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Fade 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); 14 | -------------------------------------------------------------------------------- /samples/angular_todo/templates/index.html: -------------------------------------------------------------------------------- 1 |
2 |

Todo

3 |
4 | {{remaining()}} of {{todos.length}} remaining 5 | [ archive ] 6 | 12 |
13 | 14 | 15 |
16 |
17 |
-------------------------------------------------------------------------------- /samples/angular_projects/templates/list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 11 | 14 | 15 | 16 | 17 | 18 | 21 | 24 | 27 | 28 | 29 |
6 | Project 7 | 9 | Description 10 | 12 | 13 |
19 | {{project.name}} 20 | 22 | {{project.description}} 23 | 25 | 26 |
-------------------------------------------------------------------------------- /samples/memo/templates/main.html: -------------------------------------------------------------------------------- 1 |
2 | This is a basic (and unpractical) memo app. You may want to open this app in another tab to see how Nombo synchronizes sessions across all open tabs.
3 | Close all tabs and leave them closed for approximately 10 seconds to destroy the session and all related data.
4 |
5 | Once you add a note to the table below, you can share it with the chat app ( http://samples.nombo.io:8000 ). 6 | Nombo allows you to do this with a single line of code.
7 |
8 |
9 |

10 | 11 |
-------------------------------------------------------------------------------- /samples/memo/worker.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed for each Nombo worker instance. 3 | Middleware functions should be added here. 4 | */ 5 | 6 | var ws = require('nombo/webservice'); 7 | 8 | module.exports.run = function (nombo) { 9 | nombo.addMiddleware(nombo.MIDDLEWARE_IO, function(req, res, next) { 10 | if(req.sim == 'auth') { 11 | // Do not need to login to use auth server interface module 12 | next(); 13 | } else { 14 | // For any other sim, check if current session is authorized 15 | req.session.get('loggedIn', function(err, loggedIn) { 16 | if(loggedIn) { 17 | next(); 18 | } else { 19 | res.error('Socket communication not authorized - You are not logged in'); 20 | } 21 | }); 22 | } 23 | }); 24 | } -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /samples/chat/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /samples/memo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /samples/security/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /samples/uploader/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /samples/dynamic_linking/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /samples/static_linking/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /samples/angular_projects/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /samples/angular_todo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /client/libs/jquery/effects/transfer.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Transfer 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Transfer 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(e){e.effects.transfer=function(a){return this.queue(function(){var b=e(this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e('
').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); 14 | b.dequeue()})})}})(jQuery); 15 | -------------------------------------------------------------------------------- /samples/angular_todo/scripts/index.js: -------------------------------------------------------------------------------- 1 | $(document.body).html($n.grab.app.template('index').toString()); 2 | 3 | window.TodoCtrl = function ($scope) { 4 | $scope.todos = [{ 5 | text: 'learn angular', 6 | done: true 7 | }, { 8 | text: 'build an angular app', 9 | done: false 10 | } 11 | ]; 12 | 13 | $scope.addTodo = function () { 14 | $scope.todos.push({ 15 | text: $scope.todoText, 16 | done: false 17 | }); 18 | $scope.todoText = ''; 19 | }; 20 | 21 | $scope.remaining = function () { 22 | var count = 0; 23 | angular.forEach($scope.todos, function (todo) { 24 | count += todo.done ? 0 : 1; 25 | }); 26 | return count; 27 | }; 28 | 29 | $scope.archive = function () { 30 | var oldTodos = $scope.todos; 31 | $scope.todos = []; 32 | angular.forEach(oldTodos, function (todo) { 33 | if (!todo.done) $scope.todos.push(todo); 34 | }); 35 | }; 36 | } 37 | 38 | angular.bootstrap(document); -------------------------------------------------------------------------------- /samples/security/keys/key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXQIBAAKBgQDJPMY5rWQvrDa9u6qkHB/8AcHK+lUBueO3pGFdK62TclFLIBo4 3 | r0OtWcUB9xySYy4zxv5j+3R4JZ9ugVgAuXsjQtHN9fQ8EaIq3H0j6tdJ14SwRJGR 4 | YVlE9Kv+jATlCBitWw1Um7YmpTsrPnVSDLRotPdO4VyIE4iN3YI8JJ05TwIDAQAB 5 | AoGAQafIbKz7kOo4+fIunFhovwm7toOyFFwXxaSl94X2nbKgf0g8Bd540CgHtLpw 6 | 4fnl6xKzkN9Lgp+TwrQEiEf7ulLtKdlpyqm3uIZ3Prc/3wHMMzV7p5m0cf5EaXb4 7 | SWxIAMrxslE1hS+WUlIfQgaA9/U4K3Krf/9tODBEL6e2ZoECQQDzYQVi4QBxAKU0 8 | tX906Wk9cZV4l7sQ1+svUber7Vx5CLZEMrBvUIq5OkOXhOi27fgSNCEgV41yAmS7 9 | 0es0mDkhAkEA06xNaqK8lEVB9acoiZTSSVcfFjhemGOEskmK0Nd5j+5npSfTeohZ 10 | XUuFEE3F0KCBRowYrAguAbK0JAHHfgn0bwJBAKisGPuKTLAEbnq1Pvxbt+AplBnb 11 | rn3h5tEIpW62Nlx7uTZSmwzKmRn+U1HzfwUor8CN+Fdd1l2pYv74YTY2OYECQQDP 12 | 4MVe1ldxHds7T2CmTTt/v0nOXqm36vRky4jCtPqzeaTcM5KjIcjxsLsLWfXNf/O1 13 | vtx0Bsx36nKzcfPjOg+NAkAqggoNzQGILuJONive/LM9qFIQyhnWueB6gtzpjzQw 14 | +ssO164bJItsXaFX/qqKNQoBfTcYhnW3jQWSK/sy5bOl 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /app/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains the modular .js script files that make-up the client-side of the application. 2 | When you setup your app for the first time, the following special script files will be 3 | inside the scripts/ directory: 4 | 5 | index.js - This is your app's main entry file; it is where all your client-side application logic should begin. 6 | You may want to add subdirectories inside the script/ directory to structure your app's code. 7 | 8 | load.js - This file gets executed as part of Nombo's preloading stage; you can completely customize the 9 | preloading screen by using this file. It's a good idea to keep this file light-weight. 10 | 11 | cookiesdisabled.js - Will be invoked if a user's browser doesn't support cookies (which are required by Nombo). 12 | 13 | failedconnection.js - Will be invoked whenever an initial connection fails; for whatever reason. You can use the 14 | global variable NOMBO_ERROR to show more details about the error. -------------------------------------------------------------------------------- /client/libs/jquery/effects/blind.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Blind 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Blind 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","bottom","left","right"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a, 14 | g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery); 15 | -------------------------------------------------------------------------------- /samples/memo/master.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function is executed once by the master process. 3 | This is where configuration tasks and resource bundling should happen. 4 | It is also an ideal place to spawn daemon processes. 5 | */ 6 | 7 | module.exports.run = function (nombo) { 8 | // These files will be included as part of preload process 9 | nombo.bundle.framework.style('bootstrap.css'); 10 | nombo.bundle.framework.style('jqueryui/ui-lightness/style.css'); 11 | nombo.bundle.framework.lib('jquery/ui.js'); 12 | 13 | nombo.bundle.app.template('login.html'); 14 | nombo.bundle.app.template('notes_table.html'); 15 | nombo.bundle.app.template('main.html'); 16 | nombo.bundle.app.template('add_note_dialog.html'); 17 | 18 | nombo.bundle.app.style('main.css'); 19 | 20 | nombo.on('fail', function (err) { 21 | console.log('FAIL:', err.origin, err.message); 22 | }); 23 | nombo.on('notice', function (err) { 24 | console.log('NOTICE:', err.origin, err.message); 25 | }); 26 | } -------------------------------------------------------------------------------- /samples/memo/sims/auth.node.js: -------------------------------------------------------------------------------- 1 | /* 2 | Check if session has been authorized. 3 | */ 4 | module.exports.isLoggedIn = function(req, res) { 5 | req.session.get('loggedIn', function(err, loggedIn) { 6 | try { 7 | res.end(loggedIn); 8 | } catch(e) { 9 | res.error(e); 10 | } 11 | }); 12 | } 13 | 14 | /* 15 | The only valid values are username 'bob' and password 'hello'. 16 | In a practical case, you may want to use a database. 17 | */ 18 | module.exports.login = function(req, res) { 19 | if(req.data.username == 'bob' && req.data.password == 'hello') { 20 | // Here we are setting the loggedIn key to true to authorize the current session 21 | req.session.set('loggedIn', true, function(err) { 22 | res.end(true); 23 | }); 24 | } else { 25 | res.end(false); 26 | } 27 | } 28 | 29 | /* 30 | Unauthorize the current session. 31 | */ 32 | module.exports.logout = function(req, res) { 33 | req.session.remove('loggedIn', function(err) { 34 | res.end(!err); 35 | }); 36 | } -------------------------------------------------------------------------------- /samples/security/scripts/README: -------------------------------------------------------------------------------- 1 | This directory contains the modular .js script files that make-up the client-side of the application. 2 | When you setup your app for the first time, the following special script files will be 3 | inside the scripts/ directory: 4 | 5 | index.js - This is your app's main entry file; it is where all your client-side application logic should begin. 6 | You may want to add subdirectories inside the script/ directory to structure your app's code. 7 | 8 | load.js - This file gets executed as part of Nombo's preloading stage; you can completely customize the 9 | preloading screen by using this file. It's a good idea to keep this file light-weight. 10 | 11 | cookiesdisabled.js - Will be invoked if a user's browser doesn't support cookies (which are required by Nombo). 12 | 13 | failedconnection.js - Will be invoked whenever an initial connection fails; for whatever reason. You can use the 14 | global variable NOMBO_ERROR to show more details about the error. -------------------------------------------------------------------------------- /client/libs/jquery/effects/highlight.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Highlight 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Highlight 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& 14 | this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); 15 | -------------------------------------------------------------------------------- /client/libs/jquery/effects/pulsate.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Pulsate 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Pulsate 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c 2 |
3 | 4 | 5 | 6 | Required 7 |
8 |
9 | 10 | 11 | 12 | Required 13 | 14 | Not a URL 15 |
16 | 17 | 18 |
19 | Cancel 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/security/keys/cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICqjCCAhOgAwIBAgIJALIj2Ces80M4MA0GCSqGSIb3DQEBBQUAMG4xCzAJBgNV 3 | BAYTAkFVMRgwFgYDVQQIDA9OZXcgU291dGggV2FsZXMxDzANBgNVBAcMBlN5ZG5l 4 | eTEOMAwGA1UECgwFTm9tYm8xJDAiBgkqhkiG9w0BCQEWFWdyb3Nqb25hQHlhaG9v 5 | LmNvbS5hdTAeFw0xNDAyMjQwODUxMzVaFw0yNDAyMjIwODUxMzVaMG4xCzAJBgNV 6 | BAYTAkFVMRgwFgYDVQQIDA9OZXcgU291dGggV2FsZXMxDzANBgNVBAcMBlN5ZG5l 7 | eTEOMAwGA1UECgwFTm9tYm8xJDAiBgkqhkiG9w0BCQEWFWdyb3Nqb25hQHlhaG9v 8 | LmNvbS5hdTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAyTzGOa1kL6w2vbuq 9 | pBwf/AHByvpVAbnjt6RhXSutk3JRSyAaOK9DrVnFAfcckmMuM8b+Y/t0eCWfboFY 10 | ALl7I0LRzfX0PBGiKtx9I+rXSdeEsESRkWFZRPSr/owE5QgYrVsNVJu2JqU7Kz51 11 | Ugy0aLT3TuFciBOIjd2CPCSdOU8CAwEAAaNQME4wHQYDVR0OBBYEFP675H+0r1Yi 12 | 7eSqjE+ZU2W7mWr+MB8GA1UdIwQYMBaAFP675H+0r1Yi7eSqjE+ZU2W7mWr+MAwG 13 | A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAwAB2bzNVZi+pN7/7otRk/bOF 14 | p4rmo44tsl87rm174iPWbKR6Qi1jfRrdEdtqKOZhnZFSOvcVmIXqP8mZW2TZ+wpa 15 | EB39g6xjrruu3C2I+Pquyi2E4rMDlO0xitzf3XgJVmeRDby/VoTRcCmiVtmPeOiK 16 | m/29se47RQZ3TXVuqnM= 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /license_mit.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Nombo (http://nombo.io/). 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files 4 | (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, 5 | publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 6 | subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 11 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 12 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 13 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /client/libs/bootstrap/tests/unit/bootstrap-scrollspy.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-scrollspy") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).scrollspy, 'scrollspy method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).scrollspy()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should switch active class on scroll", function () { 14 | var sectionHTML = '
' 15 | , $section = $(sectionHTML).append('#qunit-runoff') 16 | , topbarHTML ='
' 17 | + '
' 18 | + '
' 19 | + '

Bootstrap

' 20 | + '' 23 | + '
' 24 | + '
' 25 | + '
' 26 | , $topbar = $(topbarHTML).topbar() 27 | 28 | ok(topbar.find('.active', true) 29 | }) 30 | 31 | }) -------------------------------------------------------------------------------- /client/libs/jquery/effects/clip.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Clip 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Clip 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","bottom","left","right","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position, 14 | c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery); 15 | -------------------------------------------------------------------------------- /client/libs/jquery/effects/slide.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Slide 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Slide 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right"],f=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var g=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var e=d.options.distance||(g=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(f=="show")a.css(g,b=="pos"?isNaN(e)?"-"+e:-e:e); 14 | var i={};i[g]=(f=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+e;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){f=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); 15 | -------------------------------------------------------------------------------- /client/libs/jquery/effects/drop.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Drop 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Drop 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e== 14 | "show"?1:0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); 15 | -------------------------------------------------------------------------------- /samples/chat/styles/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 18px; 3 | } 4 | 5 | input[type=text] { 6 | font-size: 16px; 7 | -moz-border-radius: 10px; 8 | border-radius: 10px; 9 | border: 1px solid #ccc; 10 | } 11 | 12 | input[type=text]:focus { 13 | outline: none; 14 | box-shadow: 0 0 5px #9cd85b; 15 | } 16 | 17 | input[type=button] { 18 | font-size: 16px; 19 | -moz-border-radius: 10px; 20 | border-radius: 10px; 21 | border: 1px solid #ccc; 22 | background: #ddd; 23 | } 24 | 25 | input[type=button]:focus { 26 | outline: none; 27 | } 28 | 29 | input[type=button]:hover { 30 | cursor: pointer; 31 | background: #eee; 32 | } 33 | 34 | .chatBox { 35 | width: 400px; 36 | height: 200px; 37 | margin-left: auto; 38 | margin-right: auto; 39 | } 40 | 41 | #nameBox { 42 | width: 240px; 43 | height: 22px; 44 | margin-top: 3px; 45 | margin-left: 10px; 46 | padding-left: 10px; 47 | } 48 | 49 | #sendBox { 50 | width: 290px; 51 | height: 22px; 52 | margin-right: 5px; 53 | display: inline-block; 54 | padding-left: 10px; 55 | margin-bottom: 20px; 56 | } 57 | 58 | #sendButton { 59 | width: 60px; 60 | height: 27px; 61 | display: inline-block; 62 | } -------------------------------------------------------------------------------- /client/libs/jquery/effects/fold.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Fold 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Fold 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], 14 | 10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); 15 | -------------------------------------------------------------------------------- /client/libs/jquery/effects/shake.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Shake 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Shake 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),j=["position","top","bottom","left","right"];d.effects.setMode(b,a.options.mode||"effect");var c=a.options.direction||"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c=="up"||c=="down"?"top":"left",h=c=="up"||c=="left"?"pos":"neg";c={};var i={},k={};c[g]=(h=="pos"?"-=":"+=")+e;i[g]=(h=="pos"?"+=":"-=")+e*2;k[g]= 14 | (h=="pos"?"-=":"+=")+e*2;b.animate(c,f,a.options.easing);for(e=1;e' + result + ''); 26 | }); 27 | }); -------------------------------------------------------------------------------- /client/libs/bootstrap/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bootstrap Plugin Test Suite 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |

Bootstrap Plugin Test Suite

34 |

35 |

36 |
    37 |
    38 |
    39 | 40 | -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- 1 | Nombo App 2 | ====== 3 | 4 | This is the Nombo app directory - All source files and assets for your app should be placed in this directory or in one of the following subdirectories: 5 | 6 | - assets: To hold client-side static assets such as images, graphics an other media used within your application. You may alternatively prefer to place such files under the styles/ directory if they are being referenced within your app's CSS. 7 | - files: Default directory where files uploaded using the default nombo/fileuploader module are placed. 8 | - libs: Should contain JavaScript libraries for use within your app. Unlike scripts, libs are loaded directly into the global namespace - They should be used sparingly and in a controlled manner to avoid name clashes. 9 | - node_modules: For Node.js modules and other general purpose CommonJS modules - These can be used on both the client or server side. 10 | - scripts: Holds client-side CommonJS scripts for use within your application. The index.js file is the entry point of the application and will be executed as soon as your app has finished loading its bundled scripts, styles, assets and modules. 11 | - sims: This is where your Server Interface Modules (SIMs) should be defined (preferably with a .node.js extension). 12 | - styles: For holding CSS files and associated assets. 13 | 14 | Under each of these directories, you can setup any subdirectory structure you want. 15 | For scripts, a .js extension implies that the script is public while a .node.js extension signifies that this file is private and should never be served to the client-side (only for server-side use). -------------------------------------------------------------------------------- /samples/chat/README.md: -------------------------------------------------------------------------------- 1 | Nombo App 2 | ====== 3 | 4 | This is the Nombo app directory - All source files and assets for your app should be placed in this directory or in one of the following subdirectories: 5 | 6 | - assets: To hold client-side static assets such as images, graphics an other media used within your application. You may alternatively prefer to place such files under the styles/ directory if they are being referenced within your app's CSS. 7 | - files: Default directory where files uploaded using the default nombo/fileuploader module are placed. 8 | - libs: Should contain JavaScript libraries for use within your app. Unlike scripts, libs are loaded directly into the global namespace - They should be used sparingly and in a controlled manner to avoid name clashes. 9 | - node_modules: For Node.js modules and other general purpose CommonJS modules - These can be used on both the client or server side. 10 | - scripts: Holds client-side CommonJS scripts for use within your application. The index.js file is the entry point of the application and will be executed as soon as your app has finished loading its bundled scripts, styles, assets and modules. 11 | - sims: This is where your Server Interface Modules (SIMs) should be defined (preferably with a .node.js extension). 12 | - styles: For holding CSS files and associated assets. 13 | 14 | Under each of these directories, you can setup any subdirectory structure you want. 15 | For scripts, a .js extension implies that the script is public while a .node.js extension signifies that this file is private and should never be served to the client-side (only for server-side use). -------------------------------------------------------------------------------- /samples/memo/README.md: -------------------------------------------------------------------------------- 1 | Nombo App 2 | ====== 3 | 4 | This is the Nombo app directory - All source files and assets for your app should be placed in this directory or in one of the following subdirectories: 5 | 6 | - assets: To hold client-side static assets such as images, graphics an other media used within your application. You may alternatively prefer to place such files under the styles/ directory if they are being referenced within your app's CSS. 7 | - files: Default directory where files uploaded using the default nombo/fileuploader module are placed. 8 | - libs: Should contain JavaScript libraries for use within your app. Unlike scripts, libs are loaded directly into the global namespace - They should be used sparingly and in a controlled manner to avoid name clashes. 9 | - node_modules: For Node.js modules and other general purpose CommonJS modules - These can be used on both the client or server side. 10 | - scripts: Holds client-side CommonJS scripts for use within your application. The index.js file is the entry point of the application and will be executed as soon as your app has finished loading its bundled scripts, styles, assets and modules. 11 | - sims: This is where your Server Interface Modules (SIMs) should be defined (preferably with a .node.js extension). 12 | - styles: For holding CSS files and associated assets. 13 | 14 | Under each of these directories, you can setup any subdirectory structure you want. 15 | For scripts, a .js extension implies that the script is public while a .node.js extension signifies that this file is private and should never be served to the client-side (only for server-side use). -------------------------------------------------------------------------------- /samples/security/README.md: -------------------------------------------------------------------------------- 1 | Nombo App 2 | ====== 3 | 4 | This is the Nombo app directory - All source files and assets for your app should be placed in this directory or in one of the following subdirectories: 5 | 6 | - assets: To hold client-side static assets such as images, graphics an other media used within your application. You may alternatively prefer to place such files under the styles/ directory if they are being referenced within your app's CSS. 7 | - files: Default directory where files uploaded using the default nombo/fileuploader module are placed. 8 | - libs: Should contain JavaScript libraries for use within your app. Unlike scripts, libs are loaded directly into the global namespace - They should be used sparingly and in a controlled manner to avoid name clashes. 9 | - node_modules: For Node.js modules and other general purpose CommonJS modules - These can be used on both the client or server side. 10 | - scripts: Holds client-side CommonJS scripts for use within your application. The index.js file is the entry point of the application and will be executed as soon as your app has finished loading its bundled scripts, styles, assets and modules. 11 | - sims: This is where your Server Interface Modules (SIMs) should be defined (preferably with a .node.js extension). 12 | - styles: For holding CSS files and associated assets. 13 | 14 | Under each of these directories, you can setup any subdirectory structure you want. 15 | For scripts, a .js extension implies that the script is public while a .node.js extension signifies that this file is private and should never be served to the client-side (only for server-side use). -------------------------------------------------------------------------------- /samples/uploader/README.md: -------------------------------------------------------------------------------- 1 | Nombo App 2 | ====== 3 | 4 | This is the Nombo app directory - All source files and assets for your app should be placed in this directory or in one of the following subdirectories: 5 | 6 | - assets: To hold client-side static assets such as images, graphics an other media used within your application. You may alternatively prefer to place such files under the styles/ directory if they are being referenced within your app's CSS. 7 | - files: Default directory where files uploaded using the default nombo/fileuploader module are placed. 8 | - libs: Should contain JavaScript libraries for use within your app. Unlike scripts, libs are loaded directly into the global namespace - They should be used sparingly and in a controlled manner to avoid name clashes. 9 | - node_modules: For Node.js modules and other general purpose CommonJS modules - These can be used on both the client or server side. 10 | - scripts: Holds client-side CommonJS scripts for use within your application. The index.js file is the entry point of the application and will be executed as soon as your app has finished loading its bundled scripts, styles, assets and modules. 11 | - sims: This is where your Server Interface Modules (SIMs) should be defined (preferably with a .node.js extension). 12 | - styles: For holding CSS files and associated assets. 13 | 14 | Under each of these directories, you can setup any subdirectory structure you want. 15 | For scripts, a .js extension implies that the script is public while a .node.js extension signifies that this file is private and should never be served to the client-side (only for server-side use). -------------------------------------------------------------------------------- /samples/angular_projects/README.md: -------------------------------------------------------------------------------- 1 | Nombo App 2 | ====== 3 | 4 | This is the Nombo app directory - All source files and assets for your app should be placed in this directory or in one of the following subdirectories: 5 | 6 | - assets: To hold client-side static assets such as images, graphics an other media used within your application. You may alternatively prefer to place such files under the styles/ directory if they are being referenced within your app's CSS. 7 | - files: Default directory where files uploaded using the default nombo/fileuploader module are placed. 8 | - libs: Should contain JavaScript libraries for use within your app. Unlike scripts, libs are loaded directly into the global namespace - They should be used sparingly and in a controlled manner to avoid name clashes. 9 | - node_modules: For Node.js modules and other general purpose CommonJS modules - These can be used on both the client or server side. 10 | - scripts: Holds client-side CommonJS scripts for use within your application. The index.js file is the entry point of the application and will be executed as soon as your app has finished loading its bundled scripts, styles, assets and modules. 11 | - sims: This is where your Server Interface Modules (SIMs) should be defined (preferably with a .node.js extension). 12 | - styles: For holding CSS files and associated assets. 13 | 14 | Under each of these directories, you can setup any subdirectory structure you want. 15 | For scripts, a .js extension implies that the script is public while a .node.js extension signifies that this file is private and should never be served to the client-side (only for server-side use). -------------------------------------------------------------------------------- /samples/angular_todo/README.md: -------------------------------------------------------------------------------- 1 | Nombo App 2 | ====== 3 | 4 | This is the Nombo app directory - All source files and assets for your app should be placed in this directory or in one of the following subdirectories: 5 | 6 | - assets: To hold client-side static assets such as images, graphics an other media used within your application. You may alternatively prefer to place such files under the styles/ directory if they are being referenced within your app's CSS. 7 | - files: Default directory where files uploaded using the default nombo/fileuploader module are placed. 8 | - libs: Should contain JavaScript libraries for use within your app. Unlike scripts, libs are loaded directly into the global namespace - They should be used sparingly and in a controlled manner to avoid name clashes. 9 | - node_modules: For Node.js modules and other general purpose CommonJS modules - These can be used on both the client or server side. 10 | - scripts: Holds client-side CommonJS scripts for use within your application. The index.js file is the entry point of the application and will be executed as soon as your app has finished loading its bundled scripts, styles, assets and modules. 11 | - sims: This is where your Server Interface Modules (SIMs) should be defined (preferably with a .node.js extension). 12 | - styles: For holding CSS files and associated assets. 13 | 14 | Under each of these directories, you can setup any subdirectory structure you want. 15 | For scripts, a .js extension implies that the script is public while a .node.js extension signifies that this file is private and should never be served to the client-side (only for server-side use). -------------------------------------------------------------------------------- /samples/dynamic_linking/README.md: -------------------------------------------------------------------------------- 1 | Nombo App 2 | ====== 3 | 4 | This is the Nombo app directory - All source files and assets for your app should be placed in this directory or in one of the following subdirectories: 5 | 6 | - assets: To hold client-side static assets such as images, graphics an other media used within your application. You may alternatively prefer to place such files under the styles/ directory if they are being referenced within your app's CSS. 7 | - files: Default directory where files uploaded using the default nombo/fileuploader module are placed. 8 | - libs: Should contain JavaScript libraries for use within your app. Unlike scripts, libs are loaded directly into the global namespace - They should be used sparingly and in a controlled manner to avoid name clashes. 9 | - node_modules: For Node.js modules and other general purpose CommonJS modules - These can be used on both the client or server side. 10 | - scripts: Holds client-side CommonJS scripts for use within your application. The index.js file is the entry point of the application and will be executed as soon as your app has finished loading its bundled scripts, styles, assets and modules. 11 | - sims: This is where your Server Interface Modules (SIMs) should be defined (preferably with a .node.js extension). 12 | - styles: For holding CSS files and associated assets. 13 | 14 | Under each of these directories, you can setup any subdirectory structure you want. 15 | For scripts, a .js extension implies that the script is public while a .node.js extension signifies that this file is private and should never be served to the client-side (only for server-side use). -------------------------------------------------------------------------------- /samples/static_linking/README.md: -------------------------------------------------------------------------------- 1 | Nombo App 2 | ====== 3 | 4 | This is the Nombo app directory - All source files and assets for your app should be placed in this directory or in one of the following subdirectories: 5 | 6 | - assets: To hold client-side static assets such as images, graphics an other media used within your application. You may alternatively prefer to place such files under the styles/ directory if they are being referenced within your app's CSS. 7 | - files: Default directory where files uploaded using the default nombo/fileuploader module are placed. 8 | - libs: Should contain JavaScript libraries for use within your app. Unlike scripts, libs are loaded directly into the global namespace - They should be used sparingly and in a controlled manner to avoid name clashes. 9 | - node_modules: For Node.js modules and other general purpose CommonJS modules - These can be used on both the client or server side. 10 | - scripts: Holds client-side CommonJS scripts for use within your application. The index.js file is the entry point of the application and will be executed as soon as your app has finished loading its bundled scripts, styles, assets and modules. 11 | - sims: This is where your Server Interface Modules (SIMs) should be defined (preferably with a .node.js extension). 12 | - styles: For holding CSS files and associated assets. 13 | 14 | Under each of these directories, you can setup any subdirectory structure you want. 15 | For scripts, a .js extension implies that the script is public while a .node.js extension signifies that this file is private and should never be served to the client-side (only for server-side use). -------------------------------------------------------------------------------- /nombo-worker-bootstrap.node.js: -------------------------------------------------------------------------------- 1 | var Worker = require('./nombo-worker.node'); 2 | var worker; 3 | 4 | var handleError = function (err) { 5 | var error; 6 | if (err.stack) { 7 | error = { 8 | message: err.message, 9 | stack: err.stack 10 | } 11 | } else { 12 | error = err; 13 | } 14 | process.send({type: 'error', data: error}); 15 | }; 16 | 17 | var handleNotice = function (notice) { 18 | if (notice instanceof Error) { 19 | notice = notice.message; 20 | } 21 | process.send({type: 'notice', data: notice}); 22 | }; 23 | 24 | var handleWorkerStart = function () { 25 | process.send({type: 'ready'}); 26 | }; 27 | 28 | var handleExit = function () { 29 | process.exit(); 30 | }; 31 | 32 | process.on('message', function (m) { 33 | if (m.type == 'init') { 34 | worker = new Worker(m.data); 35 | 36 | if (m.data.propagateErrors) { 37 | worker.on('error', handleError); 38 | worker.on('notice', handleNotice); 39 | worker.on(worker.EVENT_WORKER_START, handleWorkerStart); 40 | worker.on(worker.EVENT_WORKER_EXIT, handleExit); 41 | } 42 | 43 | var workerController = require(m.data.paths.appWorkerControllerPath); 44 | workerController.run(worker); 45 | worker.start(); 46 | 47 | } else if (m.type == 'updateCache') { 48 | worker.handleCacheUpdate(m.data.url, m.data.content, m.data.size); 49 | 50 | } else if (m.type == 'updateCacheVersion') { 51 | worker.handleCacheVersionUpdate(m.data.cacheVersion); 52 | 53 | } else if (m.type == 'emit') { 54 | if (m.data) { 55 | worker.handleMasterEvent(m.event, m.data); 56 | } else { 57 | worker.handleMasterEvent(m.event); 58 | } 59 | } 60 | }); -------------------------------------------------------------------------------- /client/libs/bootstrap/tests/unit/bootstrap-alerts.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-alerts") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).alert, 'alert method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).alert()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should fade element out on clicking .close", function () { 14 | var alertHTML = '
    ' 15 | + '×' 16 | + '

    Holy guacamole! Best check yo self, you’re not looking too good.

    ' 17 | + '
    ' 18 | , alert = $(alertHTML).alert() 19 | 20 | alert.find('.close').click() 21 | 22 | ok(!alert.hasClass('in'), 'remove .in class on .close click') 23 | }) 24 | 25 | test("should remove element when clicking .close", function () { 26 | $.support.transition = false 27 | 28 | var alertHTML = '
    ' 29 | + '×' 30 | + '

    Holy guacamole! Best check yo self, you’re not looking too good.

    ' 31 | + '
    ' 32 | , alert = $(alertHTML).appendTo('#qunit-runoff').alert() 33 | 34 | ok($('#qunit-runoff').find('.alert-message').length, 'element added to dom') 35 | 36 | alert.find('.close').click() 37 | 38 | ok(!$('#qunit-runoff').find('.alert-message').length, 'element removed from dom') 39 | }) 40 | 41 | }) -------------------------------------------------------------------------------- /client/libs/jquery/effects/explode.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Explode 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Explode 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ 15 | e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); 16 | -------------------------------------------------------------------------------- /client/libs/jquery/effects/bounce.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Bounce 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Bounce 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","bottom","left","right"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/ 14 | 3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g 20) { 20 | messages.shift(); 21 | } 22 | 23 | var i; 24 | for(i in messages) { 25 | messages[i].user = messages[i].user.replace(//g, '>'); 26 | messages[i].message = messages[i].message.replace(//g, '>'); 27 | } 28 | 29 | req.global.set('messages', messages, function(err) { 30 | if(err) { 31 | // Send an error to the client. 32 | res.error('Failed to add message'); 33 | } else { 34 | /* 35 | There are three ways of emitting events in Nombo. 36 | The first way is via the session using session.emit() - This emits the event only to the client which initiated the current session 37 | The second and third ways can be called via the global object 38 | The global object has an emit(sessionID, event, data) method and a broadcast(event data) method 39 | The emit method allows you to emit the event to a specific session (by ID) while the broadcast method sends the event to every client that is connected to Nombo 40 | */ 41 | req.global.broadcast('updatemessages', messages); 42 | res.end(); 43 | } 44 | }); 45 | } 46 | }); 47 | } -------------------------------------------------------------------------------- /client/libs/bootstrap/bootstrap-dropdown.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-dropdown.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#dropdown 4 | * ============================================================ 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | /* DROPDOWN PLUGIN DEFINITION 26 | * ========================== */ 27 | 28 | $.fn.dropdown = function ( selector ) { 29 | return this.each(function () { 30 | $(this).delegate(selector || d, 'click', function (e) { 31 | var li = $(this).parent('li') 32 | , isActive = li.hasClass('open') 33 | 34 | clearMenus() 35 | !isActive && li.toggleClass('open') 36 | return false 37 | }) 38 | }) 39 | } 40 | 41 | /* APPLY TO STANDARD DROPDOWN ELEMENTS 42 | * =================================== */ 43 | 44 | var d = 'a.menu, .dropdown-toggle' 45 | 46 | function clearMenus() { 47 | $(d).parent('li').removeClass('open') 48 | } 49 | 50 | $(function () { 51 | $('html').bind("click", clearMenus) 52 | $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' ) 53 | }) 54 | 55 | }( window.jQuery || window.ender ); 56 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nombo", 3 | "description": "Cloud application framework", 4 | "version": "1.6.0", 5 | "author": { 6 | "name": "JF Gros-Dubois", 7 | "email": "flashthink@gmail.com" 8 | }, 9 | "contributors": [ 10 | { 11 | "name": "JF Gros-Dubois", 12 | "email": "flashthink@gmail.com" 13 | } 14 | ], 15 | "devDependencies": {}, 16 | "keywords": [ 17 | "nombo", 18 | "framework", 19 | "cloud", 20 | "web", 21 | "websocket", 22 | "app", 23 | "application", 24 | "realtime" 25 | ], 26 | "repository": { 27 | "type": "git", 28 | "url": "git://github.com/topcloud/nombo.git" 29 | }, 30 | "main": "./nombo.node.js", 31 | "bin": { 32 | "nombo": "bin/cli.js" 33 | }, 34 | "engines": { 35 | "node": ">= 0.8.0" 36 | }, 37 | "dependencies": { 38 | "active-x-obfuscator": "0.0.1", 39 | "async": "0.1.22", 40 | "base64id": "0.1.0", 41 | "browserify": "3.19.1", 42 | "cachemere": ">= 0.9.13", 43 | "cheerio": "0.12.4", 44 | "clean-css": "1.0.4", 45 | "commander": "0.5.2", 46 | "eventvat": "0.2.0", 47 | "expirymanager": ">= 0.9.1", 48 | "formidable": "1.0.11", 49 | "handlebars": "1.0.12", 50 | "iocluster": ">= 0.9.13", 51 | "less": "1.6.2", 52 | "linkedlist": "1.0.1", 53 | "loadbalancer": ">= 0.9.10", 54 | "mime": "1.2.5", 55 | "ncom": ">= 0.9.2", 56 | "ndata": ">= 0.9.33", 57 | "optimist": "0.3.5", 58 | "options": "0.0.3", 59 | "policyfile": "0.0.4", 60 | "redis": "0.7.3", 61 | "requireify": "0.1.4", 62 | "retry": "0.6.0", 63 | "socketcluster-client": ">= 0.9.12", 64 | "socketcluster-server": ">= 0.9.15", 65 | "uglify-js": "2.3.6", 66 | "watchify": "0.5.0", 67 | "watchr": "2.4.8", 68 | "wordwrap": "0.0.2", 69 | "wrench": "1.4.4", 70 | "xmlhttprequest": "1.2.2", 71 | "zeparser": "0.0.7" 72 | }, 73 | "bundleDependencies": [ 74 | "fileuploader", 75 | "json", 76 | "nombo", 77 | "stepper" 78 | ], 79 | "preferGlobal": "true" 80 | } 81 | -------------------------------------------------------------------------------- /client/libs/bootstrap/tests/unit/bootstrap-buttons.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-buttons") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).button, 'tabs method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).button()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should return set state to loading", function () { 14 | var btn = $('') 15 | equals(btn.html(), 'mdo', 'btn text equals mdo') 16 | btn.button('loading') 17 | equals(btn.html(), 'fat', 'btn text equals fat') 18 | stop() 19 | setTimeout(function() { 20 | start() 21 | ok(btn.attr('disabled'), 'btn is disabled') 22 | ok(btn.hasClass('disabled'), 'btn has disabled class') 23 | }, 0) 24 | }) 25 | 26 | test("should return reset state", function () { 27 | var btn = $('') 28 | equals(btn.html(), 'mdo', 'btn text equals mdo') 29 | btn.button('loading') 30 | equals(btn.html(), 'fat', 'btn text equals fat') 31 | stop() 32 | setTimeout(function() { 33 | start() 34 | ok(btn.attr('disabled'), 'btn is disabled') 35 | ok(btn.hasClass('disabled'), 'btn is disabled') 36 | }, 0) 37 | btn.button('reset') 38 | equals(btn.html(), 'mdo', 'btn text equals mdo') 39 | ok(!btn.attr('disabled'), 'btn is not disabled') 40 | ok(!btn.hasClass('disabled'), 'btn does not have disabled class') 41 | }) 42 | 43 | test("should toggle active", function () { 44 | var btn = $('') 45 | ok(!btn.hasClass('active'), 'btn does not have active class') 46 | btn.button('toggle') 47 | ok(btn.hasClass('active'), 'btn has class active') 48 | }) 49 | 50 | }) -------------------------------------------------------------------------------- /client/libs/bootstrap/bootstrap-buttons.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-buttons.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#buttons 4 | * ============================================================ 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | !function( $ ){ 21 | 22 | "use strict" 23 | 24 | function setState(el, state) { 25 | var d = 'disabled' 26 | , $el = $(el) 27 | , data = $el.data() 28 | 29 | state = state + 'Text' 30 | data.resetText || $el.data('resetText', $el.html()) 31 | 32 | $el.html( data[state] || $.fn.button.defaults[state] ) 33 | 34 | setTimeout(function () { 35 | state == 'loadingText' ? 36 | $el.addClass(d).attr(d, d) : 37 | $el.removeClass(d).removeAttr(d) 38 | }, 0) 39 | } 40 | 41 | function toggle(el) { 42 | $(el).toggleClass('active') 43 | } 44 | 45 | $.fn.button = function(options) { 46 | return this.each(function () { 47 | if (options == 'toggle') { 48 | return toggle(this) 49 | } 50 | options && setState(this, options) 51 | }) 52 | } 53 | 54 | $.fn.button.defaults = { 55 | loadingText: 'loading...' 56 | } 57 | 58 | $(function () { 59 | $('body').delegate('.btn[data-toggle]', 'click', function () { 60 | $(this).button('toggle') 61 | }) 62 | }) 63 | 64 | }( window.jQuery || window.ender ); -------------------------------------------------------------------------------- /client/libs/bootstrap/tests/unit/bootstrap-dropdown.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-dropdowns") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).dropdown, 'dropdown method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).dropdown()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should add class open to menu if clicked", function () { 14 | var dropdownHTML = '' 25 | , dropdown = $(dropdownHTML).dropdown() 26 | 27 | dropdown.find('.dropdown-toggle').click() 28 | ok(dropdown.find('.dropdown').hasClass('open'), 'open class added on click') 29 | }) 30 | 31 | test("should remove open class if body clicked", function () { 32 | var dropdownHTML = '' 43 | , dropdown = $(dropdownHTML).dropdown().appendTo('#qunit-runoff') 44 | 45 | dropdown.find('.dropdown-toggle').click() 46 | ok(dropdown.find('.dropdown').hasClass('open'), 'open class added on click') 47 | $('body').click() 48 | ok(!dropdown.find('.dropdown').hasClass('open'), 'open class removed') 49 | dropdown.remove() 50 | }) 51 | 52 | }) -------------------------------------------------------------------------------- /smartcachemanager.js: -------------------------------------------------------------------------------- 1 | var SmartCacheManager = function (cacheVersion) { 2 | var self = this; 3 | self._versioning = true; 4 | self._ckid = 1; 5 | 6 | self.versionURLs = function (enable) { 7 | self._versioning = enable; 8 | }; 9 | 10 | self.setParam = function (url, paramName, paramValue) { 11 | var match = url.match(/(^[^?]*)(([?])(.*))?/); 12 | 13 | if (match) { 14 | var mainPart = match[1]; 15 | if (match[4]) { 16 | var fieldStrings = match[4].split('&'); 17 | var temp; 18 | var fields = {}; 19 | var i; 20 | 21 | for (i in fieldStrings) { 22 | temp = fieldStrings[i].split('='); 23 | fields[temp[0]] = temp[1] || true; 24 | } 25 | 26 | fields[paramName] = paramValue; 27 | fieldStrings = []; 28 | 29 | for (i in fields) { 30 | fieldStrings.push(i + '=' + fields[i]); 31 | } 32 | 33 | return mainPart + '?' + fieldStrings.join('&'); 34 | } else { 35 | return mainPart + '?' + paramName + '=' + paramValue; 36 | } 37 | } 38 | 39 | throw new Error('Invalid url specified'); 40 | }; 41 | 42 | self._curTime = function () { 43 | return (new Date()).getTime(); 44 | }; 45 | 46 | self.setURLCacheVersion = function (url) { 47 | if (self._versioning) { 48 | return self.setParam(url, 'cv', cacheVersion); 49 | } 50 | return url; 51 | }; 52 | 53 | self.setCacheKiller = function (url, value) { 54 | if (!value) { 55 | value = self._ckid++; 56 | } 57 | return self.setParam(url, 'ck', self._curTime() + '-' + value); 58 | }; 59 | 60 | self.setCacheKillerParam = function (url, param) { 61 | var parts = param.split('='); 62 | return self.setParam(url, parts[0], parts[1]); 63 | }; 64 | 65 | self.getCacheKillerParam = function () { 66 | return 'ck=' + self._curTime() + '-' + self._ckid++; 67 | }; 68 | 69 | self.getURLCacheVersionParam = function () { 70 | return 'cv=' + cacheVersion; 71 | }; 72 | 73 | self.setCacheVersion = function (version) { 74 | cacheVersion = version; 75 | }; 76 | 77 | self.getCacheVersion = function () { 78 | return cacheVersion; 79 | }; 80 | }; 81 | 82 | if (typeof window === 'undefined') { 83 | module.exports.SmartCacheManager = SmartCacheManager; 84 | } else { 85 | var NOMBO_CACHE_MANAGER = new SmartCacheManager(NOMBO_CACHE_VERSION); 86 | } -------------------------------------------------------------------------------- /samples/angular_projects/sims/projects.node.js: -------------------------------------------------------------------------------- 1 | var crypto = require('crypto'); 2 | 3 | /* 4 | Generate a key which will either point to a single project record or all 5 | records depending on the request object. 6 | */ 7 | function projectKey(req) { 8 | if(req && req.data && req.data._id) { 9 | return ['projects', req.data._id]; 10 | } else { 11 | return 'projects'; 12 | } 13 | } 14 | 15 | var pid = 1; 16 | function genId(callback) { 17 | crypto.randomBytes(12, function(err, buff) { 18 | callback(buff.toString('hex') + '-' + pid++); 19 | }); 20 | } 21 | 22 | /* 23 | Dispatch a 'projectchanged' event which all clients of the current session will receive. 24 | This is useful in case multiple open tabs share the same session. 25 | */ 26 | function dispatchProjectsChanged(req, projects) { 27 | /* 28 | The transmit method emits an event to all sockets which are bound to the current session except the current one. 29 | This is for efficiency purposes. 30 | */ 31 | req.session.emit('projectschanged', req.session.extractValues(projects)); 32 | } 33 | 34 | /* 35 | Save one or more project records. 36 | */ 37 | module.exports.save = function(req, res) { 38 | var save = function() { 39 | req.session.set(projectKey(req), req.data, function(err) { 40 | res.end(req.data); 41 | 42 | req.session.get(projectKey(), function(err, data) { 43 | dispatchProjectsChanged(req, data); 44 | }); 45 | }); 46 | } 47 | 48 | if(req.data && req.data._id) { 49 | save(); 50 | } else { 51 | genId(function(id) { 52 | if(req.data) { 53 | req.data._id = id; 54 | save(); 55 | } 56 | }); 57 | } 58 | } 59 | 60 | /* 61 | Get one or more project records. 62 | */ 63 | module.exports.get = function(req, res) { 64 | var hasId = false; 65 | if(req.data && req.data._id) { 66 | hasId = true; 67 | } 68 | req.session.get(projectKey(req), function(err, data) { 69 | if(hasId) { 70 | res.end(data); 71 | } else { 72 | res.end(req.session.extractValues(data)); 73 | } 74 | 75 | }); 76 | } 77 | 78 | /* 79 | Remove one or more project records. 80 | */ 81 | module.exports.remove = function(req, res) { 82 | req.session.remove(projectKey(req), function(err) { 83 | res.end(req.data); 84 | 85 | req.session.get(projectKey(), function(err, data) { 86 | dispatchProjectsChanged(req, data); 87 | }); 88 | }); 89 | } -------------------------------------------------------------------------------- /client/libs/bootstrap/bootstrap-tabs.js: -------------------------------------------------------------------------------- 1 | /* ======================================================== 2 | * bootstrap-tabs.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#tabs 4 | * ======================================================== 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ======================================================== */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | function activate ( element, container ) { 26 | container 27 | .find('> .active') 28 | .removeClass('active') 29 | .find('> .dropdown-menu > .active') 30 | .removeClass('active') 31 | 32 | element.addClass('active') 33 | 34 | if ( element.parent('.dropdown-menu') ) { 35 | element.closest('li.dropdown').addClass('active') 36 | } 37 | } 38 | 39 | function tab( e ) { 40 | var $this = $(this) 41 | , $ul = $this.closest('ul:not(.dropdown-menu)') 42 | , href = $this.attr('href') 43 | , previous 44 | , $href 45 | 46 | if ( /^#\w+/.test(href) ) { 47 | e.preventDefault() 48 | 49 | if ( $this.parent('li').hasClass('active') ) { 50 | return 51 | } 52 | 53 | previous = $ul.find('.active a').last()[0] 54 | $href = $(href) 55 | 56 | activate($this.parent('li'), $ul) 57 | activate($href, $href.parent()) 58 | 59 | $this.trigger({ 60 | type: 'change' 61 | , relatedTarget: previous 62 | }) 63 | } 64 | } 65 | 66 | 67 | /* TABS/PILLS PLUGIN DEFINITION 68 | * ============================ */ 69 | 70 | $.fn.tabs = $.fn.pills = function ( selector ) { 71 | return this.each(function () { 72 | $(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab) 73 | }) 74 | } 75 | 76 | $(document).ready(function () { 77 | $('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a') 78 | }) 79 | 80 | }( window.jQuery || window.ender ); 81 | -------------------------------------------------------------------------------- /client/libs/angular/resource.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.0.5 3 | (c) 2010-2012 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(C,d,w){'use strict';d.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(x,y){function s(b,e){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(e?null:/%20/g,"+")}function t(b,e){this.template=b+="#";this.defaults=e||{};var a=this.urlParams={};h(b.split(/\W/),function(f){f&&RegExp("(^|[^\\\\]):"+f+"\\W").test(b)&&(a[f]=!0)});this.template=b.replace(/\\:/g,":")}function u(b,e,a){function f(m,a){var b= 7 | {},a=o({},e,a);h(a,function(a,z){var c;a.charAt&&a.charAt(0)=="@"?(c=a.substr(1),c=y(c)(m)):c=a;b[z]=c});return b}function g(a){v(a||{},this)}var k=new t(b),a=o({},A,a);h(a,function(a,b){a.method=d.uppercase(a.method);var e=a.method=="POST"||a.method=="PUT"||a.method=="PATCH";g[b]=function(b,c,d,B){var j={},i,l=p,q=null;switch(arguments.length){case 4:q=B,l=d;case 3:case 2:if(r(c)){if(r(b)){l=b;q=c;break}l=c;q=d}else{j=b;i=c;l=d;break}case 1:r(b)?l=b:e?i=b:j=b;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+ 8 | arguments.length+" arguments.";}var n=this instanceof g?this:a.isArray?[]:new g(i);x({method:a.method,url:k.url(o({},f(i,a.params||{}),j)),data:i}).then(function(b){var c=b.data;if(c)a.isArray?(n.length=0,h(c,function(a){n.push(new g(a))})):v(c,n);(l||p)(n,b.headers)},q);return n};g.prototype["$"+b]=function(a,d,h){var m=f(this),j=p,i;switch(arguments.length){case 3:m=a;j=d;i=h;break;case 2:case 1:r(a)?(j=a,i=d):(m=a,j=d||p);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+ 9 | arguments.length+" arguments.";}g[b].call(this,m,e?this:w,j,i)}});g.bind=function(d){return u(b,o({},e,d),a)};return g}var A={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},p=d.noop,h=d.forEach,o=d.extend,v=d.copy,r=d.isFunction;t.prototype={url:function(b){var e=this,a=this.template,f,g,b=b||{};h(this.urlParams,function(h,c){f=b.hasOwnProperty(c)?b[c]:e.defaults[c];d.isDefined(f)&&f!==null?(g=s(f,!0).replace(/%26/gi,"&").replace(/%3D/gi, 10 | "=").replace(/%2B/gi,"+"),a=a.replace(RegExp(":"+c+"(\\W)","g"),g+"$1")):a=a.replace(RegExp("(/?):"+c+"(\\W)","g"),function(a,b,c){return c.charAt(0)=="/"?c:b+c})});var a=a.replace(/\/?#$/,""),k=[];h(b,function(a,b){e.urlParams[b]||k.push(s(b)+"="+s(a))});k.sort();a=a.replace(/\/*$/,"");return a+(k.length?"?"+k.join("&"):"")}};return u}])})(window,window.angular); -------------------------------------------------------------------------------- /client/libs/bootstrap/tests/unit/bootstrap-tabs.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-tabs") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).tabs, 'tabs method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).tabs()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should activate element by tab id", function () { 14 | var $tabsHTML = $('') 18 | 19 | 20 | $('
    ').appendTo("#qunit-runoff") 21 | 22 | $tabsHTML.tabs().find('a').last().click() 23 | equals($("#qunit-runoff").find('.active').attr('id'), "profile") 24 | 25 | $tabsHTML.tabs().find('a').first().click() 26 | equals($("#qunit-runoff").find('.active').attr('id'), "home") 27 | 28 | $("#qunit-runoff").empty() 29 | }) 30 | 31 | test("should activate element by pill id", function () { 32 | var $pillsHTML = $('') 36 | 37 | 38 | $('
    ').appendTo("#qunit-runoff") 39 | 40 | $pillsHTML.pills().find('a').last().click() 41 | equals($("#qunit-runoff").find('.active').attr('id'), "profile") 42 | 43 | $pillsHTML.pills().find('a').first().click() 44 | equals($("#qunit-runoff").find('.active').attr('id'), "home") 45 | 46 | $("#qunit-runoff").empty() 47 | }) 48 | 49 | test( "should trigger change event on activate", function () { 50 | var $tabsHTML = $('') 54 | , $target 55 | , count = 0 56 | , relatedTarget 57 | , target 58 | 59 | $tabsHTML 60 | .tabs() 61 | .bind( "change", function (e) { 62 | target = e.target 63 | relatedTarget = e.relatedTarget 64 | count++ 65 | }) 66 | 67 | $target = $tabsHTML 68 | .find('a') 69 | .last() 70 | .click() 71 | 72 | equals(relatedTarget, $tabsHTML.find('a').first()[0]) 73 | equals(target, $target[0]) 74 | equals(count, 1) 75 | }) 76 | 77 | }) -------------------------------------------------------------------------------- /samples/angular_projects/scripts/index.js: -------------------------------------------------------------------------------- 1 | require('./store'); 2 | 3 | $(document.body).html($n.grab.app.template('index').toString()); 4 | 5 | angular.module('project', ['store', 'ngRoute']). 6 | config(function ($routeProvider, $locationProvider) { 7 | /* 8 | The $n.grab.app.templateURL() is optional, you also simply type out the full URL. 9 | Note that Nombo app URLs have a short from and a long form - The long form should be used when 10 | multiple apps are sharing the same domain name. 11 | The short URL for 'list.html' is simply: /template/list.html 12 | and the long URL is /angular_projects/scripts/list.html (the /angular_projects/ bit can be 13 | used for URL rewriting as a way to distinguish this app from others on the same domain. 14 | $n.grab.app.templateURL('list.html') expands into the long URL. 15 | */ 16 | $routeProvider. 17 | when('/', { 18 | controller: ListCtrl, 19 | templateUrl: $n.grab.app.templateURL('list.html') 20 | }). 21 | when('/edit/:projectId', { 22 | controller: EditCtrl, 23 | templateUrl: $n.grab.app.templateURL('detail.html') 24 | }). 25 | when('/new', { 26 | controller: CreateCtrl, 27 | templateUrl: $n.grab.app.templateURL('detail.html') 28 | }). 29 | otherwise({ 30 | redirectTo: '/' 31 | }); 32 | }); 33 | 34 | function ListCtrl($scope, Project) { 35 | var loadProjects = function(projects) { 36 | $scope.$apply(function () { 37 | $scope.projects = projects; 38 | }); 39 | } 40 | Project.get(function (err, projects) { 41 | loadProjects(projects); 42 | }); 43 | 44 | /* 45 | Register a callback which will be called whenever the project list is changed on the server side. 46 | This is used to keep data in sync across all open tabs which share the same session. 47 | */ 48 | Project.projectsChanged(loadProjects); 49 | } 50 | 51 | function CreateCtrl($scope, $location, Project) { 52 | $scope.save = function () { 53 | Project.save($scope.project, function (err, project) { 54 | $scope.$apply(function () { 55 | $location.path('/edit/' + project._id); 56 | }); 57 | }); 58 | } 59 | } 60 | 61 | function EditCtrl($scope, $location, $routeParams, Project) { 62 | var self = this; 63 | 64 | Project.get({ 65 | _id: $routeParams.projectId 66 | }, function (err, project) { 67 | self.original = project; 68 | $scope.$apply(function () { 69 | $scope.project = self.original; 70 | }); 71 | }); 72 | 73 | $scope.destroy = function () { 74 | Project.remove(self.original, function (err) { 75 | $scope.$apply(function () { 76 | $location.path('/list'); 77 | }); 78 | }); 79 | }; 80 | 81 | $scope.save = function () { 82 | Project.save(self.original, function (err) { 83 | $scope.$apply(function () { 84 | $location.path('/'); 85 | }); 86 | }); 87 | }; 88 | } 89 | 90 | angular.bootstrap(document, ['project']); -------------------------------------------------------------------------------- /client/libs/bootstrap/tests/unit/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-popover") 4 | 5 | test("should be defined on jquery object", function () { 6 | var div = $('
    ') 7 | ok(div.popover, 'popover method is defined') 8 | }) 9 | 10 | test("should return element", function () { 11 | var div = $('
    ') 12 | ok(div.popover() == div, 'document.body returned') 13 | }) 14 | 15 | test("should render popover element", function () { 16 | $.support.transition = false 17 | var popover = $('@mdo') 18 | .appendTo('#qunit-runoff') 19 | .popover() 20 | .popover('show') 21 | 22 | ok($('.popover').length, 'popover was inserted') 23 | popover.popover('hide') 24 | ok(!$(".popover").length, 'popover removed') 25 | $('#qunit-runoff').empty() 26 | }) 27 | 28 | test("should store popover instance in popover data object", function () { 29 | $.support.transition = false 30 | var popover = $('@mdo') 31 | .popover() 32 | 33 | ok(!!popover.data('popover'), 'popover instance exists') 34 | }) 35 | 36 | test("should get title and content from options", function () { 37 | $.support.transition = false 38 | var popover = $('@fat') 39 | .appendTo('#qunit-runoff') 40 | .popover({ 41 | title: function () { 42 | return '@fat' 43 | } 44 | , content: function () { 45 | return 'loves writing tests (╯°□°)╯︵ ┻━┻' 46 | } 47 | }) 48 | 49 | popover.popover('show') 50 | 51 | ok($('.popover').length, 'popover was inserted') 52 | equals($('.popover .title').text(), '@fat', 'title correctly inserted') 53 | equals($('.popover .content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted') 54 | 55 | popover.popover('hide') 56 | ok(!$('.popover').length, 'popover was removed') 57 | $('#qunit-runoff').empty() 58 | }) 59 | 60 | test("should get title and content from attributes", function () { 61 | $.support.transition = false 62 | var popover = $('@mdo') 63 | .appendTo('#qunit-runoff') 64 | .popover() 65 | .popover('show') 66 | 67 | ok($('.popover').length, 'popover was inserted') 68 | equals($('.popover .title').text(), '@mdo', 'title correctly inserted') 69 | equals($('.popover .content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted') 70 | 71 | popover.popover('hide') 72 | ok(!$('.popover').length, 'popover was removed') 73 | $('#qunit-runoff').empty() 74 | }) 75 | 76 | }) 77 | -------------------------------------------------------------------------------- /client/libs/bootstrap/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-popover.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#popover 4 | * =========================================================== 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================================================== */ 19 | 20 | 21 | !function( $ ) { 22 | 23 | "use strict" 24 | 25 | var Popover = function ( element, options ) { 26 | this.$element = $(element) 27 | this.options = options 28 | this.enabled = true 29 | this.fixTitle() 30 | } 31 | 32 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js 33 | ========================================= */ 34 | 35 | Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, { 36 | 37 | setContent: function () { 38 | var $tip = this.tip() 39 | $tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle()) 40 | $tip.find('.content > *')[this.options.html ? 'html' : 'text'](this.getContent()) 41 | $tip[0].className = 'popover' 42 | } 43 | 44 | , hasContent: function () { 45 | return this.getTitle() || this.getContent() 46 | } 47 | 48 | , getContent: function () { 49 | var content 50 | , $e = this.$element 51 | , o = this.options 52 | 53 | if (typeof this.options.content == 'string') { 54 | content = $e.attr(this.options.content) 55 | } else if (typeof this.options.content == 'function') { 56 | content = this.options.content.call(this.$element[0]) 57 | } 58 | 59 | return content 60 | } 61 | 62 | , tip: function() { 63 | if (!this.$tip) { 64 | this.$tip = $('
    ') 65 | .html(this.options.template) 66 | } 67 | return this.$tip 68 | } 69 | 70 | }) 71 | 72 | 73 | /* POPOVER PLUGIN DEFINITION 74 | * ======================= */ 75 | 76 | $.fn.popover = function (options) { 77 | if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options) 78 | $.fn.twipsy.initWith.call(this, options, Popover, 'popover') 79 | return this 80 | } 81 | 82 | $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { 83 | placement: 'right' 84 | , content: 'data-content' 85 | , template: '

    ' 86 | }) 87 | 88 | $.fn.twipsy.rejectAttrOptions.push( 'content' ) 89 | 90 | }( window.jQuery || window.ender ); 91 | -------------------------------------------------------------------------------- /client/libs/bootstrap/tests/unit/bootstrap-twipsy.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-twipsy") 4 | 5 | test("should be defined on jquery object", function () { 6 | var div = $("
    ") 7 | ok(div.twipsy, 'popover method is defined') 8 | }) 9 | 10 | test("should return element", function () { 11 | var div = $("
    ") 12 | ok(div.twipsy() == div, 'document.body returned') 13 | }) 14 | 15 | test("should expose default settings", function () { 16 | ok(!!$.fn.twipsy.defaults, 'defaults is defined') 17 | }) 18 | 19 | test("should remove title attribute", function () { 20 | var twipsy = $('').twipsy() 21 | ok(!twipsy.attr('title'), 'title tag was removed') 22 | }) 23 | 24 | test("should add data attribute for referencing original title", function () { 25 | var twipsy = $('').twipsy() 26 | equals(twipsy.attr('data-original-title'), 'Another twipsy', 'original title preserved in data attribute') 27 | }) 28 | 29 | test("should place tooltips relative to placement option", function () { 30 | $.support.transition = false 31 | var twipsy = $('') 32 | .appendTo('#qunit-runoff') 33 | .twipsy({placement: 'below'}) 34 | .twipsy('show') 35 | 36 | ok($(".twipsy").hasClass('fade below in'), 'has correct classes applied') 37 | twipsy.twipsy('hide') 38 | ok(!$(".twipsy").length, 'twipsy removed') 39 | $('#qunit-runoff').empty() 40 | }) 41 | 42 | test("should add a fallback in cases where elements have no title tag", function () { 43 | $.support.transition = false 44 | var twipsy = $('') 45 | .appendTo('#qunit-runoff') 46 | .twipsy({fallback: '@fat'}) 47 | .twipsy('show') 48 | 49 | equals($(".twipsy").text(), "@fat", 'has correct default text') 50 | twipsy.twipsy('hide') 51 | ok(!$(".twipsy").length, 'twipsy removed') 52 | $('#qunit-runoff').empty() 53 | }) 54 | 55 | test("should not allow html entities", function () { 56 | $.support.transition = false 57 | var twipsy = $('') 58 | .appendTo('#qunit-runoff') 59 | .twipsy() 60 | .twipsy('show') 61 | 62 | ok(!$('.twipsy b').length, 'b tag was not inserted') 63 | twipsy.twipsy('hide') 64 | ok(!$(".twipsy").length, 'twipsy removed') 65 | $('#qunit-runoff').empty() 66 | }) 67 | 68 | test("should allow html entities if html option set to true", function () { 69 | $.support.transition = false 70 | var twipsy = $('') 71 | .appendTo('#qunit-runoff') 72 | .twipsy({html: true}) 73 | .twipsy('show') 74 | 75 | ok($('.twipsy b').length, 'b tag was inserted') 76 | twipsy.twipsy('hide') 77 | ok(!$(".twipsy").length, 'twipsy removed') 78 | $('#qunit-runoff').empty() 79 | }) 80 | 81 | }) -------------------------------------------------------------------------------- /samples/chat/scripts/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Import stylesheet from appname/styles/ directory 3 | Note that all Nombo framework files are stored under framework/ - App-specific files are stored under the appname/ directory 4 | */ 5 | $n.grab.app.style('styles.css'); 6 | 7 | /* 8 | Here it is grabbing the template 'chatbox' (app/templates/chatbox.handlebars), 9 | You can then get the string representation of this template by calling its render() 10 | method (with an optional data argument). 11 | */ 12 | var chatView = $n.grab.app.template("chatbox"); 13 | var chatListView = $n.grab.app.template("chatlist"); 14 | 15 | var prevList = ""; 16 | 17 | var chatHandler = function (messages) { 18 | var msgStr = ''; 19 | var i; 20 | for (i in messages) { 21 | msgStr += '
  1. ' + messages[i].user + ': ' + messages[i].message + '
  2. '; 22 | } 23 | 24 | $('.messageContainer').html(msgStr); 25 | } 26 | 27 | /* 28 | This is a presenter (look up Model View Presenter pattern), it handles data from the chat serverinterface 29 | It updates the view whenever the message log changes on the server. 30 | The callback to the $n.local.exec function is in the form: callback(err, data) where err is an error string (or null if no error) and data is the 31 | data received from the server. 32 | */ 33 | var showChat = function (err, data) { 34 | if (err) { 35 | chatHandler([{user:"System", message: "Couldn't load chat: " + err}]); 36 | } else { 37 | chatHandler(data); 38 | } 39 | } 40 | 41 | // Sends message to the chat server interface's addMessage method 42 | function sendMessage(e) { 43 | var sendBox = $("#sendBox"); 44 | var nameBox = $("#nameBox"); 45 | 46 | /* 47 | Calls the chat server interface's addMessage method (see app/sims/chat.node.js) 48 | Feel free to add new server interfaces to the app/sims/ directory and call their methods from the client-side using $n.local.exec 49 | Make sure that your server interface files have a .node.js extension - The .node.js extension keeps your code private 50 | */ 51 | $n.local.exec('chat', 'addMessage', {user: nameBox.val(), message: sendBox.val()}, function(err) { 52 | if (err) { 53 | throw new Error("Error - Couldn't post your message - " + (err.message || err)); 54 | sendBox.val(""); 55 | } else { 56 | sendBox.val(""); 57 | } 58 | }); 59 | } 60 | 61 | /* 62 | Functions passed to $n.ready will only be run when all scripts grabbed before the current $n.ready call have finished loading 63 | Note that once inside $n.ready, you may choose to load other external scripts which can have their own $n.ready handlers 64 | */ 65 | $n.ready(function () { 66 | var chatString = chatView.render({"chatArea": chatListView.render()}); 67 | 68 | $(document.body).html(chatString); 69 | // Call the chat server interfaces' getChatLog method - The chatHandler object will handle the result (through its success property) 70 | $n.local.exec('chat', 'getChatLog', showChat); 71 | 72 | // Here we are simply watching for an event called 'updatemessages' which happens when a different client makes an update to the message log 73 | $n.local.watch('updatemessages', chatHandler); 74 | 75 | $("#nameBox").val("Guest"); 76 | $("#sendButton").click(sendMessage); 77 | $("#sendBox").keypress(function (e) { 78 | if (e.keyCode == 13) { 79 | sendMessage(e); 80 | } 81 | }); 82 | }); -------------------------------------------------------------------------------- /client/libs/json2.js: -------------------------------------------------------------------------------- 1 | var JSON;if(!JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i a' 31 | this.refresh() 32 | this.$topbar.delegate(this.selector, 'click', processScroll) 33 | $window.scroll(processScroll) 34 | this.processScroll() 35 | } 36 | 37 | ScrollSpy.prototype = { 38 | 39 | refresh: function () { 40 | this.targets = this.$topbar.find(this.selector).map(function () { 41 | var href = $(this).attr('href') 42 | return /^#\w/.test(href) && $(href).length ? href : null 43 | }) 44 | 45 | this.offsets = $.map(this.targets, function (id) { 46 | return $(id).offset().top 47 | }) 48 | } 49 | 50 | , processScroll: function () { 51 | var scrollTop = $window.scrollTop() + 10 52 | , offsets = this.offsets 53 | , targets = this.targets 54 | , activeTarget = this.activeTarget 55 | , i 56 | 57 | for (i = offsets.length; i--;) { 58 | activeTarget != targets[i] 59 | && scrollTop >= offsets[i] 60 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) 61 | && this.activateButton( targets[i] ) 62 | } 63 | } 64 | 65 | , activateButton: function (target) { 66 | this.activeTarget = target 67 | 68 | this.$topbar 69 | .find(this.selector).parent('.active') 70 | .removeClass('active') 71 | 72 | this.$topbar 73 | .find(this.selector + '[href="' + target + '"]') 74 | .parent('li') 75 | .addClass('active') 76 | } 77 | 78 | } 79 | 80 | /* SCROLLSPY PLUGIN DEFINITION 81 | * =========================== */ 82 | 83 | $.fn.scrollSpy = function( options ) { 84 | var scrollspy = this.data('scrollspy') 85 | 86 | if (!scrollspy) { 87 | return this.each(function () { 88 | $(this).data('scrollspy', new ScrollSpy( this, options )) 89 | }) 90 | } 91 | 92 | if ( options === true ) { 93 | return scrollspy 94 | } 95 | 96 | if ( typeof options == 'string' ) { 97 | scrollspy[options]() 98 | } 99 | 100 | return this 101 | } 102 | 103 | $(document).ready(function () { 104 | $('body').scrollSpy('[data-scrollspy] li > a') 105 | }) 106 | 107 | }( window.jQuery || window.ender ); -------------------------------------------------------------------------------- /client/libs/jquery/effects/scale.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Effects Scale 1.8.16 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Effects/Scale 9 | * 10 | * Depends: 11 | * jquery.effects.core.js 12 | */ 13 | (function(c){c.effects.puff=function(b){return this.queue(function(){var a=c(this),e=c.effects.setMode(a,b.options.mode||"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:true,mode:e,percent:e=="hide"?g:100,from:e=="hide"?i:{height:i.height*h,width:i.width*h}});a.effect("scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=function(b){return this.queue(function(){var a=c(this),e=c.extend(true,{},b.options),g=c.effects.setMode(a, 14 | b.options.mode||"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g=="hide"?0:100),i=b.options.direction||"both",f=b.options.origin;if(g!="effect"){e.origin=f||["middle","center"];e.restore=true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g=="show"?{height:0,width:0}:f);h={y:i!="horizontal"?h/100:1,x:i!="vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};if(b.options.fade){if(g=="show"){a.from.opacity=0;a.to.opacity=1}if(g=="hide"){a.from.opacity= 15 | 1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect("size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=function(b){return this.queue(function(){var a=c(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],g=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],i=["fontSize"],f=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"], 16 | p=c.effects.setMode(a,b.options.mode||"effect"),n=b.options.restore||false,m=b.options.scale||"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}}; 17 | if(m=="box"||m=="both"){if(d.from.y!=d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}if(m=="content"||m=="both")if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a); 18 | a.css("overflow","hidden").css(a.from);if(m=="content"||m=="both"){f=f.concat(["marginTop","marginBottom"]).concat(i);k=k.concat(["marginLeft","marginRight"]);h=e.concat(f).concat(k);a.find("*[width]").each(function(){child=c(this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from); 19 | child.to=c.effects.setTransition(child,f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a, 20 | n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); 21 | -------------------------------------------------------------------------------- /client/libs/jquery/cookie.js: -------------------------------------------------------------------------------- 1 | /*jslint browser: true */ /*global jQuery: true */ 2 | 3 | /** 4 | * jQuery Cookie plugin 5 | * 6 | * Copyright (c) 2010 Klaus Hartl (stilbuero.de) 7 | * Dual licensed under the MIT and GPL licenses: 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * http://www.gnu.org/licenses/gpl.html 10 | * 11 | */ 12 | 13 | // TODO JsDoc 14 | 15 | /** 16 | * Create a cookie with the given key and value and other optional parameters. 17 | * 18 | * @example $.cookie('the_cookie', 'the_value'); 19 | * @desc Set the value of a cookie. 20 | * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); 21 | * @desc Create a cookie with all available options. 22 | * @example $.cookie('the_cookie', 'the_value'); 23 | * @desc Create a session cookie. 24 | * @example $.cookie('the_cookie', null); 25 | * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain 26 | * used when the cookie was set. 27 | * 28 | * @param String key The key of the cookie. 29 | * @param String value The value of the cookie. 30 | * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. 31 | * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. 32 | * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. 33 | * If set to null or omitted, the cookie will be a session cookie and will not be retained 34 | * when the the browser exits. 35 | * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). 36 | * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). 37 | * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will 38 | * require a secure protocol (like HTTPS). 39 | * @type undefined 40 | * 41 | * @name $.cookie 42 | * @cat Plugins/Cookie 43 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 44 | */ 45 | 46 | /** 47 | * Get the value of a cookie with the given key. 48 | * 49 | * @example $.cookie('the_cookie'); 50 | * @desc Get the value of a cookie. 51 | * 52 | * @param String key The key of the cookie. 53 | * @return The value of the cookie. 54 | * @type String 55 | * 56 | * @name $.cookie 57 | * @cat Plugins/Cookie 58 | * @author Klaus Hartl/klaus.hartl@stilbuero.de 59 | */ 60 | jQuery.cookie = function (key, value, options) { 61 | 62 | // key and value given, set cookie... 63 | if (arguments.length > 1 && (value === null || typeof value !== "object")) { 64 | options = jQuery.extend({}, options); 65 | 66 | if (value === null) { 67 | options.expires = -1; 68 | } 69 | 70 | if (typeof options.expires === 'number') { 71 | var days = options.expires, t = options.expires = new Date(); 72 | t.setDate(t.getDate() + days); 73 | } 74 | 75 | return (document.cookie = [ 76 | encodeURIComponent(key), '=', 77 | options.raw ? String(value) : encodeURIComponent(String(value)), 78 | options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 79 | options.path ? '; path=' + options.path : '', 80 | options.domain ? '; domain=' + options.domain : '', 81 | options.secure ? '; secure' : '' 82 | ].join('')); 83 | } 84 | 85 | // key and possibly options given, get cookie... 86 | options = value || {}; 87 | var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; 88 | return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; 89 | }; 90 | -------------------------------------------------------------------------------- /client/libs/bootstrap/bootstrap-alerts.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-alerts.js v1.4.0 3 | * http://twitter.github.com/bootstrap/javascript.html#alerts 4 | * ========================================================== 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) 26 | * ======================================================= */ 27 | 28 | var transitionEnd 29 | 30 | $(document).ready(function () { 31 | 32 | $.support.transition = (function () { 33 | var thisBody = document.body || document.documentElement 34 | , thisStyle = thisBody.style 35 | , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined 36 | return support 37 | })() 38 | 39 | // set CSS transition event type 40 | if ( $.support.transition ) { 41 | transitionEnd = "TransitionEnd" 42 | if ( $.browser.webkit ) { 43 | transitionEnd = "webkitTransitionEnd" 44 | } else if ( $.browser.mozilla ) { 45 | transitionEnd = "transitionend" 46 | } else if ( $.browser.opera ) { 47 | transitionEnd = "oTransitionEnd" 48 | } 49 | } 50 | 51 | }) 52 | 53 | /* ALERT CLASS DEFINITION 54 | * ====================== */ 55 | 56 | var Alert = function ( content, options ) { 57 | if (options == 'close') return this.close.call(content) 58 | this.settings = $.extend({}, $.fn.alert.defaults, options) 59 | this.$element = $(content) 60 | .delegate(this.settings.selector, 'click', this.close) 61 | } 62 | 63 | Alert.prototype = { 64 | 65 | close: function (e) { 66 | var $element = $(this) 67 | , className = 'alert-message' 68 | 69 | $element = $element.hasClass(className) ? $element : $element.parent() 70 | 71 | e && e.preventDefault() 72 | $element.removeClass('in') 73 | 74 | function removeElement () { 75 | $element.remove() 76 | } 77 | 78 | $.support.transition && $element.hasClass('fade') ? 79 | $element.bind(transitionEnd, removeElement) : 80 | removeElement() 81 | } 82 | 83 | } 84 | 85 | 86 | /* ALERT PLUGIN DEFINITION 87 | * ======================= */ 88 | 89 | $.fn.alert = function ( options ) { 90 | 91 | if ( options === true ) { 92 | return this.data('alert') 93 | } 94 | 95 | return this.each(function () { 96 | var $this = $(this) 97 | , data 98 | 99 | if ( typeof options == 'string' ) { 100 | 101 | data = $this.data('alert') 102 | 103 | if (typeof data == 'object') { 104 | return data[options].call( $this ) 105 | } 106 | 107 | } 108 | 109 | $(this).data('alert', new Alert( this, options )) 110 | 111 | }) 112 | } 113 | 114 | $.fn.alert.defaults = { 115 | selector: '.close' 116 | } 117 | 118 | $(document).ready(function () { 119 | new Alert($('body'), { 120 | selector: '.alert-message[data-alert] .close' 121 | }) 122 | }) 123 | 124 | }( window.jQuery || window.ender ); -------------------------------------------------------------------------------- /client/libs/spin.js: -------------------------------------------------------------------------------- 1 | //fgnass.github.com/spin.js#v1.2.7 2 | !function(e,t,n){function o(e,n){var r=t.createElement(e||"div"),i;for(i in n)r[i]=n[i];return r}function u(e){for(var t=1,n=arguments.length;t>1):parseInt(n.left,10)+i)+"px",top:(n.top=="auto"?a.y-u.y+(e.offsetHeight>>1):parseInt(n.top,10)+i)+"px"})),r.setAttribute("aria-role","progressbar"),t.lines(r,t.opts);if(!s){var f=0,l=n.fps,h=l/n.speed,d=(1-n.opacity)/(h*n.trail/100),v=h/n.lines;(function m(){f++;for(var e=n.lines;e;e--){var i=Math.max(1-(f+e*v)%h*d,n.opacity);t.opacity(r,n.lines-e,i,n)}t.timeout=t.el&&setTimeout(m,~~(1e3/l))})()}return t},stop:function(){var e=this.el;return e&&(clearTimeout(this.timeout),e.parentNode&&e.parentNode.removeChild(e),this.el=n),this},lines:function(e,t){function i(e,r){return c(o(),{position:"absolute",width:t.length+t.width+"px",height:t.width+"px",background:e,boxShadow:r,transformOrigin:"left",transform:"rotate("+~~(360/t.lines*n+t.rotate)+"deg) translate("+t.radius+"px"+",0)",borderRadius:(t.corners*t.width>>1)+"px"})}var n=0,r;for(;n',t)}var t=c(o("group"),{behavior:"url(#default#VML)"});!l(t,"transform")&&t.adj?(a.addRule(".spin-vml","behavior:url(#default#VML)"),v.prototype.lines=function(t,n){function s(){return c(e("group",{coordsize:i+" "+i,coordorigin:-r+" "+ -r}),{width:i,height:i})}function l(t,i,o){u(a,u(c(s(),{rotation:360/n.lines*t+"deg",left:~~i}),u(c(e("roundrect",{arcsize:n.corners}),{width:r,height:n.width,left:n.radius,top:-n.width>>1,filter:o}),e("fill",{color:n.color,opacity:n.opacity}),e("stroke",{opacity:0}))))}var r=n.length+n.width,i=2*r,o=-(n.width+n.length)*2+"px",a=c(s(),{position:"absolute",top:o,left:o}),f;if(n.shadow)for(f=1;f<=n.lines;f++)l(f,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(f=1;f<=n.lines;f++)l(f);return u(t,a)},v.prototype.opacity=function(e,t,n,r){var i=e.firstChild;r=r.shadow&&r.lines||0,i&&t+r 0) { 144 | _alpha -= _fadeSpeed; 145 | } else { 146 | _alpha = 0; 147 | hideLoader(); 148 | _loader = null; 149 | } 150 | if(_loader) { 151 | _setOpacity(_loader, _alpha); 152 | } else { 153 | clearInterval(_fadeInterval); 154 | callback(); 155 | } 156 | }, 25); 157 | }; 158 | 159 | $loader.ready(start); 160 | })(); --------------------------------------------------------------------------------