parent
523f1e848e
commit
a37d9d532b
10 changed files with 27 additions and 26 deletions
|
|
@ -20,7 +20,7 @@ app.views.Notifications = Backbone.View.extend({
|
|||
else { this.setUnread(guid); }
|
||||
},
|
||||
|
||||
getAllUnread: function(){ return $(".media.stream-element.unread"); },
|
||||
getAllUnread: function() { return $(".media.stream-element.unread"); },
|
||||
|
||||
setRead: function(guid) { this.setUnreadStatus(guid, false); },
|
||||
|
||||
|
|
|
|||
|
|
@ -90,23 +90,27 @@ app.views.StreamShortcuts = Backbone.View.extend({
|
|||
},
|
||||
|
||||
commentSelected: function() {
|
||||
$('a.focus_comment_textarea',this.$('div.stream-element.loaded.shortcut_selected')).click();
|
||||
this.shortcutSelected().find("a.focus_comment_textarea").click();
|
||||
},
|
||||
|
||||
likeSelected: function() {
|
||||
$('a.like:first',this.$('div.stream-element.loaded.shortcut_selected')).click();
|
||||
this.shortcutSelected().find("a.like:first").click();
|
||||
},
|
||||
|
||||
reshareSelected: function() {
|
||||
$('a.reshare:first',this.$('div.stream-element.loaded.shortcut_selected')).click();
|
||||
this.shortcutSelected().find("a.reshare:first").click();
|
||||
},
|
||||
|
||||
expandSelected: function() {
|
||||
$('div.expander:first',this.$('div.stream-element.loaded.shortcut_selected')).click();
|
||||
this.shortcutSelected().find("div.expander:first").click();
|
||||
},
|
||||
|
||||
shortcutSelected: function() {
|
||||
return this.$("div.stream-element.loaded.shortcut_selected");
|
||||
},
|
||||
|
||||
openFirstLinkSelected: function() {
|
||||
var link = $('div.collapsible a[target="_blank"]:first',this.$('div.stream-element.loaded.shortcut_selected'));
|
||||
var link = $("div.collapsible a[target='_blank']:first");
|
||||
if(link.length > 0) {
|
||||
// click does only work with vanilla javascript
|
||||
link[0].click();
|
||||
|
|
@ -115,12 +119,11 @@ app.views.StreamShortcuts = Backbone.View.extend({
|
|||
|
||||
selectPost: function(element){
|
||||
//remove the selection and selected-class from all posts
|
||||
var selected=this.$('div.stream-element.loaded.shortcut_selected');
|
||||
selected.removeClass('shortcut_selected').removeClass('highlighted');
|
||||
this.shortcutSelected().removeClass("shortcut_selected").removeClass("highlighted");
|
||||
//move to new post
|
||||
window.scrollTo(window.pageXOffset, Math.round($(element).offset().top - this._headerSize));
|
||||
//add the selection and selected-class to new post
|
||||
element.className+=" shortcut_selected highlighted";
|
||||
},
|
||||
}
|
||||
});
|
||||
// @license-end
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
app.views.StreamPost = app.views.Post.extend({
|
||||
templateName: "stream-element",
|
||||
className : "stream-element loaded",
|
||||
className: "stream-element loaded",
|
||||
|
||||
subviews : {
|
||||
".feedback": "feedbackView",
|
||||
|
|
|
|||
|
|
@ -108,14 +108,6 @@ textarea { resize: vertical; }
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.stream-element:not(.shield-active) .shield{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.stream-element.shield-active .nsfw-hidden{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.login_error,
|
||||
.login_alert {
|
||||
color: #DF0101;
|
||||
|
|
@ -195,6 +187,11 @@ footer {
|
|||
padding: 0; }
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&.shield-active .nsfw-hidden,
|
||||
&:not(.shield-active) .shield {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.photo_attachments {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.media.stream-element{:data=>{:guid => note.id, :type => (Notification.types.key(note.type) || '') }, :class => (note.unread ? 'unread' : 'read')}
|
||||
.media.stream-element{data: {guid: note.id, type: (Notification.types.key(note.type) || "")},
|
||||
class: (note.unread ? "unread" : "read")}
|
||||
.unread-toggle.pull-right
|
||||
%i.entypo-eye{title: (note.unread ? t("notifications.index.mark_read") : t("notifications.index.mark_unread"))}
|
||||
- if note.type == "Notifications::StartedSharing" && (!defined?(no_aspect_dropdown) || !no_aspect_dropdown)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
= locale_date(date)
|
||||
%ul.notifications_for_day
|
||||
- notes.each do |note|
|
||||
.stream-element{data: {guid: note.id}, class: "#{note.unread ? "unread" : "read"}"}
|
||||
.stream-element{data: {guid: note.id}, class: (note.unread ? "unread" : "read")}
|
||||
.content.from
|
||||
.media
|
||||
.media-left
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#people_stream
|
||||
- people.each do |person|
|
||||
.media.stream-element{:id => person.id}
|
||||
.media.stream-element{id: person.id}
|
||||
.media-object.pull-left
|
||||
= person_image_link(person, :size => :thumb_small)
|
||||
.media-body
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#show_content.photos
|
||||
.photo
|
||||
= image_tag photo.url(:scaled_full)
|
||||
.stream-element{:class => "photo_mobile"}
|
||||
.stream-element.photo_mobile
|
||||
.content
|
||||
.from.media
|
||||
.media-left
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
= timeago(post.created_at)
|
||||
%span.via
|
||||
- if post.provider_display_name == "mobile"
|
||||
= t('shared.stream-element.via_mobile', link: nil)
|
||||
= t("shared.stream_element.via_mobile", link: nil)
|
||||
–
|
||||
%span.scope_scope
|
||||
- if post.public?
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ Then /^the "([^"]*)" field(?: within "([^"]*)")? should be filled with "([^"]*)"
|
|||
end
|
||||
|
||||
Then /^I should see (\d+) contacts$/ do |n_posts|
|
||||
has_css?("#people_stream .stream-element", :count => n_posts.to_i).should be true
|
||||
has_css?("#people_stream .stream-element", count: n_posts.to_i).should be true
|
||||
end
|
||||
|
||||
And /^I scroll down$/ do
|
||||
|
|
@ -245,11 +245,11 @@ When /^I resize my window to 800x600$/ do
|
|||
end
|
||||
|
||||
Then 'I should see an image attached to the post' do
|
||||
step %{I should see a "img" within ".stream-element div.photo_attachments"}
|
||||
step %(I should see a "img" within ".stream-element div.photo_attachments")
|
||||
end
|
||||
|
||||
Then 'I press the attached image' do
|
||||
step %{I press the 1st "img" within ".stream-element div.photo_attachments"}
|
||||
step %(I press the 1st "img" within ".stream-element div.photo_attachments")
|
||||
end
|
||||
|
||||
And "I wait for the popovers to appear" do
|
||||
|
|
|
|||
Loading…
Reference in a new issue