Skip to content
Extraits de code Groupes Projets
Valider 39d68804 rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

DG DC; visual fixups

parent 60988907
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 81 ajouts et 60 suppressions
(function(){
var textFormatter = function textFormatter(model) {
var text = model.get("text");
//make it so I take text and mentions rather than the modelapp.helpers.textFormatter(
var textFormatter = function textFormatter(text, model) {
var mentions = model.get("mentioned_people");
return textFormatter.mentionify(
......
......@@ -14,7 +14,7 @@ app.views.Comment = app.views.Content.extend({
presenter : function() {
return _.extend(this.defaultPresenter(), {
canRemove: this.canRemove(),
text : app.helpers.textFormatter(this.model)
text : app.helpers.textFormatter(this.model.get("text"), this.model)
})
},
......
......@@ -8,7 +8,7 @@ app.views.Content = app.views.StreamObject.extend({
presenter : function(){
return _.extend(this.defaultPresenter(), {
text : app.helpers.textFormatter(this.model),
text : app.helpers.textFormatter(this.model.get("text"), this.model),
o_embed_html : this.embedHTML(),
largePhoto : this.largePhoto(),
smallPhotos : this.smallPhotos()
......
......@@ -12,8 +12,8 @@ app.views.Post.Mood = app.views.Post.extend({
presenter : function(){
var model = this.model
return _.extend(this.defaultPresenter(), {
headline : model.headline(),
body : model.body()
headline : $(app.helpers.textFormatter(model.headline(), model)).html(),
body : app.helpers.textFormatter(model.body(), model)
})
},
......
......@@ -5,7 +5,7 @@ app.views.Post = app.views.StreamObject.extend({
return _.extend(this.defaultPresenter(), {
authorIsCurrentUser : this.authorIsCurrentUser(),
showPost : this.showPost(),
text : app.helpers.textFormatter(this.model)
text : app.helpers.textFormatter(this.model.get("text"), this.model)
})
},
......@@ -23,10 +23,10 @@ app.views.Post = app.views.StreamObject.extend({
//translate obsolete template names to the new Moods, should be removed when template picker comes cliente side.
var map = {
'status-with-photo-backdrop' : 'Wallpaper',
'status' : 'Day',
'note' : 'Newspaper',
'photo-backdrop' : 'Day'
'status-with-photo-backdrop' : 'Wallpaper', //equivalent
'status' : 'Day', //equivalent
'note' : 'Newspaper', //equivalent
'photo-backdrop' : 'Day' //that theme was bad
}
frameName = map[frameName] || frameName
......@@ -50,6 +50,7 @@ app.views.Post = app.views.StreamObject.extend({
});
app.views.Post.Legacy = app.views.Post.extend({
tagName : "article",
initialize : function(options) {
this.templateName = options.templateName || this.templateName
}
......
......@@ -7,39 +7,13 @@
.icon-green { background-image: image_url("img/glyphicons-halflings-green.png"); }
.icon-blue { background-image: image_url("img/glyphicons-halflings-blue.png"); }
/* styles */
.multi-photo {
display: table;
p {
@include media-text();
}
.img-bounding-box {
display: table-cell;
text-align: center;
vertical-align: middle;
padding: 20px;
height: 400px;
width: 300px;
}
img {
@include photo-shadow();
max-width: 100%;
max-height: 100%;
}
}
.photoset {
@include center(horizontal);
width: 100%;
}
.rich-media {
z-index : -5000; //so the framer controls don't get lost
//z-index : -5000; //so the framer controls don't get lost
position: absolute;
height: 100%;
width: 100%;
......@@ -181,8 +155,13 @@ article { //mood posts
$big-text-size : 3em;
$medium-text-size : 2em;
$small-text-size: 1.5em;
width: 960px;
margin: 0 auto;
@include centered-frame();
.container {
padding: 70px 0;
}
header, header p{
//big text
......@@ -191,10 +170,12 @@ article { //mood posts
}
section.body{
font-size: $small-text-size;
p { font-size: $small-text-size;}
&.short_body{
font-size: $medium-text-size;
p{
font-size: $medium-text-size;
}
}
}
......@@ -204,17 +185,58 @@ article { //mood posts
}
&.newspaper {
text-align: left;
@include newspaper-type();
width: 960px;
text-align: left;
.container {
width: 600px;
}
.photo_viewer {
float: left;
float: right;
margin-left: 20px;
max-width: 320px;
}
header {
margin-bottom: 1em;
line-height: 1em;
}
.body p {
@include newspaper-type();
font-size: 1.2em;
line-height: 1.7em;
margin-bottom: 1.2em;
}
}
&.wallpaper{
color : #fff;
}
&.multi-photo {
p {
@include media-text();
}
.img-bounding-box {
display: table-cell;
text-align: center;
vertical-align: middle;
padding: 20px;
height: 400px;
width: 300px;
}
img {
@include photo-shadow();
max-width: 100%;
max-height: 100%;
}
}
}
.status-with-photo-backdrop {
......@@ -284,6 +306,7 @@ $bring-dark-accent-forward-color: #DDD;
.framer-controls {
@include info-container-base();
z-index: 999;
position: fixed;
width: 100%;
......
......@@ -81,8 +81,6 @@ $night-text-color : #999;
@mixin newspaper-type() {
font-family: Palatino, times, georgia, serif;
margin-bottom: 1em;
padding: 0 5%;
}
@mixin centered-frame(){
......
<header>{{headline}}</header>
<section class="photo_viewer"></section>
<section class="body">{{{body}}}</section>
<div class="container">
<header>{{{headline}}}</header>
<section class="photo_viewer"></section>
<section class="body">{{{body}}}</section>
</div>
\ No newline at end of file
<div class='row'>
<div class='span8 offset2 new-post-section'>
<div class="new_picture"/>
<form class="new-post">
......@@ -16,8 +15,6 @@
<div class="aspect_selector"></div>
<div class="service_selector"></div>
<input type="submit" class="btn-primary" value="Share" />
</fieldset>
</form>
</div>
......
<div class="framer-controls">
<div class="controls">
<button class="btn-primary next">Next</button>
</div>
</div>
<div class="container">
<div id="new-post"></div>
<button class="btn-primary next">Next</button>
</div>
<div class="photo-fill" data-img-src="{{backgroundUrl}}" style="background-image: url({{backgroundUrl}})">
<div class="darken">
<div class="darken-content">
<header>{{headline}}</header>
<section class="body">{{body}}</section>
<header>{{{headline}}}</header>
<section class="body">{{{body}}}</section>
</div>
</div>
</div>
......@@ -11,7 +11,7 @@ describe("app.helpers.textFormatter", function(){
spyOn(app.helpers.textFormatter, "hashtagify")
spyOn(app.helpers.textFormatter, "markdownify")
app.helpers.textFormatter(this.statusMessage)
app.helpers.textFormatter(this.statusMessage.get("text"), this.statusMessage)
expect(app.helpers.textFormatter.mentionify).toHaveBeenCalled()
expect(app.helpers.textFormatter.hashtagify).toHaveBeenCalled()
expect(app.helpers.textFormatter.markdownify).toHaveBeenCalled()
......
......@@ -26,10 +26,7 @@ describe("app.pages.Framer", function(){
it("navigates on save", function(){
spyOn(app.router, "navigate")
this.page.model.set({id : 22})
this.page.model.trigger("sync")
console.log(app.router.navigate)
expect(app.router.navigate).toHaveBeenCalled()
})
});
......
......@@ -62,9 +62,7 @@ describe("app.views.AspectsDropdown", function(){
describe("selecting An Aspect", function(){
beforeEach(function(){
this.link = this.view.$("a:contains('lovers')")
console.log(app.currentUser.get("aspects"), $("a:contains('lovers')", this.view.el))
this.link.click()
})
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter