| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> |
| 5 |
<title>Inline Edit Box Test</title> |
| 6 |
|
| 7 |
<style type="text/css"> |
| 8 |
@import "../../../../dijit/themes/claro/document.css"; |
| 9 |
@import "../../../../dijit/tests/css/dijitTests.css"; |
| 10 |
</style> |
| 11 |
|
| 12 |
|
| 13 |
<link id="themeStyles" rel="stylesheet" href="../../../../dijit/themes/claro/claro.css"/> |
| 14 |
|
| 15 |
|
| 16 |
<script type="text/javascript" src="../../../../dojo/dojo.js" |
| 17 |
data-dojo-config="parseOnLoad: true, isDebug: true, has: { 'dojo-bidi': true }"></script> |
| 18 |
|
| 19 |
<script type="text/javascript"> |
| 20 |
dojo.require("dojo.data.ItemFileReadStore"); |
| 21 |
dojo.require("dijit.InlineEditBox"); |
| 22 |
dojo.require("dijit.form.Textarea"); |
| 23 |
dojo.require("dijit.form.TextBox"); |
| 24 |
dojo.require("dijit.form.DateTextBox"); |
| 25 |
dojo.require("dijit.form.CurrencyTextBox"); |
| 26 |
dojo.require("dojo.currency"); |
| 27 |
dojo.require("dijit.form.ComboBox"); |
| 28 |
dojo.require("dijit.form.FilteringSelect"); |
| 29 |
dojo.require("dijit.form.NumberSpinner"); |
| 30 |
|
| 31 |
dojo.require("dijit.Editor"); |
| 32 |
dojo.require("dijit._editor.plugins.AlwaysShowToolbar"); |
| 33 |
|
| 34 |
dojo.require("dojo.parser"); // scan page for widgets and instantiate them |
| 35 |
|
| 36 |
function myHandler(newValue){ |
| 37 |
this._onChangeValue = newValue; // used by robot test file |
| 38 |
console.debug("onChange for id = " + this.id + ", value: " + newValue); |
| 39 |
} |
| 40 |
</script> |
| 41 |
</head> |
| 42 |
<body class="claro"> |
| 43 |
|
| 44 |
<h1 class="testTitle">Dijit InlineEditBox Bidi Test</h1> |
| 45 |
|
| 46 |
|
| 47 |
<span data-dojo-id="productStore" data-dojo-type="dojo/data/ItemFileReadStore" > |
| 48 |
<script type="dojo/method"> |
| 49 |
this._jsonData = { |
| 50 |
identifier: 'name', |
| 51 |
label: 'name', |
| 52 |
items: [ |
| 53 |
{ name: "refrigerator..." }, |
| 54 |
{ name: "\u05d0\u05e0\u05d9\u0020\u05d0\u05d5\u05de\u05e8\u05ea\u003a\u0020" }, |
| 55 |
{ name: "stove \u05d0\u05e0\u05d9\u0020\u05d0\u05d5\u05de\u05e8\u05ea\u003a\u0020 ..." }, |
| 56 |
{ name: "\u05d0\u05e0\u05d9\u0020\u05d0\u05d5\u05de\u05e8\u05ea\u003a\u0020 heater ..." } |
| 57 |
] |
| 58 |
}; |
| 59 |
</script> |
| 60 |
</span> |
| 61 |
|
| 62 |
<h2>InlineEditBox with TextBox</h2> |
| 63 |
<h3>TextDit LTR: </h3> |
| 64 |
<span id="P0" data-dojo-type="dijit/InlineEditBox" data-dojo-props='textDir:"ltr", value:"", onChange:myHandler, autoSave:true, title:"test"'> |
| 65 |
</span> |
| 66 |
<h3>TextDir RTL: </h3> |
| 67 |
<span id="P1" data-dojo-type="dijit/InlineEditBox" data-dojo-props='textDir:"rtl", value:"ערך חדש!!", onChange:myHandler, autoSave:true, title:"test"'> |
| 68 |
</span> |
| 69 |
<h3>TextDir AUTO: </h3> |
| 70 |
<span id="P2" data-dojo-type="dijit/InlineEditBox" data-dojo-props='textDir:"auto", value:"Hello!", onChange:myHandler, autoSave:true, title:"test"'> |
| 71 |
</span> |
| 72 |
<input id="button" type="button" onclick="dijit.byId('P2').set('value', 'ערך חדש!')" value = "change value"/> |
| 73 |
|
| 74 |
|
| 75 |
<h2>InlineEditBox with Textarea</h2> |
| 76 |
<h3>TextDir LTR</h3> |
| 77 |
<span id="P3" data-dojo-type="dijit/InlineEditBox" data-dojo-props='autoSave:true, textDir:"ltr", editor:"dijit.form.Textarea", value: "Text Area test ערך !!!", title:"additional details"'></span> |
| 78 |
<h3>TextDir RTL</h3> |
| 79 |
<span id="P4" data-dojo-type="dijit/InlineEditBox" data-dojo-props='autoSave:true, textDir:"rtl", editor:"dijit.form.Textarea", value: "Text Area test ערך !!!", title:"additional details"'></span> |
| 80 |
<h3>TextDir AUTO</h3> |
| 81 |
<span id="P5" data-dojo-type="dijit/InlineEditBox" data-dojo-props='autoSave:true, textDir:"auto", editor:"dijit.form.Textarea", value: "Text Area test ערך חדש!!!", title:"additional details"'></span> |
| 82 |
<input id="Button1" type="button" onclick="dijit.byId('P5').set('value', 'ערך חדש!')" value = "change value"/> |
| 83 |
|
| 84 |
|
| 85 |
<h2>InlineEditBox with Combobox</h2> |
| 86 |
<h3>TextDir LTR</h3> |
| 87 |
<span id="combo1" data-dojo-type="dijit/InlineEditBox" data-dojo-props='textDir:"ltr", editor:"dijit.form.ComboBox", |
| 88 |
editorParams:{searchAttr: "name", store: productStore, autocomplete: false, hasDownArrow: false}, |
| 89 |
width:"200px", autoSave:false, title:"item name"'>refrigerators...</span> |
| 90 |
<h3>TextDir RTL</h3> |
| 91 |
<span id="combo2" data-dojo-type="dijit/InlineEditBox" data-dojo-props='textDir:"rtl", editor:"dijit.form.ComboBox", |
| 92 |
editorParams:{searchAttr: "name", store: productStore, autocomplete: false, hasDownArrow: false}, |
| 93 |
width:"200px", autoSave:false, title:"item name"'>refrigerators...</span> |
| 94 |
<h3>TextDir AUTO</h3> |
| 95 |
<span id="combo3" data-dojo-type="dijit/InlineEditBox" data-dojo-props='textDir:"auto", editor:"dijit.form.ComboBox", |
| 96 |
editorParams:{searchAttr: "name", store: productStore, autocomplete: false, hasDownArrow: false}, |
| 97 |
width:"200px", autoSave:false, title:"item name"'>refrigerators...</span> |
| 98 |
</body> |
| 99 |
</html> |