diff --git a/README.md b/README.md index 2d27dfb..7f9e8d3 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,6 @@ Add module to application configuration ], ``` -By adding `backendBrowserSupport` to your app params you can specify which browser versions are supported in your backend configuration. -Examples see at [urosg80/yii2-outdatedbrowser-rework](https://github.com/urosg80/yii2-outdatedbrowser-rework) - ### Minimalistic Login view from AdminLTE 2 ``` diff --git a/composer.json b/composer.json index 339355b..860b388 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,6 @@ "dmstr/yii2-adminlte-asset": "^2.5.0", "insolita/yii2-adminlte-widgets": "^1.1.4", "loveorigami/yii2-notification-wrapper": "^6.3", - "urosg/yii2-outdated-browser-rework": "^1.0", "rmrevin/yii2-fontawesome": "^2.17" }, "suggest": { diff --git a/src/assets/BackendAsset.php b/src/assets/BackendAsset.php index cc4fe7a..ebb9a79 100644 --- a/src/assets/BackendAsset.php +++ b/src/assets/BackendAsset.php @@ -8,7 +8,6 @@ namespace dmstr\modules\backend\assets; -use urosg\widgets\OutdatedBrowserRework\OutdatedBrowserReworkWidgetAsset; use yii\web\AssetBundle as BaseBackendAssetBundle; use dmstr\web\AdminLteAsset; @@ -19,14 +18,13 @@ */ class BackendAsset extends BaseBackendAssetBundle { - public $sourcePath = '@vendor/dmstr/yii2-backend-module/src/assets/backend'; + public $sourcePath = __DIR__ . '/backend'; public $css = [ 'less/backend.less', ]; public $depends = [ - AdminLteAsset::class, - OutdatedBrowserReworkWidgetAsset::class + AdminLteAsset::class ]; } diff --git a/src/assets/BackendJsAsset.php b/src/assets/BackendJsAsset.php index 1234fe1..c9c086c 100644 --- a/src/assets/BackendJsAsset.php +++ b/src/assets/BackendJsAsset.php @@ -17,13 +17,12 @@ */ class BackendJsAsset extends AssetBundle { - public $sourcePath = '@vendor/dmstr/yii2-backend-module/src/assets/backend'; + public $sourcePath = __DIR__ . '/backend-js'; public $js = [ - 'js/is-framed.js', - 'js/outdated-browser.js', + 'is-framed.js' ]; public $jsOptions = [ 'position' => View::POS_BEGIN ]; -} \ No newline at end of file +} diff --git a/src/assets/backend/js/is-framed.js b/src/assets/backend-js/is-framed.js similarity index 100% rename from src/assets/backend/js/is-framed.js rename to src/assets/backend-js/is-framed.js diff --git a/src/assets/backend/js/outdated-browser.js b/src/assets/backend/js/outdated-browser.js deleted file mode 100644 index 76de281..0000000 --- a/src/assets/backend/js/outdated-browser.js +++ /dev/null @@ -1,15 +0,0 @@ - -window.addEventListener("load", function () { - var outdatedBrowserButton = document.getElementById("buttonCloseUpdateBrowser"); - if (sessionStorage.outdated_browser_confirmed === "1") { - document.getElementById("outdated").remove(); - } else { - if (outdatedBrowserButton !== null) { - outdatedBrowserButton.addEventListener("mousedown", function (e) { - e.preventDefault(); - sessionStorage.outdated_browser_confirmed = "1"; - }); - } - } -}); - diff --git a/src/assets/backend/less/backend.less b/src/assets/backend/less/backend.less index cee8ac7..a4fd3c6 100644 --- a/src/assets/backend/less/backend.less +++ b/src/assets/backend/less/backend.less @@ -2,7 +2,6 @@ @import (reference) "@{bowerAssetPath}/bootstrap/less/bootstrap.less"; @import "json-editor"; -@import "outdated-browser"; html, body { diff --git a/src/assets/backend/less/outdated-browser.less b/src/assets/backend/less/outdated-browser.less deleted file mode 100644 index f4da63e..0000000 --- a/src/assets/backend/less/outdated-browser.less +++ /dev/null @@ -1,19 +0,0 @@ -#outdated { - background-color: #f39c12 !important; // overwrite inline styles - position: relative; - padding: 12px 0; - - & > div > h6 { - font-size: 20px; - margin-top: 0; - } - - a#buttonUpdateBrowser { - display: none; - } - - .last { - right: 15px; - top: 15px; - } -} \ No newline at end of file diff --git a/src/views/layouts/main.php b/src/views/layouts/main.php index 41c1ff0..eafde82 100644 --- a/src/views/layouts/main.php +++ b/src/views/layouts/main.php @@ -9,7 +9,6 @@ use lo\modules\noty\layers\Growl; use lo\modules\noty\Wrapper; use rmrevin\yii\fontawesome\FA; -use urosg\widgets\OutdatedBrowserRework\OutdatedBrowserReworkWidget; use Yii; use yii\base\InvalidCallException; use yii\helpers\Html; @@ -62,18 +61,6 @@ - [ - 'outOfDate' => Yii::t('backend-module', 'Your browser is not fully supported by this website.'), - 'updateWeb' => Yii::t('backend-module', 'We recommend to upgrading to the latest {chrome-link}', ['chrome-link' => Html::a('Chrome', 'https://www.google.de/chrome'), ['target' => '_blank']]), - 'updateGooglePlay' => Yii::t('backend-module', 'Please install Chrome from Google Play'), - 'updateAppStore' => Yii::t('backend-module', 'Please update iOS from the Settings'), - 'webUpdateUrl' => null, - 'callToAction' => null, - 'close' => Yii::t('backend-module', 'Close') - ], - 'browserSupport' => Yii::$app->params['backend.browserSupport'] ?? [] -]) : '' ?> beginBody() ?>