{"_id":"@df-legacy/ng-context-menu","_rev":"2-6c0416daded87071b23cf44c84c3940f","name":"@df-legacy/ng-context-menu","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.2":{"name":"@df-legacy/ng-context-menu","version":"1.0.2","description":"An AngularJS directive to display a context menu when a right-click event is triggered","keywords":["ng-context-menu","context menu","right click","angularjs","angular"],"authors":["Ian Kennington Walter (http://ianvonwalter.com)"],"repository":{"type":"git","url":"ssh://git@stash.sigma.sbrf.ru:7999/device_farm/ng-context-menu.git"},"license":"MIT","homepage":"http://ianwalter.github.io/ng-context-menu/","main":"dist/ng-context-menu.js","devDependencies":{"requirejs":"~2.1.15"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","gitHead":"a785209ae80629176ee30e15f188c3f55dd3a631","_id":"@df-legacy/ng-context-menu@1.0.2","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-IxOR+dRNXTIHMoQGw+EBjZgKP2HNWYdBw1A5rJVETQ269h8ohjN/lGAH9WBUBRya2WI+d39xLknkj4zN3zPxcw==","shasum":"a1306471b60c3d731a3ce80c4e0ecbc56bc51ac8","tarball":"https://registry.npmjs.org/@df-legacy/ng-context-menu/-/ng-context-menu-1.0.2.tgz","fileCount":9,"unpackedSize":12886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzwaiCRA9TVsSAnZWagAA6VcP/3cEa7po63datqH0xJ1O\nV5n7ItQAlKhQ1ALFfQOBtFt6gU6BDzmFitvhN0S1b2xF2q73px+XTkdB7NTr\nwIQUxpgZ9X8fgk//oV1Zt8JGkXc4ZaDfuvO/uryc8GkSB9qFge6VCer6awBb\nw1ZuzLgf2b67bUiDgPBm/vpvUZA/4WaeXzi1JTurrQzm8gXUHCsTzg8bYOZM\nSYJRwqxbqFnYRqryGpP2fpxG1gN9pO/ac+DJNaf20IiFkTYUuWsdA+Db+dJ8\neBm4nKIYXiRVoUz4wk7fqpPLMnph3wJWREcvN+WNRa9XJQQTGBsvuwAYfO8S\nYWzWqA49FKQGevC5M8fgaSkxXOZLwWLe90tiTdfkNMQDMjMqDuSsoygCVoU9\nfeuSdD3kpwQuYdVChm4TKgd4AhtQyCOoD0QMY3Vpibmn2qwM4bG8qmSnrhOj\nkNRhhN+xbYAVSKjO13zbf8OmcU90Y4tjG2xrzHXujgReOrU9wb3NTFT2f3tt\noX5DPcTO1qKwy1GlMv1JiOfZw+FWCE6JJwLnqVxhBfkmRg3ogUah0lLdwtS3\nbVs1Ur+7D3UgNcj/cgsHa6OcpRAjemD2CJV8KkecH97AK0RGyVLiMdoOsyNA\nQp6JRgS3z2vr2re45DlGhpy+UGQg4br5/7jjx+8GgjTZfKS6BpbDe02bA6PD\nfmZd\r\n=26Ai\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5Yk/ImW0Ypad6dLZyIb9m8+HJEMBcteLVa6F0jBb/OQIhAKKXftCmQ7IU9nA63w3qy4MnzNSKxtt2SpmLTJxKWY9m"}]},"_npmUser":{"name":"di9","email":"other@ytka.org"},"directories":{},"maintainers":[{"name":"di9","email":"other@ytka.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-context-menu_1.0.2_1633389651157_0.13880559036020879"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-04T23:20:51.111Z","1.0.2":"2021-10-04T23:20:51.309Z","modified":"2022-04-05T04:13:03.956Z"},"maintainers":[{"name":"di9","email":"other@ytka.org"}],"description":"An AngularJS directive to display a context menu when a right-click event is triggered","homepage":"http://ianwalter.github.io/ng-context-menu/","keywords":["ng-context-menu","context menu","right click","angularjs","angular"],"repository":{"type":"git","url":"ssh://git@stash.sigma.sbrf.ru:7999/device_farm/ng-context-menu.git"},"license":"MIT","readme":"Originally ianwalter/ng-context-menu\n\nThis project is not maintained any longer. Please feel free to fork it if you need to make changes to the library.\n\n# [ng-context-menu](http://ianwalter.github.io/ng-context-menu/)\n*An AngularJS directive to display a context menu when a right-click event is triggered*\n\n#### Step 1: Install ng-context-menu\n\nInstall using Bower:\n\n```\nbower install ng-context-menu --save\n```\n\nInclude ng-context-menu.min.js in your app.\n\n#### Step 2: Load the ng-context-menu module\n\n```javascript\nvar app = angular.module('menu-demo', ['ngRoute', 'ng-context-menu'])\n```\n\n#### Step 3: Add the context-menu directive to a DOM element\n\n```html\n<div context-menu class=\"panel panel-default position-fixed\"\n     data-target=\"menu-{{ $index }}\"\n     ng-class=\"{ 'highlight': highlight, 'expanded' : expanded }\">\n  ...\n</div>\n```\n#### Step 4: Add the markup of the menu you want to be displayed\n\nCustomize the menu to your needs. It may look something like:\n\n```html\n<div class=\"dropdown position-fixed\" id=\"menu-{{ $index }}\">\n  <ul class=\"dropdown-menu\" role=\"menu\">\n    <li>\n      <a class=\"pointer\" role=\"menuitem\" tabindex=\"1\"\n         ng-click=\"panel.highlight = true\">\n         Select Panel {{ $index + 1 }}\n      </a>\n    </li>\n    <li>\n      <a class=\"pointer\" role=\"menuitem\" tabindex=\"2\"\n         ng-click=\"panel.highlight = false\">\n         Deselect Panel  {{ $index + 1 }}\n      </a>\n    </li>\n    <li>\n      <a class=\"pointer\" role=\"menuitem\" tabindex=\"3\"\n         ng-click=\"panel.expanded = true\">\n         Expand Panel {{ $index + 1 }}\n      </a>\n    </li>\n    <li>\n      <a class=\"pointer\" role=\"menuitem\" tabindex=\"4\"\n         ng-click=\"panel.expanded = false\">\n         Contract Panel {{ $index + 1 }}\n      </a>\n    </li>\n    <li>\n      <a class=\"pointer\" role=\"menuitem\" tabindex=\"5\"\n         ng-click=\"addPanel()\">\n         Add a panel\n      </a>\n    </li>\n    <li>\n      <a href=\"https://github.com/ianwalter/ng-context-menu\"\n         role=\"menuitem\"\n         tabindex=\"-1\">\n         ng-context-menu on GitHub\n      </a>\n    </li>\n  </ul>\n</div>\n```\n\n#### Step 5: Make sure your menu is has the ```position: fixed``` CSS property\n\nAs you can see in the demo, I just created a class called position-fixed and added the property:\n\n```css\n.position-fixed {\n  position: fixed;\n}\n```\n\n#### Disabling the contextmenu\n\nIf you need to disable the contextmenu in certain circumstances, you can add an expression to the\n ```context-menu-disabled``` attribute. If the expression evaluates to true, the contextmenu will be\n disabled, for example, ```context-menu-disabled=\"1 === 1\"```\n\nThat's it, I hope you find this useful!\n\n#### `close` Callback\n\nAdd the following attribute to the `context-menu` element: `context-menu-close` which should be a function\nthat will be called whenever the context menu is closed.\n\n```html\n<div context-menu=\"onShow()\" context-menu-close=\"onClose()\"></div>\n```\n\n«–– [Ian](http://ianvonwalter.com)\n","readmeFilename":"README.md"}