adzon / iframe-tabs
laravel-admin extension iframe-tabs
Requires
- php: >=7.0.0
- encore/laravel-admin: ~1.5
Requires (Dev)
- phpunit/phpunit: ~6.0
- dev-master
- 2.0.0
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.38
- 1.2.37
- 1.2.36
- 1.2.35
- 1.2.34
- 1.2.33
- 1.2.32
- 1.2.31
- 1.2.30
- 1.2.29
- 1.2.28
- 1.2.27
- 1.2.26
- 1.2.25
- 1.2.15
- 1.1.24
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.20
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
This package is auto-updated.
Last update: 2024-11-08 03:57:54 UTC
README
原作者里面 config 不兼容我另外的代码,修改下做写死处理。
Installation
Run :
$ composer require ichynul/iframe-tabs
Then run:
$ php artisan vendor:publish --tag=iframe-tabs
$ php artisan admin:import iframe-tabs
Update it
[2019-10-19] 修复左边菜单很多的时候上下滚动无效的bug#32#29#21.修改了dashboard.css样式,升级后记得php artisan vendor:publish --tag=iframe-tabs --force
更新一下样式.
(本扩展依赖一些 js 和 css 文件,composer update 若版本号有变请强制发布资源,可能是更新了某些样式)
After composer update
, if version of this extension changed :
Run
php artisan vendor:publish --tag=iframe-tabs --force
This will override css and js fiels to /public/vendor/laravel-admin-ext/iframe-tabs/
Or you can and a script in composer.json
:
"scripts": { "post-update-cmd": "php artisan vendor:publish --tag=iframe-tabs --force", }
Config
Add a config in config/admin.php
:
'extensions' => [ 'iframe-tabs' => [ // Set to `false` if you want to disable this extension 'enable' => true, // The controller and action of dashboard page `/admin/dashboard` 'home_action' => App\Admin\Controllers\HomeController::class . '@index', // Default page tab-title 'home_title' => 'Home', // Default page tab-title icon 'home_icon' => 'fa-home', // Whether show icon befor titles for all tab 'use_icon' => true, // dashboard css 'tabs_css' =>'vendor/laravel-admin-ext/iframe-tabs/dashboard.css', // layer.js path 'layer_path' => 'vendor/laravel-admin-ext/iframe-tabs/layer/layer.js', /** * href links do not open in tab . * selecter : .sidebar-menu li a,.navbar-nav>li a,.sidebar .user-panel a,.sidebar-form .dropdown-menu li a * if(href.indexOf(pass_urls[i]) > -1) //pass */ 'pass_urls' => ['/auth/logout', '/auth/lock'], // When login session state of a tab-page was expired , force top-level window goto login page . //登录超时是是否强制整体跳转到登录页面,设为false的话只在触发超时登录的页面跳转,最大程度保留已打开页面。 'force_login_in_top' => true, // tabs left offset 'tabs_left' => 42, // bind click event of table actions [edit / view] 'bind_urls' => 'popup', //[ popup / new_tab / none] //table actions dom selecter 'bind_selecter' => '.box-body table.table tbody a.grid-row-view,.box-body table.table tbody a.grid-row-edit,.box-header .pull-right .btn-success,.popup', //table action links [view edit] and create button ,and any thing has class pupop : <a class="pupop" popw="400px" poph="200px" href="someurl">mylink</a> ] ],
If bind_urls
set to popup
or new_tab
, recommend disableView
and disableList
in form
/Admin/bootstrap.php
:
Encore\Admin\Form::init(function ($form) { $form->tools(function ($tools) { $tools->disableDelete(); $tools->disableView(); $tools->disableList(); }); });
See https://laravel-admin.org/docs/zh/model-form-init
And disableEdit
and disableList
in show :
$show->panel() ->tools(function ($tools) { $tools->disableEdit(); $tools->disableList(); $tools->disableDelete(); });;
Lang
Add a lang config in resources/lang/{zh-CN}/admin.php
'iframe_tabs' => [ 'oprations' => '页签操作', 'refresh_current' => '刷新当前', 'close_current' => '关闭当前', 'close_all' => '关闭全部', 'close_other' => '关闭其他', 'open_in_new' => '新窗口打开', 'open_in_pop' => '弹出窗打开', 'scroll_left' => '滚动到最左', 'scroll_right' => '滚动到最右', 'scroll_current' => '滚动到当前', 'goto_login' => '登录超时,正在跳转登录页面...' ],
Usage
Open http://your-host/admin
Thanks to https://github.com/bswsfhcw/AdminLTE-With-Iframe
License
Licensed under The MIT License (MIT).