]> git.mxchange.org Git - friendica.git/commitdiff
dynamic group edit buttons
authorfriendica <info@friendica.com>
Fri, 2 Dec 2011 00:33:53 +0000 (16:33 -0800)
committerfriendica <info@friendica.com>
Fri, 2 Dec 2011 00:33:53 +0000 (16:33 -0800)
boot.php
include/group.php
view/theme/duepuntozero/group_side.tpl
view/theme/duepuntozero/style.css
view/theme/duepuntozero/theme.php

index 50cfbf66168755f96742ee5a2e2e29aea4a665fe..2ab1f560b95b87ede7bad4c97ac46cf259f8b366 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -9,7 +9,7 @@ require_once('include/nav.php');
 require_once('include/cache.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
-define ( 'FRIENDICA_VERSION',      '2.3.1181' );
+define ( 'FRIENDICA_VERSION',      '2.3.1182' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
 define ( 'DB_UPDATE_VERSION',      1107      );
 
index 82cdc554f0de3be3578e8c615d608b7b044304d9..4a35912e5d288d126770ffe9dbee351e4a7fc71e 100644 (file)
@@ -210,6 +210,7 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0
        $tpl = get_markup_template("group_side.tpl");
        $o = replace_macros($tpl, array(
                '$title'                => t('Groups'),
+               '$edittext'     => t('Edit group'),
                '$createtext'   => t('Create a new group'),
                '$groups'               => $groups,
                '$add'                  => t('add'),
index 8c44645605e319ccb0502750beb63082167d45c8..0353b1d2ccf464713c5cba3e3a45577e273d7ea4 100644 (file)
@@ -13,7 +13,7 @@
                                        />
                                {{ endif }}                     
                                {{ if $group.edit }}
-                                       <a class="groupsideedit" href="$group.edit.href"><span id="group-side-editicon-$group.id" class="icon small-pencil"></span></a>
+                                       <a class="groupsideedit" href="$group.edit.href" title="$edittext"><span id="edit-sidebar-group-element-$group.id" class="group-edit-icon iconspacer small-pencil"></span></a>
                                {{ endif }}
                                <a id="sidebar-group-element-$group.id" class="sidebar-group-element {{ if $group.selected }}group-selected{{ endif }}" href="$group.href">$group.text</a>
                        </li>
index 0f9999c3e58e9552e33913ecccdb4c91fad45148..bc6cc84501b0e036c5d8e20b5558412854736afe 100644 (file)
@@ -1792,7 +1792,7 @@ a.mail-list-link {
        list-style-type: none;
 }
 
-#sidebar-group-list .icon {
+#sidebar-group-list .icon, #sidebar-group-list .iconspacer {
        display: inline-block;
        height: 12px;
        width: 12px;
@@ -2766,6 +2766,10 @@ aside input[type='text'] {
 /**
  * ICONS
  */
+.iconspacer {
+       display: block; width: 16px; height: 16px;
+}
+
 .icon {
        display: block; width: 16px; height: 16px;
        background-image: url('../../../images/icons.png');
index ebced7b9b84ebfd875a7ae14117102dae2e938ad..3e55b658a7adb22b7b661abacf6f72a2889e7e98 100644 (file)
@@ -1,2 +1,26 @@
 <?php
 $a->theme_info = array();
+
+$a->page['htmlhead'] .= <<< EOT
+<script>
+$(document).ready(function() {
+
+$('.group-edit-icon').hover(
+       function() {
+               $(this).addClass('icon'); $(this).removeClass('iconspacer');},
+       function() {
+               $(this).removeClass('icon'); $(this).addClass('iconspacer');}
+       );
+
+$('.sidebar-group-element').hover(
+       function() {
+               id = $(this).attr('id');
+               $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
+
+       function() {
+               id = $(this).attr('id');
+               $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
+       );
+});
+</script>
+EOT;