You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

  1. <?php $this->layout('layout-loggedin', ['title' => $title, 'accounts' => $accounts, 'user' => $user]); ?>
  2. <div class="ui main text container" style="margin-top: 80px;">
  3. <h2>Send Webmentions</h2>
  4. <table class="ui very basic fixed single line unstackable table" id="send-table">
  5. <thead>
  6. <th class="twelve wide">URL</th>
  7. <th class="four wide">Status</th>
  8. </thead>
  9. <tbody>
  10. <tr><td colspan="2">Looking for URLs...</td></tr>
  11. </tbody>
  12. </table>
  13. </div>
  14. <script>
  15. var url = "<?= $url ?>";
  16. var token = "<?= $role->token ?>";
  17. $(function(){
  18. $.post('/dashboard/get_outgoing_links.json', {
  19. url: url
  20. }, function(data) {
  21. $("#send-table tbody").html('<tr><td colspan="2"></td></tr>');
  22. for(var i in data.links) {
  23. console.log(data.links[i]);
  24. $("#send-table tr:last").after('<tr>'
  25. +'<td class="target-url">'
  26. +'<div class="popup" data-content="'+data.links[i]+'">'+data.links[i]+'</div>'
  27. +'</td>'
  28. +'<td><button class="ui button">Send</button></td>'
  29. +'</tr>');
  30. }
  31. $("#send-table tbody tr:first").remove();
  32. $(".popup").popup();
  33. });
  34. });
  35. </script>
  36. <style type="text/css">
  37. .popup {
  38. word-wrap: break-word;
  39. }
  40. </style>