It's getting a bit compliated! I think you can put data into the $tw structure and read it in other places, but this is very hacky!
eg $tw._userdata_= "hello"; be careful I have not try this! On Monday, November 20, 2017 at 7:09:09 PM UTC+1, sini-Kit wrote: > > Thank you BJ, but it works not in that way, I wanted. I want to enable > lists update in > > /* > Update the document body with the class "tc-dirty" if the wiki has > unsaved/unsynced changes > */ > SaverHandler.prototype.updateDirtyStatus = function() { > if($tw.browser) { > > $tw.utils.toggleClass(document.body,"tc-dirty",this.isDirty()); > } > }; > > > and disable lists update when TW5 *not *In "dirty" mode. I try to put > your code to $:/core/modules/saver-handler.js but don't understand how to > get constant (var a="disabled") from another .js tiddler. > > > > четверг, 16 ноября 2017 г., 10:23:27 UTC+3 пользователь BJ написал: > >> so you could add a variable to control the list behaviour: >> >> ListWidget.prototype.getTiddlerList = function() { >> var defaultFilter = "[!is[system]sort[title]]"; >> if >> (this.getAttribute("filter",defaultFilter)=="[list[$:/StoryList]]") return >> ListWidget.prototype.bjgetTiddlerList.call(this); >> *if (this.getVariable("enablelistupdate")=="enable") return >> ListWidget.prototype.bjgetTiddlerList.call(this);* >> >> if (!this.bjcached) { >> this.bjcache = >> this.wiki.filterTiddlers(this.getAttribute("filter",defaultFilter),this); >> this.bjcached = true; >> } >> return this.bjcache; >> }; >> >> and then set this variable in $:/core/ui/EditTemplate tiddler : >> >> >> <div class=<<frame-classes>>> >> *<$vars enablelistupdate="enable">* >> <$fieldmangler> >> <$set name="storyTiddler" value=<<currentTiddler>>> >> <$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler"> >> <$keyboard key="((save-tiddler))" actions=<<actions>>> >> <$list >> filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" >> variable="listItem"> >> <$transclude tiddler=<<listItem>>/> >> </$list> >> </$keyboard> >> </$keyboard> >> </$set> >> </$fieldmangler> >> *</$vars>* >> </div> >> >> >> >> >> On Wednesday, November 15, 2017 at 5:08:38 AM UTC+1, sini-Kit wrote: >>> >>> I start workin with your plugin, and see that I add many bugs while >>> editing. is it possible to disable/enable automatically it if I start edit >>> TW5? Or refresh lists when I finish editing tiddler? >>> >>> понедельник, 13 ноября 2017 г., 20:27:03 UTC+3 пользователь BJ написал: >>>> >>>> Lists are created by this.wiki.filterTiddlers(). Every time a tiddler >>>> is modified all the filters are recreated, and it is because of this that >>>> you shop is slow. So this plugin stops the lists (apart from the >>>> storylist) >>>> from updating. >>>> >>>> You can see the effect of this if you go to the sidebar and click the >>>> recent tab then create a new tiddler - the list of tiddlers in the 'recent >>>> tab' is not updated. It you then click the 'open tab' and then click the >>>> 'recent tab' you will see the new tiddler on the list. This is because the >>>> listwidget has been totally erased and recreated by changing tabs. >>>> >>>> So, depending on how your shop is constructed you may see errors due to >>>> lists not beening updated. >>>> >>>> e.g If you have search boxes anywhere they will not work correctly >>>> >>>> >>>> On Monday, November 13, 2017 at 5:54:52 PM UTC+1, sini-Kit wrote: >>>>> >>>>> Thank, you BJ. With your plugin tiddlywiki shop works fast. Can you >>>>> explain what it do? >>>>> >>>>> var defaultFilter = "[!is[system]sort[title]]"; >>>>> if (this.getAttribute("filter",defaultFilter)== >>>>> "[list[$:/StoryList]]") return ListWidget.prototype.bjgetTiddlerList. >>>>> call(this); >>>>> if (!this.bjcached) { >>>>> this.bjcache = this.wiki.filterTiddlers(this.getAttribute( >>>>> "filter",defaultFilter),this); >>>>> this.bjcached = true; >>>>> } >>>>> >>>>> it adds [!is[system] to all filters I use? I hope in future TW5 >>>>> edition it will be build in zoomin.js >>>>> >>>>> >>>>> понедельник, 13 ноября 2017 г., 11:44:31 UTC+3 пользователь BJ написал: >>>>> >>>>>> I have hacked together a plugin to speed things up. It will probably >>>>>> cause strange errors in you application, but maybe you can modify it to >>>>>> work better. In any case It will show how much things could be improved >>>>>> >>>>>> all the best bj >>>>>> On Sunday, November 12, 2017 at 4:03:30 PM UTC+1, sini-Kit wrote: >>>>>>> >>>>>>> Hi! I start creating new Tiddlywiki shop >>>>>>> http://www.google.com/url?q=http%3A%2F%2F2980258.ru%2Fheeg.html&sa=D&sntz=1&usg=AFQjCNEVrKH1LD7mgIfI5QyFi0wrOgnEpw >>>>>>> >>>>>>> The problem is that it is big 4mb. I want to make it work faster. >>>>>>> If somebody have compressed variant of tw5 core without comments in >>>>>>> code or any ideas? >>>>>>> >>>>>> >>>>>> >>>>>> >>>> >> -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. 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/b47711ce-ea98-48b4-87d9-67948a6743ab%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.