bring admin back
This commit is contained in:
parent
b2eef94232
commit
2b5339193c
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
<div class="upper">
|
<div class="upper">
|
||||||
<button id="publish" data-localization-title="poll_publish_button" data-localization="poll_publish_button" style="display: none;">publish poll</button>
|
<button id="publish" data-localization-title="poll_publish_button" data-localization="poll_publish_button" style="display: none;">publish poll</button>
|
||||||
|
<button id="admin" data-localization-title="poll_admin_button" data-localization="poll_admin_button" style="display: none;">admin</button>
|
||||||
<button id="help" data-localization-title="poll_show_help_button" data-localization="poll_show_help_button">help</button>
|
<button id="help" data-localization-title="poll_show_help_button" data-localization="poll_show_help_button">help</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -141,10 +141,12 @@ define([
|
|||||||
var setTablePublished = function (bool) {
|
var setTablePublished = function (bool) {
|
||||||
if (bool) {
|
if (bool) {
|
||||||
if (APP.$publish) { APP.$publish.hide(); }
|
if (APP.$publish) { APP.$publish.hide(); }
|
||||||
|
if (APP.$admin) { APP.$admin.show(); }
|
||||||
$('#create-option').hide();
|
$('#create-option').hide();
|
||||||
$('.remove[data-rt-id^="y"], .edit[data-rt-id^="y"]').hide();
|
$('.remove[data-rt-id^="y"], .edit[data-rt-id^="y"]').hide();
|
||||||
} else {
|
} else {
|
||||||
if (APP.$publish) { APP.$publish.show(); }
|
if (APP.$publish) { APP.$publish.show(); }
|
||||||
|
if (APP.$admin) { APP.$admin.hide(); }
|
||||||
$('#create-option').show();
|
$('#create-option').show();
|
||||||
$('.remove[data-rt-id^="y"], .edit[data-rt-id^="y"]').show();
|
$('.remove[data-rt-id^="y"], .edit[data-rt-id^="y"]').show();
|
||||||
}
|
}
|
||||||
@ -518,7 +520,11 @@ var ready = function (info, userid, readOnly) {
|
|||||||
publish(true);
|
publish(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
// #publish button is removed in readonly
|
APP.$admin = $('#admin')
|
||||||
|
.click(function () {
|
||||||
|
publish(false);
|
||||||
|
});
|
||||||
|
|
||||||
APP.$help = $('#help')
|
APP.$help = $('#help')
|
||||||
.click(function () {
|
.click(function () {
|
||||||
showHelp();
|
showHelp();
|
||||||
@ -723,7 +729,7 @@ var create = function (info) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (readOnly) {
|
if (readOnly) {
|
||||||
$('#commit, #create-user, #create-option, #publish').remove();
|
$('#commit, #create-user, #create-option, #publish, #admin').remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
var parsedHash = Cryptpad.parsePadUrl(window.location.href);
|
var parsedHash = Cryptpad.parsePadUrl(window.location.href);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user