diff --git a/app/assets/javascripts/app/helpers/o_embed.js b/app/assets/javascripts/app/helpers/o_embed.js
new file mode 100644
index 000000000..ff370f1da
--- /dev/null
+++ b/app/assets/javascripts/app/helpers/o_embed.js
@@ -0,0 +1,14 @@
+(function(){
+ app.helpers.oEmbed = {
+ html : function (o_embed_cache) {
+ if (!o_embed_cache) { return "" }
+
+ var data = o_embed_cache.data;
+ if (data.type == "photo") {
+ return ''
+ } else {
+ return data.html || ""
+ }
+ }
+ }
+})();
\ No newline at end of file
diff --git a/app/assets/javascripts/app/models/post.js b/app/assets/javascripts/app/models/post.js
index 0f7b07aeb..6f13c4812 100644
--- a/app/assets/javascripts/app/models/post.js
+++ b/app/assets/javascripts/app/models/post.js
@@ -63,14 +63,5 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin,
"Night",
"Wallpaper",
"Newspaper"
- ],
-
- legacyTemplateNames : [
- "status-with-photo-backdrop",
- "note",
- "rich-media",
- "photo-backdrop",
- "activity-streams-photo",
- "status"
]
});
diff --git a/app/assets/javascripts/app/pages/framer.js b/app/assets/javascripts/app/pages/framer.js
index 7ffd73a7c..402c6552e 100644
--- a/app/assets/javascripts/app/pages/framer.js
+++ b/app/assets/javascripts/app/pages/framer.js
@@ -73,7 +73,7 @@ app.views.framerControls = app.views.Base.extend({
presenter : function() {
var selectedFrame = this.model.get("frame_name")
- , templates =_.union(app.models.Post.frameMoods, _.without(app.models.Post.legacyTemplateNames, ["status", "status-with-photo-backdrop", "photo-backdrop", "activity-streams-photo", "note"])) //subtract re-implemented templates
+ , templates = app.models.Post.frameMoods //subtract re-implemented templates
return _.extend(this.defaultPresenter(), {
templates :_.map(templates, function(template) {
return {
diff --git a/app/assets/javascripts/app/views/canvas_frame.js b/app/assets/javascripts/app/views/canvas_frame.js
index 99ca7d4ff..5f8ab9589 100644
--- a/app/assets/javascripts/app/views/canvas_frame.js
+++ b/app/assets/javascripts/app/views/canvas_frame.js
@@ -26,7 +26,6 @@ app.views.CanvasFrame = app.views.SmallFrame.extend({
},
presenter : function(){
- console.log(this.adjustedImageHeight())
return _.extend(this.smallFramePresenter(), {
adjustedImageHeight : this.adjustedImageHeight()
})
diff --git a/app/assets/javascripts/app/views/content_view.js b/app/assets/javascripts/app/views/content_view.js
index 03281358b..68c94fbbd 100644
--- a/app/assets/javascripts/app/views/content_view.js
+++ b/app/assets/javascripts/app/views/content_view.js
@@ -84,26 +84,14 @@ app.views.OEmbed = app.views.Base.extend({
presenter:function () {
return _.extend(this.defaultPresenter(), {
- o_embed_html:this.embedHTML()
+ o_embed_html : app.helpers.oEmbed.html(this.model.get("o_embed_cache"))
})
},
- embedHTML:function () {
- if (!this.model.get("o_embed_cache")) {
- return "";
- }
- var data = this.model.get("o_embed_cache").data;
- if (data.type == "photo") {
- return '
';
- } else {
- return data.html || ""
- }
- },
-
- showOembedContent:function () {
- var insertHTML = $(this.embedHTML());
+ showOembedContent : function () {
+ var insertHTML = $(app.helpers.oEmbed.html(this.model.get("o_embed_cache")));
var paramSeparator = ( /\?/.test(insertHTML.attr("src")) ) ? "&" : "?";
insertHTML.attr("src", insertHTML.attr("src") + paramSeparator + "autoplay=1");
this.$el.html(insertHTML);
- },
+ }
})
\ No newline at end of file
diff --git a/app/assets/javascripts/app/views/post_view.js b/app/assets/javascripts/app/views/post_view.js
index d7703e627..ea67e5f4c 100644
--- a/app/assets/javascripts/app/views/post_view.js
+++ b/app/assets/javascripts/app/views/post_view.js
@@ -21,7 +21,7 @@ app.views.Post = app.views.StreamObject.extend({
showFactory : function(model) {
var frameName = model.get("frame_name");
- //translate obsolete template names to the new Moods, should be removed when template picker comes cliente side.
+ //translate obsolete template names to the new Moods, should be removed when template picker comes client side.
var map = {
'status-with-photo-backdrop' : 'Wallpaper', //equivalent
'status' : 'Day', //equivalent
@@ -31,13 +31,9 @@ app.views.Post = app.views.StreamObject.extend({
frameName = map[frameName] || frameName
- if(_.include(app.models.Post.legacyTemplateNames, frameName)){
- return legacyShow(model)
- } else {
- return new app.views.Post[frameName]({
- model : model
- })
- }
+ return new app.views.Post[frameName]({
+ model : model
+ })
function legacyShow(model) {
return new app.views.Post.Legacy({
diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/new_styles/_base.scss
index f61ec44a4..06a60f533 100644
--- a/app/assets/stylesheets/new_styles/_base.scss
+++ b/app/assets/stylesheets/new_styles/_base.scss
@@ -14,40 +14,6 @@ a { color : rgb(42,156,235) }
.icon-red { background-image: image_url("img/glyphicons-halflings-red.png"); }
.icon-blue { background-image: image_url("img/glyphicons-halflings-blue.png"); }
-.rich-media {
- background-color: $night-background-color;
-
- p {
- @include media-text();
- color: #999;
-
- a {
- font-weight: normal;
- font-size: smaller;
- }
- }
-
- iframe {
- @include box-shadow(0, 3px, 15px, #000);
-
- width: 857px;
- height: 480px;
- max-width: 100%;
- max-height: 100%;
- }
-}
-
-.rich-media-container {
- display: table;
- height: 100%;
- width: 100%;
-}
-
-.rich-media-container2 {
- display: table-cell;
- vertical-align: middle;
-}
-
.avatar {
&.micro {
height: 20px;
@@ -115,9 +81,17 @@ a { color : rgb(42,156,235) }
height: 100%;
width: 100%;
- img {
+ img,
+ iframe {
@include photo-shadow();
}
+
+ iframe {
+ width: 857px;
+ height: 480px;
+ max-width: 100%;
+ max-height: 100%;
+ }
}
article { //mood posts
diff --git a/app/assets/stylesheets/new_styles/_canvas.scss b/app/assets/stylesheets/new_styles/_canvas.scss
index 97a0a285b..29d09c74f 100644
--- a/app/assets/stylesheets/new_styles/_canvas.scss
+++ b/app/assets/stylesheets/new_styles/_canvas.scss
@@ -305,11 +305,6 @@
min-height : $two-row-height + px;
}
- &.rich-media {
- width: auto;
- height: auto;
- }
-
&.wallpaper {
.image-container {
background-color: black;
diff --git a/app/assets/stylesheets/new_styles/_composer.scss b/app/assets/stylesheets/new_styles/_composer.scss
index 35e263601..811414c71 100644
--- a/app/assets/stylesheets/new_styles/_composer.scss
+++ b/app/assets/stylesheets/new_styles/_composer.scss
@@ -19,6 +19,8 @@
background-color : rgba(0,0,0,0.8);
z-index : 200;
+ text-align : left;
+
position : absolute;
left : 0;
top : 0;
@@ -36,14 +38,8 @@
margin-top: 5px;
}
- legend {
- color : #fff;
- text-align : left;
- border : none;
- }
-
textarea#post_text{
- height: 200px;
+ height: 100px;
padding : 10px;
}
diff --git a/app/assets/templates/mood.jst.hbs b/app/assets/templates/mood.jst.hbs
index 154bad6bc..dcbe39b47 100644
--- a/app/assets/templates/mood.jst.hbs
+++ b/app/assets/templates/mood.jst.hbs
@@ -1,5 +1,13 @@