summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/pkg_mgr.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-10-21 10:38:05 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-10-21 10:38:05 -0400
commit6c36aab34e78de99cac971c625e2bc36a02821de (patch)
treea83b1e6cf335fa0880ba94ec6128457a3e862cb0 /src/usr/local/www/pkg_mgr.php
parent98dfca1878f94d528ab8ee44663f6c601c953bb7 (diff)
downloadpfsense-6c36aab34e78de99cac971c625e2bc36a02821de.zip
pfsense-6c36aab34e78de99cac971c625e2bc36a02821de.tar.gz
Change '+' icon to '-' when panel is open
Diffstat (limited to 'src/usr/local/www/pkg_mgr.php')
-rw-r--r--src/usr/local/www/pkg_mgr.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php
index 5889099..cb04b1f 100644
--- a/src/usr/local/www/pkg_mgr.php
+++ b/src/usr/local/www/pkg_mgr.php
@@ -221,7 +221,7 @@ endif;
<?=$index['desc']?>
</td>
<td>
- <a title="<?=gettext("Click to install")?>" href="pkg_mgr_install.php?id=<?=$index['name']?>" class="btn btn-success btn-sm">install</a>
+ <a title="<?=gettext("Click to install")?>" href="pkg_mgr_install.php?id=<?=$index['name']?>" class="btn btn-success btn-sm">install</a>
<?php if(!$g['disablepackageinfo'] && $index['pkginfolink'] && $index['pkginfolink'] != $index['www']):?>
<a target="_blank" title="<?=gettext("View more information")?>" href="<?=htmlspecialchars($index['pkginfolink'])?>" class="btn btn-default btn-sm">info</a>
<?php endif;?>
@@ -240,6 +240,20 @@ endif;?>
events.push(function(){
$("#btnsearch").prop('type' ,'button');
+ // Initial state & toggle icons of collapsed panel
+ $('.panel-heading a[data-toggle="collapse"]').each(function (idx, el){
+ var body = $(el).parents('.panel').children('.panel-body')
+ var isOpen = body.hasClass('in');
+
+ $(el).children('i').toggleClass('icon-plus-sign', !isOpen);
+ $(el).children('i').toggleClass('icon-minus-sign', isOpen);
+
+ body.on('shown.bs.collapse', function(){
+ $(el).children('i').toggleClass('icon-minus-sign', true);
+ $(el).children('i').toggleClass('icon-plus-sign', false);
+ });
+ });
+
$("#btnsearch").click(function() {
alert("Sorry, this is not yet functional.\n\n\"" + $("#searchstr").val() + "\" may exist, or it may not!");
});
@@ -247,4 +261,4 @@ events.push(function(){
//]]>
</script>
-<?php include("foot.inc")?>
+<?php include("foot.inc");
OpenPOWER on IntegriCloud