Last active
August 29, 2015 14:10
-
-
Save rlfrahm/1b680fbed305263e4ce1 to your computer and use it in GitHub Desktop.
Revisions
-
rlfrahm revised this gist
May 26, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ ## AngularJS : An example of a custom context menu. Right click in the window to view. -
rlfrahm revised this gist
Dec 4, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,3 @@ An example of a custom context menu. Right click in the window to view. -
rlfrahm revised this gist
Dec 3, 2014 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,5 +11,8 @@ angular.module('app',[]) display: 'block' }; $scope.contextmenu.show = true; if(!$scope.$$phase) { $scope.$apply(); } }); }]); -
rlfrahm revised this gist
Dec 3, 2014 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,11 @@ angular.module('app',[]) $document.on('contextmenu', function(e) { e.preventDefault(); console.log(e); $scope.contextmenu.style = { left: e.clientX + 'px', top: e.clientY + 'px', display: 'block' }; $scope.contextmenu.show = true; }); }]); -
rlfrahm revised this gist
Dec 3, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ An example of a custom context menu. -
rlfrahm revised this gist
Dec 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,6 @@ angular.module('app',[]) $document.on('contextmenu', function(e) { e.preventDefault(); console.log(e); $scope.contextmenu.show = true; }); }]); -
rlfrahm revised this gist
Dec 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ angular.module('app',[]) .controller('ContextMenuCtrl',['$scope', '$document', function($scope,$document) { $scope.contextmenu = {show:false}; $document.on('contextmenu', function(e) { e.preventDefault(); console.log(e); contextmenu.show = true; -
rlfrahm revised this gist
Dec 3, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,7 @@ angular.module('app',[]) .controller('ContextMenuCtrl',['$scope', '$document', function($scope,$document) { $scope.contextmenu = {show:false}; $document.on('click', function(e) { e.preventDefault(); console.log(e); contextmenu.show = true; }); -
rlfrahm renamed this gist
Dec 3, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
rlfrahm created this gist
Dec 3, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ angular.module('app',[]) .controller('ContextMenuCtrl',['$scope', '$document', function($scope,$document) { $scope.contextmenu = {show:false}; $document.on('click', function(e) { console.log(e); contextmenu.show = true; }); }]); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script> <script src="app.js"></script> <body ng-app="app" ng-controller="ContextMenuCtrl"> <ul class="dropdown-menu" role="menu" ng-style="contextmenu.style" ng-if="contextmenu.show"> <li><a href="" ng-click="contextmenu.show=false">Action</a></li> <li><a href="" ng-click="contextmenu.show=false">Another action</a></li> <li><a href="" ng-click="contextmenu.show=false">Something else here</a></li> <li class="divider"></li> <li><a href="" ng-click="contextmenu.show=false">Separated link</a></li> <div class="overlay" ng-click="contextmenu.show=false"></div> </ul> <style> .overlay { position:fixed; top:0; right:0; bottom:0; left:0; z-index:-1; } </style> </body>