Permalink
Browse files

Fixing Algorithms and OutgoingServices in the preset/production forms.

  • Loading branch information...
1 parent 0c39007 commit 2dbca189a670b529a39b17204660a737ed304189 @cpojer cpojer committed Nov 19, 2012
Showing with 9 additions and 9 deletions.
  1. +8 −8 JavaScript/App/MainForm.js
  2. +1 −1 JavaScript/App/OutgoingService.js
View
@@ -183,20 +183,20 @@ module.exports = new Class({
store.addEvent('upload', this.bound('onUpload'));
this.update(data);
- var cancelUpload = this.bound('cancelUpload');
- object.addEvent('show:once', function() {
+ object.addEvent('show:once', (function() {
if (hasUpload) {
var label = object.toElement().getElement('.input_file_label');
var popover = label ? label.getInstanceOf(Popover) : null;
var cancelButton = popover ? popover.getPopover().getElement('.cancelUpload') : null;
- if (cancelButton) cancelButton.addEvent('click', cancelUpload);
+ if (cancelButton) cancelButton.addEvent('click', this.bound('cancelUpload'));
+ }
+
+ if (isNewProduction) {
+ var select = object.toElement().getElement(this.options.presetChooserSelector);
+ if (select) select.addEvent('change', this.bound('onPresetSelect'));
}
- });
- object.addEvent('insert:once', this.updateAlgorithms.bind(this, data));
- if (isNewProduction) object.addEvent('show:once', (function() {
- var select = object.toElement().getElement(this.options.presetChooserSelector);
- if (select) select.addEvent('change', this.bound('onPresetSelect'));
+ this.updateAlgorithms(data);
}).bind(this));
View.getMain().push(this.getDisplayType(), object);
@@ -147,7 +147,7 @@ exports.createView = function(store) {
}
};
- object.addEvent('insert:once', function() {
+ object.addEvent('show:once', function() {
var parent = object.toElement();
var elements = parent.getElements('input[type=checkbox][data-uuid]');
elements.addEvent('change', onChange);

0 comments on commit 2dbca18

Please sign in to comment.