loader is background image of span
fix tests
This commit is contained in:
parent
e2adb8d26f
commit
ca33070b9e
8 changed files with 34 additions and 33 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
@import 'ui.css.sass'
|
@import 'ui.css.sass'
|
||||||
@import '_mixins.css.scss'
|
@import '_mixins.css.scss'
|
||||||
|
@import 'new_styles/_spinner'
|
||||||
|
|
||||||
/* ====== media ====== */
|
/* ====== media ====== */
|
||||||
.media
|
.media
|
||||||
|
|
@ -596,20 +597,6 @@ form.new_comment
|
||||||
h4
|
h4
|
||||||
:font-weight bold
|
:font-weight bold
|
||||||
|
|
||||||
#paginate, #infscr-loading
|
|
||||||
:display block
|
|
||||||
|
|
||||||
:margin
|
|
||||||
:top 10px
|
|
||||||
|
|
||||||
:padding 8px 0
|
|
||||||
:text-align center
|
|
||||||
:width 100%
|
|
||||||
img
|
|
||||||
:border none
|
|
||||||
|
|
||||||
:min-height 20px
|
|
||||||
|
|
||||||
#photo_container
|
#photo_container
|
||||||
:text
|
:text
|
||||||
:align center
|
:align center
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,5 @@
|
||||||
fade-in 0.2s ease-in;
|
fade-in 0.2s ease-in;
|
||||||
-moz-animation: spin 1s infinite ease-in-out,
|
-moz-animation: spin 1s infinite ease-in-out,
|
||||||
fade-in 0.2s ease-in;
|
fade-in 0.2s ease-in;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,5 @@
|
||||||
@import 'new_styles/viewer_nav';
|
@import 'new_styles/viewer_nav';
|
||||||
|
|
||||||
/* profile */
|
/* profile */
|
||||||
@import 'new_styles/canvas';
|
@import 'new_styles/canvas';
|
||||||
|
@import 'new_styles/spinner';
|
||||||
15
app/assets/stylesheets/new_styles/_spinner.scss
Normal file
15
app/assets/stylesheets/new_styles/_spinner.scss
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#paginate, #infscr-loading {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 8px 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
.loader {
|
||||||
|
display: inline-block;
|
||||||
|
width : 14px;
|
||||||
|
height: 14px;
|
||||||
|
background-image : url(asset_path("static-loader.png", "image"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
<section id="profile_info">
|
<section id="profile_info">
|
||||||
<h1>{{full_name}}</h1>
|
<h1>{{full_name}}</h1>
|
||||||
<div>
|
<dl>
|
||||||
Gender: {{gender}}
|
<dt>Location:</dt><dd>{{location}}</dd>
|
||||||
</div>
|
<dt>Bio:</dt><dd>{{bio}}</dd>
|
||||||
<div>
|
<dt>Birthday:</dt><dd>{{birthday}}</dd>
|
||||||
Bio: {{bio}}
|
<dt>Gender:</dt><dd>{{gender}}</dd>
|
||||||
</div>
|
</dl>
|
||||||
<div>
|
|
||||||
Birthday: {{birthday}}
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<a href="/posts/new">COMPOSE</a>
|
<a href="/posts/new">COMPOSE</a>
|
||||||
|
|
@ -16,3 +13,5 @@
|
||||||
<section id="canvas">
|
<section id="canvas">
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<div id=paginate><span class="loader hidden"/></div>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
#main_stream.stream
|
#main_stream.stream
|
||||||
|
|
||||||
#paginate
|
#paginate
|
||||||
= image_tag "static-loader.png", :height => 14, :width => 14, :class => "loader hidden"
|
%span.loader.hidden
|
||||||
|
|
||||||
- if current_user.contacts.size < 2
|
- if current_user.contacts.size < 2
|
||||||
= render 'aspects/no_contacts_message'
|
= render 'aspects/no_contacts_message'
|
||||||
|
|
@ -34,4 +34,4 @@
|
||||||
= t('.ignoring', :name => @person.first_name)
|
= t('.ignoring', :name => @person.first_name)
|
||||||
|
|
||||||
#paginate
|
#paginate
|
||||||
= image_tag "static-loader.png", :height => 14, :width => 14, :class => "loader hidden"
|
%span.loader.hidden
|
||||||
|
|
|
||||||
|
|
@ -20,18 +20,18 @@ describe("app.views.SmallFrame", function(){
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("textClass", function(){
|
describe("textClass", function(){
|
||||||
it("returns and empty string with a post with text longer than 140 characters", function(){
|
it("returns and 'text extra-small' with a post with text longer than 140 characters", function(){
|
||||||
expect(this.view.textClass()).toBe("")
|
expect(this.view.textClass()).toBe("text extra-small")
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns 'x2 height' if if it is less than 500 characters", function(){
|
it("returns 'text medium' if if it is less than 500 characters", function(){
|
||||||
this.view.model.set({text: "ldfkdfdkfkdfjdkjfdkfjdkjfkdfjdkjfkdjfkdjfdkjdfkjdkfjkdjfkdjfkdfkdjf" +
|
this.view.model.set({text: "ldfkdfdkfkdfjdkjfdkfjdkjfkdfjdkjfkdjfkdjfdkjdfkjdkfjkdjfkdjfkdfkdjf" +
|
||||||
"dfkjdkfjkdjfkdjfkdjfdkfjdkfjkd;fklas;dfkjsad;kljf ;laskjf;lkajsdf;kljasd;flkjasd;flkjasdf;l" +
|
"dfkjdkfjkdjfkdjfkdjfdkfjdkfjkd;fklas;dfkjsad;kljf ;laskjf;lkajsdf;kljasd;flkjasd;flkjasdf;l" +
|
||||||
"jasd;fkjasd;lfkja;sdlkjf;alsdkf;lasdjf;alskdfj;alsdkjf;alsdkfja;sdlkj "})
|
"jasd;fkjasd;lfkja;sdlkjf;alsdkf;lasdjf;alskdfj;alsdkjf;alsdkfja;sdlkj "})
|
||||||
expect(this.view.textClass()).toBe("x2 height")
|
expect(this.view.textClass()).toBe("text medium")
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns 'x2 width' if if it is more than 500 characters", function(){
|
it("returns 'text large' if if it is more than 500 characters", function(){
|
||||||
this.view.model.set({text: "ldfkdfdkfkdfjdkjfdkfjdkjfkdfjdkjfkdjfkdjfdkjdfkjdkfjkdjfkdjfkdfkdjf" +
|
this.view.model.set({text: "ldfkdfdkfkdfjdkjfdkfjdkjfkdfjdkjfkdjfkdjfdkjdfkjdkfjkdjfkdjfkdfkdjf" +
|
||||||
"dfkjdkfjkdjfkdjfkdjfdkfjdkfjkd;fklas;dfkjsad;kljf ;laskjf;lkajsdf;kljasd;flkjasd;flkjasdf;l" +
|
"dfkjdkfjkdjfkdjfkdjfdkfjdkfjkd;fklas;dfkjsad;kljf ;laskjf;lkajsdf;kljasd;flkjasd;flkjasdf;l" +
|
||||||
"jasd;fkjasd;lfkja;sdlkjf;alsdkf;lasdjf;alskdfj;alsdkjf;alsdkfja;sdlkj f;lkajs;dflkjasd;lfkja;sldkjf;alskdjfs" +
|
"jasd;fkjasd;lfkja;sdlkjf;alsdkf;lasdjf;alskdfj;alsdkjf;alsdkfja;sdlkj f;lkajs;dflkjasd;lfkja;sldkjf;alskdjfs" +
|
||||||
|
|
@ -41,7 +41,7 @@ describe("app.views.SmallFrame", function(){
|
||||||
"as;dlfk;alsdkjf;lkasdf;lkjasd;flkjasd;lfkjasdkl;" +
|
"as;dlfk;alsdkjf;lkasdf;lkjasd;flkjasd;lfkjasdkl;" +
|
||||||
"asl;dkfj;asldkfj;alsdkfj;alsdfjk" +
|
"asl;dkfj;asldkfj;alsdkfj;alsdfjk" +
|
||||||
"askdjf;laksdf;lkdflkjhasldfhoiawufjkhasugfoiwaufaw "})
|
"askdjf;laksdf;lkdflkjhasldfhoiawufjkhasugfoiwaufaw "})
|
||||||
expect(this.view.textClass()).toBe("x2 width")
|
expect(this.view.textClass()).toBe("text large")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
Loading…
Reference in a new issue