Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #363
  • Loading branch information
FayCross committed Mar 24, 2016
1 parent bce7f7b commit 2d84c7c
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions website_code/scripts/screen_display.js
Expand Up @@ -419,10 +419,10 @@ function button_check(){
};
}
}
else
else if(ids.length > 1)
{
deletebtn.removeAttribute("disabled");
deletebtn.className = "xerte_button";
deletebtn.className = "xerte_workspace_button";
deletebtn.onclick = function () {
remove_this()
};
Expand Down Expand Up @@ -740,6 +740,10 @@ function init_workspace()
.bind('select_node.jstree', function (event, data) {
button_check();
showInformationAndSetStatus(data.node);
})
.bind('deselect_node.jstree', function (event, data) {
button_check();
showInformationAndSetStatus();
})
.bind('move_node.jstree',function(event,data)
{
Expand Down Expand Up @@ -812,20 +816,25 @@ function init_workspace()

function showInformationAndSetStatus(node)
{
var type = node.type;
var id = node.id;
var xot_id = node.original.xot_id;

switch(type)
{
case "folder":
$("#project_information").html("Folder " + node.text);
break;
case "workspace":
case "recyclebin":
$("#project_information").html("");
break;
default:
getProjectInformation(workspace.user, xot_id);
}
if (node == undefined) {
$("#project_information").html("");

} else {
var type = node.type;
var id = node.id;
var xot_id = node.original.xot_id;

switch(type)
{
case "folder":
$("#project_information").html("Folder " + node.text);
break;
case "workspace":
case "recyclebin":
$("#project_information").html("");
break;
default:
getProjectInformation(workspace.user, xot_id);
}
}
}

0 comments on commit 2d84c7c

Please sign in to comment.