|
@@ -34,49 +34,52 @@ App.WizardStep8View = Em.View.extend({
|
|
|
o.jqprint();
|
|
|
},
|
|
|
|
|
|
- showLoadingIndicator: function(){
|
|
|
+ ajaxQueueLength: function() {
|
|
|
+ return this.get('controller.ajaxQueueLength');
|
|
|
+ }.property('controller.ajaxQueueLength'),
|
|
|
+
|
|
|
+ ajaxQueueLeft: function() {
|
|
|
+ return this.get('controller.ajaxQueueLeft');
|
|
|
+ }.property('controller.ajaxQueueLeft'),
|
|
|
+
|
|
|
+ showLoadingIndicator: function() {
|
|
|
if(this.get('controller.hasErrorOccurred')){
|
|
|
- $('.spinner').hide();
|
|
|
return;
|
|
|
}
|
|
|
if(!this.get('controller.isSubmitDisabled')){
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- var opts = {
|
|
|
- lines: 13, // The number of lines to draw
|
|
|
- length: 7, // The length of each line
|
|
|
- width: 4, // The line thickness
|
|
|
- radius: 10, // The radius of the inner circle
|
|
|
- corners: 1, // Corner roundness (0..1)
|
|
|
- rotate: 0, // The rotation offset
|
|
|
- color: '#000', // #rgb or #rrggbb
|
|
|
- speed: 1, // Rounds per second
|
|
|
- trail: 60, // Afterglow percentage
|
|
|
- shadow: false, // Whether to render a shadow
|
|
|
- hwaccel: false, // Whether to use hardware acceleration
|
|
|
- className: 'spinner', // The CSS class to assign to the spinner
|
|
|
- zIndex: 2e9, // The z-index (defaults to 2000000000)
|
|
|
- top: 'auto', // Top position relative to parent in px
|
|
|
- left: 'auto' // Left position relative to parent in px
|
|
|
- };
|
|
|
- var target = $('#spinner')[0];
|
|
|
- this.set('spinner', new Spinner(opts).spin(target));
|
|
|
-
|
|
|
- /*var el = $('#spinner').children('b');
|
|
|
- el.css('display', 'inline-block');
|
|
|
- var deg = 0;
|
|
|
- var timeoutId = setInterval(function(){
|
|
|
- if(!$('#spinner').length){
|
|
|
- clearInterval(timeoutId);
|
|
|
- }
|
|
|
- deg += 15;
|
|
|
- deg %= 360;
|
|
|
- el.css('transform', 'rotate(' + deg + 'deg)');
|
|
|
- el.css('-ms-transform', 'rotate(' + deg + 'deg)');
|
|
|
- el.css('-o-transform', 'rotate(' + deg + 'deg)');
|
|
|
- el.css('-moz-transform', 'rotate(' + deg + 'deg)');
|
|
|
- el.css('-webkit-transform', 'rotate(' + deg + 'deg)');
|
|
|
- }, 80);*/
|
|
|
+ App.ModalPopup.show({
|
|
|
+ header: '',
|
|
|
+
|
|
|
+ showFooter: false,
|
|
|
+
|
|
|
+ showCloseButton: false,
|
|
|
+
|
|
|
+ bodyClass: Ember.View.extend({
|
|
|
+ templateName: require('templates/wizard/step8_log_popup'),
|
|
|
+
|
|
|
+ controllerBinding: 'App.router.wizardStep8Controller',
|
|
|
+
|
|
|
+ ajaxQueueLength: function() {
|
|
|
+ return this.get('controller.ajaxQueueLength');
|
|
|
+ }.property(),
|
|
|
+
|
|
|
+ ajaxQueueComplete: function() {
|
|
|
+ return this.get('ajaxQueueLength') - this.get('controller.ajaxQueueLeft');
|
|
|
+ }.property('controller.ajaxQueueLeft', 'ajaxQueueLength'),
|
|
|
+
|
|
|
+ barWidth: function () {
|
|
|
+ return 'width: ' + (this.get('ajaxQueueComplete') / this.get('ajaxQueueLength') * 100) + '%;';
|
|
|
+ }.property('ajaxQueueComplete', 'ajaxQueueLength'),
|
|
|
+
|
|
|
+ autoHide: function() {
|
|
|
+ if (this.get('ajaxQueueComplete') === this.get('ajaxQueueLength')) {
|
|
|
+ this.get('parentView').hide();
|
|
|
+ }
|
|
|
+ }.observes('ajaxQueueComplete', 'ajaxQueueLength')
|
|
|
+ })
|
|
|
+ });
|
|
|
}.observes('controller.isSubmitDisabled','controller.hasErrorOccurred')
|
|
|
});
|