forked from 0x2620/pandora
update style of selected news items
This commit is contained in:
parent
dc32a0ee02
commit
9821a579d4
1 changed files with 5 additions and 5 deletions
|
@ -9,8 +9,8 @@ pandora.ui.news = function(width, height) {
|
||||||
$right = $('<div>')
|
$right = $('<div>')
|
||||||
.css({position: 'absolute', top: '16px', right: '16px', width: '192px'})
|
.css({position: 'absolute', top: '16px', right: '16px', width: '192px'})
|
||||||
.appendTo(that),
|
.appendTo(that),
|
||||||
color = Ox.Theme() == 'classic'
|
backgroundColor = Ox.Theme() == 'classic'
|
||||||
? 'rgb(32, 32, 32)' : 'rgb(224, 224, 224)',
|
? 'rgb(224, 224, 224)' : 'rgb(32, 32, 32)',
|
||||||
isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level],
|
isEditable = pandora.site.capabilities.canEditSitePages[pandora.user.level],
|
||||||
items = [],
|
items = [],
|
||||||
selected,
|
selected,
|
||||||
|
@ -166,7 +166,7 @@ pandora.ui.news = function(width, height) {
|
||||||
padding: '4px 8px 5px 8px',
|
padding: '4px 8px 5px 8px',
|
||||||
borderRadius: '8px',
|
borderRadius: '8px',
|
||||||
margin: '2px',
|
margin: '2px',
|
||||||
boxShadow: item.id == selected ? '0 0 2px ' + color : '',
|
backgroundColor: item.id == selected ? backgroundColor : '',
|
||||||
cursor: 'pointer'
|
cursor: 'pointer'
|
||||||
})
|
})
|
||||||
.html(
|
.html(
|
||||||
|
@ -178,8 +178,8 @@ pandora.ui.news = function(width, height) {
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
anyclick: function() {
|
anyclick: function() {
|
||||||
selected = item.id;
|
selected = item.id;
|
||||||
$('.item').css({boxShadow: 'none'});
|
$('.item').css({backgroundColor: 'transparent'});
|
||||||
this.css({boxShadow: '0 0 2px ' + color});
|
this.css({backgroundColor: backgroundColor});
|
||||||
renderItem();
|
renderItem();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue