10 |
10 |
11 } |
11 } |
12 |
12 |
13 function writeClearHistoryDialog() |
13 function writeClearHistoryDialog() |
14 { |
14 { |
15 var message = window.localeDelegate.translateText("txt_browser_history_delete_are_you_sure"); |
15 var message = window.localeDelegate.translateText("txt_browser_history_delete_are_you_sure"); |
16 //Following string to be localized - BR-2979 |
|
17 //var message = "Clear All History ?"; |
|
18 var html = |
16 var html = |
19 '<div class="top"></div>'+ |
17 '<div class="textLabel">'+message +'</div>' + |
20 '<div class="body">'+ |
18 '<div class="controls">' + |
21 '<div class="textLabel">'+message +'</div>' + |
19 '<div type="button" onmouseup="clearAllHistoryDialog();" class="historyDialogButton clearDoneButton"></div>'+ |
22 '<div class="controls">' + |
20 '<div type="button" onmouseup="clearHistoryDialogIdHide();" class="historyDialogButton clearCancelButton"></div>'+ |
23 '<div type="button" onmouseup="clearAllHistoryDialog();" class="clearDoneButton"></div>'+ |
21 '</div>' + |
24 '<div type="button" onmouseup="clearHistoryDialogIdHide();" class="clearCancelButton"></div>'+ |
22 '<div id="hiddenDialogOK"></div>' + |
25 '</div>'+ |
23 '<div id="hiddenDialogCancel"></div>'; |
26 '</div>' + /*body*/ |
|
27 '<div class="bottom"></div>'; |
|
28 |
|
29 document.write(html); |
24 document.write(html); |
30 } |
25 } |
31 |
26 |
32 function showClearHistoryDialog() { |
27 function showClearHistoryDialog() { |
33 try{ |
28 try{ |
34 window.snippets.ClearHistoryDialogId.show(false); |
29 window.snippets.ClearHistoryDialogId.show(false); |
|
30 window.snippets.RecentUrlViewToolbarId.enabled = false; |
35 }catch(e){ alert(e); } |
31 }catch(e){ alert(e); } |
36 } |
32 } |
37 |
33 |
38 function clearAllHistoryDialog() |
34 function clearAllHistoryDialog() |
39 { |
35 { |
40 window.bookmarksManager.clearHistory(); |
36 window.bookmarksManager.clearHistory(); |
41 window.views.WebView.reload(); |
37 window.views.WebView.reload(); |
42 window.snippets.ClearHistoryDialogId.hide(); |
38 clearHistoryDialogIdHide(); |
43 } |
39 } |
44 |
40 |
45 function clearHistoryDialogIdHide(){ |
41 function clearHistoryDialogIdHide(){ |
46 window.snippets.ClearHistoryDialogId.hide(); |
42 window.snippets.ClearHistoryDialogId.hide(); |
|
43 window.snippets.RecentUrlViewToolbarId.enabled = true; |
47 } |
44 } |