mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2024-12-23 15:36:12 +00:00
Bug: (Properties) Image is lost when clicking OK and Unlock title don't work
This commit is contained in:
parent
cebdb32c35
commit
5e61b65e82
@ -461,7 +461,7 @@ app.GridNodes.getNodeWithParents = function(id){
|
||||
app.GridNodes.updateNode = function(gridNode, value, callback){
|
||||
if(value){
|
||||
if(value.title) gridNode.title = value.title;
|
||||
if(value.titleLocked) gridNode.titleLocked = value.titleLocked;
|
||||
if(value.titleLocked!=null) gridNode.titleLocked = value.titleLocked;
|
||||
if(value.image) gridNode.image = value.image;
|
||||
else delete gridNode.image;
|
||||
if(gridNode.type == app.GridNodes.GridNodeType.bookmark && value.url && gridNode.url != value.url){
|
||||
|
@ -354,8 +354,10 @@ dial.populateGrid = function(){
|
||||
populateFolder = function(link, node){
|
||||
link.Node = node;
|
||||
link.className = 'Folder';
|
||||
if(node.image) link.childNodes[0].style.backgroundImage = 'url(' + node.image + ')';
|
||||
else link.childNodes[0].style.backgroundImage = '';
|
||||
if(node.image){
|
||||
if(node.image.indexOf('url(')>=0) link.childNodes[0].style.backgroundImage = node.image;
|
||||
else link.childNodes[0].style.backgroundImage = 'url(' + node.image + ')';
|
||||
} else link.childNodes[0].style.backgroundImage = '';
|
||||
link.childNodes[1].innerText = node.title;
|
||||
if(dial.path) link.href = '?' + 'bg=' + encodeURIComponent(app.settings.backgroundColor) + '&path=' + encodeURIComponent(dial.path + node.title);
|
||||
else link.href = '?' + 'bg=' + encodeURIComponent(app.settings.backgroundColor) + '&path=' + encodeURIComponent(node.title);
|
||||
@ -366,7 +368,8 @@ dial.populateGrid = function(){
|
||||
link.Node = node;
|
||||
if(node.image){
|
||||
link.className = 'Bookmark';
|
||||
link.childNodes[0].style.backgroundImage = 'url(' + node.image + ')';
|
||||
if(node.image.indexOf('url(')>=0) link.childNodes[0].style.backgroundImage = node.image;
|
||||
else link.childNodes[0].style.backgroundImage = 'url(' + node.image + ')';
|
||||
} else {
|
||||
link.className = 'BookmarkLoading';
|
||||
link.childNodes[0].style.backgroundImage = '';
|
||||
|
@ -26,17 +26,18 @@ app.init = function(){
|
||||
TitleLocked.parentNode.style.display = 'none';
|
||||
Url.parentNode.parentNode.style.display = 'none';
|
||||
if(node.image){
|
||||
if(node.image.indexOf('url(')>0) Image = node.image;
|
||||
if(node.image.indexOf('url(')>=0) Image = node.image;
|
||||
else Image = 'url(' + node.image + ')';
|
||||
} else Image = null;
|
||||
if(Image==null) ImagePreview.style.backgroundImage = app.settings.grid.folderIcon;
|
||||
else ImagePreview.style.backgroundImage = Image;
|
||||
break;
|
||||
case app.GridNodes.GridNodeType.bookmark:
|
||||
TitleLocked.checked = node.titleLocked;
|
||||
TitleLocked.checked = (node.titleLocked==true);
|
||||
ImageDefault.style.display = 'none';
|
||||
Url.value = node.url;
|
||||
Image = 'url(' + node.image + ')';
|
||||
if(node.image.indexOf('url(')>=0) Image = node.image;
|
||||
else Image = 'url(' + node.image + ')';
|
||||
ImagePreview.style.backgroundImage = Image;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user