mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2024-12-23 15:36:12 +00:00
Bug: Settings page save problem
This commit is contained in:
parent
05a78e2d63
commit
190d54a0f1
@ -539,24 +539,25 @@ app.GridNodes.updateNode = function(gridNode, value, callback){
|
|||||||
gridNode.url = value.url;
|
gridNode.url = value.url;
|
||||||
app.GridNodes.refreshNode(gridNode, function(){
|
app.GridNodes.refreshNode(gridNode, function(){
|
||||||
browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded });
|
browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded });
|
||||||
|
app.GridNodes.saveNode(gridNode);
|
||||||
var data = { title: gridNode.title };
|
var data = { title: gridNode.title };
|
||||||
if(gridNode.imageMode) data.imageMode = gridNode.imageMode;
|
//if(gridNode.imageMode) data.imageMode = gridNode.imageMode;
|
||||||
if(gridNode.type == app.GridNodes.GridNodeType.bookmark) data.url = gridNode.url;
|
//if(gridNode.type == app.GridNodes.GridNodeType.bookmark) data.url = gridNode.url;
|
||||||
|
data.url = gridNode.url;
|
||||||
browser.bookmarks.onChanged.removeListener(app.Bookmarks._onChanged);
|
browser.bookmarks.onChanged.removeListener(app.Bookmarks._onChanged);
|
||||||
browser.bookmarks.update(gridNode.id, data).then(function(){
|
browser.bookmarks.update(gridNode.id, data).then(function(){
|
||||||
browser.bookmarks.onChanged.addListener(app.Bookmarks._onChanged);
|
browser.bookmarks.onChanged.addListener(app.Bookmarks._onChanged);
|
||||||
});
|
});
|
||||||
app.GridNodes.saveNode(gridNode);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded });
|
browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded });
|
||||||
|
app.GridNodes.saveNode(gridNode);
|
||||||
var data = { title: gridNode.title };
|
var data = { title: gridNode.title };
|
||||||
if(gridNode.imageMode) data.imageMode = gridNode.imageMode;
|
//if(gridNode.imageMode) data.imageMode = gridNode.imageMode;
|
||||||
browser.bookmarks.onChanged.removeListener(app.Bookmarks._onChanged);
|
browser.bookmarks.onChanged.removeListener(app.Bookmarks._onChanged);
|
||||||
browser.bookmarks.update(gridNode.id, data).then(function(){
|
browser.bookmarks.update(gridNode.id, data).then(function(){
|
||||||
browser.bookmarks.onChanged.addListener(app.Bookmarks._onChanged);
|
browser.bookmarks.onChanged.addListener(app.Bookmarks._onChanged);
|
||||||
});
|
});
|
||||||
app.GridNodes.saveNode(gridNode);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(callback) callback(gridNode);
|
if(callback) callback(gridNode);
|
||||||
|
Loading…
Reference in New Issue
Block a user