Skip to content
Snippets Groups Projects
Commit d25d6a28 authored by Branson Stephens's avatar Branson Stephens
Browse files

dijit/Dialog instead of alert.

parent 83b5cc40
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
"dojo/on", "dojo/on",
"dojo/request", "dojo/request",
"dojo/dom-form", "dojo/dom-form",
"dojo/dom-construct",
"dijit/Editor", "dijit/Editor",
"dojox/editor/plugins/Save", "dojox/editor/plugins/Save",
"dojox/editor/plugins/Preview", "dojox/editor/plugins/Preview",
...@@ -36,7 +37,7 @@ ...@@ -36,7 +37,7 @@
"dijit/_editor/plugins/NewPage", "dijit/_editor/plugins/NewPage",
"dijit/_editor/plugins/FullScreen", "dijit/_editor/plugins/FullScreen",
"dojo/parser", "dojo/parser",
"dojo/domReady!"], function (dom, on, request, domForm, Editor, Save, Preview, "dojo/domReady!"], function (dom, on, request, domForm, domConstruct, Editor, Save, Preview,
Button, TitlePane, ScrollPane, Memory, ComboBox, Dialog) { Button, TitlePane, ScrollPane, Memory, ComboBox, Dialog) {
dojo.parser.parse(); dojo.parser.parse();
...@@ -226,14 +227,19 @@ ...@@ -226,14 +227,19 @@
{% endif %} {% endif %}
}, "existingTagSelect"); }, "existingTagSelect");
var tagResultDialog = new Dialog(); // Construct a dialog to show results of tagging an existing log message.
var tagResultDialog = new Dialog({ style: "width: 300px" });
var actionBar = dom.create("div", { var actionBar = domConstruct.create("div", { "class": "dijitDialogPaneActionBar" });
"class": "dijitDialogPaneContentArea", var tbnode = domConstruct.create("div", {
"innerHTML": "my testy" style: "margin: 0px auto 0px auto; text-align: center;"
}, tagResultDialog.containerNode); }, actionBar);
var tagButton = new Button({
label: "Ok",
onClick: function(){
tagResultDialog.hide();
}}).placeAt(tbnode);
// The form for tagging existing log messages.
var form = dom.byId('existingTagForm'); var form = dom.byId('existingTagForm');
on(form, "submit", function(evt){ on(form, "submit", function(evt){
evt.stopPropagation(); evt.stopPropagation();
...@@ -251,18 +257,18 @@ ...@@ -251,18 +257,18 @@
}).then( }).then(
function(text){ function(text){
tagResultDialog.set("content", text); tagResultDialog.set("content", text);
domConstruct.place(actionBar, tagResultDialog.containerNode);
tagResultDialog.show(); tagResultDialog.show();
//location.reload(true); //location.reload(true);
}, },
function(error){ function(error){
tagResultDialog.set("content", error); tagResultDialog.set("content", "Error: " + error);
domConstruct.place(actionBar, tagResultDialog.containerNode);
tagResultDialog.show(); tagResultDialog.show();
} }
); );
}); });
// Messing around with the dialog.
}); });
</script> </script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment