Commit eb3b79f2 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

bootstrap version upgraded so it can be bundled

parent bd901f47
......@@ -411,9 +411,9 @@
"dev": true
},
"bootstrap": {
"version": "3.3.7",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.3.7.tgz",
"integrity": "sha1-WjiTlFSfIzMIdaOxUGVldPip63E="
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz",
"integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag=="
},
"brace-expansion": {
"version": "1.1.8",
......@@ -4082,6 +4082,11 @@
"integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==",
"dev": true
},
"popper.js": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.15.0.tgz",
"integrity": "sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA=="
},
"prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
......
......@@ -39,7 +39,7 @@
},
"dependencies": {
"autocomplete.js": "^0.36.0",
"bootstrap": "^3.3.7",
"bootstrap": "^4.3.1",
"csv-stringify": "^4.0.0",
"datatables.net": "^1.10.19",
"datatables.net-rowreorder": "^1.2.5",
......@@ -55,6 +55,7 @@
"multi-checkbox-list": "^0.3.1",
"openlayers": "^4.6.5",
"pileup": "^0.6.9",
"popper.js": "^1.15.0",
"request": "^2.88.0",
"spectrum-colorpicker": "^1.8.0",
"text-encoding": "^0.6.4",
......
......@@ -65,11 +65,6 @@ GuiConnector.prototype.init = function () {
if (isIE) {
alert("This web page works well with Chrome, Firefox and Safari.");
}
// bootstrap tab initialization
$("ul.nav-tabs a").click(function (e) {
e.preventDefault();
$(this).tab('show');
});
self.getParams = [];
......
"use strict";
var $ = require('jquery');
require('popper.js');
require('bootstrap');
var AbstractGuiElement = require('./AbstractGuiElement');
var ConfigurationType = require('../ConfigurationType');
var Functions = require('../Functions');
......
......@@ -62,14 +62,14 @@ AbstractDbPanel.prototype._createEventHandlers = function () {
}
};
autocomplete(searchInput,{
autocomplete(searchInput, {
minLength: 1,
hint: true
}, {
source: function (query, callback) {
callback(self.getAutocomplete(query.toLowerCase()));
}
}).on('autocomplete:selected', function() {
}).on('autocomplete:selected', function () {
searchByQuery();
});
......@@ -290,14 +290,20 @@ AbstractDbPanel.prototype.addResultTab = function (query, elements) {
contentClass = "tab-pane active";
}
var navLi = document.createElement("li");
navLi.className = navClass;
if (name !== undefined) {
if (name.length > 12) {
name = name.substring(0, 10) + "...";
}
}
if (query.name !== undefined) {
name = query.name;
}
var navLink = Functions.createElement({
type: "a",
href: "#" + tabId,
var navLi = self.getGuiUtils().createTabMenuObject({
name: name,
id: tabId,
navigationBar: navElement,
onclick: function () {
$(this).tab('show');
var identifiedElements = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].element instanceof SearchBioEntityGroup) {
......@@ -311,16 +317,6 @@ AbstractDbPanel.prototype.addResultTab = function (query, elements) {
return self.getOverlayDb().callListeners("onFocus", {query: query, identifiedElements: identifiedElements});
}
});
if (name !== undefined) {
if (name.length > 12) {
name = name.substring(0, 10) + "...";
}
navLink.innerHTML = name;
}
navLi.appendChild(navLink);
if (query.name !== undefined) {
navLink.innerHTML = query.name;
}
navElement.appendChild(navLi);
var contentDiv = document.createElement("div");
......
......@@ -956,6 +956,7 @@ GuiUtils.prototype.createLogoutLink = function () {
* @param {string} params.name
* @param {string} params.id
* @param {string} [params.className]
* @param {function} [params.onclick]
* @param {HTMLElement} params.navigationBar
*
* @returns {HTMLLIElement}
......@@ -972,17 +973,16 @@ GuiUtils.prototype.createTabMenuObject = function (params) {
var navLi = document.createElement("li");
navLi.className = navClass;
var navLink = document.createElement("a");
if (params.className !== undefined) {
navLink.className = params.className;
}
navLink.href = "#" + id;
if (name !== undefined) {
navLink.innerHTML = name;
}
navLink.onclick = function () {
$(this).tab('show');
};
var navLink = Functions.createElement({
type: "a",
className: params.className,
href: "#" + id,
content: name,
onclick: params.onclick,
xss: false
});
$(navLink).attr("role", "tab");
$(navLink).attr("data-toggle", "tab");
navLi.appendChild(navLink);
return navLi;
};
......
"use strict";
require("../mocha-config.js");
var $ = require('jquery');
var Legend = require('../../../main/js/gui/Legend');
var ConfigurationType = require('../../../main/js/ConfigurationType');
......
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 to comment