Skip to content

Commit 1643392

Browse files
committed
Items editor images active
1 parent e10cb32 commit 1643392

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/app/items/editor/item-editor.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ $(function(){
44
$('.images-container').sortable({
55
animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
66
handle: ".control-btn.move", // Drag handle selector within list items
7-
filter: ".image-container.new", // Selectors that do not lead to dragging (String or Function)
87
draggable: ".image-container" // Specifies which items inside the element should be sortable
98
});
109

10+
1111
$controlsButtons = $('.controls');
1212

1313
$controlsButtonsStar = $controlsButtons.find('.star');
@@ -16,9 +16,12 @@ $(function(){
1616
$controlsButtonsStar.on('click',function(e){
1717
e.preventDefault();
1818

19-
$controlsButtonsStar.removeClass('active')
19+
$controlsButtonsStar.removeClass('active');
20+
$controlsButtonsStar.parents('.image-container').removeClass('main');
2021

2122
$(this).addClass('active');
23+
24+
$(this).parents('.image-container').addClass('main');
2225
})
2326

2427
})

src/app/items/editor/item-editor.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@
108108
}
109109
}
110110

111+
.image-container.main {
112+
border-color: #FFB300;
113+
}
114+
111115
.image-container.new {
112116
opacity: 0.6;
113117
transition: opacity 0.3s ease;

0 commit comments

Comments
 (0)