Ejemplo n.º 1
0
 initialize: function () {
   App.views = {};
   App.views.header = new HeaderView();
   App.views.footer = new FooterView();
   App.headerRegion.show(App.views.header);
   App.footerRegion.show(App.views.footer);
 },
Ejemplo n.º 2
0
        initialize: function (/*options*/) {
            this._userInfo = App.settings.userInfo || {};

        	this._headerView = new HeaderView({ userInfo: this._userInfo });
            App.headerRegion.show(this._headerView);

            // Event subscriptions
            // Prevent UI shifting on paging operations
            App.Notifications.on('Paginator.onPrePage', this._onPrePage, this);
            App.Notifications.on('Paginator.onDonePage', this._onDonePage, this);
            App.Notifications.on('Logout', this._onLogout, this);
        },
Ejemplo n.º 3
0
        initialize: function (/*options*/) {
            this._userInfo = App.settings.userInfo || {};
            if (!this._userInfo.isLoggedIn) {
                window.location.replace('/login');
            }
            this._isAdmin = false;
            if (_.isArray(this._userInfo.roles)) {
                if (_.indexOf(this._userInfo.roles, 'super-admin') >= 0) {
                    this._isAdmin = true;
                } else {
                    window.location.replace('/login');       
                }
            }

        	this._headerView = new HeaderView({ userInfo: this._userInfo });
            App.headerRegion.show(this._headerView);

            // Event subscriptions
            // Prevent UI shifting on paging operations
            App.Notifications.on('Paginator.onPrePage', this._onPrePage, this);
            App.Notifications.on('Paginator.onDonePage', this._onDonePage, this);
            App.Notifications.on('Logout', this._onLogout, this);
        },
Ejemplo n.º 4
0
 require(['views/header'], function (HeaderView) {
     self._header = new HeaderView();
     App.headerRegion.show(self._header);
 });
 initialize: function (options) {
 	this._headerView = new HeaderView();
     App.headerRegion.show(this._headerView);
 },