Hi,
I am trying to add one more field for the current dictionary plugin by Jed
Carty available at http://inmysocks.tiddlyspot.com.
\define thisListMacro()
<$view field=title/> - {{$:/data/Dictionary##$(thisIndex)$}}<br>
\end
\define thisEditListMacro()
<$view field=title/> - {{$:/data/Dictionary##$(thisIndex)$}}
<$button>Remove<$action-deletefield $tiddler='$:/data/Dictionary'
$field=$(thisIndex)$ $value=''/></$button><br>
\end
\define thisRegEx()
$(thisSearch)$(?i)
\end
\define thisSearchMacro()
<ul>
<$list filter=
"[[$:/data/Dictionary]indexes[]regexp:title[(?i)$(thisSearch)$]]">
<li><<currentTiddler>> - <$transclude tiddler="$:/data/Dictionary" index=<<
currentTiddler>>/></li>
</$list>
</ul>
\end
\define thisEditMacro()
<ul>
<$list filter=
"[[$:/data/Dictionary]indexes[]regexp:title[(?i)$(thisSearch)$]]">
<$set name=thisItem value=<<currentTiddler>>>
<li><<thisDeleteButton>> <<currentTiddler>> - <$transclude tiddler=
"$:/data/Dictionary" index=<<currentTiddler>>/></li>
</$set>
</$list>
</ul>
\end
\define thisDeleteButton()
<$button set='$:/data/Dictionary
##$(thisItem)$'>{{$:/core/images/delete-button}}</$button>
\end
Term: <$edit-text class='tc-edit-texteditor' tiddler='$:/temp/dictionary'
field='name'/><br>
Meaning: <$edit-text class='tc-edit-texteditor' tiddler='$:/temp/dictionary'
field='meaning'/><br>
<$reveal type='match' state='$:/temp/dictionary!!name' text=''>
<$button>Add Term</$button>
</$reveal>
<$reveal type='nomatch' state='$:/temp/dictionary!!name' text=''>
<$button>Add Term
<$action-setfield $tiddler='$:/data/Dictionary' $index={{$:/temp/dictionary
!!name}} $value={{$:/temp/dictionary!!meaning}}/>
<$action-setfield $tiddler='$:/temp/dictionary' name='' meaning=''/>
</$button>
</$reveal>
<$reveal type='nomatch' state='$:/state/dictionary/editreveal' text='edit'>
<$button set='$:/state/dictionary/editreveal' setTo='edit'>Edit Dictionary<
/$button>
</$reveal>
<$reveal type='match' state='$:/state/dictionary/editreveal' text='edit'>
<$button set='$:/state/dictionary/editreveal' setTo='noedit'>Done Editing<
/$button>
</$reveal>
Search: <$edit-text tiddler='$:/temp/dictionary' field='search'/><br>
<$reveal type='nomatch' state='$:/state/dictionary/editreveal' text='edit'>
</$reveal>
<$reveal type='match' state='$:/state/dictionary/editreveal' text='edit'>
Click on the trashcan icon to remove an item
</$reveal>
<$set name='thisSearch' value={{$:/temp/dictionary!!search}}>
<$reveal type='nomatch' state='$:/state/dictionary/editreveal' text='edit'>
<<thisSearchMacro>>
</$reveal>
<$reveal type='match' state='$:/state/dictionary/editreveal' text='edit'>
<<thisEditMacro>>
</$reveal>
</$set>
I tried a lot but somehow unable to get it fixed. Is there something more I
need to add for this code above to get it working.
Thanks!
Shash
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/4122839e-07c2-4c68-8c55-9a1ee36b794d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.