Permalink
Browse files

added a negate history option flag so that sub-views are not returned…

… to upon relogin
  • Loading branch information...
1 parent 9a5b250 commit ede572f499a080bf07e37e0eb858699f14d03904 @wskidmore wskidmore committed Apr 26, 2012
Showing with 14 additions and 5 deletions.
  1. +2 −1 src/Fields/EditorField.js
  2. +5 −3 src/Fields/LookupField.js
  3. +7 −1 src/View.js
@@ -85,7 +85,8 @@ define('Sage/Platform/Mobile/Fields/EditorField', [
},
entry: this.originalValue,
changes: this.currentValue,
- entityName: this.entityName || (this.owner && this.owner.entityName)
+ entityName: this.entityName || (this.owner && this.owner.entityName),
+ negateHistory: true
};
},
navigateToEditView: function() {
@@ -73,6 +73,8 @@ define('Sage/Platform/Mobile/Fields/LookupField', [
valueKeyProperty: null,
valueTextProperty: null,
requireSelection: true,
+ singleSelect: true,
+
init: function() {
this.inherited(arguments);
@@ -125,16 +127,17 @@ define('Sage/Platform/Mobile/Fields/LookupField', [
createNavigationOptions: function() {
var options = {
selectionOnly: true,
- singleSelect: (false !== this.singleSelect),
+ singleSelect: this.singleSelect,
singleSelectAction: this.singleSelectAction || 'complete',
allowEmptySelection: !this.requireSelection,
resourceKind: this.resourceKind,
resourcePredicate: this.resourcePredicate,
where: this.where,
orderBy: this.orderBy,
+ negateHistory: true,
tools: {
tbar: [{
- id: 'complete',
+ id: 'complete',
fn: this.complete,
scope: this
},{
@@ -244,7 +247,6 @@ define('Sage/Platform/Mobile/Fields/LookupField', [
this.setSelections(selections);
}
- selectionModel.clear();
ReUI.back();
// if the event is fired before the transition, any XMLHttpRequest created in an event handler and
View
@@ -207,9 +207,15 @@ define('Sage/Platform/Mobile/View', [
},
getTag: function() {
},
+ getOptionsContext: function() {
+ if (this.options && this.options.negateHistory)
+ return { negateHistory: true };
+ else
+ return this.options;
+ },
getContext: function() {
// todo: should we track options?
- return {id: this.id, options: this.options};
+ return {id: this.id, options: this.getOptionsContext()};
},
getSecurity: function(access) {
return this.security;

0 comments on commit ede572f

Please sign in to comment.