Commit 5a140b9c by Jose Antonio

Issue #939, added directive to change popover placement

parent a3c44826
...@@ -236,3 +236,18 @@ dashboardDirectives.directive('droppableadd', function() { ...@@ -236,3 +236,18 @@ dashboardDirectives.directive('droppableadd', function() {
} }
} }
}); });
dashboardDirectives.directive('popoveraddpicto', function() {
var y=99999;
return {
restrict: 'A',
link: function (scope, element, attrs) {
if(element[0].y <= y){
y=element[0].y;
attrs.popoverPlacement="bottom";
}
console.log(element[0].y);
console.log(angular.element( document.querySelector( '#collections' ) ));
}
}
});
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<div id="clearfix-infiniteScroll-parent" infinite-scroll="scroll()" infinite-scroll-container="'#collections'"> <div id="clearfix-infiniteScroll-parent" infinite-scroll="scroll()" infinite-scroll-container="'#collections'">
<div class="picto_peq pull-left" ng-repeat="p in pictos" > <div class="picto_peq pull-left" ng-repeat="p in pictos" >
<img ng-src="{{p.uri}}" popover="{{p.expressions[0].text}}" popover-trigger="mouseenter" style="z-index:9000"/> <img ng-src="{{p.uri}}" popover="{{p.expressions[0].text}}" popover-trigger="mouseenter" popover-placement="top" style="z-index:9000" popoveraddpicto/>
<!-- Options to remove picto (Only for own pictos) --> <!-- Options to remove picto (Only for own pictos) -->
<div class="picto_options"> <div class="picto_options">
<a ng-click="remove_own_picto(p.id)" class="picto_remove" title="{{ 'delete' | translate }}" ng-show="source == 'ownpictos'"> <a ng-click="remove_own_picto(p.id)" class="picto_remove" title="{{ 'delete' | translate }}" ng-show="source == 'ownpictos'">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment