Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor View fixes.

  • Loading branch information...
commit 0d2ee9815da60fd91f0f60d437d5323871d4c428 1 parent 1b3363f
@cpojer cpojer authored
View
12 JavaScript/App/MainForm.js
@@ -28,6 +28,7 @@ module.exports = new Class({
options: {
displayName: '',
+ pluralDisplayName: '',
displayType: '',
baseURL: null,
saveURL: null,
@@ -50,6 +51,10 @@ module.exports = new Class({
return this.options.displayName;
},
+ getPluralDisplayName: function() {
+ return this.options.pluralDisplayName;
+ },
+
getDisplayType: function() {
return this.options.displayType;
},
@@ -158,6 +163,8 @@ module.exports = new Class({
title: this.getObjectName(data) || 'New ' + this.getDisplayName(),
content: UI.render('form-new-main', uiData),
back: (isEditMode ? {title: 'Cancel'} : null),
+ backTitle: this.getPluralDisplayName(),
+ backOptions: isProduction ? {className: 'small'} : null,
action: {
title: 'Save',
onClick: this.bound('onActionClick')
@@ -352,9 +359,8 @@ module.exports = new Class({
label.removeClass('info');
label.getInstanceOf(Popover).detach();
- // We actually need to prune the stack because Change Source is supposed
- // to transition to the right.
- if (View.getMain().getCurrentObject == this.object)
+ // We need to prune the stack because Change Source is supposed to transition to the right.
+ if (View.getMain().getCurrentObject() == this.object)
View.getMain().getStack().prune();
}
View
1  JavaScript/Controller/Preset.js
@@ -26,6 +26,7 @@ var createForm = function(options) {
use: [
new MainForm(Object.append({
displayName: 'Preset',
+ pluralDisplayName: 'Presets',
displayType: 'preset',
baseURL: '/preset/',
saveURL: 'presets',
View
1  JavaScript/Controller/Production.js
@@ -37,6 +37,7 @@ var createForm = function(options) {
use: [
new MainForm(Object.append({
displayName: 'Production',
+ pluralDisplayName: 'Productions',
displayType: 'production',
baseURL: '/production/',
saveURL: 'productions',
View
6 JavaScript/View/Controller.js
@@ -89,7 +89,7 @@ module.exports = new Class({
isImmediate = true;
current.push(object);
- this.fireEvent('change');
+ this.fireEvent('change', null, 1);
if (previous) previous.fireEvent('hide', [direction], 1);
// Pushing an invalid item on the stack, don't start a transition
@@ -116,13 +116,11 @@ module.exports = new Class({
// issues in the future. Trust me, it is the right trade off.
if (this.options.iOSScrollFlashFix && container && isImmediate && !previous) {
object.setElement(container).render();
- object.fireEvent('show', [direction], 1);
UI.update(this.element);
this.onTransitionEnd.delay(0, this);
} else {
// Everything after this is happy code again.
object.render();
- object.fireEvent('show', [direction], 1);
if (isImmediate) this.element.empty();
UI.transition(this.element, previous && previous.toElement(), object.toElement(), {
immediate: isImmediate,
@@ -131,8 +129,8 @@ module.exports = new Class({
});
}
+ object.fireEvent('show', [direction], 1);
object.attachPlugins();
- object.fireEvent('insert', [direction], 1);
object.revertScrollTop();
return this;
Please sign in to comment.
Something went wrong with that request. Please try again.