diff --git a/.gitignore b/.gitignore index e034b4100b..4c2c6ce8a0 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ target # Closed source libraries closed-lib +# Node dependencies +node_modules + diff --git a/app.js b/app.js new file mode 100644 index 0000000000..4ebc9c3e94 --- /dev/null +++ b/app.js @@ -0,0 +1,62 @@ +/*global require,process,console*/ + +/** + * Usage: + * + * npm install minimist express + * node app.js [options] + */ + +(function () { + "use strict"; + + var BUNDLE_FILE = 'bundles.json', + options = require('minimist')(process.argv.slice(2)), + express = require('express'), + app = express(), + fs = require('fs'), + bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8')); + + // Defaults + options.port = options.port || options.p || 8080; + ['include', 'exclude', 'i', 'x'].forEach(function (opt) { + options[opt] = options[opt] || []; + // Make sure includes/excludes always end up as arrays + options[opt] = Array.isArray(options[opt]) ? + options[opt] : [options[opt]]; + }); + options.include = options.include.concat(options.i); + options.exclude = options.exclude.concat(options.x); + + // Show command line options + if (options.help || options.h) { + console.log("\nUsage: node app.js [options]\n"); + console.log("Options:"); + console.log(" --help, -h Show this message."); + console.log(" --port, -p Specify port."); + console.log(" --include, -i Include the specified bundle."); + console.log(" --exclude, -x Exclude the specified bundle."); + console.log(""); + process.exit(0); + } + + // Handle command line inclusions/exclusions + bundles = bundles.concat(options.include); + bundles = bundles.filter(function (bundle) { + return options.exclude.indexOf(bundle) === -1; + }); + bundles = bundles.filter(function (bundle, index) { // Uniquify + return bundles.indexOf(bundle) === index; + }); + + // Override bundles.json for HTTP requests + app.use('/' + BUNDLE_FILE, function (req, res) { + res.send(JSON.stringify(bundles)); + }); + + // Expose everything else as static files + app.use(express['static']('.')); + + // Finally, open the HTTP server + app.listen(options.port); +}()); \ No newline at end of file diff --git a/bundles.json b/bundles.json index 04515b1897..0486bdf24b 100644 --- a/bundles.json +++ b/bundles.json @@ -7,6 +7,7 @@ "platform/commonUI/edit", "platform/commonUI/dialog", "platform/commonUI/general", + "platform/commonUI/inspect", "platform/containment", "platform/telemetry", "platform/features/layout", @@ -15,8 +16,8 @@ "platform/features/scrolling", "platform/forms", "platform/persistence/queue", - "platform/persistence/elastic", "platform/policy", + "example/persistence", "example/generator" ] diff --git a/platform/commonUI/browse/bundle.json b/platform/commonUI/browse/bundle.json index 8fed67e5e7..28d96c5ec2 100644 --- a/platform/commonUI/browse/bundle.json +++ b/platform/commonUI/browse/bundle.json @@ -57,7 +57,8 @@ { "key": "grid-item", "templateUrl": "templates/items/grid-item.html", - "uses": [ "type", "action" ] + "uses": [ "type", "action" ], + "gestures": [ "info", "menu" ] }, { "key": "object-header", @@ -121,6 +122,12 @@ "depends": [ "typeService", "dialogService", "creationService", "policyService" ] } ], + "runs": [ + { + "implementation": "windowing/WindowTitler.js", + "depends": [ "navigationService", "$rootScope", "$document" ] + } + ], "licenses": [ { "name": "screenfull.js", diff --git a/platform/commonUI/browse/res/templates/browse-object.html b/platform/commonUI/browse/res/templates/browse-object.html index dc5ed477e7..d88f32c18b 100644 --- a/platform/commonUI/browse/res/templates/browse-object.html +++ b/platform/commonUI/browse/res/templates/browse-object.html @@ -21,14 +21,12 @@ -->
-
-
- +
@@ -39,7 +37,6 @@ ng-model="representation">
-
diff --git a/platform/commonUI/browse/res/templates/browse/object-header.html b/platform/commonUI/browse/res/templates/browse/object-header.html index c6198eb0ef..eb13bb3764 100644 --- a/platform/commonUI/browse/res/templates/browse/object-header.html +++ b/platform/commonUI/browse/res/templates/browse/object-header.html @@ -20,9 +20,11 @@ at runtime from the About dialog for additional information. -->
- {{type.getGlyph()}} - {{parameters.mode}} - {{type.getName()}} - {{model.name}} - v + + {{type.getGlyph()}} + {{parameters.mode}} + {{type.getName()}} + {{model.name}} + +
\ No newline at end of file diff --git a/platform/commonUI/browse/res/templates/create/create-button.html b/platform/commonUI/browse/res/templates/create/create-button.html index e342a1b350..bafde4f975 100644 --- a/platform/commonUI/browse/res/templates/create/create-button.html +++ b/platform/commonUI/browse/res/templates/create/create-button.html @@ -21,7 +21,7 @@ -->