Commit 5bd4883b authored by Jérome Perrin's avatar Jérome Perrin

jsplumb: some fixes for Internet Explorer

parent a861068e
......@@ -14,6 +14,10 @@
<script src="../<%= curl.jsplumbjs.relative_dest %>"></script>
<script src="../<%= copy.handlebars.relative_dest %>"></script>
<script src="../dream/mixin_gadget.js"></script>
<script src="../dream/mixin_promise.js"></script>
<script src="jsplumb.js"></script>
<script id="node-template" type="text/x-handlebars-template">
<div class="window {{class}}"
id="{{element_id}}"
......@@ -22,8 +26,7 @@
<div class="ep"></div>
</div>
</script>
<template id="popup-edit-template">
<script id="popup-edit-template" type="text/x-handlebars-template">
<div id="edit-popup" data-position-to="origin">
<div data-role="header" data-theme="a">
<h1 class="node_class">Edit properties</h1>
......@@ -36,12 +39,7 @@
<input type="submit" value="Validate">
</form>
</div>
</template>
<script src="../dream/mixin_gadget.js"></script>
<script src="../dream/mixin_promise.js"></script>
<script src="jsplumb.js"></script>
</script>
</head>
<body>
<div id="main"></div>
......
......@@ -44,7 +44,7 @@
.getElementById('node-template').innerHTML,
node_template = Handlebars.compile(node_template_source),
popup_edit_template = gadget_klass.__template_element
.getElementById('popup-edit-template'),
.getElementById('popup-edit-template').innerHTML,
domParser = new DOMParser();
function loopJsplumbBind(gadget, type, callback) {
......@@ -515,9 +515,9 @@
delete schema.properties.source;
delete schema.properties.destination;
gadget.props.element.appendChild(
document.importNode(popup_edit_template.content, true).children[0]
);
gadget.props.element.insertAdjacentHTML(
'beforeend',
popup_edit_template);
edit_popup = $(gadget.props.element).find('#edit-popup');
edit_popup.find('.node_class').text(connection._class);
fieldset_element = edit_popup.find('fieldset')[0];
......@@ -621,9 +621,10 @@
node_edit_popup.remove();
}
gadget.props.element.appendChild(
document.importNode(popup_edit_template.content, true).children[0]
);
gadget.props.element.insertAdjacentHTML(
'beforeend',
popup_edit_template);
node_edit_popup = $(gadget.props.element).find('#edit-popup');
// Set the name of the popup to the node class
node_edit_popup.find('.node_class').text(node_data._class);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment