diff -r bf4420e9fa4d -r 2e16851ffecd ginebra2/chrome/bedrockchrome/historyview.superpage/clearhistorydialog.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ginebra2/chrome/bedrockchrome/historyview.superpage/clearhistorydialog.js Thu Jul 22 16:30:16 2010 +0100 @@ -0,0 +1,44 @@ +//clearhistorydialog.js + +function clearHistoryDialog() +{ + window.bookmarksManager.confirmHistoryClear.connect(showClearHistoryDialog); + + this.write = writeClearHistoryDialog; + // do setup + this.write(); + +} + +function writeClearHistoryDialog() +{ + var message = window.localeDelegate.translateText("txt_browser_history_delete_are_you_sure"); + var html = + '
'+message +'
' + + '
' + + '
'+ + '
'+ + '
' + + '
' + + '
'; + document.write(html); +} + +function showClearHistoryDialog() { + try{ + window.snippets.ClearHistoryDialogId.show(false); + window.snippets.RecentUrlViewToolbarId.enabled = false; + }catch(e){ alert(e); } +} + +function clearAllHistoryDialog() +{ + window.bookmarksManager.clearHistory(); + window.views.WebView.reload(); + clearHistoryDialogIdHide(); +} + +function clearHistoryDialogIdHide(){ + window.snippets.ClearHistoryDialogId.hide(); + window.snippets.RecentUrlViewToolbarId.enabled = true; +}