| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this | 2 * Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this |
| 3 * source code is governed by a BSD-style license that can be found in the | 3 * source code is governed by a BSD-style license that can be found in the |
| 4 * LICENSE file. | 4 * LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @fileoverview Includes the country selection, topics selection and | 8 * @fileoverview Includes the country selection, topics selection and |
| 9 * selection of no. of news stories to be shown. Include default settings also. | 9 * selection of no. of news stories to be shown. Include default settings also. |
| 10 * @author navneetg@google.com (Navneet Goel). | 10 * @author navneetg@google.com (Navneet Goel). |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 /** | 83 /** |
| 84 * Displays various messages to user based on user input. | 84 * Displays various messages to user based on user input. |
| 85 * @param {String} id Id of status element. | 85 * @param {String} id Id of status element. |
| 86 * @param {Number} timeOut Timeout value of message shown. | 86 * @param {Number} timeOut Timeout value of message shown. |
| 87 * @param {String} message Message to be shown. | 87 * @param {String} message Message to be shown. |
| 88 */ | 88 */ |
| 89 function showUserMessages(id, timeOut, message) { | 89 function showUserMessages(id, timeOut, message) { |
| 90 $(id).style.setProperty('-webkit-transition', | 90 $(id).style.setProperty('transition', |
| 91 'opacity 0s ease-in'); | 91 'opacity 0s ease-in'); |
| 92 $(id).style.opacity = 1; | 92 $(id).style.opacity = 1; |
| 93 $(id).innerText = chrome.i18n.getMessage(message); | 93 $(id).innerText = chrome.i18n.getMessage(message); |
| 94 window.setTimeout(function() { | 94 window.setTimeout(function() { |
| 95 $(id).style.setProperty( | 95 $(id).style.setProperty( |
| 96 '-webkit-transition', 'opacity' + timeOut + 's ease-in'); | 96 'transition', 'opacity' + timeOut + 's ease-in'); |
| 97 $(id).style.opacity = 0; | 97 $(id).style.opacity = 0; |
| 98 }, 1E3 | 98 }, 1E3 |
| 99 ); | 99 ); |
| 100 } | 100 } |
| 101 | 101 |
| 102 /** | 102 /** |
| 103 * Sets options page CSS according to the browser language(if found), else sets | 103 * Sets options page CSS according to the browser language(if found), else sets |
| 104 * to default locale. | 104 * to default locale. |
| 105 */ | 105 */ |
| 106 function setOptionPageCSS() { | 106 function setOptionPageCSS() { |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 | 388 |
| 389 checkCount--; | 389 checkCount--; |
| 390 $('submit_button').disabled = false; | 390 $('submit_button').disabled = false; |
| 391 } else { | 391 } else { |
| 392 showUserMessages('save_status', 2.5, 'noTopic'); | 392 showUserMessages('save_status', 2.5, 'noTopic'); |
| 393 } | 393 } |
| 394 $('newKeyword').readOnly = false; | 394 $('newKeyword').readOnly = false; |
| 395 } | 395 } |
| OLD | NEW |