[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
|
||||
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) {
|
||||
helper.setObject({
|
||||
object: state.get(),
|
||||
|
|
11
js/link.js
11
js/link.js
|
@ -101,11 +101,22 @@ var link = (function() {
|
|||
|
||||
var remove = function(bookmarkData) {
|
||||
bookmarks.remove(bookmarkData.timeStamp);
|
||||
_checkCount();
|
||||
data.save();
|
||||
clear();
|
||||
render();
|
||||
};
|
||||
|
||||
var _checkCount = function() {
|
||||
if (bookmarks.get().length <= 0) {
|
||||
helper.setObject({
|
||||
object: state.get(),
|
||||
path: "bookmarks.edit",
|
||||
newValue: false
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var _makeLinkForm = function() {
|
||||
var form = helper.makeNode({
|
||||
tag: "form",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
var version = (function() {
|
||||
|
||||
// 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 number = current.split(".");
|
||||
|
|
Loading…
Reference in New Issue