csui.require.config({ config: { 'i18n': { locale: 'en-us', loadableLocales: {} }, 'csui/utils/authenticators/core.authenticators': { // Workaround for a bug in 20.2 and 20.3 enableRedirectingFormAuthenticator: false }, 'csui/integration/folderbrowser/commands/go.to.node.history': { enabled: true }, 'csui/integration/folderbrowser/commands/open.full.page.container': { enabled: true } }, }); csui.onReady2([ 'csui/lib/marionette', 'csui/utils/contexts/page/page.context', 'csui/widgets/nodestable/nodestable.view', 'csui/dialogs/modal.alert/modal.alert', 'csui/utils/contexts/factories/node', 'csui/utils/contexts/factories/next.node' ], function (Marionette, PageContext, NodesTableView, ModalAlert, NodeModelFactory, NextNodeModelFactory) { var context = new PageContext({ factories: { connector: { connection: { session: { ticket: '...' } } } } }), nodesTableView = new NodesTableView({context: context }), nodesTableRegion = new Marionette.Region({ el: '#browser' }), currentNode = context.getModel(NodeModelFactory), nextNode = context.getModel(NextNodeModelFactory); nodesTableRegion.show(nodesTableView); currentNode.set('id', 2000); nextNode.on('change:id', function () { if (nextNode.get('container') !== false) { currentNode.clear({ silent: true }); currentNode.set('id', nextNode.get('id'), { silent: true }); context.fetch().fail(function (error) { ModalAlert.showError(error.toString()); }); } }); context.fetch(); }, function (error) { alert(error.message); });
csui.require.config({ config: { 'i18n': { locale: 'en-us', loadableLocales: {} }, 'csui/utils/authenticators/core.authenticators': { // Workaround for a bug in 20.2 and 20.3 enableRedirectingFormAuthenticator: false }, 'csui/integration/folderbrowser/commands/go.to.node.history': { enabled: true }, 'csui/integration/folderbrowser/commands/open.full.page.container': { enabled: true } }, }); csui.onReady2([ 'csui/lib/marionette', 'csui/utils/contexts/browsing/browsing.context', 'csui/widgets/nodestable/nodestable.view' ], function (Marionette, BrowsingContext, NodesTableView) { var context = new BrowsingContext({ factories: { connector: { connection: { credentials: { session: { ticket: '...' } } } } } }); var nodesTableView = new NodesTableView({ context: context }); var nodesTableRegion = new Marionette.Region({ el: '#browser' }); var nextNode = context.getModel('nextNode'); nodesTableRegion.show(nodesTableView); nextNode.set('id', 2000); }, function (error) { alert(error.message); });