| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> |
| 5 | <meta name="viewport" |
| 6 | content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/> |
| 7 | <meta name="apple-mobile-web-app-capable" content="yes"/> |
| 8 | <title>Tree View example (FileStore)</title> |
| 9 | |
| 10 | <script type="text/javascript" src="../../deviceTheme.js" |
| 11 | data-dojo-config="'dojo-bidi': true, mblThemeFiles: ['base']"></script> |
| 12 | <script type="text/javascript" src="../../../../dojo/dojo.js" |
| 13 | data-dojo-config="async: true, parseOnLoad: true, has: { 'dojo-bidi': true }"></script> |
| 14 | |
| 15 | <script type="text/javascript"> |
| 16 | require([ |
| 17 | "dojox/data/FileStore", |
| 18 | "dijit/tree/ForestStoreModel", |
| 19 | "dojo/parser", |
| 20 | "dojox/mobile", |
| 21 | "dojox/mobile/compat", |
| 22 | "dojox/mobile/TreeView" |
| 23 | ], function(FileStore, ForestStoreModel){ |
| 24 | var store = new FileStore({ |
| 25 | url:"../../../data/demos/stores/filestore_dojotree.php", |
| 26 | id:"theStore", |
| 27 | label:"name", |
| 28 | pathAsQueryParam:true |
| 29 | }); |
| 30 | treeModel = new ForestStoreModel({ |
| 31 | store:store, |
| 32 | rootLabel:"Files", |
| 33 | childrenAttrs:["children"], |
| 34 | newItemIdAttr:"path" |
| 35 | }); |
| 36 | |
| 37 | }); |
| 38 | </script> |
| 39 | </head> |
| 40 | <body style="visibility:hidden;"> |
| 41 | <div dir="rtl" data-dojo-type="dojox.mobile.TreeView" |
| 42 | data-dojo-props='model: treeModel'></div> |
| 43 | </body> |
| 44 | </html> |