diff --git a/beat/web/reports/static/reports/app/directives/edit/addItemsMenu.js b/beat/web/reports/static/reports/app/directives/edit/addItemsMenu.js index 6af2416b6eb54e5cda9ae120ec89010569a71d87..dde9770fea9edcd05fe868adf09a5793b10a9335 100644 --- a/beat/web/reports/static/reports/app/directives/edit/addItemsMenu.js +++ b/beat/web/reports/static/reports/app/directives/edit/addItemsMenu.js @@ -32,7 +32,6 @@ angular.module('reportApp') group: '=' }, link: function(scope){ - scope.isEditable = GroupsService.isEditable; const getNextItemId = (type) => { let count = Object.values(scope.group.reportItems) .filter(v => v.id.includes(type)) @@ -86,7 +85,7 @@ angular.module('reportApp') }, template: ` <div class="btn-group" role="group"> - <button ng-disabled='!isEditable' type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Add Plot <span class="caret"></span> </button> @@ -100,7 +99,7 @@ angular.module('reportApp') Add Table </button> <div class="btn-group" role="group"> - <button ng-disabled='!isEditable' + <button ng-click='addNewText()' type="button" class="btn btn-default" diff --git a/beat/web/reports/static/reports/app/directives/edit/layout.js b/beat/web/reports/static/reports/app/directives/edit/layout.js index ad31140e5ff34616a979c639c035d1f54b553028..c7b99a60b0c0b37df07da62598089448b9fc75b4 100644 --- a/beat/web/reports/static/reports/app/directives/edit/layout.js +++ b/beat/web/reports/static/reports/app/directives/edit/layout.js @@ -39,7 +39,7 @@ angular.module('reportApp').directive("groupsLayout", ['GroupsService', function }; }, template: ` -<div ng-if='GroupsService.isEditable' group-add-group-menu class='panel'></div> +<div group-add-group-menu class='panel'></div> <div ui-sortable='sortableOptions' ng-model='GroupsService.groups' id='groupsLayout' class='panel-group'> <div diff --git a/beat/web/reports/static/reports/app/directives/edit/panelContent.js b/beat/web/reports/static/reports/app/directives/edit/panelContent.js index f714b2efbcc9b9b518a6a38a1972fbc6dc8cfab3..9bced2aaf9894faf33e6f757e081f4b2d99ffa46 100644 --- a/beat/web/reports/static/reports/app/directives/edit/panelContent.js +++ b/beat/web/reports/static/reports/app/directives/edit/panelContent.js @@ -31,7 +31,6 @@ angular.module('reportApp').directive("groupPanelContent", ['GroupsService', fun group: '=' }, link: function(scope){ - scope.isEditable = GroupsService.isEditable; scope.deleteGroup = GroupsService.deleteGroup; scope.editingGroupName = false; scope.change = () => { diff --git a/beat/web/reports/static/reports/app/directives/edit/panelExperiments.js b/beat/web/reports/static/reports/app/directives/edit/panelExperiments.js index df1c37d4ae80bede634751bc7f79b807f6673308..6435a1bc9c231c8ce37dc5899107f797f24b390f 100644 --- a/beat/web/reports/static/reports/app/directives/edit/panelExperiments.js +++ b/beat/web/reports/static/reports/app/directives/edit/panelExperiments.js @@ -31,7 +31,6 @@ angular.module('reportApp').directive("groupPanelExperiments", ['GroupsService', group: '=' }, link: function(scope){ - scope.isEditable = GroupsService.isEditable; scope.experiments = ExperimentsService.experiments; scope.dropdownId = `${scope.group.name}_exp_add_dropdown`; scope.expsNotInGroup = () => { @@ -66,7 +65,7 @@ angular.module('reportApp').directive("groupPanelExperiments", ['GroupsService', </a> <div class='btn-group'> <div class="dropdown"> - <button ng-disabled='!isEditable' class="btn btn-default dropdown-toggle" ng-class='{disabled: expsNotInGroup().length === 0}' type="button" id="{{ dropdownId }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> + <button class="btn btn-default dropdown-toggle" ng-class='{disabled: expsNotInGroup().length === 0}' type="button" id="{{ dropdownId }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> Add Experiment <span class="caret"></span> </button> @@ -118,7 +117,7 @@ angular.module('reportApp').directive("groupPanelExperiments", ['GroupsService', </span> </td> - <td><input ng-disabled='!isEditable' ng-model='group.aliases[expName]'></input></td> + <td><input ng-model='group.aliases[expName]'></input></td> </tr> </tbody> </table> diff --git a/beat/web/reports/static/reports/app/directives/edit/tableFieldSelector.js b/beat/web/reports/static/reports/app/directives/edit/tableFieldSelector.js index 3305cc2c59cb9a71b16e88f218847604bb5916d8..74baebb820766b127fbb4b005706a3baf1e609e5 100644 --- a/beat/web/reports/static/reports/app/directives/edit/tableFieldSelector.js +++ b/beat/web/reports/static/reports/app/directives/edit/tableFieldSelector.js @@ -37,7 +37,6 @@ angular.module('reportApp') buttonText: '@' }, link: function(scope){ - scope.isEditable = GroupsService.isEditable; // bootstrap's auto dropdown toggling is disabled for the table creation dropdown // add a click handler for the table creation dropdown submit button to toggle // manually @@ -96,7 +95,7 @@ angular.module('reportApp') }; }, template: ` -<button ng-disabled='!isEditable' id='{{ id }}' type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> +<button id='{{ id }}' type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> {{ title }} <span class="caret"></span> </button> diff --git a/beat/web/reports/static/reports/app/directives/edit/textItem.js b/beat/web/reports/static/reports/app/directives/edit/textItem.js index d55618a86927b3700795e23730e64a7921cd12ad..020fd50f2ca320b3eb289f8b8e50a241d5b8ddc1 100644 --- a/beat/web/reports/static/reports/app/directives/edit/textItem.js +++ b/beat/web/reports/static/reports/app/directives/edit/textItem.js @@ -35,14 +35,12 @@ angular.module('reportApp') link: function(scope){ // aliases scope.trustAsHtml = $sce.trustAsHtml; - scope.isEditable = GroupsService.isEditable; scope.item = scope.reportItem; scope.domId = `${scope.group.name}_${scope.item.id}`; // codemirror options scope.uicmOptions = { mode: 'rst', - readOnly: !GroupsService.isEditable }; // readonly codemirror options