Skip to content

Commit a35fa78

Browse files
committed
FileManager stuff
1 parent 264b851 commit a35fa78

File tree

2 files changed

+85
-4
lines changed

2 files changed

+85
-4
lines changed

web/css/styles.min.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,10 @@ input[type="checkbox"] {
711711
background-color: #ff6701;
712712
}
713713

714+
.l-menu.active .l-menu__item.focus a {
715+
text-decoration: underline;
716+
color: #5edad0;
717+
}
714718

715719
.lang-ua .l-menu__item a,
716720
.lang-nl .l-menu__item a,
@@ -808,14 +812,15 @@ input[type="checkbox"] {
808812
border-bottom: 3px solid #ff6e42;
809813
}
810814

811-
.l-stat__col.focus {
812-
background-color: #ddd;
815+
.l-stat.active .l-stat__col.focus a {
816+
border-bottom: 3px solid #5edad0;
813817
}
814-
.l-stat__col.focus a {
815-
border-bottom: 3px solid #AACC0D;
818+
.l-stat.active .l-stat__col.focus a .l-stat__col-title {
819+
color: #36B3A9;
816820
}
817821

818822

823+
819824
.l-stat__col a:hover .l-stat__col-title {
820825
color: #ff6701;
821826
}

web/js/events.js

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
// Init kinda namespace object
22
var VE = { // Vesta Events object
33
core: {}, // core functions
4+
navigation: {
5+
state: {
6+
active_menu: 1,
7+
menu_selector: '.l-stat__col',
8+
menu_active_selector: '.l-stat__col--active'
9+
}
10+
}, // menu and element navigation functions
411
callbacks: { // events callback functions
512
click: {},
613
mouseover: {},
@@ -225,6 +232,75 @@ VE.helpers.refresh_timer = {
225232
}
226233
}
227234

235+
VE.navigation.enter_focused = function() {
236+
if($(VE.navigation.state.menu_selector + '.focus a').attr('href')){
237+
location.href=($(VE.navigation.state.menu_selector + '.focus a').attr('href'));
238+
}
239+
}
240+
241+
VE.navigation.move_focus_left = function(){
242+
var index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_selector+'.focus')));
243+
if(index == -1)
244+
index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_active_selector)));
245+
if(index > 0){
246+
$(VE.navigation.state.menu_selector).removeClass('focus');
247+
$($(VE.navigation.state.menu_selector)[index-1]).addClass('focus');
248+
} else {
249+
$($(VE.navigation.state.menu_selector)[0]).addClass('focus');
250+
}
251+
}
228252

253+
VE.navigation.move_focus_right = function(){
254+
var max_index = $(VE.navigation.state.menu_selector).length-1;
255+
var index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_selector+'.focus')));
256+
if(index == -1)
257+
index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_active_selector))) || 0;
258+
259+
if(index < max_index){
260+
$(VE.navigation.state.menu_selector).removeClass('focus');
261+
$($(VE.navigation.state.menu_selector)[index+1]).addClass('focus');
262+
}
263+
}
264+
265+
VE.navigation.switch_menu = function(){
266+
if(VE.navigation.state.active_menu == 0){
267+
VE.navigation.state.active_menu = 1;
268+
VE.navigation.state.menu_selector = '.l-stat__col';
269+
VE.navigation.state.menu_active_selector = '.l-stat__col--active';
270+
$('.l-menu').removeClass('active');
271+
$('.l-stat').addClass('active');
272+
} else {
273+
VE.navigation.state.active_menu = 0;
274+
VE.navigation.state.menu_selector = '.l-menu__item';
275+
VE.navigation.state.menu_active_selector = '.l-menu__item--active';
276+
$('.l-menu').addClass('active');
277+
$('.l-stat').removeClass('active');
278+
}
279+
280+
281+
var index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_selector+'.focus')));
282+
if(index == -1){
283+
index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_active_selector))) || 0;
284+
if(index == -1)
285+
index = 0;
286+
$($(VE.navigation.state.menu_selector)[index]).addClass('focus');
287+
}
288+
}
289+
290+
VE.navigation.init = function(){
291+
if($('.l-menu__item.l-menu__item--active').length){
292+
// VE.navigation.switch_menu();
293+
VE.navigation.state.active_menu = 0;
294+
VE.navigation.state.menu_selector = '.l-menu__item';
295+
VE.navigation.state.menu_active_selector = '.l-menu__item--active';
296+
$('.l-menu').addClass('active');
297+
$('.l-stat').removeClass('active');
298+
299+
} else {
300+
$('.l-stat').addClass('active');
301+
}
302+
}
229303

230304
VE.helpers.extendPasswordFields();
305+
306+

0 commit comments

Comments
 (0)