Skip to content

Commit

Permalink
Fix alt / title misbehavior
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-yagodin committed Nov 19, 2014
1 parent 2d8c75c commit 080c37e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R7.MiniGallery/App_LocalResources/BulkAdd.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
<value>Sort Index</value>
</data>
<data name="textTitle.ToolTip" xml:space="preserve">
<value>Alt and Title</value>
<value>Title</value>
</data>
</root>
2 changes: 1 addition & 1 deletion R7.MiniGallery/App_LocalResources/BulkAdd.ascx.ru-RU.resx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
<value>Индекс сортировки</value>
</data>
<data name="textTitle.ToolTip" xml:space="preserve">
<value>Альтернативный текст и заголовок</value>
<value>Заголовок</value>
</data>
</root>
2 changes: 1 addition & 1 deletion R7.MiniGallery/BulkAdd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected void buttonAdd_Click (object sender, EventArgs e)
{
var image = new ImageInfo () {
ImageFileID = int.Parse (hiddenImageFileID.Value),
Alt = textTitle.Text,
Alt = string.Empty, // title value should be used for Alt dynamically in the View
Title = textTitle.Text,
Url = string.Empty,
SortIndex = Utils.TryParseInt32 (textSortIndex.Text, 0),
Expand Down
1 change: 1 addition & 0 deletions R7.MiniGallery/ViewMiniGallery.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ protected void listImages_ItemDataBound (object sender, System.Web.UI.WebControl

#region Alternate text and title
imageImage.AlternateText = (!string.IsNullOrWhiteSpace (image.Alt))? image.Alt :
(!string.IsNullOrWhiteSpace (image.Title))? image.Title :
string.Format (LocalizeString ("AltAuto.Format"), ModuleConfiguration.ModuleTitle, e.Item.ItemIndex);

imageImage.ToolTip = (!string.IsNullOrWhiteSpace (image.Title))? image.Title : image.Alt;
Expand Down

0 comments on commit 080c37e

Please sign in to comment.