From f0b0b7acfe90038b7364a66952bd0eaade509b7c Mon Sep 17 00:00:00 2001 From: Gerry Demaret Date: Wed, 8 Jul 2020 15:04:02 +0800 Subject: [PATCH] Fix bootstrap 4 styling issues --- bower.json | 2 +- js/bootstrap.confirm-modal.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 629a901..779f74a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "tigron-confirm-modal", - "version": "0.0.3", + "version": "0.0.4", "homepage": "https://github.com/tigron/confirm-modal", "authors": [ "Christophe Gosiau " diff --git a/js/bootstrap.confirm-modal.js b/js/bootstrap.confirm-modal.js index c03a915..d136466 100644 --- a/js/bootstrap.confirm-modal.js +++ b/js/bootstrap.confirm-modal.js @@ -4,7 +4,9 @@ $(function ( $ ) { $.fn.confirmModal = function() { $(this).unbind('click'); $(this).click(function(ev) { - if (bootstrap_version == '3') { + if (bootstrap_version == '4') { + template = ''; + } else if (bootstrap_version == '3') { template = ''; } else { template = ''; @@ -26,7 +28,7 @@ $(function ( $ ) { if (typeof data.btn_ok !== 'undefined') { template = template.replace('%%btn_ok%%', data.btn_ok); } else { - template = template.replace('%%btn_ok%%', 'Ok'); + template = template.replace('%%btn_ok%%', 'OK'); } if (typeof data.btn_cancel !== 'undefined') { template = template.replace('%%btn_cancel%%', data.btn_cancel);