Got the focus event working.
This commit is contained in:
parent
0fd1f5844f
commit
000469e16f
BIN
scribeengine/public/images/media-button.png
Normal file
BIN
scribeengine/public/images/media-button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 205 B |
@ -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)));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -177,25 +177,15 @@ 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"}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user