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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 weekLabel: "Week", | 58 weekLabel: "Week", |
59 anchorRectInScreen: new Rectangle(0, 0, 0, 0), | 59 anchorRectInScreen: new Rectangle(0, 0, 0, 0), |
60 currentValue: null | 60 currentValue: null |
61 } | 61 } |
62 }; | 62 }; |
63 | 63 |
64 // ---------------------------------------------------------------- | 64 // ---------------------------------------------------------------- |
65 // Utility functions | 65 // Utility functions |
66 | 66 |
67 /** | 67 /** |
68 * @return {!bool} | 68 * @return {!boolean} |
69 */ | 69 */ |
70 function hasInaccuratePointingDevice() { | 70 function hasInaccuratePointingDevice() { |
71 return matchMedia("(pointer: coarse)").matches; | 71 return matchMedia("(pointer: coarse)").matches; |
72 } | 72 } |
73 | 73 |
74 /** | 74 /** |
75 * @return {!string} lowercase locale name. e.g. "en-us" | 75 * @return {!string} lowercase locale name. e.g. "en-us" |
76 */ | 76 */ |
77 function getLocale() { | 77 function getLocale() { |
78 return (global.params.locale || "en-us").toLowerCase(); | 78 return (global.params.locale || "en-us").toLowerCase(); |
(...skipping 3952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4031 var highlightMiddleDay = this._highlight.middleDay(); | 4031 var highlightMiddleDay = this._highlight.middleDay(); |
4032 this.highlightRangeContainingDay(highlightMiddleDay.next((newFirstVi
sibleRow - oldFirstVisibleRow) * DaysPerWeek)); | 4032 this.highlightRangeContainingDay(highlightMiddleDay.next((newFirstVi
sibleRow - oldFirstVisibleRow) * DaysPerWeek)); |
4033 } | 4033 } |
4034 eventHandled =true; | 4034 eventHandled =true; |
4035 break; | 4035 break; |
4036 } | 4036 } |
4037 if (eventHandled) { | 4037 if (eventHandled) { |
4038 event.stopPropagation(); | 4038 event.stopPropagation(); |
4039 event.preventDefault(); | 4039 event.preventDefault(); |
4040 } | 4040 } |
4041 } | 4041 }; |
4042 | 4042 |
4043 if (window.dialogArguments) { | 4043 if (window.dialogArguments) { |
4044 initialize(dialogArguments); | 4044 initialize(dialogArguments); |
4045 } else { | 4045 } else { |
4046 window.addEventListener("message", handleMessage, false); | 4046 window.addEventListener("message", handleMessage, false); |
4047 } | 4047 } |
OLD | NEW |