Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
2
2020-03-03 itmax-84
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Playground
2020-03-03 itmax-84
Commits
d18ce08d
Commit
d18ce08d
authored
Mar 02, 2020
by
Michael Galon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added table-design
parent
91ec26a1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
272 additions
and
1 deletion
+272
-1
datatable.css
public/limitless/Template/global_assets/css/datatable.css
+47
-0
datatable.js
public/limitless/Template/global_assets/js/datatable.js
+149
-0
welcome.blade.php
resources/views/welcome.blade.php
+55
-0
web.php
routes/web.php
+21
-1
No files found.
public/limitless/Template/global_assets/css/datatable.css
0 → 100644
View file @
d18ce08d
.table.dataTable.no-footer
{
border
:
0px
!important
;
}
.DatatableSearch
{
border
:
1px
solid
#888888
;
}
.DatatableFilter
{
border
:
1px
solid
#888888
;
margin
:
5px
;
}
.dataTable
tbody
td
{
padding
:
5px
5px
!important
;
vertical-align
:
middle
;
font-size
:
12px
;
text-align
:
center
;
}
.dataTable
thead
th
{
white-space
:
nowrap
;
background-color
:
#29363d
;
color
:
#ffffff
;
border
:
1px
solid
#29363d
;
border-bottom
:
0px
!important
;
text-align
:
center
;
font-size
:
12px
;
}
.dataTable
{
border-collapse
:
collapse
!important
;
}
.c8tableBody
{
width
:
100%
;
overflow-x
:
auto
;
}
.DatatableFader
{
opacity
:
0
;
overflow-y
:
hidden
;
}
.PhoenixTable
{
display
:
none
;
}
public/limitless/Template/global_assets/js/datatable.js
0 → 100644
View file @
d18ce08d
// define function
function
phoenix_init_datatable
()
{
// counter for datatables
var
DatatableCounter
=
0
;
// scann for each datatable
$
(
'
.PhoenixTable
'
).
each
(
function
()
{
// count table
DatatableCounter
++
;
// loading bar
$
(
this
).
before
(
'
<div id="DatatableLoader
'
+
DatatableCounter
+
'
"><br/><center><b>[ LADE DATEN... ]</b></center><br/></div>
'
);
});
setTimeout
(
function
()
{
// reset counter for datatables
var
DatatableCounter
=
0
;
// scann for each datatable
$
(
'
.PhoenixTable
'
).
each
(
function
()
{
// count table
DatatableCounter
++
;
// create replacement
var
NewHtml
=
''
+
'
<div id="DatatableFader
'
+
DatatableCounter
+
'
" class="DatatableFader" style="height:0px;">
'
+
'
<table id="Datatable
'
+
DatatableCounter
+
'
" class="display table table-striped table-bordered datatable">
'
+
$
(
this
).
html
()
+
'
</table>
'
+
'
</div>
'
;
// transport code to html
$
(
this
).
replaceWith
(
NewHtml
);
// render setup parameter
var
counter
=
0
;
var
sort
=
[];
var
orderable
=
[];
$
(
'
#Datatable
'
+
DatatableCounter
).
find
(
'
th
'
).
each
(
function
()
{
// define sort
if
(
$
(
this
).
attr
(
'
Sort
'
)
!=
undefined
)
{
sort
=
[
[
counter
,
$
(
this
).
attr
(
'
Sort
'
)]
];
}
// orderable
if
(
$
(
this
).
attr
(
'
Sortable
'
)
==
"
false
"
)
{
orderable
.
push
({
"
orderable
"
:
false
,
"
targets
"
:
counter
});
}
// searchable
if
(
$
(
this
).
attr
(
'
Serachable
'
)
!=
"
true
"
)
{
orderable
.
push
({
"
searchable
"
:
false
,
"
targets
"
:
counter
});
}
// counter
counter
++
;
});
// rows
var
rows
=
$
(
this
).
attr
(
'
rows
'
);
if
(
rows
==
undefined
)
{
rows
=
10
;
}
// check entry count
if
(
$
(
'
#Datatable
'
+
DatatableCounter
).
children
(
'
tbody
'
).
children
(
'
tr
'
).
length
>
rows
)
{
var
Complex
=
true
;
}
else
{
var
Complex
=
false
;
}
// activate datatable
$
(
'
#Datatable
'
+
DatatableCounter
).
dataTable
({
'
dom
'
:
'
<"c8tableTools01"Bf><"c8tableBody"t><"c8tableTools02"lipr>
'
,
"
fixedHeader
"
:
true
,
'
autoWidth
'
:
true
,
'
pageLength
'
:
parseInt
(
rows
),
"
order
"
:
sort
,
"
paging
"
:
Complex
,
"
searching
"
:
Complex
,
"
info
"
:
Complex
,
"
columnDefs
"
:
orderable
,
"
language
"
:
{
"
url
"
:
"
//cdn.datatables.net/plug-ins/1.10.19/i18n/German.json
"
},
"
lengthMenu
"
:
[
[
rows
,
10
,
25
,
50
,
100
,
500
,
-
1
],
[
'
Standard (
'
+
rows
+
'
)
'
,
10
,
25
,
50
,
100
,
500
,
"
Alle
"
]
],
"
drawCallback
"
:
function
(
settings
)
{
// calculate height for animation
var
height
=
$
(
'
#
'
+
settings
.
sTableId
).
parents
(
'
.dataTables_wrapper
'
).
first
().
height
()
+
10
;
// add classes to filter and select dropdown
$
(
'
.dataTables_filter input
'
).
addClass
(
'
DatatableSearch
'
);
$
(
'
.dataTables_length label select
'
).
addClass
(
'
DatatableFilter
'
);
$
(
'
.dataTables_info
'
).
addClass
(
'
d-none d-lg-block d-md-block
'
);
$
(
'
.dataTables_length
'
).
addClass
(
'
d-none d-lg-block d-md-block
'
);
// get int from callback
var
callbbackid
=
settings
.
sTableId
.
replace
(
/
[^\d
.
]
/g
,
''
);
// remove loader
$
(
'
#DatatableLoader
'
+
callbbackid
).
remove
();
// break after inti
if
(
$
(
'
#DatatableFader
'
+
callbbackid
).
css
(
"
opacity
"
)
==
1
)
{
return
false
;
}
// scale up table
$
(
'
#DatatableFader
'
+
callbbackid
).
animate
({
'
opacity
'
:
'
1
'
,
'
min-height
'
:
height
},
300
,
function
()
{
// fix height for responsible design
$
(
'
#DatatableFader
'
+
callbbackid
).
css
(
"
height
"
,
"
auto
"
);
$
(
'
#DatatableFader
'
+
callbbackid
).
css
(
"
min-height
"
,
"
auto
"
);
// confirmation
phoenix_init_confirmation
();
});
}
});
});
},
300
);
}
$
(
document
).
ready
(
phoenix_init_datatable
);
resources/views/welcome.blade.php
0 → 100644
View file @
d18ce08d
{{
--
Master
--
}}
@
extends
(
'limitless::master'
)
{{
--
Basics
--
}}
@
section
(
'limitless::title'
,
'Limitless Design'
)
@
section
(
'limitless::titleurl'
,
'https://google.de'
)
@
section
(
'limitless::language'
,
'en'
)
@
section
(
'limitless::largelogo'
,
'https://cdn.backoffice.online/limitless/Template/global_assets/images/logo_light.png'
)
@
section
(
'limitless::smalllogo'
,
'https://cdn.backoffice.online/limitless/Template/global_assets/images/logo_icon_light.png'
)
@
section
(
'limitless::mobilelogo'
,
'https://cdn.backoffice.online/limitless/Template/global_assets/images/logo_dark.png'
)
{{
--
Assets
--
}}
@
section
(
'limitless::assets'
)
{{
--
Javascript
--
}}
<
script
src
=
"@limitless::publish( base_path().'/resources/views/example/example.js' )"
></
script
>
{{
--
Stylesheet
--
}}
<
link
rel
=
"stylesheet"
href
=
"@limitless::publish( base_path().'/resources/views/example/example.css' )"
>
{{
--
Inline
--
}}
<
script
>
console
.
log
(
'Add some custom javascript here...'
);
</
script
>
@
endsection
{{
--
Content
--
}}
@
section
(
'limitless::content'
)
{{
--
Table
Design
--
}}
@
limitless
::
table
<
thead
>
{{
--
Define
header
Here
--
}}
<
tr
>
<
th
Sortable
=
"false"
>
ID
</
th
>
<
th
Serachable
=
"true"
>
First
Name
</
th
>
<
th
Serachable
=
"true"
>
Last
Name
</
th
>
<
th
Sort
=
"desc"
>
Email
</
th
>
</
tr
>
</
thead
>
<
tbody
>
{{
--
Loop
into
your
rows
here
--
}}
@
foreach
(
$users
as
$key
=>
$user
)
<
tr
>
<
td
>
{{
$user
[
'id'
]
??
''
}}
</
td
>
<
td
>
{{
$user
[
'first_name'
]
??
''
}}
</
td
>
<
td
>
{{
$user
[
'last_name'
]
??
''
}}
</
td
>
<
td
>
{{
$user
[
'email'
]
??
''
}}
</
td
>
</
tr
>
@
endforeach
</
tbody
>
@
limitless
::
endtable
@
endsection
routes/web.php
View file @
d18ce08d
...
...
@@ -13,5 +13,25 @@
Route
::
get
(
'/'
,
function
()
{
echo
"Hello World"
;
$users
=
[
[
'id'
=>
1
,
'first_name'
=>
'Marco'
,
'last_name'
=>
'Schmiedel'
,
'email'
=>
'schmiedel@itmax.email'
,
],
[
'id'
=>
2
,
'first_name'
=>
'Antonio'
,
'last_name'
=>
'Norato'
,
'email'
=>
'norato@itmax.email'
,
],
[
'id'
=>
3
,
'first_name'
=>
'Mike'
,
'last_name'
=>
'Galon'
,
'email'
=>
'michael.galon@itmax.email'
,
],
];
return
view
(
'welcome'
,
compact
(
'users'
));
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment