Commit 6cc2659
committed
Commit 84 (v0.9.84 - Beta)
Feature improvements:
- Major update for custom tags - including support for two-way binding to multiple
args and props
See samples: http://www.jsviews.com/#samples/tag-controls/jqui/draggable-droppable@jsv-draggable
and tests: http://www.jsviews.com/test/unit-tests-jsviews.html?testId=f46a512b
and also jQuery UI tag control samples such as http://www.jsviews.com/#samples/tag-controls/jqui/resizable
and http://www.jsviews.com/#samples/tag-controls/jqui/draggable-droppable.
Also many code examples in
https://www.jsviews.com/download/sample-tag-controls/jsviews-jqueryui-widgets.js
A tag definition can include:
tag.bindTo - which specifies two-way bound parameters (one or more args and/or
props)
tag.linkedElement - which specifies selectors for linkedElems for any of the
two-way bound parameters
tag.linkedCtxParam - which specifies/names tag contextual parameters for any of
the two-way bound parameters
mainElement - which specifies selector for an element used for setting id, width
or height (otherwise, linkedElem is used)
A tag onBind event can set:
tag.linkedElem
tag.linkedElems
tag.mainElem - which is the element used for setting id, width or height
(otherwise, linkedElem is used)
tag.displayElem - which is the element used for setting class (otherwise,
mainElem/linkedElem is used)
The following tag methods are available:
tag.bndArgs() - which returns array of 'external' bound parameters (after
convert, if convert=... is specified)
tag.update(...) - which observably updates any ('external') bound parameters
(using convertBack, if specified)
tag.setValue(...) - which sets tag itself to new ('internal') values of bound
parameters
tag.getValue(...) - which returns array of current ('internal') values of bound
parameters
New 'tag contextual parameters' feature - see samples and explanation:
http://www.jsviews.com/#samples/tag-controls/jqui/resizable and
http://www.jsviews.com/#samples/tag-controls/jqui/draggable-droppable@tag-ctxl-params
- Other custom tag improvements:
New 'tag boundProps' feature:
Tag definition can include: tag.boundProps - which specifies any additional props
that are bound, without needing ^myprop=... notation. See sample:
http://www.jsviews.com/#samples/tag-controls/range
New 'tag contentCtx' feature:
Tag definition can include: tag.contentCtx - which specifies the data context within
the tag block content.
Set contentCtx = true for inheriting parentView context, or to a function, for
specifying other context
New 'tag argDefault' feature:
Tag definition can include: tag.argDefault: false - which prevents the first arg
defaulting to current data
New 'tag onUpdate: false' feature:
Tag definition can include: tag.onUpdate: false - which is equivalent to an onUpdate
handler which does nothing but returns false, so tag does not rerender when bound
args or props update
- Major update for jQuery UI widget-based tag controls library:
Extensive new jQueryUI widget controls support and accompanying samples/documentation:
http://www.jsviews.com/#download/jqueryui-tagcontrols
http://www.jsviews.com/#samples/tag-controls/jqui
- New lateRender=true feature: set lateRender=true on any tag, to make the tag render only
after completing the data-linking pass. Useful for using expressions such as
#childTags('myTag') in data-link expressions.
See tests: http://www.jsviews.com/test/unit-tests-jsviews.html?testId=6be4ff95
and sample: http://www.jsviews.com/#samples/tag-controls/jqui/selectable@late-render
- {^{on ...}} with no content allows setting width, height, id and class
Perf improvements for sorting, moving, refreshing:
- Much improved perf for {^{for myArray}}...{{/for}} when making observable changes to
underlying array. When using $.observable(myArray).refresh(...) or
$.observable(myArray).move(...), the resulting changes to the rendered items no longer
result in deleting and re-rendering the moved items. Instead the rendered HTML elements
are simply moved to their new positions under the parent element.
Bug fixes:
- #361: Breaking change (radiobuttons) - both
radiogroup and directly data-linked radio buttons now behave identically. Neither of
them coerce value to string
- Bug with setting tag.depends=... (Breaking change: Note that setting fn.depends="myArray"
updates for array changes as well as prop change. See:
http://www.jsviews.com/test/unit-tests-jsviews.html?testId=303f5bfd
- #354: Minor 'onError' bug
- #360: Datepicker bug fix for correct behavior
when data-linking to a value of type Date
- Several minor bug fixes
Unit tests:
- Several additional unit tests
Other minor breaking changes:
- The undocumented lazyLink feature has been removed
- The undocumented init: false feature for custom tags has been removed.1 parent 2581e59 commit 6cc2659
File tree
32 files changed
+13976
-8347
lines changed- demos/step-by-step
- test
- browserify/bundles
- unit-tests
32 files changed
+13976
-8347
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| |||
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
164 | | - | |
| 169 | + | |
165 | 170 | | |
166 | 171 | | |
167 | 172 | | |
| |||
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
177 | | - | |
| 182 | + | |
178 | 183 | | |
179 | 184 | | |
180 | 185 | | |
| |||
188 | 193 | | |
189 | 194 | | |
190 | 195 | | |
191 | | - | |
| 196 | + | |
192 | 197 | | |
193 | 198 | | |
194 | | - | |
| 199 | + | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
198 | | - | |
| 203 | + | |
199 | 204 | | |
200 | 205 | | |
201 | | - | |
| 206 | + | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
| |||
262 | 267 | | |
263 | 268 | | |
264 | 269 | | |
| 270 | + | |
265 | 271 | | |
266 | 272 | | |
267 | 273 | | |
| |||
329 | 335 | | |
330 | 336 | | |
331 | 337 | | |
332 | | - | |
| 338 | + | |
333 | 339 | | |
334 | 340 | | |
335 | 341 | | |
| |||
355 | 361 | | |
356 | 362 | | |
357 | 363 | | |
358 | | - | |
359 | | - | |
| 364 | + | |
| 365 | + | |
360 | 366 | | |
361 | 367 | | |
362 | 368 | | |
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
366 | | - | |
| 372 | + | |
367 | 373 | | |
368 | 374 | | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
372 | | - | |
| 378 | + | |
| 379 | + | |
373 | 380 | | |
374 | 381 | | |
375 | 382 | | |
| |||
393 | 400 | | |
394 | 401 | | |
395 | 402 | | |
396 | | - | |
| 403 | + | |
397 | 404 | | |
398 | 405 | | |
399 | 406 | | |
| |||
441 | 448 | | |
442 | 449 | | |
443 | 450 | | |
444 | | - | |
| 451 | + | |
| 452 | + | |
445 | 453 | | |
446 | 454 | | |
447 | 455 | | |
| |||
516 | 524 | | |
517 | 525 | | |
518 | 526 | | |
519 | | - | |
| 527 | + | |
520 | 528 | | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
525 | 533 | | |
526 | 534 | | |
527 | 535 | | |
| |||
532 | 540 | | |
533 | 541 | | |
534 | 542 | | |
535 | | - | |
536 | 543 | | |
537 | 544 | | |
538 | 545 | | |
| |||
544 | 551 | | |
545 | 552 | | |
546 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
547 | 558 | | |
548 | | - | |
549 | | - | |
| 559 | + | |
| 560 | + | |
550 | 561 | | |
551 | 562 | | |
552 | 563 | | |
| |||
585 | 596 | | |
586 | 597 | | |
587 | 598 | | |
588 | | - | |
589 | 599 | | |
590 | 600 | | |
591 | 601 | | |
| |||
600 | 610 | | |
601 | 611 | | |
602 | 612 | | |
603 | | - | |
604 | | - | |
605 | 613 | | |
606 | 614 | | |
607 | 615 | | |
| |||
664 | 672 | | |
665 | 673 | | |
666 | 674 | | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
667 | 678 | | |
668 | 679 | | |
669 | 680 | | |
670 | | - | |
671 | | - | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
672 | 684 | | |
673 | 685 | | |
674 | 686 | | |
675 | 687 | | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | 688 | | |
682 | 689 | | |
683 | | - | |
684 | 690 | | |
685 | 691 | | |
686 | 692 | | |
| |||
692 | 698 | | |
693 | 699 | | |
694 | 700 | | |
695 | | - | |
| 701 | + | |
696 | 702 | | |
697 | | - | |
| 703 | + | |
698 | 704 | | |
699 | 705 | | |
700 | 706 | | |
| |||
719 | 725 | | |
720 | 726 | | |
721 | 727 | | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | 728 | | |
740 | 729 | | |
741 | 730 | | |
| |||
824 | 813 | | |
825 | 814 | | |
826 | 815 | | |
827 | | - | |
| 816 | + | |
| 817 | + | |
828 | 818 | | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
845 | 829 | | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
846 | 835 | | |
847 | 836 | | |
848 | 837 | | |
| |||
943 | 932 | | |
944 | 933 | | |
945 | 934 | | |
946 | | - | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
947 | 938 | | |
948 | 939 | | |
949 | 940 | | |
950 | | - | |
| 941 | + | |
951 | 942 | | |
952 | 943 | | |
953 | 944 | | |
| |||
1005 | 996 | | |
1006 | 997 | | |
1007 | 998 | | |
1008 | | - | |
| 999 | + | |
1009 | 1000 | | |
1010 | 1001 | | |
1011 | 1002 | | |
| |||
1061 | 1052 | | |
1062 | 1053 | | |
1063 | 1054 | | |
1064 | | - | |
| 1055 | + | |
1065 | 1056 | | |
1066 | 1057 | | |
1067 | 1058 | | |
| |||
1123 | 1114 | | |
1124 | 1115 | | |
1125 | 1116 | | |
| 1117 | + | |
1126 | 1118 | | |
1127 | 1119 | | |
1128 | 1120 | | |
| |||
0 commit comments