Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Unified Diff: chrome/browser/resources/print_preview.js

Issue 6979024: Print Preview: Fading in/out printing options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing layout mode fading. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/print_preview.html ('k') | chrome/browser/resources/print_preview_animations.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview.js
diff --git a/chrome/browser/resources/print_preview.js b/chrome/browser/resources/print_preview.js
index b88c70d775f456ead5bd98d576b7651e1ee00a77..d8f945bd58ba1af3552bf3ee662be09b151c3197 100644
--- a/chrome/browser/resources/print_preview.js
+++ b/chrome/browser/resources/print_preview.js
@@ -185,9 +185,9 @@ function updateWithPrinterCapabilities(settingInfo) {
var bwOption = $('bw');
if (disableColorOption)
- $('color-options').classList.add("hidden");
+ fadeOutElement($('color-options'));
else
- $('color-options').classList.remove("hidden");
+ fadeInElement($('color-options'));
if (colorOption.checked != setColorAsDefault) {
colorOption.checked = setColorAsDefault;
@@ -477,10 +477,8 @@ function onPDFLoad() {
$('dancing-dots').classList.add('invisible');
- if (!previewModifiable) {
- $('landscape').disabled = true;
- $('portrait').disabled = true;
- }
+ if (!previewModifiable)
+ fadeOutElement($('landscape-option'));
Lei Zhang 2011/05/26 01:13:28 I wonder if we should still disable it though? Can
updateCopiesButtonsState();
}
@@ -622,7 +620,7 @@ function pageRangesFieldChanged() {
individualPagesField.classList.add('invalid');
if (individualPagesField.value.length == 0) {
- hideInvalidHint(individualPagesHint);
+ fadeOutElement(individualPagesHint);
} else if (currentlySelectedPages.length == 0) {
individualPagesHint.classList.remove('suggestion');
individualPagesHint.classList.add('invalid');
@@ -630,17 +628,17 @@ function pageRangesFieldChanged() {
localStrings.getStringF('pageRangeInstruction',
localStrings.getString(
'examplePageRangeText'));
- showInvalidHint(individualPagesHint);
+ fadeInElement(individualPagesHint);
} else if (individualPagesField.value.replace(/\s*/g,'') !=
getPageRangesSuggestion().replace(/\s*/g,'')) {
individualPagesHint.innerHTML =
localStrings.getStringF('didYouMean', getPageRangesSuggestion());
individualPagesHint.classList.remove('invalid');
individualPagesHint.classList.add('suggestion');
- showInvalidHint(individualPagesHint);
+ fadeInElement(individualPagesHint);
} else if (individualPagesField.value.replace(/\s*/g,'') ==
getPageRangesSuggestion().replace(/\s*/g,'')) {
- hideInvalidHint(individualPagesHint);
+ fadeOutElement(individualPagesHint);
}
resetPageRangeFieldTimer();
@@ -658,13 +656,13 @@ function updateCopiesButtonsState() {
copiesField.classList.add('invalid');
$('increment').disabled = false;
$('decrement').disabled = false;
- showInvalidHint($('copies-hint'));
+ fadeInElement($('copies-hint'));
}
else {
copiesField.classList.remove('invalid');
$('increment').disabled = (getCopies() == copiesField.max) ? true : false;
$('decrement').disabled = (getCopies() == copiesField.min) ? true : false;
- hideInvalidHint($('copies-hint'));
+ fadeOutElement($('copies-hint'));
}
}
@@ -751,7 +749,7 @@ function onLayoutModeToggle() {
* Sets the default values and sends a request to regenerate preview data.
*/
function setDefaultValuesAndRegeneratePreview() {
- hideInvalidHint($('individual-pages-hint'));
+ fadeOutElement($('individual-pages-hint'));
totalPageCount = -1;
previouslySelectedPages.length = 0;
requestPrintPreview();
« no previous file with comments | « chrome/browser/resources/print_preview.html ('k') | chrome/browser/resources/print_preview_animations.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698