Commit f07a8f0b authored by Antonin Delpeuch's avatar Antonin Delpeuch
Browse files

Added a "Publish" button

parent 92cc33a1
......@@ -5,6 +5,9 @@
<toolbar id="header-view-toolbar">
<toolbarbutton id="hdrModAcceptButton" class="hdrForwardButton msgHeaderView-button" label="Accepter" oncommand="ToolbarEvents.onAccept(event);" />
</toolbar>
<toolbar id="header-view-toolbar">
<toolbarbutton id="hdrModPublishButton" class="hdrForwardButton msgHeaderView-button" label="Publier" oncommand="ToolbarEvents.onPublish(event);" />
</toolbar>
<toolbar id="header-view-toolbar">
<toolbarbutton id="hdrModRejectButton" class="hdrTrashButton msgHeaderView-button" label="Rejeter" oncommand="ToolbarEvents.onReject(event);" />
</toolbar>
......
......@@ -41,6 +41,7 @@ var ToolbarEvents = {
return;
var acceptButton = document.getElementById("hdrModAcceptButton");
var publishButton = document.getElementById("hdrModPublishButton");
var rejectButton = document.getElementById("hdrModRejectButton");
if(!acceptButton && !rejectButton)
return;
......@@ -53,12 +54,14 @@ var ToolbarEvents = {
{
ToolbarEvents.currentCookie = '';
acceptButton.disabled = true;
publishButton.disabled = true;
rejectButton.disabled = true;
}
else
{
ToolbarEvents.currentCookie = matches[1];
acceptButton.disabled = false;
publishButton.disabled = false;
rejectButton.disabled = false;
}
},
......@@ -93,6 +96,13 @@ var ToolbarEvents = {
}
},
onPublish: function() {
if(ToolbarEvents.currentCookie != '')
{
ToolbarEvents.runCmd("publier", ToolbarEvents.currentCookie);
}
},
onReject: function() {
if(ToolbarEvents.currentCookie != '')
{
......
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