Revision 339712cb ui/templates/standard.html

b/ui/templates/standard.html
27 27
            <h5>{% trans "IP: " %}<span class="public">node.public_ip</span></h5>
28 28
        </a>
29 29
        <h5 class="settings">
30
            {% trans "Show:" %} <a href="#">{% trans "disks" %}</a> | <a href="#">{% trans "networks" %}</a> | <a href="#">{% trans "group" %}</a>
30
            {% trans "Show:" %} 
31
            <a href="#">{% trans "disks" %}</a> | 
32
            <a href="#">{% trans "networks" %}</a> | 
33
            <a href="#">{% trans "group" %}</a> | 
34
            <a class="show-metadata" href="#">{% trans "metadata" %}</a>
31 35
        </h5>
32

  
33 36
        <div class="confirm_single">
34 37
            <button class="yes">{% trans "Confirm" %}</button>
35 38
            <button class="no">{% trans "Cancel" %}</button>
......
42 45
        </div>
43 46
        <div class="separator"></div>
44 47
    </div>
45

  
46 48
    <div class="running"></div>
47 49
    <div id="mini" class="separator"></div>
48 50
    <div class="terminated"></div>
49 51
</div>
50 52

  
51 53
<script>
52
    
54

  
55
// intercept metadata click
56
$("a.show-metadata").live('click', function() {
57
    // get server name and server ID
58
    var serverID = $(this).parent().parent().attr("id");
59
    var serverName = $(this).parent().prevAll("a.name").find("span.name").text();
60
    // set server name in box's title
61
    $("a#meta-editor-1 span").text(serverName);
62
    var triggers = $("a#meta-editor-1").overlay({
63
        // some mask tweaks suitable for modal dialogs
64
        mask: {
65
            color: '#ebecff',
66
            opacity: '0.9'
67
        },
68
        top: 'center',
69
        closeOnClick: false,
70
        oneInstance: false,
71
        load: false,
72
        onClose: function(){
73
            // With partial refresh working properly,
74
            // it is no longer necessary to refresh the whole page
75
            // choose_view();
76
        }
77
    });
78
    $("a#meta-editor-1").data('overlay').load();
79
    return false; 
80
});
81

  
53 82
// intercept reboot click 
54 83
$("div.actions a.action-reboot").live('click', function(){
55 84
    var serverID = $(this).parent().parent().attr("id");
......
340 369
    $('#'+serverID+ ' .action_error .action').text(action);
341 370
    $('#'+serverID+ ' .action_error .code').text(status);
342 371
    $('#'+serverID+ ' .action_error .message').text(responseText);
343
    $('#'+serverID+ ' .action_error').show();
344
    
372
    $('#'+serverID+ ' .action_error').show();    
345 373
}
346 374

  
375
// basic functions executed on page load
347 376
if (images.length == 0) {
348 377
    // populate image list
349 378
    update_images();
......
355 384
// set the label of the multiple buttons 
356 385
$('div.confirm_multiple button.yes').text('Confirm All');
357 386
$('div.confirm_multiple button.no').text('Cancel All');
358

  
359 387
// reposition multiple confirmation box on window resize
360 388
$(window).resize(function(){
361 389
    if (this.innerHeight - 220 < $('#machinesview').height())
......
363 391
    else
364 392
        $('.confirm_multiple').removeClass('fixed');
365 393
});
366

  
367 394
// start updating vm list
368 395
update_vms(UPDATE_INTERVAL);
369 396
</script>

Also available in: Unified diff