From 221a14315b09946db2485036bbf4a80295dc4889 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 2 Jul 2014 16:22:51 -0400 Subject: password reset / username dupe stuff from PH --- views/controls/editor/media-editor.ejs | 30 ++++++++++++++++++++++++++++++ views/controls/editor/settings.ejs | 4 +--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 views/controls/editor/media-editor.ejs (limited to 'views/controls/editor') diff --git a/views/controls/editor/media-editor.ejs b/views/controls/editor/media-editor.ejs new file mode 100644 index 0000000..93405fc --- /dev/null +++ b/views/controls/editor/media-editor.ejs @@ -0,0 +1,30 @@ +
+ + + +
+ +
+ +
+ +
+ +
+
+ + + + +
+
+ +
+ +
+ +
diff --git a/views/controls/editor/settings.ejs b/views/controls/editor/settings.ejs index a7d6213..867d5f3 100644 --- a/views/controls/editor/settings.ejs +++ b/views/controls/editor/settings.ejs @@ -16,9 +16,7 @@
-
- -
+
-- cgit v1.2.3-70-g09d2 From bce442242f167b70be1f7b24190f9e59d3c24e37 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 10 Jul 2014 18:21:06 -0400 Subject: media editor --- public/assets/javascripts/ui/reader/ReaderView.js | 2 +- public/assets/javascripts/ui/site/ProfileView.js | 7 ++-- views/controls/editor/media-editor.ejs | 43 ++++++++++++++++------- views/controls/editor/settings.ejs | 2 +- views/controls/editor/video-toolbar.ejs | 7 ---- views/controls/reader/about-media.ejs | 16 +++++++++ 6 files changed, 51 insertions(+), 26 deletions(-) delete mode 100644 views/controls/editor/video-toolbar.ejs create mode 100644 views/controls/reader/about-media.ejs (limited to 'views/controls/editor') diff --git a/public/assets/javascripts/ui/reader/ReaderView.js b/public/assets/javascripts/ui/reader/ReaderView.js index e86856c..add1ea1 100644 --- a/public/assets/javascripts/ui/reader/ReaderView.js +++ b/public/assets/javascripts/ui/reader/ReaderView.js @@ -32,7 +32,7 @@ var ReaderView = View.extend({ var base = this $(window).on('message', function(event){ - if (event.origin !== window.location.origin) { + if (event.originalEvent.origin !== window.location.origin) { return } var message = event.originalEvent.data diff --git a/public/assets/javascripts/ui/site/ProfileView.js b/public/assets/javascripts/ui/site/ProfileView.js index 41f04ef..8661bcd 100644 --- a/public/assets/javascripts/ui/site/ProfileView.js +++ b/public/assets/javascripts/ui/site/ProfileView.js @@ -1,20 +1,19 @@ var ProfileView = View.extend({ - initialize: function(){ + initialize: function() { }, - load: function(){ + load: function() { var classes = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen']; $(".bio").addClass(choice(classes)); - $("td.border").each(function(){ + $("td.border").each(function() { var iframe = $(this).find("iframe").get('0') if (! iframe) return - console.log(iframe) $(this).on({ mouseenter: function(e){ iframe.contentWindow.postMessage("spin-on", window.location.origin) diff --git a/views/controls/editor/media-editor.ejs b/views/controls/editor/media-editor.ejs index 93405fc..95aabb5 100644 --- a/views/controls/editor/media-editor.ejs +++ b/views/controls/editor/media-editor.ejs @@ -3,28 +3,45 @@
- +
+ +
+ + + + + + + + Autoplay + Loop + Mute + Initial Still +
-
-
- - - - -
+
+ Dimensions + Width + Height +
- + +
+ Delete +
diff --git a/views/controls/editor/settings.ejs b/views/controls/editor/settings.ejs index 867d5f3..6f46be3 100644 --- a/views/controls/editor/settings.ejs +++ b/views/controls/editor/settings.ejs @@ -10,7 +10,7 @@
- +
diff --git a/views/controls/editor/video-toolbar.ejs b/views/controls/editor/video-toolbar.ejs deleted file mode 100644 index d4364a2..0000000 --- a/views/controls/editor/video-toolbar.ejs +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/views/controls/reader/about-media.ejs b/views/controls/reader/about-media.ejs new file mode 100644 index 0000000..c6365ad --- /dev/null +++ b/views/controls/reader/about-media.ejs @@ -0,0 +1,16 @@ +
+ +
+
+
+
+ +
+ + + + + +
+ +
-- cgit v1.2.3-70-g09d2 From 9a2cfe7da6808a04b7c668075e9e9598ddb5ae04 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 11 Jul 2014 17:07:05 -0400 Subject: basic media editor --- .../javascripts/rectangles/engine/scenery/move.js | 6 ++ .../assets/javascripts/ui/editor/EditorToolbar.js | 2 +- public/assets/javascripts/ui/editor/EditorView.js | 2 +- public/assets/javascripts/ui/editor/MediaEditor.js | 69 ++++++++++++++++++++++ public/assets/stylesheets/app.css | 23 +++++--- views/controls/editor/media-editor.ejs | 30 ++++++---- views/editor.ejs | 2 +- views/partials/scripts.ejs | 3 +- 8 files changed, 115 insertions(+), 22 deletions(-) create mode 100644 public/assets/javascripts/ui/editor/MediaEditor.js (limited to 'views/controls/editor') diff --git a/public/assets/javascripts/rectangles/engine/scenery/move.js b/public/assets/javascripts/rectangles/engine/scenery/move.js index bad0a55..aa7ddd1 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/move.js +++ b/public/assets/javascripts/rectangles/engine/scenery/move.js @@ -26,6 +26,12 @@ Scenery.move = function(base){ Scenery.remove(base.id) return } + + if (editor.permissions.pick) { + // load the modal + app.router.editorView.mediaEditor.pick(base) + } + if (! (editor.permissions.move || editor.permissions.resize) ) { e.clickAccepted = false return diff --git a/public/assets/javascripts/ui/editor/EditorToolbar.js b/public/assets/javascripts/ui/editor/EditorToolbar.js index 4a7c3e8..a3abc5a 100644 --- a/public/assets/javascripts/ui/editor/EditorToolbar.js +++ b/public/assets/javascripts/ui/editor/EditorToolbar.js @@ -87,7 +87,7 @@ var EditorToolbar = View.extend({ var editor = new function(){ this.permissions = new Permissions({ - 'pick': false, + 'pick': true, 'move': true, 'resize': false, 'destroy': false, diff --git a/public/assets/javascripts/ui/editor/EditorView.js b/public/assets/javascripts/ui/editor/EditorView.js index 2bb2d61..017e241 100644 --- a/public/assets/javascripts/ui/editor/EditorView.js +++ b/public/assets/javascripts/ui/editor/EditorView.js @@ -13,6 +13,7 @@ var EditorView = View.extend({ this.settings = new EditorSettings ({ parent: this }) this.mediaViewer = new MediaViewer ({ parent: this }) this.mediaUpload = new MediaUpload ({ parent: this }) + this.mediaEditor = new MediaEditor ({ parent: this }) this.wallpaperPicker = new WallpaperPicker ({ parent: this }) this.lightControl = new LightControl ({ parent: this }) }, @@ -39,4 +40,3 @@ var EditorView = View.extend({ } }) - diff --git a/public/assets/javascripts/ui/editor/MediaEditor.js b/public/assets/javascripts/ui/editor/MediaEditor.js new file mode 100644 index 0000000..8d6d517 --- /dev/null +++ b/public/assets/javascripts/ui/editor/MediaEditor.js @@ -0,0 +1,69 @@ + +var MediaEditor = FormView.extend({ + el: "#mediaEditor", + + events: { + }, + + initialize: function(opt){ + this.parent = opt.parent + this.__super__.initialize.call(this) + + this.$name = this.$("[name=name]") + this.$description = this.$("[name=description]") + this.$autoplay = this.$("[name=autoplay]") + + // image fields + this.$widthDimension = this.$("[name=width]") + this.$heightDimension = this.$("[name=height]") + this.$units = this.$("[name=units]") + + // video fields + this.$playButton = this.$(".play") + this.$loop = this.$("[name=loop]") + this.$mute = this.$("[name=mute]") + this.$keyframe = this.$("[name=keyframe]") + }, + + toggle: function(state) { + this.$el.toggleClass("active", state); + }, + + pick: function(scenery) { + this.$el.addClass("active") + + var media = scenery.media + + this.$name.val(media.title) + this.$description.val(media.description) + + switch (media.type) { + case "image": + this.$(".image").show() + this.$(".video").hide() + /* + this.$widthDimension + this.$heightDimension + this.$units + */ + + break + + case "youtube": + case "vimeo": + case "video": + this.$(".video").show() + this.$(".image").hide() + + /* + this.$loop + this.$mute + this.$keyframe + */ + + + break + } + }, + +}) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 684761c..7389810 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -1106,7 +1106,7 @@ input[type=range] { -webkit-appearance: none; -moz-appearance: none; background-color: black; - width: 200px; + width: 180px; height:3px; } @@ -1176,13 +1176,15 @@ input[type="range"]::-webkit-slider-thumb { #startpoint.active:hover { text-decoration:none; } -.settings input[type="text"], textarea{ +.settings input[type="text"] { border: 1px solid #000; font-size: 15px; padding: 5px; } .settings textarea { + border: 1px solid #000; + padding: 5px; font-size: 12px; width: 100%; max-height: 200px; @@ -1193,7 +1195,7 @@ input[type="range"]::-webkit-slider-thumb { border: 1px solid #000; } -.settings .setting{ +.settings .setting { margin-bottom:10px; } .setting.subButtons { @@ -1210,6 +1212,13 @@ input[type="range"]::-webkit-slider-thumb { .settings .setting:last-child{ margin-bottom:0px; } +.settings input[type="text"].number { + width: 60px; +} + +.setting label { + padding-right: 5px; +} button { padding: 8px; @@ -1372,23 +1381,23 @@ form li textarea { margin-top: 20px; } -.video { +.demo .video { height:80vh; min-height:300px; } -.video span { +.demo .video span { font-size:100px; color:white; cursor:pointer; } -.video span.videoTitle { +.demo .video span.videoTitle { font-size: 29px; font-weight: 300; padding: 3px 7px; } -.video span.icon-ios7-play-outline:hover { +.demo .video span.icon-ios7-play-outline:hover { color:lightgreen; } diff --git a/views/controls/editor/media-editor.ejs b/views/controls/editor/media-editor.ejs index 95aabb5..483fa72 100644 --- a/views/controls/editor/media-editor.ejs +++ b/views/controls/editor/media-editor.ejs @@ -1,4 +1,4 @@ -
+
@@ -15,24 +15,32 @@ - - - Autoplay - Loop - Mute - Initial Still +
+
+ + + + + + +
+ +
+ Initial Still +
+
- Dimensions - Width - Height + Dimensions
+ +
diff --git a/views/editor.ejs b/views/editor.ejs index a79eb9a..5d1e052 100755 --- a/views/editor.ejs +++ b/views/editor.ejs @@ -13,8 +13,8 @@
[[ include controls/editor/toolbar ]] - [[ include controls/editor/video-toolbar ]] [[ include controls/editor/media-drawer ]] + [[ include controls/editor/media-editor ]] [[ include controls/editor/wallpaper ]] [[ include controls/editor/light-control ]] [[ include controls/editor/settings ]] diff --git a/views/partials/scripts.ejs b/views/partials/scripts.ejs index 6dd4480..40bb306 100644 --- a/views/partials/scripts.ejs +++ b/views/partials/scripts.ejs @@ -78,13 +78,14 @@ + + - -- cgit v1.2.3-70-g09d2 From 1826bed806b079c6e44703a4e5f424b7aed7bd96 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 11 Jul 2014 17:29:41 -0400 Subject: play button --- .../rectangles/engine/scenery/types/video.js | 3 --- .../rectangles/engine/scenery/types/vimeo.js | 14 +++++++++++++- public/assets/javascripts/ui/editor/MediaEditor.js | 5 +++++ public/assets/stylesheets/app.css | 20 ++++++++++++++++++++ views/controls/editor/media-editor.ejs | 5 ++--- 5 files changed, 40 insertions(+), 7 deletions(-) (limited to 'views/controls/editor') diff --git a/public/assets/javascripts/rectangles/engine/scenery/types/video.js b/public/assets/javascripts/rectangles/engine/scenery/types/video.js index 2f6dc01..a9fce4a 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/types/video.js +++ b/public/assets/javascripts/rectangles/engine/scenery/types/video.js @@ -15,10 +15,7 @@ Scenery.types.video = Scenery.types.base.extend(function(base){ build: function(){ this.mx = new MX.Video({ - src: this.media.url, media: this.media, - width: this.media.width, - height: this.media.height, scale: this.scale, y: this.scale * this.media.height/2, backface: false, diff --git a/public/assets/javascripts/rectangles/engine/scenery/types/vimeo.js b/public/assets/javascripts/rectangles/engine/scenery/types/vimeo.js index 697c66a..ded5f87 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/types/vimeo.js +++ b/public/assets/javascripts/rectangles/engine/scenery/types/vimeo.js @@ -22,7 +22,19 @@ Scenery.types.vimeo = Scenery.types.base.extend(function(base){ }) scene.add( this.mx ) }, - + + play: function(){ + this.mx.play() + }, + + pause: function(){ + this.mx.pause() + }, + + seek: function(n){ + this.mx.seek(n) + }, + serialize: function(){ var data = base.serialize.call(this) return data diff --git a/public/assets/javascripts/ui/editor/MediaEditor.js b/public/assets/javascripts/ui/editor/MediaEditor.js index 8d6d517..1ccb5cf 100644 --- a/public/assets/javascripts/ui/editor/MediaEditor.js +++ b/public/assets/javascripts/ui/editor/MediaEditor.js @@ -3,6 +3,7 @@ var MediaEditor = FormView.extend({ el: "#mediaEditor", events: { + "click .play": "togglePlaying", }, initialize: function(opt){ @@ -29,7 +30,11 @@ var MediaEditor = FormView.extend({ this.$el.toggleClass("active", state); }, + togglePlaying: function(){ + }, + pick: function(scenery) { + this.scenery = scenery this.$el.addClass("active") var media = scenery.media diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 7389810..4296223 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -1220,6 +1220,26 @@ input[type="range"]::-webkit-slider-thumb { padding-right: 5px; } +.setting .play { + color: white; + background: black; + border-radius: 50px; + padding: 6px 7px 5px; + cursor: pointer; +} +.setting .play .icon-play { + display: inline; +} +.setting .play.playing .icon-play { + display: none; +} +.setting .play .icon-pause { + display: none; +} +.setting .play.playing .icon-pause { + display: inline; +} + button { padding: 8px; border: 1px solid; diff --git a/views/controls/editor/media-editor.ejs b/views/controls/editor/media-editor.ejs index 483fa72..12ab2b4 100644 --- a/views/controls/editor/media-editor.ejs +++ b/views/controls/editor/media-editor.ejs @@ -12,8 +12,8 @@
- - + + + -->
diff --git a/views/controls/builder/info.ejs b/views/controls/builder/info.ejs new file mode 100644 index 0000000..af0a76d --- /dev/null +++ b/views/controls/builder/info.ejs @@ -0,0 +1,35 @@ +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + + +
+ +
diff --git a/views/controls/editor/media-editor.ejs b/views/controls/editor/media-editor.ejs index 65db3ce..5db1fb2 100644 --- a/views/controls/editor/media-editor.ejs +++ b/views/controls/editor/media-editor.ejs @@ -29,9 +29,9 @@
- Initial Still +
- +
diff --git a/views/partials/sign-in.ejs b/views/partials/sign-in.ejs index 3f05fff..8268b2a 100644 --- a/views/partials/sign-in.ejs +++ b/views/partials/sign-in.ejs @@ -6,7 +6,7 @@
- – or the ol' fashion way – +
  • @@ -39,7 +39,7 @@ - – or the ol' fashion way – +
  • diff --git a/views/projects/layouts-modal.ejs b/views/projects/layouts-modal.ejs index 75b2641..97f1e61 100644 --- a/views/projects/layouts-modal.ejs +++ b/views/projects/layouts-modal.ejs @@ -5,6 +5,9 @@

    Edit Room Layouts

    +
    + There are no room layouts available. Please create a new one. +
    @@ -18,6 +21,8 @@

    Your Projects

    +
    +
    @@ -31,6 +36,9 @@

    Choose Room Template

    +
    + There are no room layouts available. Please create a new one. +
    diff --git a/views/projects/list-projects.ejs b/views/projects/list-projects.ejs index 42387ba..2c12af0 100644 --- a/views/projects/list-projects.ejs +++ b/views/projects/list-projects.ejs @@ -6,7 +6,7 @@ [[ projects.forEach(function(project, i) { ]] - + [[ if (profile._id == project.user_id) { ]]
    edit
    [[ } ]] -- cgit v1.2.3-70-g09d2