~daker/ubuntu-html5-theme/fix.1286833

« back to all changes in this revision

Viewing changes to examples/html5-theme/widgets/Toolbar.html

  • Committer: CI bot
  • Author(s): Alexandre Abreu
  • Date: 2014-02-18 17:23:37 UTC
  • mfrom: (139.1.1 latest)
  • Revision ID: ps-jenkins@lists.canonical.com-20140218172337-01ic4gqnjno3ft9q
Based on a branch from daker: lp:~daker/ubuntu-html5-theme/fix.1202349

Revamped & made it work on desktop and touch. Remove the need to declare the toolbar in js. Fixes: 1202349

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
</head>
41
41
 
42
42
<body>
 
43
 
43
44
    <div data-role="mainview">
44
45
 
45
46
        <div data-role="content">
66
67
        </div>
67
68
    </div>
68
69
    <script type="text/javascript">
69
 
        var UI = new UbuntuUI(),
70
 
            tabs = UI.tabs("[data-role='tabs']");
 
70
        var UI = new UbuntuUI();
 
71
        window.onload = function() {
 
72
            UI.init();
71
73
            toolbar = UI.toolbar("footer1");
72
 
            toolbar.touch(function (event) {
73
 
                toolbar.toggle();
74
 
            });
 
74
        };
 
75
    </script>
75
76
    </script>
76
77
</body>
77
78
</html>