Revision 550d9733 ui/static/snf/js/ui/web/ui_icon_view.js
b/ui/static/snf/js/ui/web/ui_icon_view.js | ||
---|---|---|
170 | 170 |
}); |
171 | 171 |
|
172 | 172 |
// VM connect interaction view |
173 |
views.VMConnectView = views.View.extend({ |
|
173 |
views.IconVMConnectView = views.View.extend({
|
|
174 | 174 |
|
175 | 175 |
initialize: function(vm, view) { |
176 | 176 |
// parent view (single, icon, list) |
... | ... | |
178 | 178 |
this.vm = vm; |
179 | 179 |
this.el = view.vm(vm); |
180 | 180 |
this.set_handlers(); |
181 |
views.VMConnectView.__super__.initialize.call(this); |
|
181 |
views.IconVMConnectView.__super__.initialize.call(this);
|
|
182 | 182 |
}, |
183 | 183 |
|
184 | 184 |
// set the appropriate handlers |
... | ... | |
190 | 190 |
// element that triggers the connect handler |
191 | 191 |
var connect = el.find("div.connect-arrow, .logo"); |
192 | 192 |
// connect status handler |
193 |
var handler = _.bind(this.connect_handler, {vm:vm, el:el}); |
|
193 |
var handler = _.bind(this.connect_handler, {vm:vm, el:el, view:this.parent});
|
|
194 | 194 |
$(connect).bind({'mouseover': handler, 'mouseleave': handler, |
195 |
'mousedown': handler, 'mouseup': handler}); |
|
195 |
'mousedown': handler, 'mouseup': handler, |
|
196 |
'click': handler }); |
|
196 | 197 |
|
197 | 198 |
// setup connect arrow display handlers |
198 | 199 |
// while hovering vm container |
... | ... | |
247 | 248 |
logo.addClass('single-image-state2'); |
248 | 249 |
break; |
249 | 250 |
|
250 |
case "mouseclick": |
|
251 |
logo.addCLass('single-image-state4'); |
|
251 |
case "click": |
|
252 |
//logo.addCLass('single-image-state4'); |
|
253 |
this.view.connect_to_console(vm); |
|
254 |
//this.view.connect_overlay.show(this.vm); |
|
252 | 255 |
break; |
253 | 256 |
|
254 | 257 |
default: |
... | ... | |
567 | 570 |
this.action_views[vm.id] = new views.VMActionsView(vm, this, this.vm(vm), this.hide_actions); |
568 | 571 |
this.rename_views[vm.id] = new views.IconRenameView(vm, this); |
569 | 572 |
this.stats_views[vm.id] = new views.VMStatsView(vm, this, {el:'.vm-stats'}); |
570 |
this.connect_views[vm.id] = new views.VMConnectView(vm, this); |
|
573 |
this.connect_views[vm.id] = new views.IconVMConnectView(vm, this);
|
|
571 | 574 |
this.tags_views[vm.id] = new views.VMTagsView(vm, this); |
572 | 575 |
this.details_views[vm.id] = new views.VMDetailsView(vm, this); |
573 | 576 |
this.info_views[vm.id] = new views.IconInfoView(vm, this); |
Also available in: Unified diff