Commit Graph

24 Commits

Author SHA1 Message Date
jeremy@jermolene.com 990909c310 Revert "Feat: destroy() method for widgets to do custom cleanup (#6699)"
This reverts commit 474b73bdbe.
2023-05-18 17:27:05 +01:00
lin onetwo 474b73bdbe
Feat: destroy() method for widgets to do custom cleanup (#6699)
* feat: inform child widget to do some custom cleanup

* fix: type

* refactor: restore old removeChildDomNodes

* refactor: make destroy() a separate method

* refactor: make destroy call removeChildDomNodes

* refactor: call destroy instead of removeChildDomNodes in each core widgets

* fix: refreshSelf does not mean destroy

* refactor: use old var insteadof const

* docs: about subclass
2023-05-06 12:19:11 +01:00
Saq Imtiaz d823856082
feat: add support for renderEnd method for storyviews in widget's render() method (#6409) 2022-01-19 19:48:02 +00:00
Saq Imtiaz cb726f40fa
Fix: bug with List Widget where the counter-last variable is not always accurately updated on refresh (#5883) 2021-07-15 21:59:07 +01:00
jeremy@jermolene.com 4a99e0cc7d Change "index" attribute of list widget to "counter", and use 1-based counting
Extends #5611
2021-04-26 14:41:26 +01:00
Jeremy Ruston 85ba7ac041
Extend list widget with "index" attribute (#5611)
* Extend list widget with "index" attribute

* Fix refreshing bug

* Clarify performance note
2021-04-20 09:15:11 +01:00
Simon Huber 4858b24cfe
Fix #5308 - WidgetSubclassingMechanism not working with widgets that add EventListeners (or logic ?) in constructor (#5382)
* add EventListeners in the render() method instead of the constructor

* scrollable widget: add EventListeners in render() method instead of constructor +

... move logic from constructor to render()

* linkcatcher: add EventListeners in render() instead of constructor

* fieldmangler: add EventListeners in render() instead of constructor

* edit-bitmap: initialise editorOperations in render() instead of constructor

* list-widget: initialise storyviews in render() instead of constructor

* vars widget: execute Widget.call(this) in render() instead of constructor

... not shure what this should do

* Update fieldmangler.js

* Update edit-bitmap.js

* Update linkcatcher.js

* Update navigator.js

* Update scrollable.js

* Update list.js

* Update vars.js
2021-01-09 13:25:48 +00:00
Mario Pietsch 42b965c9f0
Init less parsers (#4954)
* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* Don't override browser selection colours by default

Reverts some of #4590

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* list-widget, init new Parser() only if needed.

* fix braces

Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
2020-11-01 17:14:42 +00:00
Jermolene 8d35178bc4 Undo 664225f6fd and 56640b90bb
See the discussion at #2628
2016-10-26 21:41:41 +01:00
Jermolene 664225f6fd Ensure list widget item title is used in getStateQualifier
Resolves a longstanding problem where the same state qualifier is
generated for every member of a list.

Fixes #2628
2016-10-25 15:34:20 +01:00
Jermolene 5f0a1dd967 Revision of 03db25cf38
We should only fallback to the classic storyview if a storyview was
specified; if none was specified then we shouldn’t use a storyview.
2016-08-27 14:24:07 +01:00
Jermolene 03db25cf38 Fallback to "classic" if specified storyview not found
Fixes #2555
2016-08-26 11:34:43 +01:00
Jermolene 32f6d7f1b0 Revert getTiddlerData() and add getTiddlerDataCached()
For backwards compatibility, we now explicitly request the cacheable
version of this method.

Fixes #1873
2015-07-10 16:43:50 +01:00
Jermolene 05c3de3245 Extend list widget to invoke storyview for refreshes 2015-02-23 11:24:03 +01:00
Jermolene 68165af081 Revert #1330 ("implements list iterator variables")
As discussed on the ticket, there is a problem:

https://github.com/Jermolene/TiddlyWiki5/pull/1330#issuecomment-74339195
2015-02-13 22:42:36 +00:00
Jermolene ec829180f4 Coding style clean up for #1330 2015-01-06 13:49:05 +00:00
Tobias Beer 0dd3ad5e38 updated false states — looks more conclusive 2015-01-06 14:40:48 +01:00
Tobias Beer a1ca53fa9b implements list iterator variables, see #1328
provides <<iterator>>, <<iterator-even>> and <<iterator-last>>
2015-01-06 14:31:20 +01:00
Jermolene 3a67fdb768 Obeisance to JSHint for core modules
There are still some warnings about making functions in a loop, but
I’ll fix those as a separate pull request because the fixes are more
than typographic errors.
2014-08-30 20:44:26 +01:00
Jermolene 385c7e207c Refactor wiki.filterTiddlers()
Now we pass a widget instead of the current tiddler title. We can use
widget.getVariable(“currentTiddler”) to get the current tiddler.
2014-04-27 20:03:33 +01:00
Jermolene db35bc36aa Disable storyviews when rendering to the fake dom 2014-03-10 18:41:11 +00:00
Jeremy Ruston cc0011abd3 Get rid of the "new_" prefix we had on some methods
There's still the "old_" prefix to get rid of too.
2013-11-08 08:51:14 +00:00
Jeremy Ruston b7cb1d3391 Change `new_widget` to `widget`
I was avoiding doing this until after the merge.
2013-11-08 08:47:00 +00:00
Jeremy Ruston 3e3a5917b7 Move the widgets back to the right folder 2013-11-08 08:38:44 +00:00