A quick way to do that would to be wrap the button and edit field in a
reveal widget. So that part of the code would look like:
<$reveal state="$:/MAS/newChildOptions" type="match" text="show">
<$edit-text tiddler="$:/newitem" tag="input" size="30" default="Child name
here" placeholder="Child name here"/>
<$button>
<$action-createtiddler $basetitle={{$:/newitem}} tags=<<tagascurrent>>
$savetitle="""$selectedTiddler$""" />
New child</$button> <br/>Sort by: <$edit-text field="sortby" tag="input"
size="5" default="01" placeholder="Sort priority"/>
</$reveal>
Then change $:/MAS/newChildOptions to "show" to show the buttons or
anything else to hide the buttons.
Good luck!
-- Mark
On Monday, June 11, 2018 at 12:05:44 PM UTC-7, Mohammad wrote:
>
> Mark,
> Is there any simple way to turn off or hide the textbox and create child
> button at the bottom at the end?
> As you recommended, NoteSlam is more specific for TOC and outliner, but
> your code is great to have several
> small but related texts (like turorial, instruction, ...) in the same TW.
>
> Thank you
>
>
> On Monday, June 11, 2018 at 9:41:28 AM UTC+4:30, Mark S. wrote:
>>
>> See if this works. Be sure to backup first. Replace the main outlier
>> macro with:
>>
>> \define tagascurrent() [[$(currentTiddler)$]]
>> \define draft() Draft of '$(currentTiddler)$'
>> \define draftcreated() Draft of '$(currentTiddler)$'!!created
>> \define drafttrans() {{Draft of '$(currentTiddler)$'||$:/core/ui/
>> EditTemplate}}
>> \define twolink(link) <$navigator story="$:/StoryList">[[$link$]]</
>> $navigator>
>> \define twoutlier(tag,sort:"",selectedTiddler:
>> "$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"")
>> <$tiddler tiddler={{$selectedTiddler$}}>
>> <div class="tc-tabbed-table-of-contents">
>> <$linkcatcher to="$selectedTiddler$">
>> <div class="tc-table-of-contents">
>> <$macrocall $name="toc-selective-expandable" tag="""$tag$""" sort=
>> """$sort$""" itemClassFilter=<<toc-tabbed-selected-item-filter
>> selectedTiddler:"""$selectedTiddler$""">>/>
>> </div>
>> </$linkcatcher>
>> <div class="tc-tabbed-table-of-contents-content">
>> <$reveal state="""$selectedTiddler$""" type="nomatch" text="">
>> <$navigator story="story" history="history" openLinkFromInsideRiver="top">
>> <$linkcatcher to="$selectedTiddler$">
>>
>> <$list filter="[all[current]]" >
>> <$reveal state=<<draftcreated>> type="nomatch" text="">
>> <<drafttrans>>
>> </$reveal>
>> <$reveal state=<<draftcreated>> type="match" text="" class="MAS_scroll" >
>> {{||$:/core/ui/ViewTemplate}}
>> <$edit-text tiddler="$:/newitem" tag="input" size="30" default="Child
>> name here" placeholder="Child name here"/>
>> <$button>
>> <$action-createtiddler $basetitle={{$:/newitem}} tags=<<tagascurrent>>
>> $savetitle="""$selectedTiddler$""" />
>> New child</$button> <br/>Sort by: <$edit-text field="sortby" tag="input"
>> size="5" default="01" placeholder="Sort priority"/>
>> </$reveal>
>> </$list>
>>
>> </$linkcatcher>
>> </$navigator>
>> </$reveal>
>> <$reveal state="""$selectedTiddler$""" type="match" text="">
>> $unselectedText$
>> </$reveal>
>> </div>
>> </div>
>> </$tiddler>
>> \end
>>
>> All this did was to an inject a new class. Then make a stylesheet (tag
>> $:/tags/Stylesheet) like:
>>
>> .MAS_scroll .tc-tiddler-body {
>> overflow: auto;
>> height:300px;
>> }
>>
>> Change the height to whatever default height you want. The bad news is
>> that this will be the minimum size of all tiddlers from now on. Any tiddler
>> longer than the specified height will have a scroll bar.
>>
>> Good luck!
>>
>> -- Mark
>>
>>
>>
>>
>> On Sunday, June 10, 2018 at 8:05:14 PM UTC-7, Mohammad wrote:
>>>
>>> Mark,
>>> I mean in view time!
>>> One example I borrowed from here
>>> https://manual.calibre-ebook.com/gui.html#the-search-interface
>>>
>>> The TOC here of course acts like a sidebar menu which we have in TW. But
>>> the point is when you scroll down the page by end (here for a long tiddler)
>>> you have the TOC in view and simply you can click on the next topic. The
>>> other thing here is if you have a long table of content the sidebar gets a
>>> vertical scroll bar to have it in view again.
>>>
>>> In summary you have a fixed height for TOC and always it is in view! No
>>> matter how long is content of page (tiddler) you view
>>>
>>>
>>>
>>> - One more question: It seems you cannot have more than one Outline
>>> here? Am I right? If so, isn't it better to able to have several outline
>>> with different tag in the same TW file?
>>>
>>> What do you think?
>>>
>>
--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/0c3d850d-1b15-4898-847c-cfc923f06574%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.