Debian Codegraph @

dijit/tests/_BidiSupport/layout/StackContainer.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5 <title>StackContainer Demo</title>
6
7 <style>
8 @import "../../../themes/claro/document.css";
9 @import "../../css/dijitTests.css";
10 </style>
11
12 <!-- required: the default dijit theme: -->
13 <link id="themeStyles" rel="stylesheet" href="../../../../dijit/themes/claro/claro.css"/>
14
15 <!-- required: dojo.js -->
16 <script type="text/javascript" src="../../../../dojo/dojo.js"
17 data-dojo-config="async: true, has: { 'dojo-bidi': true }"></script>
18
19 <script type="text/javascript">
20 require([
21 "doh/runner",
22 "dojo/dom",
23 "dojo/parser",
24 "dojo/query",
25 "dijit/registry",
26 "dijit/layout/StackController",
27 "dijit/layout/ContentPane",
28 "dojo/domReady!"
29 ], function(doh, dom, parser, query, registry){
30
31 doh.register("parse", function(){
32 return parser.parse();
33 });
34
35 doh.register("tests._BidiSupport.layout.StackContainer.Bidi", [
36 {
37 name: "StackContainer Bidi",
38 runTest: function(){
39 query("span.dijitButtonText").forEach(function(node, index, arr){
40 if(registry.getEnclosingWidget(node).textDir !== 'auto') {
41 doh.is(node.dir, registry.getEnclosingWidget(node).textDir, "tab button direction should coinside with widget's 'textDir'");
42 }
43 });
44 }
45 }
46 ]);
47
48 doh.register("log", function(){
49 dom.byId('failures').innerHTML = doh._failureCount;
50 dom.byId('errors').innerHTML = doh._errorCount;
51 });
52
53 doh.run();
54 });
55 </script>
56 </head>
57
58 <body class="claro">
59 <h1 class="testTitle">Bidi RTL stack container</h1>
60 <span data-dojo-type="dijit/layout/StackController" data-dojo-props='containerId:"stackContainer"'></span>
61 <div id="stackContainer" data-dojo-type="dijit/layout/StackContainer"
62 data-dojo-props='textDir:"rtl", style:"width: 90%; border: 1px solid #9b9b9b; height: 6em; margin: 0.5em 0 0.5em 0; padding: 0.5em;"'>
63 <p id="page1" data-dojo-type="dijit/layout/ContentPane" data-dojo-props='textDir:"ltr",title:"Explicit LTR!"'>Explicit LTR text direction of content pane</p>
64 <p id="page2" data-dojo-type="dijit/layout/ContentPane" data-dojo-props='title:"Inherited RTL!"'>Inherited RTL title text direction of stack button</p>
65 <p id="page3" data-dojo-type="dijit/layout/ContentPane" data-dojo-props='textDir:"auto",title:"אExplicit AUTO!"'>Explicit 'auto' text direction of content pane</p>
66 </div>
67 <br>Errors:&nbsp;<span id="errors">?</span>
68 <br>Failures:&nbsp;<span id="failures">?</span>
69 </body>
70 </html>