| 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 historyView.removeButton_.disabled = true; |
| 997 } else { | 998 } else { |
| 998 // If the remove is cancelled, return the checkboxes to their | 999 // If the remove is cancelled, return the checkboxes to their |
| 999 // enabled, non-line-through state. | 1000 // enabled, non-line-through state. |
| 1000 for (var i = 0; i < disabledItems.length; i++) { | 1001 for (var i = 0; i < disabledItems.length; i++) { |
| 1001 var link = $('id-' + disabledItems[i].name); | 1002 var link = $('id-' + disabledItems[i].name); |
| 1002 disabledItems[i].disabled = false; | 1003 disabledItems[i].disabled = false; |
| 1003 link.style.textDecoration = ''; | 1004 link.style.textDecoration = ''; |
| 1004 } | 1005 } |
| 1005 } | 1006 } |
| 1006 } | 1007 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 * else). | 1065 * else). |
| 1065 */ | 1066 */ |
| 1066 function historyDeleted() { | 1067 function historyDeleted() { |
| 1067 window.console.log('History deleted'); | 1068 window.console.log('History deleted'); |
| 1068 var anyChecked = document.querySelector('.entry input:checked') != null; | 1069 var anyChecked = document.querySelector('.entry input:checked') != null; |
| 1069 if (!(historyView.getEditMode() && anyChecked)) | 1070 if (!(historyView.getEditMode() && anyChecked)) |
| 1070 historyView.reload(); | 1071 historyView.reload(); |
| 1071 } | 1072 } |
| 1072 | 1073 |
| 1073 document.addEventListener('DOMContentLoaded', load); | 1074 document.addEventListener('DOMContentLoaded', load); |
| OLD | NEW |