', {
'class': 'text-cell',
})
@@ -313,6 +330,7 @@ define([
};
var makeOptionEditable = function (id, bool) {
+ if (readOnly) { return; }
if (bool) {
module.rt.proxy.table.rowsOrder.forEach(function (rowuid) {
$('#' + rowuid)
@@ -363,6 +381,11 @@ define([
});
});
+ if (readOnly) {
+ $edit = '';
+ $remove = '';
+ }
+
var $wrapper = $('
', {
'class': 'text-cell',
})
@@ -715,16 +738,33 @@ define([
});
}));
- $toolbar.append(Button({
- id: 'wizard',
- 'class': 'wizard button action',
- title: Messages.wizardTitle,
- }).text(Messages.wizardButton).click(function () {
- Wizard.show();
- if (Wizard.hasBeenDisplayed) { return; }
- Cryptpad.log(Messages.wizardLog);
- Wizard.hasBeenDisplayed = true;
- }));
+ if (!readOnly) {
+ $toolbar.append(Button({
+ id: 'wizard',
+ 'class': 'wizard button action',
+ title: Messages.wizardTitle,
+ }).text(Messages.wizardButton).click(function () {
+ Wizard.show();
+ if (Wizard.hasBeenDisplayed) { return; }
+ Cryptpad.log(Messages.wizardLog);
+ Wizard.hasBeenDisplayed = true;
+ }));
+ }
+
+ if (!readOnly && module.viewHash) {
+ /* add a 'links' button */
+ var $links = $('