|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | + <title>jQuery UI - Text direction option</title> |
| 7 | + <link rel="stylesheet" href="../../themes/base/all.css"> |
| 8 | + <link rel="stylesheet" href="../demos.css"> |
| 9 | + <script src="../../external/requirejs/require.js"></script> |
| 10 | + <script src="../bootstrap.js" data-modules="accordion autocomplete button controlgroup checkboxradio menu selectmenu tabs tooltip"> |
| 11 | + $( ".button1" ).button({textDir: "rtl", icon: "ui-icon-gear", iconPosition: "end"}); |
| 12 | + $( ".button2" ).button({textDir: "auto"}); |
| 13 | + |
| 14 | + $( ".controlgroup" ).controlgroup({textDir: "rtl"}); |
| 15 | + |
| 16 | + $( ".shape-bar input" ).checkboxradio({textDir: "ltr"}); |
| 17 | + $( ".shape-bar input" ).change( function () { |
| 18 | + var textDir = $(this).val(); |
| 19 | + $( ".shape-bar input" ).each(function( ) { |
| 20 | + $( this ).checkboxradio( "option", "textDir", textDir ); |
| 21 | + } ); |
| 22 | + } ); |
| 23 | + |
| 24 | + var icons = { |
| 25 | + header: "ui-icon-circle-arrow-e", |
| 26 | + activeHeader: "ui-icon-circle-arrow-s" |
| 27 | + }; |
| 28 | + $( "#accordion, #accordion-rtl" ).accordion({ icons: icons, textDir: "auto"}); |
| 29 | + |
| 30 | + var availablePrompts = ["Left-to-right !!!", "ימין-שמאל RTL !!!", " LTR שמאל-ימין !!!"]; |
| 31 | + $( "#prompts, #prompts-rtl" ).autocomplete({source: availablePrompts, textDir: "auto"}); |
| 32 | + |
| 33 | + $( "#menu, #menu-rtl" ).menu({textDir: "rtl"}); |
| 34 | + |
| 35 | + $( "#selectmenu, #selectmenu-rtl" ).selectmenu({textDir: "auto"}); |
| 36 | + |
| 37 | + $( "#tabs, #tabs-rtl" ).tabs({textDir: "rtl"}); |
| 38 | + |
| 39 | + $( "#tooltip, #tooltip-rtl" ).tooltip({textDir: "rtl"}); |
| 40 | + </script> |
| 41 | + <style> |
| 42 | + .ui-menu { width: 150px; } |
| 43 | + div { margin-left: 5px; margin-right: 5px; } |
| 44 | + table, td { border-style: solid; } |
| 45 | + td { width: 50%; } |
| 46 | + </style> |
| 47 | +</head> |
| 48 | +<body> |
| 49 | +<div class="demo-description"> |
| 50 | +<p>Examples of "text direction" (textDir) option effect for various widgets.</p> |
| 51 | +<p>This option only controls the base text direction of widget contained text. The widget's GUI mirroring isn't affected by its base text direction.</p> |
| 52 | +</div> |
| 53 | + |
| 54 | +<table> |
| 55 | +<tr> |
| 56 | + <th>Left-To-Right GUI</th> |
| 57 | + <th>Right-To-Left GUI</th> |
| 58 | +</tr> |
| 59 | +<tr> |
| 60 | +<td> |
| 61 | +<div id="LTR_GUI"> |
| 62 | + <h2>Buttons</h2> |
| 63 | + <button class="button1">RTL text direction ...</button> |
| 64 | + <input class="button2" type="submit" value="AUTO text direction ..."> |
| 65 | + |
| 66 | + <h2>Accordion (AUTO text direction)</h2> |
| 67 | + <div id="accordion"> |
| 68 | + <h3>AUTO textDir ...</h3> |
| 69 | + <div> |
| 70 | + <p>First section </p> |
| 71 | + </div> |
| 72 | + <h3>LTR שמאל-ימין ...</h3> |
| 73 | + <div> |
| 74 | + <p>Second section </p> |
| 75 | + </div> |
| 76 | + <h3>ימין-שמאל RTL ...</h3> |
| 77 | + <div> |
| 78 | + <p>Third section </p> |
| 79 | + </div> |
| 80 | + </div> |
| 81 | + <h2>Autocomplete (AUTO text direction)</h2> |
| 82 | + <span>(type in character 'r') - </span><input id="prompts"> |
| 83 | + |
| 84 | + <h2>Menu (RTL text direction)</h2> |
| 85 | + <ul id="menu"> |
| 86 | + <li> |
| 87 | + <div><span class="ui-icon ui-icon-disk"></span>Save !</div> |
| 88 | + </li> |
| 89 | + <li> |
| 90 | + <div><span class="ui-icon ui-icon-zoomin"></span>Zoom !</div> |
| 91 | + </li> |
| 92 | + <li class="ui-state-disabled"> |
| 93 | + <div><span class="ui-icon ui-icon-print"></span>Print !</div> |
| 94 | + </li> |
| 95 | + <li> |
| 96 | + <div>Playback ...</div> |
| 97 | + <ul> |
| 98 | + <li> |
| 99 | + <div><span class="ui-icon ui-icon-seek-start"></span>Prev !</div> |
| 100 | + </li> |
| 101 | + <li> |
| 102 | + <div><span class="ui-icon ui-icon-stop"></span>Stop !</div> |
| 103 | + </li> |
| 104 | + <li> |
| 105 | + <div><span class="ui-icon ui-icon-play"></span>Play !</div> |
| 106 | + </li> |
| 107 | + <li> |
| 108 | + <div><span class="ui-icon ui-icon-seek-end"></span>Next !</div> |
| 109 | + </li> |
| 110 | + </ul> |
| 111 | + </li> |
| 112 | + </ul> |
| 113 | + <h2>Select menu (AUTO text direction)</h2> |
| 114 | + <fieldset> |
| 115 | + <label for="selectmenu">Select option:</label> |
| 116 | + <select name="selectmenu" id="selectmenu"> |
| 117 | + <option value="1" data-class="ui-icon-script">Left-to-right !!!</option> |
| 118 | + <option value="2" data-class="ui-icon-image">ימין-שמאל RTL !!!</option> |
| 119 | + <option value="3" data-class="ui-icon-script">LTR שמאל-ימין !!!</option> |
| 120 | + <option value="4" disabled="disabled" data-class="ui-icon-help">Disabled option !!!</option> |
| 121 | + </select> |
| 122 | + </fieldset> |
| 123 | + |
| 124 | + <h2>Tabs (RTL text direction)</h2> |
| 125 | + <div id="tabs"> |
| 126 | + <ul> |
| 127 | + <li><a href="#tabs-1">First tab !</a><span class="ui-icon ui-icon-gear" role="presentation"></span></li> |
| 128 | + <li><a href="#tabs-2">Second tab !</a><span class="ui-icon ui-icon-gear" role="presentation"></span></li> |
| 129 | + <li><a href="#tabs-3">ימין Third tab !</a><span class="ui-icon ui-icon-gear" role="presentation"></span></li> |
| 130 | + </ul> |
| 131 | + <div id="tabs-1"> |
| 132 | + First panel. |
| 133 | + </div> |
| 134 | + <div id="tabs-2"> |
| 135 | + Second panel. |
| 136 | + </div> |
| 137 | + <div id="tabs-3"> |
| 138 | + Third panel. |
| 139 | + </div> |
| 140 | + </div> |
| 141 | + |
| 142 | + <h2 class="demoHeaders">Tooltip (RTL text direction)</h2> |
| 143 | + |
| 144 | + <p id="tooltip"> |
| 145 | +<a style="color: blue" href="#" title="That's what this widget is??">Tooltips</a> can be attached to any element.</p> |
| 146 | +</div> |
| 147 | +</td> |
| 148 | + |
| 149 | +<td> |
| 150 | +<div dir="rtl" id="RTL_GUI"> |
| 151 | + <h2>Buttons</h2> |
| 152 | + <button class="button1">RTL text direction ...</button> |
| 153 | + <input class="button2" type="submit" value="AUTO text direction ..."> |
| 154 | + |
| 155 | + <h2>Accordion (AUTO text direction)</h2> |
| 156 | + <div id="accordion-rtl"> |
| 157 | + <h3>AUTO textDir ...</h3> |
| 158 | + <div> |
| 159 | + <p>First section </p> |
| 160 | + </div> |
| 161 | + <h3>LTR שמאל-ימין ...</h3> |
| 162 | + <div> |
| 163 | + <p>Second section </p> |
| 164 | + </div> |
| 165 | + <h3>ימין-שמאל RTL ...</h3> |
| 166 | + <div> |
| 167 | + <p>Third section </p> |
| 168 | + </div> |
| 169 | + </div> |
| 170 | + <h2>Autocomplete (AUTO text direction)</h2> |
| 171 | + <span>(type in character 'r') - </span><input id="prompts-rtl"> |
| 172 | + |
| 173 | + <h2>Menu (RTL text direction)</h2> |
| 174 | + <ul id="menu-rtl"> |
| 175 | + <li> |
| 176 | + <div><span class="ui-icon ui-icon-disk"></span>Save !</div> |
| 177 | + </li> |
| 178 | + <li> |
| 179 | + <div><span class="ui-icon ui-icon-zoomin"></span>Zoom !</div> |
| 180 | + </li> |
| 181 | + <li class="ui-state-disabled"> |
| 182 | + <div><span class="ui-icon ui-icon-print"></span>Print !</div> |
| 183 | + </li> |
| 184 | + <li> |
| 185 | + <div>Playback ...</div> |
| 186 | + <ul> |
| 187 | + <li> |
| 188 | + <div><span class="ui-icon ui-icon-seek-start"></span>Prev !</div> |
| 189 | + </li> |
| 190 | + <li> |
| 191 | + <div><span class="ui-icon ui-icon-stop"></span>Stop !</div> |
| 192 | + </li> |
| 193 | + <li> |
| 194 | + <div><span class="ui-icon ui-icon-play"></span>Play !</div> |
| 195 | + </li> |
| 196 | + <li> |
| 197 | + <div><span class="ui-icon ui-icon-seek-end"></span>Next !</div> |
| 198 | + </li> |
| 199 | + </ul> |
| 200 | + </li> |
| 201 | + </ul> |
| 202 | + <h2>Select menu (AUTO text direction)</h2> |
| 203 | + <fieldset> |
| 204 | + <label for="selectmenu-rtl">Select option:</label> |
| 205 | + <select name="selectmenu-rtl" id="selectmenu-rtl"> |
| 206 | + <option value="1" data-class="ui-icon-script">Left-to-right !!!</option> |
| 207 | + <option value="2" data-class="ui-icon-image">ימין-שמאל RTL !!!</option> |
| 208 | + <option value="3" data-class="ui-icon-script">LTR שמאל-ימין !!!</option> |
| 209 | + <option value="4" disabled="disabled" data-class="ui-icon-help">Disabled option !!!</option> |
| 210 | + </select> |
| 211 | + </fieldset> |
| 212 | + |
| 213 | + <h2>Tabs (RTL text direction)</h2> |
| 214 | + <div id="tabs-rtl"> |
| 215 | + <ul> |
| 216 | + <li><a href="#tabs-11">First tab !</a><span class="ui-icon ui-icon-gear" role="presentation"></span></li> |
| 217 | + <li><a href="#tabs-22">Second tab !</a><span class="ui-icon ui-icon-gear" role="presentation"></span></li> |
| 218 | + <li><a href="#tabs-33">ימין Third tab !</a><span class="ui-icon ui-icon-gear" role="presentation"></span></li> |
| 219 | + </ul> |
| 220 | + <div id="tabs-11"> |
| 221 | + First panel. |
| 222 | + </div> |
| 223 | + <div id="tabs-22"> |
| 224 | + Second panel. |
| 225 | + </div> |
| 226 | + <div id="tabs-33"> |
| 227 | + Third panel. |
| 228 | + </div> |
| 229 | + </div> |
| 230 | + |
| 231 | + <h2 class="demoHeaders">Tooltip (RTL text direction)</h2> |
| 232 | + |
| 233 | + <p id="tooltip-rtl"> |
| 234 | +<a style="color: blue" href="#" title="That's what this widget is??">Tooltips</a> can be attached to any element.</p> |
| 235 | +</div> |
| 236 | +</td> |
| 237 | +</tr> |
| 238 | +<tr> |
| 239 | +<td colspan="2"> |
| 240 | + <h2> Checkboxradio</h2> |
| 241 | + <div style="float: left; width:40%;"> |
| 242 | + Checkbox-Radio will change the text direction of its labels according to |
| 243 | + choosen option (respectively 'ltr', 'rtl' and 'auto' text direction. |
| 244 | + Select one of the possibilities to see the effect. |
| 245 | + </div> |
| 246 | + <div style="float: right;" class="shape-bar"> |
| 247 | + <label for="ltrID">LTR textDir !</label> |
| 248 | + <input type="radio" name="shape" id="ltrID" value="ltr" checked> |
| 249 | + <label for="rtlID">RTL textDir מלל !</label> |
| 250 | + <input type="radio" name="shape" id="rtlID" value="rtl"> |
| 251 | + <label for="autoID">ימין AUTO textDir !</label> |
| 252 | + <input type="radio" name="shape" id="autoID" value="auto"> |
| 253 | + </div> |
| 254 | +</td> |
| 255 | +</tr> |
| 256 | +<tr> |
| 257 | +<td colspan="2"> |
| 258 | + <h2>Controlgroup</h2> |
| 259 | + <fieldset> |
| 260 | + <legend> RTL text direction</legend> |
| 261 | + <div class="controlgroup"> |
| 262 | + <select id="car-type"> |
| 263 | + <option>First !</option> |
| 264 | + <option>Second !</option> |
| 265 | + <option>Third !</option> |
| 266 | + </select> |
| 267 | + <label for="radio">Radio !</label> |
| 268 | + <input type="radio" name="radio" id="radio"> |
| 269 | + <label for="checkbox">Checkbox !</label> |
| 270 | + <input type="checkbox" name="checkbox" id="checkbox"> |
| 271 | + <label class="ui-controlgroup-label">Controlgroup label !</label> |
| 272 | + <button>Button !</button> |
| 273 | + </div> |
| 274 | + </fieldset> |
| 275 | + <div> |
| 276 | + <br><br><br> |
| 277 | + </div> |
| 278 | +</td> |
| 279 | +</tr> |
| 280 | +</table> |
| 281 | + |
| 282 | +</body> |
| 283 | +</html> |
0 commit comments