Commit 004c9fa1 authored by Antonin Delpeuch's avatar Antonin Delpeuch
Browse files

Changing the buttons

parent f07a8f0b
......@@ -3,13 +3,15 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://moderation/content/toolbar-events.js" />
<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);" />
<toolbarbutton type="menu" label="Modération" id="hdrModButton">
<menupopup>
<menuitem label="Ignorer" oncommand="ToolbarEvents.onReject(event);" />
<menuitem label="Refuser" />
<menuitem label="Publier" oncommand="ToolbarEvents.onPublish(event);" />
<menuitem label="Transmettre" oncommand="ToolbarEvents.onAccept(event);" />
<menuitem label="Forum" />
</menupopup>
</button>
</toolbar>
</overlay>
......@@ -40,9 +40,7 @@ var ToolbarEvents = {
if(!msg)
return;
var acceptButton = document.getElementById("hdrModAcceptButton");
var publishButton = document.getElementById("hdrModPublishButton");
var rejectButton = document.getElementById("hdrModRejectButton");
var modButton = document.getElementById("hdrModButton");
if(!acceptButton && !rejectButton)
return;
......@@ -53,16 +51,12 @@ var ToolbarEvents = {
if(!matches)
{
ToolbarEvents.currentCookie = '';
acceptButton.disabled = true;
publishButton.disabled = true;
rejectButton.disabled = true;
modButton.disabled = true;
}
else
{
ToolbarEvents.currentCookie = matches[1];
acceptButton.disabled = false;
publishButton.disabled = false;
rejectButton.disabled = false;
modButton.disabled = false;
}
},
......
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