Work on PDF conversion
This commit is contained in:
@@ -18,18 +18,11 @@
|
||||
$('#<%=this.ClientID %>_ButtonUploadHidden').fileupload({
|
||||
url: '/Automation/UploadFileHandler.ashx?Guid=<%= GuidString %>&Filter=<%=Filter %>',
|
||||
dataType: 'json',
|
||||
done: function(e, data) {
|
||||
done: function (e, data) {
|
||||
var pdfConversionNeeded = false;
|
||||
$.each(data.result, function(index, file) {
|
||||
if (file.error == null || file.error.length < 1) {
|
||||
$('#<%=this.ClientID %>_DivUploadCount').append(imageUploadSuccess);
|
||||
|
||||
<% if (!String.IsNullOrEmpty(this.ClientUploadCompleteCallback))
|
||||
{ %>
|
||||
|
||||
<%= this.ClientUploadCompleteCallback %>("<%= GuidString%>", "<%= Cookie%>");
|
||||
|
||||
<% } %>
|
||||
|
||||
} else {
|
||||
$('#<%=this.ClientID %>_DivUploadCount').append(imageUploadFail); // Assume ERR_NOT_IMAGE
|
||||
alertify.error('File "' + file.name + '" could not be uploaded. Is it really an image?');
|
||||
@@ -37,7 +30,20 @@
|
||||
|
||||
});
|
||||
$('#<%=this.ClientID %>_DivProgressUpload').progressbar({ value: 100 });
|
||||
$('#<%=this.ClientID %>_DivProgressUpload').fadeOut('400', function () { $('#<%=this.ClientID %>_DivUploadCount').fadeIn(); });
|
||||
if (pdfConversionNeeded) {
|
||||
$('#<%=this.ClientID %>_DivProgressPdfConversion').progressbar({ value: 1 });
|
||||
$('#<%=this.ClientID %>_DivMainControlArea').fadeOut('400', function() { $('#<%=this.ClientID %>_DivPdfConverting').fadeIn(); });
|
||||
} else {
|
||||
|
||||
<% if (!String.IsNullOrEmpty(this.ClientUploadCompleteCallback))
|
||||
{ %>
|
||||
|
||||
<%= this.ClientUploadCompleteCallback %>("<%= GuidString%>", "<%= Cookie%>");
|
||||
|
||||
<% } %>
|
||||
|
||||
$('#<%=this.ClientID %>_DivProgressUpload').fadeOut('400', function() { $('#<%=this.ClientID %>_DivUploadCount').fadeIn(); });
|
||||
}
|
||||
},
|
||||
progressall: function(e, data) {
|
||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||
@@ -49,6 +55,7 @@
|
||||
add: function(e, data) {
|
||||
$('#<%=this.ClientID %>_DivUploadCount').css('display', 'none');
|
||||
$('#<%=this.ClientID %>_DivProgressUpload').progressbar({ value: 0 }); // reset in case of previous uploads on this page
|
||||
$('#<%=this.ClientID %>_DivProgressPdfConvert').progressbar({ value: 0 });
|
||||
$('#<%=this.ClientID %>_DivProgressUpload').fadeIn();
|
||||
data.submit();
|
||||
|
||||
@@ -66,12 +73,51 @@
|
||||
$('#<%=this.ClientID %>_ButtonUploadHidden').click();
|
||||
});
|
||||
|
||||
|
||||
$('#<%=this.ClientID %>_DivProgressUpload').progressbar({ value: 0, max: 100 });
|
||||
$('#<%=this.ClientID %>_DivProgressPdfConvert').progressbar({ value: 0, max: 100 });
|
||||
|
||||
});
|
||||
|
||||
function <%=this.ClientID%>_repingPdfProgress() {
|
||||
|
||||
var jsonData = {};
|
||||
jsonData.guid = "Pdf-<%=GuidString%>";
|
||||
|
||||
SwarmopsJS.ajaxCall(
|
||||
"/Automation/Json-ByGuid.aspx/GetProgress2",
|
||||
jsonData,
|
||||
function(result) {
|
||||
},
|
||||
function(error) {
|
||||
}
|
||||
);
|
||||
|
||||
SwarmopsJS.ajaxCall()
|
||||
setTimeout(function() { <%=this.ClientID%>_repingPdfProgress(); }, 500);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class="stacked-input-control"><div class="buttonUploadFile"><input id="<%=this.ClientID %>_ButtonUploadVisible" class="ButtonSwarmopsUpload NoInputFocus" type="button" <%= this.HideTrigger? "style='display:none'" : string.Empty %> /><input id="<%=this.ClientID %>_ButtonUploadHidden" type="file" name="files[]" multiple style="display:none" /></div><div style="height:36px;padding-top:4px;width:270px;margin-right:10px;float:right;border:none"><div id="<%=this.ClientID %>_DivUploadCount" style='display:none;overflow:hidden;height:'<%=this.DisplayCount < 9? 32: 64%>px'></div><div id="<%=this.ClientID %>_DivProgressUpload" style="width:100%;margin-top:8px;display:none"></div></div></div>
|
||||
<div class="stacked-input-control">
|
||||
<div id="<%=this.ClientID %>_DivMainControlArea">
|
||||
<div class="buttonUploadFile">
|
||||
<input id="<%=this.ClientID %>_ButtonUploadVisible" class="ButtonSwarmopsUpload NoInputFocus" type="button" <%= this.HideTrigger? "style='display:none'" : string.Empty %> /><input id="<%=this.ClientID %>_ButtonUploadHidden" type="file" name="files[]" multiple style="display:none" />
|
||||
</div>
|
||||
<div style="height:36px;padding-top:4px;width:270px;margin-right:10px;float:right;border:none">
|
||||
<div id="<%=this.ClientID %>_DivUploadCount" style='display:none;overflow:hidden;height:'<%=this.DisplayCount < 9? 32: 64%>px'></div>
|
||||
<div id="<%=this.ClientID %>_DivProgressUpload" style="width:100%;margin-top:8px;display:none"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stacked-input-control">
|
||||
<div id="<%=this.ClientID %>_DivPdfConverting">
|
||||
<div style="position:relative">
|
||||
<div style="position: absolute; top: 0; left: 0; z-index:0"><img src="/Images/Icons/iconshock-pdf-128px.png" height="32" width="32"/>
|
||||
<div style="position: absolute; top: 0; left: 0; z-index:1"><img src="/Images/Abstract/ajaxloader-48x36px.gif" height="32" width="32"/></div>
|
||||
<div id="<%=this.ClientID %>_DivProgressPdfConvert" style="position: absolute; top: 8px; left: 40px; width:100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Financial.FileExpenseClaim" Codebehind="FileExpenseClaim.aspx.cs" %>
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Financial.FileExpenseClaim" CodeFile="FileExpenseClaim.aspx.cs" Codebehind="FileExpenseClaim.aspx.cs" %>
|
||||
<%@ Register src="~/Controls/v5/Base/FileUpload.ascx" tagname="FileUpload" tagprefix="Swarmops5" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="ComboBudgets" Src="~/Controls/v5/Financial/ComboBudgets.ascx" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="Currency" Src="~/Controls/v5/Financial/CurrencyTextBox.ascx" %>
|
||||
|
||||
@@ -267,8 +267,11 @@ namespace Swarmops.Site.Pages.Ledgers
|
||||
return "(Instruct Stock-SE-SEB)";
|
||||
case 2:
|
||||
return "(Instruct Stock-Global-Paypal)";
|
||||
case 150:
|
||||
return "(Instruct Stock-DE-Postbank)";
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
background-position: left;
|
||||
padding-left: 2px;
|
||||
margin-left: 4px;
|
||||
margin-right: 8px;
|
||||
margin-right: 2px;
|
||||
background-repeat: no-repeat;
|
||||
width: 70px;
|
||||
height: 48px;
|
||||
|
||||
@@ -51,7 +51,17 @@ namespace Swarmops.Frontend.Pages.v5.Security
|
||||
|
||||
Document logoLandscape = organization.LogoLandscape;
|
||||
|
||||
newOrganizationParameters.LogoImage = logoLandscape.Image.GetBase64(70, 48);
|
||||
try
|
||||
{
|
||||
if (logoLandscape != null)
|
||||
{
|
||||
newOrganizationParameters.LogoImage = logoLandscape.Image.GetBase64(64, 36);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
newOrganizationParameters.LogoImage = "/Images/Flags/txl-64px.png";
|
||||
}
|
||||
newOrganizationParameters.OrganizationId = membership.OrganizationId;
|
||||
newOrganizationParameters.OrganizationName = membership.Organization.Name;
|
||||
|
||||
|
||||
@@ -730,6 +730,7 @@
|
||||
<Content Include="Images\Abstract\ajaxloader-medium.gif" />
|
||||
<Content Include="Images\Abstract\easyui-elements-downarrow.gif" />
|
||||
<Content Include="Images\Abstract\swarmops-progressbar-animation.gif" />
|
||||
<Content Include="Images\Icons\iconshock-pdf-128px.png" />
|
||||
<Content Include="Images\Other\blank-logo-640x360.png" />
|
||||
<Content Include="Images\Flags\ae-24px.png" />
|
||||
<Content Include="Images\Flags\ae-64px.png" />
|
||||
|
||||
Reference in New Issue
Block a user