Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Current »

In 

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.
 we've corrected uploader code, so initialization would happen without problems inside modal windows (DIVs produced from AJAX requests, like ThickBox, ColorBox, etc.). However we're not accounting for cases, when same modal window (which has uploader inside) would be opened twice (or more) without doing page refresh.

In such case we have 2 problems:

  1. previous uploader objects (that were created when modal window was opened before) are not removed
  2. if attempt is made to remove uploader (via UploadsManager.RemoveUploader(uploader_id) method), then it's initialization hooks are not removed

I don't know how to solve 1st problem, because we need 100% bullet-proof way of detecting uploader origin (page itself or a modal window). However I have a solution for 2nd problem.

if ( this.params.ajax ) {
	$(document).bind('FormManager.WindowManager.Ready', function ($e) {
		$me.init();
	});
}
else {
	$(document).ready(function() {
		$me.init();
	});
}

In above listed code we need to replace bind with one, to automatically remove event listener once it's being invoked.

Related Tasks

  • No labels