| Index: chrome/browser/resources/chromeos/user_images_grid.js
|
| diff --git a/chrome/browser/resources/chromeos/user_images_grid.js b/chrome/browser/resources/chromeos/user_images_grid.js
|
| index 457221b3023526d6910390176b96f347f5950d64..e96e004c312fe7ac32c0ca9436fd14105bc1cb75 100644
|
| --- a/chrome/browser/resources/chromeos/user_images_grid.js
|
| +++ b/chrome/browser/resources/chromeos/user_images_grid.js
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -127,15 +127,21 @@ cr.define('options', function() {
|
| },
|
| set selectedItemUrl(url) {
|
| for (var i = 0, el; el = this.dataModel.item(i); i++) {
|
| - if (el.url === url) {
|
| - this.inProgramSelection_ = true;
|
| - this.selectionModel.selectedIndex = i;
|
| - this.selectionModel.leadIndex = i;
|
| - this.inProgramSelection_ = false;
|
| - }
|
| + if (el.url === url)
|
| + this.selectedItemIndex = i;
|
| }
|
| },
|
|
|
| + /**
|
| + * Set index to the image selected.
|
| + * @type {number} index The index of selected image.
|
| + */
|
| + set selectedItemIndex(index) {
|
| + this.inProgramSelection_ = true;
|
| + this.selectionModel.selectedIndex = index;
|
| + this.inProgramSelection_ = false;
|
| + },
|
| +
|
| /** @inheritDoc */
|
| get selectedItem() {
|
| var index = this.selectionModel.selectedIndex;
|
|
|