mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
parent
e58e68fa7c
commit
ffb6c8ab81
@ -45,6 +45,9 @@ EditTextWidget.prototype.render = function(parent,nextSibling) {
|
||||
if(editInfo.value === "" && this.editPlaceholder) {
|
||||
domNode.setAttribute("placeholder",this.editPlaceholder);
|
||||
}
|
||||
if(this.editSize) {
|
||||
domNode.setAttribute("size",this.editSize);
|
||||
}
|
||||
// Assign classes
|
||||
if(this.editClass) {
|
||||
domNode.className = this.editClass;
|
||||
@ -133,6 +136,7 @@ EditTextWidget.prototype.execute = function() {
|
||||
this.editDefault = this.getAttribute("default");
|
||||
this.editClass = this.getAttribute("class");
|
||||
this.editPlaceholder = this.getAttribute("placeholder");
|
||||
this.editSize = this.getAttribute("size");
|
||||
this.editFocusPopup = this.getAttribute("focusPopup");
|
||||
// Get the editor element tag and type
|
||||
var tag,type;
|
||||
|
@ -2,7 +2,7 @@ title: $:/TagManager
|
||||
|
||||
\define lingo-base() $:/language/TagManager/
|
||||
\define iconEditor(title)
|
||||
<$edit-text field="icon" tag="input"/> <$button popup=<<qualify "$:/state/iconDropdown/$title$">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button>
|
||||
<$edit-text field="icon" tag="input" size="20"/> <$button popup=<<qualify "$:/state/iconDropdown/$title$">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button>
|
||||
<div class="tw-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/iconDropdown/$title$">> type="nomatch" text="" default="">
|
||||
<$linkcatcher to="$title$!!icon">
|
||||
@ -29,7 +29,7 @@ title: $:/TagManager
|
||||
<tr>
|
||||
<td><$transclude tiddler="$:/core/ui/TagTemplate"/></td>
|
||||
<td><$count filter="[all[current]tagging[]]"/></td>
|
||||
<td><$edit-text field="color" tag="input" type="color"/></td>
|
||||
<td><$edit-text field="color" tag="input" type="text" size="9"/> <$edit-text field="color" tag="input" type="color"/></td>
|
||||
<td><$macrocall $name="iconEditor" title={{!!title}}/></td>
|
||||
</tr>
|
||||
</$list>
|
||||
|
@ -1,6 +1,6 @@
|
||||
title: EditTextWidget
|
||||
created: 201310241419
|
||||
modified: 201310300837
|
||||
modified: 201405050837
|
||||
tags: widget
|
||||
|
||||
! Introduction
|
||||
@ -22,4 +22,5 @@ The content of the `<$edit-text>` widget is ignored.
|
||||
|placeholder |Placeholder text to be displayed when the edit field is empty |
|
||||
|focusPopup |Title of a state tiddler for a popup that is displayed when the editing element has focus |
|
||||
|tag |Overrides the generated HTML editing element tag |
|
||||
|size |The size of the input field (in characters) |
|
||||
|type |Overrides the generated HTML editing element `type` attribute |
|
||||
|
Loading…
Reference in New Issue
Block a user