Revision e472ed67

b/snf-cyclades-app/synnefo/ui/static/snf/js/sync.js
310 310
    }
311 311

  
312 312
    api.errorHandler = function(event, xhr, settings, error) {
313
        // dont trigger api error untill timeouts occured
313
        // dont trigger api error until timeouts occured
314 314
        // exceed the skips_timeouts limit
315 315
        //
316 316
        // check only requests with skips_timeouts option set
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_create_view.js
284 284
            this.selected_type = type;
285 285
            this.types.removeClass("selected");
286 286
            this.types.filter("#type-select-" + this.selected_type).addClass("selected");
287
            
288
            var images = this.images_storage.update_images_for_type(
287
            this.images_storage.update_images_for_type(
289 288
                this.selected_type, 
290 289
                _.bind(this.show_loading_view, this), 
291 290
                _.bind(this.hide_loading_view, this)
......
311 310
        },
312 311

  
313 312
        select_image: function(image) {
313
            console.log(image ? image.get('id'): null);
314
            if (image && image.get('id') && !_.include(this.images_ids, image.get('id'))) {
315
                image = undefined;
316
            }
314 317
            if (!image && this.images_ids.length) {
315 318
                if (this.selected_image && this.images_ids.indexOf(this.selected_image.id) > -1) {
316 319
                    image = this.selected_image;
......
318 321
                    image = this.images_storage.get(this.images_ids[0]);
319 322
                }
320 323
            }
321
                
322
            if (!this.images_ids.length) { image = this.selected_image || undefined };
324
             
325
            // no images select null image so that next button gets hidden
326
            if (!this.images_ids.length) { image = undefined };
323 327
            
324 328
            if ((!this.selected_image && image) || (this.selected_image != image))
325 329
                this.trigger("change", image);
......
397 401
                this.images_list.hide();
398 402
            }
399 403

  
400
            this.select_image();
401
            
402 404
            var self = this;
403 405
            this.images_list.find(".image-details").click(function(){
404 406
                self.select_image($(this).data("image"));

Also available in: Unified diff