mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-14 21:15:48 +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>');
|
||||
itemEditDesign.insertAfter(itemTD);
|
||||
|
||||
itemEditDesign.on("click", "a", this.openEditDesignDialog);
|
||||
itemEditDesign.on("click", "a", this.configure.bind(this));
|
||||
|
||||
itemEditDesign.hover(function(){
|
||||
$(this).addClass("is-selected");
|
||||
@ -148,7 +148,7 @@ enabled(){
|
||||
}, 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");
|
||||
this.setAndShowContainer(modal, false);
|
||||
|
||||
@ -275,8 +275,6 @@ enabled(){
|
||||
}
|
||||
});
|
||||
|
||||
this.openEditDesignDialog = () => new customDesignModal();
|
||||
|
||||
// animation optimization
|
||||
this.optimizations = null;
|
||||
this.optimizationTimer = null;
|
||||
@ -650,7 +648,7 @@ ready(){
|
||||
|
||||
TD.components.GlobalSettings.prototype.switchTab = function(tab){
|
||||
if (tab === "tdp-edit-design"){
|
||||
me.openEditDesignDialog();
|
||||
me.configure();
|
||||
}
|
||||
else{
|
||||
return me.prevFuncSettingsSwitchTab.apply(this, arguments);
|
||||
@ -658,6 +656,10 @@ ready(){
|
||||
};
|
||||
}
|
||||
|
||||
configure(){
|
||||
new this.customDesignModal();
|
||||
}
|
||||
|
||||
disabled(){
|
||||
if (this.css){
|
||||
this.css.remove();
|
||||
|
Loading…
Reference in New Issue
Block a user