Remove Datatables (#798)

pull/799/head
Kei 2 years ago committed by GitHub
parent aeea8667c8
commit 0cd0178771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,116 +0,0 @@
<?php
return [
/*
* DataTables search options.
*/
'search' => [
/*
* Smart search will enclose search keyword with wildcard string "%keyword%".
* SQL: column LIKE "%keyword%"
*/
'smart' => true,
/*
* Multi-term search will explode search keyword using spaces resulting into multiple term search.
*/
'multi_term' => true,
/*
* Case insensitive will search the keyword in lower case format.
* SQL: LOWER(column) LIKE LOWER(keyword)
*/
'case_insensitive' => true,
/*
* Wild card will add "%" in between every characters of the keyword.
* SQL: column LIKE "%k%e%y%w%o%r%d%"
*/
'use_wildcards' => false,
],
/*
* DataTables internal index id response column name.
*/
'index_column' => 'DT_RowIndex',
/*
* List of available builders for DataTables.
* This is where you can register your custom dataTables builder.
*/
'engines' => [
'eloquent' => \Yajra\DataTables\EloquentDataTable::class,
'query' => \Yajra\DataTables\QueryDataTable::class,
'collection' => \Yajra\DataTables\CollectionDataTable::class,
'resource' => \Yajra\DataTables\ApiResourceDataTable::class,
],
/*
* DataTables accepted builder to engine mapping.
* This is where you can override which engine a builder should use
* Note, only change this if you know what you are doing!
*/
'builders' => [
//Illuminate\Database\Eloquent\Relations\Relation::class => 'eloquent',
//Illuminate\Database\Eloquent\Builder::class => 'eloquent',
//Illuminate\Database\Query\Builder::class => 'query',
//Illuminate\Support\Collection::class => 'collection',
],
/*
* Nulls last sql pattern for Posgresql & Oracle.
* For MySQL, use '-%s %s'
*/
'nulls_last_sql' => '%s %s NULLS LAST',
/*
* User friendly message to be displayed on user if error occurs.
* Possible values:
* null - The exception message will be used on error response.
* 'throw' - Throws a \Yajra\DataTables\Exceptions\Exception. Use your custom error handler if needed.
* 'custom message' - Any friendly message to be displayed to the user. You can also use translation key.
*/
'error' => env('DATATABLES_ERROR', null),
/*
* Default columns definition of dataTable utility functions.
*/
'columns' => [
/*
* List of columns hidden/removed on json response.
*/
'excess' => ['rn', 'row_num'],
/*
* List of columns to be escaped. If set to *, all columns are escape.
* Note: You can set the value to empty array to disable XSS protection.
*/
'escape' => '*',
/*
* List of columns that are allowed to display html content.
* Note: Adding columns to list will make us available to XSS attacks.
*/
'raw' => ['action'],
/*
* List of columns are are forbidden from being searched/sorted.
*/
'blacklist' => ['password', 'remember_token'],
/*
* List of columns that are only allowed fo search/sort.
* If set to *, all columns are allowed.
*/
'whitelist' => '*',
],
/*
* JsonResponse header and options config.
*/
'json' => [
'header' => [],
'options' => 0,
],
];

@ -21,7 +21,6 @@
"browser-sync": "^2.26.13 ",
"browser-sync-webpack-plugin": "^2.3.0",
"clipboard": "^2.0.1",
"datatables.net-dt": "^1.10.23",
"jquery": "^3.2",
"jquery.typewatch": "^3.0.0",
"laravel-mix": "^6.0.6",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

@ -24,7 +24,6 @@ UrlHub was created, and is maintained by [Budi Hermawan](https://github.com/real
- **Power of customisation:** Do you want your site to be just for your use, so no one can register? No problem. It's in the configuration. Users must be registered to create Short URL? That's okay. It's in the configuration. From configuration file, you can edit pretty everything of your website. The choice is yours.
- **Configuration guard:** No need to worry if you fill in the configuration values with the wrong data type or values that is not allowed, UrlHub will automatically correct it for you.
- **Sortable list of shortened URLs.**
- **[Datatables](https://datatables.net/) with server-side processing.**
- **Written in [PHP](https://www.php.net/) and [Laravel 9](https://laravel.com/docs/9.x).**
- **Modern and simple interface.**
- **Made with :heart: &amp; :coffee:.**

@ -1,6 +1,5 @@
import './bootstrap';
import {initPasswordFields} from './password-toggle';
import 'datatables.net';
$(function() {
/**

@ -1,7 +1,6 @@
@use "sass:color";
@use "mixins" as mixin;
@import "base";
@import "~datatables.net-dt/css/jquery.dataTables.css";
@import url('https://fonts.googleapis.com/css?family=Nunito:200,300,400,600,700,800,900');
body {

@ -1,64 +0,0 @@
<?php
namespace Tests\Browser\Components;
use App\Models\Url;
use App\Models\User;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
/**
* Sometimes while changing some javascript files, the datatables fail to
* render the table. This test is written to make sure the datatables run
* as expected.
*/
class DataTablesTest extends DuskTestCase
{
protected function setUp(): void
{
parent::setUp();
$this->browse(function (Browser $browser) {
$browser->loginAs(User::find(1));
});
}
public function testDashboard()
{
$text = 'dashboard';
$user = User::find(1);
Url::factory()->create([
'user_id' => $user->id,
'meta_title' => $text,
]);
$this->browse(function (Browser $browser) use ($text) {
$browser->visitRoute('dashboard.allurl')
->waitForText($text)
->assertSee($text);
});
}
public function testAllUrls()
{
$this->browse(function (Browser $browser) {
$browser->visitRoute('dashboard.allurl')
->waitUntilMissingText('Processing')
->assertSee('dashboard');
});
}
public function testAllUsers()
{
$user = User::factory()->create([
'email' => 'laravel@example.com',
]);
$this->browse(function (Browser $browser) use ($user) {
$browser->visitRoute('user.index')
->waitUntilMissingText('Processing')
->assertSee($user->email);
});
}
}

@ -1,41 +0,0 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
class HomePage extends Page
{
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/';
}
/**
* Assert that the browser is on the page.
*
* @param \Laravel\Dusk\Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
//
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'@element' => '#selector',
];
}
}

@ -1,20 +0,0 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Page as BasePage;
abstract class Page extends BasePage
{
/**
* Get the global element shortcuts for the site.
*
* @return array
*/
public static function siteElements()
{
return [
'@element' => '#selector',
];
}
}

@ -1,2 +0,0 @@
*
!.gitignore

@ -1,2 +0,0 @@
*
!.gitignore

@ -7,8 +7,7 @@ mix.postCss('resources/css/main.css', 'public/css', [
.sass('resources/sass/backend.scss', 'css/backend.css')
.sass('resources/sass/frontend.scss', 'css/frontend.css')
.js('resources/js/frontend.js', 'js/frontend.js')
.js('resources/js/backend.js', 'js/backend.js')
.copyDirectory('node_modules/datatables.net-dt/images', 'public/images');
.js('resources/js/backend.js', 'js/backend.js');
mix.extract()
.version()

@ -2511,21 +2511,6 @@ csso@^4.2.0:
dependencies:
css-tree "^1.1.2"
datatables.net-dt@^1.10.23:
version "1.11.4"
resolved "https://registry.yarnpkg.com/datatables.net-dt/-/datatables.net-dt-1.11.4.tgz#abdc672c2250f9486db16aa874fb060d80eab7a4"
integrity sha512-MKPAkehqxqZN1tMrqPH2t3jhv1VG69wq3JLFmsJn/Kd4Oez/WYP+q1XTeMopwhGM7pSVQLPo4pPVPmzw7cqY2g==
dependencies:
datatables.net ">=1.11.3"
jquery ">=1.7"
datatables.net@>=1.11.3:
version "1.11.4"
resolved "https://registry.yarnpkg.com/datatables.net/-/datatables.net-1.11.4.tgz#5f3e1ec134fa532e794fbd47c13f8333d7a5c455"
integrity sha512-z9LG4O0VYOYzp+rnArLExvnUWV8ikyWBcHYZEKDfVuz7BKxQdEq4a/tpO0Trbm+FL1+RY7UEIh+UcYNY/hwGxA==
dependencies:
jquery ">=1.7"
debug@2.6.9, debug@^2.2.0:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@ -3749,7 +3734,7 @@ jquery.typewatch@^3.0.0:
resolved "https://registry.yarnpkg.com/jquery.typewatch/-/jquery.typewatch-3.0.1.tgz#931fc87db04406da55bed3770b1058b6b01ce10e"
integrity sha512-meKluf7/PjFyxqiY4UJfAHHzhW9MfwnWXhBXItB981ffUc3zDx80r6CRiu26xHrFQ4D6InKHqbcizJhb4lLdVA==
jquery@>=1.7, jquery@^3.2:
jquery@^3.2:
version "3.6.0"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470"
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==

Loading…
Cancel
Save