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

« back to all changes in this revision

Viewing changes to 0.1/ambiance/js/header.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:
32
32
 * @namespace UbuntuUI
33
33
 * @example
34
34
      <body>
35
 
        <div data-role="page">
 
35
        <div data-role="mainview">
 
36
 
36
37
          <header data-role="header" id="headerID">
37
 
            <div class="tabs-inner">
38
 
              <ul data-role="tabs">
39
 
                <li class="active" data-role="tab">
40
 
                  <a href="#main">Main</a>
41
 
                </li>
42
 
                <li data-role="tab">
43
 
                  <a href="#page2">Two</a>
44
 
                </li>
45
 
              </ul>
46
 
            </div>
 
38
            <ul data-role="tabs">
 
39
              <li data-role="tab-item" data-page="main">Main</li>
 
40
              <li data-role="tabitem" data-page="two">Two</li>
 
41
            </ul>
47
42
          </header>
 
43
 
48
44
          <div data-role="content">
49
45
            [...]
50
46
          </div>
 
47
 
51
48
        </div>
52
49
      </body>
53
50