From 79377c1a06e986abb9146f4a9b41e4d266dc8dfc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 24 Oct 2014 16:46:36 -0400 Subject: hit enter to flood message --- public/assets/javascripts/ui/editor/WallpaperPicker.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'public/assets/javascripts/ui') diff --git a/public/assets/javascripts/ui/editor/WallpaperPicker.js b/public/assets/javascripts/ui/editor/WallpaperPicker.js index 6e0d5c6..3b6168e 100644 --- a/public/assets/javascripts/ui/editor/WallpaperPicker.js +++ b/public/assets/javascripts/ui/editor/WallpaperPicker.js @@ -7,6 +7,7 @@ var WallpaperPicker = UploadView.extend({ uploadAction: "/api/media/upload", events: { + "contextmenu": 'cancel', "mousedown": 'stopPropagation', "click .swatch": 'pick', "click .wallpaperRemove": 'remove', @@ -120,6 +121,14 @@ var WallpaperPicker = UploadView.extend({ $(".floatingSwatch").addClass("scissors") } }, + + cancel: function(e){ + if (Scenery.nextWallpaper) { + e.preventDefault() + Scenery.nextWallpaper = null + app.tube('cancel-wallpaper') + } + }, follow: function(e, wallpaper, icon){ icon = icon || wallpaper -- cgit v1.2.3-70-g09d2