diff options
author | Aaron Parecki <aaron@parecki.com> | 2016-04-21 19:34:22 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2016-04-21 19:34:22 -0700 |
commit | 3f61541094fb0c6836a6b3afaea58d7bead9ade9 (patch) | |
tree | 1083c8b0cc77aa4b7ee0015963d386f2a777f12a /views/new-post.php | |
parent | bd97d362c7702329e453b7c10586900ee06b728e (diff) |
accept new json q=syndicate-to response
closes #36
Diffstat (limited to 'views/new-post.php')
-rw-r--r-- | views/new-post.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/views/new-post.php b/views/new-post.php index be5dafb..2c8c9f9 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -38,7 +38,12 @@ if($this->syndication_targets) { echo '<ul>'; foreach($this->syndication_targets as $syn) { - echo '<li><button data-syndication="'.$syn['target'].'" class="btn btn-default btn-block"><img src="'.$syn['favicon'].'" width="16" height="16"> '.$syn['target'].'</button></li>'; + echo '<li>' + . '<button data-syndicate-to="'.(isset($syn['uid']) ? $syn['uid'] : $syn['target']).'" class="btn btn-default btn-block">' + . ($syn['favicon'] ? '<img src="'.$syn['favicon'].'" width="16" height="16"> ' : '') + . $syn['target'] + . '</button>' + . '</li>'; } echo '</ul>'; } else { @@ -181,9 +186,10 @@ $(function(){ $("#btn_post").click(function(){ + // Collect all the syndication buttons that are pressed var syndications = []; $("#syndication-container button.btn-info").each(function(i,btn){ - syndications.push($(btn).data('syndication')); + syndications.push($(btn).data('syndicate-to')); }); var category = csv_to_array($("#note_category").val()); |