Commit cd4a0e0672eb59c07726feaf7e19a708c6beecfb
Exists in
master
and in
28 other branches
Merge branch 'stable'
Conflicts: app/views/content_viewer/view_page.rhtml public/stylesheets/application.css
Showing
5 changed files
with
24 additions
and
13 deletions
Show diff stats
app/models/external_feed.rb
@@ -19,9 +19,15 @@ class ExternalFeed < ActiveRecord::Base | @@ -19,9 +19,15 @@ class ExternalFeed < ActiveRecord::Base | ||
19 | article.valid? | 19 | article.valid? |
20 | end | 20 | end |
21 | 21 | ||
22 | + def address=(new_address) | ||
23 | + self.fetched_at = nil unless address == new_address | ||
24 | + super(new_address) | ||
25 | + end | ||
26 | + | ||
22 | def clear | 27 | def clear |
23 | # do nothing | 28 | # do nothing |
24 | end | 29 | end |
30 | + | ||
25 | def finish_fetch | 31 | def finish_fetch |
26 | if self.only_once && self.update_errors.zero? | 32 | if self.only_once && self.update_errors.zero? |
27 | self.enabled = false | 33 | self.enabled = false |
app/views/profile/_common.rhtml
1 | - | ||
2 | -<script type="text/javascript"> | ||
3 | - jQuery( function() { | ||
4 | - var parent_selector = '.profile-wall-description, .profile-activity-description, .profile-network-description'; | ||
5 | - var child_selector = '.icon-delete, .icon-reply'; | ||
6 | - jQuery(parent_selector).live('mouseover', function () { jQuery(this).find(child_selector).css('visibility', 'visible'); }); | ||
7 | - jQuery(parent_selector).live('mouseout', function () { jQuery(this).find(child_selector).css('visibility', 'hidden'); }); | ||
8 | - }); | ||
9 | -</script> | ||
10 | - | ||
11 | <% unless @action %> | 1 | <% unless @action %> |
12 | <% cache_timeout(profile.cache_key + '-profile-general-info', 4.hours) do %> | 2 | <% cache_timeout(profile.cache_key + '-profile-general-info', 4.hours) do %> |
13 | <tr> | 3 | <tr> |
public/stylesheets/application.css
@@ -5234,8 +5234,8 @@ li.profile-activity-item.upload_image .activity-gallery-images-count-1 img { | @@ -5234,8 +5234,8 @@ li.profile-activity-item.upload_image .activity-gallery-images-count-1 img { | ||
5234 | display: none; | 5234 | display: none; |
5235 | } | 5235 | } |
5236 | 5236 | ||
5237 | -#profile-wall .profile-wall-activities-comments .article-comment:hover .button-bar, | ||
5238 | -#profile-network .profile-wall-activities-comments .article-comment:hover .button-bar { | 5237 | +#profile-wall .profile-wall-activities-comments .comment-content:hover .button-bar, |
5238 | +#profile-network .profile-wall-activities-comments .comment-content:hover .button-bar { | ||
5239 | display: block; | 5239 | display: block; |
5240 | } | 5240 | } |
5241 | 5241 |
public/stylesheets/search.css
@@ -675,10 +675,14 @@ li.search-product-item hr { | @@ -675,10 +675,14 @@ li.search-product-item hr { | ||
675 | height: 34px; | 675 | height: 34px; |
676 | display: inline-block; | 676 | display: inline-block; |
677 | } | 677 | } |
678 | -.search-field .formfield input { | 678 | +.box-1 .search-field .formfield input { |
679 | height: 25px; | 679 | height: 25px; |
680 | width: 530px; | 680 | width: 530px; |
681 | } | 681 | } |
682 | +.box-2 .search-field .formfield input, | ||
683 | +.box-3 .search-field .formfield input { | ||
684 | + width: 165px; | ||
685 | +} | ||
682 | #public-profile-search .search-field .formfield input { | 686 | #public-profile-search .search-field .formfield input { |
683 | height: 25px; | 687 | height: 25px; |
684 | width: 395px; | 688 | width: 395px; |
test/unit/external_feed_test.rb
@@ -83,6 +83,7 @@ class ExternalFeedTest < ActiveSupport::TestCase | @@ -83,6 +83,7 @@ class ExternalFeedTest < ActiveSupport::TestCase | ||
83 | should 'have empty fetch date by default' do | 83 | should 'have empty fetch date by default' do |
84 | assert_nil ExternalFeed.new.fetched_at | 84 | assert_nil ExternalFeed.new.fetched_at |
85 | end | 85 | end |
86 | + | ||
86 | should 'set fetch date when finishing fetch' do | 87 | should 'set fetch date when finishing fetch' do |
87 | feed = ExternalFeed.new | 88 | feed = ExternalFeed.new |
88 | feed.stubs(:save!) | 89 | feed.stubs(:save!) |
@@ -90,6 +91,16 @@ class ExternalFeedTest < ActiveSupport::TestCase | @@ -90,6 +91,16 @@ class ExternalFeedTest < ActiveSupport::TestCase | ||
90 | assert_not_nil feed.fetched_at | 91 | assert_not_nil feed.fetched_at |
91 | end | 92 | end |
92 | 93 | ||
94 | + should 'have empty fetch when change address' do | ||
95 | + feed = ExternalFeed.new | ||
96 | + feed.stubs(:save!) | ||
97 | + feed.address = 'http://localhost/example_feed' | ||
98 | + feed.finish_fetch | ||
99 | + assert_not_nil feed.fetched_at | ||
100 | + feed.address = 'http://localhost/other_example_feed' | ||
101 | + assert_nil feed.fetched_at | ||
102 | + end | ||
103 | + | ||
93 | should 'expire feeds after a certain period' do | 104 | should 'expire feeds after a certain period' do |
94 | # save current time | 105 | # save current time |
95 | now = Time.now | 106 | now = Time.now |