mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 11:52:37 +09:00
Update spice.erb
This commit is contained in:
1 parent
08b672add0
commit
3adbde2703
2 files changed
+21
No files matched your search
@@ -1687,6 +1687,7 @@ SUNSTONE_PUBLIC_VENDOR_SPICE="\
|
||||
src/sunstone/public/bower_components/spice-html5/thirdparty/sha1.js \
|
||||
src/sunstone/public/bower_components/spice-html5/ticket.js \
|
||||
src/sunstone/public/bower_components/spice-html5/resize.js \
|
||||
src/sunstone/public/bower_components/spice-html5/filexfer.js \
|
||||
src/sunstone/public/bower_components/spice-html5/spice-custom.css"
|
||||
|
||||
# end bower
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<script src="vendor/spice/sha1.js"></script>
|
||||
<script src="vendor/spice/ticket.js"></script>
|
||||
<script src="vendor/spice/resize.js"></script>
|
||||
<script src="vendor/spice/filexfer.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="vendor/spice/spice-custom.css" />
|
||||
|
||||
<script>
|
||||
@@ -146,6 +147,13 @@
|
||||
if (sc) {
|
||||
sc.stop();
|
||||
}
|
||||
if (window.File && window.FileReader && window.FileList && window.Blob)
|
||||
{
|
||||
var spice_xfer_area = document.getElementById('spice-xfer-area');
|
||||
document.getElementById('spice-area').removeChild(spice_xfer_area);
|
||||
document.getElementById('spice-area').removeEventListener('dragover', handle_file_dragover, false);
|
||||
document.getElementById('spice-area').removeEventListener('drop', handle_file_drop, false);
|
||||
}
|
||||
console.log("<< disconnect");
|
||||
}
|
||||
|
||||
@@ -155,6 +163,18 @@
|
||||
window.spice_connection = this;
|
||||
|
||||
resize_helper(this);
|
||||
|
||||
if (window.File && window.FileReader && window.FileList && window.Blob)
|
||||
{
|
||||
var spice_xfer_area = document.createElement("div");
|
||||
spice_xfer_area.setAttribute('id', 'spice-xfer-area');
|
||||
document.getElementById('spice-area').addEventListener('dragover', handle_file_dragover, false);
|
||||
document.getElementById('spice-area').addEventListener('drop', handle_file_drop, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("File API is not supported");
|
||||
}
|
||||
}
|
||||
|
||||
connect();
|
||||
|
||||
Reference in new issue
Block a user