~ci-train-bot/ubuntu-html5-theme/ubuntu-html5-theme-ubuntu-yakkety-landing-067

« back to all changes in this revision

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

  • Committer: CI Train Bot
  • Author(s): daker
  • Date: 2015-03-04 21:32:00 UTC
  • mfrom: (198.1.1 fix.trunk-last)
  • Revision ID: ci-train-bot@canonical.com-20150304213200-rithigtkx07rujur
Removed ActionsBar deps
Fixed the back button in PageStack
Fixed PageStack actions Fixes: #1427729, #1427909

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    this.onActivatedCallbacks = [];
59
59
 
60
60
    this._header = document.querySelector('div[data-role="mainview"] header');
61
 
    this._tabtitle = this._header.querySelector('[data-role="tabtitle"]');
62
 
    this._backbtn = this._header.querySelector('[data-role="back-btn"]');
63
 
 
 
61
    this._tabTitle = this._header.querySelector('[data-role="tabtitle"]');
64
62
    this.__setup();
65
63
};
66
64
Page.PAGE_ACTIVATED_EVENT = 'ubuntu-html5-on-page-activated';
178
176
        } catch (e) {}
179
177
 
180
178
        title = title || DEFAULT_TITLE;
181
 
        this._tabtitle.textContent= title;
 
179
        this._tabTitle.textContent= title;
182
180
    },
183
181
 
184
182
    /**
192
190
            element.getAttribute('data-role') === 'page';
193
191
    },
194
192
 
195
 
 
196
 
    /**
197
 
     * @private
198
 
     */
199
 
    isFirst_Page: function (element) {
200
 
        return element.parentNode.querySelector(':first-child') ==  element;
201
 
    },
202
 
 
203
193
    /**
204
194
     * @private
205
195
     */
210
200
        if (!this.isPage(page)) {
211
201
            return;
212
202
        }
213
 
 
214
 
        this._backbtn.disabled = this.isFirst_Page(page);
215
203
        page.style.display = displayStyle;
216
204
    },
217
205