Revision 198b546d snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_icon_view.js

b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_icon_view.js
62 62
            this.error = this.vm_view.find(".action-error");
63 63
            this.close = this.vm_view.find(".close-action-error");
64 64
            this.show_btn = this.vm_view.find(".show-action-error");
65
            this.project_view = this.vm_view.find(".project-name");
65 66

  
66 67
            this.init_handlers();
67 68
            this.update_layout();
68 69
        },
69

  
70
        
70 71
        init_handlers: function() {
72
            this.project_view.bind('click', _.bind(function() {
73
              synnefo.ui.main.vm_reassign_view.show(this.vm);
74
            }, this));
71 75
            // action call failed notify the user
72 76
            this.vm.bind("action:fail", _.bind(function(args){
73 77
                if (this.vm.action_error) {
......
102 106
            }, this));
103 107
        },
104 108

  
109
        show_reassign_view: function(vm) {
110
          synnefo.ui.main.reassign_view.show(vm);
111
        },
112

  
105 113
        show_error_overlay: function(args) {
106 114
            var args = util.parse_api_error.apply(util, args);
107 115
            
......
825 833
        // update vm details
826 834
        update_details: function(vm) {
827 835
            var el = this.vm(vm);
836
            var project = vm.get('project')
837
            if (project) {
838
              el.find(".project-name").text(_.truncate(project.get('name'), 20));
839
            }
828 840
            // truncate name
829 841
            el.find("span.name").text(util.truncate(vm.get("name"), 40));
830 842

  

Also available in: Unified diff