1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Catch undefinied title attribute in lightbox

Summary: If the image name in not defined, don't set it. Fixes T6793

Test Plan: View a lightboxed image, no 'undefined' alt tag

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6793

Differential Revision: https://secure.phabricator.com/D11037
This commit is contained in:
Chad Little 2014-12-23 09:28:57 -08:00
parent 2fedb6f941
commit 06a3cf04fe
2 changed files with 17 additions and 13 deletions

View file

@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => '679c69f6',
'core.pkg.js' => 'bc72b978',
'core.pkg.js' => '2d1f7db1',
'darkconsole.pkg.js' => 'df001cab',
'differential.pkg.css' => '8af45893',
'differential.pkg.js' => '42c10e78',
@ -462,7 +462,7 @@ return array(
'rsrc/js/core/behavior-keyboard-pager.js' => 'a8da01f0',
'rsrc/js/core/behavior-keyboard-shortcuts.js' => 'd75709e6',
'rsrc/js/core/behavior-konami.js' => '5bc2cb21',
'rsrc/js/core/behavior-lightbox-attachments.js' => '0720f2cf',
'rsrc/js/core/behavior-lightbox-attachments.js' => 'f8ba29d7',
'rsrc/js/core/behavior-line-linker.js' => 'f726d506',
'rsrc/js/core/behavior-more.js' => 'a80d0378',
'rsrc/js/core/behavior-object-selector.js' => '49b73b36',
@ -586,7 +586,7 @@ return array(
'javelin-behavior-icon-composer' => '8ef9ab58',
'javelin-behavior-konami' => '5bc2cb21',
'javelin-behavior-launch-icon-composer' => '48086888',
'javelin-behavior-lightbox-attachments' => '0720f2cf',
'javelin-behavior-lightbox-attachments' => 'f8ba29d7',
'javelin-behavior-line-chart' => '22e16ae7',
'javelin-behavior-load-blame' => '42126667',
'javelin-behavior-maniphest-batch-editor' => 'f588412e',
@ -863,14 +863,6 @@ return array(
'javelin-dom',
'javelin-vector',
),
'0720f2cf' => array(
'javelin-behavior',
'javelin-stratcom',
'javelin-dom',
'javelin-mask',
'javelin-util',
'phabricator-busy',
),
'07f199d8' => array(
'javelin-behavior',
'javelin-dom',
@ -1911,6 +1903,14 @@ return array(
'javelin-stratcom',
'phabricator-shaped-request',
),
'f8ba29d7' => array(
'javelin-behavior',
'javelin-stratcom',
'javelin-dom',
'javelin-mask',
'javelin-util',
'phabricator-busy',
),
'f9539603' => array(
'javelin-behavior',
'javelin-dom',

View file

@ -69,11 +69,15 @@ JX.behavior('lightbox-attachments', function (config) {
);
}
var alt_name = '';
if (typeof target_data.name != 'undefined') {
alt_name = target_data.name;
}
var img = JX.$N('img',
{
className : 'loading',
alt : target_data.name,
title : target_data.name
alt : alt_name
}
);