Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions core/css/tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
padding: 10px 0;
filter: drop-shadow(0 1px 10px var(--color-box-shadow));
&.in,
&.show,
&.tooltip[aria-hidden='false'] {
visibility: visible;
opacity: 1;
Expand Down Expand Up @@ -80,7 +81,7 @@
&.top-left,
&[x-placement^='top'],
&.top-right {
.tooltip-arrow {
.tooltip-arrow, .arrow {
bottom: 0;
border-width: 10px 10px 0;
border-top-color: var(--color-main-background);
Expand All @@ -99,7 +100,7 @@
&[x-placement^='bottom'],
&.bottom-left,
&.bottom-right {
.tooltip-arrow {
.tooltip-arrow, .arrow {
top: 0;
border-width: 0 10px 10px;
border-bottom-color: var(--color-main-background);
Expand Down Expand Up @@ -129,7 +130,7 @@
border-radius: var(--border-radius);
}

.tooltip-arrow {
.tooltip-arrow, .tooltip .arrow {
position: absolute;
width: 0;
height: 0;
Expand Down
144 changes: 101 additions & 43 deletions core/js/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/main.js.map

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions core/js/tests/html-domparser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* DOMParser HTML extension
* 2012-09-04
*
* By Eli Grey, http://eligrey.com
* Public domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/

/*! @source https://gist.github.com/1129031 */
/*global document, DOMParser*/

(function(DOMParser) {
"use strict";

var
DOMParser_proto = DOMParser.prototype
, real_parseFromString = DOMParser_proto.parseFromString
;

// Firefox/Opera/IE throw errors on unsupported types
try {
// WebKit returns null on unsupported types
if ((new DOMParser).parseFromString("", "text/html")) {
// text/html parsing is natively supported
return;
}
} catch (ex) {}

DOMParser_proto.parseFromString = function(markup, type) {
if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {
var
doc = document.implementation.createHTMLDocument("")
;
if (markup.toLowerCase().indexOf('<!doctype') > -1) {
doc.documentElement.innerHTML = markup;
}
else {
doc.body.innerHTML = markup;
}
return doc;
} else {
return real_parseFromString.apply(this, arguments);
}
};
}(DOMParser));
37 changes: 37 additions & 0 deletions core/src/Polyfill/tooltip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* @copyright 2019 Julius Härtl <[email protected]>
*
* @author 2019 Julius Härtl <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

$.prototype.tooltip = (function(tooltip) {
return function(config) {
try {
return tooltip.call(this, config);
} catch (ex) {
if (ex instanceof TypeError && config === 'destroy') {
console.error('Deprecated call $.tooltip(\'destroy\') has been deprecated and should be removed');
return tooltip.call(this, 'dispose');
}
if (ex instanceof TypeError && config === 'fixTitle') {
console.error('Deprecated call $.tooltip(\'fixTitle\') has been deprecated and should be removed');
return tooltip.call(this, '_fixTitle');
}
}
};
})($.prototype.tooltip);
3 changes: 2 additions & 1 deletion core/src/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import 'jquery-ui-dist/jquery-ui.theme.css'
// END TODO
import autosize from 'autosize'
import Backbone from 'backbone'
import 'bootstrap/js/tooltip'
import 'bootstrap/js/dist/tooltip'
import './Polyfill/tooltip'
import ClipboardJS from 'clipboard'
import cssVars from 'css-vars-ponyfill'
import dav from 'davclient.js'
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"autosize": "^4.0.2",
"backbone": "^1.3.3",
"blueimp-md5": "^2.10.0",
"bootstrap": "^3.4.1",
"bootstrap": "^4.3.1",
"clipboard": "^2.0.4",
"css-vars-ponyfill": "^1.17.0",
"davclient.js": "git+https://github.com/owncloud/davclient.js.git#0.1.3",
Expand Down
1 change: 1 addition & 0 deletions tests/karma.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ module.exports = function(config) {
testCore = true;
}

files.push(corePath + 'tests/html-domparser.js');
files.push('core/js/dist/main.js');
// core mocks
files.push(corePath + 'tests/specHelper.js');
Expand Down