svnno****@sourc*****
svnno****@sourc*****
2008年 2月 17日 (日) 04:23:52 JST
Revision: 376 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=bbs2ch&view=rev&rev=376 Author: flyson Date: 2008-02-17 04:23:52 +0900 (Sun, 17 Feb 2008) Log Message: ----------- boardListBox にスレ一覧を開いたことのないスレの板が表示されていなかったのを修正。板削除後に logDataTree が更新されなかったのを修正 Modified Paths: -------------- trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.js -------------- next part -------------- Modified: trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.js =================================================================== --- trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.js 2008-02-16 19:19:48 UTC (rev 375) +++ trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.js 2008-02-16 19:23:52 UTC (rev 376) @@ -77,7 +77,7 @@ } function vacuum(){ -document.getElementById("vacuumButton").disabled = true; + document.getElementById("vacuumButton").disabled = true; setTimeout("delayVacuum()", 0); } @@ -98,15 +98,18 @@ gBoardListBox.appendItem("(すべて)", ""); var sql = <> - SELECT DISTINCT - bd.board_id AS board_id, + SELECT + td.board_id AS board_id, IFNULL(bb.board_type, 0) AS board_type, - IFNULL(bb.title, bd.board_id) AS board_title, - bd.url AS url - FROM board_data AS bd LEFT OUTER JOIN bbsmenu AS bb - ON bd.board_id=bb.board_id; + IFNULL(bb.title, td.board_id) AS board_title, + td.url AS url + FROM thread_data AS td LEFT OUTER JOIN bbsmenu AS bb + ON td.board_id=bb.board_id + GROUP BY td.board_id; </>.toString().replace(/\t/g, ""); + var ioService = XPC.getService("@mozilla.org/network/io-service;1", "nsIIOService"); + var database = gB2rStorageService.database; var statement = database.createStatement(sql); database.beginTransaction(); @@ -115,7 +118,8 @@ var boardID = statement.getString(0); var boardType = statement.getInt32(1); var boardTitle = statement.getString(2); - var boardURL = statement.getString(3); + var threadURL = ioService.newURI(statement.getString(3), null, null); + var boardURL = gB2rService.threadUtils.getBoardURL(threadURL).spec; if(boardType == gB2rService.BOARD_TYPE_MACHI){ boardTitle += " [まちBBS]"; } @@ -149,6 +153,8 @@ gB2rService.openURL("bbs2ch:board:" + boardURL, null, aAddTab); } + + function deleteBoardLog(aEvent){ var boardID = gBoardListBox.selectedItem.value; var boardURL = gBoardListBox.selectedItem.getAttribute("boardURL"); @@ -167,8 +173,11 @@ } initBoardListBox(); + gBoardListBox.selectItem(gBoardListBox.getItemAtIndex(0)); + setTimeout("initLogDataTree(0)", 0); } + function initLogDataTree(aBoardID){ var where = ";"; if(aBoardID != ""){