aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/main.js
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-12-17 20:28:04 +0100
committerGravatar GitHub <noreply@github.com> 2017-12-17 20:28:04 +0100
commit60f56539c3f30fd3f7ba4f2a3570f7029ac93e5f (patch)
tree1e78bfac7042dceb63898e2215db8fb0c1d7745d /p/scripts/main.js
parentceda55c75b158fc1cf4813fe0f258527754b9289 (diff)
parent0b1516af91792f86868689392f72ad4b6e32cdcf (diff)
Merge pull request #1720 from FreshRSS/dev
FreshRSS 1.9.0
Diffstat (limited to 'p/scripts/main.js')
-rw-r--r--p/scripts/main.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 278ecfee9..ce8070008 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1172,6 +1172,14 @@ function init_print_action() {
});
}
+function init_post_action() {
+ $('.item.share > a[href="POST"]').click(function (event) {
+ event.preventDefault();
+ var form = $(this).next('form');
+ $.post(form.data('url'), form.serialize());
+ });
+}
+
function init_share_observers() {
shares = $('.group-share').length;
@@ -1182,6 +1190,8 @@ function init_share_observers() {
row = row.replace(/##type##/g, opt.val());
row = row.replace(/##help##/g, opt.data('help'));
row = row.replace(/##key##/g, shares);
+ row = row.replace(/##method##/g, opt.data('method'));
+ row = row.replace(/##field##/g, opt.data('field'));
$(this).parents('.form-group').before(row);
shares++;
@@ -1398,6 +1408,7 @@ function init_afterDOM() {
init_posts();
init_nav_entries();
init_print_action();
+ init_post_action();
init_notifs_html5();
window.setInterval(refreshUnreads, 120000);
} else {