diff options
| author | 2013-10-26 16:45:14 +0200 | |
|---|---|---|
| committer | 2013-10-26 16:45:14 +0200 | |
| commit | 298b5ecf206ff0020d8fed29e9aba4d7b148b080 (patch) | |
| tree | ab8d6336f546e895743b168c313ea975644b4ef9 /app/views/javascript | |
| parent | ce1101bf4501141e9c9c86f58623e30cba20ce9f (diff) | |
| parent | 39f2213e92040d2a8bffc3084f30d868fa7b8882 (diff) | |
Merge branch 'use_template' of https://github.com/Alkarex/FreshRSS into Alkarex-use_template
Diffstat (limited to 'app/views/javascript')
| -rw-r--r-- | app/views/javascript/main.phtml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index 03c60cc52..f6700330a 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -403,7 +403,18 @@ function init_nav_entries() { }); } -$(document).ready (function () { +function init_templates() { + $('#aside_flux').on('click', '.dropdown-toggle', function () { + if ($(this).nextAll('.dropdown-menu').length === 0) { + var feed_id = $(this).data('fid'), + feed_web = $(this).data('fweb'), + template = $('#feed_config_template').html().replace(/!!!!!!/g, feed_id).replace('http://example.net/', feed_web); + $(this).attr('href', '#dropdown-' + feed_id).prev('.dropdown-target').attr('id', 'dropdown-' + feed_id).parent().append(template); + } + }); +} + +$(function () { if(is_reader_mode()) { hide_posts = false; } @@ -412,4 +423,5 @@ $(document).ready (function () { init_shortcuts (); init_stream_delegates($('#stream')); init_nav_entries(); + init_templates(); }); |
