-
Notifications
You must be signed in to change notification settings - Fork 0
/
plxQuickSearch.php
executable file
·52 lines (50 loc) · 1.57 KB
/
plxQuickSearch.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* Plugin QuickSearch
*
* @package PLX
* @version 1.2
* @date 12/04/2013
* @author i M@N
**/
class plxQuickSearch extends plxPlugin {
public function __construct($default_lang) {
# Appel du constructeur de la classe plxPlugin (obligatoire)
parent::__construct($default_lang);
# Déclaration des hooks
$this->addHook('AdminMediasQuickSearch', 'AdminMediasQuickSearch');
}
public function AdminMediasQuickSearch() {
echo '
<input type="text" id="qs" placeholder="'.$this->getLang('L_RECHERCHER').'" />
<script type="text/javascript">
/* <![CDATA[ */
!window.jQuery && document.write(\'<script type="text/javascript" src="<?php echo PLX_PLUGINS;?>jquery/jquery.min.js"><\/script>\');
/* !]]> */
</script>
<script type="text/javascript" src="'.PLX_PLUGINS.'plxQuickSearch/jquery.quicksearch.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(\'table.table\').attr({\'id\': \'quicksearch\'});
$(\'th.checkbox input:checkbox\').attr({\'id\': \'checkall\'});
$(\'input#qs\').quicksearch(\'table#quicksearch tbody tr\', {
// \'delay\': 100,
\'show\': function () {
$(\'tr.qsd td input:checkbox\').attr({\'name\': \'idFile[]\',\'checked\': false});
$(this).removeClass(\'qsd\').addClass(\'qse\');
$(\'input#checkall:checkbox\').attr({\'checked\': false});
$(this).show();
},
\'hide\': function () {
$(this).removeClass(\'qse\').addClass(\'qsd\');
$(\'tr.qsd td input:checkbox\').attr({\'name\': \'disabled\',\'checked\': false});
$(\'input#checkall:checkbox\').attr({\'checked\': false});
$(this).hide();
},
});
});
</script>
';
}
}
?>