Guest User

Throw in smartphone view (selfoss)

a guest
Apr 21st, 2013
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. diff -rupN public\js\selfoss-events-entriestoolbar.js public\js\selfoss-events-entriestoolbar.js
  2. --- public\js\selfoss-events-entriestoolbar.js Wed Apr 10 19:13:08 2013
  3. +++ public\js\selfoss-events-entriestoolbar.js Sat Apr 20 13:25:28 2013
  4. @@ -26,6 +26,17 @@ selfoss.events.entriesToolbar = function
  5. return false;
  6. });
  7.  
  8. + // Added for smartphones: Throw
  9. + parent.find('.entry-smartphone-added-throw').unbind('click').click(function(e) {
  10. + $(this).parents(".entry").find(".entry-unread").click();
  11. + var entryID = $(this).parents('.entry').attr('id').replace("entrr", "entry");
  12. + var entry = $("#" + entryID);
  13. + $(this).parents(".entry").find(".entry-close").click();
  14. + entry.next().click();
  15. + e.preventDefault();
  16. + return false;
  17. + });
  18. +
  19. // share with google plus
  20. parent.find('.entry-sharegoogle').unbind('click').click(function(e) {
  21. window.open("https://plus.google.com/share?url="+encodeURIComponent($(this).parents(".entry").children("a").eq(0).attr("href")));
  22.  
  23.  
  24. diff -rupN templates\item.phtml templates/item.phtml
  25. --- templates\item.phtml Wed Apr 3 20:43:22 2013
  26. +++ templates\item.phtml Sat Apr 20 13:25:36 2013
  27. @@ -56,11 +56,7 @@
  28.  
  29. <ul class="entry-smartphone-share">
  30. <li class="entry-newwindow"><?PHP echo \F3::get('lang_open_window')?></li>
  31. - <li class="entry-sharegoogle" title="google">google</li>
  32. - <li class="entry-sharetwitter" title="twitter">twitter</li>
  33. - <li class="entry-sharefacebook" title="facebook">facebook</li>
  34. - <li class="entry-sharepocket" title="pocket">pocket</li>
  35. - <li class="entry-shareemail" title="email">email</li>
  36. + <li class="entry-smartphone-added-throw" title="Throw">Throw</li>
  37. </ul>
  38. </div>
  39.  
  40. @@ -70,11 +66,6 @@
  41. <li class="entry-unread <?PHP echo $this->item['unread']==1 ? 'active' : ''; ?>"><?PHP echo $this->item['unread']==1 ? \F3::get('lang_mark') : \F3::get('lang_unmark'); ?></li>
  42. <li class="entry-newwindow"><?PHP echo \F3::get('lang_open_window')?></li>
  43. <li class="entry-loadimages"><?PHP echo \F3::get('lang_load_img')?> </li>
  44. - <li class="entry-sharegoogle entry-share" title="google">&nbsp;</li>
  45. - <li class="entry-sharetwitter entry-share" title="twitter">&nbsp;</li>
  46. - <li class="entry-sharefacebook entry-share" title="facebook">&nbsp;</li>
  47. - <li class="entry-sharepocket entry-share" title="pocket">&nbsp;</li>
  48. - <li class="entry-shareemail entry-share" title="email">&nbsp;</li>
  49. <li class="entry-close"></li>
  50. </ul>
  51. </div>
Advertisement
Add Comment
Please, Sign In to add comment