Update general ledger for new Fancybox

This commit is contained in:
Rick Falkvinge
2018-02-21 20:36:05 +01:00
parent 2d3e2558b0
commit 9686ac0901
3 changed files with 15 additions and 15 deletions
+4 -13
View File
@@ -4,11 +4,7 @@
<%@ Register TagPrefix="Swarmops5" TagName="ModalDialog" Src="~/Controls/v5/Base/ModalDialog.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<script type="text/javascript" src="/Scripts/fancybox/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="/Scripts/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="/Scripts/jquery.snipe.js"></script>
<link rel="stylesheet" type="text/css" href="/Scripts/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<Swarmops5:ExternalScripts Package="FancyBox" ID="ScriptFancyBox" runat="server"/>
<script type="text/javascript">
$(document).ready(function() {
@@ -59,6 +55,7 @@
inspectingTransactionId = $(this).attr("txId");
onFlagTransaction("Add Tx Id here");
});
$('img.LocalIconInspect').click(function() {
onInspectTransaction($(this).attr("txId"));
});
@@ -104,16 +101,10 @@
grandParent.siblings().css("border-top", "1px solid #444");
});
$("a.FancyBox_Gallery").fancybox({
'overlayShow': true,
'transitionIn': 'fade',
'transitionOut': 'fade',
'type': 'image',
'opacity': true
});
SwarmopsJS.fancyBoxInit("a.FancyBox_Gallery");
$("img.LocalIconGeneralViewDoc").click(function() {
$("a.FancyBox_Gallery[rel='" + $(this).attr("txId") + "']").first().click();
$("a.FancyBox_Gallery[data-fancybox='" + $(this).attr("txId") + "']").first().click();
});
}
}
+9
View File
@@ -12,6 +12,15 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers {
public partial class InspectLedgers {
/// <summary>
/// ScriptFancyBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Swarmops.Frontend.Controls.Meta.ExternalScripts ScriptFancyBox;
/// <summary>
/// LiteralErrorAddRowSelectAccount control.
/// </summary>
@@ -126,8 +126,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
{
foreach (Document doc in documents)
{
actionHtml += String.Format("<a href='/Pages/v5/Support/StreamUpload.aspx?DocId={0}&hq=1&title='{1}' class='FancyBox_Gallery' rel='{2}'>&nbsp;</a>",
doc.Identity, doc.ClientFileName, transaction.Identity);
actionHtml += String.Format("<a href='/Pages/v5/Support/StreamUpload.aspx?DocId={0}&hq=1 data-caption=\"{1}\" class='FancyBox_Gallery' data-fancybox='{2}'>&nbsp;</a>",
doc.Identity, doc.ClientFileName.Replace("\"", "'"), transaction.Identity);
}
actionHtml = String.Format(hasDoxString, row.FinancialTransactionId.ToString(CultureInfo.InvariantCulture)) + "<span class='hiddenDocLinks'>" + actionHtml + "</span>";