Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Bourgeat
thundermodo
Commits
004c9fa1
Commit
004c9fa1
authored
Apr 18, 2014
by
Antonin Delpeuch
Browse files
Changing the buttons
parent
f07a8f0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
chrome/content/mod-buttons.xul
View file @
004c9fa1
...
...
@@ -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>
chrome/content/toolbar-events.js.in
View file @
004c9fa1
...
...
@@ -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;
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment