From b4fd7ddd7cf6fb2a68613bc0257a650055360ea7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 9 Jun 2014 17:41:00 -0400 Subject: environment working again --- public/assets/javascripts/app.js | 2 + .../assets/javascripts/rectangles/engine/map/ui.js | 2 - public/assets/javascripts/ui/DocumentModal.js | 1 - public/assets/javascripts/ui/Router.js | 15 ++-- public/assets/stylesheets/app.css | 32 ++++++++ server/index.js | 6 +- server/lib/views.js | 9 ++ views/app.ejs | 29 ------- views/builder.ejs | 43 ++++++++++ views/controls/builder/toolbar.ejs | 9 ++ views/controls/editor/light-control.ejs | 18 ++++ views/controls/editor/media-drawer.ejs | 96 ++++++++++++++++++++++ views/controls/editor/settings.ejs | 40 +++++++++ views/controls/editor/signed-out.ejs | 14 ++++ views/controls/editor/toolbar.ejs | 9 ++ views/controls/editor/video-toolbar.ejs | 7 ++ views/controls/editor/wallpaper.ejs | 10 +++ views/controls/light-control.ejs | 18 ---- views/controls/media-drawer.ejs | 96 ---------------------- views/controls/settings.ejs | 40 --------- views/controls/signed-out.ejs | 14 ---- views/controls/toolbar.ejs | 9 -- views/controls/video-toolbar.ejs | 7 -- views/controls/wallpaper.ejs | 10 --- views/editor.ejs | 28 +++++++ views/partials/footer.ejs | 2 +- views/staff.ejs | 4 +- 27 files changed, 335 insertions(+), 235 deletions(-) delete mode 100755 views/app.ejs create mode 100644 views/builder.ejs create mode 100644 views/controls/builder/toolbar.ejs create mode 100644 views/controls/editor/light-control.ejs create mode 100644 views/controls/editor/media-drawer.ejs create mode 100644 views/controls/editor/settings.ejs create mode 100644 views/controls/editor/signed-out.ejs create mode 100644 views/controls/editor/toolbar.ejs create mode 100644 views/controls/editor/video-toolbar.ejs create mode 100644 views/controls/editor/wallpaper.ejs delete mode 100644 views/controls/light-control.ejs delete mode 100644 views/controls/media-drawer.ejs delete mode 100644 views/controls/settings.ejs delete mode 100644 views/controls/signed-out.ejs delete mode 100644 views/controls/toolbar.ejs delete mode 100644 views/controls/video-toolbar.ejs delete mode 100644 views/controls/wallpaper.ejs create mode 100755 views/editor.ejs diff --git a/public/assets/javascripts/app.js b/public/assets/javascripts/app.js index 310dc69..3c0fbe5 100644 --- a/public/assets/javascripts/app.js +++ b/public/assets/javascripts/app.js @@ -17,6 +17,8 @@ var viewHeight = window.viewHeight || 150 var app = new function(){} +app.mode = { editor: false, builder: false } + app.init = function () { app.tube = new Tube () app.router = new Router () diff --git a/public/assets/javascripts/rectangles/engine/map/ui.js b/public/assets/javascripts/rectangles/engine/map/ui.js index 2e40cad..6e9a5ab 100644 --- a/public/assets/javascripts/rectangles/engine/map/ui.js +++ b/public/assets/javascripts/rectangles/engine/map/ui.js @@ -2,8 +2,6 @@ map.ui = new function(){ var base = this - - if (! base.el) return base.creating = base.dragging = base.resizing = false diff --git a/public/assets/javascripts/ui/DocumentModal.js b/public/assets/javascripts/ui/DocumentModal.js index f821d07..d9901bd 100644 --- a/public/assets/javascripts/ui/DocumentModal.js +++ b/public/assets/javascripts/ui/DocumentModal.js @@ -1,5 +1,4 @@ - var DocumentModal = ModalFormView.extend({ el: ".mediaDrawer.editDocument", createAction: "/api/docs/new", diff --git a/public/assets/javascripts/ui/Router.js b/public/assets/javascripts/ui/Router.js index fea3698..a7aa566 100644 --- a/public/assets/javascripts/ui/Router.js +++ b/public/assets/javascripts/ui/Router.js @@ -19,7 +19,8 @@ var Router = View.extend({ "/profile/edit": 'editProfile', "/about/:name/edit": 'editDocument', "/about/new": 'newDocument', - "/app": 'launch', + "/editor": 'launchEditor', + "/builder": 'launchBuilder', }, initialize: function(){ @@ -33,13 +34,11 @@ var Router = View.extend({ this.originalPath = window.location.pathname var path = window.location.pathname.split("/") - console.log(path) + // console.log(path) for (var route in this.routes) { var routePath = route.split("/") if (routePath[1] == path[1]) { if (routePath[2] && routePath[2].indexOf(":") !== -1 && path[2] && (path[3] === routePath[3]) ) { - console.log("GOT :") - console.log(routePath) this[this.routes[route]](null, path[2]) break; } @@ -57,7 +56,13 @@ var Router = View.extend({ $("body").removeClass("loading") }, - launch: function(){ + launchBuilder: function(){ + app.mode.builder = true + app.launch() + }, + + launchEditor: function(){ + app.mode.editor = true app.launch() }, diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index e3f4de5..7335dc8 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -519,6 +519,38 @@ h5{ -ms-backface-visibility: visible; backface-visibility: visible; } +#hud { + position: absolute; + top:0;left:0; + z-index: 10; +} +.face { + background-color: #fff; + transition: 0.1s background-color ease; +} +.front { background-color: #fff; } +.back { background-color: #fff; } +.left { background-color: #fff; } +.right { background-color: #fff; } +.floor { background-color: #eee; } +.ceiling { background-color: rgba(230,230,255,0.3); } + +.active.floor { background-color: #ffe; } +.active.ceiling { background-color: rgba(230,230,255,0.3); } + +.dragging .mx-object3d.image { + pointer-events: none; +} + +.dot { + background:white; + border-radius:20px; + border: 1px solid black; +} + +.image { + background-size: 100% 100%; +} diff --git a/server/index.js b/server/index.js index f418c42..6a377c9 100644 --- a/server/index.js +++ b/server/index.js @@ -77,6 +77,7 @@ app.get('/auth/facebook', auth.login('facebook')); app.get('/auth/facebook/callback', auth.loggedIn('facebook')); app.get('/profile', views.profile) app.get('/profile/edit', views.profile) +app.get('/profile/:name', views.profile) app.get('/api/profile', middleware.ensureAuthenticated, api.profile.show) app.put('/api/profile', middleware.ensureAuthenticated, api.profile.update) @@ -90,8 +91,9 @@ app.get('/api/docs', middleware.ensureAuthenticated, middleware.ensureIsStaff, a app.post('/api/docs/new', middleware.ensureAuthenticated, middleware.ensureIsStaff, api.docs.create) app.post('/api/docs/edit', middleware.ensureAuthenticated, middleware.ensureIsStaff, api.docs.update) -app.get(/^\/([-_a-zA-Z0-9]+)\/?$/, views.profile) - +app.use('/builder', middleware.ensureAuthenticated) +app.get('/builder', views.builder) +app.get('/builder/:name', views.builder) /* auth.initSockets(io) diff --git a/server/lib/views.js b/server/lib/views.js index 94774cb..bb9e5ae 100644 --- a/server/lib/views.js +++ b/server/lib/views.js @@ -18,6 +18,15 @@ marked.setOptions({ var views = {} +views.editor = function (req, res) { + res.render('editor') +} + +views.builder = function (req, res) { + res.render('builder') +} + + views.modal = function (req, res) { res.render('modal', { }); diff --git a/views/app.ejs b/views/app.ejs deleted file mode 100755 index 4a10915..0000000 --- a/views/app.ejs +++ /dev/null @@ -1,29 +0,0 @@ - - - - vvalls - [[ include partials/meta ]] - - - -
- -
- - - - [[ include controls/toolbar ]] - [[ include controls/video-toolbar ]] - [[ include controls/media-drawer ]] - [[ include controls/wallpaper ]] - [[ include controls/light-control ]] - [[ include controls/settings ]] - -
- -
-
- - -[[ include partials/scripts ]] - diff --git a/views/builder.ejs b/views/builder.ejs new file mode 100644 index 0000000..50b2a5b --- /dev/null +++ b/views/builder.ejs @@ -0,0 +1,43 @@ + + + + vvalls + [[ include partials/meta ]] + + + +
+ +
+ [[ include partials/header ]] + [[ include controls/builder/toolbar ]] + + + +
+
+
+ +
+ +
+
+
+ +
+ + +[[ include partials/scripts ]] + diff --git a/views/controls/builder/toolbar.ejs b/views/controls/builder/toolbar.ejs new file mode 100644 index 0000000..1bf87eb --- /dev/null +++ b/views/controls/builder/toolbar.ejs @@ -0,0 +1,9 @@ + diff --git a/views/controls/editor/light-control.ejs b/views/controls/editor/light-control.ejs new file mode 100644 index 0000000..782c400 --- /dev/null +++ b/views/controls/editor/light-control.ejs @@ -0,0 +1,18 @@ +
+
+ +

Outline Hue

+
+
+ +

Wall Hue

+
+
+ +

Brightness

+
+
+ +

Shadow

+
+
\ No newline at end of file diff --git a/views/controls/editor/media-drawer.ejs b/views/controls/editor/media-drawer.ejs new file mode 100644 index 0000000..af9ea71 --- /dev/null +++ b/views/controls/editor/media-drawer.ejs @@ -0,0 +1,96 @@ + +
+
+ Upload File + +
+ ~ or ~
+ +
+ +
+
+ +
+ +
+

Your MediaFound Media


+

delete media

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/views/controls/editor/settings.ejs b/views/controls/editor/settings.ejs new file mode 100644 index 0000000..f92d1c7 --- /dev/null +++ b/views/controls/editor/settings.ejs @@ -0,0 +1,40 @@ +
+ + + +
+ +
+ +
+ +
+
+ +
+
+
+ + + + +
+
+
+ +
+
+ Clone + Clear + Delete +
+
\ No newline at end of file diff --git a/views/controls/editor/signed-out.ejs b/views/controls/editor/signed-out.ejs new file mode 100644 index 0000000..20e3715 --- /dev/null +++ b/views/controls/editor/signed-out.ejs @@ -0,0 +1,14 @@ +Sign Up +Sign In + +
+

Roomname, Ivan Sidorov

+

Last modified 3/12/14

+ Nulla vitae elit libero, a pharetra augue. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +
+ +
+

Share this on–

+ Facebook + Twitter +
diff --git a/views/controls/editor/toolbar.ejs b/views/controls/editor/toolbar.ejs new file mode 100644 index 0000000..1bf87eb --- /dev/null +++ b/views/controls/editor/toolbar.ejs @@ -0,0 +1,9 @@ + diff --git a/views/controls/editor/video-toolbar.ejs b/views/controls/editor/video-toolbar.ejs new file mode 100644 index 0000000..d4364a2 --- /dev/null +++ b/views/controls/editor/video-toolbar.ejs @@ -0,0 +1,7 @@ + diff --git a/views/controls/editor/wallpaper.ejs b/views/controls/editor/wallpaper.ejs new file mode 100644 index 0000000..82460b7 --- /dev/null +++ b/views/controls/editor/wallpaper.ejs @@ -0,0 +1,10 @@ +
+ + + + + + + + +
\ No newline at end of file diff --git a/views/controls/light-control.ejs b/views/controls/light-control.ejs deleted file mode 100644 index 782c400..0000000 --- a/views/controls/light-control.ejs +++ /dev/null @@ -1,18 +0,0 @@ -
-
- -

Outline Hue

-
-
- -

Wall Hue

-
-
- -

Brightness

-
-
- -

Shadow

-
-
\ No newline at end of file diff --git a/views/controls/media-drawer.ejs b/views/controls/media-drawer.ejs deleted file mode 100644 index af9ea71..0000000 --- a/views/controls/media-drawer.ejs +++ /dev/null @@ -1,96 +0,0 @@ - -
-
- Upload File - -
- ~ or ~
- -
- -
-
- -
- -
-

Your MediaFound Media


-

delete media

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
\ No newline at end of file diff --git a/views/controls/settings.ejs b/views/controls/settings.ejs deleted file mode 100644 index f92d1c7..0000000 --- a/views/controls/settings.ejs +++ /dev/null @@ -1,40 +0,0 @@ -
- - - -
- -
- -
- -
-
- -
-
-
- - - - -
-
-
- -
-
- Clone - Clear - Delete -
-
\ No newline at end of file diff --git a/views/controls/signed-out.ejs b/views/controls/signed-out.ejs deleted file mode 100644 index 20e3715..0000000 --- a/views/controls/signed-out.ejs +++ /dev/null @@ -1,14 +0,0 @@ -Sign Up -Sign In - -
-

Roomname, Ivan Sidorov

-

Last modified 3/12/14

- Nulla vitae elit libero, a pharetra augue. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -
- -
-

Share this on–

- Facebook - Twitter -
diff --git a/views/controls/toolbar.ejs b/views/controls/toolbar.ejs deleted file mode 100644 index 1bf87eb..0000000 --- a/views/controls/toolbar.ejs +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/views/controls/video-toolbar.ejs b/views/controls/video-toolbar.ejs deleted file mode 100644 index d4364a2..0000000 --- a/views/controls/video-toolbar.ejs +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/views/controls/wallpaper.ejs b/views/controls/wallpaper.ejs deleted file mode 100644 index 82460b7..0000000 --- a/views/controls/wallpaper.ejs +++ /dev/null @@ -1,10 +0,0 @@ -
- - - - - - - - -
\ No newline at end of file diff --git a/views/editor.ejs b/views/editor.ejs new file mode 100755 index 0000000..889200c --- /dev/null +++ b/views/editor.ejs @@ -0,0 +1,28 @@ + + + + vvalls + [[ include partials/meta ]] + + + +
+ +
+ [[ include partials/header ]] + + [[ include controls/editor/toolbar ]] + [[ include controls/editor/video-toolbar ]] + [[ include controls/editor/media-drawer ]] + [[ include controls/editor/wallpaper ]] + [[ include controls/editor/light-control ]] + [[ include controls/editor/settings ]] + +
+ +
+
+ + +[[ include partials/scripts ]] + diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs index 1df179a..703dab4 100644 --- a/views/partials/footer.ejs +++ b/views/partials/footer.ejs @@ -12,7 +12,7 @@ you are signed in as → - [[- user.displayName ]] + [[- user.displayName ]] Sign Out? [[ } ]] diff --git a/views/staff.ejs b/views/staff.ejs index f099edb..bc07bc2 100644 --- a/views/staff.ejs +++ b/views/staff.ejs @@ -8,7 +8,9 @@
[[ include partials/header ]] - [[ include staff/edit-docs ]] + - recent users + - rooms list + - projects list [[ include partials/footer ]]
-- cgit v1.2.3-70-g09d2