make a small-frame template folder; we're not going to want the same dom structure moving forward...
This commit is contained in:
parent
1308994bba
commit
ff42f250ca
3 changed files with 9 additions and 10 deletions
|
|
@ -75,7 +75,6 @@ app.views.Base = Backbone.View.extend({
|
||||||
|
|
||||||
setFormAttrs : function(){
|
setFormAttrs : function(){
|
||||||
this.model.set(_.inject(this.formAttrs, _.bind(setValueFromField, this), {}))
|
this.model.set(_.inject(this.formAttrs, _.bind(setValueFromField, this), {}))
|
||||||
console.log("set from form", this.model.attributes)
|
|
||||||
|
|
||||||
function setValueFromField(memo, attribute, selector){
|
function setValueFromField(memo, attribute, selector){
|
||||||
if(attribute.slice("-2") === "[]") {
|
if(attribute.slice("-2") === "[]") {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
app.views.SmallFrame = app.views.Post.extend({
|
app.views.SmallFrame = app.views.Post.extend({
|
||||||
className : "canvas-frame",
|
className : "canvas-frame",
|
||||||
|
|
||||||
templateName : "small-frame",
|
templateName : "small-frame/default", // default to fall back to
|
||||||
|
|
||||||
events : {
|
events : {
|
||||||
"click .content" : "favoritePost",
|
"click .content" : "favoritePost",
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class=controls>
|
|
||||||
<a href="#" class="delete"></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{#if photos}}
|
{{#if photos}}
|
||||||
<div class="image-container">
|
<div class="image-container">
|
||||||
{{#each photos}}
|
{{#each photos}}
|
||||||
|
|
@ -28,11 +24,16 @@
|
||||||
<div class="background-color"></div>
|
<div class="background-color"></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
<!--Handlebars partial territory-->
|
||||||
|
<div class=controls>
|
||||||
|
<a href="#" class="delete"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="info permalink">
|
<div class="info permalink">
|
||||||
{{#if root}}
|
{{#if root}}
|
||||||
{{#linkToPerson root.author}}
|
{{#linkToPerson root.author}}
|
||||||
{{{personImage this}}
|
{{{personImage this}}
|
||||||
{{/linkToPerson}}
|
{{/linkToPerson}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<i class="icon-time timestamp" title="{{created_at}}" rel="tooltip"></i>
|
<i class="icon-time timestamp" title="{{created_at}}" rel="tooltip"></i>
|
||||||
|
|
@ -41,7 +42,6 @@
|
||||||
<i class="icon-heart"></i> {{likesCount}}
|
<i class="icon-heart"></i> {{likesCount}}
|
||||||
<i class="icon-retweet"></i> {{resharesCount}}
|
<i class="icon-retweet"></i> {{resharesCount}}
|
||||||
<i class="icon-comment"></i> {{commentsCount}}
|
<i class="icon-comment"></i> {{commentsCount}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Loading…
Reference in a new issue