Changeset 1030

Show
Ignore:
Timestamp:
11/25/05 16:23:52 (3 years ago)
Author:
sdcosta
Message:

Hack to fix #179 , #144 and partially #216
Instead of determining where to go via ajax, we just get the javascript
to click the "markall as read" button. Currently we are not changing the
markReadIds but maybe we should if there are problems in the future...

Location:
trunk/rss
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/rss/ajax.php

    r1027 r1030  
    441441        
    442442       // remove parent elements (heading, ul) if all the children are gone 
    443        if (ul.getElementsByTagName('li').length == 0) { 
     443       if (!redirect && (ul.getElementsByTagName('li').length == 0)) { 
    444444        pn = ul.parentNode; 
    445445         
     
    455455        
    456456       if (redirect) { 
    457         self.setTimeout('setRedirect()', 1000); 
     457    if (t = document.getElementById("_markReadButton")) { 
     458        // Maybe we should fix the array of ids also... 
     459        self.setTimeout('t.click()', 1000); 
     460    }else{ 
     461             self.setTimeout('setRedirect()', 1000); 
     462    } 
    458463       } 
    459464    } 
  • trunk/rss/feed.php

    r1012 r1030  
    13251325    } 
    13261326    echo "\n\n<form action=\"". getPath() ."feed.php\" method=\"post\">\n" 
    1327     ."\t<p><input type=\"submit\" name=\"action\" accesskey=\"m\" value=\"". LBL_MARK_CHANNEL_READ ."\"/>\n" 
     1327    ."\t<p><input id=\"_markReadButton\" type=\"submit\" name=\"action\" accesskey=\"m\" value=\"". LBL_MARK_CHANNEL_READ ."\"/>\n" 
    13281328    ."\t<input type=\"hidden\" name=\"metaaction\" value=\"LBL_MARK_CHANNEL_READ\"/>\n" 
    13291329    ."\t<input type=\"hidden\" name=\"channel\" value=\"$cid\"/>\n" 
     
    13411341    } 
    13421342    echo "\n\n<form action=\"". getPath() ."feed.php\" method=\"post\">\n" 
    1343     ."\t<p><input type=\"submit\" name=\"action\" accesskey=\"m\" value=\"". LBL_MARK_FOLDER_READ ."\"/>\n" 
     1343    ."\t<p><input id=\"_markReadButton\" type=\"submit\" name=\"action\" accesskey=\"m\" value=\"". LBL_MARK_FOLDER_READ ."\"/>\n" 
    13441344    ."\t<input type=\"hidden\" name=\"metaaction\" value=\"LBL_MARK_FOLDER_READ\"/>\n" 
    13451345    ."\t<input type=\"hidden\" name=\"folder\" value=\"$fid\"/>\n" 
     
    13581358    } 
    13591359    echo "\n\n<form action=\"". getPath() ."feed.php\" method=\"post\">\n" 
    1360     ."\t<p><input type=\"submit\" name=\"action\" accesskey=\"m\" value=\"". LBL_MARK_FOLDER_READ ."\"/>\n" 
     1360    ."\t<p><input id=\"_markReadButton\" type=\"submit\" name=\"action\" accesskey=\"m\" value=\"". LBL_MARK_FOLDER_READ ."\"/>\n" 
    13611361    ."\t<input type=\"hidden\" name=\"metaaction\" value=\"LBL_MARK_VFOLDER_READ\"/>\n" 
    13621362    ."\t<input type=\"hidden\" name=\"vfolder\" value=\"$vfid\"/>\n"