define(function (require) { var app = require('app') , MainView = require('views/main') ; // Libs. // require('transit'); // App-level plugins. // require('plugins/errors'); // Add app-level regions. app.addRegions({ main: '#app-main' }); // Instantiate an empty signer model to act upon. // var signer = new Signer(); // Show views in regions. app.main.show(new MainView()); // Return modified app. return app; });
exports.showPictureDetailsView = function(path, mode) { var picture = exports.pictures.where({file: path})[0]; var view = new PictureDetailView({ model: picture, mode: mode }); app.main.show(view); };
App.execute('components:get', ['xemware.nimblescript.component.filelist'], function (err, Components) { var view = Components[0].createView(); App.main.show(view); view.listenTo(view, 'all', function () { }) });
App.execute('components:get', ['xemware.nimblescript.component.folderbrowser'], function (err, Components) { var view = Components[0].createView({ restricted: false }); App.main.show(view); view.listenTo(view, 'node', function () { }); });
exports.loading.done(function() { updateNavs(); updateConfigurationOptions(); _.each(exports.shows.models, function(model) { model.set('episodes', new Episodes(exports.filters.episodeLabels[model.get('tvshowid')])); }); var view = new TVShowContainerView({ collection: exports.shows }); app.main.show(view); });
exports.showPicturesListView = function(path) { updateNavs(); buildBreadcrumb(path); exports.pictures = new Files([], { type: 'pictures', directory: path }); var view = new PictureContainerView({ collection: exports.pictures, mode: 'list', breadcrumb: exports.breadcrumb }); app.main.show(view); exports.pictures.fetch(); };
exports.showPicturesCoverView = function(path) { updateNavs(); buildBreadcrumb(path); exports.pictures = new Files([], { type: 'pictures', directory: path }); var view = new PictureContainerView({ collection: exports.pictures, mode: 'cover', breadcrumb: exports.breadcrumb }); app.main.show(view); var options = { success: function() { view.refreshFilterPanel(); } }; exports.pictures.fetch(options); };
exports.showSlideshowView = function(path, mode) { if (exports.pictures.directory === path) { var view = new PictureSlideshowView({collection: exports.pictures, mode: mode}); app.main.show(view); } else { exports.pictures = new Files([], { type: 'pictures', directory: path }); var options = { success: function(collection, response, options) { var view = new PictureSlideshowView({collection: collection, mode: mode}); app.main.show(view); } }; exports.pictures.fetch(options); } };
App.execute('components:get', ['xemware.nimblescript.component.datatable'], function (err, Components) { var columns = [{ name: "id", // The key of the model attribute label: "ID", // The name to display in the header editable: false, // By default every cell in a column is editable, but *ID* shouldn't be // Defines a cell type, and ID is displayed as an integer without the ',' separating 1000s. cell: "string" }, { name: "name", label: "Name", // The cell type can be a reference of a Backgrid.Cell subclass, any Backgrid.Cell subclass instances like *id* above, or a string cell: "string" // This is converted to "StringCell" and a corresponding class in the Backgrid package namespace is looked up }]; var coll = new Backbone.Collection(); for (var i = 0; i < 100; i++) coll.add({ id: i, name: 'smee' }) var view = Components[0].createView({ columns: columns, collection: coll }); App.main.show(view); // view.updateColumnSizing(); });
exports.showPlaylists = function() { var view = new PlaylistTabsListView({ collection: playlists }); app.main.show(view); exports.selectPlaylist(playlists.getSelected()); };
var successCallback = function(model) { updateSeasonNavs(model.get('tvshowid'), model.get('season'), model.get('showtitle'), model.get('label')); var view = new SeasonEpisodeListView({ model: season }); app.main.show(view); }
var successCallback = function(model) { updateTvShowNavs(model.get('tvshowid'), model.get('label')); var view = new TVShowSeasonListView({ model: tvshow }); app.main.show(view); }
app.addInitializer(function () { app.header.show(new HeaderView()); app.main.show(new IndexMainView()); app.footer.show(new FooterView()); });
success: function(collection, response, options) { var view = new PictureSlideshowView({collection: collection, mode: mode}); app.main.show(view); }
App.execute('components:get', ['xemware.nimblescript.component.filelisteditor'], function (err, Components) { var view = Components[0].createView(); App.main.show(view); });
App.execute('components:get', ['xemware.nimblescript.component.fileexplorer'], function (err, Components) { var view = Components[0].createView({ anchorToWindow: true, initialPath: 'C:/Development/Assemblies' }); App.main.show(view); });