equal
deleted
inserted
replaced
|
1 //outofmemorydialog.js |
|
2 |
|
3 function outOfMemoryDialog() |
|
4 { |
|
5 window.pageController.lowMemory.connect(showOutOfMemoryDialog); |
|
6 window.pageController.outOfMemory.connect(showOutOfMemoryDialog); |
|
7 |
|
8 this.write = writeOutOfMemoryDialog; |
|
9 // do setup |
|
10 this.write(); |
|
11 |
|
12 } |
|
13 |
|
14 function writeOutOfMemoryDialog() |
|
15 { |
|
16 var title = window.localeDelegate.translateText("txt_browser_error_dialog_device_low"); |
|
17 var message = window.localeDelegate.translateText("txt_browser_error_dialog_close_some"); |
|
18 var html = |
|
19 '<div><img src="outofmemory.snippet/icons/icon_dialog_error.png"/> <span class="title">' + title + '</span></div>' + |
|
20 '<div class="textLabel">' + message +'</div>' + |
|
21 '<div class="controls">' + |
|
22 '<div type="button" onmouseup="hideOutOfMemoryDialog();" class="outOfMemoryDialogButton outOfMemoryDoneButton"></div>'+ |
|
23 '</div>' |
|
24 document.write(html); |
|
25 } |
|
26 |
|
27 function showOutOfMemoryDialog() { |
|
28 window.snippets.OutOfMemoryDialogId.show(false); |
|
29 } |
|
30 |
|
31 function hideOutOfMemoryDialog(){ |
|
32 window.snippets.OutOfMemoryDialogId.hide(); |
|
33 } |