~abreu-alexandre/ubuntu-html5-theme/add-button-class-ubuntu

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Kyle Nitzsche
  • Date: 2013-11-01 20:38:57 UTC
  • mfrom: (90.1.4 trunk)
  • Revision ID: tarmac-20131101203857-o50mfgnebkogb950
This MR does three main things:
1) Implements yuidoc comments in all js files to support API doc generation, and provides yuidoc assets (theme dir and json file) needed to build the API docs. Bug LP: #1241029
3) Provides JS classes for shape and page with corresponding UbuntuUI prototype constructor functions. Bug LP: #1243248
4) Adds a getEl(UbuntuUIObject) to return the element for any Ubuntu class. Also LP: #1243248.

Approved by PS Jenkins bot, David Barth.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Adnane Belmadiaf <daker@ubuntu.com>
 
3
 * License granted by Canonical Limited
 
4
 *
 
5
 * This file is part of ubuntu-html5-theme.
 
6
 *
 
7
 * This package is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU Lesser General Public License as 
 
9
 * published by the Free Software Foundation; either version 3 of the 
 
10
 * License, or
 
11
 * (at your option) any later version.
 
12
 
 
13
 * This package is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 
 
18
 * You should have received a copy of the GNU Lesser General Public 
 
19
 * License along with this program. If not, see 
 
20
 * <http://www.gnu.org/licenses/>.
 
21
 */
 
22
 
 
23
/**
 
24
 * An Ubuntu app consists of a Pagestack containing one or more Pages. Each page displays full-screen. See the Pagestack class.
 
25
 
 
26
Each Page must have an <em>id</em> attriubute. This is used to push the Page to the top of the Pagestack (see the Pagestack class).
 
27
 
 
28
Navigation between Pages is typically provided by the Header and its Tabs. See the Header class.
 
29
 * @class Page
 
30
 * @constructor
 
31
 * @namespace UbuntuUI
 
32
 * @example
 
33
      </body>
 
34
        <div data-role="page">
 
35
          <header data-role="header">
 
36
            [...]
 
37
          </header>
 
38
          <div data-role="content">
 
39
            <div data-role="pagestack">
 
40
              <div data-role="page" id="main">
 
41
                [...]
 
42
              </div>
 
43
              <div data-role="page" id="ID">
 
44
                [...]
 
45
              </div>
 
46
            </div>
 
47
          </div>
 
48
        </div>
 
49
      </body>
 
50
 
 
51
      JavaScript access:
 
52
      var page = UI.page("pageID");
 
53
 */
 
54
var Page = function (id) {
 
55
    this.id =  id;
 
56
};
 
57
 
 
58
Page.prototype = {
 
59
    /*
 
60
     * placeholder for future methods
 
61
     */
 
62
};