mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-05 16:49:45 +00:00
Fancy arrows for the feature board.
This commit is contained in:
parent
0058768132
commit
d90117aa46
3 changed files with 37 additions and 11 deletions
|
@ -1846,17 +1846,33 @@ background: transparent;
|
|||
width: 16px;
|
||||
height: 16px;
|
||||
float: right;
|
||||
margin: 0 4px;
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
.NB-module-features .NB-features-direction.NB-disabled {
|
||||
opacity: .25;
|
||||
}
|
||||
|
||||
|
||||
.NB-module-features .NB-features-next-page {
|
||||
background: transparent url('../img/icons/silk/control_play.png') no-repeat 0 0;
|
||||
}
|
||||
.NB-module-features .NB-features-next-page:hover {
|
||||
background: transparent url('../img/icons/silk/control_play_blue.png') no-repeat 0 0;
|
||||
}
|
||||
.NB-module-features .NB-features-next-page.NB-disabled:hover {
|
||||
background: transparent url('../img/icons/silk/control_play.png') no-repeat 0 0;
|
||||
cursor: default;
|
||||
}
|
||||
.NB-module-features .NB-features-previous-page {
|
||||
background: transparent url('../img/icons/mini/action_back.gif') no-repeat 0 0;
|
||||
background: transparent url('../img/icons/silk/control_play_left.png') no-repeat 0 0;
|
||||
}
|
||||
.NB-module-features .NB-features-previous-page:hover {
|
||||
background: transparent url('../img/icons/silk/control_play_left_blue.png') no-repeat 0 0;
|
||||
}
|
||||
.NB-module-features .NB-features-previous-page.NB-disabled:hover {
|
||||
background: transparent url('../img/icons/silk/control_play_left.png') no-repeat 0 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.NB-module-features .NB-module-feature td {
|
||||
|
|
|
@ -2191,24 +2191,19 @@
|
|||
|
||||
load_feature_page: function(direction) {
|
||||
var self = this;
|
||||
var $next = $('.NB-features-next-page');
|
||||
var $previous = $('.NB-features-previous-page');
|
||||
|
||||
if (direction == -1 && !this.cache['feature_page']) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.flags['features_last_page']) {
|
||||
if (direction == 1 && this.flags['features_last_page']) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.model.get_features_page(this.cache['feature_page']+direction, function(features) {
|
||||
self.cache['feature_page'] += direction;
|
||||
|
||||
var features_count = features.length;
|
||||
if (features_count < 4) {
|
||||
self.flags['features_last_page'] = true;
|
||||
$('.NB-features-next-page').fadeOut(500);
|
||||
}
|
||||
|
||||
var $table = $.make('table', { cellSpacing: 0, cellPadding: 0 });
|
||||
for (var f in features) {
|
||||
var feature = features[f];
|
||||
|
@ -2221,6 +2216,21 @@
|
|||
}
|
||||
|
||||
$('.NB-module-features table').replaceWith($table);
|
||||
|
||||
var features_count = features.length;
|
||||
if (features_count < 4) {
|
||||
$next.addClass('NB-disabled');
|
||||
self.flags['features_last_page'] = true;
|
||||
} else {
|
||||
$next.removeClass('NB-disabled');
|
||||
self.flags['features_last_page'] = false;
|
||||
}
|
||||
if (self.cache['feature_page'] > 0) {
|
||||
$previous.removeClass('NB-disabled');
|
||||
} else {
|
||||
$previous.addClass('NB-disabled');
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
New Features
|
||||
<div class="NB-module-header-right">
|
||||
<a href="#" class="NB-features-direction NB-features-next-page"></a>
|
||||
{# <a href="#" class="NB-features-direction NB-features-previous-page NB-disabled"></a> #}
|
||||
<a href="#" class="NB-features-direction NB-features-previous-page NB-disabled"></a>
|
||||
{% if user.is_staff %}
|
||||
<div class="NB-features-add">
|
||||
<a href="#" id="add-feature-button">Add</a> |
|
||||
|
|
Loading…
Add table
Reference in a new issue