feat(torrents): add music torrent MTV flag

This commit is contained in:
OldHawk
2017-10-05 02:34:22 +08:00
parent e119f19470
commit 78708d6276
2 changed files with 8 additions and 5 deletions

View File

@@ -19,10 +19,11 @@
scope.$watch(attrs.musicDisk, function (s) {
if (s && s.torrent_type === 'music') {
var border_color = '#515151';
if (s.torrent_tags.indexOf('MTV') !== -1) {
var div1 = angular.element('<div>MTV</div>');
div1.addClass('music-badge');
var div1 = angular.element('<div>MTV</div>');
div1.addClass('music-badge');
if (s.torrent_tags.indexOf('MTV') !== -1) {
border_color = '#d9534f';
}
@@ -65,7 +66,9 @@
cir2.append(cir3);
cir3.append(cir4);
element.parent().append(div1);
if (s.torrent_tags.indexOf('MTV') !== -1) {
element.parent().append(div1);
}
element.replaceWith(cir1);
}
});

View File

@@ -88,7 +88,7 @@
var hasme = false;
var meitem = null;
if(newValue && oldValue) {
if (newValue && oldValue) {
if (newValue._replies.length > oldValue._replies.length) {
angular.forEach(newValue._replies, function (n) {
if (oldValue._replies.indexOf(n) < 0) {