| 1 |
<!doctype html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/> |
| 5 |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/> |
| 6 |
<meta name="apple-mobile-web-app-capable" content="yes"/> |
| 7 |
<title>Bidi Mobile test - TextArea</title> |
| 8 |
|
| 9 |
<script type="text/javascript" src="../../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base']"></script> |
| 10 |
<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true, has: { 'dojo-bidi': true }"></script> |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
<script type="text/javascript"> |
| 15 |
require([ |
| 16 |
"dojo/_base/connect", |
| 17 |
"dojo/ready", |
| 18 |
"dojo/_base/array", |
| 19 |
"dojo/dom", |
| 20 |
"dijit/registry", |
| 21 |
"dojox/mobile/Button", |
| 22 |
"dijit/_base/manager", |
| 23 |
"dojox/mobile/parser", |
| 24 |
"dojox/mobile", |
| 25 |
"dojox/mobile/TextArea", |
| 26 |
"dojox/mobile/EdgeToEdgeDataList", |
| 27 |
"dojox/mobile/compat" |
| 28 |
], function(connect, ready, array, dom, registry){ |
| 29 |
ready(function(){ |
| 30 |
|
| 31 |
//change textDir, text |
| 32 |
var btnLtr = registry.byId("btn1"); |
| 33 |
btnLtr.connect(btnLtr, "onClick", function(){ |
| 34 |
registry.byId("largeTextAreaLTR1").set("textDir", "ltr"); |
| 35 |
registry.byId("largeTextAreaLTR2").set("textDir", "ltr"); |
| 36 |
registry.byId("largeTextAreaLTR3").set("textDir", "ltr"); |
| 37 |
registry.byId("largeTextAreaLTR4").set("textDir", "ltr"); |
| 38 |
|
| 39 |
}); |
| 40 |
var btnRtl = registry.byId("btn2"); |
| 41 |
btnRtl.connect(btnRtl, "onClick", function(){ |
| 42 |
registry.byId("largeTextAreaLTR1").set("textDir", "rtl"); |
| 43 |
registry.byId("largeTextAreaLTR2").set("textDir", "rtl"); |
| 44 |
registry.byId("largeTextAreaLTR3").set("textDir", "rtl"); |
| 45 |
registry.byId("largeTextAreaLTR4").set("textDir", "rtl"); |
| 46 |
|
| 47 |
}); |
| 48 |
var btnAuto = registry.byId("btn3"); |
| 49 |
btnAuto.connect(btnAuto, "onClick", function(){ |
| 50 |
registry.byId("largeTextAreaLTR1").set("textDir", "auto"); |
| 51 |
registry.byId("largeTextAreaLTR2").set("textDir", "auto"); |
| 52 |
registry.byId("largeTextAreaLTR3").set("textDir", "auto"); |
| 53 |
registry.byId("largeTextAreaLTR4").set("textDir", "auto"); |
| 54 |
|
| 55 |
}); |
| 56 |
|
| 57 |
|
| 58 |
}); |
| 59 |
|
| 60 |
}); |
| 61 |
</script> |
| 62 |
|
| 63 |
<style> |
| 64 |
html,body { |
| 65 |
height: 100%; |
| 66 |
overflow: hidden; |
| 67 |
} |
| 68 |
hr { |
| 69 |
border: none; |
| 70 |
margin: 0; |
| 71 |
} |
| 72 |
|
| 73 |
</style> |
| 74 |
|
| 75 |
|
| 76 |
</head> |
| 77 |
<body style="visibility:hidden;"> |
| 78 |
<div id="group1" data-dojo-type="dojox.mobile.View" data-dojo-props='keepScrollPos:false'> |
| 79 |
<div id="view0" data-dojo-type="dojox.mobile.View"> |
| 80 |
<h2 data-dojo-type="dojox.mobile.Heading">TextArea widget</h2> |
| 81 |
<h1 data-dojo-type="dojox.mobile.Heading">dir LTR</h1> |
| 82 |
<ul data-dojo-type="dojox.mobile.EdgeToEdgeList" > |
| 83 |
<li id="l1" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/LTR.png", moveTo:"view1"'>Tex Dir LTR</li> |
| 84 |
<li id="l2" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/RTL.png", moveTo:"view2"'>Tex Dir RTL</li> |
| 85 |
<li id="l3" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/auto.png", moveTo:"view3"'>Tex Dir AUTO</li> |
| 86 |
</ul> |
| 87 |
<h1 data-dojo-type="dojox.mobile.Heading">dir RTL</h1> |
| 88 |
<ul data-dojo-type="dojox.mobile.EdgeToEdgeList" > |
| 89 |
<li id="l4" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/LTR.png", moveTo:"view4"'>Tex Dir LTR</li> |
| 90 |
<li id="l5" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/RTL.png", moveTo:"view5"'>Tex Dir RTL</li> |
| 91 |
<li id="l6" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/auto.png", moveTo:"view6"'>Tex Dir AUTO</li> |
| 92 |
</ul> |
| 93 |
|
| 94 |
</div> |
| 95 |
|
| 96 |
|
| 97 |
<div id="view1" data-dojo-type="dojox.mobile.View"> |
| 98 |
<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir LTR</h1> |
| 99 |
<br> |
| 100 |
|
| 101 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreaLTR1" data-dojo-props='name:"largeTextAreaLTR", |
| 102 |
textDir:"ltr", placeHolder:"Hello world!", style:{width:"12em",height:"8em"}'></textarea> |
| 103 |
|
| 104 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreaLTR2" data-dojo-props='name:"largeTextAreaLTR", |
| 105 |
textDir:"ltr", style:{width:"12em",height:"8em"}'>שלום עולם!</textarea> |
| 106 |
|
| 107 |
<br> |
| 108 |
|
| 109 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreaLTR3" data-dojo-props='name:"largeTextAreaLTR", |
| 110 |
textDir:"ltr", style:{width:"12em",height:"8em"}'>Hello עולם!</textarea> |
| 111 |
|
| 112 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreaLTR4" data-dojo-props='name:"largeTextAreaLTR", |
| 113 |
textDir:"ltr", style:{width:"12em",height:"8em"}'>שלום World!</textarea> |
| 114 |
|
| 115 |
<br> |
| 116 |
<br> |
| 117 |
|
| 118 |
<button data-dojo-type="dojox.mobile.Button" id="btn1" class="mblRedButton" data-dojo-props='label:"Set textDir of TextBox to ltr"'></button> |
| 119 |
<button data-dojo-type="dojox.mobile.Button" id="btn2" class="mblRedButton" data-dojo-props='label:"Set textDir of TextBox to rtl"'></button> |
| 120 |
<button data-dojo-type="dojox.mobile.Button" id="btn3" class="mblRedButton" data-dojo-props='label:"Set textDir of TextBox to auto"'></button> |
| 121 |
|
| 122 |
</div> |
| 123 |
|
| 124 |
|
| 125 |
<div id="view2" data-dojo-type="dojox.mobile.View"> |
| 126 |
<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir RTL</h1> |
| 127 |
|
| 128 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreartl1" data-dojo-props='name:"largeTextAreaLTR", |
| 129 |
textDir:"rtl", placeHolder:"Hello world!", style:{width:"12em",height:"8em"}'></textarea> |
| 130 |
|
| 131 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreartl2" data-dojo-props='name:"largeTextAreaLTR", |
| 132 |
textDir:"rtl", style:{width:"12em",height:"8em"}'>שלום עולם!</textarea> |
| 133 |
|
| 134 |
<br> |
| 135 |
|
| 136 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreartl3" data-dojo-props='name:"largeTextAreaLTR", |
| 137 |
textDir:"rtl", style:{width:"12em",height:"8em"}'>Hello עולם!</textarea> |
| 138 |
|
| 139 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreartl4" data-dojo-props='name:"largeTextAreaLTR", |
| 140 |
textDir:"rtl", style:{width:"12em",height:"8em"}'>שלום World!</textarea> |
| 141 |
|
| 142 |
|
| 143 |
</div> |
| 144 |
|
| 145 |
<div id="view3" data-dojo-type="dojox.mobile.View"> |
| 146 |
<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir AUTO</h1> |
| 147 |
|
| 148 |
|
| 149 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreaauto1" data-dojo-props='name:"largeTextAreaLTR", |
| 150 |
textDir:"auto", style:{width:"12em",height:"8em"}'>Hello world!</textarea> |
| 151 |
|
| 152 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreaauto2" data-dojo-props='name:"largeTextAreaLTR", |
| 153 |
textDir:"auto", style:{width:"12em",height:"8em"}'>שלום עולם!</textarea> |
| 154 |
|
| 155 |
<br> |
| 156 |
|
| 157 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreaauto3" data-dojo-props='name:"largeTextAreaLTR", |
| 158 |
textDir:"auto", style:{width:"12em",height:"8em"}'>Hello עולם!</textarea> |
| 159 |
|
| 160 |
<textarea data-dojo-type="dojox.mobile.TextArea" id="largeTextAreaauto4" data-dojo-props='name:"largeTextAreaLTR", |
| 161 |
textDir:"auto", style:{width:"12em",height:"8em"}'>שלום World!</textarea> |
| 162 |
|
| 163 |
</div> |
| 164 |
|
| 165 |
|
| 166 |
<div id="view4" dir="rtl" data-dojo-type="dojox.mobile.View"> |
| 167 |
<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir LTR</h1> |
| 168 |
|
| 169 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", placeHolder:"ps!", |
| 170 |
textDir:"ltr", style:{width:"12em",height:"8em"}'>Hello world!</textarea> |
| 171 |
|
| 172 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 173 |
textDir:"ltr", style:{width:"12em",height:"8em"}'>שלום עולם!</textarea> |
| 174 |
|
| 175 |
<br> |
| 176 |
|
| 177 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 178 |
textDir:"ltr", style:{width:"12em",height:"8em"}'>Hello עולם!</textarea> |
| 179 |
|
| 180 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 181 |
textDir:"ltr", style:{width:"12em",height:"8em"}'>שלום World!</textarea> |
| 182 |
|
| 183 |
</div> |
| 184 |
|
| 185 |
<div id="view5" dir="rtl" data-dojo-type="dojox.mobile.View"> |
| 186 |
<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir RTL</h1> |
| 187 |
|
| 188 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 189 |
textDir:"rtl", style:{width:"12em",height:"8em"}'>Hello world!</textarea> |
| 190 |
|
| 191 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 192 |
textDir:"rtl", style:{width:"12em",height:"8em"}'>שלום עולם!</textarea> |
| 193 |
|
| 194 |
<br> |
| 195 |
|
| 196 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 197 |
textDir:"rtl", style:{width:"12em",height:"8em"}'>Hello עולם!</textarea> |
| 198 |
|
| 199 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 200 |
textDir:"rtl", style:{width:"12em",height:"8em"}'>שלום World!</textarea> |
| 201 |
|
| 202 |
</div> |
| 203 |
|
| 204 |
<div dir="rtl" id="view6" data-dojo-type="dojox.mobile.View"> |
| 205 |
<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir AUTO</h1> |
| 206 |
|
| 207 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 208 |
textDir:"auto", style:{width:"12em",height:"8em"}'>Hello world!</textarea> |
| 209 |
|
| 210 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 211 |
textDir:"auto", style:{width:"12em",height:"8em"}'>שלום עולם!</textarea> |
| 212 |
|
| 213 |
<br> |
| 214 |
|
| 215 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 216 |
textDir:"auto", style:{width:"12em",height:"8em"}'>Hello עולם!</textarea> |
| 217 |
|
| 218 |
<textarea dir="rtl" data-dojo-type="dojox.mobile.TextArea" data-dojo-props='name:"largeTextAreaLTR", |
| 219 |
textDir:"auto", style:{width:"12em",height:"8em"}'>שלום World!</textarea> |
| 220 |
</div> |
| 221 |
|
| 222 |
|
| 223 |
</div> |
| 224 |
</body> |
| 225 |
</html> |