]> git.wh0rd.org Git - tt-rss.git/commitdiff
make toggling combined mode work without reload
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 30 Mar 2013 15:55:52 +0000 (19:55 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 30 Mar 2013 15:55:52 +0000 (19:55 +0400)
index.php
js/tt-rss.js

index 7c823027351ec0747c73cdfa267233b94a87e0b5..f7962197771f845d40471e6b90386428d827456d 100644 (file)
--- a/index.php
+++ b/index.php
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcDigest')"><?php echo __('Switch to digest...') ?></div>
                                        <?php } ?>
                                                <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcTagCloud')"><?php echo __('Show tag cloud...') ?></div>
-                                       <?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
-                                                       <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcToggleWidescreen')"><?php echo __('Toggle widescreen mode') ?></div>
-                                       <?php } ?>
+                                               <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcToggleWidescreen')"><?php echo __('Toggle widescreen mode') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcTagSelect')"><?php echo __('Select by tags...') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddLabel')"><?php echo __('Create label...') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddFilter')"><?php echo __('Create filter...') ?></div>
                        </div>
                </div>
 
-               <?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
                <div id="content-insert" dojoType="dijit.layout.ContentPane" region="bottom"
                        style="height : 50%" splitter="true"></div>
-               <?php } ?>
 
        </div>
 </div>
index cb7c0ab2db698c4bfb934eb8024d5d151a2d4a15..6c921c25872360347643e54d5cf437135b04270a 100644 (file)
@@ -480,8 +480,13 @@ function init() {
                                new Ajax.Request("backend.php", {
                                        parameters: query,
                                        onComplete: function(transport) {
-                                               window.location.reload();
-                                       } });
+                                               setInitParam("combined_display_mode",
+                                                               !getInitParam("combined_display_mode"));
+
+                                               closeArticlePanel();
+                                               viewCurrentFeed();
+
+                                                               } });
                };
                hotkey_actions["toggle_cdm_expanded"] = function() {
                                notify_progress("Loading, please wait...");