Sha256: 2a86962578149ac04c3edef00a8c4ee423f08ccd3ee5c5f07ccfb790d291cbde

Contents?: true

Size: 743 Bytes

Versions: 11

Compression:

Stored size: 743 Bytes

Contents

define(

['jquery', 'underscore', 'backbone',
 'admin_it/views/base', 'admin_it/views/menu'],

function($, _, Backbone, Base, Menu) {
  'use strict';

  var appLoaded = function() {
    this.render();
    this.menu = new Menu({
      app: this.app,
      template: this.app.templates['main_menu'],
      collection: this.app.metadata.resources,
      el: this.$('.admin-it-main-menu')
    });
    this.menu.render();
    this.menu.select();
  };

  var Main = Base.extend({
    initialize: function(opts) {
      Base.prototype.initialize.apply(this, arguments);
      this.listenTo(this.app, 'loaded', appLoaded);
    },

    render: function() {
      this.$el.html(this.template.render());
      return this;
    }
  });

  return Main
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
admin_it-1.3.8 client/src/js/views/main.js
admin_it-1.3.7 client/src/js/views/main.js
admin_it-1.3.6 client/src/js/views/main.js
admin_it-1.3.5 client/src/js/views/main.js
admin_it-1.3.4 client/src/js/views/main.js
admin_it-1.3.3 client/src/js/views/main.js
admin_it-1.3.2 client/src/js/views/main.js
admin_it-1.3.1 client/src/js/views/main.js
admin_it-1.3.0 client/src/js/views/main.js
admin_it-1.2.8 client/src/js/views/main.js
admin_it-1.2.7 client/src/js/views/main.js