|
34 | 34 | </style>
|
35 | 35 |
|
36 | 36 |
|
37 |
| -<br/> |
38 |
| -<br/> |
39 |
| -<br/> |
40 |
| -<br/> |
41 |
| -<br/> |
42 |
| -<br/> |
43 |
| -<br/> |
44 | 37 |
|
45 |
| -<div style="padding: 100px;height: 60px; max-height: 60px; overflow: auto;"> |
46 |
| - |
47 |
| - |
48 |
| -</div> |
| 38 | +<div class="mdc-select mdc-select--outlined" id="ref"> |
| 39 | + <div class="mdc-select__anchor" aria-labelledby="outlined-select-label"> |
| 40 | + <span class="mdc-select__ripple"></span> |
| 41 | + <input type="text" disabled readonly id="demo-selected-text" class="mdc-select__selected-text"> |
| 42 | + <i class="mdc-select__dropdown-icon"></i> |
| 43 | + <span class="mdc-notched-outline"> |
| 44 | + <span class="mdc-notched-outline__leading"></span> |
| 45 | + <span class="mdc-notched-outline__notch"> |
| 46 | + <span id="outlined-select-label" class="mdc-floating-label">Pick a Food Group</span> |
| 47 | + </span> |
| 48 | + <span class="mdc-notched-outline__trailing"></span> |
| 49 | + </span> |
| 50 | + </div> |
49 | 51 |
|
| 52 | + <!-- Other elements from the select remain. --> |
| 53 | + <div class="mdc-select__menu mdc-menu mdc-menu-surface" role="listbox"> |
| 54 | + <ul class="mdc-list"> |
| 55 | + <li class="mdc-list-item mdc-list-item--selected" data-value="" aria-selected="true"></li> |
| 56 | + <li class="mdc-list-item" data-value="grains"> |
| 57 | + <span class="mdc-list-item__text"> |
| 58 | + Bread, Cereal, Rice, and Pasta |
| 59 | + </span> |
| 60 | + </li> |
| 61 | + <li class="mdc-list-item" data-value="vegetables"> |
| 62 | + <span class="mdc-list-item__text"> |
| 63 | + Vegetables |
| 64 | + </span> |
| 65 | + </li> |
| 66 | + <li class="mdc-list-item" data-value="fruit"> |
| 67 | + <span class="mdc-list-item__text"> |
| 68 | + Fruit |
| 69 | + </span> |
| 70 | + </li> |
| 71 | + </ul> |
50 | 72 |
|
51 |
| -<div class="mdc-dialog" |
52 |
| - id="refDialog" |
53 |
| - role="alertdialog" |
54 |
| - aria-modal="true" |
55 |
| - aria-labelledby="my-dialog-title" |
56 |
| - aria-describedby="my-dialog-content"> |
57 |
| - <div class="mdc-dialog__container"> |
58 |
| - <div class="mdc-dialog__surface"> |
59 |
| - <!-- Title cannot contain leading whitespace due to mdc-typography-baseline-top() --> |
60 |
| - <h2 class="mdc-dialog__title" id="my-dialog-title"><!-- |
61 |
| - -->Dialog Title<!-- |
62 |
| - --></h2> |
63 |
| - <div class="mdc-dialog__content" id="my-dialog-content"> |
64 |
| - Dialog body text goes here. |
65 |
| - |
66 |
| - <div class="mdc-select" id="ref"> |
67 |
| - <div class="mdc-select__anchor demo-width-class"> |
68 |
| - <i class="mdc-select__dropdown-icon"></i> |
69 |
| - <div class="mdc-select__selected-text"></div> |
70 |
| - <span class="mdc-floating-label">Pick a Food Group</span> |
71 |
| - <div class="mdc-line-ripple"></div> |
72 |
| - </div> |
73 |
| - |
74 |
| - <div class="mdc-select__menu mdc-menu mdc-menu-surface demo-width-class"> |
75 |
| - <ul class="mdc-list"> |
76 |
| - <li class="mdc-list-item mdc-list-item--selected" data-value="" aria-selected="true"></li> |
77 |
| - <li class="mdc-list-item" data-value="grains"> |
78 |
| - Bread, Cereal, Rice, and Pasta |
79 |
| - </li> |
80 |
| - <li class="mdc-list-item mdc-list-item--disabled" data-value="vegetables" |
81 |
| - aria-selected="true" |
82 |
| - aria-disabled="true" role="option"> |
83 |
| - Vegetables |
84 |
| - </li> |
85 |
| - <li class="mdc-list-item" data-value="fruit"> |
86 |
| - Fruit |
87 |
| - </li> |
88 |
| - </ul> |
89 |
| - </div> |
90 |
| - </div> |
91 |
| - |
92 |
| - </div> |
93 |
| - <footer class="mdc-dialog__actions"> |
94 |
| - <button type="button" class="mdc-button mdc-dialog__button" data-mdc-dialog-action="no"> |
95 |
| - <span class="mdc-button__label">No</span> |
96 |
| - </button> |
97 |
| - <button type="button" class="mdc-button mdc-dialog__button" data-mdc-dialog-action="yes"> |
98 |
| - <span class="mdc-button__label">Yes</span> |
99 |
| - </button> |
100 |
| - </footer> |
101 |
| - </div> |
102 | 73 | </div>
|
103 |
| - <div class="mdc-dialog__scrim"></div> |
104 | 74 | </div>
|
105 | 75 |
|
106 | 76 |
|
107 |
| -<script type="text/javascript"> |
108 |
| - |
109 | 77 |
|
110 |
| - class MDCSelectFoundation2 extends mdc.select.MDCSelectFoundation { |
| 78 | +<!--<div class="mdc-select demo-width-class" id="ref">--> |
| 79 | +<!-- <div class="mdc-select__anchor">--> |
| 80 | +<!-- <span class="mdc-select__ripple"></span>--> |
| 81 | +<!-- <input type="text" disabled readonly class="mdc-select__selected-text">--> |
| 82 | +<!-- <i class="mdc-select__dropdown-icon"></i>--> |
| 83 | +<!-- <span class="mdc-floating-label">Pick a Food Group</span>--> |
| 84 | +<!-- <span class="mdc-line-ripple"></span>--> |
| 85 | +<!-- </div>--> |
| 86 | + |
| 87 | +<!-- <div class="mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fullwidth">--> |
| 88 | +<!-- <ul class="mdc-list">--> |
| 89 | +<!-- <li class="mdc-list-item mdc-list-item--selected" data-value="" aria-selected="true"></li>--> |
| 90 | +<!-- <li class="mdc-list-item" data-value="grains">--> |
| 91 | +<!-- <span class="mdc-list-item__text">--> |
| 92 | +<!-- Bread, Cereal, Rice, and Pasta--> |
| 93 | +<!-- </span>--> |
| 94 | +<!-- </li>--> |
| 95 | +<!-- <li class="mdc-list-item" data-value="vegetables">--> |
| 96 | +<!-- <span class="mdc-list-item__text">--> |
| 97 | +<!-- Vegetables--> |
| 98 | +<!-- </span>--> |
| 99 | +<!-- </li>--> |
| 100 | +<!-- <li class="mdc-list-item" data-value="fruit">--> |
| 101 | +<!-- <span class="mdc-list-item__text">--> |
| 102 | +<!-- Fruit--> |
| 103 | +<!-- </span>--> |
| 104 | +<!-- </li>--> |
| 105 | +<!-- </ul>--> |
| 106 | +<!-- </div>--> |
| 107 | +<!--</div>--> |
111 | 108 |
|
112 | 109 |
|
113 |
| - } |
114 | 110 |
|
115 |
| - var refDialog = document.getElementById('refDialog'); |
116 |
| - var ref = document.getElementById('ref'); |
117 |
| - // debugger; |
118 |
| - var c = new mdc.select.MDCSelect(ref); |
119 |
| - debugger; |
120 |
| - c.menu_.setIsHoisted(true); |
121 |
| - document.body.appendChild(c.menuElement_); |
122 |
| - // debugger; |
123 |
| - // c.menu_.setFixedPosition(true); |
| 111 | +<script type="text/javascript"> |
124 | 112 |
|
125 | 113 |
|
126 |
| - var d = new mdc.dialog.MDCDialog(refDialog); |
127 |
| - setTimeout(() => { |
128 |
| - d.open(); |
129 |
| - }, 1000); |
130 | 114 |
|
| 115 | + var ref = document.getElementById('ref'); |
131 | 116 | // debugger;
|
| 117 | + var c = new mdc.select.MDCSelect(ref); |
132 | 118 |
|
133 |
| - // var oldOpenMenu = c.foundation_.adapter_.openMenu; |
134 |
| - // c.foundation_.adapter_.openMenu = function () { |
135 |
| - // console.log('openMenu'); |
136 |
| - // c.menu_.setFixedPosition(true); |
137 |
| - // oldOpenMenu(); |
138 |
| - // }; |
139 |
| - |
140 |
| - |
141 |
| - // var tooltip = document.getElementById('tRef'); |
142 |
| - // |
143 |
| - // new matBlazor.matTooltip.init(tooltip, ref); |
144 | 119 |
|
145 | 120 | </script>
|
146 | 121 |
|
|
0 commit comments