nutella_framework 0.4.13 → 0.4.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/framework_components/order.json +2 -1
- data/framework_components/roomcast-bot/data/default/channels-data.json +1 -0
- data/framework_components/roomcast-bot/data/default/channels.json +1 -0
- data/framework_components/roomcast-bot/data/default/configs.json +1 -0
- data/framework_components/roomcast-bot/data/default/mapping.json +1 -0
- data/framework_components/roomcast-bot/roomcast_bot.rb +178 -0
- data/framework_components/roomcast-bot/startup +5 -0
- data/framework_components/roomcast-channel-creator/.gitignore +2 -0
- data/framework_components/roomcast-channel-creator/README.md +9 -0
- data/framework_components/roomcast-channel-creator/dist/app.js +29607 -0
- data/framework_components/roomcast-channel-creator/dist/css/font-awesome.min.css +4 -0
- data/framework_components/roomcast-channel-creator/dist/css/ionicons.min.css +11 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.svg +565 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.svg +2230 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-channel-creator/dist/main.css +3304 -0
- data/framework_components/roomcast-channel-creator/dist/nutella_lib.js +5068 -0
- data/framework_components/roomcast-channel-creator/gulp/config.js +51 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/browserify.js +77 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/build.js +3 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/css.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/default.js +3 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/fonts.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/less.js +16 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/mui-fonts.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/nutella.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/setWatch.js +5 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/svgs.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/watch.js +12 -0
- data/framework_components/roomcast-channel-creator/gulp/util/bundleLogger.js +21 -0
- data/framework_components/roomcast-channel-creator/gulp/util/handleErrors.js +15 -0
- data/framework_components/roomcast-channel-creator/gulpfile.js +16 -0
- data/framework_components/roomcast-channel-creator/index.html +52 -0
- data/framework_components/roomcast-channel-creator/nutella.json +6 -0
- data/framework_components/roomcast-channel-creator/package.json +37 -0
- data/framework_components/roomcast-channel-creator/src/app/app.js +22 -0
- data/framework_components/roomcast-channel-creator/src/app/components/AnimationMixin.js +44 -0
- data/framework_components/roomcast-channel-creator/src/app/components/CataloguePage.js +130 -0
- data/framework_components/roomcast-channel-creator/src/app/components/Channel.js +378 -0
- data/framework_components/roomcast-channel-creator/src/app/components/ColorCell.js +28 -0
- data/framework_components/roomcast-channel-creator/src/app/components/ColorPicker.js +53 -0
- data/framework_components/roomcast-channel-creator/src/app/components/DetailPage.js +66 -0
- data/framework_components/roomcast-channel-creator/src/app/components/NutellaMixin.js +40 -0
- data/framework_components/roomcast-channel-creator/src/app/components/PageSliderMixin.js +68 -0
- data/framework_components/roomcast-channel-creator/src/app/components/Router.js +52 -0
- data/framework_components/roomcast-channel-creator/src/app/components/TopBar.js +86 -0
- data/framework_components/roomcast-channel-creator/src/app/components/main.js +333 -0
- data/framework_components/roomcast-channel-creator/src/css/font-awesome.min.css +4 -0
- data/framework_components/roomcast-channel-creator/src/css/ionicons.min.css +11 -0
- data/framework_components/roomcast-channel-creator/src/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.svg +565 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.svg +2230 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-channel-creator/src/less/main.less +500 -0
- data/framework_components/roomcast-channel-creator/src/less/my_overrides.less +14 -0
- data/framework_components/roomcast-package-creator/.gitignore +2 -0
- data/framework_components/roomcast-package-creator/README.md +9 -0
- data/framework_components/roomcast-package-creator/dist/app.js +36624 -0
- data/framework_components/roomcast-package-creator/dist/css/font-awesome.min.css +4 -0
- data/framework_components/roomcast-package-creator/dist/css/ionicons.min.css +11 -0
- data/framework_components/roomcast-package-creator/dist/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.svg +565 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.svg +2230 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.eot +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.svg +14 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.ttf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.woff +0 -0
- data/framework_components/roomcast-package-creator/dist/main.css +5932 -0
- data/framework_components/roomcast-package-creator/dist/nutella_lib.js +5068 -0
- data/framework_components/roomcast-package-creator/gulp/config.js +51 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/browserify.js +77 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/build.js +3 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/css.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/default.js +3 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/fonts.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/less.js +16 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/mui-fonts.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/nutella.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/setWatch.js +5 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/svgs.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/watch.js +12 -0
- data/framework_components/roomcast-package-creator/gulp/util/bundleLogger.js +21 -0
- data/framework_components/roomcast-package-creator/gulp/util/handleErrors.js +15 -0
- data/framework_components/roomcast-package-creator/gulpfile.js +16 -0
- data/framework_components/roomcast-package-creator/index.html +51 -0
- data/framework_components/roomcast-package-creator/nutella.json +6 -0
- data/framework_components/roomcast-package-creator/package.json +38 -0
- data/framework_components/roomcast-package-creator/src/app/app.js +19 -0
- data/framework_components/roomcast-package-creator/src/app/components/ButtonInteractionsMixin.js +45 -0
- data/framework_components/roomcast-package-creator/src/app/components/ChannelCard.js +87 -0
- data/framework_components/roomcast-package-creator/src/app/components/ChannelItem.js +71 -0
- data/framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js +64 -0
- data/framework_components/roomcast-package-creator/src/app/components/ChannelsPanel.js +127 -0
- data/framework_components/roomcast-package-creator/src/app/components/ConfigField.js +50 -0
- data/framework_components/roomcast-package-creator/src/app/components/ConfigurationsPanel.js +114 -0
- data/framework_components/roomcast-package-creator/src/app/components/ContextButton.js +37 -0
- data/framework_components/roomcast-package-creator/src/app/components/GlobalButton.js +26 -0
- data/framework_components/roomcast-package-creator/src/app/components/NutellaMixin.js +23 -0
- data/framework_components/roomcast-package-creator/src/app/components/PoolHeader.js +67 -0
- data/framework_components/roomcast-package-creator/src/app/components/PoolRow.js +160 -0
- data/framework_components/roomcast-package-creator/src/app/components/ResourceFamilyPool.js +168 -0
- data/framework_components/roomcast-package-creator/src/app/components/ResourcesPanel.js +76 -0
- data/framework_components/roomcast-package-creator/src/app/components/main.js +222 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/dialog_.jsx +66 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/drop-down-menu.jsx +163 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/enhanced-textarea.jsx +113 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/floating-action-button_.jsx +73 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/menu-item.jsx +100 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/menu.jsx +209 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/overlay.jsx +21 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/raised-button_.jsx +72 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/right-nav.jsx +108 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/drop-down-arrow.jsx +17 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/navigation-chevron-left.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/navigation-chevron-right.jsx +17 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/navigation-menu.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/svg-icon.jsx +23 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-check-box-checked.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-check-box-outline-blank.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-radio-button-off.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-radio-button-on.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/text-field.jsx +215 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/css-event.js +52 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/date-time.js +132 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/dom.js +71 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/events.js +34 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/key-code.js +10 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/key-line.js +13 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/unique-id.js +7 -0
- data/framework_components/roomcast-package-creator/src/css/font-awesome.min.css +4 -0
- data/framework_components/roomcast-package-creator/src/css/ionicons.min.css +11 -0
- data/framework_components/roomcast-package-creator/src/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.svg +565 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.svg +2230 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-package-creator/src/less/drop-down-icon.less +43 -0
- data/framework_components/roomcast-package-creator/src/less/drop-down-menu.less +77 -0
- data/framework_components/roomcast-package-creator/src/less/enhanced-textarea.less +16 -0
- data/framework_components/roomcast-package-creator/src/less/main.less +491 -0
- data/framework_components/roomcast-package-creator/src/less/menu-item.less +69 -0
- data/framework_components/roomcast-package-creator/src/less/menu.less +50 -0
- data/framework_components/roomcast-package-creator/src/less/my_overrides.less +15 -0
- data/framework_components/roomcast-package-creator/src/less/svg-icon.less +11 -0
- data/framework_components/roomcast-package-creator/src/less/text-field.less +168 -0
- data/lib/commands/checkup.rb +1 -1
- data/nutella_lib/framework_net.rb +0 -1
- metadata +173 -4
@@ -0,0 +1,51 @@
|
|
1
|
+
var dest = './dist',
|
2
|
+
src = './src',
|
3
|
+
mui = './node_modules/material-ui/src';
|
4
|
+
|
5
|
+
module.exports = {
|
6
|
+
browserSync: {
|
7
|
+
server: {
|
8
|
+
// We're serving the src folder as well
|
9
|
+
// for sass sourcemap linking
|
10
|
+
baseDir: [dest, src]
|
11
|
+
},
|
12
|
+
files: [
|
13
|
+
dest + '/**'
|
14
|
+
]
|
15
|
+
},
|
16
|
+
less: {
|
17
|
+
src: src + '/less/main.less',
|
18
|
+
watch: [
|
19
|
+
src + '/less/**',
|
20
|
+
mui + '/less/**'
|
21
|
+
],
|
22
|
+
dest: dest
|
23
|
+
},
|
24
|
+
css: {
|
25
|
+
src: src + "/css/**",
|
26
|
+
dest: dest + "/css"
|
27
|
+
},
|
28
|
+
fonts: {
|
29
|
+
src: src + '/fonts/**',
|
30
|
+
dest: dest + '/fonts'
|
31
|
+
},
|
32
|
+
muiFonts: {
|
33
|
+
src: mui + '/less/material-ui-icons/fonts/**',
|
34
|
+
dest: dest + '/fonts'
|
35
|
+
},
|
36
|
+
nutella: {
|
37
|
+
src: './node_modules/nutella_lib/dist/nutella_lib.js',
|
38
|
+
dest: dest
|
39
|
+
},
|
40
|
+
browserify: {
|
41
|
+
// Enable source maps
|
42
|
+
debug: true,
|
43
|
+
// A separate bundle will be generated for each
|
44
|
+
// bundle config in the list below
|
45
|
+
bundleConfigs: [{
|
46
|
+
entries: src + '/app/app.js',
|
47
|
+
dest: dest,
|
48
|
+
outputName: 'app.js'
|
49
|
+
}]
|
50
|
+
}
|
51
|
+
};
|
@@ -0,0 +1,77 @@
|
|
1
|
+
/* browserify task
|
2
|
+
---------------
|
3
|
+
Bundle javascripty things with browserify!
|
4
|
+
This task is set up to generate multiple separate bundles, from
|
5
|
+
different sources, and to use Watchify when run from the default task.
|
6
|
+
See browserify.bundleConfigs in gulp/config.js
|
7
|
+
*/
|
8
|
+
|
9
|
+
var browserify = require('browserify');
|
10
|
+
var watchify = require('watchify');
|
11
|
+
var bundleLogger = require('../util/bundleLogger');
|
12
|
+
var gulp = require('gulp');
|
13
|
+
var handleErrors = require('../util/handleErrors');
|
14
|
+
var source = require('vinyl-source-stream');
|
15
|
+
var config = require('../config').browserify;
|
16
|
+
|
17
|
+
gulp.task('browserify', function(callback) {
|
18
|
+
|
19
|
+
var bundleQueue = config.bundleConfigs.length;
|
20
|
+
|
21
|
+
var browserifyThis = function(bundleConfig) {
|
22
|
+
|
23
|
+
var bundler = browserify({
|
24
|
+
// Required watchify args
|
25
|
+
cache: {}, packageCache: {}, fullPaths: false,
|
26
|
+
// Specify the entry point of your app
|
27
|
+
entries: bundleConfig.entries,
|
28
|
+
// Add file extentions to make optional in your requires
|
29
|
+
extensions: config.extensions,
|
30
|
+
// Enable source maps!
|
31
|
+
debug: config.debug
|
32
|
+
});
|
33
|
+
|
34
|
+
var bundle = function() {
|
35
|
+
// Log when bundling starts
|
36
|
+
bundleLogger.start(bundleConfig.outputName);
|
37
|
+
|
38
|
+
return bundler
|
39
|
+
.bundle()
|
40
|
+
// Report compile errors
|
41
|
+
.on('error', handleErrors)
|
42
|
+
// Use vinyl-source-stream to make the
|
43
|
+
// stream gulp compatible. Specifiy the
|
44
|
+
// desired output filename here.
|
45
|
+
.pipe(source(bundleConfig.outputName))
|
46
|
+
// Specify the output destination
|
47
|
+
.pipe(gulp.dest(bundleConfig.dest))
|
48
|
+
.on('end', reportFinished);
|
49
|
+
};
|
50
|
+
|
51
|
+
if(global.isWatching) {
|
52
|
+
// Wrap with watchify and rebundle on changes
|
53
|
+
bundler = watchify(bundler);
|
54
|
+
// Rebundle on update
|
55
|
+
bundler.on('update', bundle);
|
56
|
+
}
|
57
|
+
|
58
|
+
var reportFinished = function() {
|
59
|
+
// Log when bundling completes
|
60
|
+
bundleLogger.end(bundleConfig.outputName);
|
61
|
+
|
62
|
+
if(bundleQueue) {
|
63
|
+
bundleQueue--;
|
64
|
+
if(bundleQueue === 0) {
|
65
|
+
// If queue is empty, tell gulp the task is complete.
|
66
|
+
// https://github.com/gulpjs/gulp/blob/master/docs/API.md#accept-a-callback
|
67
|
+
callback();
|
68
|
+
}
|
69
|
+
}
|
70
|
+
};
|
71
|
+
|
72
|
+
return bundle();
|
73
|
+
};
|
74
|
+
|
75
|
+
// Start bundling with Browserify for each bundleConfig specified
|
76
|
+
config.bundleConfigs.forEach(browserifyThis);
|
77
|
+
});
|
@@ -0,0 +1,16 @@
|
|
1
|
+
var gulp = require('gulp'),
|
2
|
+
less = require('gulp-less'),
|
3
|
+
autoprefixer = require('gulp-autoprefixer'),
|
4
|
+
sourcemaps = require('gulp-sourcemaps'),
|
5
|
+
handleErrors = require('../util/handleErrors'),
|
6
|
+
config = require('../config').less;
|
7
|
+
|
8
|
+
gulp.task('less', function() {
|
9
|
+
return gulp.src(config.src)
|
10
|
+
.pipe(sourcemaps.init())
|
11
|
+
.pipe(less())
|
12
|
+
.on('error', handleErrors)
|
13
|
+
.pipe(autoprefixer({cascade: false, browsers: ['last 2 versions']}))
|
14
|
+
.pipe(sourcemaps.write())
|
15
|
+
.pipe(gulp.dest(config.dest));
|
16
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
/* Notes:
|
3
|
+
- gulp/tasks/browserify.js handles js recompiling with watchify
|
4
|
+
- gulp/tasks/browserSync.js watches and reloads compiled files
|
5
|
+
*/
|
6
|
+
|
7
|
+
var gulp = require('gulp');
|
8
|
+
var config = require('../config');
|
9
|
+
|
10
|
+
gulp.task('watch', ['setWatch'], function() {
|
11
|
+
gulp.watch(config.less.watch, ['less']);
|
12
|
+
});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/* bundleLogger
|
2
|
+
------------
|
3
|
+
Provides gulp style logs to the bundle method in browserify.js
|
4
|
+
*/
|
5
|
+
|
6
|
+
var gutil = require('gulp-util');
|
7
|
+
var prettyHrtime = require('pretty-hrtime');
|
8
|
+
var startTime;
|
9
|
+
|
10
|
+
module.exports = {
|
11
|
+
start: function(filepath) {
|
12
|
+
startTime = process.hrtime();
|
13
|
+
gutil.log('Bundling', gutil.colors.green(filepath) + '...');
|
14
|
+
},
|
15
|
+
|
16
|
+
end: function(filepath) {
|
17
|
+
var taskTime = process.hrtime(startTime);
|
18
|
+
var prettyTime = prettyHrtime(taskTime);
|
19
|
+
gutil.log('Bundled', gutil.colors.green(filepath), 'in', gutil.colors.magenta(prettyTime));
|
20
|
+
}
|
21
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
var notify = require("gulp-notify");
|
2
|
+
|
3
|
+
module.exports = function() {
|
4
|
+
|
5
|
+
var args = Array.prototype.slice.call(arguments);
|
6
|
+
|
7
|
+
// Send error to notification center with gulp-notify
|
8
|
+
notify.onError({
|
9
|
+
title: "Compile Error",
|
10
|
+
message: "<%= error.message %>"
|
11
|
+
}).apply(this, args);
|
12
|
+
|
13
|
+
// Keep gulp from hanging on this task
|
14
|
+
this.emit('end');
|
15
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/*
|
2
|
+
gulpfile.js
|
3
|
+
===========
|
4
|
+
Rather than manage one giant configuration file responsible
|
5
|
+
for creating multiple tasks, each task has been broken out into
|
6
|
+
its own file in gulp/tasks. Any files in that directory get
|
7
|
+
automatically required below.
|
8
|
+
To add a new task, simply add a new task file that directory.
|
9
|
+
gulp/tasks/default.js specifies the default set of tasks to run
|
10
|
+
when you run `gulp`.
|
11
|
+
*/
|
12
|
+
|
13
|
+
var requireDir = require('require-dir');
|
14
|
+
|
15
|
+
// Require all tasks in gulp/tasks, including subfolders
|
16
|
+
requireDir('./gulp/tasks', { recurse: true });
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html class="no-js" lang="">
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7
|
+
<title>Channel Creation Interface</title>
|
8
|
+
<meta name="description" content="This interface allows the teacher/developer to add/delete or modify the channels catalogue of RoomCast.">
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
10
|
+
<link rel="stylesheet" type="text/css" href="dist/main.css">
|
11
|
+
<link rel="stylesheet" type="text/css" href="dist/css/font-awesome.min.css">
|
12
|
+
<link rel="stylesheet" type="text/css" href="dist/css/ionicons.min.css">
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body>
|
16
|
+
|
17
|
+
<!-- Nutella -->
|
18
|
+
<script src="dist/nutella_lib.js" type="text/javascript" charset="utf-8"></script>
|
19
|
+
<script type="text/javascript">
|
20
|
+
|
21
|
+
// Parse the query parameters
|
22
|
+
var query_parameters = NUTELLA.parseURLParameters();
|
23
|
+
|
24
|
+
// Get an instance of nutella.
|
25
|
+
var nutella = NUTELLA.init(query_parameters.broker, query_parameters.app_id, query_parameters.run_id, 'channel-creation-interface');
|
26
|
+
|
27
|
+
</script>
|
28
|
+
|
29
|
+
<!-- This script adds the Roboto font to our project. For more detail go to this site: http://www.google.com/fonts#UsePlace:use/Collection:Roboto:400,300,500 -->
|
30
|
+
<script>
|
31
|
+
var WebFontConfig = {
|
32
|
+
google: {
|
33
|
+
families: ['Roboto:400,300,200,100,500:latin']
|
34
|
+
}
|
35
|
+
};
|
36
|
+
(function () {
|
37
|
+
var wf = document.createElement('script');
|
38
|
+
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
|
39
|
+
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
|
40
|
+
wf.type = 'text/javascript';
|
41
|
+
wf.async = 'true';
|
42
|
+
var s = document.getElementsByTagName('script')[0];
|
43
|
+
s.parentNode.insertBefore(wf, s);
|
44
|
+
})();
|
45
|
+
</script>
|
46
|
+
|
47
|
+
<script src="dist/app.js"></script>
|
48
|
+
<!--script src="json2.js"></script-->
|
49
|
+
|
50
|
+
</body>
|
51
|
+
|
52
|
+
</html>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"name": "material-ui-example",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"description": "Sample project that uses material-ui",
|
5
|
+
"browserify": {
|
6
|
+
"transform": [
|
7
|
+
[
|
8
|
+
"reactify",
|
9
|
+
{
|
10
|
+
"es6": true
|
11
|
+
}
|
12
|
+
]
|
13
|
+
]
|
14
|
+
},
|
15
|
+
"devDependencies": {
|
16
|
+
"browser-sync": "^1.8.1",
|
17
|
+
"browserify": "^7.0.3",
|
18
|
+
"gulp": "^3.8.10",
|
19
|
+
"gulp-autoprefixer": "^2.0.0",
|
20
|
+
"gulp-less": "^3.0.3",
|
21
|
+
"gulp-notify": "^2.1.0",
|
22
|
+
"gulp-sourcemaps": "^1.2.8",
|
23
|
+
"gulp-util": "^3.0.1",
|
24
|
+
"pretty-hrtime": "^0.2.2",
|
25
|
+
"reactify": "^0.17.1",
|
26
|
+
"require-dir": "^0.1.0",
|
27
|
+
"underscore": "^1.7.0",
|
28
|
+
"vinyl-source-stream": "^1.0.0",
|
29
|
+
"watchify": "^2.2.1"
|
30
|
+
},
|
31
|
+
"dependencies": {
|
32
|
+
"material-ui": "^0.7.3",
|
33
|
+
"nutella_lib": "^0.5.1",
|
34
|
+
"react": "^0.13.2",
|
35
|
+
"react-tap-event-plugin": "^0.1.3"
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
(function () {
|
3
|
+
|
4
|
+
var React = require('react'),
|
5
|
+
injectTapEventPlugin = require("react-tap-event-plugin"),
|
6
|
+
Main = require('./components/main'); // Our custom react component
|
7
|
+
|
8
|
+
//Needed for React Developer Tools
|
9
|
+
window.React = React;
|
10
|
+
|
11
|
+
//Needed for onTouchTap
|
12
|
+
//Can go away when react 1.0 release
|
13
|
+
//Check this repo:
|
14
|
+
//https://github.com/zilverline/react-tap-event-plugin
|
15
|
+
injectTapEventPlugin();
|
16
|
+
|
17
|
+
// Render the main app react component into the document body.
|
18
|
+
// For more details see: https://facebook.github.io/react/docs/top-level-api.html#react.render
|
19
|
+
window.ReactMain = React.render( <Main /> , document.body);
|
20
|
+
ReactMain.imagesQueue = 0;
|
21
|
+
|
22
|
+
})();
|
@@ -0,0 +1,44 @@
|
|
1
|
+
|
2
|
+
var AnimationMixin = {
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Flips element wrt vertical axis
|
6
|
+
* @param node DOM node
|
7
|
+
* @param startDeg
|
8
|
+
* @param endDeg
|
9
|
+
* @param ccw true if animated in ccw direction
|
10
|
+
* @param callback called at the end of the animation
|
11
|
+
*/
|
12
|
+
flipY: function(node, startDeg, endDeg, ccw, callback) {
|
13
|
+
var self = this;
|
14
|
+
|
15
|
+
this.ny = startDeg;
|
16
|
+
|
17
|
+
if(this.rotYINT) {
|
18
|
+
clearInterval(this.rotYINT);
|
19
|
+
}
|
20
|
+
|
21
|
+
function rotate() {
|
22
|
+
if(ccw) {
|
23
|
+
self.ny -= 5;
|
24
|
+
} else {
|
25
|
+
self.ny += 5;
|
26
|
+
}
|
27
|
+
node.style.transform="rotateY(" + self.ny + "deg)";
|
28
|
+
node.style.webkitTransform="rotateY(" + self.ny + "deg)";
|
29
|
+
node.style.OTransform="rotateY(" + self.ny + "deg)";
|
30
|
+
node.style.MozTransform="rotateY(" + self.ny + "deg)";
|
31
|
+
if (self.ny === endDeg) {
|
32
|
+
clearInterval(self.rotYINT);
|
33
|
+
if(callback) {
|
34
|
+
callback();
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
this.rotYINT = setInterval(rotate, 4);
|
39
|
+
|
40
|
+
}
|
41
|
+
|
42
|
+
};
|
43
|
+
|
44
|
+
module.exports = AnimationMixin;
|
@@ -0,0 +1,130 @@
|
|
1
|
+
|
2
|
+
var React = require('react');
|
3
|
+
var Mui = require('material-ui');
|
4
|
+
var TopBar = require('./TopBar');
|
5
|
+
var Dialog = Mui.Dialog;
|
6
|
+
var FlatButton = Mui.FlatButton;
|
7
|
+
|
8
|
+
var CataloguePage = React.createClass({
|
9
|
+
|
10
|
+
componentDidMount: function() {
|
11
|
+
this.updateDimensions();
|
12
|
+
window.addEventListener("resize", this.updateDimensions);
|
13
|
+
},
|
14
|
+
|
15
|
+
componentWillUnmount: function() {
|
16
|
+
window.removeEventListener("resize", this.updateDimensions);
|
17
|
+
},
|
18
|
+
|
19
|
+
getInitialState: function () {
|
20
|
+
return {
|
21
|
+
height: 0
|
22
|
+
}
|
23
|
+
},
|
24
|
+
|
25
|
+
updateDimensions: function() {
|
26
|
+
var height = this.refs.gridRef.getDOMNode().offsetHeight;
|
27
|
+
|
28
|
+
this.setState({height: height});
|
29
|
+
},
|
30
|
+
|
31
|
+
enableSaveDialog: function() {
|
32
|
+
this.props.onExitSelection();
|
33
|
+
this.refs.saveDialog.show();
|
34
|
+
},
|
35
|
+
|
36
|
+
disableSaveDialog: function() {
|
37
|
+
this.refs.saveDialog.dismiss();
|
38
|
+
},
|
39
|
+
|
40
|
+
enableUndoDialog: function() {
|
41
|
+
this.props.onExitSelection();
|
42
|
+
this.refs.undoDialog.show();
|
43
|
+
},
|
44
|
+
|
45
|
+
disableUndoDialog: function() {
|
46
|
+
this.refs.undoDialog.dismiss();
|
47
|
+
},
|
48
|
+
|
49
|
+
render: function() {
|
50
|
+
|
51
|
+
var self = this;
|
52
|
+
|
53
|
+
var handleOnSave = function() {
|
54
|
+
self.props.onSave();
|
55
|
+
self.disableSaveDialog();
|
56
|
+
};
|
57
|
+
|
58
|
+
var customActionsSave = [
|
59
|
+
React.createElement(FlatButton, {
|
60
|
+
key: 2,
|
61
|
+
label: "Confirm",
|
62
|
+
secondary: true,
|
63
|
+
onTouchTap: handleOnSave}),
|
64
|
+
React.createElement(FlatButton, {
|
65
|
+
key: 1,
|
66
|
+
label: "Cancel",
|
67
|
+
primary: true,
|
68
|
+
onTouchTap: this.disableSaveDialog})
|
69
|
+
];
|
70
|
+
|
71
|
+
var handleOnUndo = function() {
|
72
|
+
self.props.onUndo();
|
73
|
+
self.disableUndoDialog();
|
74
|
+
};
|
75
|
+
|
76
|
+
var customActionsUndo = [
|
77
|
+
React.createElement(FlatButton, {
|
78
|
+
key: 2,
|
79
|
+
label: "Confirm",
|
80
|
+
secondary: true,
|
81
|
+
onTouchTap: handleOnUndo}),
|
82
|
+
React.createElement(FlatButton, {
|
83
|
+
key: 1,
|
84
|
+
label: "Cancel",
|
85
|
+
primary: true,
|
86
|
+
onTouchTap: this.disableUndoDialog})
|
87
|
+
];
|
88
|
+
|
89
|
+
var overlayStyle = {
|
90
|
+
height: this.state.height
|
91
|
+
};
|
92
|
+
|
93
|
+
var overlay = <div className="grid-overlay" onTouchTap={this.props.onExitSelection} ></div>;
|
94
|
+
if(this.props.isSelected) {
|
95
|
+
overlay = <div className="grid-overlay is-shown" onTouchTap={this.props.onExitSelection} ></div>;
|
96
|
+
}
|
97
|
+
|
98
|
+
return (
|
99
|
+
|
100
|
+
<div>
|
101
|
+
|
102
|
+
<TopBar
|
103
|
+
onSave={this.enableSaveDialog}
|
104
|
+
onUndo={this.enableUndoDialog}
|
105
|
+
onAddCard={this.props.onAddCard}
|
106
|
+
onExitSelection={this.props.onExitSelection} />
|
107
|
+
|
108
|
+
<div className='content-div'>
|
109
|
+
|
110
|
+
{this.props.backgroudMessage}
|
111
|
+
|
112
|
+
<div className="grid" ref='gridRef' >
|
113
|
+
{overlay}
|
114
|
+
{this.props.channels}
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
<Dialog ref='saveDialog' actions={customActionsSave} > Do you want to save this catalogue? </Dialog>
|
119
|
+
<Dialog ref='undoDialog' actions={customActionsUndo} > Do you want to reload the starting catalogue? </Dialog>
|
120
|
+
|
121
|
+
</div>
|
122
|
+
|
123
|
+
);
|
124
|
+
|
125
|
+
}
|
126
|
+
|
127
|
+
});
|
128
|
+
|
129
|
+
module.exports = CataloguePage;
|
130
|
+
|