|
|
@@ -565,10 +565,12 @@ class EditorViewModel {
|
|
|
if (typeof skipUrlChange === 'undefined' && !self.isNotificationManager()) {
|
|
|
if (self.editorMode()) {
|
|
|
self.editorType(data.document.type.substring('query-'.length));
|
|
|
- huePubSub.publish('active.snippet.type.changed', {
|
|
|
- type: self.editorType(),
|
|
|
- isSqlDialect: self.getSnippetViewSettings(self.editorType()).sqlDialect
|
|
|
- });
|
|
|
+ if (!self.isNotificationManager()) {
|
|
|
+ huePubSub.publish('active.snippet.type.changed', {
|
|
|
+ type: self.editorType(),
|
|
|
+ isSqlDialect: self.getSnippetViewSettings(self.editorType()).sqlDialect
|
|
|
+ });
|
|
|
+ }
|
|
|
self.changeURL(
|
|
|
self.URLS.editor + '?editor=' + data.document.id + '&type=' + self.editorType()
|
|
|
);
|
|
|
@@ -591,10 +593,12 @@ class EditorViewModel {
|
|
|
};
|
|
|
|
|
|
self.newNotebook = function(editorType, callback, queryTab) {
|
|
|
- huePubSub.publish('active.snippet.type.changed', {
|
|
|
- type: editorType,
|
|
|
- isSqlDialect: editorType ? self.getSnippetViewSettings(editorType).sqlDialect : undefined
|
|
|
- });
|
|
|
+ if (!self.isNotificationManager()) {
|
|
|
+ huePubSub.publish('active.snippet.type.changed', {
|
|
|
+ type: editorType,
|
|
|
+ isSqlDialect: editorType ? self.getSnippetViewSettings(editorType).sqlDialect : undefined
|
|
|
+ });
|
|
|
+ }
|
|
|
$.post(
|
|
|
'/notebook/api/create_notebook',
|
|
|
{
|
|
|
@@ -619,12 +623,14 @@ class EditorViewModel {
|
|
|
if (window.location.getParameter('type') === '') {
|
|
|
hueUtils.changeURLParameter('type', self.editorType());
|
|
|
}
|
|
|
- huePubSub.publish('active.snippet.type.changed', {
|
|
|
- type: editorType,
|
|
|
- isSqlDialect: editorType
|
|
|
- ? self.getSnippetViewSettings(editorType).sqlDialect
|
|
|
- : undefined
|
|
|
- });
|
|
|
+ if (!self.isNotificationManager()) {
|
|
|
+ huePubSub.publish('active.snippet.type.changed', {
|
|
|
+ type: editorType,
|
|
|
+ isSqlDialect: editorType
|
|
|
+ ? self.getSnippetViewSettings(editorType).sqlDialect
|
|
|
+ : undefined
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (callback) {
|