Commit b6c5710e authored by adriano petrich's avatar adriano petrich

creating an dialoginstance that is needed for it to work

parent 339e9abe
......@@ -558,12 +558,11 @@ share = function() {alert("share");}
editDocumentSettings = function() {
Document.saveCurrentDocument();
loadFile("xml/xmlElements.xml", "html", function(data) {
$(data).find("rename").dialog({
autoOpen: true,
height: 131,
width: 389,
modal: true,
buttons: {
thedialog.html($(data).find("rename"))
thedialog.dialog("option", "width", 400);
thedialog.dialog("option", "height", 200);
thedialog.dialog("option", "buttons", {
"Save": function(){
var doc = getCurrentDocument();
doc.setTitle($(this).find("#name").attr("value"));
......@@ -571,10 +570,10 @@ editDocumentSettings = function() {
doc.setVersion($(getCurrentDocument()).find("#version").attr("value"));
Document.saveCurrentDocument();
doc.setAsCurrentDocument();//diplay modifications
$(this).dialog("close");
thedialog.dialog("close");
},
Cancel: function() {
$(this).dialog("close");
thedialog.dialog("close");
}
}
});
......
......@@ -30,9 +30,11 @@
<script type="text/javascript">
// initialize
var thedialog;
var init = function() {
Page.initialize(Document.supportedDocuments[getCurrentDocument().getType()].editorPage);
Storage.initialize();
thedialog = $("#diag").dialog({title:"",modal: true, autoOpen: false});
}
$(document).ready(init);
......@@ -40,7 +42,7 @@
</head>
<body>
<div id="diag" style="padding:0;"></div>
<div class="container">
<div class="navigation">
......
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