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() {
|
var _edit = function() {
|
||||||
if (state.get().link.edit) {
|
if (state.get().link.edit) {
|
||||||
helper.addClass(html, "is-link-edit");
|
helper.addClass(html, "is-link-edit");
|
||||||
link.tabIndex();
|
link.render.tabIndex();
|
||||||
} else {
|
} else {
|
||||||
helper.removeClass(html, "is-link-edit");
|
helper.removeClass(html, "is-link-edit");
|
||||||
link.tabIndex();
|
link.render.tabIndex();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
var _date = function() {
|
var _date = function() {
|
||||||
|
12
js/link.js
12
js/link.js
@ -61,7 +61,7 @@ var link = (function() {
|
|||||||
data.save();
|
data.save();
|
||||||
clear();
|
clear();
|
||||||
render.link();
|
render.link();
|
||||||
tabIndex();
|
render.tabIndex();
|
||||||
control.dependents();
|
control.dependents();
|
||||||
control.render();
|
control.render();
|
||||||
resetStagedBookmarkData();
|
resetStagedBookmarkData();
|
||||||
@ -114,7 +114,7 @@ var link = (function() {
|
|||||||
data.save();
|
data.save();
|
||||||
clear();
|
clear();
|
||||||
render.link();
|
render.link();
|
||||||
tabIndex();
|
render.tabIndex();
|
||||||
_returnToPreviousFocusLink();
|
_returnToPreviousFocusLink();
|
||||||
resetStagedBookmarkData();
|
resetStagedBookmarkData();
|
||||||
},
|
},
|
||||||
@ -514,6 +514,9 @@ var link = (function() {
|
|||||||
link: function() {
|
link: function() {
|
||||||
_link();
|
_link();
|
||||||
},
|
},
|
||||||
|
tabIndex: function() {
|
||||||
|
_tabIndex();
|
||||||
|
},
|
||||||
items: function() {
|
items: function() {
|
||||||
_items();
|
_items();
|
||||||
}
|
}
|
||||||
@ -592,7 +595,7 @@ var link = (function() {
|
|||||||
html.style.setProperty("--link-items-width", state.get().link.items.width + "%");
|
html.style.setProperty("--link-items-width", state.get().link.items.width + "%");
|
||||||
};
|
};
|
||||||
|
|
||||||
var tabIndex = function() {
|
var _tabIndex = function() {
|
||||||
var allLinkControlItem = helper.eA(".link-control-item");
|
var allLinkControlItem = helper.eA(".link-control-item");
|
||||||
if (state.get().link.edit) {
|
if (state.get().link.edit) {
|
||||||
allLinkControlItem.forEach(function(arrayItem, index) {
|
allLinkControlItem.forEach(function(arrayItem, index) {
|
||||||
@ -628,8 +631,7 @@ var link = (function() {
|
|||||||
add: add,
|
add: add,
|
||||||
edit: edit,
|
edit: edit,
|
||||||
remove: remove,
|
remove: remove,
|
||||||
render: render,
|
render: render
|
||||||
tabIndex: tabIndex
|
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user