From f9be43e4cce6b57f41a4e2242f019e969b081d37 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 12:43:28 -0500 Subject: view project button in settings --- public/assets/javascripts/ui/editor/EditorSettings.js | 15 +++++++++++++++ server/lib/util.js | 10 +++------- views/controls/editor/settings.ejs | 6 ++++++ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/public/assets/javascripts/ui/editor/EditorSettings.js b/public/assets/javascripts/ui/editor/EditorSettings.js index 026607a..b319404 100644 --- a/public/assets/javascripts/ui/editor/EditorSettings.js +++ b/public/assets/javascripts/ui/editor/EditorSettings.js @@ -18,6 +18,7 @@ var EditorSettings = FormView.extend({ "click [data-role='clear-project']": 'clear', "click [data-role='destroy-project']": 'destroy', "click [data-role='toggle-map']": 'toggleMap', + "click [data-role='view-project']": 'viewProject', "click #startText": "setStartPosition", "click #moveText": "confirmStartPosition", "click #confirmText": "setStartPosition", @@ -217,11 +218,25 @@ var EditorSettings = FormView.extend({ this.isVisible = true }, + viewAfterSave: false, + viewProject: function(e){ + e.preventDefault() + Minotaur.unwatch(this) + Minotaur.hide() + this.viewAfterSave = true + this.save() + }, + success: function(data){ this.$id.val(data._id) this.$name.val(data.name) this.action = this.updateAction + if (this.viewAfterSave) { + window.location.pathname = "/project/" + data.slug + return + } + Minotaur.unwatch(this) Minotaur.hide() diff --git a/server/lib/util.js b/server/lib/util.js index 273d7d1..e3fd1ed 100644 --- a/server/lib/util.js +++ b/server/lib/util.js @@ -10,8 +10,9 @@ var entities = new RegExp("[<>&]", 'g') var util = {} -util.trim = function (s){ return (s || "").replace(whitespaceHead,"").replace(whitespaceTail,"") } - +util.trim = function (s){ + return (s || "").replace(whitespaceHead,"").replace(whitespaceTail,"") +} util.slugify = function (s){ return (s || "").toLowerCase().replace(whitespace,"-").replace(nonAlphanumerics, '-').replace(consecutiveDashes,"-") } @@ -33,7 +34,6 @@ util.escapeRegExp = function (s) { util.htmlize = function(s) { return s.replace(/\n/g,"
") } - util.cleanQuery = function (query) { var update = _.extend({}, query); delete update._id; @@ -43,14 +43,10 @@ util.cleanQuery = function (query) { delete update.created_by; return update; } - util.ip2num = function(dot) { - console.log(dot); - var d = (dot || "127.0.0.1").split('.'); return ((((((+d[0])*256)+(+d[1]))*256)+(+d[2]))*256)+(+d[3]); } - util.num2ip = function(num) { if (! num) return "" var d = num % 256; diff --git a/views/controls/editor/settings.ejs b/views/controls/editor/settings.ejs index cd17382..cd915c5 100644 --- a/views/controls/editor/settings.ejs +++ b/views/controls/editor/settings.ejs @@ -27,6 +27,12 @@ Edit map + + + + View project + +
-- cgit v1.2.3-70-g09d2 From dbdc7bf9b1922935334e44637b7bdcb534386004 Mon Sep 17 00:00:00 2001 From: ryderr Date: Mon, 1 Dec 2014 13:08:48 -0500 Subject: room border issue in mobile --- public/assets/stylesheets/app.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 3c380ef..5effc00 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -3072,7 +3072,8 @@ a[data-role="forgot-password"] { } .projectList .room { width: 100%; - height: 230px; + height:230px; + height: 69vw; margin: 0; } .mediaDrawer form h2 { -- cgit v1.2.3-70-g09d2 From dc4cd71e3a0585a419898c834360f42f5bd09bd4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 13:03:37 -0500 Subject: delete wallpaper with scissors --- .../javascripts/ui/editor/WallpaperPicker.js | 29 ++++++++++++++++---- public/assets/stylesheets/app.css | 32 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/public/assets/javascripts/ui/editor/WallpaperPicker.js b/public/assets/javascripts/ui/editor/WallpaperPicker.js index e2aaeb7..3640d6d 100644 --- a/public/assets/javascripts/ui/editor/WallpaperPicker.js +++ b/public/assets/javascripts/ui/editor/WallpaperPicker.js @@ -5,6 +5,7 @@ var WallpaperPicker = UploadView.extend({ mediaTag: "wallpaper", createAction: "/api/media/new", uploadAction: "/api/media/upload", + destroyAction: "/api/media/destroy", events: { "contextmenu": 'contextmenu', @@ -51,8 +52,6 @@ var WallpaperPicker = UploadView.extend({ this.load() } } - // toggle the class that makes the cursor a paintbucket - // $("body").removeClass("pastePaper") }, load: function(){ @@ -78,6 +77,7 @@ var WallpaperPicker = UploadView.extend({ var swatch = document.createElement("div") swatch.className = "swatch" swatch.style.backgroundImage = "url(" + media.url + ")" + swatch.setAttribute("data-id", media._id) this.$swatches.append(swatch) this.$swatches.show() this.$(".txt").hide() @@ -104,23 +104,41 @@ var WallpaperPicker = UploadView.extend({ }, pick: function(e){ - app.tube('cancel-wallpaper') var $swatch = $(e.currentTarget) - this.follow( e, $swatch.css('background-image') ) - this.parent.presets.modified = true + if (Scenery.nextWallpaper == "none") { + var _id = $swatch[0].getAttribute("data-id") + $swatch.remove() + this.destroy(_id, function(){}) + } + else { + app.tube('cancel-wallpaper') + this.follow( e, $swatch.css('background-image') ) + this.parent.presets.modified = true + } }, remove: function(e){ if (Scenery.nextWallpaper) { + // remove red class to the wallpaper Scenery.nextWallpaper = null app.tube('cancel-wallpaper') } else { + // add red class to the wallpaper this.follow( e, "none" ) $(".floatingSwatch").addClass("scissors") + this.$el.addClass("deleteArmed") } }, + destroy: function(_id, cb){ + $.ajax({ + type: "delete", + url: this.destroyAction, + data: { _id: _id, _csrf: $("[name=_csrf]").val() } + }).complete(cb || function(){}) + }, + contextmenu: function(e){ if (Scenery.nextWallpaper) { e.preventDefault() @@ -159,6 +177,7 @@ var WallpaperPicker = UploadView.extend({ app.off('cancel-wallpaper', _hideCursor) $floatingSwatch.removeClass("scissors").hide() $(".floodMessage").hide() + base.$el.removeClass("deleteArmed") } function _floodRoom (e) { if (e.keyCode == 13) { diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 3c380ef..a488ad9 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -1690,6 +1690,38 @@ border-left: 1px solid black; padding-bottom: 6px; } +.wallpaper.deleteArmed.active .swatches .swatch { + border: 1px solid #FF3B30; +} +.desktop .wallpaper.deleteArmed .swatch:hover { + background-color: #FF3B30; +} + +.wallpaper.deleteArmed .swatch:before { + content: "\f1eb"; + font-family: 'ionicons'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + -webkit-font-smoothing: antialiased; + font-size: 16px; + position: absolute; + background: #FF3B30; + border-radius: 50%; + margin-top: -8px; + margin-left: -8px; + color: white; + width: 20px; + height: 20px; + line-height: 16px; + text-align: center; + padding-top: 2px; +} + + + .vvbox .colors { max-width: 155px; margin-bottom: 5px; -- cgit v1.2.3-70-g09d2 From 0c4fe82f014e41069fe96b20ee964068bccab49c Mon Sep 17 00:00:00 2001 From: ryderr Date: Mon, 1 Dec 2014 13:27:08 -0500 Subject: mobile stuff --- public/assets/stylesheets/app.css | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 5effc00..98d97ac 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -3126,16 +3126,18 @@ a[data-role="forgot-password"] { .reader iframe { display:none; } - #threesixty { - display:inline; - } + +} + +.mobile .btn.marg, .mobile #share_embed { + display:none; } @media screen and (orientation:portrait) { - .aboutRoom { + .mobile .aboutRoom { display:none; } - .mx-scene{ + .mobile .mx-scene{ display:none; } .mobile #scene:after{ @@ -3143,15 +3145,15 @@ a[data-role="forgot-password"] { z-index: 3; position: fixed; display: inline-block; - width: 300px; - top: 55px; - left: 6px; + width: 100%; + top: 75px; + left: 0; font-size: 27px; font-weight: 300; line-height: 50px; border-top: 1px solid; border-bottom: 1px solid; - padding: 20px 0; + padding: 20px 7px; } } @@ -3163,16 +3165,21 @@ a[data-role="forgot-password"] { .projectList .projectItem { width: 55%; } + #threesixty { + display:inline; + } } +@media screen and (orientation:landscape) { + .mobile #threesixty { + display:inline; + } +} @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (-webkit-min-device-pixel-ratio: 1) { .hero{ height: 500pt; } - #threesixty { - display:inline; - } #keyhint { display:none; } @@ -3186,9 +3193,6 @@ a[data-role="forgot-password"] { .hero{ height: 500pt; } - #threesixty { - display:inline; - } #keyhint { display:none; } -- cgit v1.2.3-70-g09d2 From 15058f6c83da00b54f676b9fafbb758ddef0be84 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 13:46:57 -0500 Subject: undo random scenery placement --- .../rectangles/engine/scenery/_scenery.js | 3 +++ .../rectangles/engine/scenery/randomize.js | 18 ++++++++++--- .../javascripts/rectangles/engine/scenery/undo.js | 30 +++++++++++++++++++++- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/public/assets/javascripts/rectangles/engine/scenery/_scenery.js b/public/assets/javascripts/rectangles/engine/scenery/_scenery.js index d03e0e1..d52fe21 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/_scenery.js +++ b/public/assets/javascripts/rectangles/engine/scenery/_scenery.js @@ -99,6 +99,7 @@ var Scenery = new function(){ } base.deserialize = function(scenery_data){ + var added = [] scenery_data.forEach(function(data){ var wall = Walls.lookup[data.wall_id] || Walls.first() var scene_media = base.add({ @@ -107,7 +108,9 @@ var Scenery = new function(){ media: data.media, id: data.id }) + added.push(scene_media) }) + return added } return base diff --git a/public/assets/javascripts/rectangles/engine/scenery/randomize.js b/public/assets/javascripts/rectangles/engine/scenery/randomize.js index 1c2eb56..6581f38 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/randomize.js +++ b/public/assets/javascripts/rectangles/engine/scenery/randomize.js @@ -33,7 +33,7 @@ Scenery.randomize.get_dimensions = function (media_objs){ // Returns a lookup of walls to use, keyed by wall ID. Scenery.randomize.get_empty_walls = function(wall_list){ // get a list of all walls - var walls = {}; + var walls = {}, removed = []; (wall_list || Walls.list).forEach(function(wall){ walls[wall.id] = wall @@ -44,6 +44,7 @@ Scenery.randomize.get_empty_walls = function(wall_list){ Scenery.forEach(function(scenery){ if (scenery.was_randomly_placed) { // remove it and reuse this wall? + removed.push( scenery.serialize() ) Scenery.remove( scenery.id ) } else { @@ -52,7 +53,7 @@ Scenery.randomize.get_empty_walls = function(wall_list){ }) } - return walls + return { walls: walls, removed: removed } } // Randomly place a set of media objects on empty walls. @@ -60,7 +61,10 @@ Scenery.randomize.get_empty_walls = function(wall_list){ // Optionally takes a list of walls to use. Scenery.randomize.add = function (media_objs, wall_list) { var media_list = Scenery.randomize.get_dimensions(media_objs) - var walls = Scenery.randomize.get_empty_walls(wall_list) + var empty_data = Scenery.randomize.get_empty_walls(wall_list) + var walls = empty_data.walls + var removed = empty_data.removed + var added = [] var wall_ids = _.keys(walls) if (! wall_ids.length) { return } @@ -93,6 +97,7 @@ Scenery.randomize.add = function (media_objs, wall_list) { index: 0, }) scenery.was_randomly_placed = true + added.push(scenery.serialize()) } else { // artwork won't fit anywhere?? @@ -100,4 +105,11 @@ Scenery.randomize.add = function (media_objs, wall_list) { return false }) + + UndoStack.push({ + type: "randomize-scenery", + undo: { added: added, removed: removed }, + redo: { added: added, removed: removed }, + }) + } \ No newline at end of file diff --git a/public/assets/javascripts/rectangles/engine/scenery/undo.js b/public/assets/javascripts/rectangles/engine/scenery/undo.js index 8b85d02..1232780 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/undo.js +++ b/public/assets/javascripts/rectangles/engine/scenery/undo.js @@ -121,7 +121,7 @@ }) }, }, - + // { @@ -166,6 +166,34 @@ Minotaur.watch( app.router.editorView.settings ) }, }, + { + type: "randomize-scenery", + undo: function(state){ + state.added.forEach(function(_scenery){ + Scenery.remove(_scenery.id) + }) + var scenery_list = Scenery.deserialize(state.removed) + scenery_list.forEach(function(scenery){ + scenery.was_randomly_placed = true + }) + Scenery.resize.hide() + + // TODO: watch individual scenery object here + Minotaur.watch( app.router.editorView.settings ) + }, + redo: function(state){ + state.removed.forEach(function(_scenery){ + Scenery.remove(_scenery.id) + }) + var scenery_list = Scenery.deserialize(state.added) + scenery_list.forEach(function(scenery){ + scenery.was_randomly_placed = true + }) + + // TODO: watch individual scenery object here + Minotaur.watch( app.router.editorView.settings ) + }, + }, ]) })() -- cgit v1.2.3-70-g09d2 From 87ce2f24887f20cf34165f92b43bbfd33435f30a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 13:59:42 -0500 Subject: hiding floor/ceiling in ff --- public/assets/javascripts/rectangles/engine/rooms/builder.js | 6 ++++++ public/assets/javascripts/ui/editor/ColorControl.js | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/public/assets/javascripts/rectangles/engine/rooms/builder.js b/public/assets/javascripts/rectangles/engine/rooms/builder.js index c95734b..5e09fab 100644 --- a/public/assets/javascripts/rectangles/engine/rooms/builder.js +++ b/public/assets/javascripts/rectangles/engine/rooms/builder.js @@ -261,6 +261,9 @@ el.rotationX = PI/2 el.rect = region el.side = FLOOR + if ($.browser.mozilla) { + el.el.style.display = "none" + } return el } this.make_ceiling = function (room, region) { @@ -277,6 +280,9 @@ el.rotationX = -PI/2 el.rect = region el.side = CEILING + if ($.browser.mozilla) { + el.el.style.display = "none" + } return el } this.make_wall = function (klass) { diff --git a/public/assets/javascripts/ui/editor/ColorControl.js b/public/assets/javascripts/ui/editor/ColorControl.js index 9ab2623..54a6a2e 100644 --- a/public/assets/javascripts/ui/editor/ColorControl.js +++ b/public/assets/javascripts/ui/editor/ColorControl.js @@ -47,7 +47,12 @@ var ColorControl = View.extend({ $swatch.css("background-color","rgb(" + color + ")") $swatch.data('color', color) this.$colors.append($swatch) - }.bind(this)) + }.bind(this)) + + if ($.browser.mozilla) { + $("#floor-color").parent().hide() + $("#ceiling-color").parent().hide() + } }, modes: [ "wall", "outline", "floor", "ceiling" ], -- cgit v1.2.3-70-g09d2 From 42144451294184225ceccbfe0ac9459c1c6cb1a9 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 14:35:02 -0500 Subject: nix trending --- public/assets/javascripts/ui/editor/MediaViewer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/assets/javascripts/ui/editor/MediaViewer.js b/public/assets/javascripts/ui/editor/MediaViewer.js index 029252d..94a9d90 100644 --- a/public/assets/javascripts/ui/editor/MediaViewer.js +++ b/public/assets/javascripts/ui/editor/MediaViewer.js @@ -69,7 +69,7 @@ var MediaViewer = ModalView.extend({ show: function(){ if (! this.loaded) { this.load() - this.loadTrending() + // this.loadTrending() } else { this.parent.cursor.message("media") @@ -87,7 +87,8 @@ var MediaViewer = ModalView.extend({ load: function(){ $.get("/api/media/user", { offset: this.offset, limit: this.perPage }, this.populate.bind(this)) }, - + +/* loadTrending: function(){ var trending_imagery = [ 'https://d1ycxz9plii3tb.cloudfront.net/post_images/52ec0e20c9dc24f1d8000067/large.jpg', @@ -121,6 +122,7 @@ var MediaViewer = ModalView.extend({ if (img.complete && ! loaded) { img.onload() } }.bind(this)) }, +*/ randomize: function(){ var $divs = this.$(".active .container").find(".mediaContainer").toArray() -- cgit v1.2.3-70-g09d2 From 64f99d71c9ff0d419fad080751ba02afe9f6f3df Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 16:27:39 -0500 Subject: move tumblr load stuff into own modal; example tumblrs --- Gruntfile.js | 1 + .../assets/javascripts/ui/editor/EditorToolbar.js | 1 - public/assets/javascripts/ui/editor/EditorView.js | 1 + public/assets/javascripts/ui/editor/MediaTumblr.js | 53 ++++++++++++++++++++++ public/assets/javascripts/ui/editor/MediaUpload.js | 2 +- public/assets/javascripts/ui/editor/MediaViewer.js | 40 ++++++++-------- public/assets/javascripts/ui/lib/ModalView.js | 6 +-- public/assets/stylesheets/app.css | 11 ++++- views/controls/editor/media-drawer.ejs | 15 +++++- views/partials/scripts.ejs | 1 + 10 files changed, 104 insertions(+), 27 deletions(-) create mode 100644 public/assets/javascripts/ui/editor/MediaTumblr.js diff --git a/Gruntfile.js b/Gruntfile.js index 68828e0..21bbfb0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -117,6 +117,7 @@ module.exports = function(grunt) { "public/assets/javascripts/ui/editor/ColorControl.js", "public/assets/javascripts/ui/editor/Collaborators.js", "public/assets/javascripts/ui/editor/MediaEditor.js", + "public/assets/javascripts/ui/editor/MediaTumblr.js", "public/assets/javascripts/ui/editor/MediaUpload.js", "public/assets/javascripts/ui/editor/MediaViewer.js", "public/assets/javascripts/ui/editor/Presets.js", diff --git a/public/assets/javascripts/ui/editor/EditorToolbar.js b/public/assets/javascripts/ui/editor/EditorToolbar.js index 277718a..a5ad2dd 100644 --- a/public/assets/javascripts/ui/editor/EditorToolbar.js +++ b/public/assets/javascripts/ui/editor/EditorToolbar.js @@ -59,7 +59,6 @@ var EditorToolbar = View.extend({ this.resetControls() this.toggleMap(false) this.parent.mediaViewer.show() - this.parent.mediaUpload.show() }, resetMode: function(){ diff --git a/public/assets/javascripts/ui/editor/EditorView.js b/public/assets/javascripts/ui/editor/EditorView.js index 4a2f712..50d3650 100644 --- a/public/assets/javascripts/ui/editor/EditorView.js +++ b/public/assets/javascripts/ui/editor/EditorView.js @@ -15,6 +15,7 @@ var EditorView = View.extend({ this.info = new BuilderInfo ({ parent: this }) this.mediaViewer = new MediaViewer ({ parent: this }) this.mediaUpload = new MediaUpload ({ parent: this }) + this.mediaTumblr = new MediaTumblr ({ parent: this }) this.mediaEditor = new MediaEditor ({ parent: this }) this.wallpaperPicker = new WallpaperPicker ({ parent: this }) this.colorControl = new ColorControl ({ parent: this }) diff --git a/public/assets/javascripts/ui/editor/MediaTumblr.js b/public/assets/javascripts/ui/editor/MediaTumblr.js new file mode 100644 index 0000000..47419ae --- /dev/null +++ b/public/assets/javascripts/ui/editor/MediaTumblr.js @@ -0,0 +1,53 @@ + +var MediaTumblr = ModalView.extend({ + el: "#tumblrUpload", + + events: { + 'mousedown': "stopPropagation", + "keydown .url": "enterSubmit", + "click .exampleTumblr": "loadExample", + }, + + initialize: function(opt){ + this.__super__.initialize.call(this) + this.parent = opt.parent + this.$url = this.$(".url") + }, + + show: function(){ + this.$el.addClass("active") + this.$url.val("") + }, + + hide: function(){ + this.$el.removeClass("active") + }, + + enterSubmit: function(e){ + e.stopPropagation() + if (e.keyCode == 13) { + e.preventDefault() + var url = this.$tumblrUrl.val() + this.loadTumblr(url) + } + }, + + loadTumblr: function(url){ + Parser.tumblr(url, function(media_list){ + console.log(media_list) + this.parent.mediaViewer.$foundMediaContainer.empty() + media_list.reverse().forEach(function(media){ + this.parent.mediaViewer.add(media, this.parent.mediaViewer.$foundMediaContainer) + }.bind(this)) + }.bind(this)) + }, + + loadExample: function(e){ + e.preventDefault() + var name = $(e.currentTarget).html() + var url = "http://" + name + ".tumblr.com/" + this.$url.val(url) + this.loadTumblr(url) + }, + +}) \ No newline at end of file diff --git a/public/assets/javascripts/ui/editor/MediaUpload.js b/public/assets/javascripts/ui/editor/MediaUpload.js index 9ae90e3..d09e38c 100644 --- a/public/assets/javascripts/ui/editor/MediaUpload.js +++ b/public/assets/javascripts/ui/editor/MediaUpload.js @@ -1,6 +1,6 @@ var MediaUpload = UploadView.extend({ - el: ".fileUpload", + el: "#fileUpload", createAction: "/api/media/new", uploadAction: "/api/media/upload", diff --git a/public/assets/javascripts/ui/editor/MediaViewer.js b/public/assets/javascripts/ui/editor/MediaViewer.js index 94a9d90..2ae5104 100644 --- a/public/assets/javascripts/ui/editor/MediaViewer.js +++ b/public/assets/javascripts/ui/editor/MediaViewer.js @@ -38,11 +38,11 @@ var MediaViewer = ModalView.extend({ this.$deleteMedia = this.$("#deleteMedia") this.$viewMore = this.$(".viewMore") this.$noMedia = this.$(".noMedia") - - this.$tumblrUrl = this.$("#tumblr-url") }, + mode: "user", wallpaperToggle: function(){ + this.mode = "wallpaper" this.$wallpaperMedia.addClass("active") this.$foundMedia.addClass("inactive") this.$myMedia.addClass("inactive").removeClass('active') @@ -51,19 +51,25 @@ var MediaViewer = ModalView.extend({ }, foundToggle: function(){ + this.mode = "found" this.$wallpaperMedia.removeClass("active") this.$foundMedia.addClass("active") this.$myMedia.addClass("inactive").removeClass('active') this.$("a").removeClass("active") this.$foundToggle.addClass("active") + this.parent.mediaUpload.hide() + this.parent.mediaTumblr.show() }, userToggle: function(){ + this.mode = "user" this.$wallpaperMedia.removeClass("active") this.$foundMedia.removeClass("active") this.$myMedia.removeClass("inactive").addClass('active') this.$("a").removeClass("active") this.$userToggle.addClass("active") + this.parent.mediaUpload.show() + this.parent.mediaTumblr.hide() }, show: function(){ @@ -72,8 +78,7 @@ var MediaViewer = ModalView.extend({ // this.loadTrending() } else { - this.parent.cursor.message("media") - this.__super__.show.call(this) + this.reallyShow() } }, @@ -81,8 +86,20 @@ var MediaViewer = ModalView.extend({ this.__super__.hide.call(this) this.deleteArmed(false) this.parent.mediaUpload.hide() + this.parent.mediaTumblr.hide() this.parent.cursor.message('start') }, + + reallyShow: function(){ + this.__super__.show.call(this) + if (this.mode == "user") { + this.userToggle() + } + else { + this.foundToggle() + } + this.parent.cursor.message("media") + }, load: function(){ $.get("/api/media/user", { offset: this.offset, limit: this.perPage }, this.populate.bind(this)) @@ -159,8 +176,7 @@ var MediaViewer = ModalView.extend({ } else { this.loaded = true - this.parent.cursor.message("media") - this.__super__.show.call(this) + this.reallyShow() } }, @@ -296,16 +312,4 @@ var MediaViewer = ModalView.extend({ _followCursor(e) }, - enterTumblrUrl: function(e){ - e.stopPropagation() - if (e.keyCode !== 13) { return } - var url = this.$tumblrUrl.val() - Parser.tumblr(url, function(media_list){ - console.log(media_list) - this.$foundMediaContainer.empty() - media_list.reverse().forEach(function(media){ - this.add(media, this.$foundMediaContainer) - }.bind(this)) - }.bind(this)) - }, }) diff --git a/public/assets/javascripts/ui/lib/ModalView.js b/public/assets/javascripts/ui/lib/ModalView.js index f70fbb3..6f1c729 100644 --- a/public/assets/javascripts/ui/lib/ModalView.js +++ b/public/assets/javascripts/ui/lib/ModalView.js @@ -14,10 +14,8 @@ var ModalView = View.extend({ show: function(){ $(".mediaDrawer").removeClass("active") - - if (! this.usesFileUpload) { - $(".fileUpload").removeClass("active") - } + $(".fileUpload").removeClass("active") + if (this.fixedClose) { $("#fixed_close").addClass("active") $("#fixed_close").bind("click", this.hide.bind(this)) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 5d69d75..07d1bbb 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -1720,7 +1720,16 @@ border-left: 1px solid black; padding-top: 2px; } - +.exampleTumblrs { + display: block; + margin-top: 10px; + font-weight: 300; + font-size: 0.8em; +} +.exampleTumblrs a { + border-bottom: 1px dotted; + margin-left: 5px; +} .vvbox .colors { max-width: 155px; diff --git a/views/controls/editor/media-drawer.ejs b/views/controls/editor/media-drawer.ejs index 3db71d5..f9bce61 100644 --- a/views/controls/editor/media-drawer.ejs +++ b/views/controls/editor/media-drawer.ejs @@ -23,7 +23,6 @@
-
@@ -33,7 +32,7 @@ - +

@@ -43,3 +42,15 @@ ~ or ~
+ + + + +
+ + or try one of these: + risingtensions + fixoid + nopattern + +
diff --git a/views/partials/scripts.ejs b/views/partials/scripts.ejs index 61659f7..fc94992 100644 --- a/views/partials/scripts.ejs +++ b/views/partials/scripts.ejs @@ -113,6 +113,7 @@ + -- cgit v1.2.3-70-g09d2 From b4de393c30ab2540ce8961b394be1915729d8df6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 16:30:27 -0500 Subject: about.ejs --- server/lib/views/index.js | 6 +++++- views/about/about.ejs | 27 +++++++++++++++++++++++++++ views/partials/footer.ejs | 3 ++- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 views/about/about.ejs diff --git a/server/lib/views/index.js b/server/lib/views/index.js index 145b5ac..6ceef7e 100644 --- a/server/lib/views/index.js +++ b/server/lib/views/index.js @@ -111,12 +111,16 @@ var views = module.exports = { }, docs: function (req, res){ - var name = req.params.name || "howto" + var name = req.params.name || "about" if (name == "howto") { res.render('about/' + name) return } + if (name == "about" || name == "index") { + res.render('about/' + name) + return + } if (name === "new") { res.render('docs', { diff --git a/views/about/about.ejs b/views/about/about.ejs new file mode 100644 index 0000000..e600a3d --- /dev/null +++ b/views/about/about.ejs @@ -0,0 +1,27 @@ + + + + vvalls + [[ include ../partials/meta ]] + + +
+ [[ include ../partials/header ]] + + +
+
+
+
+

About VValls

+ + + [[ include ../partials/confirm-modal ]] + [[ include ../projects/layouts-modal ]] + [[ include ../partials/sign-in ]] + [[ include ../partials/footer ]] + +
+ +[[ include ../partials/scripts ]] + diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs index 7b01162..e3c572f 100644 --- a/views/partials/footer.ejs +++ b/views/partials/footer.ejs @@ -13,7 +13,8 @@

- How To + About + How To Terms Privacy Contact -- cgit v1.2.3-70-g09d2 From f6fa8808adc4dc20a4decea4b2480cf0efa8d25f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 16:44:59 -0500 Subject: about section --- views/about/about.ejs | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/views/about/about.ejs b/views/about/about.ejs index e600a3d..f59fe14 100644 --- a/views/about/about.ejs +++ b/views/about/about.ejs @@ -5,7 +5,7 @@ [[ include ../partials/meta ]] -
+
[[ include ../partials/header ]] @@ -15,7 +15,37 @@

About VValls

+
+
+ VValls is a platform for creating and sharing immersive web based 3D exhibitions. With VValls users can draw floor plans, and then apply media to the surfaces of the virtual space. VValls is the ideal solution for anyone creating immersive presentations of content, curators looking to plan shows, and artists looking to visualize their work in 3D space. VValls is completely HTML5 based – mobile and desktop compatible. +

+ Contact us with inquiries at hello@vvalls.com.
+ We are based in New York City. +
+
+
+ + + +

Dot Dash 3

+ VValls was conceived and prototyped by Larisa Leventon, Ph.D., MBA, founder of Dot Dash 3 and an M.I.T. + Brown University-trained visualization algorithm specialist. +
+
+
+ +
+
+ + + +

OKFocus

+ VValls was developed and designed by OKFocus, a forward thinking NYC based creative agency. The technology was spearheaded by Jules LaPlace, CTO, and the design by Ryder Ripps, ECD. +
+
+
+
+ [[ include ../partials/confirm-modal ]] [[ include ../projects/layouts-modal ]] [[ include ../partials/sign-in ]] @@ -25,3 +55,17 @@ [[ include ../partials/scripts ]] + \ No newline at end of file -- cgit v1.2.3-70-g09d2 From f5bc4ca3b111a0be8ad0726b5b3d44936983f60a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 17:56:35 -0500 Subject: orient toward horizon if looking straight down --- public/assets/javascripts/mx/extensions/mx.movementsMobile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/assets/javascripts/mx/extensions/mx.movementsMobile.js b/public/assets/javascripts/mx/extensions/mx.movementsMobile.js index 8810649..95b61d1 100644 --- a/public/assets/javascripts/mx/extensions/mx.movementsMobile.js +++ b/public/assets/javascripts/mx/extensions/mx.movementsMobile.js @@ -163,7 +163,7 @@ MX.MobileMovements = function (cam) { dy += 360 } - destRotationX = MX.toRad(dx) + destRotationX = dx > 45 ? 0 : MX.toRad(dx) destRotationY += MX.toRad(dy) }, -- cgit v1.2.3-70-g09d2 From c423e246d4e18ce65861e384bee6c147aff79ddb Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Dec 2014 19:05:33 -0500 Subject: IE/non css3d fallback --- public/assets/javascripts/app.js | 21 ++++++++++++++++----- public/assets/javascripts/ui/_router.js | 4 ++++ public/assets/stylesheets/app.css | 11 +++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/public/assets/javascripts/app.js b/public/assets/javascripts/app.js index 01a2e54..41edafe 100644 --- a/public/assets/javascripts/app.js +++ b/public/assets/javascripts/app.js @@ -1,12 +1,9 @@ if (is_mobile) { - $("html").addClass("mobile"); -} -else if ($.browser.msie || ! has3d()) { - $("html").addClass("fallback"); + $("html").addClass("mobile") } else { - $("html").addClass("desktop"); + $("html").addClass("desktop") } @@ -22,6 +19,8 @@ app.init = function () { } app.launch = function () { + if ($.browser.msie || ! has3d()) { return app.fallback() } + var movements scene = new MX.Scene().addTo('#scene') @@ -74,6 +73,18 @@ app.launch = function () { window.scrollTo(0,0) } +app.fallback = function(){ + app.unsupported = true + var msg = "Sorry, your browser is not supported.

" + + "Please use Chrome or Safari or Firefox." + var $fallback = $("
") + $fallback.attr('id', 'fallback') + $fallback.html(msg) + $('body').append($fallback) + $("#keyhint").hide() + $("#editorView").hide() +} + app.on = function(){ app.tube.on.apply(app.tube, arguments) } diff --git a/public/assets/javascripts/ui/_router.js b/public/assets/javascripts/ui/_router.js index 4219a28..3532428 100644 --- a/public/assets/javascripts/ui/_router.js +++ b/public/assets/javascripts/ui/_router.js @@ -89,6 +89,7 @@ var SiteRouter = Router.extend({ layoutEditor: function(e, name){ app.mode.builder = true app.launch() + if (app.unsupported) return this.builderView = app.controller = new BuilderView() this.builderView.load(name) @@ -117,6 +118,7 @@ var SiteRouter = Router.extend({ app.mode.editor = true app.launch() + if (app.unsupported) return layout = slugify(layout) @@ -137,6 +139,7 @@ var SiteRouter = Router.extend({ projectEditor: function(e, name){ app.mode.editor = true app.launch() + if (app.unsupported) return this.editorView = app.controller = new EditorView() this.editorView.load(name) @@ -145,6 +148,7 @@ var SiteRouter = Router.extend({ projectViewer: function(e, name){ app.mode.editor = true app.launch() + if (app.unsupported) return this.readerView = app.controller = new ReaderView() this.readerView.load(name) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 07d1bbb..aecd6be 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -1150,6 +1150,17 @@ border-left: 1px solid black; .desktop .logo:hover svg { fill:white; } + +#fallback { + width: 400px; + margin: 10% auto; + border: 2px solid black; + padding: 30px 20px 30px 20px; +} +#fallback a { + border-bottom: 1px solid; +} + .profile{ padding:8px; float:right; -- cgit v1.2.3-70-g09d2