diff options
| author | ryderr <r@okfoc.us> | 2014-10-29 13:24:11 -0400 |
|---|---|---|
| committer | ryderr <r@okfoc.us> | 2014-10-29 13:24:11 -0400 |
| commit | 4e159d6b08512cd9a2370763ef296bd0111baf7f (patch) | |
| tree | 447ad864e73e089dbad1076c51b75e2db3108ba9 | |
| parent | 2e863090cda5d6f0d9d96e5be8a7284fa57ec69f (diff) | |
| parent | e92acfd9a8b7b60544c8b85ad856273c732a1935 (diff) | |
Merge branch 'master' of github.com:okfocus/vvalls
| -rw-r--r-- | public/assets/javascripts/ui/_router.js | 1 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/editor/ColorControl.js | 1 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/editor/HelpCursor.js | 6 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/editor/Presets.js | 9 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/editor/WallpaperPicker.js | 5 | ||||
| -rwxr-xr-x | public/assets/stylesheets/app.css | 4 | ||||
| -rw-r--r-- | server/index.js | 1 | ||||
| -rw-r--r-- | server/lib/views/index.js | 8 |
8 files changed, 27 insertions, 8 deletions
diff --git a/public/assets/javascripts/ui/_router.js b/public/assets/javascripts/ui/_router.js index bda0960..c7b625a 100644 --- a/public/assets/javascripts/ui/_router.js +++ b/public/assets/javascripts/ui/_router.js @@ -46,6 +46,7 @@ var SiteRouter = Router.extend({ mobileRoutes: { "/": 'home', + "/home": 'home', "/profile": 'profile', "/project/:name": 'projectViewer', }, diff --git a/public/assets/javascripts/ui/editor/ColorControl.js b/public/assets/javascripts/ui/editor/ColorControl.js index 459ac1e..72e9fb1 100644 --- a/public/assets/javascripts/ui/editor/ColorControl.js +++ b/public/assets/javascripts/ui/editor/ColorControl.js @@ -92,6 +92,7 @@ var ColorControl = View.extend({ this.setSwatchColor(this.mode, rgb) // console.log(rgb) Walls.setColor[ this.mode ](rgb) + this.parent.presets.modified = true }, setSwatchColor: function(mode, rgb) { diff --git a/public/assets/javascripts/ui/editor/HelpCursor.js b/public/assets/javascripts/ui/editor/HelpCursor.js index 2752a5f..8ada237 100644 --- a/public/assets/javascripts/ui/editor/HelpCursor.js +++ b/public/assets/javascripts/ui/editor/HelpCursor.js @@ -16,7 +16,9 @@ var HelpCursor = View.extend({ }, initialize: function(){ - $('#help-button').click(this.toggle.bind(this)) + this.helpButton = $('#help-button') + + this.helpButton.click(this.toggle.bind(this)) }, toggle: function(){ @@ -27,6 +29,7 @@ var HelpCursor = View.extend({ if (this.active) return this.active = true this.message('start') + this.helpButton.addClass('active') this.$el.show() this.move({ pageX: -1000, pageY: -10000 }) this.moveFn = this.move.bind(this) @@ -36,6 +39,7 @@ var HelpCursor = View.extend({ stop: function(){ this.active = false this.$el.hide() + this.helpButton.removeClass('active') document.removeEventListener("mousemove", this.moveFn) }, diff --git a/public/assets/javascripts/ui/editor/Presets.js b/public/assets/javascripts/ui/editor/Presets.js index d233144..ac77d6b 100644 --- a/public/assets/javascripts/ui/editor/Presets.js +++ b/public/assets/javascripts/ui/editor/Presets.js @@ -34,7 +34,7 @@ var Presets = View.extend({ ceiling: [0,0,0], }, matrix: { - wall: { src: "http://dump.fm/images/20130225/1361818675427-dumpfm-melipone-matrixremixtransfast.gif", scale: 4.0, color: [0,0,0] }, + wall: { src: "http://dumpfm.s3.amazonaws.com/images/20130225/1361818675427-dumpfm-melipone-matrixremixtransfast.gif", scale: 4.0, color: [0,0,0] }, outline: [0,0,0], floor: [10,15,10], ceiling: [0,0,0], @@ -53,9 +53,13 @@ var Presets = View.extend({ }.bind(this)) }, + modified: false, toggle: function(state){ this.$el.toggleClass("active", state) this.parent.cursor.message(state ? "presets" : "start") + if (this.modified) { + this.$(".active").removeClass('active') + } }, show: function(){ @@ -72,6 +76,7 @@ var Presets = View.extend({ this.$(".active").removeClass('active') $(e.currentTarget).addClass('active') this.load(this.presets[preset]) + this.modified = false }, selectColor: function(e){ @@ -79,7 +84,6 @@ var Presets = View.extend({ console.log(preset) }, - lastPreset: {wall:[1],outline:[1],floor:[1],ceiling:[1]}, load: function(preset){ this.parent.colorControl.modes.forEach(function(mode){ var color @@ -96,7 +100,6 @@ var Presets = View.extend({ }.bind(this)) this.parent.colorControl.setMode(preset.wall.color ? "wall" : "floor") Walls.setBodyColor() - this.lastPreset = preset }, })
\ No newline at end of file diff --git a/public/assets/javascripts/ui/editor/WallpaperPicker.js b/public/assets/javascripts/ui/editor/WallpaperPicker.js index 2d60f11..c383489 100644 --- a/public/assets/javascripts/ui/editor/WallpaperPicker.js +++ b/public/assets/javascripts/ui/editor/WallpaperPicker.js @@ -21,7 +21,6 @@ var WallpaperPicker = UploadView.extend({ this.__super__.initialize.call(this) this.$swatches = this.$(".swatches") this.$remove = this.$(".wallpaperRemove") - this.$remove.hide() this.$url = this.$(".url") @@ -55,7 +54,7 @@ var WallpaperPicker = UploadView.extend({ // toggle the class that makes the cursor a paintbucket // $("body").removeClass("pastePaper") }, - + load: function(){ $.get("/api/media/user", { tag: this.mediaTag }, this.populate.bind(this)) }, @@ -108,7 +107,7 @@ var WallpaperPicker = UploadView.extend({ app.tube('cancel-wallpaper') var $swatch = $(e.currentTarget) this.follow( e, $swatch.css('background-image') ) - this.$remove.show() + this.parent.presets.modified = true }, remove: function(e){ diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index bc52d5a..d7876da 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -153,10 +153,12 @@ a{ font-size: 24px; padding: 18px 27px 0 8px; } -.topLinks a.ion-help-circled:hover { +.topLinks a.ion-help-circled.active, +.topLinks a.ion-help-circled:hover { background:transparent; color:red; } + .page #header { background: white; border-bottom: 1px solid; diff --git a/server/index.js b/server/index.js index 8f66418..90b724c 100644 --- a/server/index.js +++ b/server/index.js @@ -79,6 +79,7 @@ site.setup = function(){ site.route = function () { app.get('/', views.home); + app.get('/home', views.demoHome); app.get('/login', views.modal); app.get('/logout', auth.logout); app.get('/signup', views.modal); diff --git a/server/lib/views/index.js b/server/lib/views/index.js index eacff1f..5768ace 100644 --- a/server/lib/views/index.js +++ b/server/lib/views/index.js @@ -90,6 +90,14 @@ var views = module.exports = { }) }, + demoHome: function (req, res) { + views_middleware.fetchProjects({ featured: true }, null, null, function(err, projects){ + res.render('home', { + projects: projects || [] + }) + }) + }, + docs: function (req, res){ var name = req.params.name || "index" |
