| OLD | NEW |
| 1 "use strict"; | 1 "use strict"; |
| 2 /* | 2 /* |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 break; | 978 break; |
| 979 } | 979 } |
| 980 } | 980 } |
| 981 } | 981 } |
| 982 }; | 982 }; |
| 983 | 983 |
| 984 /** | 984 /** |
| 985 * @return {!boolean} | 985 * @return {!boolean} |
| 986 */ | 986 */ |
| 987 DaysTable.prototype._maybeSetPreviousMonth = function() { | 987 DaysTable.prototype._maybeSetPreviousMonth = function() { |
| 988 var year = global.yearMonthController.year(); | 988 var year = this.picker.yearMonthController.year(); |
| 989 var month = global.yearMonthController.month(); | 989 var month = this.picker.yearMonthController.month(); |
| 990 var thisMonthStartTime = createUTCDate(year, month, 1).getTime(); | 990 var thisMonthStartTime = createUTCDate(year, month, 1).getTime(); |
| 991 if (this.minimumDate.getTime() >= thisMonthStartTime) | 991 if (this.picker.minimumDate.getTime() >= thisMonthStartTime) |
| 992 return false; | 992 return false; |
| 993 if (month == 0) { | 993 if (month == 0) { |
| 994 year--; | 994 year--; |
| 995 month = 11; | 995 month = 11; |
| 996 } else | 996 } else |
| 997 month--; | 997 month--; |
| 998 this._navigateToMonthWithAnimation(year, month); | 998 this._navigateToMonthWithAnimation(year, month); |
| 999 return true; | 999 return true; |
| 1000 }; | 1000 }; |
| 1001 | 1001 |
| 1002 /** | 1002 /** |
| 1003 * @return {!boolean} | 1003 * @return {!boolean} |
| 1004 */ | 1004 */ |
| 1005 DaysTable.prototype._maybeSetNextMonth = function() { | 1005 DaysTable.prototype._maybeSetNextMonth = function() { |
| 1006 var year = global.yearMonthController.year(); | 1006 var year = this.picker.yearMonthController.year(); |
| 1007 var month = global.yearMonthController.month(); | 1007 var month = this.picker.yearMonthController.month(); |
| 1008 if (month == 11) { | 1008 if (month == 11) { |
| 1009 year++; | 1009 year++; |
| 1010 month = 0; | 1010 month = 0; |
| 1011 } else | 1011 } else |
| 1012 month++; | 1012 month++; |
| 1013 var nextMonthStartTime = createUTCDate(year, month, 1).getTime(); | 1013 var nextMonthStartTime = createUTCDate(year, month, 1).getTime(); |
| 1014 if (this.picker.maximumDate.getTime() < nextMonthStartTime) | 1014 if (this.picker.maximumDate.getTime() < nextMonthStartTime) |
| 1015 return false; | 1015 return false; |
| 1016 this._navigateToMonthWithAnimation(year, month); | 1016 this._navigateToMonthWithAnimation(year, month); |
| 1017 return true; | 1017 return true; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 global.hadKeyEvent = true; | 1184 global.hadKeyEvent = true; |
| 1185 $("main").classList.remove(ClassNames.NoFocusRing); | 1185 $("main").classList.remove(ClassNames.NoFocusRing); |
| 1186 } | 1186 } |
| 1187 | 1187 |
| 1188 if (window.dialogArguments) { | 1188 if (window.dialogArguments) { |
| 1189 initialize(dialogArguments); | 1189 initialize(dialogArguments); |
| 1190 } else { | 1190 } else { |
| 1191 window.addEventListener("message", handleMessage, false); | 1191 window.addEventListener("message", handleMessage, false); |
| 1192 window.setTimeout(handleArgumentsTimeout, 1000); | 1192 window.setTimeout(handleArgumentsTimeout, 1000); |
| 1193 } | 1193 } |
| OLD | NEW |