Skip to content

Commit

Permalink
Library updates
Browse files Browse the repository at this point in the history
  • Loading branch information
PeteGCole committed Apr 26, 2019
1 parent 3d2bab6 commit fe33aca
Show file tree
Hide file tree
Showing 25 changed files with 21,971 additions and 11,086 deletions.
13 changes: 9 additions & 4 deletions ScriptXJSTest/ScriptXJSTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<Use64BitIISExpress />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -136,9 +137,13 @@
<Content Include="Scripts\bootstrap.js" />
<Content Include="Scripts\bootstrap.min.js" />
<None Include="bundleconfig.json" />
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
<Content Include="Scripts\jquery-1.10.2.js" />
<Content Include="Scripts\jquery-1.10.2.min.js" />
<None Include="Scripts\jquery-3.3.1.intellisense.js" />
<Content Include="Scripts\jquery-3.3.1.js" />
<Content Include="Scripts\jquery-3.3.1.min.js" />
<Content Include="Scripts\jquery-3.3.1.slim.js" />
<Content Include="Scripts\jquery-3.3.1.slim.min.js" />
<Content Include="Scripts\jquery-3.3.1.slim.min.map" />
<Content Include="Scripts\jquery-3.3.1.min.map" />
<None Include="Scripts\jquery.validate-vsdoc.js" />
<Content Include="Scripts\jquery.validate.js" />
<Content Include="Scripts\jquery.validate.min.js" />
Expand All @@ -150,6 +155,7 @@
<Content Include="Scripts\MeadCo.ScriptX\meadco-scriptxprint.js" />
<Content Include="Scripts\MeadCo.ScriptX\meadco-scriptxprinthtml.js" />
<Content Include="Scripts\MeadCo.ScriptX\meadco-scriptxprintlicensing.js" />
<Content Include="Scripts\MeadCo.ScriptX\meadco-scriptxprintpdf.js" />
<Content Include="Scripts\MeadCo.ScriptX\meadco-secmgr.js" />
<Content Include="Scripts\modernizr-2.6.2.js" />
<Content Include="Scripts\promise.min.js" />
Expand Down Expand Up @@ -184,7 +190,6 @@
<SubType>Designer</SubType>
</Content>
<None Include="Project_Readme.html" />
<Content Include="Scripts\jquery-1.10.2.min.map" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

var ui = MeadCo.createNS("MeadCo.ScriptX.Print.UI");

ui.moduleversion = "1.4.8.0";
ui.moduleversion = "1.5.7.0";

// MeadCo.ScriptX.Print.UI.AttachPrintAction(
// el - clickable html element
Expand Down Expand Up @@ -59,7 +59,9 @@
});

// MeadCo.ScriptX.Print.UI.PageSetup()
ui.PageSetup = function () {
ui.PageSetup = function (fnCallBack) {
var bAccepted = false;

// page setup modal to attach to the page
if (!$('#dlg-printoptions').length) {
var dlg = '<style>' +
Expand Down Expand Up @@ -224,12 +226,6 @@
'<!-- /.modal -->';
$('body').append(dlg);

$('#btn-saveoptions').click(function (ev) {
ev.preventDefault();
savePageSetup();
$('#dlg-printoptions').modal('hide');
});

$('[name="fld-measure"]').on('change', function () {
switch ($(this).val()) {
case '2': // mm from inches
Expand All @@ -251,6 +247,24 @@
}
}

// reattach click handler as callback function scoped variables may (probably will) have changed
$('#btn-saveoptions')
.off("click")
.on("click", function (ev) {
ev.preventDefault();
savePageSetup();
bAccepted = true;
$('#dlg-printoptions').modal('hide');
});

$("#dlg-printoptions")
.off('hidden.bs.modal')
.on('hidden.bs.modal', function () {
if (typeof fnCallBack === "function") {
fnCallBack(bAccepted);
}
});

var $dlg = $('#dlg-printoptions');
var settings = MeadCo.ScriptX.Print.HTML.settings;

Expand Down Expand Up @@ -289,6 +303,7 @@

// MeadCo.ScriptX.Print.UI.PrinterSettings()
ui.PrinterSettings = function (fnCallBack) {
var bAccepted = false;
// printer settings modal to attach to the page
if (!$('#dlg-printersettings').length) {
var dlg = '<style>' +
Expand Down Expand Up @@ -387,17 +402,15 @@
.on("click", function (ev) {
ev.preventDefault();
savePrinterSettings();
bAccepted = true;
$('#dlg-printersettings').modal('hide');
if (typeof fnCallBack === "function") {
fnCallBack(true);
}
});

$("#dlg-printersettings")
.off('hidden.bs.modal')
.on('hidden.bs.modal', function () {
if (typeof fnCallBack === "function") {
fnCallBack(false);
fnCallBack(bAccepted);
}
});

Expand Down Expand Up @@ -526,7 +539,7 @@
$el.val(((parseFloat($el.val()) * 2540) / 100).toFixed(2));
}

// convery the current mm value in the control to inches
// convert the current mm value in the control to inches
function convertAndDisplayMMtoInches($el) {
$el.val(((parseFloat($el.val()) * 100) / 2540).toFixed(2));
}
Expand Down
Loading

0 comments on commit fe33aca

Please sign in to comment.