mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-06-26 12:31:47 +02:00
[refactor] link tab index
This commit is contained in:
parent
b6700fd250
commit
5b8fda836d
@ -1809,10 +1809,10 @@ var control = (function() {
|
||||
var _edit = function() {
|
||||
if (state.get().link.edit) {
|
||||
helper.addClass(html, "is-link-edit");
|
||||
link.tabIndex();
|
||||
link.render.tabIndex();
|
||||
} else {
|
||||
helper.removeClass(html, "is-link-edit");
|
||||
link.tabIndex();
|
||||
link.render.tabIndex();
|
||||
};
|
||||
};
|
||||
var _date = function() {
|
||||
|
12
js/link.js
12
js/link.js
@ -61,7 +61,7 @@ var link = (function() {
|
||||
data.save();
|
||||
clear();
|
||||
render.link();
|
||||
tabIndex();
|
||||
render.tabIndex();
|
||||
control.dependents();
|
||||
control.render();
|
||||
resetStagedBookmarkData();
|
||||
@ -114,7 +114,7 @@ var link = (function() {
|
||||
data.save();
|
||||
clear();
|
||||
render.link();
|
||||
tabIndex();
|
||||
render.tabIndex();
|
||||
_returnToPreviousFocusLink();
|
||||
resetStagedBookmarkData();
|
||||
},
|
||||
@ -514,6 +514,9 @@ var link = (function() {
|
||||
link: function() {
|
||||
_link();
|
||||
},
|
||||
tabIndex: function() {
|
||||
_tabIndex();
|
||||
},
|
||||
items: function() {
|
||||
_items();
|
||||
}
|
||||
@ -592,7 +595,7 @@ var link = (function() {
|
||||
html.style.setProperty("--link-items-width", state.get().link.items.width + "%");
|
||||
};
|
||||
|
||||
var tabIndex = function() {
|
||||
var _tabIndex = function() {
|
||||
var allLinkControlItem = helper.eA(".link-control-item");
|
||||
if (state.get().link.edit) {
|
||||
allLinkControlItem.forEach(function(arrayItem, index) {
|
||||
@ -628,8 +631,7 @@ var link = (function() {
|
||||
add: add,
|
||||
edit: edit,
|
||||
remove: remove,
|
||||
render: render,
|
||||
tabIndex: tabIndex
|
||||
render: render
|
||||
};
|
||||
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user