Ability to set 'next' to advance to next area/conf during newscan
This commit is contained in:
parent
b1d855e36c
commit
af911f8e74
|
@ -169,7 +169,6 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
||||||
}
|
}
|
||||||
cb(newFocusViewId);
|
cb(newFocusViewId);
|
||||||
},
|
},
|
||||||
|
|
||||||
headerSubmit : function(formData, extraArgs, cb) {
|
headerSubmit : function(formData, extraArgs, cb) {
|
||||||
self.switchToBody();
|
self.switchToBody();
|
||||||
return cb(null);
|
return cb(null);
|
||||||
|
|
|
@ -22,8 +22,9 @@ exports.getModule = class AreaViewFSEModule extends FullScreenEditorModule {
|
||||||
this.editorMode = 'view';
|
this.editorMode = 'view';
|
||||||
|
|
||||||
if(_.isObject(options.extraArgs)) {
|
if(_.isObject(options.extraArgs)) {
|
||||||
this.messageList = options.extraArgs.messageList;
|
this.messageList = options.extraArgs.messageList;
|
||||||
this.messageIndex = options.extraArgs.messageIndex;
|
this.messageIndex = options.extraArgs.messageIndex;
|
||||||
|
this.lastMessageNextExit = options.extraArgs.lastMessageNextExit;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.messageList = this.messageList || [];
|
this.messageList = this.messageList || [];
|
||||||
|
@ -41,6 +42,12 @@ exports.getModule = class AreaViewFSEModule extends FullScreenEditorModule {
|
||||||
return self.loadMessageByUuid(self.messageList[self.messageIndex].messageUuid, cb);
|
return self.loadMessageByUuid(self.messageList[self.messageIndex].messageUuid, cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// auto-exit if no more to go?
|
||||||
|
if(self.lastMessageNextExit) {
|
||||||
|
self.lastMessageReached = true;
|
||||||
|
return self.prevMenu(cb);
|
||||||
|
}
|
||||||
|
|
||||||
return cb(null);
|
return cb(null);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -120,6 +127,9 @@ exports.getModule = class AreaViewFSEModule extends FullScreenEditorModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
getMenuResult() {
|
getMenuResult() {
|
||||||
return this.messageIndex;
|
return {
|
||||||
|
messageIndex : this.messageIndex,
|
||||||
|
lastMessageReached : this.lastMessageReached,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,6 +49,8 @@ exports.getModule = class MessageListModule extends MessageAreaConfTempSwitcher(
|
||||||
|
|
||||||
this.messageAreaTag = config.messageAreaTag;
|
this.messageAreaTag = config.messageAreaTag;
|
||||||
|
|
||||||
|
this.lastMessageReachedExit = _.get(options, 'lastMenuResult.lastMessageReached', false);
|
||||||
|
|
||||||
if(options.extraArgs) {
|
if(options.extraArgs) {
|
||||||
//
|
//
|
||||||
// |extraArgs| can override |messageAreaTag| provided by config
|
// |extraArgs| can override |messageAreaTag| provided by config
|
||||||
|
@ -73,6 +75,7 @@ exports.getModule = class MessageListModule extends MessageAreaConfTempSwitcher(
|
||||||
messageAreaTag : self.messageAreaTag,
|
messageAreaTag : self.messageAreaTag,
|
||||||
messageList : self.messageList,
|
messageList : self.messageList,
|
||||||
messageIndex : formData.value.message,
|
messageIndex : formData.value.message,
|
||||||
|
lastMessageNextExit : true,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -107,6 +110,10 @@ exports.getModule = class MessageListModule extends MessageAreaConfTempSwitcher(
|
||||||
}
|
}
|
||||||
|
|
||||||
enter() {
|
enter() {
|
||||||
|
if(this.lastMessageReachedExit) {
|
||||||
|
return this.prevMenu();
|
||||||
|
}
|
||||||
|
|
||||||
super.enter();
|
super.enter();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue