mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-01-27 08:19:03 +01:00
[bug] fix edit state not setting to false when last link is removed
This commit is contained in:
parent
89dff38f5d
commit
e1eb5f91a5
@ -36,7 +36,7 @@ var keyboard = (function() {
|
|||||||
};
|
};
|
||||||
// ctrl+alt+e
|
// ctrl+alt+e
|
||||||
if (event.ctrlKey && event.altKey && event.keyCode == 69) {
|
if (event.ctrlKey && event.altKey && event.keyCode == 69) {
|
||||||
if (state.get().bookmarks.show.link) {
|
if (state.get().bookmarks.show.link && bookmarks.get().length > 0) {
|
||||||
if (state.get().bookmarks.edit) {
|
if (state.get().bookmarks.edit) {
|
||||||
helper.setObject({
|
helper.setObject({
|
||||||
object: state.get(),
|
object: state.get(),
|
||||||
|
11
js/link.js
11
js/link.js
@ -101,11 +101,22 @@ var link = (function() {
|
|||||||
|
|
||||||
var remove = function(bookmarkData) {
|
var remove = function(bookmarkData) {
|
||||||
bookmarks.remove(bookmarkData.timeStamp);
|
bookmarks.remove(bookmarkData.timeStamp);
|
||||||
|
_checkCount();
|
||||||
data.save();
|
data.save();
|
||||||
clear();
|
clear();
|
||||||
render();
|
render();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var _checkCount = function() {
|
||||||
|
if (bookmarks.get().length <= 0) {
|
||||||
|
helper.setObject({
|
||||||
|
object: state.get(),
|
||||||
|
path: "bookmarks.edit",
|
||||||
|
newValue: false
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
var _makeLinkForm = function() {
|
var _makeLinkForm = function() {
|
||||||
var form = helper.makeNode({
|
var form = helper.makeNode({
|
||||||
tag: "form",
|
tag: "form",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
var version = (function() {
|
var version = (function() {
|
||||||
|
|
||||||
// version is normally bumped when the state needs changing or any new functionality is added
|
// version is normally bumped when the state needs changing or any new functionality is added
|
||||||
var current = "2.9.4";
|
var current = "2.9.5";
|
||||||
|
|
||||||
var get = function() {
|
var get = function() {
|
||||||
var number = current.split(".");
|
var number = current.split(".");
|
||||||
|
Loading…
Reference in New Issue
Block a user