]> source.dussan.org Git - nextcloud-server.git/commitdiff
Added bookmarklet for browser. Inspired by Google Bookmarks
authorAlessandro Cosentino <cosenal@gmail.com>
Mon, 20 Feb 2012 01:18:27 +0000 (20:18 -0500)
committerAlessandro Cosentino <cosenal@gmail.com>
Mon, 20 Feb 2012 01:18:27 +0000 (20:18 -0500)
apps/bookmarks/addBm.php
apps/bookmarks/css/bookmarks.css
apps/bookmarks/templates/list.php

index 62ad5821dbf11e39c88f91f6c1783d20b6093839..f56022c42c2b4405c9f43c4cade29f4524fc316f 100644 (file)
@@ -40,6 +40,7 @@ $url = isset($_GET['url']) ? urldecode($_GET['url']) : '';
 $metadata = getURLMetadata($url);
 
 $tmpl->assign('URL', htmlentities($metadata['url'],ENT_COMPAT,'utf-8'));
-$tmpl->assign('TITLE', htmlentities($metadata['title'],ENT_COMPAT,'utf-8'));
+$title = isset($metadata['title']) ? $metadata['title'] : (isset($_GET['title']) ? $_GET['title'] : '');
+$tmpl->assign('TITLE', htmlentities($title,ENT_COMPAT,'utf-8'));
 
 $tmpl->printPage();
index 48f0bede1103decaf7fed854506c681da6163324..8dfdc8a07b948760a866c86c61bec3c28ef88e15 100644 (file)
 .loading_meta {
        display: none;
        margin-left: 5px;
-}
\ No newline at end of file
+}
+
+#footer {
+       color: #999;
+       font-size: medium;
+       text-align: center;
+       position: absolute;
+       bottom: 10px;
+       left: 0px;
+       width: 100%;
+       height: 20px;
+       visibility: visible;
+       display: block
+}
index ccfe74f008f5f1bca0366598a0aa9917ef19b2d1..d44a0ecbcdbacd0eaf141b0e0ef8d86fd88b662f 100644 (file)
@@ -22,4 +22,8 @@
 </div>
 <div class="bookmarks_list">
        <?php echo $l->t('You have no bookmarks'); ?>
-</div>
\ No newline at end of file
+</div>
+<div id="footer">
+Bookmark pages more easily. Drag this bookmarklet to the Bookmarks bar of your browser:
+<a style='background-color:#dddddd;border:1px groove #999; padding:5px;padding-top:0px;padding-bottom:2px; text-decoration:none; margin-top:5px' href='javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("<?php echo OC_Helper::linkToAbsolute('bookmarks', 'addBm.php') ?>?output=popup&url="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=510px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();'>ownCloud bookmark</a>
+</div>