From 94366f35abdea5c0e5f238bb0ae207123550056d Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Thu, 21 Jan 2016 22:26:11 +0100 Subject: [PATCH] Use os-perms instead of os-perms-lite. Removed os-perms-lite. (Fixes #1826) --- .../assignments/assignment-detail.html | 9 ++-- .../templates/core/projector-controls.html | 2 +- .../templates/mediafiles/mediafile-list.html | 2 +- openslides/users/static/js/users/site.js | 41 ------------------- 4 files changed, 7 insertions(+), 47 deletions(-) diff --git a/openslides/assignments/static/templates/assignments/assignment-detail.html b/openslides/assignments/static/templates/assignments/assignment-detail.html index 3007efaf1..ac3b15606 100644 --- a/openslides/assignments/static/templates/assignments/assignment-detail.html +++ b/openslides/assignments/static/templates/assignments/assignment-detail.html @@ -127,7 +127,8 @@ - +
@@ -143,17 +144,17 @@ 2. Enter votes - - - + Delete diff --git a/openslides/core/static/templates/core/projector-controls.html b/openslides/core/static/templates/core/projector-controls.html index aa621b79f..6bb7db1fd 100644 --- a/openslides/core/static/templates/core/projector-controls.html +++ b/openslides/core/static/templates/core/projector-controls.html @@ -3,7 +3,7 @@
-
+

Live view

diff --git a/openslides/mediafiles/static/templates/mediafiles/mediafile-list.html b/openslides/mediafiles/static/templates/mediafiles/mediafile-list.html index ecbf142e3..18084ade6 100644 --- a/openslides/mediafiles/static/templates/mediafiles/mediafile-list.html +++ b/openslides/mediafiles/static/templates/mediafiles/mediafile-list.html @@ -60,7 +60,7 @@ {{ mediafile.uploader.get_full_name() }} -
diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index ed9cf0caa..26de52774 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -231,47 +231,6 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users']) } ]) -/* - * Like osPerms but does only hide the DOM-Elements - * - * This is the Code from angular.js ngShow. -*/ -.directive('osPermsLite', [ - '$animate', - function($animate) { - var NG_HIDE_CLASS = 'os-perms-lite'; - var NG_HIDE_IN_PROGRESS_CLASS = 'os-perms-lite-animate'; - return { - restrict: 'A', - multiElement: true, - link: function(scope, element, $attr) { - var perms; - if ($attr.osPermsLite[0] === '!') { - perms = _.trimLeft($attr.osPermsLite, '!'); - } else { - perms = $attr.osPermsLite; - } - scope.$watch( - function (scope) { - return scope.operator.hasPerms(perms); - }, function ngShowWatchAction(value) { - if ($attr.osPermsLite[0] === '!') { - value = !value; - } - // we're adding a temporary, animation-specific class for ng-hide since this way - // we can control when the element is actually displayed on screen without having - // to have a global/greedy CSS selector that breaks when other animations are run. - // Read: https://github.com/angular/angular.js/issues/9103#issuecomment-58335845 - $animate[value ? 'removeClass' : 'addClass'](element, NG_HIDE_CLASS, { - tempClasses: NG_HIDE_IN_PROGRESS_CLASS - }); - } - ); - } - }; - } -]) - // Service for generic assignment form (create and update) .factory('UserForm', [ '$http',