mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 13:24:24 -07:00
HotKey navigation help
This commit is contained in:
parent
a1ac9cfee8
commit
8e47676fda
1 changed files with 46 additions and 16 deletions
|
@ -163,10 +163,47 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
shortcut.add("a", function(){
|
shortcut.add("a", function(evt){
|
||||||
if($('.l-sort__create-btn')[0]){
|
if (!evt.ctrlKey && !evt.shiftKey) {
|
||||||
|
if ($('.l-sort__create-btn')[0]) {
|
||||||
location.href=$('.l-sort__create-btn').attr('href');
|
location.href=$('.l-sort__create-btn').attr('href');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'type': 'keyup',
|
||||||
|
'propagate': false,
|
||||||
|
'disable_in_input': true,
|
||||||
|
'target': document
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
shortcut.add("n", function(evt){
|
||||||
|
if (!evt.ctrlKey && !evt.shiftKey) {
|
||||||
|
if ($('.l-sort__create-btn')[0]) {
|
||||||
|
location.href=$('.l-sort__create-btn').attr('href');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'type': 'keyup',
|
||||||
|
'propagate': false,
|
||||||
|
'disable_in_input': true,
|
||||||
|
'target': document
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
shortcut.add("Ctrl+m", function(evt){
|
||||||
|
console.log('ctrl+m');
|
||||||
|
}, {
|
||||||
|
'type': 'keyup',
|
||||||
|
'propagate': false,
|
||||||
|
'disable_in_input': true,
|
||||||
|
'target': document
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
shortcut.add("m", function(evt){
|
||||||
|
console.log('m');
|
||||||
}, {
|
}, {
|
||||||
'type': 'keyup',
|
'type': 'keyup',
|
||||||
'propagate': false,
|
'propagate': false,
|
||||||
|
@ -417,29 +454,22 @@
|
||||||
$('.shortcuts').hide();
|
$('.shortcuts').hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*jQuery('.ch-toggle').bind('change', function(evt) {
|
|
||||||
evt.stopImmediatePropagation();
|
|
||||||
console.log(123);
|
|
||||||
});*/
|
|
||||||
|
|
||||||
VE.core.register();
|
VE.core.register();
|
||||||
if (location.href.search(/list/) != -1) {
|
if (location.href.search(/list/) != -1) {
|
||||||
var shift_select_ref = $('body').finderSelect({children: '.l-unit',
|
var shift_select_ref = $('body').finderSelect({children: '.l-unit',
|
||||||
'onFinish': function(evt) {
|
'onFinish': function(evt) {
|
||||||
/*var ref = $(evt.target);
|
var ref = $(evt.target);
|
||||||
$('.l-content').find('.l-unit .ch-toggle').attr('checked', false);
|
$('.l-content').find('.l-unit .ch-toggle').attr('checked', false);
|
||||||
$('.l-content').find('.l-unit.selected .ch-toggle').attr('checked', true);
|
$('.l-content').find('.l-unit.selected .ch-toggle').attr('checked', true);
|
||||||
|
|
||||||
|
|
||||||
if ($('.l-content').find('.l-unit.selected').length == $('.l-content').find('.l-unit').length) {
|
if ($('.l-content').find('.l-unit.selected').length == $('.l-content').find('.l-unit').length) {
|
||||||
$('.toggle-all').addClass('clicked-on');
|
$('.toggle-all').addClass('clicked-on');
|
||||||
}*/
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
'toggleAllHook': function() {
|
'toggleAllHook': function() {
|
||||||
/*if ($('.l-unit').length == $('.ch-toggle:checked').length) {
|
if ($('.l-unit').length == $('.ch-toggle:checked').length) {
|
||||||
$('.l-unit.selected').removeClass('selected');
|
$('.l-unit.selected').removeClass('selected');
|
||||||
$('.ch-toggle').attr('checked', false);
|
$('.ch-toggle').attr('checked', false);
|
||||||
$('#toggle-all').attr('checked', false);
|
$('#toggle-all').attr('checked', false);
|
||||||
|
@ -447,7 +477,7 @@
|
||||||
else {
|
else {
|
||||||
$('.ch-toggle').attr('checked', true);
|
$('.ch-toggle').attr('checked', true);
|
||||||
$('#toggle-all').attr('checked', true);
|
$('#toggle-all').attr('checked', true);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('table').on('mousedown', 'td', function(e) {
|
$('table').on('mousedown', 'td', function(e) {
|
||||||
|
@ -469,7 +499,7 @@
|
||||||
<div class="close"></div>
|
<div class="close"></div>
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="key">a</span>Go to add form</li>
|
<li><span class="key">n</span>Add New object</li>
|
||||||
<li><span class="key"><Ctrl> + Enter</span>Save Form</li>
|
<li><span class="key"><Ctrl> + Enter</span>Save Form</li>
|
||||||
<li class="step-top"><span class="key"><Ctrl> + Backspace</span>Cancel saving form</li>
|
<li class="step-top"><span class="key"><Ctrl> + Backspace</span>Cancel saving form</li>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue