зеркало из https://github.com/mozilla/pjs.git
Bug 201264 Media tab should have a column named "count" for objects used more than once, instead of repeating them
patch by f.qu@laposte.net r=db48x sr=neil a=asa
This commit is contained in:
Родитель
5a3ea87b82
Коммит
8cc20fb4dc
|
@ -505,15 +505,13 @@ function addImage(url, type, alt, elem, isBg)
|
|||
{
|
||||
if (url == "")
|
||||
return;
|
||||
//|imageHash[url][type][alt] === undefined| avoids matching row index 0.
|
||||
if (!imageHash[url] || !imageHash[url][type] || imageHash[url][type][alt] === undefined) {
|
||||
if (!(url in imageHash))
|
||||
imageHash[url] = {};
|
||||
if (!(type in imageHash[url]))
|
||||
imageHash[url][type] = {};
|
||||
if (!(alt in imageHash[url][type])) {
|
||||
imageHash[url][type][alt] = imageView.data.length;
|
||||
imageView.addRow([url, type, alt, 1, elem, isBg]);
|
||||
// I wish I could do imageHash[url][type][alt] = imageView.data.length without getting errors.
|
||||
if (!imageHash[url])
|
||||
imageHash[url] = {};
|
||||
if (!imageHash[url][type])
|
||||
imageHash[url][type] = {};
|
||||
imageHash[url][type][alt] = imageView.data.length - 1;
|
||||
} else {
|
||||
var i = imageHash[url][type][alt];
|
||||
imageView.data[i][3]++;
|
||||
|
|
Загрузка…
Ссылка в новой задаче