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

« back to all changes in this revision

Viewing changes to 0.1/ambiance/js/pagestacks.js

  • Committer: CI bot
  • Author(s): Alexandre Abreu
  • Date: 2014-02-17 17:02:57 UTC
  • mfrom: (131.3.4 fix-page-and-title-behavior)
  • Revision ID: ps-jenkins@lists.canonical.com-20140217170257-x54rha44v231gnbu
Fix page & pagestack behavior regarding the page title updates & tabs relationship which is very flawed atm.

A page should have a title.
In a page stack, the page's title should be reflected *dynamically* in the header as the page is pushed/popped. Fixes: 1279891

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 * @constructor
42
42
 * @example
43
43
 
44
 
     <div data-role="page">
 
44
     <div data-role="mainview">
 
45
 
45
46
        <header data-role="header">
46
 
          [...]
47
47
        </header>
 
48
 
48
49
        <div data-role="content">
 
50
 
49
51
          <div data-role="pagestack">
50
 
            <div data-role="page" id="main">
 
52
 
 
53
            <div data-role="page" id="main" data-title="Page 1">
51
54
            </div>
52
 
            <div data-role="page" id="page2">
 
55
 
 
56
            <div data-role="page" id="page2" data-title="Page 2">
53
57
              [...]
54
58
              <footer data-role="footer" class="revealed" id="footerPage2">
55
59
                [...]
56
60
              </footer>
57
61
            </div>
 
62
 
58
63
            <footer data-role="footer" class="revealed" id="footerAppWide">
59
64
              [...]
60
65
            </footer>
 
66
 
61
67
          </div>  <!-- end of Pagestack div -->
 
68
 
62
69
        </div>
 
70
 
63
71
      </div>
64
72
 
65
73
      JavaScript: