Compare commits

...
10 Commits
Author SHA1 Message Date
n1474335 c07cc913c8 5.12.4 2017-08-01 19:27:24 +00:00
n1474335 b8fb5493c5 Merge branch 'artemisbot-bug/text-overflow' 2017-08-01 19:25:04 +00:00
n1474335 e8e5eb9c53 Fixed some edge cases for popover triggering 2017-08-01 19:23:30 +00:00
n1474335 a15034b03e Merge branch 'bug/text-overflow' of https://github.com/artemisbot/CyberChef into artemisbot-bug/text-overflow 2017-08-01 15:40:31 +00:00
n1474335 1435acdc28 5.12.3 2017-08-01 14:42:52 +00:00
n1474335 37f164f11c Merge branch 'master' of github.com:gchq/CyberChef 2017-08-01 14:42:17 +00:00
n1474335 7a2f071269 Dependencies in the node version are now kept external in the webpack build 2017-08-01 14:42:09 +00:00
Matt C 9ee0964d0e Fixed hover issue - now allows scrolling 2017-07-29 00:45:41 +01:00
Matt C 33ecbfa95b Fixed arrow issue 2017-07-28 21:47:47 +01:00
Matt C 90ed62add2 Fixes gchq/CyberChef#137
Changes data-trigger to focus so scrolling works and sets max height.
2017-07-25 11:49:23 +01:00
6 changed files with 51 additions and 14 deletions
+3
View File
@@ -1,6 +1,7 @@
const webpack = require("webpack");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const NodeExternals = require("webpack-node-externals");
const Inliner = require("web-resource-inliner");
module.exports = function (grunt) {
@@ -294,6 +295,7 @@ module.exports = function (grunt) {
tests: {
target: "node",
entry: "./test/index.js",
externals: [NodeExternals()],
output: {
filename: "index.js",
path: __dirname + "/build/test"
@@ -302,6 +304,7 @@ module.exports = function (grunt) {
node: {
target: "node",
entry: "./src/node/index.js",
externals: [NodeExternals()],
output: {
filename: "CyberChef.js",
path: __dirname + "/build/node",
+9 -7
View File
@@ -1,6 +1,6 @@
{
"name": "cyberchef",
"version": "5.12.2",
"version": "5.12.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -865,7 +865,6 @@
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz",
"integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=",
"dev": true,
"requires": {
"babel-runtime": "6.23.0",
"core-js": "2.4.1",
@@ -929,7 +928,6 @@
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz",
"integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=",
"dev": true,
"requires": {
"core-js": "2.4.1",
"regenerator-runtime": "0.10.5"
@@ -1557,8 +1555,7 @@
"core-js": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz",
"integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=",
"dev": true
"integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4="
},
"core-util-is": {
"version": "1.0.2",
@@ -6208,8 +6205,7 @@
"regenerator-runtime": {
"version": "0.10.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
"dev": true
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg="
},
"regenerator-transform": {
"version": "0.9.11",
@@ -7438,6 +7434,12 @@
}
}
},
"webpack-node-externals": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/webpack-node-externals/-/webpack-node-externals-1.6.0.tgz",
"integrity": "sha1-Iyxi7GCSsQBjWj0p2DwXRxKN+b0=",
"dev": true
},
"webpack-sources": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.0.1.tgz",
+4 -3
View File
@@ -1,6 +1,6 @@
{
"name": "cyberchef",
"version": "5.12.2",
"version": "5.12.4",
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
"author": "n1474335 <n1474335@gmail.com>",
"homepage": "https://gchq.github.io/CyberChef",
@@ -32,7 +32,6 @@
"devDependencies": {
"babel-core": "^6.24.0",
"babel-loader": "^7.1.1",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.6.0",
"css-loader": "^0.28.4",
"exports-loader": "^0.6.4",
@@ -60,11 +59,13 @@
"style-loader": "^0.18.2",
"url-loader": "^0.5.8",
"web-resource-inliner": "^4.1.0",
"webpack": "^3.3.0"
"webpack": "^3.3.0",
"webpack-node-externals": "^1.6.0"
},
"dependencies": {
"bootstrap": "^3.3.7",
"bootstrap-colorpicker": "^2.5.1",
"babel-polyfill": "^6.23.0",
"bootstrap-switch": "^3.3.4",
"crypto-api": "^0.6.2",
"crypto-js": "^3.1.9-1",
+29 -1
View File
@@ -155,7 +155,35 @@ OperationsWaiter.prototype.getSelectedOp = function(ops) {
*/
OperationsWaiter.prototype.opListCreate = function(e) {
this.manager.recipe.createSortableSeedList(e.target);
$("[data-toggle=popover]").popover();
this.enableOpsListPopovers(e.target);
};
/**
* Sets up popovers, allowing the popover itself to gain focus which enables scrolling
* and other interactions.
*
* @param {Element} el - The element to start selecting from
*/
OperationsWaiter.prototype.enableOpsListPopovers = function(el) {
$(el).find("[data-toggle=popover]").addBack("[data-toggle=popover]")
.popover({trigger: "manual"})
.on("mouseenter", function() {
const _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function () {
$(_this).popover("hide");
});
}).on("mouseleave", function () {
const _this = this;
setTimeout(function() {
// Determine if the popover associated with this element is being hovered over
if ($(_this).data("bs.popover") &&
!$(_this).data("bs.popover").$tip.is(":hover")) {
$(_this).popover("hide");
}
}, 50);
});
};
+2 -3
View File
@@ -93,7 +93,7 @@ RecipeWaiter.prototype.createSortableSeedList = function(listEl) {
// Removes popover element and event bindings from the dragged operation but not the
// event bindings from the one left in the operations list. Without manually removing
// these bindings, we cannot re-initialise the popover on the stub operation.
$(evt.item).popover("destroy");
$(evt.item).popover("destroy").removeData("bs.popover").off("mouseenter").off("mouseleave");
$(evt.clone).off(".popover").removeData("bs.popover");
evt.item.setAttribute("data-toggle", "popover-disabled");
},
@@ -120,8 +120,7 @@ RecipeWaiter.prototype.opSortEnd = function(evt) {
// Reinitialise the popover on the original element in the ops list because for some reason it
// gets destroyed and recreated.
$(evt.clone).popover();
$(evt.clone).children("[data-toggle=popover]").popover();
this.manager.ops.enableOpsListPopovers(evt.clone);
if (evt.item.parentNode.id !== "rec-list") {
return;
+4
View File
@@ -142,6 +142,10 @@ optgroup {
border-color: var(--popover-border-colour);
}
.popover-content {
max-height: 90vh;
overflow-y: auto;
}
.popover.right>.arrow {
border-right-color: var(--popover-border-colour);