mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
refactoring
This commit is contained in:
parent
c3e4d49966
commit
85b16620b8
7 changed files with 191 additions and 194 deletions
|
@ -477,12 +477,12 @@ blockquote {
|
|||
}
|
||||
|
||||
/* line 361, ../sass/screen.scss */
|
||||
.NB-mark {
|
||||
.NB-shared-story {
|
||||
margin: 20px 0 50px 0;
|
||||
}
|
||||
|
||||
/* line 365, ../sass/screen.scss */
|
||||
.NB-story-wrapper {
|
||||
.NB-story {
|
||||
border-left: 1px solid #fff;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0px 0px 5px #c8c8c8;
|
||||
|
@ -492,23 +492,23 @@ blockquote {
|
|||
z-index: 1;
|
||||
}
|
||||
/* line 372, ../sass/screen.scss */
|
||||
.NB-story-wrapper .NB-story-inner {
|
||||
.NB-story .NB-story-inner {
|
||||
border-left: 4px solid #fff;
|
||||
padding: 25px 25px 15px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
/* contains all children */
|
||||
}
|
||||
/* line 379, ../sass/screen.scss */
|
||||
.NB-story-wrapper .NB-story-title a {
|
||||
/* line 380, ../sass/screen.scss */
|
||||
.NB-story .NB-story-title a {
|
||||
font-size: 21px;
|
||||
font-weight: bold;
|
||||
line-height: 120%;
|
||||
text-decoration: none;
|
||||
color: #333333;
|
||||
}
|
||||
/* line 388, ../sass/screen.scss */
|
||||
.NB-story-wrapper .NB-story-metadata {
|
||||
/* line 389, ../sass/screen.scss */
|
||||
.NB-story .NB-story-metadata {
|
||||
font-size: 14px;
|
||||
color: gray;
|
||||
font-weight: normal;
|
||||
|
@ -516,110 +516,107 @@ blockquote {
|
|||
/* to ensure that the author is always on one line */
|
||||
margin: 5px 0 8px;
|
||||
}
|
||||
/* line 396, ../sass/screen.scss */
|
||||
.NB-story-wrapper .NB-feed {
|
||||
/* line 397, ../sass/screen.scss */
|
||||
.NB-story .NB-feed {
|
||||
margin: 2px 0 10px;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
/* line 400, ../sass/screen.scss */
|
||||
.NB-story-wrapper .NB-feed a {
|
||||
/* line 401, ../sass/screen.scss */
|
||||
.NB-story .NB-feed a {
|
||||
color: gray;
|
||||
font-size: 12px;
|
||||
}
|
||||
/* line 405, ../sass/screen.scss */
|
||||
.NB-story-wrapper .NB-feed img {
|
||||
/* line 406, ../sass/screen.scss */
|
||||
.NB-story .NB-feed img {
|
||||
float: left;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
/* line 414, ../sass/screen.scss */
|
||||
.NB-story {
|
||||
font-size: 14px;
|
||||
line-height: 140%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
/*
|
||||
these styles affect all outside content
|
||||
|
||||
*/
|
||||
}
|
||||
/* line 420, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content-wrapper {
|
||||
/* line 415, ../sass/screen.scss */
|
||||
.NB-story-content-wrapper {
|
||||
max-height: 300px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
/* line 424, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content-wrapper.NB-story-content-wrapper-height-fudged {
|
||||
/* line 419, ../sass/screen.scss */
|
||||
.NB-story-content-wrapper.NB-story-content-wrapper-height-fudged {
|
||||
max-height: none;
|
||||
}
|
||||
/* line 434, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content {
|
||||
margin: 10px 0;
|
||||
}
|
||||
/* line 437, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
/* line 441, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content img {
|
||||
margin: 10px 0;
|
||||
}
|
||||
/* line 445, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content ins {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
/* line 450, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content del {
|
||||
display: none;
|
||||
}
|
||||
/* line 456, ../sass/screen.scss */
|
||||
.NB-story .NC-story-cutoff {
|
||||
position: absolute;
|
||||
display: none;
|
||||
bottom: 48px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 14px;
|
||||
z-index: 0;
|
||||
background: transparent url('/../../../media/img/circular/module_cutoff.png?1345259189') repeat-x left bottom;
|
||||
}
|
||||
/* line 467, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content-expander {
|
||||
/* line 423, ../sass/screen.scss */
|
||||
.NB-story-content-wrapper .NB-story-content-expander {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
bottom: -25px;
|
||||
left: 0;
|
||||
padding: 18px 25px 14px 0;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
color: #1a9fff;
|
||||
font-size: 12px;
|
||||
background: #fff;
|
||||
}
|
||||
/* line 479, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content-expander:hover {
|
||||
/* line 434, ../sass/screen.scss */
|
||||
.NB-story-content-wrapper .NB-story-content-expander .NB-story-content-expander-inner {
|
||||
position: relative;
|
||||
padding: 18px 25px 14px 0;
|
||||
}
|
||||
/* line 439, ../sass/screen.scss */
|
||||
.NB-story-content-wrapper .NB-story-content-expander:hover {
|
||||
color: #306187;
|
||||
}
|
||||
/* line 482, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content-expander:active {
|
||||
/* line 442, ../sass/screen.scss */
|
||||
.NB-story-content-wrapper .NB-story-content-expander:active {
|
||||
color: #722125;
|
||||
}
|
||||
/* line 486, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content-expander .NB-story-content-expander-text,
|
||||
.NB-story .NB-story-content-expander .NB-story-content-expander-pages {
|
||||
/* line 446, ../sass/screen.scss */
|
||||
.NB-story-content-wrapper .NB-story-content-expander .NC-story-cutoff {
|
||||
position: absolute;
|
||||
top: -14px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 14px;
|
||||
z-index: 0;
|
||||
background: transparent url('/../../../media/img/circular/module_cutoff.png?1345259189') repeat-x left bottom;
|
||||
}
|
||||
/* line 457, ../sass/screen.scss */
|
||||
.NB-story-content-wrapper .NB-story-content-expander .NB-story-content-expander-text,
|
||||
.NB-story-content-wrapper .NB-story-content-expander .NB-story-content-expander-pages {
|
||||
display: inline-block;
|
||||
}
|
||||
/* line 490, ../sass/screen.scss */
|
||||
.NB-story .NB-story-content-expander .NB-story-content-expander-pages {
|
||||
/* line 461, ../sass/screen.scss */
|
||||
.NB-story-content-wrapper .NB-story-content-expander .NB-story-content-expander-pages {
|
||||
line-height: 8px;
|
||||
padding: 0 12px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
/* line 498, ../sass/screen.scss */
|
||||
/* line 469, ../sass/screen.scss */
|
||||
.NB-story-content {
|
||||
font-size: 14px;
|
||||
line-height: 140%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin: 10px 0;
|
||||
}
|
||||
/* line 476, ../sass/screen.scss */
|
||||
.NB-story-content p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
/* line 480, ../sass/screen.scss */
|
||||
.NB-story-content img {
|
||||
margin: 10px 0;
|
||||
}
|
||||
/* line 484, ../sass/screen.scss */
|
||||
.NB-story-content ins {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
/* line 489, ../sass/screen.scss */
|
||||
.NB-story-content del {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* line 496, ../sass/screen.scss */
|
||||
.NB-story-shares-container {
|
||||
text-align: right;
|
||||
color: gray;
|
||||
|
@ -627,13 +624,13 @@ blockquote {
|
|||
line-height: 16px;
|
||||
float: right;
|
||||
}
|
||||
/* line 505, ../sass/screen.scss */
|
||||
/* line 503, ../sass/screen.scss */
|
||||
.NB-story-shares-container .NB-story-share-label {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-top: 3px;
|
||||
}
|
||||
/* line 514, ../sass/screen.scss */
|
||||
/* line 512, ../sass/screen.scss */
|
||||
.NB-story-shares-container .NB-story-share-profiles,
|
||||
.NB-story-shares-container .NB-story-share-profiles-shares-friends,
|
||||
.NB-story-shares-container .NB-story-share-profiles-shares-public,
|
||||
|
@ -641,17 +638,17 @@ blockquote {
|
|||
.NB-story-shares-container .NB-story-share-profiles-comments-public {
|
||||
display: inline-block;
|
||||
}
|
||||
/* line 518, ../sass/screen.scss */
|
||||
/* line 516, ../sass/screen.scss */
|
||||
.NB-story-shares-container .NB-story-share-profiles-shares-public,
|
||||
.NB-story-shares-container .NB-story-share-profiles-comments-public {
|
||||
opacity: .5;
|
||||
}
|
||||
/* line 521, ../sass/screen.scss */
|
||||
/* line 519, ../sass/screen.scss */
|
||||
.NB-story-shares-container .NB-user-avatar {
|
||||
display: inline-block;
|
||||
margin: 2px 1px 0 2px;
|
||||
}
|
||||
/* line 525, ../sass/screen.scss */
|
||||
/* line 523, ../sass/screen.scss */
|
||||
.NB-story-shares-container .NB-user-avatar img {
|
||||
-webkit-box-shadow: 0px 0px 1px #bdbdbd;
|
||||
-moz-box-shadow: 0px 0px 1px #bdbdbd;
|
||||
|
@ -661,7 +658,7 @@ blockquote {
|
|||
display: block;
|
||||
}
|
||||
|
||||
/* line 534, ../sass/screen.scss */
|
||||
/* line 532, ../sass/screen.scss */
|
||||
.NB-story-comments-container {
|
||||
font-size: 14px;
|
||||
z-index: 10;
|
||||
|
@ -671,7 +668,7 @@ blockquote {
|
|||
padding: 0 20px;
|
||||
border-top: 0;
|
||||
}
|
||||
/* line 544, ../sass/screen.scss */
|
||||
/* line 542, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-user-avatar img,
|
||||
.NB-story-comments-container img.NB-user-avatar {
|
||||
position: absolute;
|
||||
|
@ -684,7 +681,7 @@ blockquote {
|
|||
border-radius: 3px / 3px;
|
||||
/* @include single-box-shadow; gets in the way of transparent PNGs */
|
||||
}
|
||||
/* line 554, ../sass/screen.scss */
|
||||
/* line 552, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-user-avatar.NB-story-comment-reshare img {
|
||||
top: 27px;
|
||||
left: 0px;
|
||||
|
@ -692,31 +689,31 @@ blockquote {
|
|||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
/* line 562, ../sass/screen.scss */
|
||||
/* line 560, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment:last-child {
|
||||
border: 0;
|
||||
}
|
||||
/* line 566, ../sass/screen.scss */
|
||||
/* line 564, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment {
|
||||
padding: 15px 0 18px 44px;
|
||||
border-bottom: 1px solid #bdbdbd;
|
||||
position: relative;
|
||||
min-height: 32px;
|
||||
}
|
||||
/* line 576, ../sass/screen.scss */
|
||||
/* line 574, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment .NB-story-comment-username {
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
/* line 582, ../sass/screen.scss */
|
||||
/* line 580, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment .NB-story-comment-date {
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
color: gray;
|
||||
text-shadow: 0px 1px 1px white;
|
||||
}
|
||||
/* line 589, ../sass/screen.scss */
|
||||
/* line 587, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment .NB-story-comment-location {
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
|
@ -724,18 +721,18 @@ blockquote {
|
|||
text-shadow: 0px 1px 1px white;
|
||||
margin-left: 15px;
|
||||
}
|
||||
/* line 598, ../sass/screen.scss */
|
||||
/* line 596, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment .NB-story-comment-reply-button,
|
||||
.NB-story-comments-container .NB-story-comment .NB-story-comment-edit-button {
|
||||
display: none;
|
||||
}
|
||||
/* line 602, ../sass/screen.scss */
|
||||
/* line 600, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment .NB-story-comment-content {
|
||||
padding-top: 4px;
|
||||
line-height: 18px;
|
||||
clear: both;
|
||||
}
|
||||
/* line 608, ../sass/screen.scss */
|
||||
/* line 606, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment .NB-story-comment-reshares .NB-user-avatar img {
|
||||
top: 15px;
|
||||
left: 12px;
|
||||
|
@ -743,7 +740,7 @@ blockquote {
|
|||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
/* line 617, ../sass/screen.scss */
|
||||
/* line 615, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment-reply {
|
||||
margin-top: 15px;
|
||||
padding: 15px 0 0px 44px;
|
||||
|
@ -751,13 +748,13 @@ blockquote {
|
|||
position: relative;
|
||||
min-height: 32px;
|
||||
}
|
||||
/* line 624, ../sass/screen.scss */
|
||||
/* line 622, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment-reply .NB-story-comment-reply-content {
|
||||
padding-top: 4px;
|
||||
line-height: 18px;
|
||||
clear: both;
|
||||
}
|
||||
/* line 631, ../sass/screen.scss */
|
||||
/* line 629, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment-input {
|
||||
width: 371px;
|
||||
height: 16px;
|
||||
|
@ -766,7 +763,7 @@ blockquote {
|
|||
margin-top: 1px;
|
||||
border: 1px solid #bdbdbd;
|
||||
}
|
||||
/* line 641, ../sass/screen.scss */
|
||||
/* line 639, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment-buttons .NB-story-comment-save {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
|
@ -817,11 +814,11 @@ blockquote {
|
|||
text-shadow: 0px -1px 1px white;
|
||||
color: #333333;
|
||||
}
|
||||
/* line 649, ../sass/screen.scss */
|
||||
/* line 647, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comment-buttons .NB-story-comment-delete {
|
||||
display: none;
|
||||
}
|
||||
/* line 654, ../sass/screen.scss */
|
||||
/* line 652, ../sass/screen.scss */
|
||||
.NB-story-comments-container .NB-story-comments-public-header-wrapper {
|
||||
color: gray;
|
||||
font-size: 12px;
|
||||
|
@ -829,7 +826,7 @@ blockquote {
|
|||
padding: 3px 0;
|
||||
}
|
||||
|
||||
/* line 663, ../sass/screen.scss */
|
||||
/* line 661, ../sass/screen.scss */
|
||||
.NB-page-controls-next,
|
||||
.NB-page-controls-end {
|
||||
background-color: #6eb4e3;
|
||||
|
@ -863,7 +860,7 @@ blockquote {
|
|||
-o-transition: all .12s ease-out;
|
||||
-ms-transition: all .12s ease-out;
|
||||
}
|
||||
/* line 665, ../sass/screen.scss */
|
||||
/* line 663, ../sass/screen.scss */
|
||||
.NB-page-controls-next.NB-loaded,
|
||||
.NB-page-controls-end.NB-loaded {
|
||||
display: none;
|
||||
|
@ -889,7 +886,7 @@ blockquote {
|
|||
-moz-box-shadow: inset 0px 0px 10px #1f74b8;
|
||||
box-shadow: inset 0px 0px 10px #1f74b8;
|
||||
}
|
||||
/* line 679, ../sass/screen.scss */
|
||||
/* line 677, ../sass/screen.scss */
|
||||
.NB-page-controls-next .NB-page-controls-text,
|
||||
.NB-page-controls-end .NB-page-controls-text {
|
||||
position: absolute;
|
||||
|
@ -899,7 +896,7 @@ blockquote {
|
|||
bottom: 20px;
|
||||
}
|
||||
|
||||
/* line 688, ../sass/screen.scss */
|
||||
/* line 686, ../sass/screen.scss */
|
||||
.NB-page-controls-end {
|
||||
border: 1px solid #bdbdbd;
|
||||
-webkit-border-radius: 4px 4px;
|
||||
|
|
|
@ -358,11 +358,11 @@ blockquote {
|
|||
// = Story =
|
||||
// =========
|
||||
|
||||
.NB-mark {
|
||||
.NB-shared-story {
|
||||
margin: 20px 0 50px 0;
|
||||
}
|
||||
|
||||
.NB-story-wrapper {
|
||||
.NB-story {
|
||||
border-left: 1px solid #fff;
|
||||
background: #fff;
|
||||
@include single-box-shadow(#c8c8c8, 0px, 0px, 5px, false, false);
|
||||
|
@ -375,6 +375,7 @@ blockquote {
|
|||
overflow: hidden;
|
||||
position: relative; /* contains all children */
|
||||
}
|
||||
|
||||
.NB-story-title {
|
||||
a {
|
||||
font-size: $title-font-size;
|
||||
|
@ -411,77 +412,47 @@ blockquote {
|
|||
}
|
||||
}
|
||||
|
||||
.NB-story {
|
||||
font-size: $small-font-size;
|
||||
line-height: 140%;
|
||||
.NB-story-content-wrapper {
|
||||
max-height: $max-story-height;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.NB-story-content-wrapper {
|
||||
max-height: $max-story-height;
|
||||
overflow: hidden;
|
||||
|
||||
&.NB-story-content-wrapper-height-fudged {
|
||||
max-height: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
these styles affect all outside content
|
||||
|
||||
*/
|
||||
.NB-story-content {
|
||||
margin: 10px 0;
|
||||
|
||||
p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
ins {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
del {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.NC-story-cutoff {
|
||||
position: absolute;
|
||||
display: none;
|
||||
bottom: 48px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 14px;
|
||||
z-index: 0;
|
||||
background: transparent image-url('module_cutoff.png') repeat-x left bottom;
|
||||
&.NB-story-content-wrapper-height-fudged {
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.NB-story-content-expander {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
bottom: -25px;
|
||||
left: 0;
|
||||
padding: 18px 25px 14px 0;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
color: $more-text-color;
|
||||
font-size: $smallest-font-size;
|
||||
background: #fff;
|
||||
|
||||
.NB-story-content-expander-inner {
|
||||
position: relative;
|
||||
padding: 18px 25px 14px 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $more-text-color-hover;
|
||||
}
|
||||
&:active {
|
||||
color: $more-text-color-active;
|
||||
}
|
||||
|
||||
.NC-story-cutoff {
|
||||
position: absolute;
|
||||
top: -14px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 14px;
|
||||
z-index: 0;
|
||||
background: transparent image-url('module_cutoff.png') repeat-x left bottom;
|
||||
}
|
||||
|
||||
.NB-story-content-expander-text,
|
||||
.NB-story-content-expander-pages {
|
||||
display: inline-block;
|
||||
|
@ -495,6 +466,33 @@ blockquote {
|
|||
}
|
||||
}
|
||||
|
||||
.NB-story-content {
|
||||
font-size: $small-font-size;
|
||||
line-height: 140%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin: 10px 0;
|
||||
|
||||
p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
ins {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
del {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.NB-story-shares-container {
|
||||
text-align: right;
|
||||
color: $light-text-color;
|
||||
|
|
|
@ -20,19 +20,20 @@ NEWSBLUR.Views.SocialPage = Backbone.View.extend({
|
|||
'queue': false
|
||||
},
|
||||
|
||||
flags: {
|
||||
loading_page: false
|
||||
},
|
||||
|
||||
initialize: function() {
|
||||
NEWSBLUR.assets = new NEWSBLUR.SocialPageAssets();
|
||||
NEWSBLUR.router = new NEWSBLUR.Router;
|
||||
this.loading_page = false;
|
||||
this.cached_page_control_y = 0;
|
||||
|
||||
Backbone.history.start({pushState: true});
|
||||
|
||||
// bind scroll to window
|
||||
_.bindAll(this, 'detect_scroll');
|
||||
$(window).scroll(this.detect_scroll);
|
||||
|
||||
// bind login events
|
||||
this.login_view = new NEWSBLUR.Views.SocialPageLoginSignupView({
|
||||
el: this.el
|
||||
});
|
||||
|
@ -43,7 +44,7 @@ NEWSBLUR.Views.SocialPage = Backbone.View.extend({
|
|||
initialize_stories: function($stories) {
|
||||
var self = this;
|
||||
$stories = $stories || this.$el;
|
||||
$('.NB-story-wrapper', $stories).each(function() {
|
||||
$('.NB-shared-story', $stories).each(function() {
|
||||
var $story = $(this);
|
||||
var guid = $story.data('guid');
|
||||
if (!self.stories[guid]) {
|
||||
|
@ -59,22 +60,21 @@ NEWSBLUR.Views.SocialPage = Backbone.View.extend({
|
|||
},
|
||||
|
||||
detect_scroll: function(){
|
||||
if(this.loading_page) {
|
||||
if (this.flags.loading_page) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
var viewport_y = $(window).height() + $(window).scrollTop();
|
||||
|
||||
// this prevents calculating when we are scrolling in previously loaded content
|
||||
if (viewport_y < self.cached_page_control_y) {
|
||||
if (viewport_y < this.cached_page_control_y) {
|
||||
return;
|
||||
}
|
||||
|
||||
var page_control_y = $('.NB-page-controls').last().offset().top - 500;
|
||||
var page_control_y = this.$('.NB-page-controls').last().offset().top - 500;
|
||||
if (viewport_y > page_control_y) {
|
||||
self.cached_page_control_y = page_control_y
|
||||
self.loading_page = true;
|
||||
this.cached_page_control_y = page_control_y;
|
||||
this.flags.loading_page = true;
|
||||
this.next_page();
|
||||
}
|
||||
},
|
||||
|
@ -154,7 +154,7 @@ NEWSBLUR.Views.SocialPage = Backbone.View.extend({
|
|||
var $loaded = $('.NB-page-controls-text-loaded', $controls);
|
||||
var height = $controls.height();
|
||||
var innerheight = $button.height();
|
||||
this.loading_page = false;
|
||||
this.flags.loading_page = false;
|
||||
|
||||
$button.removeClass('NB-loading').addClass('NB-loaded');
|
||||
$button.stop(true).animate({'backgroundColor': '#86B86B'}, {'duration': 750, 'easing': 'easeOutExpo', 'queue': false});
|
||||
|
@ -185,7 +185,7 @@ NEWSBLUR.Views.SocialPage = Backbone.View.extend({
|
|||
});
|
||||
|
||||
this.page -= 1;
|
||||
this.loading_page = false;
|
||||
this.flags.loading_page = false;
|
||||
|
||||
$next.text('Whoops! Something went wrong. Try again.')
|
||||
.animate({'bottom': innerheight}, this.next_animation_options);
|
||||
|
|
|
@ -45,13 +45,13 @@ NEWSBLUR.Views.SocialPageComments = Backbone.View.extend({
|
|||
if (!NEWSBLUR.Globals.is_authenticated) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
console.log(this.page_view);
|
||||
this.page_view.toggle_login_dialog({});
|
||||
this.page_view.login_view.toggle_login_dialog({});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
check_comment_or_login: function(e) {
|
||||
console.log(['check_comment_or_login', e, NEWSBLUR.Globals.is_authenticated, this.page_view.login_view]);
|
||||
if (!NEWSBLUR.Globals.is_authenticated) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
|
|
@ -33,7 +33,7 @@ NEWSBLUR.Views.SocialPageLoginSignupView = Backbone.View.extend({
|
|||
$popover.removeClass('NC-active');
|
||||
}, this)
|
||||
});
|
||||
$(document).unbind('click.loginView');
|
||||
$(document).unbind('mousedown.loginView');
|
||||
} else {
|
||||
// Open/resize
|
||||
this.$('.NB-error').remove();
|
||||
|
@ -61,9 +61,9 @@ NEWSBLUR.Views.SocialPageLoginSignupView = Backbone.View.extend({
|
|||
.bind('keydown.login', 'meta+return', login)
|
||||
.bind('keydown.login', 'return', login);
|
||||
|
||||
// _.defer(_.bind(function() {
|
||||
// $(document).bind('click.loginView', _.bind(this.hide_popovers, this));
|
||||
// }, this));
|
||||
_.defer(_.bind(function() {
|
||||
$(document).bind('mousedown.loginView', _.bind(this.hide_popovers, this));
|
||||
}, this));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -87,7 +87,7 @@ NEWSBLUR.Views.SocialPageLoginSignupView = Backbone.View.extend({
|
|||
}, this)
|
||||
});
|
||||
|
||||
$(document).unbind('click.loginView');
|
||||
$(document).unbind('mousedown.loginView');
|
||||
} else {
|
||||
$other_popover.removeClass('NC-active');
|
||||
$popover.addClass('NC-active');
|
||||
|
@ -113,9 +113,9 @@ NEWSBLUR.Views.SocialPageLoginSignupView = Backbone.View.extend({
|
|||
.bind('keydown.invite', 'meta+return', request_invite)
|
||||
.bind('keydown.invite', 'return', request_invite);
|
||||
|
||||
// _.defer(_.bind(function() {
|
||||
// $(document).bind('click.loginView', _.bind(this.hide_popovers, this));
|
||||
// }, this));
|
||||
_.defer(_.bind(function() {
|
||||
$(document).bind('mousedown.loginView', _.bind(this.hide_popovers, this));
|
||||
}, this));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -126,7 +126,7 @@ NEWSBLUR.Views.SocialPageLoginSignupView = Backbone.View.extend({
|
|||
if (($(e.target).closest(".NC-popover").length) || ($(e.target).closest(".NC-button").length)) return;
|
||||
}
|
||||
|
||||
$(document).unbind('click.loginView');
|
||||
$(document).unbind('mousedown.loginView');
|
||||
// Close
|
||||
$popover.animate({
|
||||
'opacity': 0
|
||||
|
@ -157,7 +157,7 @@ NEWSBLUR.Views.SocialPageLoginSignupView = Backbone.View.extend({
|
|||
|
||||
post_login: function(data) {
|
||||
NEWSBLUR.log(["login data", data]);
|
||||
window.location.reload()
|
||||
window.location.reload();
|
||||
},
|
||||
|
||||
login_error: function(data) {
|
||||
|
@ -172,7 +172,7 @@ NEWSBLUR.Views.SocialPageLoginSignupView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
post_logout: function(data) {
|
||||
window.location.reload()
|
||||
window.location.reload();
|
||||
},
|
||||
|
||||
logout_error: function(data) {
|
||||
|
|
|
@ -30,15 +30,13 @@ NEWSBLUR.Views.SocialPageStory = Backbone.View.extend({
|
|||
shared: shared
|
||||
});
|
||||
|
||||
this.page_view = this.options.page_view;
|
||||
|
||||
this.story_guid = story_guid;
|
||||
|
||||
this.comments_view = new NEWSBLUR.Views.SocialPageComments({
|
||||
el: this.$('.NB-story-comments-container'),
|
||||
model: this.model,
|
||||
story_view: this,
|
||||
page_view: this.page_view,
|
||||
page_view: this.options.page_view
|
||||
});
|
||||
this.model.social_page_comments = this.comments_view;
|
||||
|
||||
|
@ -265,7 +263,7 @@ NEWSBLUR.Views.SocialPageStory = Backbone.View.extend({
|
|||
});
|
||||
|
||||
$expander.add($expander_cutoff).animate({
|
||||
bottom: -1 * $expander.outerHeight()
|
||||
bottom: -1 * $expander.outerHeight() - 25
|
||||
}, {
|
||||
duration: options.instant ? 0 : Math.min(2 * 1000, parseInt(200 * height_ratio, 10)),
|
||||
easing: 'easeInOutQuart'
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{% load utils_tags social_tags %}
|
||||
|
||||
<div class="NB-mark">
|
||||
<div class="NB-shared-story NB-mark {% if story.saved %}NB-story-saved{% endif %} {% if story.shared_by_user %}NB-story-shared{% endif %}" data-feed-id="{{ story.story_feed_id }}" data-story-id="{{ story.id }}" data-guid="{{ story.guid_hash }}" {% if story.user_comments %}data-user-comments="{{ story.user_comments }}"{% endif %}>
|
||||
<div class="NB-divider"></div>
|
||||
|
||||
<div class="NB-story-wrapper" style="border-color: #{{ story.feed.favicon_border }};" data-feed-id="{{ story.story_feed_id }}" data-story-id="{{ story.id }}" data-guid="{{ story.guid_hash }}" {% if story.user_comments %}data-user-comments="{{ story.user_comments }}"{% endif %}>
|
||||
<div class="NB-story" style="border-color: #{{ story.feed.favicon_border }};">
|
||||
<div class="NB-story-inner" style="border-color: #{{ story.feed.favicon_color }};">
|
||||
|
||||
<div class="NB-story-header-wrapper">
|
||||
<div class="NB-story-header">
|
||||
<h2 class="NB-story-title">
|
||||
|
@ -51,27 +52,30 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="NB-story {% if story.saved %}NB-story-saved{% endif %} {% if story.shared_by_user %}NB-story-shared{% endif %}">
|
||||
|
||||
<div class="NB-story-content-wrapper">
|
||||
<div class="NB-story-content">
|
||||
{{ story.story_content|safe }}
|
||||
</div>
|
||||
<div class="NC-story-cutoff"></div>
|
||||
<div class="NB-story-content-expander">
|
||||
<div class="NB-story-content-wrapper">
|
||||
<div class="NB-story-content">
|
||||
{{ story.story_content|safe }}
|
||||
</div>
|
||||
<div class="NB-story-content-expander">
|
||||
<div class="NB-story-content-expander-inner">
|
||||
<div class="NC-story-cutoff"></div>
|
||||
<div class="NB-story-content-expander-text">Read the whole story</div>
|
||||
<div class="NB-story-content-expander-pages"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- end NB-story-wrapper -->
|
||||
</div>
|
||||
|
||||
<div class="NB-story-comments-container">
|
||||
{% if story.comment_count or not story.shared_by_user %}
|
||||
{% render_story_comments story %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{# <div class="NB-feed-story-sideoptions-container"> #}
|
||||
{# {% if not user.is_authenticated %} #}
|
||||
{# <div class="NB-sideoption NB-feed-story-login"> #}
|
||||
|
|
Loading…
Add table
Reference in a new issue