From 6d2cd31e73a3218c9b62f4062f7a6dd1bc97d2ec Mon Sep 17 00:00:00 2001
From: Maxwell Salzberg <maxwell@joindiaspora.com>
Date: Thu, 26 Apr 2012 15:00:55 -0700
Subject: [PATCH] disable framer button when you click it the first time.

---
 app/assets/javascripts/app/pages/framer.js     | 11 +++++++++--
 app/assets/stylesheets/new_styles/_base.scss   |  7 ++++---
 app/assets/templates/composer-controls.jst.hbs |  2 +-
 app/assets/templates/framer-controls.jst.hbs   |  6 ++++--
 4 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/app/assets/javascripts/app/pages/framer.js b/app/assets/javascripts/app/pages/framer.js
index 52afcfc57e..8247127b50 100644
--- a/app/assets/javascripts/app/pages/framer.js
+++ b/app/assets/javascripts/app/pages/framer.js
@@ -43,9 +43,16 @@ app.views.framerControls = app.views.Base.extend({
   },
 
   saveFrame : function(){
-    //how do we make this work for the not
+    this.$('button').prop('disabled', 'disabled')
+    // this is gross hack to make this action work in the iframe version and not iframe version.
+    var callback = {}
     var parentDoc = parent;
-    this.model.save({}, {success : function(){ parentDoc.closeIFrame() }})
+
+    if(parentDoc.location.pathname != '/framer'){
+      callback = {success : function(){ parentDoc.closeIFrame() }}
+    }
+
+    this.model.save({}, callback)
   }
 });
 
diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/new_styles/_base.scss
index e75d9d8660..b3c7788264 100644
--- a/app/assets/stylesheets/new_styles/_base.scss
+++ b/app/assets/stylesheets/new_styles/_base.scss
@@ -426,10 +426,11 @@ div[data-template=flow] {
 
   a.mood {
     @include border-radius();
-    margin-right: 20px;
-    padding: 5px;
+    margin-right: 11px;
+    padding: 7px;
     color: #999;
-    font-size: 20px;
+    font-size: 14px;
+    line-height: 2em;
 
     &#selected_mood {
       background-color: #222;
diff --git a/app/assets/templates/composer-controls.jst.hbs b/app/assets/templates/composer-controls.jst.hbs
index a7911c0fee..5efb7301d5 100644
--- a/app/assets/templates/composer-controls.jst.hbs
+++ b/app/assets/templates/composer-controls.jst.hbs
@@ -2,4 +2,4 @@
   <button class="done btn-primary next">Next</button>
   <div class="aspect-selector"/>
   <div class="service-selector"/>
-</div>
+</div>
\ No newline at end of file
diff --git a/app/assets/templates/framer-controls.jst.hbs b/app/assets/templates/framer-controls.jst.hbs
index f2178be791..638a06e8e9 100644
--- a/app/assets/templates/framer-controls.jst.hbs
+++ b/app/assets/templates/framer-controls.jst.hbs
@@ -1,2 +1,4 @@
-<button class="done btn-primary">done</button>
-<div class='template-picker'></div>
+<div id='controls-wrapper'>
+  <button class="done btn-primary">done</button>
+  <div class='template-picker'></div>
+</div>
\ No newline at end of file
-- 
GitLab