Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added double click handling for LO's in workspace
  • Loading branch information
torinfo committed Jul 12, 2015
1 parent ce326c1 commit bb880da
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
5 changes: 3 additions & 2 deletions editor/js/tree.js
Expand Up @@ -492,8 +492,8 @@ var EDITOR = (function ($, parent) {
setTimeout(function()
{
buildPage(key)
}, 500);
}
}, 350);
},

// Refresh the page when a new node is selected
buildPage = function (key) {
Expand Down Expand Up @@ -1119,6 +1119,7 @@ var EDITOR = (function ($, parent) {
});
},


// Up button handler
up_btn = function() {
move_node('up');
Expand Down
27 changes: 27 additions & 0 deletions website_code/scripts/screen_display.js
Expand Up @@ -773,6 +773,33 @@ function init_workspace()
$('#workspace').jstree(true).search(v);
}, 250);
});

// Double click handling
$('#workspace a').bind('dblclick',function (e) {
var tree = $.jstree.reference("#workspace");
var linode = $(e.target).closest("li");
var node_id = linode[0].id;
var node = tree.get_node(node_id, false);
var type = node.type;
var id = node.id;
var xot_id = node.original.xot_id;

switch(type)
{
case "folder":
case "workspace":
case "recyclebin":
break;
default:


tree.deselect_all();
tree.select_node(id);

edit_window(false, "edithtml");

}
});
}
}

Expand Down

0 comments on commit bb880da

Please sign in to comment.