OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /////////////////////////////////////////////////////////////////////////////// | 5 /////////////////////////////////////////////////////////////////////////////// |
6 // Globals: | 6 // Globals: |
7 var RESULTS_PER_PAGE = 150; | 7 var RESULTS_PER_PAGE = 150; |
8 var MAX_SEARCH_DEPTH_MONTHS = 18; | 8 var MAX_SEARCH_DEPTH_MONTHS = 18; |
9 | 9 |
10 // Amount of time between pageviews that we consider a 'break' in browsing, | 10 // Amount of time between pageviews that we consider a 'break' in browsing, |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
987 } | 987 } |
988 } | 988 } |
989 if (ids.length > 0) { | 989 if (ids.length > 0) { |
990 queue.push(date.valueOf() / 1000); | 990 queue.push(date.valueOf() / 1000); |
991 queue.push(ids); | 991 queue.push(ids); |
992 } | 992 } |
993 if (queue.length > 0) { | 993 if (queue.length > 0) { |
994 if (confirm(localStrings.getString('deletewarning'))) { | 994 if (confirm(localStrings.getString('deletewarning'))) { |
995 deleteQueue = deleteQueue.concat(queue); | 995 deleteQueue = deleteQueue.concat(queue); |
996 deleteNextInQueue(); | 996 deleteNextInQueue(); |
997 // Disable the remove button. | |
James Hawkins
2011/10/15 20:35:43
Remove redundant comment.
NaveenBobbili (Motorola)
2011/10/18 04:12:33
Done.
| |
998 historyView.removeButton_.disabled = true; | |
997 } else { | 999 } else { |
998 // If the remove is cancelled, return the checkboxes to their | 1000 // If the remove is cancelled, return the checkboxes to their |
999 // enabled, non-line-through state. | 1001 // enabled, non-line-through state. |
1000 for (var i = 0; i < disabledItems.length; i++) { | 1002 for (var i = 0; i < disabledItems.length; i++) { |
1001 var link = $('id-' + disabledItems[i].name); | 1003 var link = $('id-' + disabledItems[i].name); |
1002 disabledItems[i].disabled = false; | 1004 disabledItems[i].disabled = false; |
1003 link.style.textDecoration = ''; | 1005 link.style.textDecoration = ''; |
1004 } | 1006 } |
1005 } | 1007 } |
1006 } | 1008 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1064 * else). | 1066 * else). |
1065 */ | 1067 */ |
1066 function historyDeleted() { | 1068 function historyDeleted() { |
1067 window.console.log('History deleted'); | 1069 window.console.log('History deleted'); |
1068 var anyChecked = document.querySelector('.entry input:checked') != null; | 1070 var anyChecked = document.querySelector('.entry input:checked') != null; |
1069 if (!(historyView.getEditMode() && anyChecked)) | 1071 if (!(historyView.getEditMode() && anyChecked)) |
1070 historyView.reload(); | 1072 historyView.reload(); |
1071 } | 1073 } |
1072 | 1074 |
1073 document.addEventListener('DOMContentLoaded', load); | 1075 document.addEventListener('DOMContentLoaded', load); |
OLD | NEW |