mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-04 17:34:07 +02:00
Add support for 'Configure' button to edit-design plugin
This commit is contained in:
parent
03d50c847b
commit
9197cb9be6
@ -126,7 +126,7 @@ enabled(){
|
|||||||
let itemEditDesign = $('<li class="is-selectable"><a href="#" data-action>Edit layout & design</a></li>');
|
let itemEditDesign = $('<li class="is-selectable"><a href="#" data-action>Edit layout & design</a></li>');
|
||||||
itemEditDesign.insertAfter(itemTD);
|
itemEditDesign.insertAfter(itemTD);
|
||||||
|
|
||||||
itemEditDesign.on("click", "a", this.openEditDesignDialog);
|
itemEditDesign.on("click", "a", this.configure.bind(this));
|
||||||
|
|
||||||
itemEditDesign.hover(function(){
|
itemEditDesign.hover(function(){
|
||||||
$(this).addClass("is-selected");
|
$(this).addClass("is-selected");
|
||||||
@ -148,7 +148,7 @@ enabled(){
|
|||||||
}, 1); // delays the slight lag caused by saving and reinjection
|
}, 1); // delays the slight lag caused by saving and reinjection
|
||||||
};
|
};
|
||||||
|
|
||||||
var customDesignModal = TD.components.BaseModal.extend(function(){
|
this.customDesignModal = TD.components.BaseModal.extend(function(){
|
||||||
let modal = $("#td-design-plugin-modal");
|
let modal = $("#td-design-plugin-modal");
|
||||||
this.setAndShowContainer(modal, false);
|
this.setAndShowContainer(modal, false);
|
||||||
|
|
||||||
@ -275,8 +275,6 @@ enabled(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.openEditDesignDialog = () => new customDesignModal();
|
|
||||||
|
|
||||||
// animation optimization
|
// animation optimization
|
||||||
this.optimizations = null;
|
this.optimizations = null;
|
||||||
this.optimizationTimer = null;
|
this.optimizationTimer = null;
|
||||||
@ -650,7 +648,7 @@ ready(){
|
|||||||
|
|
||||||
TD.components.GlobalSettings.prototype.switchTab = function(tab){
|
TD.components.GlobalSettings.prototype.switchTab = function(tab){
|
||||||
if (tab === "tdp-edit-design"){
|
if (tab === "tdp-edit-design"){
|
||||||
me.openEditDesignDialog();
|
me.configure();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return me.prevFuncSettingsSwitchTab.apply(this, arguments);
|
return me.prevFuncSettingsSwitchTab.apply(this, arguments);
|
||||||
@ -658,6 +656,10 @@ ready(){
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure(){
|
||||||
|
new this.customDesignModal();
|
||||||
|
}
|
||||||
|
|
||||||
disabled(){
|
disabled(){
|
||||||
if (this.css){
|
if (this.css){
|
||||||
this.css.remove();
|
this.css.remove();
|
||||||
|
Loading…
Reference in New Issue
Block a user