Revision f5ebca32

b/ui/static/synnefo.js
679 679

  
680 680
// show the welcome screen
681 681
function showWelcome() {
682
    $("#emptymachineslist").fadeIn("fast");
683
    $("#createbody").fadeIn("fast");
682
    $("#view-select").fadeOut("fast");
684 683
    $("#createcontainer").addClass('emptycreatecontainer')
685 684
    $("#create").addClass('emptycreate')
686
    $("#view-select").fadeOut("fast");
685
    $("#emptymachineslist").fadeIn("fast");
686
    $("#createbody").fadeIn("fast");
687 687
    $("#create").css("display", "block");
688 688
}
689 689

  
b/ui/templates/list.html
202 202
			if (server.status == "DELETED") {
203 203
				vmTable.fnDeleteRow(current);
204 204
                // Reload the page to check if server list is empty
205
                //location.reload(true);
205
                console.info(tableData.length);
206
                if (tableData.length == 1) {
207
                    $("#machinesview_content").fadeOut("fast")
208
                    standard_view();
209
                }
206 210
			} else { // when server is not be deleted, it should be updated
207 211
                if (['BUILD','ACTIVE','REBOOT'].indexOf(server.status) >= 0 &&
208 212
                    [STATUS_MESSAGES['STOPPED'], STATUS_MESSAGES['ERROR'],
......
296 300
    }
297 301

  
298 302
    // show message in case user has no servers!
299
    if (servers.length == 0) {
300
        showWelcome();
301
        $("#machinesview_content").fadeOut("fast")
302
        standard_view();
303
    } else {
303
    if (servers.length > 0) {
304 304
        hideWelcome();
305 305
        $("#machinesview_content").fadeIn("fast")
306
    }      
307
 
306
    }
308 307
	
309 308
	// set confirm box position
310 309
    if (window.innerHeight - 200 < $('#machinesview').height())
b/ui/templates/standard.html
234 234
            if (server.status == 'DELETED') {
235 235
                existing.remove();
236 236
                // Reload the page to check if server list is empty
237
                //location.reload(true);            
237
                standard_view()
238 238
                try {
239 239
                    console.info(existing.find("a.name span.name").text() + ' removed');
240 240
                } catch(err) {}            

Also available in: Unified diff