aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Follow.php2
-rw-r--r--Zotlabs/Module/Settings/Featured.php19
-rw-r--r--include/conversation.php6
-rw-r--r--include/text.php6
-rw-r--r--view/js/main.js6
-rw-r--r--view/tpl/generic_addon_settings.tpl4
6 files changed, 36 insertions, 7 deletions
diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php
index 04ac746cb..146c4e564 100644
--- a/Zotlabs/Module/Follow.php
+++ b/Zotlabs/Module/Follow.php
@@ -33,7 +33,7 @@ class Follow extends \Zotlabs\Web\Controller {
}
}
- info( t('Channel added.') . EOL);
+ info( t('Connection added.') . EOL);
$clone = array();
foreach($result['abook'] as $k => $v) {
diff --git a/Zotlabs/Module/Settings/Featured.php b/Zotlabs/Module/Settings/Featured.php
index 1da139206..542a05363 100644
--- a/Zotlabs/Module/Settings/Featured.php
+++ b/Zotlabs/Module/Settings/Featured.php
@@ -57,7 +57,10 @@ class Featured {
}
call_hooks('feature_settings', $settings_addons);
-
+
+ $this->sortpanels($settings_addons);
+
+
$tpl = get_markup_template("settings_addons.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_featured"),
@@ -67,5 +70,15 @@ class Featured {
));
return $o;
}
-
-} \ No newline at end of file
+
+ function sortpanels(&$s) {
+ $a = explode('<div class="panel">',$s);
+ if($a) {
+ usort($a,'featured_sort');
+ $s = implode('<div class="panel">',$a);
+ }
+ }
+
+}
+
+
diff --git a/include/conversation.php b/include/conversation.php
index 0bb9c769a..6374267eb 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1005,7 +1005,7 @@ function thread_author_menu($item, $mode = '') {
$contact = App::$contacts[$item['author_xchan']];
else
if($local_channel && $item['author']['xchan_addr'])
- $follow_url = z_root() . '/follow/?f=&url=' . urlencode($item['author']['xchan_addr']);
+ $follow_url = z_root() . '/follow/?f=&url=' . urlencode($item['author']['xchan_addr']) . '&interactive=0';
if($item['uid'] > 0 && author_is_pmable($item['author'],$contact)) {
@@ -1051,8 +1051,8 @@ function thread_author_menu($item, $mode = '') {
'menu' => 'follow',
'title' => t('Connect'),
'icon' => 'fw',
- 'action' => '',
- 'href' => $follow_url
+ 'action' => 'doFollowAuthor(\'' . $follow_url . '\'); return false;',
+ 'href' => '#',
];
}
diff --git a/include/text.php b/include/text.php
index c82fad517..6675043e6 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3311,4 +3311,10 @@ function purify_filename($s) {
return $s;
}
+// callback for sorting the settings/featured entries.
+function featured_sort($a,$b) {
+ $s1 = substr($a,strpos($a,'id='),20);
+ $s2 = substr($b,strpos($b,'id='),20);
+ return(strcmp($s1,$s2));
+}
diff --git a/view/js/main.js b/view/js/main.js
index f6fe475d8..98a756fff 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -304,6 +304,12 @@ function insertCommentURL(comment, id) {
return true;
}
+function doFollowAuthor(url) {
+ $.get(url, function(data) { notificationsUpdate(); });
+ return true;
+}
+
+
function viewsrc(id) {
$.colorbox({href: 'viewsrc/' + id, maxWidth: '80%', maxHeight: '80%' });
}
diff --git a/view/tpl/generic_addon_settings.tpl b/view/tpl/generic_addon_settings.tpl
index 57028237a..875c97feb 100644
--- a/view/tpl/generic_addon_settings.tpl
+++ b/view/tpl/generic_addon_settings.tpl
@@ -2,7 +2,11 @@
<div class="section-subtitle-wrapper" role="tab" id="{{$addon.0}}-settings">
<h3>
<a title="{{$addon.2}}" data-toggle="collapse" data-target="#{{$addon.0}}-settings-content" href="#" aria-controls="{{$addon.0}}-settings-content">
+ {{if $addon.1|substr:0:1 === '<'}}
{{$addon.1}}
+ {{else}}
+ <i class="fa fa-gear"></i> {{$addon.1}}
+ {{/if}}
</a>
</h3>
</div>