diff options
Diffstat (limited to 'views/admin/module.phtml')
| -rw-r--r-- | views/admin/module.phtml | 87 |
1 files changed, 69 insertions, 18 deletions
diff --git a/views/admin/module.phtml b/views/admin/module.phtml index a0a3a0c..9acd05c 100644 --- a/views/admin/module.phtml +++ b/views/admin/module.phtml @@ -8,12 +8,20 @@ ?>
<div class="wpsg_admin_submenu">
+ <div class="wpsg_modul_search_wrap">
+ <input id="wpsg_modul_search" type="text" class="wpsg_modul_search" value="<?php echo wpsg_getStr($_COOKIE['wpsg-modulfilter-search']); ?>" />
+ <label title="<?php echo __('Wenn aktiviert, werden nur aktive Module angezeigt'); ?>">
+ <input type="checkbox" <?php echo ((wpsg_isSizedString($_COOKIE['wpsg-modulfilter-check'], 'true'))?'checked="checked"':''); ?> id="wpsg_modul_onlyactive" class="wpsg_modul_onlyactive" />
+ <span class="glyphicon glyphicon-ok wpsg_modul_onlyactive_glyphicon" aria-hidden="true"></span>
+ </label>
+ </div>
+
<?php foreach ($this->view['groups'] as $group_name => $g) { ?>
- <div class="list-group">
- <span class="list-group-head list-group-item"><?php echo $group_name; ?></span>
+ <div class="list-group list-modul-group">
+ <span class="list-group-item list-group-head"><?php echo $group_name; ?></span>
<?php foreach ($g as $mod_key => $m) { ?>
- <a class="<?php echo (($this->get_option($mod_key, $this->view['global']) > 0)?'modul_akt':''); ?> list-group-item <?php echo (($mod_key == $_REQUEST['modul'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=<?php echo $mod_key; ?>">
- <?php echo $m->name; ?>
+ <a class="<?php echo (($this->get_option($mod_key, $this->view['global']) > 0)?'modul_akt':''); ?> list-group-modul list-group-item <?php echo (($mod_key == $_REQUEST['modul'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=<?php echo $mod_key; ?>">
+ <span class="wpsg_modul_name"><?php echo $m->name; ?></span>
<?php if (($this->get_option($mod_key, $this->view['global']) > 0)?'modul_akt':'') { ?>
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
<?php } ?>
@@ -25,7 +33,7 @@ </div>
<?php if (isset($_REQUEST['modul'])) { ?>
-<div class="wpsg_admin_content">
+<div class="wpsg_admin_content form-horizontal">
<form name="form1" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=<?php echo $_REQUEST['modul']; ?>&noheader=1" method="post" enctype="multipart/form-data">
<h3>
@@ -37,19 +45,9 @@ <p><?php echo $this->arAllModule[$_REQUEST['modul']]->desc; ?></p>
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __("Modul aktiviert", "wpsg"); ?>:
- </div>
- <div class="wpsg_form_right">
- <select name="aktiv">
- <option value="0"><?php echo __('Nein', 'wpsg'); ?></option>
- <option value="1" <?php echo (($this->get_option($_REQUEST['modul'], $this->view['global']) > 0)?'selected="selected"':''); ?>><?php echo __('Ja', 'wpsg'); ?></option>
- </select>
- </div>
- <div class="wpsg_clear"></div>
- </div>
-
+ <?php $modul_install = $this->get_option($_REQUEST['modul'], $this->view['global']); ?>
+ <?php echo wpsg_drawForm_Select('aktiv', __('Modul aktiviert', 'wpsg'), array('0' => __('Nein', 'wpsg'), '1' => __('Ja', 'wpsg')), ((wpsg_isSizedInt($modul_install))?'1':'0')); ?>
+
<?php if (isset($this->arAllModule[$_REQUEST['modul']]->version)) { ?>
<?php echo wpsg_drawForm_Input('', __('Version', 'wpsg'), $this->arAllModule[$_REQUEST['modul']]->version, array('text' => true)); ?>
<div class="wpsg_form_field">
@@ -128,10 +126,63 @@ <script type="text/javascript">/* <![CDATA[ */
+ function wpsg_ssh_module()
+ {
+
+ jQuery('.list-modul-group').show();
+ jQuery('.wpsg_admin_submenu .list-group-item').show();
+
+ var check = jQuery('#wpsg_modul_onlyactive').prop('checked');
+ var search = jQuery('#wpsg_modul_search').val();
+
+ jQuery.cookie('wpsg-modulfilter-check', check);
+ jQuery.cookie('wpsg-modulfilter-search', search);
+
+ jQuery('.wpsg_modul_name').each(function() {
+
+ if (!jQuery(this).parent().hasClass('active'))
+ {
+
+ if (check && !jQuery(this).parent().hasClass('modul_akt')) jQuery(this).parent().hide();
+ else if (search != '')
+ {
+
+ var re = new RegExp(search, 'i');
+
+ if (!jQuery(this).html().match(re)) jQuery(this).parent().hide();
+ else jQuery(this).parent().show();
+
+ }
+
+ }
+
+ } );
+
+ jQuery('.list-modul-group').each(function() {
+
+ if (jQuery(this).find('.list-group-modul:visible').length <= 0) jQuery(this).hide();
+ else jQuery(this).show();
+
+ } );
+
+ }
+
jQuery(document).ready(function() {
+ jQuery('#wpsg_modul_onlyactive').bind('change', function(event) {
+
+ wpsg_ssh_module();
+ jQuery(this).blur();
+
+ } );
+
+ jQuery('#wpsg_modul_search').focus().bind('blur', wpsg_ssh_module);
+ jQuery('#wpsg_modul_search').focus().bind('keyup', wpsg_ssh_module);
+
jQuery('.wpsg_form_help').tipTip();
+ wpsg_ssh_module();
+
} );
/* ]]> */</script>
\ No newline at end of file |
