mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-07 06:30:03 +00:00
Cleans up cruft from edit widget (#8897)
* chore: cleanup cruft from edit widget * chore: cleanup cruft from edit widget * chore: cleanup cruft from edit widget
This commit is contained in:
parent
f02c9ebba3
commit
42c22acba6
@ -43,15 +43,6 @@ EditWidget.prototype.execute = function() {
|
|||||||
// Get our parameters
|
// Get our parameters
|
||||||
this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||||
this.editField = this.getAttribute("field","text");
|
this.editField = this.getAttribute("field","text");
|
||||||
this.editIndex = this.getAttribute("index");
|
|
||||||
this.editClass = this.getAttribute("class");
|
|
||||||
this.editPlaceholder = this.getAttribute("placeholder");
|
|
||||||
this.editTabIndex = this.getAttribute("tabindex");
|
|
||||||
this.editFocus = this.getAttribute("focus","");
|
|
||||||
this.editCancelPopups = this.getAttribute("cancelPopups","");
|
|
||||||
this.editInputActions = this.getAttribute("inputActions");
|
|
||||||
this.editRefreshTitle = this.getAttribute("refreshTitle");
|
|
||||||
this.editAutoComplete = this.getAttribute("autocomplete");
|
|
||||||
// Choose the appropriate edit widget
|
// Choose the appropriate edit widget
|
||||||
this.editorType = this.getEditorType();
|
this.editorType = this.getEditorType();
|
||||||
// Make the child widgets
|
// Make the child widgets
|
||||||
@ -89,8 +80,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
|||||||
*/
|
*/
|
||||||
EditWidget.prototype.refresh = function(changedTiddlers) {
|
EditWidget.prototype.refresh = function(changedTiddlers) {
|
||||||
var changedAttributes = this.computeAttributes();
|
var changedAttributes = this.computeAttributes();
|
||||||
// Refresh if an attribute has changed, or the type associated with the target tiddler has changed
|
// Refresh if the editor type has changed
|
||||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (this.getEditorType() !== this.editorType)) {
|
if(changedAttributes.tiddler || changedAttributes.field || (this.getEditorType() !== this.editorType)) {
|
||||||
this.refreshSelf();
|
this.refreshSelf();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user