Skip to content

Commit fe33aca

Browse files
committed
Library updates
1 parent 3d2bab6 commit fe33aca

25 files changed

Lines changed: 21971 additions & 11086 deletions

ScriptXJSTest/ScriptXJSTest.csproj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<UseGlobalApplicationHostFile />
2626
<NuGetPackageImportStamp>
2727
</NuGetPackageImportStamp>
28+
<Use64BitIISExpress />
2829
</PropertyGroup>
2930
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3031
<DebugSymbols>true</DebugSymbols>
@@ -136,9 +137,13 @@
136137
<Content Include="Scripts\bootstrap.js" />
137138
<Content Include="Scripts\bootstrap.min.js" />
138139
<None Include="bundleconfig.json" />
139-
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
140-
<Content Include="Scripts\jquery-1.10.2.js" />
141-
<Content Include="Scripts\jquery-1.10.2.min.js" />
140+
<None Include="Scripts\jquery-3.3.1.intellisense.js" />
141+
<Content Include="Scripts\jquery-3.3.1.js" />
142+
<Content Include="Scripts\jquery-3.3.1.min.js" />
143+
<Content Include="Scripts\jquery-3.3.1.slim.js" />
144+
<Content Include="Scripts\jquery-3.3.1.slim.min.js" />
145+
<Content Include="Scripts\jquery-3.3.1.slim.min.map" />
146+
<Content Include="Scripts\jquery-3.3.1.min.map" />
142147
<None Include="Scripts\jquery.validate-vsdoc.js" />
143148
<Content Include="Scripts\jquery.validate.js" />
144149
<Content Include="Scripts\jquery.validate.min.js" />
@@ -150,6 +155,7 @@
150155
<Content Include="Scripts\MeadCo.ScriptX\meadco-scriptxprint.js" />
151156
<Content Include="Scripts\MeadCo.ScriptX\meadco-scriptxprinthtml.js" />
152157
<Content Include="Scripts\MeadCo.ScriptX\meadco-scriptxprintlicensing.js" />
158+
<Content Include="Scripts\MeadCo.ScriptX\meadco-scriptxprintpdf.js" />
153159
<Content Include="Scripts\MeadCo.ScriptX\meadco-secmgr.js" />
154160
<Content Include="Scripts\modernizr-2.6.2.js" />
155161
<Content Include="Scripts\promise.min.js" />
@@ -184,7 +190,6 @@
184190
<SubType>Designer</SubType>
185191
</Content>
186192
<None Include="Project_Readme.html" />
187-
<Content Include="Scripts\jquery-1.10.2.min.map" />
188193
</ItemGroup>
189194
<PropertyGroup>
190195
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

ScriptXJSTest/Scripts/MeadCo.ScriptX/jQuery-MeadCo.ScriptX.Print.UI.js

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

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

28-
ui.moduleversion = "1.4.8.0";
28+
ui.moduleversion = "1.5.7.0";
2929

3030
// MeadCo.ScriptX.Print.UI.AttachPrintAction(
3131
// el - clickable html element
@@ -59,7 +59,9 @@
5959
});
6060

6161
// MeadCo.ScriptX.Print.UI.PageSetup()
62-
ui.PageSetup = function () {
62+
ui.PageSetup = function (fnCallBack) {
63+
var bAccepted = false;
64+
6365
// page setup modal to attach to the page
6466
if (!$('#dlg-printoptions').length) {
6567
var dlg = '<style>' +
@@ -224,12 +226,6 @@
224226
'<!-- /.modal -->';
225227
$('body').append(dlg);
226228

227-
$('#btn-saveoptions').click(function (ev) {
228-
ev.preventDefault();
229-
savePageSetup();
230-
$('#dlg-printoptions').modal('hide');
231-
});
232-
233229
$('[name="fld-measure"]').on('change', function () {
234230
switch ($(this).val()) {
235231
case '2': // mm from inches
@@ -251,6 +247,24 @@
251247
}
252248
}
253249

250+
// reattach click handler as callback function scoped variables may (probably will) have changed
251+
$('#btn-saveoptions')
252+
.off("click")
253+
.on("click", function (ev) {
254+
ev.preventDefault();
255+
savePageSetup();
256+
bAccepted = true;
257+
$('#dlg-printoptions').modal('hide');
258+
});
259+
260+
$("#dlg-printoptions")
261+
.off('hidden.bs.modal')
262+
.on('hidden.bs.modal', function () {
263+
if (typeof fnCallBack === "function") {
264+
fnCallBack(bAccepted);
265+
}
266+
});
267+
254268
var $dlg = $('#dlg-printoptions');
255269
var settings = MeadCo.ScriptX.Print.HTML.settings;
256270

@@ -289,6 +303,7 @@
289303

290304
// MeadCo.ScriptX.Print.UI.PrinterSettings()
291305
ui.PrinterSettings = function (fnCallBack) {
306+
var bAccepted = false;
292307
// printer settings modal to attach to the page
293308
if (!$('#dlg-printersettings').length) {
294309
var dlg = '<style>' +
@@ -387,17 +402,15 @@
387402
.on("click", function (ev) {
388403
ev.preventDefault();
389404
savePrinterSettings();
405+
bAccepted = true;
390406
$('#dlg-printersettings').modal('hide');
391-
if (typeof fnCallBack === "function") {
392-
fnCallBack(true);
393-
}
394407
});
395408

396409
$("#dlg-printersettings")
397410
.off('hidden.bs.modal')
398411
.on('hidden.bs.modal', function () {
399412
if (typeof fnCallBack === "function") {
400-
fnCallBack(false);
413+
fnCallBack(bAccepted);
401414
}
402415
});
403416

@@ -526,7 +539,7 @@
526539
$el.val(((parseFloat($el.val()) * 2540) / 100).toFixed(2));
527540
}
528541

529-
// convery the current mm value in the control to inches
542+
// convert the current mm value in the control to inches
530543
function convertAndDisplayMMtoInches($el) {
531544
$el.val(((parseFloat($el.val()) * 100) / 2540).toFixed(2));
532545
}

0 commit comments

Comments
 (0)