Fixes #3732 - broken tooltips and weird select2 option text behavior

The solve here was a few things - first, load jquery-ui before bootstrap. They have conflicting tooltips. Second, initiate the tooltips in the wenzhixin/bootstrap-table formatter using `data-tooltip=“true”`, and thirdly, add some JS that tells BS table to inititalize tooltips within the table using that `data-tooltip=“true”` business
This commit is contained in:
snipe 2017-07-08 13:21:13 -07:00
parent 932e25ca9b
commit e79260a0d4
17 changed files with 114 additions and 11112 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;;;;;","sourceRoot":""}
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;","sourceRoot":""}

File diff suppressed because one or more lines are too long

View file

@ -13,6 +13,11 @@
"/css/overrides.css": "/css/overrides.css",
"/css/skin-blue.css": "/css/skin-blue.css",
"/vue.js": "/vue.js",
"/vue.js.map": "/vue.js.map",
"/mix.js.map": "/mix.js.map",
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map",
"/css/app.css.map": "/css/app.css.map",
"/css/overrides.css.map": "/css/overrides.css.map",
"public/css/dist/all.css": "public/css/dist/all.css",
"public/js/dist/all.js": "public/js/dist/all.js"
}

View file

@ -1,110 +1,2 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 61);
/******/ })
/************************************************************************/
/******/ ({
/***/ 6:
/***/ (function(module, exports) {
eval("// removed by extract-text-webpack-plugin//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9hc3NldHMvbGVzcy9vdmVycmlkZXMubGVzcz9mZjJhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIHJlbW92ZWQgYnkgZXh0cmFjdC10ZXh0LXdlYnBhY2stcGx1Z2luXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9yZXNvdXJjZXMvYXNzZXRzL2xlc3Mvb3ZlcnJpZGVzLmxlc3Ncbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAxIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/***/ 61:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(9);
__webpack_require__(7);
__webpack_require__(8);
module.exports = __webpack_require__(6);
/***/ }),
/***/ 7:
/***/ (function(module, exports) {
eval("// removed by extract-text-webpack-plugin//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9hc3NldHMvbGVzcy9BZG1pbkxURS5sZXNzPzY3NzkiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gcmVtb3ZlZCBieSBleHRyYWN0LXRleHQtd2VicGFjay1wbHVnaW5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3Jlc291cmNlcy9hc3NldHMvbGVzcy9BZG1pbkxURS5sZXNzXG4vLyBtb2R1bGUgaWQgPSA3XG4vLyBtb2R1bGUgY2h1bmtzID0gMSJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=");
/***/ }),
/***/ 8:
/***/ (function(module, exports) {
eval("// removed by extract-text-webpack-plugin//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9hc3NldHMvbGVzcy9hcHAubGVzcz8yMTM3Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIHJlbW92ZWQgYnkgZXh0cmFjdC10ZXh0LXdlYnBhY2stcGx1Z2luXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9yZXNvdXJjZXMvYXNzZXRzL2xlc3MvYXBwLmxlc3Ncbi8vIG1vZHVsZSBpZCA9IDhcbi8vIG1vZHVsZSBjaHVua3MgPSAxIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/***/ 9:
/***/ (function(module, exports) {
eval("//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ })
/******/ });
!function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=n,t.c=r,t.i=function(n){return n},t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:e})},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,"a",r),r},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=62)}({6:function(n,t){},62:function(n,t,r){r(9),r(7),r(8),n.exports=r(6)},7:function(n,t){},8:function(n,t){},9:function(n,t){}});
//# sourceMappingURL=mix.js.map

View file

@ -1 +1 @@
{"version":3,"file":"mix.js","sources":["webpack:///mix.js"],"sourcesContent":["!function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=n,t.c=r,t.i=function(n){return n},t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:e})},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,\"a\",r),r},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p=\"\",t(t.s=58)}({58:function(n,t,r){r(9),r(7),r(8),n.exports=r(6)},6:function(n,t){},7:function(n,t){},8:function(n,t){},9:function(n,t){}});\n\n\n// WEBPACK FOOTER //\n// mix.js"],"mappings":"AAAA","sourceRoot":""}
{"version":3,"file":"mix.js","sources":["webpack:///mix.js"],"sourcesContent":["!function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=n,t.c=r,t.i=function(n){return n},t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:e})},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,\"a\",r),r},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p=\"\",t(t.s=62)}({6:function(n,t){},62:function(n,t,r){r(9),r(7),r(8),n.exports=r(6)},7:function(n,t){},8:function(n,t){},9:function(n,t){}});\n\n\n// WEBPACK FOOTER //\n// mix.js"],"mappings":"AAAA","sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -28,7 +28,10 @@
"ekko-lightbox": "^5.1.1",
"fastclick": "^1.0.6",
"font-awesome": "^4.7.0",
"jquery-slimscroll": "^1.3.8",
"jquery-ui": "^1.12.1",
"jquery-ui-bundle": "^1.12.1",
"jquery.iframe-transport": "^1.0.0",
"papaparse": "^4.3.3",
"select2": "^4.0.3",
"tether": "^1.4.0",

Binary file not shown.

BIN
public/js/dist/all.js vendored

Binary file not shown.

View file

@ -184,9 +184,11 @@ $(function () {
//Activate Bootstrap tooltip
if (o.enableBSToppltip) {
$.widget.bridge('uitooltip', $.ui.tooltip);
$('body').tooltip({
selector: o.BSTooltipSelector
});
}
//Activate box widget

View file

@ -4,8 +4,9 @@
* include Vue and Vue Resource. This gives a great starting point for
* building robust, powerful web applications using Vue and Laravel.
*/
require('../../../node_modules/jquery-ui-bundle/jquery-ui.min.js');
require('./bootstrap');
/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application

View file

@ -644,29 +644,32 @@
<script src="{{ mix('js/dist/all.js') }}"></script>
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip();
var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value
$.fn.bootstrapDP = datepicker;
$('.datepicker').datepicker();
})
</script>
@section('moar_scripts')
@show
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip();
})
</script>
@if ((Session::get('topsearch')=='true') || (Request::is('/')))
<script>
$("#tagSearch").focus();
</script>
@endif
@endif
</body>
</html>

View file

@ -143,16 +143,16 @@ $('.snipe-table').bootstrapTable({
var actions = '<nobr>';
if ((row.available_actions) && (row.available_actions.clone === true)) {
actions += '<a href="{{ url('/') }}/' + destination + '/' + row.id + '/clone" class="btn btn-sm btn-info"><i class="fa fa-copy"></i></a>&nbsp;';
actions += '<a href="{{ url('/') }}/' + destination + '/' + row.id + '/clone" class="btn btn-sm btn-info" data-tooltip="true" title="Clone"><i class="fa fa-copy"></i></a>&nbsp;';
}
if ((row.available_actions) && (row.available_actions.update === true)) {
actions += '<a href="{{ url('/') }}/' + destination + '/' + row.id + '/edit" class="btn btn-sm btn-warning"><i class="fa fa-pencil"></i></a>&nbsp;';
actions += '<a href="{{ url('/') }}/' + destination + '/' + row.id + '/edit" class="btn btn-sm btn-warning" data-tooltip="true" title="Update"><i class="fa fa-pencil"></i></a>&nbsp;';
}
if ((row.available_actions) && (row.available_actions.delete === true)) {
actions += '<a href="{{ url('/') }}/' + destination + '/' + row.id + '" '
+ ' class="btn btn-danger btn-sm delete-asset" '
+ ' class="btn btn-danger btn-sm delete-asset" data-tooltip="true" '
+ ' data-toggle="modal" '
+ ' data-content="{{ trans('general.sure_to_delete') }} ' + row.name + '?" '
+ ' data-title="{{ trans('general.delete') }}?" onClick="return false;">'
@ -329,5 +329,14 @@ $('.snipe-table').bootstrapTable({
});
});
// This is necessary to make the bootstrap tooltips work inside of the wenzhixin/bootstrap-table formatters
$(function() {
$('#table').on('post-body.bs.table', function () {
$('[data-tooltip="true"]').tooltip({
container: 'body'
});
});
});
</script>

View file

@ -33,12 +33,12 @@ mix.js(
).sourceMaps();
mix.scripts([
'./node_modules/jquery-ui/jquery-ui.js',
'build/vue.js', //this is the modularized nifty Vue.js thing we just built, above!
'./node_modules/tether/dist/js/tether.min.js',
'./bower_components/jquery-ui/jquery-ui.js',
'./bower_components/jquery-slimscroll/jquery.slimscroll.js',
'./bower_components/jquery.iframe-transport/jquery.iframe-transport.js',
'./bower_components/blueimp-file-upload/js/jquery.fileupload.js',
'./node_modules/jquery-slimscroll/jquery.slimscroll.js',
'./node_modules/jquery.iframe-transport/jquery.iframe-transport.js',
'./node_modules/blueimp-file-upload/js/jquery.fileupload.js',
'./node_modules/fastclick/lib/fastclick.js',
'./node_modules/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js',
'./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',