Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
61427307
Commit
61427307
authored
Mar 27, 2013
by
Jerome Mariette
Browse files
fixe a bug with datatable
parent
67f4614a
Changes
2
Hide whitespace changes
Inline
Side-by-side
ui/nG6/pi1/class.tx_nG6_pi1.php
View file @
61427307
...
...
@@ -73,12 +73,9 @@ class tx_nG6_pi1 extends tslib_pibase {
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/jquery.ui.resizable.min.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/jquery.bgiframe.min.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/jquery.dataTables.plugins.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/DT_bootstrap.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/bootstrap-editable.min.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/jquery.datePicker.min.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/jquery.url.packed.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/jquery.venny.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/tx_nG6_pi1.js"></script>
...
...
@@ -90,14 +87,13 @@ class tx_nG6_pi1 extends tslib_pibase {
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/unitip.js"></script>
<script type="text/javascript" src="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/js/tx_nG6_table.js"></script>
<script type="text/javascript" src="typo3/md5.js"></script>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/css/unitip.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/css/bootstrap-responsive.min.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/css/DT_bootstrap.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/css/bootstrap-editable.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/css/datepicker.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/css/jquery.venny.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/css/tx_nG6.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'
.
t3lib_extMgm
::
siteRelPath
(
$this
->
extKey
)
.
'res/css/jquery.ui.core.css"/>
...
...
ui/nG6/res/js/jquery.dataTables.plugins.js
deleted
100644 → 0
View file @
67f4614a
/***************************************************************
* Copyright notice
*
* (c) 2009 PF bioinformatique de Toulouse <>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
jQuery
.
fn
.
dataTableExt
.
oSort
[
'
date-asc
'
]
=
function
(
a
,
b
)
{
var
ukDatea
=
a
.
split
(
'
-
'
);
var
ukDateb
=
b
.
split
(
'
-
'
);
var
x
=
(
ukDatea
[
2
]
+
ukDatea
[
1
]
+
ukDatea
[
0
])
*
1
;
var
y
=
(
ukDateb
[
2
]
+
ukDateb
[
1
]
+
ukDateb
[
0
])
*
1
;
return
((
x
<
y
)
?
-
1
:
((
x
>
y
)
?
1
:
0
));
};
jQuery
.
fn
.
dataTableExt
.
oSort
[
'
date-desc
'
]
=
function
(
a
,
b
)
{
var
ukDatea
=
a
.
split
(
'
-
'
);
var
ukDateb
=
b
.
split
(
'
-
'
);
var
x
=
(
ukDatea
[
2
]
+
ukDatea
[
1
]
+
ukDatea
[
0
])
*
1
;
var
y
=
(
ukDateb
[
2
]
+
ukDateb
[
1
]
+
ukDateb
[
0
])
*
1
;
return
((
x
<
y
)
?
1
:
((
x
>
y
)
?
-
1
:
0
));
};
jQuery
.
fn
.
dataTableExt
.
oSort
[
'
formatted-num-asc
'
]
=
function
(
x
,
y
){
x
=
x
.
replace
(
/
[^\d\-\.\/]
/g
,
''
);
y
=
y
.
replace
(
/
[^\d\-\.\/]
/g
,
''
);
if
(
x
.
indexOf
(
'
/
'
)
>=
0
)
x
=
eval
(
x
);
if
(
y
.
indexOf
(
'
/
'
)
>=
0
)
y
=
eval
(
y
);
return
x
/
1
-
y
/
1
;
}
jQuery
.
fn
.
dataTableExt
.
oSort
[
'
formatted-num-desc
'
]
=
function
(
x
,
y
){
x
=
x
.
replace
(
/
[^\d\-\.\/]
/g
,
''
);
y
=
y
.
replace
(
/
[^\d\-\.\/]
/g
,
''
);
if
(
x
.
indexOf
(
'
/
'
)
>=
0
)
x
=
eval
(
x
);
if
(
y
.
indexOf
(
'
/
'
)
>=
0
)
y
=
eval
(
y
);
return
y
/
1
-
x
/
1
;
}
/*
$.fn.dataTableExt.oPagination.input = {
"fnInit": function ( oSettings, nPaging, fnCallbackDraw ) {
var nFirst = document.createElement( 'span' );
var nPrevious = document.createElement( 'span' );
var nNext = document.createElement( 'span' );
var nLast = document.createElement( 'span' );
var nInput = document.createElement( 'input' );
var nPage = document.createElement( 'span' );
var nOf = document.createElement( 'span' );
nFirst.innerHTML = oSettings.oLanguage.oPaginate.sFirst;
nPrevious.innerHTML = oSettings.oLanguage.oPaginate.sPrevious;
nNext.innerHTML = oSettings.oLanguage.oPaginate.sNext;
nLast.innerHTML = oSettings.oLanguage.oPaginate.sLast;
nFirst.className = "paginate_button first";
nPrevious.className = "paginate_button previous";
nNext.className="paginate_button next";
nLast.className = "paginate_button last";
nOf.className = "paginate_of";
nPage.className = "paginate_page";
if ( oSettings.sTableId !== '' )
{
nPaging.setAttribute( 'id', oSettings.sTableId+'_paginate' );
nPrevious.setAttribute( 'id', oSettings.sTableId+'_previous' );
nPrevious.setAttribute( 'id', oSettings.sTableId+'_previous' );
nNext.setAttribute( 'id', oSettings.sTableId+'_next' );
nLast.setAttribute( 'id', oSettings.sTableId+'_last' );
}
nInput.type = "text";
nInput.style.width = "15px";
nInput.style.display = "inline";
nPage.innerHTML = "Page ";
nPaging.appendChild( nFirst );
nPaging.appendChild( nPrevious );
nPaging.appendChild( nPage );
nPaging.appendChild( nInput );
nPaging.appendChild( nOf );
nPaging.appendChild( nNext );
nPaging.appendChild( nLast );
$(nFirst).click( function () {
oSettings.oApi._fnPageChange( oSettings, "first" );
fnCallbackDraw( oSettings );
} );
$(nPrevious).click( function() {
oSettings.oApi._fnPageChange( oSettings, "previous" );
fnCallbackDraw( oSettings );
} );
$(nNext).click( function() {
oSettings.oApi._fnPageChange( oSettings, "next" );
fnCallbackDraw( oSettings );
} );
$(nLast).click( function() {
oSettings.oApi._fnPageChange( oSettings, "last" );
fnCallbackDraw( oSettings );
} );
$(nInput).keyup( function (e) {
if ( e.which == 38 || e.which == 39 )
{
this.value++;
}
else if ( (e.which == 37 || e.which == 40) && this.value > 1 )
{
this.value--;
}
if ( this.value == "" || this.value.match(/[^0-9]/) )
{
// Nothing entered or non-numeric character
return;
}
var iNewStart = oSettings._iDisplayLength * (this.value - 1);
if ( iNewStart > oSettings.fnRecordsDisplay() )
{
// Display overrun
oSettings._iDisplayStart = (Math.ceil((oSettings.fnRecordsDisplay()-1) /
oSettings._iDisplayLength)-1) * oSettings._iDisplayLength;
fnCallbackDraw( oSettings );
return;
}
oSettings._iDisplayStart = iNewStart;
fnCallbackDraw( oSettings );
} );
// Take the brutal approach to cancelling text selection
$('span', nPaging).bind( 'mousedown', function () { return false; } );
$('span', nPaging).bind( 'selectstart', function () { return false; } );
},
"fnUpdate": function ( oSettings, fnCallbackDraw )
{
if ( !oSettings.aanFeatures.p )
{
return;
}
var iPages = Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength);
var iCurrentPage = Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength) + 1;
// Loop over each instance of the pager
var an = oSettings.aanFeatures.p;
for ( var i=0, iLen=an.length ; i<iLen ; i++ )
{
var spans = an[i].getElementsByTagName('span');
var inputs = an[i].getElementsByTagName('input');
spans[3].innerHTML = " of "+iPages
inputs[0].value = iCurrentPage;
}
}
}
*/
\ No newline at end of file
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