summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-08-17 22:54:54 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-08-17 22:54:54 -0400
commit30fcd3949cd8bc74be9debd6fe8c53015dc06798 (patch)
tree5f4aefbdb6218ceffd133e0945829930b1ed99dd /templates
parent9d56198d1aac420287bf52400bb4d7160566463d (diff)
bookmarkelet working now
Diffstat (limited to 'templates')
-rw-r--r--templates/addBm.php11
-rw-r--r--templates/part.nofeeds.php4
-rw-r--r--templates/settings.php9
-rw-r--r--templates/subscribelet.php (renamed from templates/bookmarklet.php)4
4 files changed, 13 insertions, 15 deletions
diff --git a/templates/addBm.php b/templates/addBm.php
deleted file mode 100644
index e9132ca57..000000000
--- a/templates/addBm.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Subsribe - News - ownCloud</title>
- </head>
- <body>
- <div class="message"><h1>Saved!</h1></div>
- <a href="javascript:self.close()" >Close the window</a>
- </body>
-</html> \ No newline at end of file
diff --git a/templates/part.nofeeds.php b/templates/part.nofeeds.php
index 409198f3e..5afc5d281 100644
--- a/templates/part.nofeeds.php
+++ b/templates/part.nofeeds.php
@@ -29,11 +29,11 @@
</div>
<div>
<?php
- require_once(OC_App::getAppPath('news') .'/templates/bookmarklet.php');
+ require_once(OC_App::getAppPath('news') .'/templates/subscribelet.php');
echo '<h1>' . $l->t('Or...') . '</h1>';
?>
<div>
- <?php createBookmarklet(); ?>
+ <?php createSubscribelet(); ?>
</div>
</div>
</div> \ No newline at end of file
diff --git a/templates/settings.php b/templates/settings.php
index b063fc1ed..3dea8fd9d 100644
--- a/templates/settings.php
+++ b/templates/settings.php
@@ -13,4 +13,13 @@
<dd>
<button id="exportbtn" title="<?php echo $l->t('Download OPML'); ?>">Download OPML</button>
</dd>
+ <dt><?php echo $l->t('Subscribelet'); ?></dt>
+ <dd>
+ <?php
+ require_once(OC_App::getAppPath('news') .'/templates/subscribelet.php');
+ createSubscribelet();
+ ?>
+ <div>
+ <?php ?>
+ </dd>
</dl> \ No newline at end of file
diff --git a/templates/bookmarklet.php b/templates/subscribelet.php
index 31a654b86..4db1c55e7 100644
--- a/templates/bookmarklet.php
+++ b/templates/subscribelet.php
@@ -1,8 +1,8 @@
<?php
-function createBookmarklet() {
+function createSubscribelet() {
$l = OC_L10N::get('news');
echo '<small>' . $l->t('Drag this to your browser bookmarks and click on it whenever you want to subscribe to a webpage quickly:') . '</small>'
- . '<a class="button bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OCP\Util::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
+ . '<a class="button bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OCP\Util::linkToAbsolute('news', 'subscribe.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=150px,width=360px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
. $l->t('Subscribe') . '</a>';
}