From 57c82d830d04cfc930bcc62bd886b9a96fb57164 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Wed, 1 Aug 2018 18:35:13 -0700 Subject: if no syndication targets are found, hide the section add syndication reload button to the settings screen --- views/settings.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'views/settings.php') diff --git a/views/settings.php b/views/settings.php index 247aaf6..be32df8 100644 --- a/views/settings.php +++ b/views/settings.php @@ -50,11 +50,39 @@ +

Syndication Targets

+ +
+ +
+ syndication_targets) { + echo '
    '; + foreach($this->syndication_targets as $syn) { + echo '
  • ' + . '' + . '
  • '; + } + echo '
'; + } else { + ?>
No syndication targets were found on your site. + Your server can provide a list of supported syndication targets that will appear as checkboxes here.
+
+
+ + +

Twitter

Connecting a Twitter account will automatically "favorite" and "retweet" tweets on Twitter when you favorite and retweet a Twitter URL in Quill.

+

Backwards Compatibility

You can customize some of the properties that are sent in the Micropub request to work with your specific endpoint.

@@ -139,5 +167,25 @@ $(function(){ }); }); + + }); + +function reload_syndications() { + $.getJSON("/micropub/syndications", function(data){ + if(data.targets) { + $("#syndication-container").html(''); + for(var i in data.targets) { + var target = data.targets[i].target; + var uid = data.targets[i].uid; + var favicon = data.targets[i].favicon; + $("#syndication-container ul").append('
  • '); + } + bind_syndication_buttons(); + } else { + + } + console.log(data); + }); +} -- cgit v1.2.3