| 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>Tree View example (FileStore)</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"></script> |
| 11 | |
| 12 | <script type="text/javascript"> |
| 13 | require([ |
| 14 | "dojox/data/FileStore", |
| 15 | "dijit/tree/ForestStoreModel", |
| 16 | "dojox/mobile/parser", |
| 17 | "dojox/mobile", |
| 18 | "dojox/mobile/compat", |
| 19 | "dojox/mobile/TreeView" |
| 20 | ], function(FileStore, ForestStoreModel){ |
| 21 | var store = new FileStore({ |
| 22 | url: "../../data/demos/stores/filestore_dojotree.php", |
| 23 | id: "theStore", |
| 24 | label: "name", |
| 25 | pathAsQueryParam: true |
| 26 | }); |
| 27 | treeModel = new ForestStoreModel({ |
| 28 | store: store, |
| 29 | rootLabel: "Files", |
| 30 | childrenAttrs: ["children"], |
| 31 | newItemIdAttr: "path" |
| 32 | }); |
| 33 | }); |
| 34 | </script> |
| 35 | </head> |
| 36 | <body style="visibility:hidden;"> |
| 37 | <div data-dojo-type="dojox.mobile.TreeView" |
| 38 | data-dojo-props='model: treeModel'></div> |
| 39 | </body> |
| 40 | </html> |