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

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

Issue 10964026: Fix saved screenshots for feedback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « no previous file | chrome/browser/ui/webui/screenshot_source.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 8
9 var selectedThumbnailDivId = ''; 9 var selectedThumbnailDivId = '';
10 var selectedThumbnailId = ''; 10 var selectedThumbnailId = '';
(...skipping 19 matching lines...) Expand all
30 return; 30 return;
31 } 31 }
32 32
33 for (var i = 0; i < thumbnailDivs.length; i++) { 33 for (var i = 0; i < thumbnailDivs.length; i++) {
34 thumbnailDivs[i].className = 'image-thumbnail-container'; 34 thumbnailDivs[i].className = 'image-thumbnail-container';
35 35
36 // If the the current div matches the thumbnail id provided, 36 // If the the current div matches the thumbnail id provided,
37 // or there is no thumbnail id given, and we're at the first thumbnail. 37 // or there is no thumbnail id given, and we're at the first thumbnail.
38 if (thumbnailDivs[i].id == thumbnailId || (!thumbnailId && !i)) { 38 if (thumbnailDivs[i].id == thumbnailId || (!thumbnailId && !i)) {
39 thumbnailDivs[i].classList.add('image-thumbnail-container-selected'); 39 thumbnailDivs[i].classList.add('image-thumbnail-container-selected');
40 selectedThumbnailId = thumbnailId; 40 selectedThumbnailId = thumbnailDivs[i].id;
41 savedThumbnailIds[divId] = thumbnailId; 41 savedThumbnailIds[divId] = thumbnailId;
42 } 42 }
43 } 43 }
44 } 44 }
45 45
46 /** 46 /**
47 * Adds an image thumbnail to the specified div. 47 * Adds an image thumbnail to the specified div.
48 * @param {string} divId The id of the div to add a screenshot to. 48 * @param {string} divId The id of the div to add a screenshot to.
49 * @param {string} screenshot The URL of the screenshot being added. 49 * @param {string} screenshot The URL of the screenshot being added.
50 */ 50 */
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // Are screenshots disabled? 289 // Are screenshots disabled?
290 if (!defaults.disableScreenshots) 290 if (!defaults.disableScreenshots)
291 enableScreenshots(); 291 enableScreenshots();
292 292
293 if (defaults.useSaved) { 293 if (defaults.useSaved) {
294 $('screenshot-link-tosaved').hidden = false; 294 $('screenshot-link-tosaved').hidden = false;
295 } 295 }
296 } 296 }
297 297
298 window.addEventListener('DOMContentLoaded', load); 298 window.addEventListener('DOMContentLoaded', load);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/screenshot_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698