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

Unified 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: Use else instead of continue 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/feedback.js
diff --git a/chrome/browser/resources/feedback.js b/chrome/browser/resources/feedback.js
index b17cc1981254dccc24bfdbad80e8a0928425a572..c46b0e9e5410025f47048d4d2cd4fc52e37660c5 100644
--- a/chrome/browser/resources/feedback.js
+++ b/chrome/browser/resources/feedback.js
@@ -95,7 +95,15 @@ function addScreenshot(divId, screenshot) {
}
/**
- * Disables screenshots completely.
+ * Shows the app launcher version of the feedback form.
+ */
+function showLauncherFeedback() {
+ document.body.classList.remove('normal-layout');
Dan Beam 2013/03/19 04:43:53 ^ I don't think you need this
benwells 2013/03/20 07:49:32 Done.
+ document.body.classList.add('launcher-layout');
Dan Beam 2013/03/19 04:43:53 it's arguable that you should be using `document.d
benwells 2013/03/20 07:49:32 I was using body as I didn't know how to add a sty
+}
+
+/**
+ * Enables screenshots.
*/
function enableScreenshots() {
if (forceDisableScreenshots)
@@ -398,7 +406,9 @@ function setupDialogDefaults(defaults) {
$('user-email-text').value = defaults.userEmail;
$('user-email-checkbox').checked = defaults.emailCheckboxDefault;
- // Are screenshots disabled?
+ if (defaults.launcherFeedback)
+ showLauncherFeedback();
Dan Beam 2013/03/19 04:43:53 this could be reduced to document.documentEleme
benwells 2013/03/20 07:49:32 That didn't seem to work. Do we have our own toggl
Dan Beam 2013/03/21 01:09:11 sorry, meant document.documentElement.classList.to
+
if (!defaults.disableScreenshots)
enableScreenshots();

Powered by Google App Engine
This is Rietveld 408576698