Got the focus event working.

This commit is contained in:
Raoul Snyman 2010-06-01 08:10:17 +02:00
parent 0fd1f5844f
commit 000469e16f
4 changed files with 11 additions and 20 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

View File

@ -22,9 +22,9 @@ ScribeEngine.Namespace.create("ScribeEngine.Media", {
{
var dirname = prompt("New Directory:", "directory");
},
get_files: function (node, tree)
get_files: function (event, data)
{
alert(tree.get_path(node));
alert(data.inst.get_path(ScribeEngine.Events.getElement(event)));
}
});

View File

@ -177,24 +177,14 @@ ScribeEngine.Namespace.create("ScribeEngine.Widgets", {
file_browser_callback: "ScribeEngine.Widgets.fileBrowser"
});
},
tree: function (selector, data, onselect)
tree: function (selector, tree_data, onselect)
{
$(selector).jstree({
json_data: {
data:
{
type: "json",
opts:
{
static: data
}
},
callback:
{
onselect: onselect
}
},
plugins : [ "themes", "json_data"]
$(selector)
.bind("set_focus.jstree", onselect)
.jstree({
plugins: ["themes", "json_data"],
json_data: {data: tree_data},
themes: {theme: "default"}
});
}
});

View File

@ -19,6 +19,7 @@
#file-list ul li { float: left; }
#file-list ul li div.file { border: 1px solid #f0f0f0; height: 87px; line-height: 87px; list-style: none; margin: 5px; padding: 0; width: 87px; }
#file-list ul li div.caption { font-size: 8pt; text-align: center; width: 89px; }
input[type=button] { background: #f0f0f0 url(/images/media-button.png) top left repeat-x; border: 1px solid #ccc; color: #000; height: 24px; }
</style>
</head>
<body>