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

Side by Side Diff: chrome/browser/resources/feedback.js

Issue 12737006: Allow feedback form to be shown in an App Launcher feedback mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Touch up rebase Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/feedback.html ('k') | chrome/browser/ui/webui/feedback_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Constants. 5 // Constants.
6 /** @const */ var FEEDBACK_LANDING_PAGE = 6 /** @const */ var FEEDBACK_LANDING_PAGE =
7 'https://www.google.com/support/chrome/go/feedback_confirmation'; 7 'https://www.google.com/support/chrome/go/feedback_confirmation';
8 /** @const */ var MAX_ATTACH_FILE_SIZE = 3 * 1024 * 1024; 8 /** @const */ var MAX_ATTACH_FILE_SIZE = 3 * 1024 * 1024;
9 9
10 var selectedThumbnailDivId = ''; 10 var selectedThumbnailDivId = '';
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 innerDiv.appendChild(thumbnail); 88 innerDiv.appendChild(thumbnail);
89 89
90 thumbnailDiv.appendChild(innerDiv); 90 thumbnailDiv.appendChild(innerDiv);
91 $(divId).appendChild(thumbnailDiv); 91 $(divId).appendChild(thumbnailDiv);
92 92
93 if (!selectedThumbnailId) 93 if (!selectedThumbnailId)
94 selectImage(divId, thumbnailDiv.id); 94 selectImage(divId, thumbnailDiv.id);
95 } 95 }
96 96
97 /** 97 /**
98 * Disables screenshots completely. 98 * Enables screenshots.
99 */ 99 */
100 function enableScreenshots() { 100 function enableScreenshots() {
101 if (forceDisableScreenshots) 101 if (forceDisableScreenshots)
102 return; 102 return;
103 $('screenshot-row').hidden = false; 103 $('screenshot-row').hidden = false;
104 } 104 }
105 105
106 /** 106 /**
107 * Reads the selected file when the user selects a file. 107 * Reads the selected file when the user selects a file.
108 * @param {event} evtFileSelected The on changed event for the file input box. 108 * @param {event} evtFileSelected The on changed event for the file input box.
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 function setupDialogDefaults(defaults) { 391 function setupDialogDefaults(defaults) {
392 // Current url. 392 // Current url.
393 if ($('page-url-text').value == '') 393 if ($('page-url-text').value == '')
394 $('page-url-text').value = defaults.currentUrl; 394 $('page-url-text').value = defaults.currentUrl;
395 if (defaults.currentUrl == '') 395 if (defaults.currentUrl == '')
396 $('page-url-checkbox').checked = false; 396 $('page-url-checkbox').checked = false;
397 // User e-mail. 397 // User e-mail.
398 $('user-email-text').value = defaults.userEmail; 398 $('user-email-text').value = defaults.userEmail;
399 $('user-email-checkbox').checked = defaults.emailCheckboxDefault; 399 $('user-email-checkbox').checked = defaults.emailCheckboxDefault;
400 400
401 // Are screenshots disabled? 401 document.documentElement.classList.toggle('launcher-layout',
402 defaults.launcherFeedback);
403
402 if (!defaults.disableScreenshots) 404 if (!defaults.disableScreenshots)
403 enableScreenshots(); 405 enableScreenshots();
404 406
405 if (defaults.useSaved) { 407 if (defaults.useSaved) {
406 $('screenshot-link-tosaved').hidden = false; 408 $('screenshot-link-tosaved').hidden = false;
407 } 409 }
408 } 410 }
409 411
410 window.addEventListener('DOMContentLoaded', load); 412 window.addEventListener('DOMContentLoaded', load);
OLDNEW
« no previous file with comments | « chrome/browser/resources/feedback.html ('k') | chrome/browser/ui/webui/feedback_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698