Commit Graph

10 Commits

Author SHA1 Message Date
Jeremy Ruston 62bb8affa4
Add data attribute support to button and other widgets (#7769)
* Add data attribute support to button widget

* Fix typo

* Refactor ready for making mechanism more generic

* Apply more generic implementation to multiplate widgets

* Refactor to use existing widget.assignAttributes() method

* Fix typo

* Clarify docs

* Update docs

* Update select widget to support style.* attributes

* Remove obsolete comment

* Fixes refresh issues for checkbox and links widgets for data attributes (#7846)

* fix: refresh issues with checkbox and links widgets

* fix: indenting

* Feat: add support for data attributes to Draggable and Droppable widgets (#7845)

* Docs clarification

* docs: add style and data attributes to Draggable and Droppable widget docs (#7850)

* Refactors Select widget to directly create DOM node (#7848)

* fix: refactored SelectWidget to directly create DOM nodes

* fix: refactored SelectWidget to directly create DOM nodes

* fix: improve refresh handling for select widget

* Fixes issues in the PR "Button widget data attributes" (#7852)

* fix: fixed ordered attributes handling and improved tests to catch event attributes

* fix: clean up code from testing

* fix: more tests and refactoring

* fix: use lowercase when checking for event attribute prefix

* fix: use lowercase when checking for event attribute prefix

* fix: changed comment wording

* fix: minor refactoring

* refactor: for brevity

---------

Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
2023-11-22 20:05:40 +00:00
Saq Imtiaz f6e021d70f
Feat: dynamically refresh class for draggable widget DOM node instead of re-rendering the widget (#6787) 2022-07-15 15:37:27 +01:00
Simon Huber 030155ec27
Add "enabled" attribute to draggable widget (#6581)
* Add "enabled" attribute to draggable widget

* Update draggable.js

* Update draggable.js

* Update draggable.js
2022-04-15 14:17:06 +01:00
Saq Imtiaz 4054566493
Extend $draggable to support an optional drag handle (#6480)
* feat: extend  to support a selector attribute identifying the DOM element to be used as the drag handle

* fix: remove redundant variable declaration

* fix: remove extranneous variable declaration
2022-02-24 11:06:18 +00:00
jeremy@jermolene.com e9e5d37ff0 Draggable widget: Add option to hide drag image
Thanks @ericshulman

Fixes #6027
2021-09-12 14:20:03 +01:00
saqimtiaz 8cd1dc36c1
Fix suspected typo that impacts refresh handling (#4464) 2020-03-09 21:07:34 +00:00
BurningTreeC afe14b47b5 draggable widget: actions on drag-start and drag-end (#3203)
* pass drag-start end drag-end actions to draggable

* Update dragndrop.js

* Update dragndrop.js

* Update dragndrop.js

* Update dragndrop.js

* Update dragndrop.js

* renaming dragstart/dragend -> start/end

* renaming dragstart/dragend -> start/end

* adding docs
2018-04-08 10:29:17 +01:00
Jermolene 8f1114960a Refactor draggable stuff for easier reuse
And in the process, make the button widget draggable.

Unfortunately, Firefox has a bug that prevents buttons from being
dragged (see https://bugzilla.mozilla.org/show_bug.cgi?id=568313 and
https://bugzilla.mozilla.org/show_bug.cgi?id=646823). So we have to use
the “tag” attribute to make it use a different element.
2017-03-23 14:23:33 +00:00
Jermolene 9bad99d14e Draggable: properly stringify tiddler titles
Thanks @twMat
2017-03-20 22:01:51 +00:00
Jermolene eba1c3c160 Improve support for drag and drop
Documentation TBD
2017-03-19 19:33:56 +00:00