Revision 5afdfc72 ui/static/snf/js/ui/web/ui_create_view.js

b/ui/static/snf/js/ui/web/ui_create_view.js
272 272
                                                  img.id, 
273 273
                                                  snf.ui.helpers.os_icon_tag(img.get("OS")),
274 274
                                                  img.get_readable_size(),
275
                                                  util.truncate(img.get("description"),35)));
275
                                                  util.truncate(img.get("description"), 35)));
276 276
            image.data("image", img);
277 277
            image.data("image_id", img.id);
278 278
            this.images_list.append(image);
......
539 539
                self.update_selected_from_ui();
540 540
            })
541 541

  
542
            this.$(".flavor-options li.disk_template.option").mouseover(function(){
543
                $(this).parent().find(".description").hide();
544
                $(this).find(".description").show();
545
            }).mouseout(function(){
546
                $(this).parent().find(".description").hide();
547
                $(this).parent().find(".selected .description").show();
548
            });
542
            //this.$(".flavor-options li.disk_template.option").mouseover(function(){
543
                //$(this).parent().find(".description").hide();
544
                //$(this).find(".description").show();
545
            //}).mouseout(function(){
546
                //$(this).parent().find(".description").hide();
547
                //$(this).parent().find(".selected .description").show();
548
            //});
549 549
        },
550 550

  
551 551
        sort_flavors: function(els) {
......
580 580
            this.$(".option.mem.value-" + flv.get("ram")).addClass("selected");
581 581
            this.$(".option.disk.value-" + flv.get("disk")).addClass("selected");
582 582
            this.$(".option.disk_template.value-" + flv.get("disk_template")).addClass("selected");
583
            this.$(".option.disk_template .description").hide();
584
            this.$(".option.disk_template.value-" + flv.get("disk_template") + " .description").show();
583
            
584
            var disk_el = this.$(".option.disk_template.value-" + flv.get("disk_template"));
585
            var basebgpos = 470;
586
                
587
            var append_to_bg_pos = 40 + (disk_el.index() * 91);
588
            var bg_pos = basebgpos - append_to_bg_pos;
589

  
590
            this.$(".disk-template-description").css({backgroundPosition:'-' + bg_pos + 'px top'})
591
            this.$(".disk-template-description p").html(flv.get_disk_template_info().description || "");
585 592
        },
586 593
        
587 594
        __added_flavors: {'cpu':[], 'ram':[], 'disk':[], 'disk_template':[]},
......
619 626
            
620 627
            if (this.__added_flavors.disk_template.indexOf(values.disk_template) == -1) {
621 628
                var template_info = flv.get_disk_template_info();
622
                var disk_template = $(('<li class="option disk_template value-{0}">' + 
623
                                       '<span class="name">{1}</span>' +
624
                                       '<span class="description">{2}</span>' +
629
                var disk_template = $(('<li title="{2}" class="option disk_template value-{0}">' + 
630
                                       '<span class="value name">{1}</span>' +
625 631
                                       '</li>').format(values.disk_template, 
626 632
                                            template_info.name, 
627 633
                                            template_info.description)).data('value', 
628 634
                                                                values.disk_template);
629 635

  
630 636
                this.disk_templates.append(disk_template);
637
                //disk_template.tooltip({position:'top center', offset:[-5,0], delay:100, tipClass:'tooltip disktip'});
631 638
                this.__added_flavors.disk_template.push(values.disk_template)
632 639
            }
633 640
            

Also available in: Unified diff