kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Rename "focusSet" attribute of edit-text widget to "focusPopup"
rodzic
4d4a84c5bf
commit
0ec2cf20a9
|
@ -114,13 +114,13 @@ EditTextWidget.prototype.execute = function() {
|
|||
this.editDefault = this.getAttribute("default","");
|
||||
this.editClass = this.getAttribute("class");
|
||||
this.editPlaceholder = this.getAttribute("placeholder");
|
||||
this.editFocusSet = this.getAttribute("focusSet");
|
||||
this.editFocusPopup = this.getAttribute("focusPopup");
|
||||
this.qualifyTiddlerTitles = this.getAttribute("qualifyTiddlerTitles");;
|
||||
// Qualify tiddler titles if required
|
||||
if(this.qualifyTiddlerTitles) {
|
||||
var qualifier = this.getStateQualifier();
|
||||
if(this.editFocusSet) {
|
||||
this.editFocusSet = this.editFocusSet + "-" + qualifier;
|
||||
if(this.editFocusPopup) {
|
||||
this.editFocusPopup = this.editFocusPopup + "-" + qualifier;
|
||||
}
|
||||
}
|
||||
// Get the editor element tag and type
|
||||
|
@ -217,10 +217,10 @@ EditTextWidget.prototype.handleInputEvent = function(event) {
|
|||
};
|
||||
|
||||
EditTextWidget.prototype.handleFocusEvent = function(event) {
|
||||
if(this.editFocusSet) {
|
||||
if(this.editFocusPopup) {
|
||||
$tw.popup.triggerPopup({
|
||||
domNode: this.domNodes[0],
|
||||
title: this.editFocusSet,
|
||||
title: this.editFocusPopup,
|
||||
wiki: this.wiki,
|
||||
force: true
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@ background-color:$(backgroundColor)$;
|
|||
<$fieldmangler><div class="tw-edit-tags-list"><$list filter="[is[current]tags[]sort[title]]" listview="pop" itemClass="tw-tag-editor-label"><$setvariable name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">×</$button></span></$setvariable>
|
||||
</$list></div>
|
||||
|
||||
<div class="tw-add-tag">Add a new tag: <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusSet="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="tw-edit-texteditor"/></span> <$button popup="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="btn-invisible">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
|
||||
<div class="tw-add-tag">Add a new tag: <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="tw-edit-texteditor"/></span> <$button popup="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="btn-invisible">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
<div class="tw-tags-autocomplete-wrapper">
|
||||
<$reveal state="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" type="nomatch" text="" default="">
|
||||
|
|
Ładowanie…
Reference in New Issue