Skip to content

Commit

Permalink
Merge pull request #4729 from camptocamp/ie-tooltip
Browse files Browse the repository at this point in the history
 Fix tooltip in IE
  • Loading branch information
sbrunner committed Mar 12, 2019
2 parents 3011279 + 9a51f23 commit cffc68f
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 21 deletions.
2 changes: 1 addition & 1 deletion contribs/gmf/examples/drawfeature.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import angular from 'angular';
import './drawfeature.css';
import 'jquery-ui/ui/widgets/tooltip.js';
import 'bootstrap/js/src/tooltip.js';
import gmfMapComponent from 'gmf/map/component.js';

import gmfDrawingModule from 'gmf/drawing/module.js';
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/examples/editfeature.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import angular from 'angular';
import appURL from './url.js';
import './editfeature.css';
import 'jquery-ui/ui/widgets/tooltip.js';
import 'bootstrap/js/src/tooltip.js';
import EPSG21781 from '@geoblocks/proj/src/EPSG_21781.js';

import gmfAuthenticationModule from 'gmf/authentication/module.js';
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/examples/editfeatureselector.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import angular from 'angular';
import appURL from './url.js';
import './editfeatureselector.css';
import 'jquery-ui/ui/widgets/tooltip.js';
import 'bootstrap/js/src/tooltip.js';
import gmfAuthenticationModule from 'gmf/authentication/module.js';

import gmfEditingEditFeatureSelectorComponent from 'gmf/editing/editFeatureSelectorComponent.js';
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/examples/filterselector.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import angular from 'angular';
import appURL from './url.js';
import './filterselector.css';
import 'jquery-ui/ui/widgets/tooltip.js';
import 'bootstrap/js/src/tooltip.js';
import gmfAuthenticationModule from 'gmf/authentication/module.js';

import gmfDatasourceManager from 'gmf/datasource/Manager.js';
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/examples/importdatasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import angular from 'angular';
import appURL from './url.js';
import './importdatasource.css';
import 'jquery-ui/ui/widgets/tooltip.js';
import 'bootstrap/js/src/tooltip.js';
import gmfDatasourceManager from 'gmf/datasource/Manager.js';

import gmfImportImportdatasourceComponent from 'gmf/import/importdatasourceComponent.js';
Expand Down
14 changes: 14 additions & 0 deletions contribs/gmf/src/controllers/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ import {TOUCH} from 'ol/has.js';
* @return {void}
*/
function bootstrap(module) {
// Hack to make the bootstrap type check working with polyfill.io
const oldObjectToString = Object.prototype.toString;
if (oldObjectToString.toString().indexOf('[native code]') < 0) {
Object.prototype.toString = function() {
if (this === null) {
return '[object Null]';
}
if (this === undefined) {
return '[object Undefined]';
}
return oldObjectToString.call(this);
};
}

const interface_ = $('meta[name=interface]')[0].getAttribute('content');
const dynamicUrl_ = $('meta[name=dynamicUrl]')[0].getAttribute('content');
const dynamicUrl = `${dynamicUrl_}?interface=${interface_}&query=${encodeURIComponent(
Expand Down
2 changes: 1 addition & 1 deletion examples/disclaimer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './disclaimer.css';
import 'jquery-ui/ui/widgets/tooltip.js';
import 'bootstrap/js/src/tooltip.js';
import angular from 'angular';
import ngeoMessageDisclaimer from 'ngeo/message/Disclaimer.js';

Expand Down
2 changes: 1 addition & 1 deletion examples/notification.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './notification.css';
import 'jquery-ui/ui/widgets/tooltip.js';
import 'bootstrap/js/src/tooltip.js';
import angular from 'angular';
import {MessageType} from 'ngeo/message/Message.js';

Expand Down
5 changes: 1 addition & 4 deletions examples/popupservice.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/**
*/

import './popupservice.css';
import 'jquery-ui/ui/widgets/tooltip.js';
import 'bootstrap/js/src/tooltip.js';
import angular from 'angular';
import ngeoMessagePopup from 'ngeo/message/Popup.js';

Expand Down
21 changes: 11 additions & 10 deletions src/message/popoverComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ const module = angular.module('ngeoPopover', []);
/**
* Provides a directive used to display a Bootstrap popover.
*
*<div ngeo-popover>
* <a ngeo-popover-anchor class="btn btn-info">anchor 1</a>
* <div ngeo-popover-body>
* <ul>
* <li>action 1:
* <input type="range"/>
* </li>
* </ul>
* </div>
*</div>
* <div ngeo-popover>
* <a ngeo-popover-anchor class="btn btn-info">anchor 1</a>
* <div ngeo-popover-body>
* <ul>
* <li>action 1:
* <input type="range"/>
* </li>
* </ul>
* </div>
* </div>
*
* @ngdoc directive
* @ngInject
* @ngname ngeoPopover
Expand Down

0 comments on commit cffc68f

Please sign in to comment.