Skip to content

Commit

Permalink
minor visual cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
briehl committed Oct 23, 2020
1 parent 76355e4 commit a37e97a
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions kbase-extension/static/kbase/js/kbaseNarrative.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,25 +171,24 @@ define([
return Promise.try(() => {
if (this.workspaceRef) {
return this.workspaceRef;
} else {
return new Workspace(Config.url('workspace'), {
token: this.getAuthToken(),
})
.get_workspace_info({ id: this.workspaceId })
.then((wsInfo) => {
let narrId = wsInfo[8]['narrative'];
this.workspaceRef = this.workspaceId + '/' + narrId;
return this.workspaceRef;
});
}
return new Workspace(Config.url('workspace'), {
token: this.getAuthToken(),
})
.get_workspace_info({ id: this.workspaceId })
.then((wsInfo) => {
let narrId = wsInfo[8]['narrative'];
this.workspaceRef = this.workspaceId + '/' + narrId;
return this.workspaceRef;
});
});
};

Narrative.prototype.getUserPermissions = function () {
return new Workspace(Config.url('workspace'), {
const ws = new Workspace(Config.url('workspace'), {
token: this.getAuthToken(),
})
.get_workspace_info({ id: this.workspaceId })
});
return ws.get_workspace_info({ id: this.workspaceId })
.then((wsInfo) => {
return wsInfo[5];
});
Expand Down Expand Up @@ -241,15 +240,15 @@ define([
commonShortcuts.forEach(function (shortcut) {
try {
Jupyter.keyboard_manager.command_shortcuts.remove_shortcut(shortcut);
} catch (ex) {
console.warn('Error removing shortcut "' + shortcut + '"', ex);
} catch (e) {
console.warn('Error removing shortcut "' + shortcut + '"', e);
}
try {
Jupyter.notebook.keyboard_manager.edit_shortcuts.remove_shortcut(
shortcut
);
} catch (ex) {
// console.warn('Error removing shortcut '' + shortcut +'"', ex);
} catch (e) {
// console.warn('Error removing shortcut "' + shortcut + '"', e);
}
});

Expand Down

0 comments on commit a37e97a

Please sign in to comment.