@sv-print/hiprint 0.1.7-beta3 → 0.1.7-beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +116 -116
- package/dist/index.mjs +1255 -1251
- package/dist/index.umd.js +116 -116
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3112,11 +3112,11 @@ var At = function(q) {
|
|
|
3112
3112
|
function n() {
|
|
3113
3113
|
this.name = "lineHeight";
|
|
3114
3114
|
}
|
|
3115
|
-
return n.prototype.css = function(
|
|
3116
|
-
if (
|
|
3115
|
+
return n.prototype.css = function(e, B) {
|
|
3116
|
+
if (e && e.length) {
|
|
3117
3117
|
if (B)
|
|
3118
|
-
return
|
|
3119
|
-
|
|
3118
|
+
return e.css("line-height", B + "pt"), "line-height:" + B + "pt";
|
|
3119
|
+
e[0].style.lineHeight = "";
|
|
3120
3120
|
}
|
|
3121
3121
|
return null;
|
|
3122
3122
|
}, n.prototype.createTarget = function() {
|
|
@@ -3174,11 +3174,11 @@ var At = function(q) {
|
|
|
3174
3174
|
</div>`
|
|
3175
3175
|
), this.target;
|
|
3176
3176
|
}, n.prototype.getValue = function() {
|
|
3177
|
-
var
|
|
3178
|
-
if (
|
|
3179
|
-
return parseFloat(
|
|
3180
|
-
}, n.prototype.setValue = function(
|
|
3181
|
-
|
|
3177
|
+
var e = this.target.find("select").val();
|
|
3178
|
+
if (e)
|
|
3179
|
+
return parseFloat(e.toString());
|
|
3180
|
+
}, n.prototype.setValue = function(e) {
|
|
3181
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
3182
3182
|
}, n.prototype.destroy = function() {
|
|
3183
3183
|
this.target.remove();
|
|
3184
3184
|
}, n;
|
|
@@ -3186,9 +3186,9 @@ var At = function(q) {
|
|
|
3186
3186
|
function n() {
|
|
3187
3187
|
this.name = "fontFamily";
|
|
3188
3188
|
}
|
|
3189
|
-
return n.prototype.createTarget = function(
|
|
3189
|
+
return n.prototype.createTarget = function(e) {
|
|
3190
3190
|
var B = void 0;
|
|
3191
|
-
if (
|
|
3191
|
+
if (e && (B = e.getFontList()), B) {
|
|
3192
3192
|
var Q = ` <div class="hiprint-option-item hiprint-option-item-row">
|
|
3193
3193
|
<div class="hiprint-option-item-label">
|
|
3194
3194
|
\u5B57\u4F53
|
|
@@ -3217,19 +3217,19 @@ var At = function(q) {
|
|
|
3217
3217
|
</div>`
|
|
3218
3218
|
);
|
|
3219
3219
|
return this.target;
|
|
3220
|
-
}, n.prototype.css = function(
|
|
3221
|
-
if (
|
|
3220
|
+
}, n.prototype.css = function(e, B) {
|
|
3221
|
+
if (e && e.length) {
|
|
3222
3222
|
if (B)
|
|
3223
|
-
return
|
|
3224
|
-
|
|
3223
|
+
return e.css("font-family", B), "font-family:" + B;
|
|
3224
|
+
e[0].style.fontFamily = "inherit";
|
|
3225
3225
|
}
|
|
3226
3226
|
return null;
|
|
3227
3227
|
}, n.prototype.getValue = function() {
|
|
3228
|
-
var
|
|
3229
|
-
if (
|
|
3230
|
-
return
|
|
3231
|
-
}, n.prototype.setValue = function(
|
|
3232
|
-
|
|
3228
|
+
var e = this.target.find("select").val();
|
|
3229
|
+
if (e)
|
|
3230
|
+
return e.toString();
|
|
3231
|
+
}, n.prototype.setValue = function(e) {
|
|
3232
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
3233
3233
|
}, n.prototype.destroy = function() {
|
|
3234
3234
|
this.target.remove();
|
|
3235
3235
|
}, n;
|
|
@@ -3237,11 +3237,11 @@ var At = function(q) {
|
|
|
3237
3237
|
function n() {
|
|
3238
3238
|
this.name = "fontSize";
|
|
3239
3239
|
}
|
|
3240
|
-
return n.prototype.css = function(
|
|
3241
|
-
if (
|
|
3240
|
+
return n.prototype.css = function(e, B) {
|
|
3241
|
+
if (e && e.length) {
|
|
3242
3242
|
if (B)
|
|
3243
|
-
return
|
|
3244
|
-
|
|
3243
|
+
return e.css("font-size", B + "pt"), "font-size:" + B + "pt";
|
|
3244
|
+
e[0].style.fontSize = "";
|
|
3245
3245
|
}
|
|
3246
3246
|
return null;
|
|
3247
3247
|
}, n.prototype.createTarget = function() {
|
|
@@ -3280,11 +3280,11 @@ var At = function(q) {
|
|
|
3280
3280
|
</div>`
|
|
3281
3281
|
), this.target;
|
|
3282
3282
|
}, n.prototype.getValue = function() {
|
|
3283
|
-
var
|
|
3284
|
-
if (
|
|
3285
|
-
return parseFloat(
|
|
3286
|
-
}, n.prototype.setValue = function(
|
|
3287
|
-
|
|
3283
|
+
var e = this.target.find("select").val();
|
|
3284
|
+
if (e)
|
|
3285
|
+
return parseFloat(e.toString());
|
|
3286
|
+
}, n.prototype.setValue = function(e) {
|
|
3287
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
3288
3288
|
}, n.prototype.destroy = function() {
|
|
3289
3289
|
this.target.remove();
|
|
3290
3290
|
}, n;
|
|
@@ -3292,11 +3292,11 @@ var At = function(q) {
|
|
|
3292
3292
|
function n() {
|
|
3293
3293
|
this.name = "fontWeight";
|
|
3294
3294
|
}
|
|
3295
|
-
return n.prototype.css = function(
|
|
3296
|
-
if (
|
|
3295
|
+
return n.prototype.css = function(e, B) {
|
|
3296
|
+
if (e && e.length) {
|
|
3297
3297
|
if (B)
|
|
3298
|
-
return
|
|
3299
|
-
|
|
3298
|
+
return e.css("font-weight", B), "font-weight:" + B;
|
|
3299
|
+
e[0].style.fontWeight = "";
|
|
3300
3300
|
}
|
|
3301
3301
|
return null;
|
|
3302
3302
|
}, n.prototype.createTarget = function() {
|
|
@@ -3325,11 +3325,11 @@ var At = function(q) {
|
|
|
3325
3325
|
</div>`
|
|
3326
3326
|
), this.target;
|
|
3327
3327
|
}, n.prototype.getValue = function() {
|
|
3328
|
-
var
|
|
3329
|
-
if (
|
|
3330
|
-
return
|
|
3331
|
-
}, n.prototype.setValue = function(
|
|
3332
|
-
|
|
3328
|
+
var e = this.target.find("select").val();
|
|
3329
|
+
if (e)
|
|
3330
|
+
return e.toString();
|
|
3331
|
+
}, n.prototype.setValue = function(e) {
|
|
3332
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
3333
3333
|
}, n.prototype.destroy = function() {
|
|
3334
3334
|
this.target.remove();
|
|
3335
3335
|
}, n;
|
|
@@ -3337,11 +3337,11 @@ var At = function(q) {
|
|
|
3337
3337
|
function n() {
|
|
3338
3338
|
this.name = "letterSpacing";
|
|
3339
3339
|
}
|
|
3340
|
-
return n.prototype.css = function(
|
|
3341
|
-
if (
|
|
3340
|
+
return n.prototype.css = function(e, B) {
|
|
3341
|
+
if (e && e.length) {
|
|
3342
3342
|
if (B)
|
|
3343
|
-
return
|
|
3344
|
-
|
|
3343
|
+
return e.css("letter-spacing", B + "pt"), "letter-spacing:" + B + "pt";
|
|
3344
|
+
e[0].style.letterSpacing = "";
|
|
3345
3345
|
}
|
|
3346
3346
|
return null;
|
|
3347
3347
|
}, n.prototype.createTarget = function() {
|
|
@@ -3374,11 +3374,11 @@ var At = function(q) {
|
|
|
3374
3374
|
</div>`
|
|
3375
3375
|
), this.target;
|
|
3376
3376
|
}, n.prototype.getValue = function() {
|
|
3377
|
-
var
|
|
3378
|
-
if (
|
|
3379
|
-
return parseFloat(
|
|
3380
|
-
}, n.prototype.setValue = function(
|
|
3381
|
-
|
|
3377
|
+
var e = this.target.find("select").val();
|
|
3378
|
+
if (e)
|
|
3379
|
+
return parseFloat(e.toString());
|
|
3380
|
+
}, n.prototype.setValue = function(e) {
|
|
3381
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
3382
3382
|
}, n.prototype.destroy = function() {
|
|
3383
3383
|
this.target.remove();
|
|
3384
3384
|
}, n;
|
|
@@ -3386,11 +3386,11 @@ var At = function(q) {
|
|
|
3386
3386
|
function n() {
|
|
3387
3387
|
this.name = "textAlign";
|
|
3388
3388
|
}
|
|
3389
|
-
return n.prototype.css = function(
|
|
3390
|
-
if (
|
|
3389
|
+
return n.prototype.css = function(e, B) {
|
|
3390
|
+
if (e && e.length) {
|
|
3391
3391
|
if (B)
|
|
3392
|
-
return
|
|
3393
|
-
|
|
3392
|
+
return e.css("text-align", B), B == "justify" ? (e.css("text-align-last", "justify"), e.css("text-justify", "distribute-all-lines")) : (e[0].style.textAlignLast = "", e[0].style.textJustify = ""), "text-align:" + B;
|
|
3393
|
+
e[0].style.textAlign = "", e[0].style.textAlignLast = "", e[0].style.textJustify = "";
|
|
3394
3394
|
}
|
|
3395
3395
|
return null;
|
|
3396
3396
|
}, n.prototype.createTarget = function() {
|
|
@@ -3411,11 +3411,11 @@ var At = function(q) {
|
|
|
3411
3411
|
</div>`
|
|
3412
3412
|
), this.target;
|
|
3413
3413
|
}, n.prototype.getValue = function() {
|
|
3414
|
-
var
|
|
3415
|
-
if (
|
|
3416
|
-
return
|
|
3417
|
-
}, n.prototype.setValue = function(
|
|
3418
|
-
this.target.find("select").val(
|
|
3414
|
+
var e = this.target.find("select").val();
|
|
3415
|
+
if (e)
|
|
3416
|
+
return e.toString();
|
|
3417
|
+
}, n.prototype.setValue = function(e) {
|
|
3418
|
+
this.target.find("select").val(e);
|
|
3419
3419
|
}, n.prototype.destroy = function() {
|
|
3420
3420
|
this.target.remove();
|
|
3421
3421
|
}, n;
|
|
@@ -3441,8 +3441,8 @@ var At = function(q) {
|
|
|
3441
3441
|
}, n.prototype.getValue = function() {
|
|
3442
3442
|
if (this.target.find("select").val() == "true")
|
|
3443
3443
|
return !0;
|
|
3444
|
-
}, n.prototype.setValue = function(
|
|
3445
|
-
this.target.find("select").val((
|
|
3444
|
+
}, n.prototype.setValue = function(e) {
|
|
3445
|
+
this.target.find("select").val((e == null ? "" : e).toString());
|
|
3446
3446
|
}, n.prototype.destroy = function() {
|
|
3447
3447
|
this.target.remove();
|
|
3448
3448
|
}, n;
|
|
@@ -3450,11 +3450,11 @@ var At = function(q) {
|
|
|
3450
3450
|
function n() {
|
|
3451
3451
|
this.name = "tableBorder";
|
|
3452
3452
|
}
|
|
3453
|
-
return n.prototype.css = function(
|
|
3454
|
-
if (
|
|
3453
|
+
return n.prototype.css = function(e, B) {
|
|
3454
|
+
if (e.find("table").length) {
|
|
3455
3455
|
if (B == "border" || B == null)
|
|
3456
|
-
return
|
|
3457
|
-
B == "noBorder" ?
|
|
3456
|
+
return e.find("table").css("border", "1px solid"), "border:1px solid";
|
|
3457
|
+
B == "noBorder" ? e.find("table").css("border", "0px solid") : e.find("table")[0].style.border = "";
|
|
3458
3458
|
}
|
|
3459
3459
|
return null;
|
|
3460
3460
|
}, n.prototype.createTarget = function() {
|
|
@@ -3473,11 +3473,11 @@ var At = function(q) {
|
|
|
3473
3473
|
</div>`
|
|
3474
3474
|
), this.target;
|
|
3475
3475
|
}, n.prototype.getValue = function() {
|
|
3476
|
-
var
|
|
3477
|
-
if (
|
|
3478
|
-
return
|
|
3479
|
-
}, n.prototype.setValue = function(
|
|
3480
|
-
this.target.find("select").val(
|
|
3476
|
+
var e = this.target.find("select").val();
|
|
3477
|
+
if (e)
|
|
3478
|
+
return e.toString();
|
|
3479
|
+
}, n.prototype.setValue = function(e) {
|
|
3480
|
+
this.target.find("select").val(e);
|
|
3481
3481
|
}, n.prototype.destroy = function() {
|
|
3482
3482
|
this.target.remove();
|
|
3483
3483
|
}, n;
|
|
@@ -3485,11 +3485,11 @@ var At = function(q) {
|
|
|
3485
3485
|
function n() {
|
|
3486
3486
|
this.name = "tableHeaderBorder";
|
|
3487
3487
|
}
|
|
3488
|
-
return n.prototype.css = function(
|
|
3489
|
-
if (
|
|
3488
|
+
return n.prototype.css = function(e, B) {
|
|
3489
|
+
if (e.find("thead tr").length) {
|
|
3490
3490
|
if (B == "border" || B == null)
|
|
3491
|
-
return
|
|
3492
|
-
B == "noBorder" ?
|
|
3491
|
+
return e.find("thead tr").css("border", "1px solid"), "border:1pt solid";
|
|
3492
|
+
B == "noBorder" ? e.find("thead tr").css("border", "0px solid") : B == "topBorder" ? (e.find("thead tr").css("border", "0px solid"), e.find("thead tr").css("border-top", "1px solid")) : B == "bottomBorder" ? (e.find("thead tr").css("border", "0px solid"), e.find("thead tr").css("border-bottom", "1px solid")) : B == "topBottomBorder" ? (e.find("thead tr").css("border", "0px solid"), e.find("thead tr").css("border-top", "1px solid"), e.find("thead tr").css("border-bottom", "1px solid")) : e.find("thead tr").map(function(Q, at) {
|
|
3493
3493
|
at.style.border = "";
|
|
3494
3494
|
});
|
|
3495
3495
|
}
|
|
@@ -3513,11 +3513,11 @@ var At = function(q) {
|
|
|
3513
3513
|
</div>`
|
|
3514
3514
|
), this.target;
|
|
3515
3515
|
}, n.prototype.getValue = function() {
|
|
3516
|
-
var
|
|
3517
|
-
if (
|
|
3518
|
-
return
|
|
3519
|
-
}, n.prototype.setValue = function(
|
|
3520
|
-
this.target.find("select").val(
|
|
3516
|
+
var e = this.target.find("select").val();
|
|
3517
|
+
if (e)
|
|
3518
|
+
return e.toString();
|
|
3519
|
+
}, n.prototype.setValue = function(e) {
|
|
3520
|
+
this.target.find("select").val(e);
|
|
3521
3521
|
}, n.prototype.destroy = function() {
|
|
3522
3522
|
this.target.remove();
|
|
3523
3523
|
}, n;
|
|
@@ -3525,11 +3525,11 @@ var At = function(q) {
|
|
|
3525
3525
|
function n() {
|
|
3526
3526
|
this.name = "tableHeaderCellBorder";
|
|
3527
3527
|
}
|
|
3528
|
-
return n.prototype.css = function(
|
|
3529
|
-
if (
|
|
3528
|
+
return n.prototype.css = function(e, B) {
|
|
3529
|
+
if (e.find("thead tr td").length) {
|
|
3530
3530
|
if (B == "border" || B == null)
|
|
3531
|
-
return
|
|
3532
|
-
B == "noBorder" ?
|
|
3531
|
+
return e.find("thead tr td").css("border", "1px solid"), "border:1px solid";
|
|
3532
|
+
B == "noBorder" ? e.find("thead tr td").css("border", "0px solid") : e.find("thead tr td").map(function(Q, at) {
|
|
3533
3533
|
at.style.border = "";
|
|
3534
3534
|
});
|
|
3535
3535
|
}
|
|
@@ -3551,11 +3551,11 @@ var At = function(q) {
|
|
|
3551
3551
|
</div>`
|
|
3552
3552
|
), this.target;
|
|
3553
3553
|
}, n.prototype.getValue = function() {
|
|
3554
|
-
var
|
|
3555
|
-
if (
|
|
3556
|
-
return
|
|
3557
|
-
}, n.prototype.setValue = function(
|
|
3558
|
-
this.target.find("select").val(
|
|
3554
|
+
var e = this.target.find("select").val();
|
|
3555
|
+
if (e)
|
|
3556
|
+
return e.toString();
|
|
3557
|
+
}, n.prototype.setValue = function(e) {
|
|
3558
|
+
this.target.find("select").val(e);
|
|
3559
3559
|
}, n.prototype.destroy = function() {
|
|
3560
3560
|
this.target.remove();
|
|
3561
3561
|
}, n;
|
|
@@ -3563,11 +3563,11 @@ var At = function(q) {
|
|
|
3563
3563
|
function n() {
|
|
3564
3564
|
this.name = "tableFooterBorder";
|
|
3565
3565
|
}
|
|
3566
|
-
return n.prototype.css = function(
|
|
3567
|
-
if (
|
|
3566
|
+
return n.prototype.css = function(e, B) {
|
|
3567
|
+
if (e.find("tfoot tr").length) {
|
|
3568
3568
|
if (B == "border" || B == null)
|
|
3569
|
-
return
|
|
3570
|
-
B == "noBorder" ?
|
|
3569
|
+
return e.find("tfoot tr").css("border", "1px solid"), "border:1pt solid";
|
|
3570
|
+
B == "noBorder" ? e.find("tfoot tr").css("border", "0px solid") : B == "topBorder" ? (e.find("tfoot tr").css("border", "0px solid"), e.find("tfoot tr").css("border-top", "1px solid")) : B == "bottomBorder" ? (e.find("tfoot tr").css("border", "0px solid"), e.find("tfoot tr").css("border-bottom", "1px solid")) : B == "topBottomBorder" ? (e.find("tfoot tr").css("border", "0px solid"), e.find("tfoot tr").css("border-top", "1px solid"), e.find("tfoot tr").css("border-bottom", "1px solid")) : e.find("tfoot tr").map(function(Q, at) {
|
|
3571
3571
|
at.style.border = "";
|
|
3572
3572
|
});
|
|
3573
3573
|
}
|
|
@@ -3591,11 +3591,11 @@ var At = function(q) {
|
|
|
3591
3591
|
</div>`
|
|
3592
3592
|
), this.target;
|
|
3593
3593
|
}, n.prototype.getValue = function() {
|
|
3594
|
-
var
|
|
3595
|
-
if (
|
|
3596
|
-
return
|
|
3597
|
-
}, n.prototype.setValue = function(
|
|
3598
|
-
this.target.find("select").val(
|
|
3594
|
+
var e = this.target.find("select").val();
|
|
3595
|
+
if (e)
|
|
3596
|
+
return e.toString();
|
|
3597
|
+
}, n.prototype.setValue = function(e) {
|
|
3598
|
+
this.target.find("select").val(e);
|
|
3599
3599
|
}, n.prototype.destroy = function() {
|
|
3600
3600
|
this.target.remove();
|
|
3601
3601
|
}, n;
|
|
@@ -3603,11 +3603,11 @@ var At = function(q) {
|
|
|
3603
3603
|
function n() {
|
|
3604
3604
|
this.name = "tableFooterCellBorder";
|
|
3605
3605
|
}
|
|
3606
|
-
return n.prototype.css = function(
|
|
3607
|
-
if (
|
|
3606
|
+
return n.prototype.css = function(e, B) {
|
|
3607
|
+
if (e.find("tfoot tr td").length) {
|
|
3608
3608
|
if (B == "border" || B == null)
|
|
3609
|
-
return
|
|
3610
|
-
B == "noBorder" ?
|
|
3609
|
+
return e.find("tfoot tr td").css("border", "1px solid"), "border:1px solid";
|
|
3610
|
+
B == "noBorder" ? e.find("tfoot tr td").css("border", "0px solid") : e.find("tfoot tr td").map(function(Q, at) {
|
|
3611
3611
|
at.style.border = "";
|
|
3612
3612
|
});
|
|
3613
3613
|
}
|
|
@@ -3629,11 +3629,11 @@ var At = function(q) {
|
|
|
3629
3629
|
</div>`
|
|
3630
3630
|
), this.target;
|
|
3631
3631
|
}, n.prototype.getValue = function() {
|
|
3632
|
-
var
|
|
3633
|
-
if (
|
|
3634
|
-
return
|
|
3635
|
-
}, n.prototype.setValue = function(
|
|
3636
|
-
this.target.find("select").val(
|
|
3632
|
+
var e = this.target.find("select").val();
|
|
3633
|
+
if (e)
|
|
3634
|
+
return e.toString();
|
|
3635
|
+
}, n.prototype.setValue = function(e) {
|
|
3636
|
+
this.target.find("select").val(e);
|
|
3637
3637
|
}, n.prototype.destroy = function() {
|
|
3638
3638
|
this.target.remove();
|
|
3639
3639
|
}, n;
|
|
@@ -3641,11 +3641,11 @@ var At = function(q) {
|
|
|
3641
3641
|
function n() {
|
|
3642
3642
|
this.name = "tableHeaderRowHeight";
|
|
3643
3643
|
}
|
|
3644
|
-
return n.prototype.css = function(
|
|
3645
|
-
if (
|
|
3644
|
+
return n.prototype.css = function(e, B) {
|
|
3645
|
+
if (e.find("thead tr td").length) {
|
|
3646
3646
|
if (B)
|
|
3647
|
-
return
|
|
3648
|
-
|
|
3647
|
+
return e.find("thead tr td:not([rowspan])").css("height", B + "pt"), "height:" + B + "pt";
|
|
3648
|
+
e.find("thead tr td").map(function(Q, at) {
|
|
3649
3649
|
at.style.height = "";
|
|
3650
3650
|
});
|
|
3651
3651
|
}
|
|
@@ -3706,11 +3706,11 @@ var At = function(q) {
|
|
|
3706
3706
|
</div>`
|
|
3707
3707
|
), this.target;
|
|
3708
3708
|
}, n.prototype.getValue = function() {
|
|
3709
|
-
var
|
|
3710
|
-
if (
|
|
3711
|
-
return parseFloat(
|
|
3712
|
-
}, n.prototype.setValue = function(
|
|
3713
|
-
|
|
3709
|
+
var e = this.target.find("select").val();
|
|
3710
|
+
if (e)
|
|
3711
|
+
return parseFloat(e.toString());
|
|
3712
|
+
}, n.prototype.setValue = function(e) {
|
|
3713
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
3714
3714
|
}, n.prototype.destroy = function() {
|
|
3715
3715
|
this.target.remove();
|
|
3716
3716
|
}, n;
|
|
@@ -3718,11 +3718,11 @@ var At = function(q) {
|
|
|
3718
3718
|
function n() {
|
|
3719
3719
|
this.name = "tableHeaderFontSize";
|
|
3720
3720
|
}
|
|
3721
|
-
return n.prototype.css = function(
|
|
3722
|
-
if (
|
|
3721
|
+
return n.prototype.css = function(e, B) {
|
|
3722
|
+
if (e.find("thead").length) {
|
|
3723
3723
|
if (B)
|
|
3724
|
-
return
|
|
3725
|
-
|
|
3724
|
+
return e.find("thead").css("font-size", B + "pt"), "font-size:" + B + "pt";
|
|
3725
|
+
e.find("thead").map(function(Q, at) {
|
|
3726
3726
|
at.style.fontSize = "";
|
|
3727
3727
|
});
|
|
3728
3728
|
}
|
|
@@ -3763,11 +3763,11 @@ var At = function(q) {
|
|
|
3763
3763
|
</div>`
|
|
3764
3764
|
), this.target;
|
|
3765
3765
|
}, n.prototype.getValue = function() {
|
|
3766
|
-
var
|
|
3767
|
-
if (
|
|
3768
|
-
return parseFloat(
|
|
3769
|
-
}, n.prototype.setValue = function(
|
|
3770
|
-
|
|
3766
|
+
var e = this.target.find("select").val();
|
|
3767
|
+
if (e)
|
|
3768
|
+
return parseFloat(e.toString());
|
|
3769
|
+
}, n.prototype.setValue = function(e) {
|
|
3770
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
3771
3771
|
}, n.prototype.destroy = function() {
|
|
3772
3772
|
this.target.remove();
|
|
3773
3773
|
}, n;
|
|
@@ -3775,11 +3775,11 @@ var At = function(q) {
|
|
|
3775
3775
|
function n() {
|
|
3776
3776
|
this.name = "tableHeaderFontWeight";
|
|
3777
3777
|
}
|
|
3778
|
-
return n.prototype.css = function(
|
|
3779
|
-
if (
|
|
3778
|
+
return n.prototype.css = function(e, B) {
|
|
3779
|
+
if (e.find("thead").length) {
|
|
3780
3780
|
if (B)
|
|
3781
|
-
return
|
|
3782
|
-
|
|
3781
|
+
return e.find("thead tr td").css("font-weight", B), "font-weight:" + B;
|
|
3782
|
+
e.find("thead tr td").map(function(Q, at) {
|
|
3783
3783
|
at.style.fontWeight = "";
|
|
3784
3784
|
});
|
|
3785
3785
|
}
|
|
@@ -3810,11 +3810,11 @@ var At = function(q) {
|
|
|
3810
3810
|
</div>`
|
|
3811
3811
|
), this.target;
|
|
3812
3812
|
}, n.prototype.getValue = function() {
|
|
3813
|
-
var
|
|
3814
|
-
if (
|
|
3815
|
-
return
|
|
3816
|
-
}, n.prototype.setValue = function(
|
|
3817
|
-
|
|
3813
|
+
var e = this.target.find("select").val();
|
|
3814
|
+
if (e)
|
|
3815
|
+
return e;
|
|
3816
|
+
}, n.prototype.setValue = function(e) {
|
|
3817
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
3818
3818
|
}, n.prototype.destroy = function() {
|
|
3819
3819
|
this.target.remove();
|
|
3820
3820
|
}, n;
|
|
@@ -3822,11 +3822,11 @@ var At = function(q) {
|
|
|
3822
3822
|
function n() {
|
|
3823
3823
|
this.name = "tableBodyCellBorder";
|
|
3824
3824
|
}
|
|
3825
|
-
return n.prototype.css = function(
|
|
3826
|
-
if (
|
|
3825
|
+
return n.prototype.css = function(e, B) {
|
|
3826
|
+
if (e.find("tbody tr td").length) {
|
|
3827
3827
|
if (B == "border" || B == null)
|
|
3828
|
-
return
|
|
3829
|
-
B == "noBorder" ?
|
|
3828
|
+
return e.find("tbody tr td").css("border", "1px solid"), "border:1px solid";
|
|
3829
|
+
B == "noBorder" ? e.find("tbody tr td").css("border", "0px solid") : e.find("tbody tr td").map(function(Q, at) {
|
|
3830
3830
|
at.style.border = "";
|
|
3831
3831
|
});
|
|
3832
3832
|
}
|
|
@@ -3847,11 +3847,11 @@ var At = function(q) {
|
|
|
3847
3847
|
</div>`
|
|
3848
3848
|
), this.target;
|
|
3849
3849
|
}, n.prototype.getValue = function() {
|
|
3850
|
-
var
|
|
3851
|
-
if (
|
|
3852
|
-
return
|
|
3853
|
-
}, n.prototype.setValue = function(
|
|
3854
|
-
this.target.find("select").val(
|
|
3850
|
+
var e = this.target.find("select").val();
|
|
3851
|
+
if (e)
|
|
3852
|
+
return e.toString();
|
|
3853
|
+
}, n.prototype.setValue = function(e) {
|
|
3854
|
+
this.target.find("select").val(e);
|
|
3855
3855
|
}, n.prototype.destroy = function() {
|
|
3856
3856
|
this.target.remove();
|
|
3857
3857
|
}, n;
|
|
@@ -3859,11 +3859,11 @@ var At = function(q) {
|
|
|
3859
3859
|
function n() {
|
|
3860
3860
|
this.name = "tableBodyRowHeight";
|
|
3861
3861
|
}
|
|
3862
|
-
return n.prototype.css = function(
|
|
3863
|
-
if (
|
|
3862
|
+
return n.prototype.css = function(e, B) {
|
|
3863
|
+
if (e.find("tbody tr td").length) {
|
|
3864
3864
|
if (B)
|
|
3865
|
-
return
|
|
3866
|
-
|
|
3865
|
+
return e.find("tbody tr td").css("height", B + "pt"), "height:" + B + "pt";
|
|
3866
|
+
e.find("tbody tr td").map(function(Q, at) {
|
|
3867
3867
|
at.style.height = "";
|
|
3868
3868
|
});
|
|
3869
3869
|
}
|
|
@@ -3923,11 +3923,11 @@ var At = function(q) {
|
|
|
3923
3923
|
</div>`
|
|
3924
3924
|
), this.target;
|
|
3925
3925
|
}, n.prototype.getValue = function() {
|
|
3926
|
-
var
|
|
3927
|
-
if (
|
|
3928
|
-
return parseFloat(
|
|
3929
|
-
}, n.prototype.setValue = function(
|
|
3930
|
-
|
|
3926
|
+
var e = this.target.find("select").val();
|
|
3927
|
+
if (e)
|
|
3928
|
+
return parseFloat(e.toString());
|
|
3929
|
+
}, n.prototype.setValue = function(e) {
|
|
3930
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
3931
3931
|
}, n.prototype.destroy = function() {
|
|
3932
3932
|
this.target.remove();
|
|
3933
3933
|
}, n;
|
|
@@ -3935,11 +3935,11 @@ var At = function(q) {
|
|
|
3935
3935
|
function n() {
|
|
3936
3936
|
this.name = "tableHeaderBackground";
|
|
3937
3937
|
}
|
|
3938
|
-
return n.prototype.css = function(
|
|
3939
|
-
if (
|
|
3938
|
+
return n.prototype.css = function(e, B) {
|
|
3939
|
+
if (e.find("thead").length) {
|
|
3940
3940
|
if (B)
|
|
3941
|
-
return
|
|
3942
|
-
|
|
3941
|
+
return e.find("thead").css("background", B), "background:" + B;
|
|
3942
|
+
e.find("thead").map(function(Q, at) {
|
|
3943
3943
|
at.style.background = "";
|
|
3944
3944
|
});
|
|
3945
3945
|
}
|
|
@@ -3956,14 +3956,14 @@ var At = function(q) {
|
|
|
3956
3956
|
</div>`
|
|
3957
3957
|
), this.target;
|
|
3958
3958
|
}, n.prototype.getValue = function() {
|
|
3959
|
-
var
|
|
3960
|
-
if (
|
|
3961
|
-
return
|
|
3962
|
-
}, n.prototype.setValue = function(
|
|
3959
|
+
var e = this.target.find("input").val();
|
|
3960
|
+
if (e)
|
|
3961
|
+
return e.toString();
|
|
3962
|
+
}, n.prototype.setValue = function(e) {
|
|
3963
3963
|
this.target.find("input").minicolors({
|
|
3964
|
-
defaultValue:
|
|
3964
|
+
defaultValue: e || "",
|
|
3965
3965
|
theme: "bootstrap"
|
|
3966
|
-
}), this.target.find("input").val(
|
|
3966
|
+
}), this.target.find("input").val(e);
|
|
3967
3967
|
}, n.prototype.destroy = function() {
|
|
3968
3968
|
this.target.remove();
|
|
3969
3969
|
}, n;
|
|
@@ -3971,8 +3971,8 @@ var At = function(q) {
|
|
|
3971
3971
|
function n() {
|
|
3972
3972
|
this.name = "borderWidth";
|
|
3973
3973
|
}
|
|
3974
|
-
return n.prototype.createTarget = function(
|
|
3975
|
-
var B = ["hline", "vline", "rect", "oval"].includes(
|
|
3974
|
+
return n.prototype.createTarget = function(e) {
|
|
3975
|
+
var B = ["hline", "vline", "rect", "oval"].includes(e.printElementType.type) ? "\u7EBF\u5BBD" : "\u8FB9\u6846\u5927\u5C0F";
|
|
3976
3976
|
return this.target = x(
|
|
3977
3977
|
` <div class="hiprint-option-item hiprint-option-item-row">
|
|
3978
3978
|
<div class="hiprint-option-item-label">
|
|
@@ -3994,19 +3994,19 @@ var At = function(q) {
|
|
|
3994
3994
|
</div>
|
|
3995
3995
|
</div>`
|
|
3996
3996
|
), this.target;
|
|
3997
|
-
}, n.prototype.css = function(
|
|
3998
|
-
if (
|
|
3997
|
+
}, n.prototype.css = function(e, B) {
|
|
3998
|
+
if (e && e.length) {
|
|
3999
3999
|
if (B)
|
|
4000
|
-
return
|
|
4001
|
-
|
|
4000
|
+
return e.css("border-width", B + "pt"), "border-width:" + B + "pt";
|
|
4001
|
+
e[0].style.borderWidth = "";
|
|
4002
4002
|
}
|
|
4003
4003
|
return null;
|
|
4004
4004
|
}, n.prototype.getValue = function() {
|
|
4005
|
-
var
|
|
4006
|
-
if (
|
|
4007
|
-
return
|
|
4008
|
-
}, n.prototype.setValue = function(
|
|
4009
|
-
|
|
4005
|
+
var e = this.target.find("select").val();
|
|
4006
|
+
if (e)
|
|
4007
|
+
return e.toString();
|
|
4008
|
+
}, n.prototype.setValue = function(e) {
|
|
4009
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
4010
4010
|
}, n.prototype.destroy = function() {
|
|
4011
4011
|
this.target.remove();
|
|
4012
4012
|
}, n;
|
|
@@ -4045,10 +4045,10 @@ var At = function(q) {
|
|
|
4045
4045
|
</div>`
|
|
4046
4046
|
), this.target;
|
|
4047
4047
|
}, n.prototype.getValue = function() {
|
|
4048
|
-
var
|
|
4049
|
-
return
|
|
4050
|
-
}, n.prototype.setValue = function(
|
|
4051
|
-
this.target.find("select").val(
|
|
4048
|
+
var e = this.target.find("select").val();
|
|
4049
|
+
return e || void 0;
|
|
4050
|
+
}, n.prototype.setValue = function(e) {
|
|
4051
|
+
this.target.find("select").val(e);
|
|
4052
4052
|
}, n.prototype.destroy = function() {
|
|
4053
4053
|
this.target.remove();
|
|
4054
4054
|
}, n;
|
|
@@ -4074,10 +4074,10 @@ var At = function(q) {
|
|
|
4074
4074
|
</div>`
|
|
4075
4075
|
), this.target;
|
|
4076
4076
|
}, n.prototype.getValue = function() {
|
|
4077
|
-
var
|
|
4078
|
-
return parseInt(
|
|
4079
|
-
}, n.prototype.setValue = function(
|
|
4080
|
-
this.target.find("select").val(
|
|
4077
|
+
var e = this.target.find("select").val();
|
|
4078
|
+
return parseInt(e || 0);
|
|
4079
|
+
}, n.prototype.setValue = function(e) {
|
|
4080
|
+
this.target.find("select").val(e);
|
|
4081
4081
|
}, n.prototype.destroy = function() {
|
|
4082
4082
|
this.target.remove();
|
|
4083
4083
|
}, n;
|
|
@@ -4085,11 +4085,11 @@ var At = function(q) {
|
|
|
4085
4085
|
function n() {
|
|
4086
4086
|
this.name = "color";
|
|
4087
4087
|
}
|
|
4088
|
-
return n.prototype.css = function(
|
|
4089
|
-
if (
|
|
4088
|
+
return n.prototype.css = function(e, B) {
|
|
4089
|
+
if (e && e.length) {
|
|
4090
4090
|
if (B)
|
|
4091
|
-
return
|
|
4092
|
-
|
|
4091
|
+
return e.css("color", B), "color:" + B;
|
|
4092
|
+
e[0].style.color = "";
|
|
4093
4093
|
}
|
|
4094
4094
|
return null;
|
|
4095
4095
|
}, n.prototype.createTarget = function() {
|
|
@@ -4104,14 +4104,14 @@ var At = function(q) {
|
|
|
4104
4104
|
</div>`
|
|
4105
4105
|
), this.target;
|
|
4106
4106
|
}, n.prototype.getValue = function() {
|
|
4107
|
-
var
|
|
4108
|
-
if (
|
|
4109
|
-
return
|
|
4110
|
-
}, n.prototype.setValue = function(
|
|
4107
|
+
var e = this.target.find("input").val();
|
|
4108
|
+
if (e)
|
|
4109
|
+
return e.toString();
|
|
4110
|
+
}, n.prototype.setValue = function(e) {
|
|
4111
4111
|
this.target.find("input").minicolors({
|
|
4112
|
-
defaultValue:
|
|
4112
|
+
defaultValue: e || "",
|
|
4113
4113
|
theme: "bootstrap"
|
|
4114
|
-
}), this.target.find("input").val(
|
|
4114
|
+
}), this.target.find("input").val(e);
|
|
4115
4115
|
}, n.prototype.destroy = function() {
|
|
4116
4116
|
this.target.remove();
|
|
4117
4117
|
}, n;
|
|
@@ -4136,19 +4136,19 @@ var At = function(q) {
|
|
|
4136
4136
|
</div>
|
|
4137
4137
|
</div>`
|
|
4138
4138
|
), this.target;
|
|
4139
|
-
}, n.prototype.css = function(
|
|
4140
|
-
if (
|
|
4139
|
+
}, n.prototype.css = function(e, B) {
|
|
4140
|
+
if (e && e.length) {
|
|
4141
4141
|
if (B)
|
|
4142
|
-
return
|
|
4143
|
-
|
|
4142
|
+
return e.css("text-decoration", B), "text-decoration:" + B;
|
|
4143
|
+
e[0].style.textDecoration = "";
|
|
4144
4144
|
}
|
|
4145
4145
|
return null;
|
|
4146
4146
|
}, n.prototype.getValue = function() {
|
|
4147
|
-
var
|
|
4148
|
-
if (
|
|
4149
|
-
return
|
|
4150
|
-
}, n.prototype.setValue = function(
|
|
4151
|
-
|
|
4147
|
+
var e = this.target.find("select").val();
|
|
4148
|
+
if (e)
|
|
4149
|
+
return e.toString();
|
|
4150
|
+
}, n.prototype.setValue = function(e) {
|
|
4151
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
4152
4152
|
}, n.prototype.destroy = function() {
|
|
4153
4153
|
this.target.remove();
|
|
4154
4154
|
}, n;
|
|
@@ -4156,9 +4156,9 @@ var At = function(q) {
|
|
|
4156
4156
|
function n() {
|
|
4157
4157
|
this.name = "field";
|
|
4158
4158
|
}
|
|
4159
|
-
return n.prototype.createTarget = function(
|
|
4159
|
+
return n.prototype.createTarget = function(e) {
|
|
4160
4160
|
var B = void 0;
|
|
4161
|
-
if (
|
|
4161
|
+
if (e && (B = e.getFields()), B) {
|
|
4162
4162
|
this.isSelect = !0;
|
|
4163
4163
|
var Q = ` <div class="hiprint-option-item hiprint-option-item-row">
|
|
4164
4164
|
<div class="hiprint-option-item-label">
|
|
@@ -4186,8 +4186,8 @@ var At = function(q) {
|
|
|
4186
4186
|
return this.target;
|
|
4187
4187
|
}, n.prototype.getValue = function() {
|
|
4188
4188
|
return (this.isSelect ? this.target.find("select").val() : this.target.find("input").val()) || void 0;
|
|
4189
|
-
}, n.prototype.setValue = function(
|
|
4190
|
-
this.isSelect ?
|
|
4189
|
+
}, n.prototype.setValue = function(e) {
|
|
4190
|
+
this.isSelect ? e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>"), this.target.find("select").val(e)) : this.target.find("input").val(e);
|
|
4191
4191
|
}, n.prototype.destroy = function() {
|
|
4192
4192
|
this.target.remove();
|
|
4193
4193
|
}, n;
|
|
@@ -4207,11 +4207,11 @@ var At = function(q) {
|
|
|
4207
4207
|
</div>`
|
|
4208
4208
|
), this.target;
|
|
4209
4209
|
}, n.prototype.getValue = function() {
|
|
4210
|
-
var
|
|
4211
|
-
if (
|
|
4212
|
-
return
|
|
4213
|
-
}, n.prototype.setValue = function(
|
|
4214
|
-
this.target.find("textarea").val(
|
|
4210
|
+
var e = this.target.find("textarea").val();
|
|
4211
|
+
if (e)
|
|
4212
|
+
return e;
|
|
4213
|
+
}, n.prototype.setValue = function(e) {
|
|
4214
|
+
this.target.find("textarea").val(e);
|
|
4215
4215
|
}, n.prototype.destroy = function() {
|
|
4216
4216
|
this.target.remove();
|
|
4217
4217
|
}, n;
|
|
@@ -4231,11 +4231,11 @@ var At = function(q) {
|
|
|
4231
4231
|
</div>`
|
|
4232
4232
|
), this.target;
|
|
4233
4233
|
}, n.prototype.getValue = function() {
|
|
4234
|
-
var
|
|
4235
|
-
if (
|
|
4236
|
-
return
|
|
4237
|
-
}, n.prototype.setValue = function(
|
|
4238
|
-
this.target.find("input").val(
|
|
4234
|
+
var e = this.target.find("input").val();
|
|
4235
|
+
if (e)
|
|
4236
|
+
return e.toString();
|
|
4237
|
+
}, n.prototype.setValue = function(e) {
|
|
4238
|
+
this.target.find("input").val(e);
|
|
4239
4239
|
}, n.prototype.destroy = function() {
|
|
4240
4240
|
this.target.remove();
|
|
4241
4241
|
}, n;
|
|
@@ -4243,7 +4243,7 @@ var At = function(q) {
|
|
|
4243
4243
|
function n() {
|
|
4244
4244
|
this.name = "coordinate";
|
|
4245
4245
|
}
|
|
4246
|
-
return n.prototype.createTarget = function(
|
|
4246
|
+
return n.prototype.createTarget = function(e, B) {
|
|
4247
4247
|
var Q = this;
|
|
4248
4248
|
return Q.target = x(
|
|
4249
4249
|
`<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">
|
|
@@ -4254,7 +4254,7 @@ var At = function(q) {
|
|
|
4254
4254
|
</div>
|
|
4255
4255
|
</div>`
|
|
4256
4256
|
), Q.syncLock = B.coordinateSync || !1, Q.createSyncLock(Q.syncLock), Q.target;
|
|
4257
|
-
}, n.prototype.createSyncLock = function(
|
|
4257
|
+
}, n.prototype.createSyncLock = function(e) {
|
|
4258
4258
|
var B = this;
|
|
4259
4259
|
return B.lockTarget = B.syncLock ? x('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u540C\u6B65">\u{1F517}</label>') : x('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u4E0D\u540C\u6B65">\u{1F513}</label>'), B.lockTarget.click(function() {
|
|
4260
4260
|
B.syncLock ? B.lockTarget.text("\u{1F513}").attr("title", "\u4E0D\u540C\u6B65") : B.lockTarget.text("\u{1F517}").attr("title", "\u540C\u6B65"), B.syncLock = !B.syncLock;
|
|
@@ -4263,21 +4263,21 @@ var At = function(q) {
|
|
|
4263
4263
|
}), B.target.find("input:last").change(function() {
|
|
4264
4264
|
B.syncLock && B.target.find("input:first").val(x(this).val());
|
|
4265
4265
|
}), B.lockTarget;
|
|
4266
|
-
}, n.prototype.css = function(
|
|
4267
|
-
if (
|
|
4266
|
+
}, n.prototype.css = function(e) {
|
|
4267
|
+
if (e && e.length && this.target && (e.find(".resize-panel").css("display") == "block" || e[0].className.includes("table")) && this.el == e) {
|
|
4268
4268
|
var B = this.getValue();
|
|
4269
|
-
return
|
|
4269
|
+
return e.css("left", B.left + "pt").css("top", B.top + "pt");
|
|
4270
4270
|
}
|
|
4271
4271
|
return null;
|
|
4272
4272
|
}, n.prototype.getValue = function() {
|
|
4273
|
-
var
|
|
4273
|
+
var e = {
|
|
4274
4274
|
coordinateSync: this.syncLock,
|
|
4275
4275
|
left: 0,
|
|
4276
4276
|
top: 0
|
|
4277
4277
|
};
|
|
4278
|
-
return
|
|
4279
|
-
}, n.prototype.setValue = function(
|
|
4280
|
-
this.el = B.designTarget || B, B.options.coordinate && B.designTarget && B.designTarget.css("left", B.options.left + "pt").css("top", B.options.top + "pt"), this.target.find("input:first").val(
|
|
4278
|
+
return e.left = parseFloat(this.target.find("input:first").val() || 0), e.top = parseFloat(this.target.find("input:last").val() || 0), e;
|
|
4279
|
+
}, n.prototype.setValue = function(e, B) {
|
|
4280
|
+
this.el = B.designTarget || B, B.options.coordinate && B.designTarget && B.designTarget.css("left", B.options.left + "pt").css("top", B.options.top + "pt"), this.target.find("input:first").val(e.left), this.target.find("input:last").val(e.top);
|
|
4281
4281
|
}, n.prototype.destroy = function() {
|
|
4282
4282
|
this.target.remove();
|
|
4283
4283
|
}, n;
|
|
@@ -4285,7 +4285,7 @@ var At = function(q) {
|
|
|
4285
4285
|
function n() {
|
|
4286
4286
|
this.name = "widthHeight";
|
|
4287
4287
|
}
|
|
4288
|
-
return n.prototype.createTarget = function(
|
|
4288
|
+
return n.prototype.createTarget = function(e, B) {
|
|
4289
4289
|
var Q = this;
|
|
4290
4290
|
return Q.target = x(
|
|
4291
4291
|
`<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">
|
|
@@ -4296,7 +4296,7 @@ var At = function(q) {
|
|
|
4296
4296
|
</div>
|
|
4297
4297
|
</div>`
|
|
4298
4298
|
), Q.syncLock = B.widthHeightSync || !1, Q.createSyncLock(Q.syncLock), Q.target;
|
|
4299
|
-
}, n.prototype.createSyncLock = function(
|
|
4299
|
+
}, n.prototype.createSyncLock = function(e) {
|
|
4300
4300
|
var B = this;
|
|
4301
4301
|
return B.lockTarget = B.syncLock ? x('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u540C\u6B65">\u{1F517}</label>') : x('<label style="margin: 0 4px;text-align:center;width: 8%" title="\u4E0D\u540C\u6B65">\u{1F513}</label>'), B.lockTarget.click(function() {
|
|
4302
4302
|
B.syncLock ? B.lockTarget.text("\u{1F513}").attr("title", "\u4E0D\u540C\u6B65") : B.lockTarget.text("\u{1F517}").attr("title", "\u540C\u6B65"), B.syncLock = !B.syncLock;
|
|
@@ -4305,21 +4305,21 @@ var At = function(q) {
|
|
|
4305
4305
|
}), B.target.find("input:last").change(function() {
|
|
4306
4306
|
B.syncLock && B.target.find("input:first").val(x(this).val());
|
|
4307
4307
|
}), B.lockTarget;
|
|
4308
|
-
}, n.prototype.css = function(
|
|
4309
|
-
if (
|
|
4308
|
+
}, n.prototype.css = function(e) {
|
|
4309
|
+
if (e && e.length && this.target && (e.find(".resize-panel").css("display") == "block" || e[0].className.includes("table")) && this.el == e) {
|
|
4310
4310
|
var B = this.getValue();
|
|
4311
|
-
return
|
|
4311
|
+
return e.css("width", B.width + "pt").css("height", B.height + "pt");
|
|
4312
4312
|
}
|
|
4313
4313
|
return null;
|
|
4314
4314
|
}, n.prototype.getValue = function() {
|
|
4315
|
-
var
|
|
4315
|
+
var e = {
|
|
4316
4316
|
widthHeightSync: this.syncLock,
|
|
4317
4317
|
width: 0,
|
|
4318
4318
|
height: 0
|
|
4319
4319
|
};
|
|
4320
|
-
return
|
|
4321
|
-
}, n.prototype.setValue = function(
|
|
4322
|
-
this.el = B.designTarget || B, B.options.widthHeight && B.designTarget && B.designTarget.css("width", B.options.width + "pt").css("height", B.options.height + "pt"), this.target.find("input:first").val(
|
|
4320
|
+
return e.width = parseFloat(this.target.find("input:first").val() || 0), e.height = parseFloat(this.target.find("input:last").val() || 0), e;
|
|
4321
|
+
}, n.prototype.setValue = function(e, B) {
|
|
4322
|
+
this.el = B.designTarget || B, B.options.widthHeight && B.designTarget && B.designTarget.css("width", B.options.width + "pt").css("height", B.options.height + "pt"), this.target.find("input:first").val(e.width), this.target.find("input:last").val(e.height);
|
|
4323
4323
|
}, n.prototype.destroy = function() {
|
|
4324
4324
|
this.target.remove();
|
|
4325
4325
|
}, n;
|
|
@@ -4327,8 +4327,8 @@ var At = function(q) {
|
|
|
4327
4327
|
function n() {
|
|
4328
4328
|
this.name = "src";
|
|
4329
4329
|
}
|
|
4330
|
-
return n.prototype.createTarget = function(
|
|
4331
|
-
this.el =
|
|
4330
|
+
return n.prototype.createTarget = function(e) {
|
|
4331
|
+
this.el = e;
|
|
4332
4332
|
var B = void 0, Q = this;
|
|
4333
4333
|
return this.target = x(
|
|
4334
4334
|
` <div class="hiprint-option-item hiprint-option-item-row">
|
|
@@ -4339,30 +4339,30 @@ var At = function(q) {
|
|
|
4339
4339
|
<input type="text" placeholder="\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740" class="auto-submit" style="width:70%">
|
|
4340
4340
|
<button class="hiprint-option-item-settingBtn" style="padding:0 10px;margin:0 0 0 5px" type="button">\u9009\u62E9</button> </div>
|
|
4341
4341
|
</div>`
|
|
4342
|
-
),
|
|
4342
|
+
), e && (B = e.getOnImageChooseClick()), B && this.target.find("button").click(function() {
|
|
4343
4343
|
B && B(Q);
|
|
4344
4344
|
}), this.target;
|
|
4345
4345
|
}, n.prototype.getValue = function() {
|
|
4346
|
-
var
|
|
4347
|
-
if (
|
|
4348
|
-
return
|
|
4349
|
-
}, n.prototype.setValue = function(
|
|
4350
|
-
this.target.find("input").val(
|
|
4351
|
-
}, n.prototype.refresh = function(
|
|
4352
|
-
this.setValue(
|
|
4346
|
+
var e = this.target.find("input").val();
|
|
4347
|
+
if (e)
|
|
4348
|
+
return e.toString();
|
|
4349
|
+
}, n.prototype.setValue = function(e) {
|
|
4350
|
+
this.target.find("input").val(e);
|
|
4351
|
+
}, n.prototype.refresh = function(e, B, Q) {
|
|
4352
|
+
this.setValue(e), this.target.find("input").change();
|
|
4353
4353
|
var at = this;
|
|
4354
4354
|
if (this.el && B) {
|
|
4355
4355
|
var Pt = new Image();
|
|
4356
|
-
Pt.src =
|
|
4356
|
+
Pt.src = e, Pt.complete ? at.updateEl(Pt.width, Pt.height, B, Q) : Pt.onload = function() {
|
|
4357
4357
|
at.updateEl(Pt.width, Pt.height, B, Q);
|
|
4358
4358
|
};
|
|
4359
4359
|
}
|
|
4360
|
-
}, n.prototype.updateEl = function(
|
|
4360
|
+
}, n.prototype.updateEl = function(e, B, Q, at) {
|
|
4361
4361
|
if (Q) {
|
|
4362
4362
|
var Pt, Tt, ct;
|
|
4363
|
-
(Q || Q.auto) && (
|
|
4363
|
+
(Q || Q.auto) && (e >= B ? Q.width = !0 : Q.height = !0), Q.width ? (Pt = B / e, Tt = this.el.options.width, ct = Math.floor(Tt * Pt * 10) / 10, this.el.options.height = ct, this.el.designTarget.css("height", ct + "pt")) : Q.height ? (Pt = e / B, ct = this.el.options.height, Tt = Math.floor(ct * Pt * 10) / 10, this.el.options.width = Tt, this.el.designTarget.css("width", Tt + "pt")) : Q.real && (Tt = hinnn.px.toPt(e), ct = hinnn.px.toPt(B), this.el.options.width = Tt, this.el.options.height = ct, this.el.designTarget.css("width", Tt + "pt"), this.el.designTarget.css("height", ct + "pt")), this.el.designTarget.children(".resize-panel").trigger(x.Event("click"));
|
|
4364
4364
|
} else
|
|
4365
|
-
at && at(this.el,
|
|
4365
|
+
at && at(this.el, e, B);
|
|
4366
4366
|
}, n.prototype.destroy = function() {
|
|
4367
4367
|
this.target.remove();
|
|
4368
4368
|
}, n;
|
|
@@ -4370,11 +4370,11 @@ var At = function(q) {
|
|
|
4370
4370
|
function n() {
|
|
4371
4371
|
this.name = "fit";
|
|
4372
4372
|
}
|
|
4373
|
-
return n.prototype.css = function(
|
|
4374
|
-
if (
|
|
4373
|
+
return n.prototype.css = function(e, B) {
|
|
4374
|
+
if (e && e.length) {
|
|
4375
4375
|
if (B)
|
|
4376
|
-
return
|
|
4377
|
-
|
|
4376
|
+
return e.find("img").css("object-fit", B), "object-fit:" + B;
|
|
4377
|
+
e.find("img")[0].style["object-fit"] = "";
|
|
4378
4378
|
}
|
|
4379
4379
|
return null;
|
|
4380
4380
|
}, n.prototype.createTarget = function() {
|
|
@@ -4396,8 +4396,8 @@ var At = function(q) {
|
|
|
4396
4396
|
), this.target, this.target;
|
|
4397
4397
|
}, n.prototype.getValue = function() {
|
|
4398
4398
|
return this.target.find("select").val();
|
|
4399
|
-
}, n.prototype.setValue = function(
|
|
4400
|
-
this.target.find("select").val(
|
|
4399
|
+
}, n.prototype.setValue = function(e) {
|
|
4400
|
+
this.target.find("select").val(e);
|
|
4401
4401
|
}, n.prototype.destroy = function() {
|
|
4402
4402
|
this.target.remove();
|
|
4403
4403
|
}, n;
|
|
@@ -4405,15 +4405,15 @@ var At = function(q) {
|
|
|
4405
4405
|
function n() {
|
|
4406
4406
|
this.name = "borderColor";
|
|
4407
4407
|
}
|
|
4408
|
-
return n.prototype.css = function(
|
|
4409
|
-
if (
|
|
4408
|
+
return n.prototype.css = function(e, B) {
|
|
4409
|
+
if (e && e.length) {
|
|
4410
4410
|
if (B)
|
|
4411
|
-
return
|
|
4412
|
-
|
|
4411
|
+
return e.css("border-color", B), "border-color:" + B;
|
|
4412
|
+
e[0].style.borderColor = "";
|
|
4413
4413
|
}
|
|
4414
4414
|
return null;
|
|
4415
|
-
}, n.prototype.createTarget = function(
|
|
4416
|
-
var B = ["hline", "vline", "rect", "oval"].includes(
|
|
4415
|
+
}, n.prototype.createTarget = function(e) {
|
|
4416
|
+
var B = ["hline", "vline", "rect", "oval"].includes(e.printElementType.type) ? "\u989C\u8272" : "\u8FB9\u6846\u989C\u8272";
|
|
4417
4417
|
return this.target = x(
|
|
4418
4418
|
` <div class="hiprint-option-item hiprint-option-item-row">
|
|
4419
4419
|
<div class="hiprint-option-item-label">
|
|
@@ -4425,14 +4425,14 @@ var At = function(q) {
|
|
|
4425
4425
|
</div>`
|
|
4426
4426
|
), this.target;
|
|
4427
4427
|
}, n.prototype.getValue = function() {
|
|
4428
|
-
var
|
|
4429
|
-
if (
|
|
4430
|
-
return
|
|
4431
|
-
}, n.prototype.setValue = function(
|
|
4428
|
+
var e = this.target.find("input").val();
|
|
4429
|
+
if (e)
|
|
4430
|
+
return e.toString();
|
|
4431
|
+
}, n.prototype.setValue = function(e) {
|
|
4432
4432
|
this.target.find("input").minicolors({
|
|
4433
|
-
defaultValue:
|
|
4433
|
+
defaultValue: e || "",
|
|
4434
4434
|
theme: "bootstrap"
|
|
4435
|
-
}), this.target.find("input").val(
|
|
4435
|
+
}), this.target.find("input").val(e);
|
|
4436
4436
|
}, n.prototype.destroy = function() {
|
|
4437
4437
|
this.target.remove();
|
|
4438
4438
|
}, n;
|
|
@@ -4456,16 +4456,16 @@ var At = function(q) {
|
|
|
4456
4456
|
), this.timestamp = x(
|
|
4457
4457
|
'<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u6C34\u5370\u65F6\u95F4 </div><div class="hiprint-option-item-field"><input style="width:18px;height:18px;" type="checkbox" placeholder="\u6C34\u5370\u65F6\u95F4" class="auto-submit bt-checkbox"></div></div>'
|
|
4458
4458
|
);
|
|
4459
|
-
let
|
|
4459
|
+
let e = ["YYYY-MM-DD HH:mm:ss", "YYYY-MM-DD HH:mm", "YYYY-MM-DD HH", "YYYY-MM-DD", "YYYY-MMMM", "YYYY-MM", "YYYY"], B = `
|
|
4460
4460
|
<option value="" >\u9ED8\u8BA4(YYYY-MM-DD HH:mm)</option>`;
|
|
4461
|
-
return
|
|
4461
|
+
return e.forEach(function(Q) {
|
|
4462
4462
|
B += `
|
|
4463
4463
|
<option value="` + Q + '">' + Q + "</option>";
|
|
4464
4464
|
}), this.format = x(
|
|
4465
4465
|
'<div class="hiprint-option-item hiprint-option-item-row"><div class="hiprint-option-item-label">\u65F6\u95F4\u683C\u5F0F </div><div class="hiprint-option-item-field"><select style="width:100%" class="auto-submit"></select></div></div>'
|
|
4466
4466
|
), this.format.find(".auto-submit").append(x(B)), this.target.append(this.content), this.target.append(this.fillStyle), this.target.append(this.fontSize), this.target.append(this.rotate), this.target.append(this.width), this.target.append(this.height), this.target.append(this.timestamp), this.target.append(this.format), this.target;
|
|
4467
4467
|
}, n.prototype.getValue = function() {
|
|
4468
|
-
let
|
|
4468
|
+
let e = {
|
|
4469
4469
|
content: this.content.find("input").val(),
|
|
4470
4470
|
fillStyle: this.fillStyle.find("input").val() || "rgba(184, 184, 184, 0.3)",
|
|
4471
4471
|
fontSize: parseInt(this.fontSize.find("input").val() || "14") + "px",
|
|
@@ -4475,15 +4475,15 @@ var At = function(q) {
|
|
|
4475
4475
|
timestamp: this.timestamp.find("input").is(":checked"),
|
|
4476
4476
|
format: this.format.find("select").val() == "" ? "YYYY-MM-DD HH:mm" : this.format.find("select").val()
|
|
4477
4477
|
};
|
|
4478
|
-
return Object.assign({}, this.options,
|
|
4479
|
-
}, n.prototype.setValue = function(
|
|
4480
|
-
this.options =
|
|
4478
|
+
return Object.assign({}, this.options, e);
|
|
4479
|
+
}, n.prototype.setValue = function(e) {
|
|
4480
|
+
this.options = e, this.content.find("input").val(e.content || ""), this.fillStyle.find("input").val(e.fillStyle || "rgba(184, 184, 184, 0.3)"), this.fillStyle.find("input").minicolors({
|
|
4481
4481
|
format: "rgb",
|
|
4482
4482
|
opacity: !0,
|
|
4483
4483
|
theme: "bootstrap"
|
|
4484
4484
|
}), this.fillStyle.parent().css({ width: "100%" });
|
|
4485
|
-
const B = parseInt(
|
|
4486
|
-
this.fontSize.find("input").val(B), this.rotate.find("input").val(
|
|
4485
|
+
const B = parseInt(e.fontSize || "14");
|
|
4486
|
+
this.fontSize.find("input").val(B), this.rotate.find("input").val(e.rotate || 25), this.width.find("input").val(e.width || 200), this.height.find("input").val(e.height || 200), this.timestamp.find("input").attr("checked", e.timestamp == null ? !1 : e.timestamp), this.format.find("select").val(e.format || "YYYY-MM-DD HH:mm");
|
|
4487
4487
|
}, n.prototype.destroy = function() {
|
|
4488
4488
|
this.target.remove();
|
|
4489
4489
|
}, n;
|
|
@@ -4503,11 +4503,11 @@ var At = function(q) {
|
|
|
4503
4503
|
</div>`
|
|
4504
4504
|
), this.target;
|
|
4505
4505
|
}, n.prototype.getValue = function() {
|
|
4506
|
-
var
|
|
4507
|
-
if (
|
|
4508
|
-
return
|
|
4509
|
-
}, n.prototype.setValue = function(
|
|
4510
|
-
this.target.find("input").val(
|
|
4506
|
+
var e = this.target.find("input").val();
|
|
4507
|
+
if (e)
|
|
4508
|
+
return e.toString();
|
|
4509
|
+
}, n.prototype.setValue = function(e) {
|
|
4510
|
+
this.target.find("input").val(e);
|
|
4511
4511
|
}, n.prototype.destroy = function() {
|
|
4512
4512
|
this.target.remove();
|
|
4513
4513
|
}, n;
|
|
@@ -4532,8 +4532,8 @@ var At = function(q) {
|
|
|
4532
4532
|
}, n.prototype.getValue = function() {
|
|
4533
4533
|
if (this.target.find("select").val() == "true")
|
|
4534
4534
|
return !0;
|
|
4535
|
-
}, n.prototype.setValue = function(
|
|
4536
|
-
this.target.find("select").val((
|
|
4535
|
+
}, n.prototype.setValue = function(e) {
|
|
4536
|
+
this.target.find("select").val((e == null ? "" : e).toString());
|
|
4537
4537
|
}, n.prototype.destroy = function() {
|
|
4538
4538
|
this.target.remove();
|
|
4539
4539
|
}, n;
|
|
@@ -4541,7 +4541,7 @@ var At = function(q) {
|
|
|
4541
4541
|
function n() {
|
|
4542
4542
|
this.name = "longTextIndent";
|
|
4543
4543
|
}
|
|
4544
|
-
return n.prototype.css = function(
|
|
4544
|
+
return n.prototype.css = function(e, B) {
|
|
4545
4545
|
return null;
|
|
4546
4546
|
}, n.prototype.createTarget = function() {
|
|
4547
4547
|
return this.target = x(
|
|
@@ -4598,11 +4598,11 @@ var At = function(q) {
|
|
|
4598
4598
|
</div>`
|
|
4599
4599
|
), this.target;
|
|
4600
4600
|
}, n.prototype.getValue = function() {
|
|
4601
|
-
var
|
|
4602
|
-
if (
|
|
4603
|
-
return parseFloat(
|
|
4604
|
-
}, n.prototype.setValue = function(
|
|
4605
|
-
|
|
4601
|
+
var e = this.target.find("select").val();
|
|
4602
|
+
if (e)
|
|
4603
|
+
return parseFloat(e.toString());
|
|
4604
|
+
}, n.prototype.setValue = function(e) {
|
|
4605
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
4606
4606
|
}, n.prototype.destroy = function() {
|
|
4607
4607
|
this.target.remove();
|
|
4608
4608
|
}, n;
|
|
@@ -4610,11 +4610,11 @@ var At = function(q) {
|
|
|
4610
4610
|
function n() {
|
|
4611
4611
|
this.name = "showInPage";
|
|
4612
4612
|
}
|
|
4613
|
-
return n.prototype.css = function(
|
|
4614
|
-
if (
|
|
4613
|
+
return n.prototype.css = function(e, B) {
|
|
4614
|
+
if (e && e.length) {
|
|
4615
4615
|
if (B && B == "none")
|
|
4616
|
-
return
|
|
4617
|
-
|
|
4616
|
+
return e.addClass("alwaysHide");
|
|
4617
|
+
e.removeClass("alwaysHide");
|
|
4618
4618
|
}
|
|
4619
4619
|
return null;
|
|
4620
4620
|
}, n.prototype.createTarget = function() {
|
|
@@ -4636,11 +4636,11 @@ var At = function(q) {
|
|
|
4636
4636
|
</div>`
|
|
4637
4637
|
), this.target;
|
|
4638
4638
|
}, n.prototype.getValue = function() {
|
|
4639
|
-
var
|
|
4640
|
-
if (
|
|
4641
|
-
return
|
|
4642
|
-
}, n.prototype.setValue = function(
|
|
4643
|
-
this.target.find("select").val(
|
|
4639
|
+
var e = this.target.find("select").val();
|
|
4640
|
+
if (e)
|
|
4641
|
+
return e.toString();
|
|
4642
|
+
}, n.prototype.setValue = function(e) {
|
|
4643
|
+
this.target.find("select").val(e);
|
|
4644
4644
|
}, n.prototype.destroy = function() {
|
|
4645
4645
|
this.target.remove();
|
|
4646
4646
|
}, n;
|
|
@@ -4648,11 +4648,11 @@ var At = function(q) {
|
|
|
4648
4648
|
function n() {
|
|
4649
4649
|
this.name = "pageBreak";
|
|
4650
4650
|
}
|
|
4651
|
-
return n.prototype.css = function(
|
|
4652
|
-
if (
|
|
4651
|
+
return n.prototype.css = function(e, B) {
|
|
4652
|
+
if (e && e.length) {
|
|
4653
4653
|
if (B && B == "none")
|
|
4654
|
-
return
|
|
4655
|
-
|
|
4654
|
+
return e.addClass("alwaysHide");
|
|
4655
|
+
e.removeClass("alwaysHide");
|
|
4656
4656
|
}
|
|
4657
4657
|
return null;
|
|
4658
4658
|
}, n.prototype.createTarget = function() {
|
|
@@ -4672,8 +4672,8 @@ var At = function(q) {
|
|
|
4672
4672
|
}, n.prototype.getValue = function() {
|
|
4673
4673
|
if (this.target.find("select").val() == "true")
|
|
4674
4674
|
return !0;
|
|
4675
|
-
}, n.prototype.setValue = function(
|
|
4676
|
-
this.target.find("select").val((
|
|
4675
|
+
}, n.prototype.setValue = function(e) {
|
|
4676
|
+
this.target.find("select").val((e == null ? "" : e).toString());
|
|
4677
4677
|
}, n.prototype.destroy = function() {
|
|
4678
4678
|
this.target.remove();
|
|
4679
4679
|
}, n;
|
|
@@ -4697,11 +4697,11 @@ var At = function(q) {
|
|
|
4697
4697
|
</div>`
|
|
4698
4698
|
), this.target;
|
|
4699
4699
|
}, n.prototype.getValue = function() {
|
|
4700
|
-
var
|
|
4701
|
-
if (
|
|
4702
|
-
return
|
|
4703
|
-
}, n.prototype.setValue = function(
|
|
4704
|
-
this.target.find("select").val(
|
|
4700
|
+
var e = this.target.find("select").val();
|
|
4701
|
+
if (e)
|
|
4702
|
+
return e.toString();
|
|
4703
|
+
}, n.prototype.setValue = function(e) {
|
|
4704
|
+
this.target.find("select").val(e);
|
|
4705
4705
|
}, n.prototype.destroy = function() {
|
|
4706
4706
|
this.target.remove();
|
|
4707
4707
|
}, n;
|
|
@@ -4724,11 +4724,11 @@ var At = function(q) {
|
|
|
4724
4724
|
</div>`
|
|
4725
4725
|
), this.target;
|
|
4726
4726
|
}, n.prototype.getValue = function() {
|
|
4727
|
-
var
|
|
4728
|
-
if (
|
|
4729
|
-
return
|
|
4730
|
-
}, n.prototype.setValue = function(
|
|
4731
|
-
this.target.find("select").val(
|
|
4727
|
+
var e = this.target.find("select").val();
|
|
4728
|
+
if (e)
|
|
4729
|
+
return e.toString();
|
|
4730
|
+
}, n.prototype.setValue = function(e) {
|
|
4731
|
+
this.target.find("select").val(e);
|
|
4732
4732
|
}, n.prototype.destroy = function() {
|
|
4733
4733
|
this.target.remove();
|
|
4734
4734
|
}, n;
|
|
@@ -4754,8 +4754,8 @@ var At = function(q) {
|
|
|
4754
4754
|
}, n.prototype.getValue = function() {
|
|
4755
4755
|
if (this.target.find("select").val() == "false")
|
|
4756
4756
|
return !1;
|
|
4757
|
-
}, n.prototype.setValue = function(
|
|
4758
|
-
this.target.find("select").val((
|
|
4757
|
+
}, n.prototype.setValue = function(e) {
|
|
4758
|
+
this.target.find("select").val((e == null ? "" : e).toString());
|
|
4759
4759
|
}, n.prototype.destroy = function() {
|
|
4760
4760
|
this.target.remove();
|
|
4761
4761
|
}, n;
|
|
@@ -4775,11 +4775,11 @@ var At = function(q) {
|
|
|
4775
4775
|
</div>`
|
|
4776
4776
|
), this.target;
|
|
4777
4777
|
}, n.prototype.getValue = function() {
|
|
4778
|
-
var
|
|
4779
|
-
if (
|
|
4780
|
-
return parseFloat(
|
|
4781
|
-
}, n.prototype.setValue = function(
|
|
4782
|
-
this.target.find("input").val(
|
|
4778
|
+
var e = this.target.find("input").val();
|
|
4779
|
+
if (e)
|
|
4780
|
+
return parseFloat(e.toString());
|
|
4781
|
+
}, n.prototype.setValue = function(e) {
|
|
4782
|
+
this.target.find("input").val(e);
|
|
4783
4783
|
}, n.prototype.destroy = function() {
|
|
4784
4784
|
this.target.remove();
|
|
4785
4785
|
}, n;
|
|
@@ -4799,11 +4799,11 @@ var At = function(q) {
|
|
|
4799
4799
|
</div>`
|
|
4800
4800
|
), this.target;
|
|
4801
4801
|
}, n.prototype.getValue = function() {
|
|
4802
|
-
var
|
|
4803
|
-
if (
|
|
4804
|
-
return parseFloat(
|
|
4805
|
-
}, n.prototype.setValue = function(
|
|
4806
|
-
this.target.find("input").val(
|
|
4802
|
+
var e = this.target.find("input").val();
|
|
4803
|
+
if (e)
|
|
4804
|
+
return parseFloat(e.toString());
|
|
4805
|
+
}, n.prototype.setValue = function(e) {
|
|
4806
|
+
this.target.find("input").val(e);
|
|
4807
4807
|
}, n.prototype.destroy = function() {
|
|
4808
4808
|
this.target.remove();
|
|
4809
4809
|
}, n;
|
|
@@ -4823,11 +4823,11 @@ var At = function(q) {
|
|
|
4823
4823
|
</div>`
|
|
4824
4824
|
), this.target;
|
|
4825
4825
|
}, n.prototype.getValue = function() {
|
|
4826
|
-
var
|
|
4827
|
-
if (
|
|
4828
|
-
return parseFloat(
|
|
4829
|
-
}, n.prototype.setValue = function(
|
|
4830
|
-
this.target.find("input").val(
|
|
4826
|
+
var e = this.target.find("input").val();
|
|
4827
|
+
if (e)
|
|
4828
|
+
return parseFloat(e.toString());
|
|
4829
|
+
}, n.prototype.setValue = function(e) {
|
|
4830
|
+
this.target.find("input").val(e);
|
|
4831
4831
|
}, n.prototype.destroy = function() {
|
|
4832
4832
|
this.target.remove();
|
|
4833
4833
|
}, n;
|
|
@@ -4847,11 +4847,11 @@ var At = function(q) {
|
|
|
4847
4847
|
</div>`
|
|
4848
4848
|
), this.target;
|
|
4849
4849
|
}, n.prototype.getValue = function() {
|
|
4850
|
-
var
|
|
4851
|
-
if (
|
|
4852
|
-
return parseFloat(
|
|
4853
|
-
}, n.prototype.setValue = function(
|
|
4854
|
-
this.target.find("input").val(
|
|
4850
|
+
var e = this.target.find("input").val();
|
|
4851
|
+
if (e)
|
|
4852
|
+
return parseFloat(e.toString());
|
|
4853
|
+
}, n.prototype.setValue = function(e) {
|
|
4854
|
+
this.target.find("input").val(e);
|
|
4855
4855
|
}, n.prototype.destroy = function() {
|
|
4856
4856
|
this.target.remove();
|
|
4857
4857
|
}, n;
|
|
@@ -4877,8 +4877,8 @@ var At = function(q) {
|
|
|
4877
4877
|
}, n.prototype.getValue = function() {
|
|
4878
4878
|
if (this.target.find("select").val() == "true")
|
|
4879
4879
|
return !0;
|
|
4880
|
-
}, n.prototype.setValue = function(
|
|
4881
|
-
this.target.find("select").val((
|
|
4880
|
+
}, n.prototype.setValue = function(e) {
|
|
4881
|
+
this.target.find("select").val((e == null ? "" : e).toString());
|
|
4882
4882
|
}, n.prototype.destroy = function() {
|
|
4883
4883
|
this.target.remove();
|
|
4884
4884
|
}, n;
|
|
@@ -4902,10 +4902,10 @@ var At = function(q) {
|
|
|
4902
4902
|
</div>`
|
|
4903
4903
|
), this.target;
|
|
4904
4904
|
}, n.prototype.getValue = function() {
|
|
4905
|
-
var
|
|
4906
|
-
return
|
|
4907
|
-
}, n.prototype.setValue = function(
|
|
4908
|
-
this.target.find("select").val(
|
|
4905
|
+
var e = this.target.find("select").val();
|
|
4906
|
+
return e || void 0;
|
|
4907
|
+
}, n.prototype.setValue = function(e) {
|
|
4908
|
+
this.target.find("select").val(e);
|
|
4909
4909
|
}, n.prototype.destroy = function() {
|
|
4910
4910
|
this.target.remove();
|
|
4911
4911
|
}, n;
|
|
@@ -4925,11 +4925,11 @@ var At = function(q) {
|
|
|
4925
4925
|
</div>`
|
|
4926
4926
|
), this.target;
|
|
4927
4927
|
}, n.prototype.getValue = function() {
|
|
4928
|
-
var
|
|
4929
|
-
if (
|
|
4930
|
-
return parseFloat(
|
|
4931
|
-
}, n.prototype.setValue = function(
|
|
4932
|
-
this.target.find("input").val(
|
|
4928
|
+
var e = this.target.find("input").val();
|
|
4929
|
+
if (e)
|
|
4930
|
+
return parseFloat(e.toString());
|
|
4931
|
+
}, n.prototype.setValue = function(e) {
|
|
4932
|
+
this.target.find("input").val(e);
|
|
4933
4933
|
}, n.prototype.destroy = function() {
|
|
4934
4934
|
this.target.remove();
|
|
4935
4935
|
}, n;
|
|
@@ -4949,11 +4949,11 @@ var At = function(q) {
|
|
|
4949
4949
|
</div>`
|
|
4950
4950
|
), this.target;
|
|
4951
4951
|
}, n.prototype.getValue = function() {
|
|
4952
|
-
var
|
|
4953
|
-
if (
|
|
4954
|
-
return parseFloat(
|
|
4955
|
-
}, n.prototype.setValue = function(
|
|
4956
|
-
this.target.find("input").val(
|
|
4952
|
+
var e = this.target.find("input").val();
|
|
4953
|
+
if (e)
|
|
4954
|
+
return parseFloat(e.toString());
|
|
4955
|
+
}, n.prototype.setValue = function(e) {
|
|
4956
|
+
this.target.find("input").val(e);
|
|
4957
4957
|
}, n.prototype.destroy = function() {
|
|
4958
4958
|
this.target.remove();
|
|
4959
4959
|
}, n;
|
|
@@ -4977,11 +4977,11 @@ var At = function(q) {
|
|
|
4977
4977
|
</div>`
|
|
4978
4978
|
), this.target;
|
|
4979
4979
|
}, n.prototype.getValue = function() {
|
|
4980
|
-
var
|
|
4981
|
-
if (
|
|
4982
|
-
return
|
|
4983
|
-
}, n.prototype.setValue = function(
|
|
4984
|
-
this.target.find("select").val(
|
|
4980
|
+
var e = this.target.find("select").val();
|
|
4981
|
+
if (e)
|
|
4982
|
+
return e;
|
|
4983
|
+
}, n.prototype.setValue = function(e) {
|
|
4984
|
+
this.target.find("select").val(e);
|
|
4985
4985
|
}, n.prototype.destroy = function() {
|
|
4986
4986
|
this.target.remove();
|
|
4987
4987
|
}, n;
|
|
@@ -4989,11 +4989,11 @@ var At = function(q) {
|
|
|
4989
4989
|
function n() {
|
|
4990
4990
|
this.name = "tableBodyRowBorder";
|
|
4991
4991
|
}
|
|
4992
|
-
return n.prototype.css = function(
|
|
4993
|
-
if (
|
|
4992
|
+
return n.prototype.css = function(e, B) {
|
|
4993
|
+
if (e.find("tbody tr").length) {
|
|
4994
4994
|
if (B == "border" || B == null)
|
|
4995
|
-
return
|
|
4996
|
-
B == "noBorder" ?
|
|
4995
|
+
return e.find("tbody tr").css("border", "1px solid"), "border:1pt solid";
|
|
4996
|
+
B == "noBorder" ? e.find("tbody tr").css("border", "0px solid") : B == "topBorder" ? (e.find("tbody tr").css("border", "0px solid"), e.find("tbody tr").css("border-top", "1px solid")) : B == "bottomBorder" ? (e.find("tbody tr").css("border", "0px solid"), e.find("tbody tr").css("border-bottom", "1px solid")) : B == "topBottomBorder" ? (e.find("tbody tr").css("border", "0px solid"), e.find("tbody tr").css("border-top", "1px solid"), e.find("tbody tr").css("border-bottom", "1px solid")) : e.find("tbody tr").map(function(Q, at) {
|
|
4997
4997
|
at.style.border = "";
|
|
4998
4998
|
});
|
|
4999
4999
|
}
|
|
@@ -5017,11 +5017,11 @@ var At = function(q) {
|
|
|
5017
5017
|
</div>`
|
|
5018
5018
|
), this.target;
|
|
5019
5019
|
}, n.prototype.getValue = function() {
|
|
5020
|
-
var
|
|
5021
|
-
if (
|
|
5022
|
-
return
|
|
5023
|
-
}, n.prototype.setValue = function(
|
|
5024
|
-
this.target.find("select").val(
|
|
5020
|
+
var e = this.target.find("select").val();
|
|
5021
|
+
if (e)
|
|
5022
|
+
return e.toString();
|
|
5023
|
+
}, n.prototype.setValue = function(e) {
|
|
5024
|
+
this.target.find("select").val(e);
|
|
5025
5025
|
}, n.prototype.destroy = function() {
|
|
5026
5026
|
this.target.remove();
|
|
5027
5027
|
}, n;
|
|
@@ -5029,10 +5029,10 @@ var At = function(q) {
|
|
|
5029
5029
|
function n() {
|
|
5030
5030
|
this.name = "transform";
|
|
5031
5031
|
}
|
|
5032
|
-
return n.prototype.css = function(
|
|
5033
|
-
if (
|
|
5034
|
-
var Q =
|
|
5035
|
-
if (!Q.length && (
|
|
5032
|
+
return n.prototype.css = function(e, B) {
|
|
5033
|
+
if (e && e.length) {
|
|
5034
|
+
var Q = e.find(".hiprint-printElement-content").parent(".hiprint-printElement");
|
|
5035
|
+
if (!Q.length && (e.hasClass("hiprint-printElement-hline") || e.hasClass("hiprint-printElement-vline")) && (Q = e), !Q.length && e.hasClass("hiprint-printElement-image") && (Q = e), B)
|
|
5036
5036
|
return Q.css("transform", "rotate(" + B + "deg)"), Q.css("-ms-transform", "rotate(" + B + "deg)"), Q.css("-moz-transform", "rotate(" + B + "deg)"), Q.css("-webkit-transform", "rotate(" + B + "deg)"), Q.css("-o-transform", "rotate(" + B + "deg)"), "transform:rotate(" + B + "deg)";
|
|
5037
5037
|
Q.length && (Q[0].style.transform = "");
|
|
5038
5038
|
}
|
|
@@ -5049,11 +5049,11 @@ var At = function(q) {
|
|
|
5049
5049
|
</div>`
|
|
5050
5050
|
), this.target;
|
|
5051
5051
|
}, n.prototype.getValue = function() {
|
|
5052
|
-
var
|
|
5053
|
-
if (
|
|
5054
|
-
return parseFloat(
|
|
5055
|
-
}, n.prototype.setValue = function(
|
|
5056
|
-
this.target.find("input").val(
|
|
5052
|
+
var e = this.target.find("input").val();
|
|
5053
|
+
if (e)
|
|
5054
|
+
return parseFloat(e.toString());
|
|
5055
|
+
}, n.prototype.setValue = function(e) {
|
|
5056
|
+
this.target.find("input").val(e);
|
|
5057
5057
|
}, n.prototype.destroy = function() {
|
|
5058
5058
|
this.target.remove();
|
|
5059
5059
|
}, n;
|
|
@@ -5061,8 +5061,8 @@ var At = function(q) {
|
|
|
5061
5061
|
function n() {
|
|
5062
5062
|
this.name = "zIndex";
|
|
5063
5063
|
}
|
|
5064
|
-
return n.prototype.css = function(
|
|
5065
|
-
return
|
|
5064
|
+
return n.prototype.css = function(e, B) {
|
|
5065
|
+
return e && e.length && B ? e.css("z-index", B) : null;
|
|
5066
5066
|
}, n.prototype.createTarget = function() {
|
|
5067
5067
|
return this.target = x(
|
|
5068
5068
|
`<div class="hiprint-option-item hiprint-option-item-row">
|
|
@@ -5075,11 +5075,11 @@ var At = function(q) {
|
|
|
5075
5075
|
</div>`
|
|
5076
5076
|
), this.target;
|
|
5077
5077
|
}, n.prototype.getValue = function() {
|
|
5078
|
-
var
|
|
5079
|
-
if (
|
|
5080
|
-
return parseInt(
|
|
5081
|
-
}, n.prototype.setValue = function(
|
|
5082
|
-
this.target.find("input").val(
|
|
5078
|
+
var e = this.target.find("input").val();
|
|
5079
|
+
if (e)
|
|
5080
|
+
return parseInt(e.toString()) > 0 ? parseInt(e.toString()) : 1;
|
|
5081
|
+
}, n.prototype.setValue = function(e) {
|
|
5082
|
+
this.target.find("input").val(e);
|
|
5083
5083
|
}, n.prototype.destroy = function() {
|
|
5084
5084
|
this.target.remove();
|
|
5085
5085
|
}, n;
|
|
@@ -5087,11 +5087,11 @@ var At = function(q) {
|
|
|
5087
5087
|
function n() {
|
|
5088
5088
|
this.name = "borderTop";
|
|
5089
5089
|
}
|
|
5090
|
-
return n.prototype.css = function(
|
|
5091
|
-
if (
|
|
5090
|
+
return n.prototype.css = function(e, B) {
|
|
5091
|
+
if (e && e.length) {
|
|
5092
5092
|
if (B)
|
|
5093
|
-
return
|
|
5094
|
-
|
|
5093
|
+
return e.css("border-top-style", B), "border-top:1px";
|
|
5094
|
+
e[0].style.borderTopStyle = "", e[0].style.borderTopWidth = "";
|
|
5095
5095
|
}
|
|
5096
5096
|
return null;
|
|
5097
5097
|
}, n.prototype.createTarget = function() {
|
|
@@ -5110,11 +5110,11 @@ var At = function(q) {
|
|
|
5110
5110
|
</div>`
|
|
5111
5111
|
), this.target;
|
|
5112
5112
|
}, n.prototype.getValue = function() {
|
|
5113
|
-
var
|
|
5114
|
-
if (
|
|
5115
|
-
return
|
|
5116
|
-
}, n.prototype.setValue = function(
|
|
5117
|
-
this.target.find("select").val(
|
|
5113
|
+
var e = this.target.find("select").val();
|
|
5114
|
+
if (e)
|
|
5115
|
+
return e;
|
|
5116
|
+
}, n.prototype.setValue = function(e) {
|
|
5117
|
+
this.target.find("select").val(e);
|
|
5118
5118
|
}, n.prototype.destroy = function() {
|
|
5119
5119
|
this.target.remove();
|
|
5120
5120
|
}, n;
|
|
@@ -5122,11 +5122,11 @@ var At = function(q) {
|
|
|
5122
5122
|
function n() {
|
|
5123
5123
|
this.name = "borderLeft";
|
|
5124
5124
|
}
|
|
5125
|
-
return n.prototype.css = function(
|
|
5126
|
-
if (
|
|
5125
|
+
return n.prototype.css = function(e, B) {
|
|
5126
|
+
if (e && e.length) {
|
|
5127
5127
|
if (B)
|
|
5128
|
-
return
|
|
5129
|
-
|
|
5128
|
+
return e.css("border-left-style", B), "border-left:1px";
|
|
5129
|
+
e[0].style.borderLeftStyle = "", e[0].style.borderLeftWidth = "";
|
|
5130
5130
|
}
|
|
5131
5131
|
return null;
|
|
5132
5132
|
}, n.prototype.createTarget = function() {
|
|
@@ -5145,11 +5145,11 @@ var At = function(q) {
|
|
|
5145
5145
|
</div>`
|
|
5146
5146
|
), this.target;
|
|
5147
5147
|
}, n.prototype.getValue = function() {
|
|
5148
|
-
var
|
|
5149
|
-
if (
|
|
5150
|
-
return
|
|
5151
|
-
}, n.prototype.setValue = function(
|
|
5152
|
-
this.target.find("select").val(
|
|
5148
|
+
var e = this.target.find("select").val();
|
|
5149
|
+
if (e)
|
|
5150
|
+
return e;
|
|
5151
|
+
}, n.prototype.setValue = function(e) {
|
|
5152
|
+
this.target.find("select").val(e);
|
|
5153
5153
|
}, n.prototype.destroy = function() {
|
|
5154
5154
|
this.target.remove();
|
|
5155
5155
|
}, n;
|
|
@@ -5157,11 +5157,11 @@ var At = function(q) {
|
|
|
5157
5157
|
function n() {
|
|
5158
5158
|
this.name = "borderRight";
|
|
5159
5159
|
}
|
|
5160
|
-
return n.prototype.css = function(
|
|
5161
|
-
if (
|
|
5160
|
+
return n.prototype.css = function(e, B) {
|
|
5161
|
+
if (e && e.length) {
|
|
5162
5162
|
if (B)
|
|
5163
|
-
return
|
|
5164
|
-
|
|
5163
|
+
return e.css("border-right-style", B), "border-right:1px";
|
|
5164
|
+
e[0].style.borderRightStyle = "", e[0].style.borderRightWidth = "";
|
|
5165
5165
|
}
|
|
5166
5166
|
return null;
|
|
5167
5167
|
}, n.prototype.createTarget = function() {
|
|
@@ -5180,11 +5180,11 @@ var At = function(q) {
|
|
|
5180
5180
|
</div>`
|
|
5181
5181
|
), this.target;
|
|
5182
5182
|
}, n.prototype.getValue = function() {
|
|
5183
|
-
var
|
|
5184
|
-
if (
|
|
5185
|
-
return
|
|
5186
|
-
}, n.prototype.setValue = function(
|
|
5187
|
-
this.target.find("select").val(
|
|
5183
|
+
var e = this.target.find("select").val();
|
|
5184
|
+
if (e)
|
|
5185
|
+
return e;
|
|
5186
|
+
}, n.prototype.setValue = function(e) {
|
|
5187
|
+
this.target.find("select").val(e);
|
|
5188
5188
|
}, n.prototype.destroy = function() {
|
|
5189
5189
|
this.target.remove();
|
|
5190
5190
|
}, n;
|
|
@@ -5192,11 +5192,11 @@ var At = function(q) {
|
|
|
5192
5192
|
function n() {
|
|
5193
5193
|
this.name = "borderBottom";
|
|
5194
5194
|
}
|
|
5195
|
-
return n.prototype.css = function(
|
|
5196
|
-
if (
|
|
5195
|
+
return n.prototype.css = function(e, B) {
|
|
5196
|
+
if (e && e.length) {
|
|
5197
5197
|
if (B)
|
|
5198
|
-
return
|
|
5199
|
-
|
|
5198
|
+
return e.css("border-bottom-style", B), "border-bottom-style:1px solid";
|
|
5199
|
+
e[0].style.borderBottomStyle = "", e[0].style.borderBottomWidth = "";
|
|
5200
5200
|
}
|
|
5201
5201
|
return null;
|
|
5202
5202
|
}, n.prototype.createTarget = function() {
|
|
@@ -5215,11 +5215,11 @@ var At = function(q) {
|
|
|
5215
5215
|
</div>`
|
|
5216
5216
|
), this.target;
|
|
5217
5217
|
}, n.prototype.getValue = function() {
|
|
5218
|
-
var
|
|
5219
|
-
if (
|
|
5220
|
-
return
|
|
5221
|
-
}, n.prototype.setValue = function(
|
|
5222
|
-
this.target.find("select").val(
|
|
5218
|
+
var e = this.target.find("select").val();
|
|
5219
|
+
if (e)
|
|
5220
|
+
return e;
|
|
5221
|
+
}, n.prototype.setValue = function(e) {
|
|
5222
|
+
this.target.find("select").val(e);
|
|
5223
5223
|
}, n.prototype.destroy = function() {
|
|
5224
5224
|
this.target.remove();
|
|
5225
5225
|
}, n;
|
|
@@ -5227,8 +5227,8 @@ var At = function(q) {
|
|
|
5227
5227
|
function n() {
|
|
5228
5228
|
this.name = "contentPaddingLeft";
|
|
5229
5229
|
}
|
|
5230
|
-
return n.prototype.css = function(
|
|
5231
|
-
var Q =
|
|
5230
|
+
return n.prototype.css = function(e, B) {
|
|
5231
|
+
var Q = e.find(".hiprint-printElement-content");
|
|
5232
5232
|
if (Q && Q.length) {
|
|
5233
5233
|
if (B)
|
|
5234
5234
|
return Q.css("padding-left", B + "pt"), "padding-left";
|
|
@@ -5278,20 +5278,20 @@ var At = function(q) {
|
|
|
5278
5278
|
</div>`
|
|
5279
5279
|
), this.target;
|
|
5280
5280
|
}, n.prototype.getValue = function() {
|
|
5281
|
-
var
|
|
5282
|
-
if (
|
|
5283
|
-
return parseFloat(
|
|
5284
|
-
}, n.prototype.setValue = function(
|
|
5285
|
-
|
|
5281
|
+
var e = this.target.find("select").val();
|
|
5282
|
+
if (e)
|
|
5283
|
+
return parseFloat(e.toString());
|
|
5284
|
+
}, n.prototype.setValue = function(e) {
|
|
5285
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
5286
5286
|
}, n.prototype.destroy = function() {
|
|
5287
5287
|
this.target.remove();
|
|
5288
5288
|
}, n;
|
|
5289
|
-
}(),
|
|
5289
|
+
}(), t = function() {
|
|
5290
5290
|
function n() {
|
|
5291
5291
|
this.name = "contentPaddingTop";
|
|
5292
5292
|
}
|
|
5293
|
-
return n.prototype.css = function(
|
|
5294
|
-
var Q =
|
|
5293
|
+
return n.prototype.css = function(e, B) {
|
|
5294
|
+
var Q = e.find(".hiprint-printElement-content");
|
|
5295
5295
|
if (Q && Q.length) {
|
|
5296
5296
|
if (B)
|
|
5297
5297
|
return Q.css("padding-top", B + "pt"), "padding-top";
|
|
@@ -5341,11 +5341,11 @@ var At = function(q) {
|
|
|
5341
5341
|
</div>`
|
|
5342
5342
|
), this.target;
|
|
5343
5343
|
}, n.prototype.getValue = function() {
|
|
5344
|
-
var
|
|
5345
|
-
if (
|
|
5346
|
-
return parseFloat(
|
|
5347
|
-
}, n.prototype.setValue = function(
|
|
5348
|
-
|
|
5344
|
+
var e = this.target.find("select").val();
|
|
5345
|
+
if (e)
|
|
5346
|
+
return parseFloat(e.toString());
|
|
5347
|
+
}, n.prototype.setValue = function(e) {
|
|
5348
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
5349
5349
|
}, n.prototype.destroy = function() {
|
|
5350
5350
|
this.target.remove();
|
|
5351
5351
|
}, n;
|
|
@@ -5353,8 +5353,8 @@ var At = function(q) {
|
|
|
5353
5353
|
function n() {
|
|
5354
5354
|
this.name = "contentPaddingRight";
|
|
5355
5355
|
}
|
|
5356
|
-
return n.prototype.css = function(
|
|
5357
|
-
var Q =
|
|
5356
|
+
return n.prototype.css = function(e, B) {
|
|
5357
|
+
var Q = e.find(".hiprint-printElement-content");
|
|
5358
5358
|
if (Q && Q.length) {
|
|
5359
5359
|
if (B)
|
|
5360
5360
|
return Q.css("padding-right", B + "pt"), "padding-right";
|
|
@@ -5404,11 +5404,11 @@ var At = function(q) {
|
|
|
5404
5404
|
</div>`
|
|
5405
5405
|
), this.target;
|
|
5406
5406
|
}, n.prototype.getValue = function() {
|
|
5407
|
-
var
|
|
5408
|
-
if (
|
|
5409
|
-
return parseFloat(
|
|
5410
|
-
}, n.prototype.setValue = function(
|
|
5411
|
-
|
|
5407
|
+
var e = this.target.find("select").val();
|
|
5408
|
+
if (e)
|
|
5409
|
+
return parseFloat(e.toString());
|
|
5410
|
+
}, n.prototype.setValue = function(e) {
|
|
5411
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
5412
5412
|
}, n.prototype.destroy = function() {
|
|
5413
5413
|
this.target.remove();
|
|
5414
5414
|
}, n;
|
|
@@ -5416,8 +5416,8 @@ var At = function(q) {
|
|
|
5416
5416
|
function n() {
|
|
5417
5417
|
this.name = "contentPaddingBottom";
|
|
5418
5418
|
}
|
|
5419
|
-
return n.prototype.css = function(
|
|
5420
|
-
var Q =
|
|
5419
|
+
return n.prototype.css = function(e, B) {
|
|
5420
|
+
var Q = e.find(".hiprint-printElement-content");
|
|
5421
5421
|
if (Q && Q.length) {
|
|
5422
5422
|
if (B)
|
|
5423
5423
|
return Q.css("padding-bottom", B + "pt"), "padding-bottom";
|
|
@@ -5467,11 +5467,11 @@ var At = function(q) {
|
|
|
5467
5467
|
</div>`
|
|
5468
5468
|
), this.target;
|
|
5469
5469
|
}, n.prototype.getValue = function() {
|
|
5470
|
-
var
|
|
5471
|
-
if (
|
|
5472
|
-
return parseFloat(
|
|
5473
|
-
}, n.prototype.setValue = function(
|
|
5474
|
-
|
|
5470
|
+
var e = this.target.find("select").val();
|
|
5471
|
+
if (e)
|
|
5472
|
+
return parseFloat(e.toString());
|
|
5473
|
+
}, n.prototype.setValue = function(e) {
|
|
5474
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
5475
5475
|
}, n.prototype.destroy = function() {
|
|
5476
5476
|
this.target.remove();
|
|
5477
5477
|
}, n;
|
|
@@ -5479,15 +5479,15 @@ var At = function(q) {
|
|
|
5479
5479
|
function n() {
|
|
5480
5480
|
this.name = "borderStyle";
|
|
5481
5481
|
}
|
|
5482
|
-
return n.prototype.css = function(
|
|
5483
|
-
if (
|
|
5482
|
+
return n.prototype.css = function(e, B) {
|
|
5483
|
+
if (e && e.length) {
|
|
5484
5484
|
if (B)
|
|
5485
|
-
return
|
|
5486
|
-
|
|
5485
|
+
return e.css("border-style", B), "border-style:1px";
|
|
5486
|
+
e[0].style.borderStyle = "";
|
|
5487
5487
|
}
|
|
5488
5488
|
return null;
|
|
5489
|
-
}, n.prototype.createTarget = function(
|
|
5490
|
-
var B = ["hline", "vline", "rect", "oval"].includes(
|
|
5489
|
+
}, n.prototype.createTarget = function(e) {
|
|
5490
|
+
var B = ["hline", "vline", "rect", "oval"].includes(e.printElementType.type) ? "\u6837\u5F0F" : "\u8FB9\u6846\u6837\u5F0F";
|
|
5491
5491
|
return this.target = x(
|
|
5492
5492
|
` <div class="hiprint-option-item hiprint-option-item-row">
|
|
5493
5493
|
<div class="hiprint-option-item-label">
|
|
@@ -5504,11 +5504,11 @@ var At = function(q) {
|
|
|
5504
5504
|
</div>`
|
|
5505
5505
|
), this.target;
|
|
5506
5506
|
}, n.prototype.getValue = function() {
|
|
5507
|
-
var
|
|
5508
|
-
if (
|
|
5509
|
-
return
|
|
5510
|
-
}, n.prototype.setValue = function(
|
|
5511
|
-
this.target.find("select").val(
|
|
5507
|
+
var e = this.target.find("select").val();
|
|
5508
|
+
if (e)
|
|
5509
|
+
return e;
|
|
5510
|
+
}, n.prototype.setValue = function(e) {
|
|
5511
|
+
this.target.find("select").val(e);
|
|
5512
5512
|
}, n.prototype.destroy = function() {
|
|
5513
5513
|
this.target.remove();
|
|
5514
5514
|
}, n;
|
|
@@ -5516,11 +5516,11 @@ var At = function(q) {
|
|
|
5516
5516
|
function n() {
|
|
5517
5517
|
this.name = "backgroundColor";
|
|
5518
5518
|
}
|
|
5519
|
-
return n.prototype.css = function(
|
|
5520
|
-
if (
|
|
5519
|
+
return n.prototype.css = function(e, B) {
|
|
5520
|
+
if (e && e.length) {
|
|
5521
5521
|
if (B)
|
|
5522
|
-
return
|
|
5523
|
-
|
|
5522
|
+
return e.css("background-color", B), "background-color:" + B;
|
|
5523
|
+
e[0].style.backgroundColor = "";
|
|
5524
5524
|
}
|
|
5525
5525
|
return null;
|
|
5526
5526
|
}, n.prototype.createTarget = function() {
|
|
@@ -5535,14 +5535,14 @@ var At = function(q) {
|
|
|
5535
5535
|
</div>`
|
|
5536
5536
|
), this.target;
|
|
5537
5537
|
}, n.prototype.getValue = function() {
|
|
5538
|
-
var
|
|
5539
|
-
if (
|
|
5540
|
-
return
|
|
5541
|
-
}, n.prototype.setValue = function(
|
|
5538
|
+
var e = this.target.find("input").val();
|
|
5539
|
+
if (e)
|
|
5540
|
+
return e.toString();
|
|
5541
|
+
}, n.prototype.setValue = function(e) {
|
|
5542
5542
|
this.target.find("input").minicolors({
|
|
5543
|
-
defaultValue:
|
|
5543
|
+
defaultValue: e || "",
|
|
5544
5544
|
theme: "bootstrap"
|
|
5545
|
-
}), this.target.find("input").val(
|
|
5545
|
+
}), this.target.find("input").val(e);
|
|
5546
5546
|
}, n.prototype.destroy = function() {
|
|
5547
5547
|
this.target.remove();
|
|
5548
5548
|
}, n;
|
|
@@ -5566,11 +5566,11 @@ var At = function(q) {
|
|
|
5566
5566
|
</div><div class="hiprint-option-item-desc">(\u4EC5\u81EA\u5B9A\u4E49\u7EB8\u8D28\u6709\u6548)</div>`
|
|
5567
5567
|
), this.target;
|
|
5568
5568
|
}, n.prototype.getValue = function() {
|
|
5569
|
-
var
|
|
5570
|
-
if (
|
|
5571
|
-
return parseFloat(
|
|
5572
|
-
}, n.prototype.setValue = function(
|
|
5573
|
-
this.target.find("select").val(
|
|
5569
|
+
var e = this.target.find("select").val();
|
|
5570
|
+
if (e)
|
|
5571
|
+
return parseFloat(e.toString());
|
|
5572
|
+
}, n.prototype.setValue = function(e) {
|
|
5573
|
+
this.target.find("select").val(e);
|
|
5574
5574
|
}, n.prototype.destroy = function() {
|
|
5575
5575
|
this.target.remove();
|
|
5576
5576
|
}, n;
|
|
@@ -5594,14 +5594,14 @@ var At = function(q) {
|
|
|
5594
5594
|
</div>
|
|
5595
5595
|
</div>`
|
|
5596
5596
|
), this.target;
|
|
5597
|
-
}, n.prototype.css = function(
|
|
5598
|
-
return
|
|
5597
|
+
}, n.prototype.css = function(e, B) {
|
|
5598
|
+
return e && e.length && (e.removeClass("hiprint-text-content-middle"), e.removeClass("hiprint-text-content-bottom"), B) ? (B === "middle" && e.addClass("hiprint-text-content-middle"), B === "bottom" && e.addClass("hiprint-text-content-bottom"), "") : null;
|
|
5599
5599
|
}, n.prototype.getValue = function() {
|
|
5600
|
-
var
|
|
5601
|
-
if (
|
|
5602
|
-
return
|
|
5603
|
-
}, n.prototype.setValue = function(
|
|
5604
|
-
this.target.find("select").val(
|
|
5600
|
+
var e = this.target.find("select").val();
|
|
5601
|
+
if (e)
|
|
5602
|
+
return e.toString();
|
|
5603
|
+
}, n.prototype.setValue = function(e) {
|
|
5604
|
+
this.target.find("select").val(e);
|
|
5605
5605
|
}, n.prototype.destroy = function() {
|
|
5606
5606
|
this.target.remove();
|
|
5607
5607
|
}, n;
|
|
@@ -5613,18 +5613,18 @@ var At = function(q) {
|
|
|
5613
5613
|
return x('<div class="indicator"></div>').appendTo("body"), this.target = x(' <div class="hiprint-option-item hiprint-option-item-row"><ul class="hiprint-option-table-selected-columns"></ul></div>'), this.target;
|
|
5614
5614
|
}, n.prototype.getValue = function() {
|
|
5615
5615
|
return this.buildData();
|
|
5616
|
-
}, n.prototype.setValue = function(
|
|
5616
|
+
}, n.prototype.setValue = function(e, B, Q) {
|
|
5617
5617
|
var at = this, Pt = this;
|
|
5618
|
-
this.value =
|
|
5618
|
+
this.value = e, this.options = B, this.printElementType = Q;
|
|
5619
5619
|
var Tt = Q.columns[0].filter(function(ct) {
|
|
5620
|
-
return
|
|
5620
|
+
return e[0].columns.filter(function(xt) {
|
|
5621
5621
|
return ct.columnId == xt.columnId;
|
|
5622
5622
|
}).length == 0;
|
|
5623
5623
|
}).map(function(ct) {
|
|
5624
5624
|
var xt = new O.a(ct);
|
|
5625
5625
|
return xt.checked = !1, xt;
|
|
5626
5626
|
});
|
|
5627
|
-
this.allColumns =
|
|
5627
|
+
this.allColumns = e[0].columns.concat(Tt), e && e.length == 1 && (this.target.find("ul").html(
|
|
5628
5628
|
this.allColumns.map(function(ct, xt) {
|
|
5629
5629
|
return `<li class="hiprint-option-table-selected-item"> <div class="hi-pretty p-default">
|
|
5630
5630
|
` + (ct.checked ? '<input type="checkbox" checked column-id="' + (ct.id || ct.columnId) + '" />' : '<input type="checkbox" column-id="' + (ct.id || ct.columnId) + '" />') + `
|
|
@@ -5656,9 +5656,9 @@ var At = function(q) {
|
|
|
5656
5656
|
}
|
|
5657
5657
|
}));
|
|
5658
5658
|
}, n.prototype.buildData = function() {
|
|
5659
|
-
var
|
|
5660
|
-
return
|
|
5661
|
-
var Pt = x(at).attr("column-id"), Tt =
|
|
5659
|
+
var e = this, B = [];
|
|
5660
|
+
return e.options.columns.length > 1 ? this.value : (e.printElementType.makeColumnObj(e.allColumns), this.target.find("input").map(function(Q, at) {
|
|
5661
|
+
var Pt = x(at).attr("column-id"), Tt = e.printElementType.getColumnByColumnId(Pt);
|
|
5662
5662
|
if (Tt) {
|
|
5663
5663
|
var ct = new O.a(Tt);
|
|
5664
5664
|
ct.checked = Tt.checked, B.push(ct);
|
|
@@ -5688,11 +5688,11 @@ var At = function(q) {
|
|
|
5688
5688
|
</div>`
|
|
5689
5689
|
), this.target;
|
|
5690
5690
|
}, n.prototype.getValue = function() {
|
|
5691
|
-
var
|
|
5692
|
-
if (
|
|
5693
|
-
return
|
|
5694
|
-
}, n.prototype.setValue = function(
|
|
5695
|
-
this.target.find("select").val(
|
|
5691
|
+
var e = this.target.find("select").val();
|
|
5692
|
+
if (e)
|
|
5693
|
+
return e;
|
|
5694
|
+
}, n.prototype.setValue = function(e) {
|
|
5695
|
+
this.target.find("select").val(e);
|
|
5696
5696
|
}, n.prototype.destroy = function() {
|
|
5697
5697
|
this.target.remove();
|
|
5698
5698
|
}, n;
|
|
@@ -5719,11 +5719,11 @@ var At = function(q) {
|
|
|
5719
5719
|
</div>`
|
|
5720
5720
|
), this.target;
|
|
5721
5721
|
}, n.prototype.getValue = function() {
|
|
5722
|
-
var
|
|
5723
|
-
if (
|
|
5724
|
-
return
|
|
5725
|
-
}, n.prototype.setValue = function(
|
|
5726
|
-
this.target.find("select").val(
|
|
5722
|
+
var e = this.target.find("select").val();
|
|
5723
|
+
if (e)
|
|
5724
|
+
return e;
|
|
5725
|
+
}, n.prototype.setValue = function(e) {
|
|
5726
|
+
this.target.find("select").val(e);
|
|
5727
5727
|
}, n.prototype.destroy = function() {
|
|
5728
5728
|
this.target.remove();
|
|
5729
5729
|
}, n;
|
|
@@ -5762,10 +5762,10 @@ var At = function(q) {
|
|
|
5762
5762
|
</div>`
|
|
5763
5763
|
), this.target;
|
|
5764
5764
|
}, n.prototype.getValue = function() {
|
|
5765
|
-
var
|
|
5766
|
-
return
|
|
5767
|
-
}, n.prototype.setValue = function(
|
|
5768
|
-
this.target.find("select").val(
|
|
5765
|
+
var e = this.target.find("select").val();
|
|
5766
|
+
return e || void 0;
|
|
5767
|
+
}, n.prototype.setValue = function(e) {
|
|
5768
|
+
this.target.find("select").val(e);
|
|
5769
5769
|
}, n.prototype.destroy = function() {
|
|
5770
5770
|
this.target.remove();
|
|
5771
5771
|
}, n;
|
|
@@ -5791,10 +5791,10 @@ var At = function(q) {
|
|
|
5791
5791
|
</div>`
|
|
5792
5792
|
), this.target;
|
|
5793
5793
|
}, n.prototype.getValue = function() {
|
|
5794
|
-
var
|
|
5795
|
-
return parseInt(
|
|
5796
|
-
}, n.prototype.setValue = function(
|
|
5797
|
-
this.target.find("select").val(
|
|
5794
|
+
var e = this.target.find("select").val();
|
|
5795
|
+
return parseInt(e || 0);
|
|
5796
|
+
}, n.prototype.setValue = function(e) {
|
|
5797
|
+
this.target.find("select").val(e);
|
|
5798
5798
|
}, n.prototype.destroy = function() {
|
|
5799
5799
|
this.target.remove();
|
|
5800
5800
|
}, n;
|
|
@@ -5814,11 +5814,11 @@ var At = function(q) {
|
|
|
5814
5814
|
</div>`
|
|
5815
5815
|
), this.target;
|
|
5816
5816
|
}, n.prototype.getValue = function() {
|
|
5817
|
-
var
|
|
5818
|
-
if (
|
|
5819
|
-
return
|
|
5820
|
-
}, n.prototype.setValue = function(
|
|
5821
|
-
this.target.find("input").val(
|
|
5817
|
+
var e = this.target.find("input").val();
|
|
5818
|
+
if (e)
|
|
5819
|
+
return e.toString();
|
|
5820
|
+
}, n.prototype.setValue = function(e) {
|
|
5821
|
+
this.target.find("input").val(e);
|
|
5822
5822
|
}, n.prototype.destroy = function() {
|
|
5823
5823
|
this.target.remove();
|
|
5824
5824
|
}, n;
|
|
@@ -5832,8 +5832,8 @@ var At = function(q) {
|
|
|
5832
5832
|
), this.target;
|
|
5833
5833
|
}, n.prototype.getValue = function() {
|
|
5834
5834
|
return this.target.find("select").val() != "false";
|
|
5835
|
-
}, n.prototype.setValue = function(
|
|
5836
|
-
this.target.find("select").val((
|
|
5835
|
+
}, n.prototype.setValue = function(e) {
|
|
5836
|
+
this.target.find("select").val((e == null ? "" : e).toString());
|
|
5837
5837
|
}, n.prototype.destroy = function() {
|
|
5838
5838
|
this.target.remove();
|
|
5839
5839
|
}, n;
|
|
@@ -5853,11 +5853,11 @@ var At = function(q) {
|
|
|
5853
5853
|
</div>`
|
|
5854
5854
|
), this.target;
|
|
5855
5855
|
}, n.prototype.getValue = function() {
|
|
5856
|
-
var
|
|
5857
|
-
if (
|
|
5858
|
-
return
|
|
5859
|
-
}, n.prototype.setValue = function(
|
|
5860
|
-
this.target.find("input").val(
|
|
5856
|
+
var e = this.target.find("input").val();
|
|
5857
|
+
if (e)
|
|
5858
|
+
return e.toString();
|
|
5859
|
+
}, n.prototype.setValue = function(e) {
|
|
5860
|
+
this.target.find("input").val(e);
|
|
5861
5861
|
}, n.prototype.destroy = function() {
|
|
5862
5862
|
this.target.remove();
|
|
5863
5863
|
}, n;
|
|
@@ -5883,11 +5883,11 @@ var At = function(q) {
|
|
|
5883
5883
|
</div>`
|
|
5884
5884
|
), this.target;
|
|
5885
5885
|
}, n.prototype.getValue = function() {
|
|
5886
|
-
var
|
|
5887
|
-
if (
|
|
5888
|
-
return
|
|
5889
|
-
}, n.prototype.setValue = function(
|
|
5890
|
-
this.target.find("select").val(
|
|
5886
|
+
var e = this.target.find("select").val();
|
|
5887
|
+
if (e)
|
|
5888
|
+
return e.toString();
|
|
5889
|
+
}, n.prototype.setValue = function(e) {
|
|
5890
|
+
this.target.find("select").val(e);
|
|
5891
5891
|
}, n.prototype.destroy = function() {
|
|
5892
5892
|
this.target.remove();
|
|
5893
5893
|
}, n;
|
|
@@ -5896,13 +5896,13 @@ var At = function(q) {
|
|
|
5896
5896
|
this.name = "tableSummaryNumFormat";
|
|
5897
5897
|
}
|
|
5898
5898
|
return n.prototype.createTarget = function() {
|
|
5899
|
-
var
|
|
5899
|
+
var e = [{ t: "\u6574\u6570", v: "0" }], B = [1, 2, 3, 4, 5, 6];
|
|
5900
5900
|
B.forEach(function(at) {
|
|
5901
|
-
|
|
5901
|
+
e.push({ t: "\u4FDD\u7559" + at + "\u4F4D", v: "" + at });
|
|
5902
5902
|
});
|
|
5903
5903
|
var Q = `
|
|
5904
5904
|
<option value="" >\u9ED8\u8BA4</option>`;
|
|
5905
|
-
return
|
|
5905
|
+
return e.forEach(function(at) {
|
|
5906
5906
|
Q += `
|
|
5907
5907
|
<option value="` + (at.v || "") + '">' + (at.t || "") + "</option>";
|
|
5908
5908
|
}), this.target = x(
|
|
@@ -5916,11 +5916,11 @@ var At = function(q) {
|
|
|
5916
5916
|
</div>`
|
|
5917
5917
|
), this.target.find(".auto-submit").append(x(Q)), this.target;
|
|
5918
5918
|
}, n.prototype.getValue = function() {
|
|
5919
|
-
var
|
|
5920
|
-
if (
|
|
5921
|
-
return
|
|
5922
|
-
}, n.prototype.setValue = function(
|
|
5923
|
-
this.target.find("select").val(
|
|
5919
|
+
var e = this.target.find("select").val();
|
|
5920
|
+
if (e)
|
|
5921
|
+
return e.toString();
|
|
5922
|
+
}, n.prototype.setValue = function(e) {
|
|
5923
|
+
this.target.find("select").val(e);
|
|
5924
5924
|
}, n.prototype.destroy = function() {
|
|
5925
5925
|
this.target.remove();
|
|
5926
5926
|
}, n;
|
|
@@ -5929,7 +5929,7 @@ var At = function(q) {
|
|
|
5929
5929
|
this.name = "upperCase";
|
|
5930
5930
|
}
|
|
5931
5931
|
return n.prototype.createTarget = function() {
|
|
5932
|
-
var
|
|
5932
|
+
var e = [
|
|
5933
5933
|
{ t: "\u300C\u5C0F\u5199\u300D\u5341\u70B9\u516B", v: "0" },
|
|
5934
5934
|
{ t: "\u300C\u5C0F\u5199\u300D\u4E00\u5341\u70B9\u516B", v: "1" },
|
|
5935
5935
|
{ t: "\u300C\u5927\u5199\u300D\u62FE\u70B9\u634C", v: "2" },
|
|
@@ -5940,7 +5940,7 @@ var At = function(q) {
|
|
|
5940
5940
|
{ t: "\u300C\u91D1\u989D\u300D\u58F9\u62FE\u5143\u634C\u89D2\u96F6\u5206", v: "7" }
|
|
5941
5941
|
], B = `
|
|
5942
5942
|
<option value="">\u9ED8\u8BA4</option>`;
|
|
5943
|
-
return
|
|
5943
|
+
return e.forEach((Q) => {
|
|
5944
5944
|
B += `
|
|
5945
5945
|
<option value='${Q.v}'>${Q.t}</option>`;
|
|
5946
5946
|
}), this.target = x(
|
|
@@ -5954,11 +5954,11 @@ var At = function(q) {
|
|
|
5954
5954
|
</div>`
|
|
5955
5955
|
), this.target.find(".auto-submit").append(x(B)), this.target;
|
|
5956
5956
|
}, n.prototype.getValue = function() {
|
|
5957
|
-
var
|
|
5958
|
-
if (
|
|
5959
|
-
return
|
|
5960
|
-
}, n.prototype.setValue = function(
|
|
5961
|
-
this.target.find("select").val(
|
|
5957
|
+
var e = this.target.find("select").val();
|
|
5958
|
+
if (e)
|
|
5959
|
+
return e.toString();
|
|
5960
|
+
}, n.prototype.setValue = function(e) {
|
|
5961
|
+
this.target.find("select").val(e);
|
|
5962
5962
|
}, n.prototype.destroy = function() {
|
|
5963
5963
|
this.target.remove();
|
|
5964
5964
|
}, n;
|
|
@@ -5972,8 +5972,8 @@ var At = function(q) {
|
|
|
5972
5972
|
), this.target;
|
|
5973
5973
|
}, n.prototype.getValue = function() {
|
|
5974
5974
|
return this.target.find("select").val();
|
|
5975
|
-
}, n.prototype.setValue = function(
|
|
5976
|
-
this.target.find("select").val(
|
|
5975
|
+
}, n.prototype.setValue = function(e) {
|
|
5976
|
+
this.target.find("select").val(e);
|
|
5977
5977
|
}, n.prototype.destroy = function() {
|
|
5978
5978
|
this.target.remove();
|
|
5979
5979
|
}, n;
|
|
@@ -5993,11 +5993,11 @@ var At = function(q) {
|
|
|
5993
5993
|
</div>`
|
|
5994
5994
|
), this.target;
|
|
5995
5995
|
}, n.prototype.getValue = function() {
|
|
5996
|
-
var
|
|
5997
|
-
if (
|
|
5998
|
-
return parseFloat(
|
|
5999
|
-
}, n.prototype.setValue = function(
|
|
6000
|
-
this.target.find("input").val(
|
|
5996
|
+
var e = this.target.find("input").val();
|
|
5997
|
+
if (e)
|
|
5998
|
+
return parseFloat(e.toString());
|
|
5999
|
+
}, n.prototype.setValue = function(e) {
|
|
6000
|
+
this.target.find("input").val(e);
|
|
6001
6001
|
}, n.prototype.destroy = function() {
|
|
6002
6002
|
this.target.remove();
|
|
6003
6003
|
}, n;
|
|
@@ -6022,11 +6022,11 @@ var At = function(q) {
|
|
|
6022
6022
|
</div>`
|
|
6023
6023
|
), this.target;
|
|
6024
6024
|
}, n.prototype.getValue = function() {
|
|
6025
|
-
var
|
|
6026
|
-
if (
|
|
6027
|
-
return parseFloat(
|
|
6028
|
-
}, n.prototype.setValue = function(
|
|
6029
|
-
|
|
6025
|
+
var e = this.target.find("select").val();
|
|
6026
|
+
if (e)
|
|
6027
|
+
return parseFloat(e.toString());
|
|
6028
|
+
}, n.prototype.setValue = function(e) {
|
|
6029
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
6030
6030
|
}, n.prototype.destroy = function() {
|
|
6031
6031
|
this.target.remove();
|
|
6032
6032
|
}, n;
|
|
@@ -6059,22 +6059,22 @@ var At = function(q) {
|
|
|
6059
6059
|
</div>`
|
|
6060
6060
|
), this.target;
|
|
6061
6061
|
}, n.prototype.getValue = function() {
|
|
6062
|
-
var
|
|
6063
|
-
if (
|
|
6064
|
-
return parseFloat(
|
|
6065
|
-
}, n.prototype.css = function(
|
|
6066
|
-
if (
|
|
6062
|
+
var e = this.target.find("select").val();
|
|
6063
|
+
if (e)
|
|
6064
|
+
return parseFloat(e.toString());
|
|
6065
|
+
}, n.prototype.css = function(e, B) {
|
|
6066
|
+
if (e && e.length) {
|
|
6067
6067
|
if (B)
|
|
6068
|
-
return
|
|
6069
|
-
|
|
6068
|
+
return e.find(".table-grid-row").css("margin-left", "-" + B + "pt").css("margin-right", "-" + B + "pt"), e.find(".tableGridColumnsGutterRow").css("padding-left", B + "pt").css("padding-right", B + "pt"), null;
|
|
6069
|
+
e.find(".table-grid-row").map(function(Q, at) {
|
|
6070
6070
|
at.style.marginLeft = "", at.style.marginRight = "";
|
|
6071
|
-
}),
|
|
6071
|
+
}), e.find(".tableGridColumnsGutterRow").map(function(Q, at) {
|
|
6072
6072
|
at.style.paddingLeft = "", at.style.paddingRight = "";
|
|
6073
6073
|
});
|
|
6074
6074
|
}
|
|
6075
6075
|
return null;
|
|
6076
|
-
}, n.prototype.setValue = function(
|
|
6077
|
-
|
|
6076
|
+
}, n.prototype.setValue = function(e) {
|
|
6077
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
6078
6078
|
}, n.prototype.destroy = function() {
|
|
6079
6079
|
this.target.remove();
|
|
6080
6080
|
}, n;
|
|
@@ -6099,11 +6099,11 @@ var At = function(q) {
|
|
|
6099
6099
|
</div>`
|
|
6100
6100
|
), this.target;
|
|
6101
6101
|
}, n.prototype.getValue = function() {
|
|
6102
|
-
var
|
|
6103
|
-
if (
|
|
6104
|
-
return
|
|
6105
|
-
}, n.prototype.setValue = function(
|
|
6106
|
-
this.target.find("select").val(
|
|
6102
|
+
var e = this.target.find("select").val();
|
|
6103
|
+
if (e)
|
|
6104
|
+
return e.toString();
|
|
6105
|
+
}, n.prototype.setValue = function(e) {
|
|
6106
|
+
this.target.find("select").val(e);
|
|
6107
6107
|
}, n.prototype.destroy = function() {
|
|
6108
6108
|
this.target.remove();
|
|
6109
6109
|
}, n;
|
|
@@ -6111,8 +6111,8 @@ var At = function(q) {
|
|
|
6111
6111
|
function n() {
|
|
6112
6112
|
this.name = "paddingLeft";
|
|
6113
6113
|
}
|
|
6114
|
-
return n.prototype.css = function(
|
|
6115
|
-
var Q =
|
|
6114
|
+
return n.prototype.css = function(e, B) {
|
|
6115
|
+
var Q = e;
|
|
6116
6116
|
if (Q && Q.length) {
|
|
6117
6117
|
if (B)
|
|
6118
6118
|
return Q.css("padding-left", B + "pt"), "padding-left";
|
|
@@ -6162,11 +6162,11 @@ var At = function(q) {
|
|
|
6162
6162
|
</div>`
|
|
6163
6163
|
), this.target;
|
|
6164
6164
|
}, n.prototype.getValue = function() {
|
|
6165
|
-
var
|
|
6166
|
-
if (
|
|
6167
|
-
return parseFloat(
|
|
6168
|
-
}, n.prototype.setValue = function(
|
|
6169
|
-
|
|
6165
|
+
var e = this.target.find("select").val();
|
|
6166
|
+
if (e)
|
|
6167
|
+
return parseFloat(e.toString());
|
|
6168
|
+
}, n.prototype.setValue = function(e) {
|
|
6169
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
6170
6170
|
}, n.prototype.destroy = function() {
|
|
6171
6171
|
this.target.remove();
|
|
6172
6172
|
}, n;
|
|
@@ -6174,8 +6174,8 @@ var At = function(q) {
|
|
|
6174
6174
|
function n() {
|
|
6175
6175
|
this.name = "paddingRight";
|
|
6176
6176
|
}
|
|
6177
|
-
return n.prototype.css = function(
|
|
6178
|
-
var Q =
|
|
6177
|
+
return n.prototype.css = function(e, B) {
|
|
6178
|
+
var Q = e;
|
|
6179
6179
|
if (Q && Q.length) {
|
|
6180
6180
|
if (B)
|
|
6181
6181
|
return Q.css("padding-right", B + "pt"), "padding-right";
|
|
@@ -6225,11 +6225,11 @@ var At = function(q) {
|
|
|
6225
6225
|
</div>`
|
|
6226
6226
|
), this.target;
|
|
6227
6227
|
}, n.prototype.getValue = function() {
|
|
6228
|
-
var
|
|
6229
|
-
if (
|
|
6230
|
-
return parseFloat(
|
|
6231
|
-
}, n.prototype.setValue = function(
|
|
6232
|
-
|
|
6228
|
+
var e = this.target.find("select").val();
|
|
6229
|
+
if (e)
|
|
6230
|
+
return parseFloat(e.toString());
|
|
6231
|
+
}, n.prototype.setValue = function(e) {
|
|
6232
|
+
e && (this.target.find('option[value="' + e + '"]').length || this.target.find("select").prepend('<option value="' + e + '" >' + e + "</option>")), this.target.find("select").val(e);
|
|
6233
6233
|
}, n.prototype.destroy = function() {
|
|
6234
6234
|
this.target.remove();
|
|
6235
6235
|
}, n;
|
|
@@ -6238,7 +6238,7 @@ var At = function(q) {
|
|
|
6238
6238
|
this.name = "dataType";
|
|
6239
6239
|
}
|
|
6240
6240
|
return n.prototype.createTarget = function() {
|
|
6241
|
-
var
|
|
6241
|
+
var e = this;
|
|
6242
6242
|
return this.target = x(
|
|
6243
6243
|
`<div class="hiprint-option-item hiprint-option-item-row">
|
|
6244
6244
|
<div class="hiprint-option-item-label">
|
|
@@ -6265,15 +6265,15 @@ var At = function(q) {
|
|
|
6265
6265
|
</div>
|
|
6266
6266
|
</div>`
|
|
6267
6267
|
), x(this.target.find(".hiprint-option-item-datatype")).change(function() {
|
|
6268
|
-
var B = x(
|
|
6269
|
-
|
|
6268
|
+
var B = x(e.target.find(".hiprint-option-item-datatype")).val();
|
|
6269
|
+
e.loadFormatSelectByDataType(B), e.submit(e.getValue());
|
|
6270
6270
|
}), this.target;
|
|
6271
6271
|
}, n.prototype.getValue = function() {
|
|
6272
|
-
var
|
|
6273
|
-
if (
|
|
6272
|
+
var e = this.target.find(".hiprint-option-item-datatype").val();
|
|
6273
|
+
if (e) {
|
|
6274
6274
|
var B = this.target.find(".hiprint-option-item-datatype-format").val();
|
|
6275
6275
|
return {
|
|
6276
|
-
dataType:
|
|
6276
|
+
dataType: e,
|
|
6277
6277
|
format: B || void 0
|
|
6278
6278
|
};
|
|
6279
6279
|
}
|
|
@@ -6281,12 +6281,12 @@ var At = function(q) {
|
|
|
6281
6281
|
dataType: void 0,
|
|
6282
6282
|
format: void 0
|
|
6283
6283
|
};
|
|
6284
|
-
}, n.prototype.setValue = function(
|
|
6284
|
+
}, n.prototype.setValue = function(e, B) {
|
|
6285
6285
|
this.target.find(".hiprint-option-item-datatype").val(B.dataType || ""), this.loadFormatSelectByDataType(B.dataType), this.target.find(".hiprint-option-item-datatype-format").val(B.format || "");
|
|
6286
6286
|
}, n.prototype.destroy = function() {
|
|
6287
6287
|
this.target.remove();
|
|
6288
|
-
}, n.prototype.loadFormatSelectByDataType = function(
|
|
6289
|
-
|
|
6288
|
+
}, n.prototype.loadFormatSelectByDataType = function(e) {
|
|
6289
|
+
e === "boolean" ? (this.target.find(".hiprint-option-item-datatype-select-format").removeClass("hiprint-option-item-datatype-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-input-format").addClass("hiprint-option-item-datatype-format").show()) : e === "datetime" ? (this.target.find(".hiprint-option-item-datatype-select-format").addClass("hiprint-option-item-datatype-format").show(), this.target.find(".hiprint-option-item-datatype-input-format").removeClass("hiprint-option-item-datatype-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-select-format").html(
|
|
6290
6290
|
`
|
|
6291
6291
|
<option value="" >\u9ED8\u8BA4</option>
|
|
6292
6292
|
<option value="M/d" >M/d</option>
|
|
@@ -6344,7 +6344,7 @@ var At = function(q) {
|
|
|
6344
6344
|
this.name = "formatter";
|
|
6345
6345
|
}
|
|
6346
6346
|
return n.prototype.createTarget = function() {
|
|
6347
|
-
var
|
|
6347
|
+
var e = ` <div class="hiprint-option-item hiprint-option-item-row">
|
|
6348
6348
|
<div class="hiprint-option-item-label">
|
|
6349
6349
|
\u683C\u5F0F\u5316\u51FD\u6570
|
|
6350
6350
|
</div>
|
|
@@ -6352,13 +6352,13 @@ var At = function(q) {
|
|
|
6352
6352
|
<textarea style="height:80px;" placeholder="function(value, options,templateData){}" class="auto-submit"></textarea>
|
|
6353
6353
|
</div>
|
|
6354
6354
|
</div>`;
|
|
6355
|
-
return this.target = x(
|
|
6355
|
+
return this.target = x(e), this.target;
|
|
6356
6356
|
}, n.prototype.getValue = function() {
|
|
6357
|
-
var
|
|
6358
|
-
if (
|
|
6359
|
-
return
|
|
6360
|
-
}, n.prototype.setValue = function(
|
|
6361
|
-
this.target.find("textarea").val(
|
|
6357
|
+
var e = this.target.find("textarea").val();
|
|
6358
|
+
if (e)
|
|
6359
|
+
return e;
|
|
6360
|
+
}, n.prototype.setValue = function(e) {
|
|
6361
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6362
6362
|
}, n.prototype.destroy = function() {
|
|
6363
6363
|
this.target.remove();
|
|
6364
6364
|
}, n;
|
|
@@ -6378,11 +6378,11 @@ var At = function(q) {
|
|
|
6378
6378
|
</div>`
|
|
6379
6379
|
), this.target;
|
|
6380
6380
|
}, n.prototype.getValue = function() {
|
|
6381
|
-
var
|
|
6382
|
-
if (
|
|
6383
|
-
return
|
|
6384
|
-
}, n.prototype.setValue = function(
|
|
6385
|
-
this.target.find("textarea").val(
|
|
6381
|
+
var e = this.target.find("textarea").val();
|
|
6382
|
+
if (e)
|
|
6383
|
+
return e;
|
|
6384
|
+
}, n.prototype.setValue = function(e) {
|
|
6385
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6386
6386
|
}, n.prototype.destroy = function() {
|
|
6387
6387
|
this.target.remove();
|
|
6388
6388
|
}, n;
|
|
@@ -6402,11 +6402,11 @@ var At = function(q) {
|
|
|
6402
6402
|
</div>`
|
|
6403
6403
|
), this.target;
|
|
6404
6404
|
}, n.prototype.getValue = function() {
|
|
6405
|
-
var
|
|
6406
|
-
if (
|
|
6407
|
-
return
|
|
6408
|
-
}, n.prototype.setValue = function(
|
|
6409
|
-
this.target.find("textarea").val(
|
|
6405
|
+
var e = this.target.find("textarea").val();
|
|
6406
|
+
if (e)
|
|
6407
|
+
return e;
|
|
6408
|
+
}, n.prototype.setValue = function(e) {
|
|
6409
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6410
6410
|
}, n.prototype.destroy = function() {
|
|
6411
6411
|
this.target.remove();
|
|
6412
6412
|
}, n;
|
|
@@ -6432,8 +6432,8 @@ var At = function(q) {
|
|
|
6432
6432
|
}, n.prototype.getValue = function() {
|
|
6433
6433
|
if (this.target.find("select").val() == "true")
|
|
6434
6434
|
return !0;
|
|
6435
|
-
}, n.prototype.setValue = function(
|
|
6436
|
-
this.target.find("select").val((
|
|
6435
|
+
}, n.prototype.setValue = function(e) {
|
|
6436
|
+
this.target.find("select").val((e == null ? "" : e).toString());
|
|
6437
6437
|
}, n.prototype.destroy = function() {
|
|
6438
6438
|
this.target.remove();
|
|
6439
6439
|
}, n;
|
|
@@ -6453,11 +6453,11 @@ var At = function(q) {
|
|
|
6453
6453
|
</div>`
|
|
6454
6454
|
), this.target;
|
|
6455
6455
|
}, n.prototype.getValue = function() {
|
|
6456
|
-
var
|
|
6457
|
-
if (
|
|
6458
|
-
return
|
|
6459
|
-
}, n.prototype.setValue = function(
|
|
6460
|
-
this.target.find("textarea").val(
|
|
6456
|
+
var e = this.target.find("textarea").val();
|
|
6457
|
+
if (e)
|
|
6458
|
+
return e;
|
|
6459
|
+
}, n.prototype.setValue = function(e) {
|
|
6460
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6461
6461
|
}, n.prototype.destroy = function() {
|
|
6462
6462
|
this.target.remove();
|
|
6463
6463
|
}, n;
|
|
@@ -6477,11 +6477,11 @@ var At = function(q) {
|
|
|
6477
6477
|
</div>`
|
|
6478
6478
|
), this.target;
|
|
6479
6479
|
}, n.prototype.getValue = function() {
|
|
6480
|
-
var
|
|
6481
|
-
if (
|
|
6482
|
-
return
|
|
6483
|
-
}, n.prototype.setValue = function(
|
|
6484
|
-
this.target.find("textarea").val(
|
|
6480
|
+
var e = this.target.find("textarea").val();
|
|
6481
|
+
if (e)
|
|
6482
|
+
return e;
|
|
6483
|
+
}, n.prototype.setValue = function(e) {
|
|
6484
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6485
6485
|
}, n.prototype.destroy = function() {
|
|
6486
6486
|
this.target.remove();
|
|
6487
6487
|
}, n;
|
|
@@ -6501,11 +6501,11 @@ var At = function(q) {
|
|
|
6501
6501
|
</div>`
|
|
6502
6502
|
), this.target;
|
|
6503
6503
|
}, n.prototype.getValue = function() {
|
|
6504
|
-
var
|
|
6505
|
-
if (
|
|
6506
|
-
return
|
|
6507
|
-
}, n.prototype.setValue = function(
|
|
6508
|
-
this.target.find("textarea").val(
|
|
6504
|
+
var e = this.target.find("textarea").val();
|
|
6505
|
+
if (e)
|
|
6506
|
+
return e;
|
|
6507
|
+
}, n.prototype.setValue = function(e) {
|
|
6508
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6509
6509
|
}, n.prototype.destroy = function() {
|
|
6510
6510
|
this.target.remove();
|
|
6511
6511
|
}, n;
|
|
@@ -6525,11 +6525,11 @@ var At = function(q) {
|
|
|
6525
6525
|
</div>`
|
|
6526
6526
|
), this.target;
|
|
6527
6527
|
}, n.prototype.getValue = function() {
|
|
6528
|
-
var
|
|
6529
|
-
if (
|
|
6530
|
-
return
|
|
6531
|
-
}, n.prototype.setValue = function(
|
|
6532
|
-
this.target.find("textarea").val(
|
|
6528
|
+
var e = this.target.find("textarea").val();
|
|
6529
|
+
if (e)
|
|
6530
|
+
return e;
|
|
6531
|
+
}, n.prototype.setValue = function(e) {
|
|
6532
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6533
6533
|
}, n.prototype.destroy = function() {
|
|
6534
6534
|
this.target.remove();
|
|
6535
6535
|
}, n;
|
|
@@ -6549,11 +6549,11 @@ var At = function(q) {
|
|
|
6549
6549
|
</div>`
|
|
6550
6550
|
), this.target;
|
|
6551
6551
|
}, n.prototype.getValue = function() {
|
|
6552
|
-
var
|
|
6553
|
-
if (
|
|
6554
|
-
return
|
|
6555
|
-
}, n.prototype.setValue = function(
|
|
6556
|
-
this.target.find("textarea").val(
|
|
6552
|
+
var e = this.target.find("textarea").val();
|
|
6553
|
+
if (e)
|
|
6554
|
+
return e;
|
|
6555
|
+
}, n.prototype.setValue = function(e) {
|
|
6556
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6557
6557
|
}, n.prototype.destroy = function() {
|
|
6558
6558
|
this.target.remove();
|
|
6559
6559
|
}, n;
|
|
@@ -6573,11 +6573,11 @@ var At = function(q) {
|
|
|
6573
6573
|
</div>`
|
|
6574
6574
|
), this.target;
|
|
6575
6575
|
}, n.prototype.getValue = function() {
|
|
6576
|
-
var
|
|
6577
|
-
if (
|
|
6578
|
-
return
|
|
6579
|
-
}, n.prototype.setValue = function(
|
|
6580
|
-
this.target.find("textarea").val(
|
|
6576
|
+
var e = this.target.find("textarea").val();
|
|
6577
|
+
if (e)
|
|
6578
|
+
return e;
|
|
6579
|
+
}, n.prototype.setValue = function(e) {
|
|
6580
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6581
6581
|
}, n.prototype.destroy = function() {
|
|
6582
6582
|
this.target.remove();
|
|
6583
6583
|
}, n;
|
|
@@ -6603,11 +6603,11 @@ var At = function(q) {
|
|
|
6603
6603
|
</div>`
|
|
6604
6604
|
), this.target;
|
|
6605
6605
|
}, n.prototype.getValue = function() {
|
|
6606
|
-
var
|
|
6607
|
-
if (
|
|
6608
|
-
return
|
|
6609
|
-
}, n.prototype.setValue = function(
|
|
6610
|
-
this.target.find("select").val(
|
|
6606
|
+
var e = this.target.find("select").val();
|
|
6607
|
+
if (e)
|
|
6608
|
+
return e.toString();
|
|
6609
|
+
}, n.prototype.setValue = function(e) {
|
|
6610
|
+
this.target.find("select").val(e);
|
|
6611
6611
|
}, n.prototype.destroy = function() {
|
|
6612
6612
|
this.target.remove();
|
|
6613
6613
|
}, n;
|
|
@@ -6633,11 +6633,11 @@ var At = function(q) {
|
|
|
6633
6633
|
</div>`
|
|
6634
6634
|
), this.target;
|
|
6635
6635
|
}, n.prototype.getValue = function() {
|
|
6636
|
-
var
|
|
6637
|
-
if (
|
|
6638
|
-
return
|
|
6639
|
-
}, n.prototype.setValue = function(
|
|
6640
|
-
this.target.find("select").val(
|
|
6636
|
+
var e = this.target.find("select").val();
|
|
6637
|
+
if (e)
|
|
6638
|
+
return e.toString();
|
|
6639
|
+
}, n.prototype.setValue = function(e) {
|
|
6640
|
+
this.target.find("select").val(e);
|
|
6641
6641
|
}, n.prototype.destroy = function() {
|
|
6642
6642
|
this.target.remove();
|
|
6643
6643
|
}, n;
|
|
@@ -6663,11 +6663,11 @@ var At = function(q) {
|
|
|
6663
6663
|
</div>`
|
|
6664
6664
|
), this.target;
|
|
6665
6665
|
}, n.prototype.getValue = function() {
|
|
6666
|
-
var
|
|
6667
|
-
if (
|
|
6668
|
-
return
|
|
6669
|
-
}, n.prototype.setValue = function(
|
|
6670
|
-
this.target.find("select").val(
|
|
6666
|
+
var e = this.target.find("select").val();
|
|
6667
|
+
if (e)
|
|
6668
|
+
return e.toString();
|
|
6669
|
+
}, n.prototype.setValue = function(e) {
|
|
6670
|
+
this.target.find("select").val(e);
|
|
6671
6671
|
}, n.prototype.destroy = function() {
|
|
6672
6672
|
this.target.remove();
|
|
6673
6673
|
}, n;
|
|
@@ -6687,11 +6687,11 @@ var At = function(q) {
|
|
|
6687
6687
|
</div>`
|
|
6688
6688
|
), this.target;
|
|
6689
6689
|
}, n.prototype.getValue = function() {
|
|
6690
|
-
var
|
|
6691
|
-
if (
|
|
6692
|
-
return
|
|
6693
|
-
}, n.prototype.setValue = function(
|
|
6694
|
-
this.target.find("textarea").val(
|
|
6690
|
+
var e = this.target.find("textarea").val();
|
|
6691
|
+
if (e)
|
|
6692
|
+
return e;
|
|
6693
|
+
}, n.prototype.setValue = function(e) {
|
|
6694
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6695
6695
|
}, n.prototype.destroy = function() {
|
|
6696
6696
|
this.target.remove();
|
|
6697
6697
|
}, n;
|
|
@@ -6711,11 +6711,11 @@ var At = function(q) {
|
|
|
6711
6711
|
</div>`
|
|
6712
6712
|
), this.target;
|
|
6713
6713
|
}, n.prototype.getValue = function() {
|
|
6714
|
-
var
|
|
6715
|
-
if (
|
|
6716
|
-
return
|
|
6717
|
-
}, n.prototype.setValue = function(
|
|
6718
|
-
this.target.find("textarea").val(
|
|
6714
|
+
var e = this.target.find("textarea").val();
|
|
6715
|
+
if (e)
|
|
6716
|
+
return e;
|
|
6717
|
+
}, n.prototype.setValue = function(e) {
|
|
6718
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6719
6719
|
}, n.prototype.destroy = function() {
|
|
6720
6720
|
this.target.remove();
|
|
6721
6721
|
}, n;
|
|
@@ -6735,11 +6735,11 @@ var At = function(q) {
|
|
|
6735
6735
|
</div>`
|
|
6736
6736
|
), this.target;
|
|
6737
6737
|
}, n.prototype.getValue = function() {
|
|
6738
|
-
var
|
|
6739
|
-
if (
|
|
6740
|
-
return
|
|
6741
|
-
}, n.prototype.setValue = function(
|
|
6742
|
-
this.target.find("textarea").val(
|
|
6738
|
+
var e = this.target.find("textarea").val();
|
|
6739
|
+
if (e)
|
|
6740
|
+
return e;
|
|
6741
|
+
}, n.prototype.setValue = function(e) {
|
|
6742
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6743
6743
|
}, n.prototype.destroy = function() {
|
|
6744
6744
|
this.target.remove();
|
|
6745
6745
|
}, n;
|
|
@@ -6759,11 +6759,11 @@ var At = function(q) {
|
|
|
6759
6759
|
</div>`
|
|
6760
6760
|
), this.target;
|
|
6761
6761
|
}, n.prototype.getValue = function() {
|
|
6762
|
-
var
|
|
6763
|
-
if (
|
|
6764
|
-
return
|
|
6765
|
-
}, n.prototype.setValue = function(
|
|
6766
|
-
this.target.find("textarea").val(
|
|
6762
|
+
var e = this.target.find("textarea").val();
|
|
6763
|
+
if (e)
|
|
6764
|
+
return e;
|
|
6765
|
+
}, n.prototype.setValue = function(e) {
|
|
6766
|
+
this.target.find("textarea").val(e ? e.toString() : null);
|
|
6767
6767
|
}, n.prototype.destroy = function() {
|
|
6768
6768
|
this.target.remove();
|
|
6769
6769
|
}, n;
|
|
@@ -6789,8 +6789,8 @@ var At = function(q) {
|
|
|
6789
6789
|
}, n.prototype.getValue = function() {
|
|
6790
6790
|
if (this.target.find("select").val() == "true")
|
|
6791
6791
|
return !0;
|
|
6792
|
-
}, n.prototype.setValue = function(
|
|
6793
|
-
this.target.find("select").val((
|
|
6792
|
+
}, n.prototype.setValue = function(e) {
|
|
6793
|
+
this.target.find("select").val((e == null ? "" : e).toString());
|
|
6794
6794
|
}, n.prototype.destroy = function() {
|
|
6795
6795
|
this.target.remove();
|
|
6796
6796
|
}, n;
|
|
@@ -6810,11 +6810,11 @@ var At = function(q) {
|
|
|
6810
6810
|
</div>`
|
|
6811
6811
|
), this.target;
|
|
6812
6812
|
}, n.prototype.getValue = function() {
|
|
6813
|
-
var
|
|
6814
|
-
if (
|
|
6815
|
-
return parseInt(
|
|
6816
|
-
}, n.prototype.setValue = function(
|
|
6817
|
-
this.target.find("input").val(
|
|
6813
|
+
var e = this.target.find("input").val();
|
|
6814
|
+
if (e)
|
|
6815
|
+
return parseInt(e.toString());
|
|
6816
|
+
}, n.prototype.setValue = function(e) {
|
|
6817
|
+
this.target.find("input").val(e);
|
|
6818
6818
|
}, n.prototype.destroy = function() {
|
|
6819
6819
|
this.target.remove();
|
|
6820
6820
|
}, n;
|
|
@@ -6839,11 +6839,11 @@ var At = function(q) {
|
|
|
6839
6839
|
</div>`
|
|
6840
6840
|
), this.target;
|
|
6841
6841
|
}, n.prototype.getValue = function() {
|
|
6842
|
-
var
|
|
6843
|
-
if (
|
|
6844
|
-
return
|
|
6845
|
-
}, n.prototype.setValue = function(
|
|
6846
|
-
this.target.find("select").val(
|
|
6842
|
+
var e = this.target.find("select").val();
|
|
6843
|
+
if (e)
|
|
6844
|
+
return e.toString();
|
|
6845
|
+
}, n.prototype.setValue = function(e) {
|
|
6846
|
+
this.target.find("select").val(e);
|
|
6847
6847
|
}, n.prototype.destroy = function() {
|
|
6848
6848
|
this.target.remove();
|
|
6849
6849
|
}, n;
|
|
@@ -6855,15 +6855,15 @@ var At = function(q) {
|
|
|
6855
6855
|
function n() {
|
|
6856
6856
|
}
|
|
6857
6857
|
return n.init = function() {
|
|
6858
|
-
n.printElementOptionItems || (n.printElementOptionItems = {}, n._printElementOptionItems.forEach(function(
|
|
6859
|
-
n.printElementOptionItems[
|
|
6858
|
+
n.printElementOptionItems || (n.printElementOptionItems = {}, n._printElementOptionItems.forEach(function(e) {
|
|
6859
|
+
n.printElementOptionItems[e.name] = e;
|
|
6860
6860
|
}));
|
|
6861
|
-
}, n.registerItem = function(
|
|
6862
|
-
if (!
|
|
6861
|
+
}, n.registerItem = function(e) {
|
|
6862
|
+
if (!e.name)
|
|
6863
6863
|
throw new Error("styleItem must have name");
|
|
6864
|
-
n.init(), n.printElementOptionItems[
|
|
6865
|
-
}, n.getItem = function(
|
|
6866
|
-
return n.init(), n.printElementOptionItems[
|
|
6864
|
+
n.init(), n.printElementOptionItems[e.name] = e;
|
|
6865
|
+
}, n.getItem = function(e) {
|
|
6866
|
+
return n.init(), n.printElementOptionItems[e];
|
|
6867
6867
|
}, n._printElementOptionItems = [
|
|
6868
6868
|
new E(),
|
|
6869
6869
|
new b(),
|
|
@@ -6923,7 +6923,7 @@ var At = function(q) {
|
|
|
6923
6923
|
new Wt(),
|
|
6924
6924
|
new Gt(),
|
|
6925
6925
|
new kt(),
|
|
6926
|
-
new
|
|
6926
|
+
new t(),
|
|
6927
6927
|
new y(),
|
|
6928
6928
|
new i(),
|
|
6929
6929
|
new p(),
|
|
@@ -9284,14 +9284,14 @@ var At = function(q) {
|
|
|
9284
9284
|
g.r(F), g(22), g(23), g(24), g(25);
|
|
9285
9285
|
var W, E = g(0);
|
|
9286
9286
|
g(26), window.hiLocalStorage = (W = window.localStorage || null, {
|
|
9287
|
-
saveLocalData: function(
|
|
9288
|
-
return !(!W || !i || (W.setItem(
|
|
9287
|
+
saveLocalData: function(t, i) {
|
|
9288
|
+
return !(!W || !i || (W.setItem(t, i), 0));
|
|
9289
9289
|
},
|
|
9290
|
-
getLocalData: function(
|
|
9291
|
-
return W ? W.getItem(
|
|
9290
|
+
getLocalData: function(t) {
|
|
9291
|
+
return W ? W.getItem(t) : null;
|
|
9292
9292
|
},
|
|
9293
|
-
removeItem: function(
|
|
9294
|
-
W && W.removeItem(
|
|
9293
|
+
removeItem: function(t) {
|
|
9294
|
+
W && W.removeItem(t);
|
|
9295
9295
|
}
|
|
9296
9296
|
}), g(27), g(32);
|
|
9297
9297
|
var b, l = function() {
|
|
@@ -9304,50 +9304,50 @@ var At = function(q) {
|
|
|
9304
9304
|
},
|
|
9305
9305
|
enumerable: !0,
|
|
9306
9306
|
configurable: !0
|
|
9307
|
-
}), y.prototype.addPrintElementType = function(
|
|
9307
|
+
}), y.prototype.addPrintElementType = function(t) {
|
|
9308
9308
|
var i = this;
|
|
9309
|
-
if (
|
|
9310
|
-
var p = et.createPrintElementType(
|
|
9309
|
+
if (t && t.tid && t.type) {
|
|
9310
|
+
var p = et.createPrintElementType(t), f = i.allElementTypes.findIndex(function(U) {
|
|
9311
9311
|
return U.tid == p.tid;
|
|
9312
9312
|
});
|
|
9313
9313
|
f >= 0 && i.allElementTypes.splice(f, 1), i.allElementTypes.push(p);
|
|
9314
9314
|
}
|
|
9315
9315
|
return i;
|
|
9316
|
-
}, y.prototype.addPrintElementTypes = function(
|
|
9316
|
+
}, y.prototype.addPrintElementTypes = function(t, i) {
|
|
9317
9317
|
var p = this;
|
|
9318
|
-
this[
|
|
9318
|
+
this[t] ? this[t] = this[t].concat(i) : this[t] = i, i.forEach(function(f) {
|
|
9319
9319
|
p.allElementTypes = p.allElementTypes.concat(f.printElementTypes);
|
|
9320
9320
|
});
|
|
9321
|
-
}, y.prototype.removePrintElementTypes = function(
|
|
9321
|
+
}, y.prototype.removePrintElementTypes = function(t) {
|
|
9322
9322
|
var i = this;
|
|
9323
|
-
delete i[
|
|
9324
|
-
return !p.tid.startsWith(
|
|
9323
|
+
delete i[t], i.allElementTypes = i.allElementTypes.filter(function(p) {
|
|
9324
|
+
return !p.tid.startsWith(t);
|
|
9325
9325
|
});
|
|
9326
|
-
}, y.prototype.getElementTypeGroups = function(
|
|
9327
|
-
return this[this.formatterModule(
|
|
9328
|
-
}, y.prototype.getElementType = function(
|
|
9326
|
+
}, y.prototype.getElementTypeGroups = function(t) {
|
|
9327
|
+
return this[this.formatterModule(t)] || [];
|
|
9328
|
+
}, y.prototype.getElementType = function(t) {
|
|
9329
9329
|
var i = this.allElementTypes.filter(function(p) {
|
|
9330
|
-
return p.tid ==
|
|
9330
|
+
return p.tid == t;
|
|
9331
9331
|
});
|
|
9332
9332
|
if (i.length > 0)
|
|
9333
9333
|
return i[0];
|
|
9334
|
-
}, y.prototype.updateElementType = function(
|
|
9335
|
-
var p = this.getElementType(
|
|
9334
|
+
}, y.prototype.updateElementType = function(t, i) {
|
|
9335
|
+
var p = this.getElementType(t);
|
|
9336
9336
|
if (i) {
|
|
9337
9337
|
var f = i(p), U = this.allElementTypes.findIndex(function(k) {
|
|
9338
|
-
return k.tid ==
|
|
9338
|
+
return k.tid == t;
|
|
9339
9339
|
});
|
|
9340
9340
|
if (U >= 0)
|
|
9341
9341
|
return this.allElementTypes.splice(U, 1, f), f;
|
|
9342
9342
|
}
|
|
9343
9343
|
return p;
|
|
9344
|
-
}, y.prototype.formatterModule = function(
|
|
9345
|
-
return
|
|
9344
|
+
}, y.prototype.formatterModule = function(t) {
|
|
9345
|
+
return t || "_default";
|
|
9346
9346
|
}, y;
|
|
9347
9347
|
}(), c = g(1), s = g(2), w = function() {
|
|
9348
9348
|
function y() {
|
|
9349
9349
|
}
|
|
9350
|
-
return y.prototype.createPrintElementTypeHtml = function(
|
|
9350
|
+
return y.prototype.createPrintElementTypeHtml = function(t, i) {
|
|
9351
9351
|
var p = x('<ul class="hiprint-printElement-type"></ul>');
|
|
9352
9352
|
return i.forEach(function(f) {
|
|
9353
9353
|
var U = x("<li></li>");
|
|
@@ -9356,7 +9356,7 @@ var At = function(q) {
|
|
|
9356
9356
|
U.append(k), f.printElementTypes.forEach(function(G) {
|
|
9357
9357
|
k.append('<li><a class="ep-draggable-item" tid="' + G.tid + '"> ' + G.getText() + " </a></li>");
|
|
9358
9358
|
}), p.append(U);
|
|
9359
|
-
}), x(
|
|
9359
|
+
}), x(t).append(p), p.find(".ep-draggable-item");
|
|
9360
9360
|
}, y;
|
|
9361
9361
|
}(), C = g(5), N = g(15), r = function() {
|
|
9362
9362
|
return function(y) {
|
|
@@ -9367,24 +9367,24 @@ var At = function(q) {
|
|
|
9367
9367
|
this.title = y.title, this.type = y.type, this.editable = y.editable, this.columnDisplayEditable = y.columnDisplayEditable, this.columnDisplayIndexEditable = y.columnDisplayIndexEditable, this.columnTitleEditable = y.columnTitleEditable, this.columnResizable = y.columnResizable, this.columnAlignEditable = y.columnAlignEditable, this.isEnableEditField = y.isEnableEditField, this.isEnableContextMenu = y.isEnableContextMenu, this.isEnableInsertRow = y.isEnableInsertRow, this.isEnableDeleteRow = y.isEnableDeleteRow, this.isEnableInsertColumn = y.isEnableInsertColumn, this.isEnableDeleteColumn = y.isEnableDeleteColumn, this.isEnableMergeCell = y.isEnableMergeCell;
|
|
9368
9368
|
};
|
|
9369
9369
|
}(), S = function() {
|
|
9370
|
-
function y(
|
|
9370
|
+
function y(t) {
|
|
9371
9371
|
var i = this;
|
|
9372
|
-
this.text =
|
|
9372
|
+
this.text = t.text, this.field = t.field, this.fields = t.fields, this.title = t.title, this.tid = t.tid, this.data = t.data, this.styler = t.styler, this.formatter = t.formatter, this.type = t.type, this.options = t.options, this.editable = t.editable != null ? t.editable : !0, this.columnDisplayEditable = t.columnDisplayEditable != null ? t.columnDisplayEditable : !0, this.columnDisplayIndexEditable = t.columnDisplayIndexEditable != null ? t.columnDisplayIndexEditable : !0, this.columnTitleEditable = t.columnTitleEditable != null ? t.columnTitleEditable : !0, this.columnResizable = t.columnResizable != null ? t.columnResizable : !0, this.columnAlignEditable = t.columnAlignEditable != null ? t.columnAlignEditable : !0, this.columns = [], (t.columns || []).forEach(function(p, f) {
|
|
9373
9373
|
i.columns.push(i.createTableColumnArray(p));
|
|
9374
|
-
}), this.rowStyler =
|
|
9374
|
+
}), this.rowStyler = t.rowStyler, this.striped = t.striped, this.groupFields = t.groupFields || [], this.groupFormatter = t.groupFormatter, this.groupFooterFormatter = t.groupFooterFormatter, this.footerFormatter = t.footerFormatter, this.rowsColumnsMerge = t.rowsColumnsMerge, this.rowsColumnsMergeClean = t.rowsColumnsMergeClean, this.gridColumnsFooterFormatter = t.gridColumnsFooterFormatter, this.isEnableEditField = t.isEnableEditField != null ? t.isEnableEditField : !0, this.isEnableContextMenu = t.isEnableContextMenu != null ? t.isEnableContextMenu : !0, this.isEnableInsertRow = t.isEnableInsertRow != null ? t.isEnableInsertRow : !0, this.isEnableDeleteRow = t.isEnableDeleteRow != null ? t.isEnableDeleteRow : !0, this.isEnableInsertColumn = t.isEnableInsertColumn != null ? t.isEnableInsertColumn : !0, this.isEnableDeleteColumn = t.isEnableDeleteColumn != null ? t.isEnableDeleteColumn : !0, this.isEnableMergeCell = t.isEnableMergeCell != null ? t.isEnableMergeCell : !0, this.columnObj = this.makeColumnObj();
|
|
9375
9375
|
}
|
|
9376
9376
|
return y.prototype.getText = function() {
|
|
9377
9377
|
return this.text || this.title || "";
|
|
9378
|
-
}, y.prototype.createPrintElement = function(
|
|
9378
|
+
}, y.prototype.createPrintElement = function(t) {
|
|
9379
9379
|
var i = this;
|
|
9380
|
-
return this.columns && this.columns.length == 0 && (
|
|
9380
|
+
return this.columns && this.columns.length == 0 && (t.columns || []).forEach(function(p, f) {
|
|
9381
9381
|
i.columns.push(i.createTableColumnArray(p));
|
|
9382
|
-
}), new N.a(this,
|
|
9382
|
+
}), new N.a(this, t);
|
|
9383
9383
|
}, y.prototype.getData = function() {
|
|
9384
9384
|
return [{}];
|
|
9385
|
-
}, y.prototype.createTableColumnArray = function(
|
|
9385
|
+
}, y.prototype.createTableColumnArray = function(t) {
|
|
9386
9386
|
var i = [];
|
|
9387
|
-
return
|
|
9387
|
+
return t.forEach(function(p, f) {
|
|
9388
9388
|
i.push(new C.a(p));
|
|
9389
9389
|
}), i;
|
|
9390
9390
|
}, y.prototype.getPrintElementTypeEntity = function() {
|
|
@@ -9412,11 +9412,11 @@ var At = function(q) {
|
|
|
9412
9412
|
return this.fields;
|
|
9413
9413
|
}, y.prototype.getOptions = function() {
|
|
9414
9414
|
return this.options || {};
|
|
9415
|
-
}, y.prototype.getColumnByColumnId = function(
|
|
9416
|
-
return this.columnObj[
|
|
9417
|
-
}, y.prototype.makeColumnObj = function(
|
|
9415
|
+
}, y.prototype.getColumnByColumnId = function(t) {
|
|
9416
|
+
return this.columnObj[t];
|
|
9417
|
+
}, y.prototype.makeColumnObj = function(t) {
|
|
9418
9418
|
var i = {};
|
|
9419
|
-
return
|
|
9419
|
+
return t ? t.forEach(function(p) {
|
|
9420
9420
|
(p.id || p.columnId) && (i[p.id || p.columnId] = p);
|
|
9421
9421
|
}) : this.columns && this.columns.forEach(function(p) {
|
|
9422
9422
|
p.forEach(function(f) {
|
|
@@ -9424,7 +9424,7 @@ var At = function(q) {
|
|
|
9424
9424
|
});
|
|
9425
9425
|
}), this.columnObj = i, i;
|
|
9426
9426
|
}, y;
|
|
9427
|
-
}(), D = g(4), H = g(3), j = (b = function(
|
|
9427
|
+
}(), D = g(4), H = g(3), j = (b = function(t, i) {
|
|
9428
9428
|
return (b = Object.setPrototypeOf || Dt(
|
|
9429
9429
|
{
|
|
9430
9430
|
__proto__: []
|
|
@@ -9435,52 +9435,52 @@ var At = function(q) {
|
|
|
9435
9435
|
} || function(p, f) {
|
|
9436
9436
|
for (var U in f)
|
|
9437
9437
|
f.hasOwnProperty(U) && (p[U] = f[U]);
|
|
9438
|
-
})(
|
|
9439
|
-
}, function(y,
|
|
9438
|
+
})(t, i);
|
|
9439
|
+
}, function(y, t) {
|
|
9440
9440
|
function i() {
|
|
9441
9441
|
this.constructor = y;
|
|
9442
9442
|
}
|
|
9443
|
-
b(y,
|
|
9443
|
+
b(y, t), y.prototype = t === null ? Object.create(t) : (i.prototype = t.prototype, new i());
|
|
9444
9444
|
}), v = function(y) {
|
|
9445
|
-
function
|
|
9445
|
+
function t(i, p) {
|
|
9446
9446
|
var f = y.call(this, i) || this;
|
|
9447
9447
|
return f.options = new H.a(p), f.options.setDefault(new H.a(c.a.instance.image.default).getPrintElementOptionEntity()), f;
|
|
9448
9448
|
}
|
|
9449
|
-
return j(
|
|
9449
|
+
return j(t, y), t.prototype.getReizeableShowPoints = function() {
|
|
9450
9450
|
return this.options.showPoints || c.a.instance.image.showPoints;
|
|
9451
|
-
},
|
|
9451
|
+
}, t.prototype.getData = function(i) {
|
|
9452
9452
|
var p = "", f = this.getField();
|
|
9453
9453
|
i ? p = f ? f.split(".").reduce((k, G) => k ? k[G] : i[G], !1) || "" : this.options.src || this.printElementType.getData() : p = this.options.src || this.printElementType.getData();
|
|
9454
9454
|
var U = this.getFormatter();
|
|
9455
9455
|
return U && (p = U(p, this.options, this._currenttemplateData)), p || "";
|
|
9456
|
-
},
|
|
9456
|
+
}, t.prototype.createTarget = function(i, p) {
|
|
9457
9457
|
var f = x(
|
|
9458
9458
|
'<div class="hiprint-printElement hiprint-printElement-image" style="position: absolute;"><div class="hiprint-printElement-image-content" style="height:100%;width:100%"></div></div>'
|
|
9459
9459
|
);
|
|
9460
9460
|
return this.updateTargetImage(f, i, p), f;
|
|
9461
|
-
},
|
|
9461
|
+
}, t.prototype.initSizeByHtml = function(i) {
|
|
9462
9462
|
y.prototype.initSizeByHtml.call(this, i), this.css(i, this.getData());
|
|
9463
|
-
},
|
|
9463
|
+
}, t.prototype.getConfigOptions = function() {
|
|
9464
9464
|
return c.a.instance.image;
|
|
9465
|
-
},
|
|
9465
|
+
}, t.prototype.updateDesignViewFromOptions = function() {
|
|
9466
9466
|
this.designTarget && (this.css(this.designTarget, this.getData()), this.updateTargetImage(this.designTarget, this.getTitle(), this.getData()));
|
|
9467
|
-
},
|
|
9467
|
+
}, t.prototype.updateTargetImage = function(i, p, f) {
|
|
9468
9468
|
var U = i.find(".hiprint-printElement-image-content");
|
|
9469
9469
|
U.find("img").length ? U.find("img").attr("src", f) : U.html('<img style="width:100%;height:100%;" src="' + f + '">'), f.length ? U.find("img").css("cssText", `width:100%;height:100%;content:url("${f}")!important`) : U.find("img").css("cssText", "width:100%;height:100%;"), this.options.fit && U.find("img").css("object-fit", this.options.fit);
|
|
9470
|
-
},
|
|
9470
|
+
}, t.prototype.getHtml = function(i, p, f) {
|
|
9471
9471
|
return this.getHtml2(i, p, f);
|
|
9472
|
-
},
|
|
9472
|
+
}, t;
|
|
9473
9473
|
}(D.a), P = function(y) {
|
|
9474
|
-
function
|
|
9474
|
+
function t(i) {
|
|
9475
9475
|
var p = this;
|
|
9476
9476
|
return i = i || {}, (p = y.call(this, i) || this).leftSpaceRemoved = i.leftSpaceRemoved, p;
|
|
9477
9477
|
}
|
|
9478
|
-
return j(
|
|
9478
|
+
return j(t, y), t.prototype.getHideTitle = function() {
|
|
9479
9479
|
return this.hideTitle == null ? this.defaultOptions.hideTitle : this.hideTitle;
|
|
9480
|
-
},
|
|
9480
|
+
}, t;
|
|
9481
9481
|
}(H.a), o = g(8), m = function() {
|
|
9482
|
-
function y(
|
|
9483
|
-
this.panelPageRule = f, this.watermarkOptions = p, this.panelIdx = i, this.scale = U, this.defaultPaperNumberFormat = "${paperNo}-${paperCount}", this.printLine = 0, this.templateId =
|
|
9482
|
+
function y(t, i, p, f, U, k, G, O, it, K, tt, rt, X, nt, gt) {
|
|
9483
|
+
this.panelPageRule = f, this.watermarkOptions = p, this.panelIdx = i, this.scale = U, this.defaultPaperNumberFormat = "${paperNo}-${paperCount}", this.printLine = 0, this.templateId = t, this.width = E.a.mm.toPt(k), this.height = E.a.mm.toPt(G), this.mmwidth = k, this.mmheight = G, this.paperHeader = O >= 0 ? O : 0, this.paperFooter = it, this.contentHeight = it - O, this.createTarget(), this.index = nt, this.paperNumberLeft = K || parseInt((this.width - 30).toString()), this.paperNumberTop = tt || parseInt((this.height - 22).toString()), this.paperNumberDisabled = rt, this.paperNumberFormat = X, this.referenceElement = gt ? x.extend({}, gt) : new o.a({
|
|
9484
9484
|
top: 0,
|
|
9485
9485
|
left: 0,
|
|
9486
9486
|
height: 0,
|
|
@@ -9491,9 +9491,9 @@ var At = function(q) {
|
|
|
9491
9491
|
endPrintPaperIndex: 0
|
|
9492
9492
|
});
|
|
9493
9493
|
}
|
|
9494
|
-
return y.prototype.subscribePaperBaseInfoChanged = function(
|
|
9495
|
-
this.onPaperBaseInfoChanged =
|
|
9496
|
-
}, y.prototype.triggerOnPaperBaseInfoChanged = function(
|
|
9494
|
+
return y.prototype.subscribePaperBaseInfoChanged = function(t) {
|
|
9495
|
+
this.onPaperBaseInfoChanged = t;
|
|
9496
|
+
}, y.prototype.triggerOnPaperBaseInfoChanged = function(t) {
|
|
9497
9497
|
this.onPaperBaseInfoChanged && this.onPaperBaseInfoChanged({
|
|
9498
9498
|
panelPageRule: this.panelPageRule,
|
|
9499
9499
|
scale: this.scale,
|
|
@@ -9503,32 +9503,32 @@ var At = function(q) {
|
|
|
9503
9503
|
paperNumberTop: this.paperNumberTop,
|
|
9504
9504
|
paperNumberDisabled: this.paperNumberDisabled,
|
|
9505
9505
|
paperNumberFormat: this.paperNumberFormat
|
|
9506
|
-
}), E.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId,
|
|
9507
|
-
}, y.prototype.setFooter = function(
|
|
9508
|
-
this.firstPaperFooter =
|
|
9509
|
-
}, y.prototype.setOffset = function(
|
|
9510
|
-
this.setLeftOffset(
|
|
9511
|
-
}, y.prototype.setLeftOffset = function(
|
|
9512
|
-
|
|
9513
|
-
}, y.prototype.setTopOffset = function(
|
|
9514
|
-
|
|
9506
|
+
}), E.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId, t || "\u6A21\u677F\u8C03\u6574");
|
|
9507
|
+
}, y.prototype.setFooter = function(t, i, p, f) {
|
|
9508
|
+
this.firstPaperFooter = t, this.evenPaperFooter = i, this.oddPaperFooter = p, this.lastPaperFooter = f;
|
|
9509
|
+
}, y.prototype.setOffset = function(t, i) {
|
|
9510
|
+
this.setLeftOffset(t), this.setTopOffset(i);
|
|
9511
|
+
}, y.prototype.setLeftOffset = function(t) {
|
|
9512
|
+
t ? this.paperContentTarget.css("left", t + "pt") : this.paperContentTarget[0].style.left = "";
|
|
9513
|
+
}, y.prototype.setTopOffset = function(t) {
|
|
9514
|
+
t ? this.paperContentTarget.css("top", t + "pt") : this.paperContentTarget[0].style.top = "";
|
|
9515
9515
|
}, y.prototype.createTarget = function() {
|
|
9516
9516
|
this.target = x('<div class="hiprint-printPaper"><div class="hiprint-printPaper-content"></div></div>'), this.paperContentTarget = this.target.find(".hiprint-printPaper-content"), this.target.css("width", this.mmwidth + "mm"), this.target.css("height", this.mmheight - c.a.instance.paperHeightTrim + "mm"), this.target.attr("original-height", this.mmheight), this.zoom(this.scale);
|
|
9517
9517
|
}, y.prototype.createHeaderLine = function() {
|
|
9518
|
-
var
|
|
9518
|
+
var t = this;
|
|
9519
9519
|
this.headerLinetarget = x('<div class="hiprint-headerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'), this.headerLinetarget.css("top", (this.paperHeader || -1) + "pt"), this.paperHeader == 0 && this.headerLinetarget.addClass("hideheaderLinetarget"), this.paperContentTarget.append(this.headerLinetarget), this.dragHeadLineOrFootLine(this.headerLinetarget, function(i, p) {
|
|
9520
|
-
p >=
|
|
9520
|
+
p >= t.paperFooter && (p = t.paperFooter - 10), t.paperHeader = p >= 0 ? p : 0, t.triggerOnPaperBaseInfoChanged();
|
|
9521
9521
|
});
|
|
9522
9522
|
}, y.prototype.createFooterLine = function() {
|
|
9523
|
-
var
|
|
9523
|
+
var t = this;
|
|
9524
9524
|
this.footerLinetarget = x('<div class="hiprint-footerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'), this.footerLinetarget.css("top", parseInt(this.paperFooter.toString()) + "pt"), this.paperFooter == this.height && (this.footerLinetarget.css("top", this.mmheight - c.a.instance.paperHeightTrim + "mm"), this.footerLinetarget.addClass("hidefooterLinetarget")), this.paperContentTarget.append(this.footerLinetarget), this.dragHeadLineOrFootLine(this.footerLinetarget, function(i, p) {
|
|
9525
|
-
p <=
|
|
9525
|
+
p <= t.paperHeader && (p = t.paperHeader + 10), t.paperFooter = p, t.triggerOnPaperBaseInfoChanged();
|
|
9526
9526
|
});
|
|
9527
|
-
}, y.prototype.createPaperNumber = function(
|
|
9527
|
+
}, y.prototype.createPaperNumber = function(t, i) {
|
|
9528
9528
|
var p = this, f = this.target.find(".hiprint-paperNumber");
|
|
9529
9529
|
if (f.length)
|
|
9530
|
-
return f.html(
|
|
9531
|
-
var U = x('<span class="hiprint-paperNumber" style="width:max-content;position: absolute">' +
|
|
9530
|
+
return f.html(t), f;
|
|
9531
|
+
var U = x('<span class="hiprint-paperNumber" style="width:max-content;position: absolute">' + t + "</span>");
|
|
9532
9532
|
return U.css("top", this.paperNumberTop + "pt"), U.css("left", this.paperNumberLeft + "pt"), this.paperContentTarget.append(U), i && this.dragHeadLineOrFootLine(
|
|
9533
9533
|
U,
|
|
9534
9534
|
function(k, G) {
|
|
@@ -9538,15 +9538,15 @@ var At = function(q) {
|
|
|
9538
9538
|
), U;
|
|
9539
9539
|
}, y.prototype.getTarget = function() {
|
|
9540
9540
|
return this.target;
|
|
9541
|
-
}, y.prototype.append = function(
|
|
9542
|
-
this.paperContentTarget.append(
|
|
9543
|
-
}, y.prototype.updateReferenceElement = function(
|
|
9544
|
-
|
|
9545
|
-
}, y.prototype.updatePrintLine = function(
|
|
9546
|
-
|
|
9547
|
-
}, y.prototype.design = function(
|
|
9541
|
+
}, y.prototype.append = function(t) {
|
|
9542
|
+
this.paperContentTarget.append(t);
|
|
9543
|
+
}, y.prototype.updateReferenceElement = function(t) {
|
|
9544
|
+
t && (this.referenceElement = t);
|
|
9545
|
+
}, y.prototype.updatePrintLine = function(t) {
|
|
9546
|
+
t >= this.printLine && (this.printLine = t);
|
|
9547
|
+
}, y.prototype.design = function(t) {
|
|
9548
9548
|
var i = this;
|
|
9549
|
-
this.createHeaderLine(), this.createFooterLine(), this.target.addClass("design"),
|
|
9549
|
+
this.createHeaderLine(), this.createFooterLine(), this.target.addClass("design"), t && t.grid && this.target.addClass("grid"), this.target.parent().parent().css("width", this.mmwidth + "mm"), this.target.parent().parent().css("height", this.mmheight + "mm"), this.paperNumberTarget = this.createPaperNumber(this.formatPaperNumber(1, 1), !0), this.createRuler(), this.createWaterMark(!0, this.panelIdx, this.watermarkOptions), this.resetPaperNumber(this.paperNumberTarget), x(this.paperNumberTarget).bind("dblclick.hiprint", function() {
|
|
9550
9550
|
i.paperNumberDisabled == null && (i.paperNumberDisabled = !1), i.paperNumberDisabled = !i.paperNumberDisabled, i.resetPaperNumber(i.paperNumberTarget), i.triggerOnPaperBaseInfoChanged("\u521D\u59CB");
|
|
9551
9551
|
}), x(this.paperNumberTarget).bind("click.hiprint", function() {
|
|
9552
9552
|
E.a.event.trigger("BuildCustomOptionSettingEventKey_" + i.templateId, {
|
|
@@ -9559,16 +9559,16 @@ var At = function(q) {
|
|
|
9559
9559
|
}
|
|
9560
9560
|
});
|
|
9561
9561
|
});
|
|
9562
|
-
}, y.prototype.resetPaperNumber = function(
|
|
9563
|
-
this.paperNumberDisabled ?
|
|
9564
|
-
}, y.prototype.updatePaperNumber = function(
|
|
9565
|
-
var f = this.createPaperNumber(this.formatPaperNumber(
|
|
9562
|
+
}, y.prototype.resetPaperNumber = function(t) {
|
|
9563
|
+
this.paperNumberDisabled ? t.addClass("hiprint-paperNumber-disabled") : t.removeClass("hiprint-paperNumber-disabled");
|
|
9564
|
+
}, y.prototype.updatePaperNumber = function(t, i, p) {
|
|
9565
|
+
var f = this.createPaperNumber(this.formatPaperNumber(t, i));
|
|
9566
9566
|
this.paperNumberDisabled ? f.hide() : p && this.index % 2 == 1 && (f[0].style.left = "", f.css("right", this.paperNumberLeft + "pt"));
|
|
9567
|
-
}, y.prototype.formatPaperNumber = function(
|
|
9568
|
-
return this.createWaterMark(!1,
|
|
9569
|
-
}, y.prototype.dragHeadLineOrFootLine = function(
|
|
9567
|
+
}, y.prototype.formatPaperNumber = function(t, i) {
|
|
9568
|
+
return this.createWaterMark(!1, t, this.watermarkOptions), eval2("`" + (this.paperNumberFormat ? this.paperNumberFormat : this.defaultPaperNumberFormat).replace("paperNo", t).replace("paperCount", i) + "`");
|
|
9569
|
+
}, y.prototype.dragHeadLineOrFootLine = function(t, i, p) {
|
|
9570
9570
|
var f = this;
|
|
9571
|
-
|
|
9571
|
+
t.hidraggable({
|
|
9572
9572
|
axis: p ? void 0 : "v",
|
|
9573
9573
|
onDrag: function(k, G, O) {
|
|
9574
9574
|
i(G, O);
|
|
@@ -9585,18 +9585,18 @@ var At = function(q) {
|
|
|
9585
9585
|
f.headerLinetarget.css("top", f.paperHeader + "pt"), f.footerLinetarget.css("top", f.paperFooter + "pt"), s.a.instance.draging = !1, f.footerLinetarget.removeClass("hidefooterLinetarget"), f.headerLinetarget.removeClass("hideheaderLinetarget");
|
|
9586
9586
|
}
|
|
9587
9587
|
});
|
|
9588
|
-
}, y.prototype.resize = function(
|
|
9588
|
+
}, y.prototype.resize = function(t, i) {
|
|
9589
9589
|
var p = this.paperFooter / this.height;
|
|
9590
|
-
this.width = E.a.mm.toPt(
|
|
9590
|
+
this.width = E.a.mm.toPt(t), this.height = E.a.mm.toPt(i), this.mmwidth = t, this.mmheight = i, this.target.css("width", t + "mm"), this.target.css("height", i - c.a.instance.paperHeightTrim + "mm"), this.target.parent().parent().css("width", t + "mm"), this.target.parent().parent().css("height", i + "mm"), this.target.attr("original-height", this.mmheight);
|
|
9591
9591
|
var f = this.height * p;
|
|
9592
9592
|
this.paperFooter = f || this.height, this.footerLinetarget.css("top", f + "pt"), this.contentHeight = this.paperFooter - this.paperHeader, this.paperNumberLeft = this.paperNumberLeft > this.width ? parseInt((this.width - 30).toString()) : this.paperNumberLeft, this.paperNumberTop = this.paperNumberTop > this.height ? this.paperNumberTop = parseInt((this.height - 22).toString()) : this.paperNumberTop, this.paperNumberTarget.css("top", this.paperNumberTop + "pt"), this.paperNumberTarget.css("left", this.paperNumberLeft + "pt"), this.triggerOnPaperBaseInfoChanged("\u8C03\u6574\u5927\u5C0F");
|
|
9593
|
-
}, y.prototype.zoom = function(
|
|
9594
|
-
|
|
9595
|
-
}, y.prototype.getPaperFooter = function(
|
|
9596
|
-
var i = this.index +
|
|
9593
|
+
}, y.prototype.zoom = function(t) {
|
|
9594
|
+
t && (this.scale = t, this.target.css("transform", "scale(" + t + ")"), t > 1 ? this.target.css("transform-origin", "-" + t + "% -" + t + "%") : this.target.css("transform-origin", "0 0"), this.triggerOnPaperBaseInfoChanged("\u7F29\u653E"));
|
|
9595
|
+
}, y.prototype.getPaperFooter = function(t) {
|
|
9596
|
+
var i = this.index + t;
|
|
9597
9597
|
return i == 0 ? this.firstPaperFooter ? this.firstPaperFooter : this.oddPaperFooter ? this.oddPaperFooter : this.paperFooter : i % 2 == 0 ? this.oddPaperFooter ? this.oddPaperFooter : this.paperFooter : i % 2 == 1 ? this.evenPaperFooter ? this.evenPaperFooter : this.paperFooter : void 0;
|
|
9598
|
-
}, y.prototype.getContentHeight = function(
|
|
9599
|
-
return this.getPaperFooter(
|
|
9598
|
+
}, y.prototype.getContentHeight = function(t) {
|
|
9599
|
+
return this.getPaperFooter(t) - this.paperHeader;
|
|
9600
9600
|
}, y.prototype.createRuler = function() {
|
|
9601
9601
|
this.target.append(
|
|
9602
9602
|
`<div class="hiprint_rul_wrapper">
|
|
@@ -9604,13 +9604,13 @@ var At = function(q) {
|
|
|
9604
9604
|
<img class="v_img" src="` + Be + `" />
|
|
9605
9605
|
</div>`
|
|
9606
9606
|
);
|
|
9607
|
-
}, y.prototype.createWaterMark = function(
|
|
9607
|
+
}, y.prototype.createWaterMark = function(t, i, p) {
|
|
9608
9608
|
var f = this, U = Object.assign({}, p || {}, {
|
|
9609
|
-
id: `${f.templateId}_${f.panelIdx}_${i || 1}_${
|
|
9610
|
-
watch:
|
|
9609
|
+
id: `${f.templateId}_${f.panelIdx}_${i || 1}_${t ? "design" : f.index}`,
|
|
9610
|
+
watch: t,
|
|
9611
9611
|
container: f.target[0]
|
|
9612
9612
|
});
|
|
9613
|
-
!U.container || (U.content ? (
|
|
9613
|
+
!U.container || (U.content ? (t && Ft.destroyWatermark(
|
|
9614
9614
|
Object.assign({}, U, {
|
|
9615
9615
|
id: `${f.templateId}_${f.panelIdx}_${i || 1}_${f.index}`
|
|
9616
9616
|
})
|
|
@@ -9623,51 +9623,51 @@ var At = function(q) {
|
|
|
9623
9623
|
return this.target.parent(".hiprint-printPanel ");
|
|
9624
9624
|
}, y;
|
|
9625
9625
|
}(), a = g(6), I = function(y) {
|
|
9626
|
-
function
|
|
9626
|
+
function t(i, p) {
|
|
9627
9627
|
var f = y.call(this, i) || this;
|
|
9628
9628
|
return f.options = new P(p), f.options.setDefault(new P(c.a.instance.longText.default).getPrintElementOptionEntity()), f;
|
|
9629
9629
|
}
|
|
9630
|
-
return j(
|
|
9630
|
+
return j(t, y), t.prototype.getDesignTarget = function(i) {
|
|
9631
9631
|
var p = y.prototype.getDesignTarget.call(this, i);
|
|
9632
9632
|
return p.find(".hiprint-printElement-longText-content").css("border", "1px dashed #cebcbc"), p;
|
|
9633
|
-
},
|
|
9633
|
+
}, t.prototype.getProxyTarget = function(i) {
|
|
9634
9634
|
i && this.SetProxyTargetOption(i);
|
|
9635
9635
|
var p = this.getData(), f = this.createTarget(this.printElementType.getText(!0), p);
|
|
9636
9636
|
return this.updateTargetSize(f), this.css(f, p), f;
|
|
9637
|
-
},
|
|
9637
|
+
}, t.prototype.updateDesignViewFromOptions = function() {
|
|
9638
9638
|
if (this.designTarget) {
|
|
9639
9639
|
var i = this.getData(), p = this.getHtml(this.designPaper)[0].target;
|
|
9640
9640
|
this.designTarget.find(".hiprint-printElement-longText-content").html(p.find(".hiprint-printElement-longText-content").html()), this.css(this.designTarget, i);
|
|
9641
9641
|
}
|
|
9642
|
-
},
|
|
9642
|
+
}, t.prototype.getConfigOptions = function() {
|
|
9643
9643
|
return c.a.instance.longText;
|
|
9644
|
-
},
|
|
9644
|
+
}, t.prototype.getTitle = function() {
|
|
9645
9645
|
return this.options.title || this.printElementType.title;
|
|
9646
|
-
},
|
|
9646
|
+
}, t.prototype.getData = function(i) {
|
|
9647
9647
|
var p = this.getField(), f = p && p.split(".").reduce((U, k) => U ? U[k] : i ? i[k] : "", !1) || "";
|
|
9648
9648
|
return i ? f || "" : this.options.testData || this.printElementType.getData() || "";
|
|
9649
|
-
},
|
|
9649
|
+
}, t.prototype.updateTargetText = function(i, p, f) {
|
|
9650
9650
|
var U = i.find(".hiprint-printElement-longText-content"), k = this.getText(p, f);
|
|
9651
9651
|
U.html(k);
|
|
9652
|
-
},
|
|
9652
|
+
}, t.prototype.createTarget = function(i, p) {
|
|
9653
9653
|
var f = x(
|
|
9654
9654
|
'<div class="hiprint-printElement hiprint-printElement-longText" style="position: absolute;"><div class="hiprint-printElement-longText-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>'
|
|
9655
9655
|
);
|
|
9656
9656
|
return this.updateTargetText(f, i, p), f;
|
|
9657
|
-
},
|
|
9657
|
+
}, t.prototype.getText = function(i, p) {
|
|
9658
9658
|
var f = this.getFormatter();
|
|
9659
9659
|
return p && (p = this.options.leftSpaceRemoved != 0 ? p.toString().replace(/^\s*/, "") : p), (this.getField() ? (this.options.getHideTitle() ? "" : i ? i + "\uFF1A" : "") + (f ? f(i, p, this.options, this._currenttemplateData) : p) : f ? f(i, i, this.options, this._currenttemplateData) : i || "") || "";
|
|
9660
|
-
},
|
|
9660
|
+
}, t.prototype.getHtml = function(i, p) {
|
|
9661
9661
|
this.setCurrenttemplateData(p), this.createTempContainer();
|
|
9662
9662
|
var f = this.getPaperHtmlResult(i, p);
|
|
9663
9663
|
return this.removeTempContainer(), f;
|
|
9664
|
-
},
|
|
9664
|
+
}, t.prototype.getHeightByData = function(i) {
|
|
9665
9665
|
this.createTempContainer();
|
|
9666
9666
|
var p = this.getPaperHtmlResult(new m("", "", void 0, 1e3, 1e3, 0, 25e3, 0, 0, !0, void 0, 0, void 0), {}, i);
|
|
9667
9667
|
return this.removeTempContainer(), p[0].referenceElement.bottomInLastPaper - p[0].referenceElement.printTopInPaper;
|
|
9668
|
-
},
|
|
9668
|
+
}, t.prototype.getLongTextIndent = function() {
|
|
9669
9669
|
return this.options.longTextIndent ? '<span class="long-text-indent" style="margin-left:' + this.options.longTextIndent + 'pt"></span>' : '<span class="long-text-indent"></span>';
|
|
9670
|
-
},
|
|
9670
|
+
}, t.prototype.getPaperHtmlResult = function(i, p, f) {
|
|
9671
9671
|
var U = this, k = [], G = 0, O = f || this.getData(p), it = this.getText(this.getTitle(), O), K = this.createTarget(this.getTitle(), this.options.testData || "");
|
|
9672
9672
|
this.css(K, O), p ? this.updateTargetWidth(K) : this.updateTargetSize(K), this.getTempContainer().html(""), this.getTempContainer().append(K);
|
|
9673
9673
|
var tt = [this.getLongTextIndent()], rt = it.split(new RegExp(`\r|
|
|
@@ -9719,10 +9719,10 @@ var At = function(q) {
|
|
|
9719
9719
|
), G++, p && this.updatePanelHeight(ft + this.options.getHeight(), i);
|
|
9720
9720
|
}
|
|
9721
9721
|
return k;
|
|
9722
|
-
},
|
|
9722
|
+
}, t.prototype.getStringBySpecificHeight = function(i, p, f) {
|
|
9723
9723
|
var U = E.a.pt.toPx(p), k = void 0, G = this.panel.panelPageRule == "none";
|
|
9724
9724
|
return G ? k = this.IsPaginationIndex(i, i.length, -1, f) : k = this.IsPaginationIndex(i, i.length - 1, U, f), k.IsPagination ? k : this.BinarySearch(i, 0, i.length - 1, U, f);
|
|
9725
|
-
},
|
|
9725
|
+
}, t.prototype.BinarySearch = function(i, p, f, U, k) {
|
|
9726
9726
|
var G = Math.floor((p + f) / 2);
|
|
9727
9727
|
if (p > f)
|
|
9728
9728
|
return k.find(".hiprint-printElement-longText-content").html(""), {
|
|
@@ -9733,7 +9733,7 @@ var At = function(q) {
|
|
|
9733
9733
|
};
|
|
9734
9734
|
var O = this.IsPaginationIndex(i, G, U, k);
|
|
9735
9735
|
return O.IsPagination ? O : O.move == "l" ? this.BinarySearch(i, p, G - 1, U, k) : this.BinarySearch(i, G + 1, f, U, k);
|
|
9736
|
-
},
|
|
9736
|
+
}, t.prototype.IsPaginationIndex = function(i, p, f, U) {
|
|
9737
9737
|
if (f == -1) {
|
|
9738
9738
|
U.find(".hiprint-printElement-longText-content").html(i.slice(0, p).join(""));
|
|
9739
9739
|
var G = U.height();
|
|
@@ -9768,57 +9768,57 @@ var At = function(q) {
|
|
|
9768
9768
|
IsPagination: !0,
|
|
9769
9769
|
result: 1
|
|
9770
9770
|
};
|
|
9771
|
-
},
|
|
9771
|
+
}, t;
|
|
9772
9772
|
}(D.a), h = function() {
|
|
9773
9773
|
function y() {
|
|
9774
9774
|
}
|
|
9775
|
-
return y.replaceEnterAndNewline = function(
|
|
9776
|
-
return
|
|
9775
|
+
return y.replaceEnterAndNewline = function(t, i) {
|
|
9776
|
+
return t.replace(new RegExp(`\r|
|
|
9777
9777
|
|/g`, "g"), i);
|
|
9778
|
-
}, y.replaceTab = function(
|
|
9779
|
-
return
|
|
9780
|
-
}, y.replaceEnterAndNewlineAndTab = function(
|
|
9781
|
-
return
|
|
9778
|
+
}, y.replaceTab = function(t, i) {
|
|
9779
|
+
return t.replace(new RegExp(" /g", "g"), i);
|
|
9780
|
+
}, y.replaceEnterAndNewlineAndTab = function(t, i) {
|
|
9781
|
+
return t.replace(new RegExp(`\r|
|
|
9782
9782
|
| |/g`, "g"), i);
|
|
9783
9783
|
}, y;
|
|
9784
9784
|
}(), M = function(y) {
|
|
9785
|
-
function
|
|
9785
|
+
function t(i) {
|
|
9786
9786
|
var p = y.call(this, i) || this;
|
|
9787
9787
|
return p.title && (p.title = h.replaceEnterAndNewlineAndTab(p.title, "")), p;
|
|
9788
9788
|
}
|
|
9789
|
-
return j(
|
|
9789
|
+
return j(t, y), t.prototype.getHideTitle = function() {
|
|
9790
9790
|
return this.hideTitle == null ? this.defaultOptions.hideTitle : this.hideTitle;
|
|
9791
|
-
},
|
|
9791
|
+
}, t.prototype.getTextType = function() {
|
|
9792
9792
|
return (this.textType == null ? this.defaultOptions.textType : this.textType) || "text";
|
|
9793
|
-
},
|
|
9793
|
+
}, t.prototype.getFontSize = function() {
|
|
9794
9794
|
return (this.fontSize == null ? this.defaultOptions.fontSize : this.fontSize) || 9;
|
|
9795
|
-
},
|
|
9795
|
+
}, t.prototype.getbarcodeMode = function() {
|
|
9796
9796
|
return (this.barcodeMode == null ? this.defaultOptions.barcodeMode : this.barcodeMode) || "CODE128";
|
|
9797
|
-
},
|
|
9797
|
+
}, t.prototype.getQRcodeLevel = function() {
|
|
9798
9798
|
return (this.qrCodeLevel == null ? this.defaultOptions.qrCodeLevel : this.qrCodeLevel) || 0;
|
|
9799
|
-
},
|
|
9799
|
+
}, t;
|
|
9800
9800
|
}(H.a), u = function(y) {
|
|
9801
|
-
function
|
|
9801
|
+
function t(i, p) {
|
|
9802
9802
|
var f = y.call(this, i) || this;
|
|
9803
9803
|
return f.options = new M(p), f.options.setDefault(new M(c.a.instance.text.default).getPrintElementOptionEntity()), f;
|
|
9804
9804
|
}
|
|
9805
|
-
return j(
|
|
9805
|
+
return j(t, y), t.prototype.getDesignTarget = function(i) {
|
|
9806
9806
|
return y.prototype.getDesignTarget.call(this, i);
|
|
9807
|
-
},
|
|
9807
|
+
}, t.prototype.getProxyTarget = function(i) {
|
|
9808
9808
|
i && this.SetProxyTargetOption(i);
|
|
9809
9809
|
var p = this.getData(), f = this.createTarget(this.printElementType.getText(!0), p);
|
|
9810
9810
|
return this.updateTargetSize(f), this.css(f, p), f;
|
|
9811
|
-
},
|
|
9811
|
+
}, t.prototype.updateDesignViewFromOptions = function() {
|
|
9812
9812
|
if (this.designTarget) {
|
|
9813
9813
|
var i = this.getData();
|
|
9814
9814
|
this.css(this.designTarget, i), this.updateTargetText(this.designTarget, this.getTitle(), i);
|
|
9815
9815
|
}
|
|
9816
|
-
},
|
|
9816
|
+
}, t.prototype.getConfigOptions = function() {
|
|
9817
9817
|
return c.a.instance.text;
|
|
9818
|
-
},
|
|
9818
|
+
}, t.prototype.getTitle = function() {
|
|
9819
9819
|
var i = this.options.title || this.printElementType.title || "";
|
|
9820
9820
|
return i && (i = h.replaceEnterAndNewlineAndTab(i, "")), i;
|
|
9821
|
-
},
|
|
9821
|
+
}, t.prototype.getData = function(i) {
|
|
9822
9822
|
var p = void 0, f = this.getField();
|
|
9823
9823
|
if (p = i ? f && f.split(".").reduce((k, G) => k ? k[G] : i ? i[G] : "", !1) || "" : this.options.testData || this.printElementType.getData() || "", this.options.format) {
|
|
9824
9824
|
if (this.options.dataType == "datetime")
|
|
@@ -9830,7 +9830,7 @@ var At = function(q) {
|
|
|
9830
9830
|
}
|
|
9831
9831
|
}
|
|
9832
9832
|
return p;
|
|
9833
|
-
},
|
|
9833
|
+
}, t.prototype.updateTargetText = function(i, p, f, U, k) {
|
|
9834
9834
|
var G = this.getFormatter(), O = i.find(".hiprint-printElement-text-content"), it = "";
|
|
9835
9835
|
it = this.getField() ? (this.options.getHideTitle() ? "" : p ? p + "\uFF1A" : "") + hinnn.toUpperCase(this.options.upperCase, G ? G(p, f, this.options, this._currenttemplateData, i) : f) : f = hinnn.toUpperCase(this.options.upperCase, G ? G(p, p, this.options, this._currenttemplateData, i) : p);
|
|
9836
9836
|
var K = this.options.getTextType();
|
|
@@ -9876,42 +9876,42 @@ var At = function(q) {
|
|
|
9876
9876
|
}
|
|
9877
9877
|
}
|
|
9878
9878
|
}
|
|
9879
|
-
},
|
|
9879
|
+
}, t.prototype.onResize = function(i, p, f, U, k) {
|
|
9880
9880
|
y.prototype.onResize.call(this, i, p, f, U, k), this.options.getTextType() != "barcode" && this.options.getTextType() != "qrcode" || this.updateTargetText(this.designTarget, this.getTitle(), this.getData());
|
|
9881
|
-
},
|
|
9881
|
+
}, t.prototype.createTarget = function(i, p, f) {
|
|
9882
9882
|
var U = x(
|
|
9883
9883
|
'<div tabindex="1" class="hiprint-printElement hiprint-printElement-text" style="position: absolute;"><div class="hiprint-printElement-text-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>'
|
|
9884
9884
|
);
|
|
9885
9885
|
return this.updateTargetText(U, i, p, f), U;
|
|
9886
|
-
},
|
|
9886
|
+
}, t.prototype.getHtml = function(i, p, f) {
|
|
9887
9887
|
return this.getHtml2(i, p, f);
|
|
9888
|
-
},
|
|
9888
|
+
}, t;
|
|
9889
9889
|
}(D.a), d = function(y) {
|
|
9890
|
-
function
|
|
9890
|
+
function t(i) {
|
|
9891
9891
|
return y.call(this, i) || this;
|
|
9892
9892
|
}
|
|
9893
|
-
return j(
|
|
9893
|
+
return j(t, y), t;
|
|
9894
9894
|
}(H.a), A = function(y) {
|
|
9895
|
-
function
|
|
9895
|
+
function t(i, p) {
|
|
9896
9896
|
var f = y.call(this, i) || this;
|
|
9897
9897
|
return f.options = new d(p), f.options.setDefault(new d(c.a.instance.html.default).getPrintElementOptionEntity()), f;
|
|
9898
9898
|
}
|
|
9899
|
-
return j(
|
|
9899
|
+
return j(t, y), t.prototype.updateDesignViewFromOptions = function() {
|
|
9900
9900
|
if (this.designTarget) {
|
|
9901
9901
|
var i = this.getData();
|
|
9902
9902
|
this.css(this.designTarget, i), this.updateTargetHtml();
|
|
9903
9903
|
}
|
|
9904
|
-
},
|
|
9904
|
+
}, t.prototype.updateTargetHtml = function() {
|
|
9905
9905
|
var i = this.getFormatter();
|
|
9906
9906
|
if (i) {
|
|
9907
9907
|
var p = i(this.getData(), this.options, this._currenttemplateData);
|
|
9908
9908
|
this.designTarget.find(".hiprint-printElement-html-content").html(p);
|
|
9909
9909
|
}
|
|
9910
|
-
},
|
|
9910
|
+
}, t.prototype.getReizeableShowPoints = function() {
|
|
9911
9911
|
return this.options.showPoints || c.a.instance.html.showPoints;
|
|
9912
|
-
},
|
|
9912
|
+
}, t.prototype.getConfigOptions = function() {
|
|
9913
9913
|
return c.a.instance.html;
|
|
9914
|
-
},
|
|
9914
|
+
}, t.prototype.createTarget = function(i, p) {
|
|
9915
9915
|
var f = x(
|
|
9916
9916
|
'<div class="hiprint-printElement hiprint-printElement-html" style="position: absolute;"><div class="hiprint-printElement-html-content" style="height:100%;width:100%"></div></div>'
|
|
9917
9917
|
), U = this.getFormatter();
|
|
@@ -9921,89 +9921,89 @@ var At = function(q) {
|
|
|
9921
9921
|
} else
|
|
9922
9922
|
this.options.content && f.find(".hiprint-printElement-html-content").append(this.options.content);
|
|
9923
9923
|
return f;
|
|
9924
|
-
},
|
|
9924
|
+
}, t.prototype.getHtml = function(i, p, f) {
|
|
9925
9925
|
return this.getHtml2(i, p, f);
|
|
9926
|
-
},
|
|
9926
|
+
}, t;
|
|
9927
9927
|
}(D.a), Z = function(y) {
|
|
9928
|
-
function
|
|
9928
|
+
function t(i, p) {
|
|
9929
9929
|
var f = y.call(this, i) || this;
|
|
9930
9930
|
return f.options = new H.a(p), f.options.setDefault(new H.a(c.a.instance.vline.default).getPrintElementOptionEntity()), f;
|
|
9931
9931
|
}
|
|
9932
|
-
return j(
|
|
9932
|
+
return j(t, y), t.prototype.updateDesignViewFromOptions = function() {
|
|
9933
9933
|
if (this.designTarget) {
|
|
9934
9934
|
var i = this.getData();
|
|
9935
9935
|
this.css(this.designTarget, i);
|
|
9936
9936
|
}
|
|
9937
|
-
},
|
|
9937
|
+
}, t.prototype.getConfigOptions = function() {
|
|
9938
9938
|
return c.a.instance.vline;
|
|
9939
|
-
},
|
|
9939
|
+
}, t.prototype.createTarget = function(i, p) {
|
|
9940
9940
|
return x('<div class="hiprint-printElement hiprint-printElement-vline" style="border-left:1px solid;position: absolute;"></div>');
|
|
9941
|
-
},
|
|
9941
|
+
}, t.prototype.getReizeableShowPoints = function() {
|
|
9942
9942
|
return this.options.showPoints || c.a.instance.vline.showPoints;
|
|
9943
|
-
},
|
|
9943
|
+
}, t.prototype.getHtml = function(i, p, f) {
|
|
9944
9944
|
return this.getHtml2(i, p, f);
|
|
9945
|
-
},
|
|
9945
|
+
}, t;
|
|
9946
9946
|
}(D.a), L = function(y) {
|
|
9947
|
-
function
|
|
9947
|
+
function t(i, p) {
|
|
9948
9948
|
var f = y.call(this, i) || this;
|
|
9949
9949
|
return f.options = new H.a(p), f.options.setDefault(new H.a(c.a.instance.hline.default).getPrintElementOptionEntity()), f;
|
|
9950
9950
|
}
|
|
9951
|
-
return j(
|
|
9951
|
+
return j(t, y), t.prototype.updateDesignViewFromOptions = function() {
|
|
9952
9952
|
if (this.designTarget) {
|
|
9953
9953
|
var i = this.getData();
|
|
9954
9954
|
this.css(this.designTarget, i);
|
|
9955
9955
|
}
|
|
9956
|
-
},
|
|
9956
|
+
}, t.prototype.getConfigOptions = function() {
|
|
9957
9957
|
return c.a.instance.hline;
|
|
9958
|
-
},
|
|
9958
|
+
}, t.prototype.createTarget = function(i, p) {
|
|
9959
9959
|
return x('<div class="hiprint-printElement hiprint-printElement-hline" style="border-top:1px solid;position: absolute;"></div>');
|
|
9960
|
-
},
|
|
9960
|
+
}, t.prototype.getReizeableShowPoints = function() {
|
|
9961
9961
|
return this.options.showPoints || c.a.instance.hline.showPoints;
|
|
9962
|
-
},
|
|
9962
|
+
}, t;
|
|
9963
9963
|
}(D.a), J = function(y) {
|
|
9964
|
-
function
|
|
9964
|
+
function t(i, p) {
|
|
9965
9965
|
var f = y.call(this, i) || this;
|
|
9966
9966
|
return f.options = new H.a(p), f.options.setDefault(new H.a(c.a.instance.rect.default).getPrintElementOptionEntity()), f;
|
|
9967
9967
|
}
|
|
9968
|
-
return j(
|
|
9968
|
+
return j(t, y), t.prototype.updateDesignViewFromOptions = function() {
|
|
9969
9969
|
if (this.designTarget) {
|
|
9970
9970
|
var i = this.getData();
|
|
9971
9971
|
this.css(this.designTarget, i);
|
|
9972
9972
|
}
|
|
9973
|
-
},
|
|
9973
|
+
}, t.prototype.getReizeableShowPoints = function() {
|
|
9974
9974
|
return this.options.showPoints || c.a.instance.rect.showPoints;
|
|
9975
|
-
},
|
|
9975
|
+
}, t.prototype.getConfigOptions = function() {
|
|
9976
9976
|
return c.a.instance.rect;
|
|
9977
|
-
},
|
|
9977
|
+
}, t.prototype.createTarget = function(i, p) {
|
|
9978
9978
|
return x('<div class="hiprint-printElement hiprint-printElement-rect" style="border:1px solid;position: absolute;"></div>');
|
|
9979
|
-
},
|
|
9979
|
+
}, t.prototype.getHtml = function(i, p, f) {
|
|
9980
9980
|
return this.getHtml2(i, p, f);
|
|
9981
|
-
},
|
|
9981
|
+
}, t;
|
|
9982
9982
|
}(D.a), Y = function(y) {
|
|
9983
|
-
function
|
|
9983
|
+
function t(i, p) {
|
|
9984
9984
|
var f = y.call(this, i) || this;
|
|
9985
9985
|
return f.options = new H.a(p), f.options.setDefault(new H.a(c.a.instance.oval.default).getPrintElementOptionEntity()), f;
|
|
9986
9986
|
}
|
|
9987
|
-
return j(
|
|
9987
|
+
return j(t, y), t.prototype.updateDesignViewFromOptions = function() {
|
|
9988
9988
|
if (this.designTarget) {
|
|
9989
9989
|
var i = this.getData();
|
|
9990
9990
|
this.css(this.designTarget, i);
|
|
9991
9991
|
}
|
|
9992
|
-
},
|
|
9992
|
+
}, t.prototype.getReizeableShowPoints = function() {
|
|
9993
9993
|
return this.options.showPoints || c.a.instance.oval.showPoints;
|
|
9994
|
-
},
|
|
9994
|
+
}, t.prototype.getConfigOptions = function() {
|
|
9995
9995
|
return c.a.instance.oval;
|
|
9996
|
-
},
|
|
9996
|
+
}, t.prototype.createTarget = function(i, p) {
|
|
9997
9997
|
return x('<div class="hiprint-printElement hiprint-printElement-oval" style="border:1px solid;position: absolute;border-radius: 50%;"></div>');
|
|
9998
|
-
},
|
|
9998
|
+
}, t.prototype.getHtml = function(i, p, f) {
|
|
9999
9999
|
return this.getHtml2(i, p, f);
|
|
10000
|
-
},
|
|
10000
|
+
}, t;
|
|
10001
10001
|
}(D.a), R = function() {
|
|
10002
10002
|
function y() {
|
|
10003
10003
|
}
|
|
10004
|
-
return y.createPrintElement = function(
|
|
10005
|
-
if (["text", "image", "longText", "table", "html", "vline", "hline", "rect", "oval"].includes(
|
|
10006
|
-
return
|
|
10004
|
+
return y.createPrintElement = function(t, i) {
|
|
10005
|
+
if (["text", "image", "longText", "table", "html", "vline", "hline", "rect", "oval"].includes(t.type))
|
|
10006
|
+
return t.type == "text" ? new u(t, i) : t.type == "image" ? new v(t, i) : t.type == "longText" ? new I(t, i) : t.type == "table" ? new N.a(t, i) : t.type == "html" ? new A(t, i) : t.type == "vline" ? new Z(t, i) : t.type == "hline" ? new L(t, i) : t.type == "rect" ? new J(t, i) : t.type == "oval" ? new Y(t, i) : void 0;
|
|
10007
10007
|
var p, f = c.a.instance.getHooks("createPrintElement");
|
|
10008
10008
|
return f && f.forEach((U) => {
|
|
10009
10009
|
p = U.run({
|
|
@@ -10011,22 +10011,22 @@ var At = function(q) {
|
|
|
10011
10011
|
BasePrintElement: D.a,
|
|
10012
10012
|
Options: H.a,
|
|
10013
10013
|
Supper: j,
|
|
10014
|
-
ele:
|
|
10014
|
+
ele: t,
|
|
10015
10015
|
eleOpt: i
|
|
10016
10016
|
});
|
|
10017
|
-
}), p ? new p(
|
|
10017
|
+
}), p ? new p(t, i) : void 0;
|
|
10018
10018
|
}, y;
|
|
10019
10019
|
}(), V = function() {
|
|
10020
|
-
function y(
|
|
10021
|
-
this.field =
|
|
10020
|
+
function y(t) {
|
|
10021
|
+
this.field = t.field, this.fields = t.fields, this.title = t.title, this.text = t.text, this.tid = t.tid, this.data = t.data, this.styler = t.styler, this.formatter = t.formatter, this.type = t.type, this.onRendered = t.onRendered, this.options = t.options;
|
|
10022
10022
|
}
|
|
10023
|
-
return y.prototype.getText = function(
|
|
10024
|
-
return
|
|
10023
|
+
return y.prototype.getText = function(t) {
|
|
10024
|
+
return t ? this.title || this.text || "" : this.text || this.title || "";
|
|
10025
10025
|
}, y.prototype.getData = function() {
|
|
10026
10026
|
return this.data;
|
|
10027
|
-
}, y.prototype.createPrintElement = function(
|
|
10027
|
+
}, y.prototype.createPrintElement = function(t) {
|
|
10028
10028
|
var i = {};
|
|
10029
|
-
return x.extend(i,
|
|
10029
|
+
return x.extend(i, t || {}), R.createPrintElement(this, i);
|
|
10030
10030
|
}, y.prototype.getPrintElementTypeEntity = function() {
|
|
10031
10031
|
return new r({
|
|
10032
10032
|
title: this.title,
|
|
@@ -10041,7 +10041,7 @@ var At = function(q) {
|
|
|
10041
10041
|
g(16);
|
|
10042
10042
|
var $ = g(12);
|
|
10043
10043
|
(function(y) {
|
|
10044
|
-
function
|
|
10044
|
+
function t(i) {
|
|
10045
10045
|
var p = y.call(this, i) || this;
|
|
10046
10046
|
return (i = i || {}).columns ? (p.columns = [], i.columns.forEach(function(f) {
|
|
10047
10047
|
p.columns.push(new $.a(f));
|
|
@@ -10058,51 +10058,51 @@ var At = function(q) {
|
|
|
10058
10058
|
})
|
|
10059
10059
|
], p.lHeight = i.lHeight, p.autoCompletion = i.autoCompletion, p.tableFooterRepeat = i.tableFooterRepeat, p;
|
|
10060
10060
|
}
|
|
10061
|
-
return j(
|
|
10061
|
+
return j(t, y), t.prototype.getPrintElementOptionEntity = function() {
|
|
10062
10062
|
var i = y.prototype.getPrintElementOptionEntity.call(this);
|
|
10063
10063
|
return i.fields = this.fields, i.columns = [], this.columns.forEach(function(p) {
|
|
10064
10064
|
i.columns.push(p.getPrintElementOptionEntity());
|
|
10065
10065
|
}), i;
|
|
10066
|
-
},
|
|
10066
|
+
}, t;
|
|
10067
10067
|
})(H.a);
|
|
10068
10068
|
var z = function(y) {
|
|
10069
|
-
function
|
|
10069
|
+
function t(i) {
|
|
10070
10070
|
return y.call(this, i) || this;
|
|
10071
10071
|
}
|
|
10072
|
-
return j(
|
|
10072
|
+
return j(t, y), t.prototype.createPrintElement = function(i) {
|
|
10073
10073
|
var p = {};
|
|
10074
10074
|
return x.extend(p, i || {}), R.createPrintElement(this, p);
|
|
10075
|
-
},
|
|
10075
|
+
}, t.prototype.getPrintElementTypeEntity = function() {
|
|
10076
10076
|
return new r({
|
|
10077
10077
|
title: this.title,
|
|
10078
10078
|
type: this.type
|
|
10079
10079
|
});
|
|
10080
|
-
},
|
|
10080
|
+
}, t;
|
|
10081
10081
|
}(V), et = function() {
|
|
10082
10082
|
function y() {
|
|
10083
10083
|
}
|
|
10084
|
-
return y.createPrintElementType = function(
|
|
10085
|
-
return
|
|
10084
|
+
return y.createPrintElementType = function(t) {
|
|
10085
|
+
return t.type = t.type || "text", t.type == "text" ? new z(t) : t.type == "table" ? new S(t) : new V(t);
|
|
10086
10086
|
}, y;
|
|
10087
10087
|
}(), ot = function() {
|
|
10088
10088
|
function y() {
|
|
10089
10089
|
}
|
|
10090
|
-
return y.ElementTypes = l.instance, y.getElementTypeGroups = function(
|
|
10091
|
-
var i = y.formatterModule(
|
|
10090
|
+
return y.ElementTypes = l.instance, y.getElementTypeGroups = function(t) {
|
|
10091
|
+
var i = y.formatterModule(t);
|
|
10092
10092
|
return l.instance[i] || [];
|
|
10093
|
-
}, y.getElementType = function(
|
|
10094
|
-
if (
|
|
10095
|
-
return l.instance.getElementType(
|
|
10093
|
+
}, y.getElementType = function(t, i) {
|
|
10094
|
+
if (t)
|
|
10095
|
+
return l.instance.getElementType(t);
|
|
10096
10096
|
et.createPrintElementType({
|
|
10097
10097
|
type: i
|
|
10098
10098
|
});
|
|
10099
|
-
}, y.build = function(
|
|
10100
|
-
var p = y.formatterModule(i), f = new w().createPrintElementTypeHtml(
|
|
10099
|
+
}, y.build = function(t, i) {
|
|
10100
|
+
var p = y.formatterModule(i), f = new w().createPrintElementTypeHtml(t, this.getElementTypeGroups(p));
|
|
10101
10101
|
this.enableDrag(f);
|
|
10102
|
-
}, y.buildByHtml = function(
|
|
10103
|
-
this.enableDrag(
|
|
10104
|
-
}, y.enableDrag = function(
|
|
10105
|
-
|
|
10102
|
+
}, y.buildByHtml = function(t) {
|
|
10103
|
+
this.enableDrag(t);
|
|
10104
|
+
}, y.enableDrag = function(t) {
|
|
10105
|
+
t.hidraggable({
|
|
10106
10106
|
revert: !0,
|
|
10107
10107
|
proxy: function(p) {
|
|
10108
10108
|
var f = s.a.instance.getDragingPrintElement(), U = f.printElement.getProxyTarget(f.printElement.printElementType.getOptions());
|
|
@@ -10127,47 +10127,47 @@ var At = function(q) {
|
|
|
10127
10127
|
s.a.instance.draging = !1;
|
|
10128
10128
|
}
|
|
10129
10129
|
});
|
|
10130
|
-
}, y.formatterModule = function(
|
|
10131
|
-
return
|
|
10130
|
+
}, y.formatterModule = function(t) {
|
|
10131
|
+
return t || "_default";
|
|
10132
10132
|
}, y;
|
|
10133
10133
|
}(), pt = function() {
|
|
10134
|
-
return function(y,
|
|
10134
|
+
return function(y, t) {
|
|
10135
10135
|
var i = this;
|
|
10136
|
-
this.name = y, this.printElementTypes = [],
|
|
10136
|
+
this.name = y, this.printElementTypes = [], t.forEach(function(p) {
|
|
10137
10137
|
i.printElementTypes.push(et.createPrintElementType(p));
|
|
10138
10138
|
});
|
|
10139
10139
|
};
|
|
10140
10140
|
}(), st = function() {
|
|
10141
10141
|
return function(y) {
|
|
10142
10142
|
if (this.index = y.index, this.name = y.name, this.paperType = y.paperType, this.paperType) {
|
|
10143
|
-
var
|
|
10144
|
-
y.height ? (this.height = y.height, this.width = y.width) : (this.height =
|
|
10143
|
+
var t = s.a.instance[this.paperType];
|
|
10144
|
+
y.height ? (this.height = y.height, this.width = y.width) : (this.height = t.height, this.width = t.width);
|
|
10145
10145
|
} else
|
|
10146
10146
|
this.height = y.height, this.width = y.width;
|
|
10147
10147
|
this.paperHeader = y.paperHeader || 0, this.paperFooter = y.paperFooter || E.a.mm.toPt(this.height), this.printElements = y.printElements || [], this.paperNumberLeft = y.paperNumberLeft, this.paperNumberTop = y.paperNumberTop, this.paperNumberDisabled = y.paperNumberDisabled, this.paperNumberFormat = y.paperNumberFormat, this.panelPaperRule = y.panelPaperRule, this.panelPageRule = y.panelPageRule, this.rotate = y.rotate || void 0, this.firstPaperFooter = y.firstPaperFooter, this.evenPaperFooter = y.evenPaperFooter, this.oddPaperFooter = y.oddPaperFooter, this.lastPaperFooter = y.lastPaperFooter, this.topOffset = y.topOffset, this.fontFamily = y.fontFamily, this.leftOffset = y.leftOffset, this.orient = y.orient, this.watermarkOptions = y.watermarkOptions, this.scale = y.scale;
|
|
10148
10148
|
};
|
|
10149
10149
|
}(), ht = function() {
|
|
10150
|
-
function y(
|
|
10151
|
-
this.bx =
|
|
10150
|
+
function y(t, i, p, f) {
|
|
10151
|
+
this.bx = t, this.by = i, this.ex = t, this.ey = i, this.startX = this.minX = t, this.startY = this.minY = i, this.maxX = t, this.maxY = i, this.lastLeft = p, this.lastTop = f;
|
|
10152
10152
|
}
|
|
10153
|
-
return y.prototype.updateRect = function(
|
|
10154
|
-
this.ex =
|
|
10155
|
-
}, y.prototype.updatePositionByMultipleSelect = function(
|
|
10156
|
-
|
|
10153
|
+
return y.prototype.updateRect = function(t, i) {
|
|
10154
|
+
this.ex = t, this.ey = i, this.minX = this.startX < t ? this.startX : t, this.minY = this.startY < i ? this.startY : i, this.maxX = this.startX < t ? t : this.startX, this.maxY = this.startY < i ? i : this.startY;
|
|
10155
|
+
}, y.prototype.updatePositionByMultipleSelect = function(t, i) {
|
|
10156
|
+
t != null && (this.lastLeft = this.lastLeft + t), i != null && (this.lastTop = this.lastTop + i), this.target.css({
|
|
10157
10157
|
left: this.lastLeft + "pt",
|
|
10158
10158
|
top: this.lastTop + "pt"
|
|
10159
10159
|
});
|
|
10160
10160
|
}, y;
|
|
10161
10161
|
}(), mt = function() {
|
|
10162
|
-
function y(
|
|
10163
|
-
this.templateId = i, this.index =
|
|
10162
|
+
function y(t, i) {
|
|
10163
|
+
this.templateId = i, this.index = t.index, this.name = t.name, this.width = t.width, this.height = t.height, this.paperType = t.paperType, this.paperHeader = t.paperHeader, this.paperFooter = t.paperFooter, this.initPrintElements(t.printElements), this.paperNumberLeft = t.paperNumberLeft, this.paperNumberTop = t.paperNumberTop, this.paperNumberDisabled = t.paperNumberDisabled, this.paperNumberFormat = t.paperNumberFormat, this.panelPaperRule = t.panelPaperRule, this.panelPageRule = t.panelPageRule, this.firstPaperFooter = t.firstPaperFooter, this.evenPaperFooter = t.evenPaperFooter, this.oddPaperFooter = t.oddPaperFooter, this.lastPaperFooter = t.lastPaperFooter, this.topOffset = t.topOffset, this.leftOffset = t.leftOffset, this.fontFamily = t.fontFamily, this.orient = t.orient, this.target = this.createTarget(), this.rotate = t.rotate, this.watermarkOptions = t.watermarkOptions || {}, this.scale = t.scale;
|
|
10164
10164
|
}
|
|
10165
|
-
return y.prototype.design = function(
|
|
10165
|
+
return y.prototype.design = function(t) {
|
|
10166
10166
|
var i = this;
|
|
10167
|
-
this.orderPrintElements(), this.designPaper = this.createNewPage(0), this.target.html(""), this.target.append(this.designPaper.getTarget()), this.droppablePaper(this.designPaper), this.designPaper.design(
|
|
10167
|
+
this.orderPrintElements(), this.designPaper = this.createNewPage(0), this.target.html(""), this.target.append(this.designPaper.getTarget()), this.droppablePaper(this.designPaper), this.designPaper.design(t), this.designPaper.subscribePaperBaseInfoChanged(function(p) {
|
|
10168
10168
|
i.paperHeader = p.paperHeader, i.paperFooter = p.paperFooter, i.paperNumberLeft = p.paperNumberLeft, i.paperNumberTop = p.paperNumberTop, i.paperNumberDisabled = p.paperNumberDisabled, i.paperNumberFormat = p.paperNumberFormat;
|
|
10169
10169
|
}), this.printElements.forEach(function(p) {
|
|
10170
|
-
i.appendDesignPrintElement(i.designPaper, p), p.design(
|
|
10170
|
+
i.appendDesignPrintElement(i.designPaper, p), p.design(t, i.designPaper);
|
|
10171
10171
|
}), this.target.bind("click.hiprint", function(p) {
|
|
10172
10172
|
E.a.event.trigger("BuildCustomOptionSettingEventKey_" + i.templateId, {
|
|
10173
10173
|
options: {
|
|
@@ -10190,22 +10190,22 @@ var At = function(q) {
|
|
|
10190
10190
|
}
|
|
10191
10191
|
});
|
|
10192
10192
|
}), this.bindShortcutKeyEvent(), this.bingPasteEvent(), this.bindBatchMoveElement();
|
|
10193
|
-
}, y.prototype.update = function(
|
|
10193
|
+
}, y.prototype.update = function(t) {
|
|
10194
10194
|
try {
|
|
10195
|
-
console.log("update ------>"), console.log(
|
|
10195
|
+
console.log("update ------>"), console.log(t);
|
|
10196
10196
|
var i = Date.now();
|
|
10197
10197
|
console.log("start", i);
|
|
10198
10198
|
var p = this;
|
|
10199
|
-
this.index =
|
|
10199
|
+
this.index = t.index, this.name = t.name, this.width = t.width, this.height = t.height, this.paperType = t.paperType, this.paperHeader = t.paperHeader, this.paperFooter = t.paperFooter, this.designPaper.width = E.a.mm.toPt(t.width), this.designPaper.height = E.a.mm.toPt(this.height), this.designPaper.paperType = this.paperType, this.designPaper.paperHeader = this.paperHeader, this.designPaper.paperFooter = this.paperFooter, this.designPaper.mmheight = t.height, this.designPaper.mmwidth = t.width, this.designPaper.headerLinetarget.css("top", (this.paperHeader || -1) + "pt"), this.paperHeader == 0 && this.designPaper.headerLinetarget.addClass("hideheaderLinetarget"), this.designPaper.footerLinetarget.css("top", parseInt(this.paperFooter.toString()) + "pt"), this.paperFooter == this.height && this.designPaper.footerLinetarget.css("top", t.height - c.a.instance.paperHeightTrim + "mm"), this.watermarkOptions = t.watermarkOptions || {}, this.paperNumberLeft = t.paperNumberLeft, this.paperNumberTop = t.paperNumberTop, this.paperNumberDisabled = t.paperNumberDisabled, this.paperNumberFormat = t.paperNumberFormat, this.designPaper.paperNumberLeft = this.paperNumberLeft, this.designPaper.paperNumberTop = this.paperNumberTop, this.designPaper.paperNumberDisabled = this.paperNumberDisabled, this.designPaper.paperNumberFormat = this.paperNumberFormat, this.designPaper.paperNumberTarget.css("top", this.paperNumberTop + "pt").css("left", this.paperNumberLeft + "pt"), this.designPaper.resetPaperNumber(this.designPaper.paperNumberTarget), this.fontFamily = t.fontFamily, this.orient = t.orient, this.rotate = t.rotate, this.scale = t.scale, this.designPaper.fontFamily = this.fontFamily, this.designPaper.orient = this.orient, this.designPaper.scale = this.scale, this.panelPaperRule = t.panelPaperRule, this.panelPageRule = t.panelPageRule, this.firstPaperFooter = t.firstPaperFooter, this.evenPaperFooter = t.evenPaperFooter, this.oddPaperFooter = t.oddPaperFooter, this.lastPaperFooter = t.lastPaperFooter, this.topOffset = t.topOffset, this.leftOffset = t.leftOffset, this.designPaper.setFooter(this.firstPaperFooter, this.evenPaperFooter, this.oddPaperFooter, this.lastPaperFooter), this.designPaper.setOffset(this.leftOffset, this.topOffset), this.target.css("width", t.width + "mm"), this.target.css("height", t.height - c.a.instance.paperHeightTrim + "mm"), this.target.attr("original-height", t.height), this.target.parent().css("width", t.width + "mm"), this.target.parent().css("height", t.height - c.a.instance.paperHeightTrim + "mm"), this.designPaper.target.css("width", t.width + "mm"), this.designPaper.target.css("height", t.height - c.a.instance.paperHeightTrim + "mm"), this.designPaper.target.attr("original-height", t.height), this.zoom(this.scale);
|
|
10200
10200
|
var f = Date.now();
|
|
10201
10201
|
console.log("\u66F4\u65B0\u53C2\u6570 end", f), console.log("\u66F4\u65B0\u53C2\u6570 time:", f - i), this.printElements.forEach(function(U) {
|
|
10202
10202
|
U.designTarget && U.designTarget.length && U.designTarget.remove();
|
|
10203
10203
|
}), this.printElements = [];
|
|
10204
10204
|
var f = Date.now();
|
|
10205
|
-
console.log("\u6E05\u7A7A\u9762\u677F end", f), console.log("\u6E05\u7A7A\u9762\u677F time:", f - i), this.initPrintElements(
|
|
10205
|
+
console.log("\u6E05\u7A7A\u9762\u677F end", f), console.log("\u6E05\u7A7A\u9762\u677F time:", f - i), this.initPrintElements(t.printElements);
|
|
10206
10206
|
var f = Date.now();
|
|
10207
10207
|
console.log("\u521D\u59CB\u5316\u5143\u7D20 end", f), console.log("\u521D\u59CB\u5316\u5143\u7D20 time:", f - i), this.printElements.forEach(function(U) {
|
|
10208
|
-
p.appendDesignPrintElement(p.designPaper, U), U.design(
|
|
10208
|
+
p.appendDesignPrintElement(p.designPaper, U), U.design(t, p.designPaper);
|
|
10209
10209
|
});
|
|
10210
10210
|
var f = Date.now();
|
|
10211
10211
|
console.log("\u63D2\u5165\u9762\u677F end", f), console.log("\u63D2\u5165\u9762\u677F time:", f - i);
|
|
@@ -10213,20 +10213,20 @@ var At = function(q) {
|
|
|
10213
10213
|
console.log("???????"), console.log(U);
|
|
10214
10214
|
}
|
|
10215
10215
|
}, y.prototype.bindShortcutKeyEvent = function() {
|
|
10216
|
-
var
|
|
10216
|
+
var t = this;
|
|
10217
10217
|
x(document).keydown(function(i) {
|
|
10218
10218
|
if (i.target.tagName != "INPUT") {
|
|
10219
|
-
(i.ctrlKey || i.metaKey) && i.keyCode == 90 && (i.shiftKey ? E.a.event.trigger("hiprintTemplateDataShortcutKey_" +
|
|
10219
|
+
(i.ctrlKey || i.metaKey) && i.keyCode == 90 && (i.shiftKey ? E.a.event.trigger("hiprintTemplateDataShortcutKey_" + t.templateId, "redo") : E.a.event.trigger("hiprintTemplateDataShortcutKey_" + t.templateId, "undo"), i.preventDefault());
|
|
10220
10220
|
var p = c.a.instance.getHooks("documentShortcutKeys");
|
|
10221
10221
|
p && p.forEach((f) => {
|
|
10222
10222
|
f.run({
|
|
10223
|
-
panel:
|
|
10223
|
+
panel: t,
|
|
10224
10224
|
event: i
|
|
10225
10225
|
});
|
|
10226
10226
|
});
|
|
10227
10227
|
}
|
|
10228
10228
|
});
|
|
10229
|
-
}, y.prototype.copyJson = function(
|
|
10229
|
+
}, y.prototype.copyJson = function(t) {
|
|
10230
10230
|
var i = [];
|
|
10231
10231
|
try {
|
|
10232
10232
|
var p = this, f = x("#copyArea");
|
|
@@ -10238,7 +10238,7 @@ var At = function(q) {
|
|
|
10238
10238
|
printElementType: G.printElementType,
|
|
10239
10239
|
id: G.id,
|
|
10240
10240
|
templateId: G.templateId,
|
|
10241
|
-
cut:
|
|
10241
|
+
cut: t || !1
|
|
10242
10242
|
});
|
|
10243
10243
|
});
|
|
10244
10244
|
var k = JSON.stringify(U);
|
|
@@ -10249,33 +10249,33 @@ var At = function(q) {
|
|
|
10249
10249
|
return i;
|
|
10250
10250
|
}, y.prototype.cutJson = function() {
|
|
10251
10251
|
try {
|
|
10252
|
-
var
|
|
10252
|
+
var t = this, i = t.copyJson(!0);
|
|
10253
10253
|
i && i.forEach(function(p) {
|
|
10254
|
-
|
|
10254
|
+
t.deletePrintElement(p);
|
|
10255
10255
|
});
|
|
10256
10256
|
} catch (p) {
|
|
10257
10257
|
console.log("cutJson error", p);
|
|
10258
10258
|
}
|
|
10259
10259
|
}, y.prototype.getSelectEls = function() {
|
|
10260
|
-
var
|
|
10261
|
-
return
|
|
10260
|
+
var t = this, i = [];
|
|
10261
|
+
return t.mouseRect && t.mouseRect.target && x(".mouseRect").length ? i = t.getElementInRect(t.mouseRect) : i = t.printElements.filter(function(p) {
|
|
10262
10262
|
return p.designTarget.children().last().css("display") == "block" && !p.printElementType.type.includes("table");
|
|
10263
10263
|
}), i;
|
|
10264
10264
|
}, y.prototype.bingPasteEvent = function() {
|
|
10265
|
-
var
|
|
10266
|
-
|
|
10265
|
+
var t = this;
|
|
10266
|
+
t.designPaper.target.attr("tabindex", "1"), t.designPaper.target.keydown(function(i) {
|
|
10267
10267
|
if (i.target.tagName != "INPUT") {
|
|
10268
|
-
(i.ctrlKey || i.metaKey) && i.keyCode == 86 && (
|
|
10268
|
+
(i.ctrlKey || i.metaKey) && i.keyCode == 86 && (t.pasteJson(i), i.preventDefault());
|
|
10269
10269
|
var p = c.a.instance.getHooks("shortcutKeys");
|
|
10270
10270
|
p && p.forEach((f) => {
|
|
10271
10271
|
f.run({
|
|
10272
|
-
panel:
|
|
10272
|
+
panel: t,
|
|
10273
10273
|
event: i
|
|
10274
10274
|
});
|
|
10275
10275
|
});
|
|
10276
10276
|
}
|
|
10277
10277
|
});
|
|
10278
|
-
}, y.prototype.canPaste = function(
|
|
10278
|
+
}, y.prototype.canPaste = function(t) {
|
|
10279
10279
|
var i = x("#copyArea");
|
|
10280
10280
|
if (!i.length)
|
|
10281
10281
|
return !1;
|
|
@@ -10283,7 +10283,7 @@ var At = function(q) {
|
|
|
10283
10283
|
return Array.isArray(f) ? f.some(function(U) {
|
|
10284
10284
|
return U.printElementType && U.templateId;
|
|
10285
10285
|
}) : !!(f.printElementType && f.templateId);
|
|
10286
|
-
}, y.prototype.pasteJson = function(
|
|
10286
|
+
}, y.prototype.pasteJson = function(t) {
|
|
10287
10287
|
var i = x("#copyArea");
|
|
10288
10288
|
if (!!i.length)
|
|
10289
10289
|
try {
|
|
@@ -10291,22 +10291,22 @@ var At = function(q) {
|
|
|
10291
10291
|
Array.isArray(U) ? (k = U.some(function(G) {
|
|
10292
10292
|
return G.cut == !0;
|
|
10293
10293
|
}), U.forEach(function(G) {
|
|
10294
|
-
p.pasteByJson(G,
|
|
10295
|
-
})) : (k = U.cut, p.pasteByJson(U,
|
|
10294
|
+
p.pasteByJson(G, t);
|
|
10295
|
+
})) : (k = U.cut, p.pasteByJson(U, t)), k && x("#copyArea").text("{}");
|
|
10296
10296
|
} catch (G) {
|
|
10297
10297
|
console.error("pasteJson error", G);
|
|
10298
10298
|
}
|
|
10299
|
-
}, y.prototype.pasteByJson = function(
|
|
10300
|
-
if (!(!
|
|
10301
|
-
var p = this, f =
|
|
10299
|
+
}, y.prototype.pasteByJson = function(t, i) {
|
|
10300
|
+
if (!(!t.printElementType && !t.templateId)) {
|
|
10301
|
+
var p = this, f = t.options, U = et.createPrintElementType(t.printElementType), k = U.createPrintElement(f);
|
|
10302
10302
|
if (!!k) {
|
|
10303
10303
|
var G = i && i.currentTarget ? !0 : i, O = G ? p.mouseOffsetX && E.a.px.toPt(p.mouseOffsetX) : f.left += 10, it = G ? p.mouseOffsetY && E.a.px.toPt(p.mouseOffsetY) : f.top += 10;
|
|
10304
|
-
G || (k.options.setLeft(O), k.options.setTop(it)), k.setTemplateId(p.templateId), k.setPanel(p), p.appendDesignPrintElement(p.designPaper, k, !1), p.printElements.push(k), k.design(void 0, p.designPaper), console.log("pasteJson success"), E.a.event.trigger("hiprintTemplateDataChanged_" + p.templateId,
|
|
10304
|
+
G || (k.options.setLeft(O), k.options.setTop(it)), k.setTemplateId(p.templateId), k.setPanel(p), p.appendDesignPrintElement(p.designPaper, k, !1), p.printElements.push(k), k.design(void 0, p.designPaper), console.log("pasteJson success"), E.a.event.trigger("hiprintTemplateDataChanged_" + p.templateId, t.cut ? "\u526A\u5207" : "\u590D\u5236"), k.designTarget.trigger(x.Event("click"));
|
|
10305
10305
|
}
|
|
10306
10306
|
}
|
|
10307
|
-
}, y.prototype.css = function(
|
|
10308
|
-
this.fontFamily ?
|
|
10309
|
-
}, y.prototype.getHtml = function(
|
|
10307
|
+
}, y.prototype.css = function(t) {
|
|
10308
|
+
this.fontFamily ? t.css("fontFamily", this.fontFamily) : t[0].style.fontFamily = "";
|
|
10309
|
+
}, y.prototype.getHtml = function(t, i, p, f, U) {
|
|
10310
10310
|
var k = this;
|
|
10311
10311
|
this.orderPrintElements();
|
|
10312
10312
|
var G, O = p || [], it = f || this, K = void 0;
|
|
@@ -10325,7 +10325,7 @@ var At = function(q) {
|
|
|
10325
10325
|
return !tt.isFixed() && !tt.isHeaderOrFooter();
|
|
10326
10326
|
}).forEach(function(tt) {
|
|
10327
10327
|
var rt = [], X = O[O.length - 1];
|
|
10328
|
-
X.referenceElement.isPositionLeftOrRight(tt.options.getTop()) ? K = O[X.referenceElement.beginPrintPaperIndex] : K = O[X.referenceElement.endPrintPaperIndex], rt = tt.getHtml(K,
|
|
10328
|
+
X.referenceElement.isPositionLeftOrRight(tt.options.getTop()) ? K = O[X.referenceElement.beginPrintPaperIndex] : K = O[X.referenceElement.endPrintPaperIndex], rt = tt.getHtml(K, t), rt.forEach(function(nt, gt) {
|
|
10329
10329
|
nt.referenceElement && (nt.referenceElement.endPrintPaperIndex = nt.referenceElement.beginPrintPaperIndex + rt.length - 1), gt > 0 && (K.index < O.length - 1 ? K = O[K.index + 1] : (K = it.createNewPage(O.length, K.referenceElement), O.push(K)), G.append(K.getTarget())), nt.target && (tt.options.showInPage != "none" && K.append(nt.target), K.updatePrintLine(nt.printLine), tt.onRendered(K, nt.target)), gt == rt.length - 1 && nt.referenceElement && K.updateReferenceElement(nt.referenceElement);
|
|
10330
10330
|
});
|
|
10331
10331
|
}), U && U.templates.forEach(function(tt, rt) {
|
|
@@ -10334,24 +10334,24 @@ var At = function(q) {
|
|
|
10334
10334
|
gt.getHtml(X, nt, p, k);
|
|
10335
10335
|
});
|
|
10336
10336
|
}), f || (this.lastPaperFooter && O[O.length - 1].printLine > this.lastPaperFooter && (K = it.createNewPage(O.length, K.referenceElement), O.push(K), G.append(K.getTarget())), this.panelPaperRule && (this.panelPaperRule == "odd" && O.length % 2 == 0 && (K = it.createNewPage(O.length, K.referenceElement), O.push(K), G.append(K.getTarget())), this.panelPaperRule == "even" && O.length % 2 == 1 && (K = it.createNewPage(O.length, K.referenceElement), O.push(K), G.append(K.getTarget()))), O.forEach(function(tt) {
|
|
10337
|
-
tt.updatePaperNumber(tt.index + 1, O.length, i.paperNumberToggleInEven), k.fillPaperHeaderAndFooter(tt,
|
|
10337
|
+
tt.updatePaperNumber(tt.index + 1, O.length, i.paperNumberToggleInEven), k.fillPaperHeaderAndFooter(tt, t, O.length), i && (i.leftOffset != null && tt.setLeftOffset(i.leftOffset), i.topOffset != null && tt.setTopOffset(i.topOffset));
|
|
10338
10338
|
}), G.prepend(this.getPrintStyle())), G;
|
|
10339
|
-
}, y.prototype.resize = function(
|
|
10340
|
-
this.width = i, this.height = p, this.paperType =
|
|
10339
|
+
}, y.prototype.resize = function(t, i, p, f) {
|
|
10340
|
+
this.width = i, this.height = p, this.paperType = t, this.rotate = f, this.designPaper.resize(i, p);
|
|
10341
10341
|
}, y.prototype.rotatePaper = function() {
|
|
10342
10342
|
this.rotate == null && (this.rotate = !1), this.rotate = !this.rotate, this.resize(this.paperType, this.height, this.width, this.rotate);
|
|
10343
|
-
}, y.prototype.zoom = function(
|
|
10344
|
-
i ? this.scale =
|
|
10343
|
+
}, y.prototype.zoom = function(t, i) {
|
|
10344
|
+
i ? this.scale = t : this.scale = void 0, this.designPaper.zoom(t);
|
|
10345
10345
|
}, y.prototype.getTarget = function() {
|
|
10346
10346
|
return this.target;
|
|
10347
10347
|
}, y.prototype.enable = function() {
|
|
10348
10348
|
this.target.removeClass("hipanel-disable");
|
|
10349
10349
|
}, y.prototype.disable = function() {
|
|
10350
10350
|
this.target.addClass("hipanel-disable");
|
|
10351
|
-
}, y.prototype.getPanelEntity = function(
|
|
10351
|
+
}, y.prototype.getPanelEntity = function(t) {
|
|
10352
10352
|
var i = [];
|
|
10353
10353
|
return this.printElements.forEach(function(p) {
|
|
10354
|
-
i.push(p.getPrintElementEntity(
|
|
10354
|
+
i.push(p.getPrintElementEntity(t));
|
|
10355
10355
|
}), new st({
|
|
10356
10356
|
index: this.index,
|
|
10357
10357
|
name: this.name || this.index + 1,
|
|
@@ -10380,35 +10380,35 @@ var At = function(q) {
|
|
|
10380
10380
|
leftOffset: this.leftOffset
|
|
10381
10381
|
});
|
|
10382
10382
|
}, y.prototype.createTarget = function() {
|
|
10383
|
-
var
|
|
10384
|
-
return this.css(
|
|
10385
|
-
}, y.prototype.droppablePaper = function(
|
|
10383
|
+
var t = x('<div class="hiprint-printPanel panel-index-' + this.index + '"></div>');
|
|
10384
|
+
return this.css(t), t;
|
|
10385
|
+
}, y.prototype.droppablePaper = function(t) {
|
|
10386
10386
|
var i = this;
|
|
10387
|
-
|
|
10387
|
+
t.getTarget().hidroppable({
|
|
10388
10388
|
accept: ".ep-draggable-item",
|
|
10389
10389
|
onDrop: function(f, U) {
|
|
10390
10390
|
var k = s.a.instance.getDragingPrintElement(), G = k.printElement, O = i.designPaper.scale || 1, it = (k.left - E.a.px.toPt(i.target.children(".hiprint-printPaper").offset().left)) / O, K = (k.top - E.a.px.toPt(i.target.children(".hiprint-printPaper").offset().top)) / O;
|
|
10391
|
-
G.updateSizeAndPositionOptions(i.mathroundToporleft(it), i.mathroundToporleft(K)), G.setTemplateId(i.templateId), G.setPanel(i), i.appendDesignPrintElement(i.designPaper, G, !0), i.printElements.push(G), G.design(void 0,
|
|
10391
|
+
G.updateSizeAndPositionOptions(i.mathroundToporleft(it), i.mathroundToporleft(K)), G.setTemplateId(i.templateId), G.setPanel(i), i.appendDesignPrintElement(i.designPaper, G, !0), i.printElements.push(G), G.design(void 0, t), E.a.event.trigger("hiprintTemplateDataChanged_" + i.templateId, "\u65B0\u589E");
|
|
10392
10392
|
}
|
|
10393
10393
|
});
|
|
10394
|
-
}, y.prototype.initPrintElements = function(
|
|
10394
|
+
}, y.prototype.initPrintElements = function(t) {
|
|
10395
10395
|
var i = this;
|
|
10396
|
-
this.printElements = [],
|
|
10396
|
+
this.printElements = [], t && t.forEach(function(p) {
|
|
10397
10397
|
var f;
|
|
10398
10398
|
if (f = p.printElementType ? et.createPrintElementType(p.printElementType) : l.instance.getElementType(p.tid)) {
|
|
10399
10399
|
var U = f.createPrintElement(p.options);
|
|
10400
10400
|
U.setTemplateId(i.templateId), U.setPanel(i), i.printElements.push(U);
|
|
10401
10401
|
} else
|
|
10402
|
-
console.log("miss " + JSON.stringify(
|
|
10402
|
+
console.log("miss " + JSON.stringify(t));
|
|
10403
10403
|
});
|
|
10404
|
-
}, y.prototype.mathroundToporleft = function(
|
|
10404
|
+
}, y.prototype.mathroundToporleft = function(t) {
|
|
10405
10405
|
var i = c.a.instance.movingDistance;
|
|
10406
|
-
return Math.round(
|
|
10407
|
-
}, y.prototype.appendDesignPrintElement = function(
|
|
10406
|
+
return Math.round(t / i) * i;
|
|
10407
|
+
}, y.prototype.appendDesignPrintElement = function(t, i, p) {
|
|
10408
10408
|
i.setCurrenttemplateData(void 0);
|
|
10409
|
-
var f = i.getDesignTarget(
|
|
10410
|
-
f.addClass("design"), p && i.initSizeByHtml(f),
|
|
10411
|
-
}, y.prototype.createNewPage = function(
|
|
10409
|
+
var f = i.getDesignTarget(t);
|
|
10410
|
+
f.addClass("design"), p && i.initSizeByHtml(f), t.append(f);
|
|
10411
|
+
}, y.prototype.createNewPage = function(t, i) {
|
|
10412
10412
|
var p = new m(
|
|
10413
10413
|
this.templateId,
|
|
10414
10414
|
this.index,
|
|
@@ -10423,60 +10423,60 @@ var At = function(q) {
|
|
|
10423
10423
|
this.paperNumberTop,
|
|
10424
10424
|
this.paperNumberDisabled,
|
|
10425
10425
|
this.paperNumberFormat,
|
|
10426
|
-
|
|
10426
|
+
t,
|
|
10427
10427
|
i
|
|
10428
10428
|
);
|
|
10429
10429
|
return p.setFooter(this.firstPaperFooter, this.evenPaperFooter, this.oddPaperFooter, this.lastPaperFooter), p.setOffset(this.leftOffset, this.topOffset), p;
|
|
10430
10430
|
}, y.prototype.orderPrintElements = function() {
|
|
10431
|
-
this.printElements = E.a.orderBy(this.printElements, function(
|
|
10432
|
-
return
|
|
10433
|
-
}), this.printElements = E.a.orderBy(this.printElements, function(
|
|
10434
|
-
return
|
|
10431
|
+
this.printElements = E.a.orderBy(this.printElements, function(t) {
|
|
10432
|
+
return t.options.getLeft();
|
|
10433
|
+
}), this.printElements = E.a.orderBy(this.printElements, function(t) {
|
|
10434
|
+
return t.options.getTop();
|
|
10435
10435
|
});
|
|
10436
|
-
}, y.prototype.fillPaperHeaderAndFooter = function(
|
|
10436
|
+
}, y.prototype.fillPaperHeaderAndFooter = function(t, i, p) {
|
|
10437
10437
|
this.printElements.filter(function(f) {
|
|
10438
10438
|
return f.isFixed() || f.isHeaderOrFooter();
|
|
10439
10439
|
}).forEach(function(f) {
|
|
10440
|
-
if (f.isFixed(), f.showInPage(
|
|
10441
|
-
var U = f.getHtml(
|
|
10442
|
-
U.length &&
|
|
10440
|
+
if (f.isFixed(), f.showInPage(t.index, p)) {
|
|
10441
|
+
var U = f.getHtml(t, i);
|
|
10442
|
+
U.length && t.append(U[0].target);
|
|
10443
10443
|
}
|
|
10444
10444
|
});
|
|
10445
10445
|
}, y.prototype.clear = function() {
|
|
10446
|
-
this.printElements.forEach(function(
|
|
10447
|
-
|
|
10446
|
+
this.printElements.forEach(function(t) {
|
|
10447
|
+
t.designTarget && t.designTarget.length && t.designTarget.remove();
|
|
10448
10448
|
}), this.printElements = [], E.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId, "\u6E05\u7A7A");
|
|
10449
|
-
}, y.prototype.insertPrintElementToPanel = function(
|
|
10450
|
-
var i = this.getPrintElementTypeByEntity(
|
|
10449
|
+
}, y.prototype.insertPrintElementToPanel = function(t) {
|
|
10450
|
+
var i = this.getPrintElementTypeByEntity(t);
|
|
10451
10451
|
if (i) {
|
|
10452
|
-
var p = i.createPrintElement(
|
|
10452
|
+
var p = i.createPrintElement(t.options);
|
|
10453
10453
|
p.setTemplateId(this.templateId), p.setPanel(this), this.printElements.push(p);
|
|
10454
10454
|
}
|
|
10455
|
-
}, y.prototype.addPrintText = function(
|
|
10456
|
-
|
|
10457
|
-
}, y.prototype.addPrintHtml = function(
|
|
10458
|
-
|
|
10459
|
-
}, y.prototype.addPrintTable = function(
|
|
10460
|
-
if (
|
|
10461
|
-
var i = x.extend({},
|
|
10462
|
-
|
|
10463
|
-
}
|
|
10464
|
-
this.insertPrintElementToPanel(
|
|
10465
|
-
}, y.prototype.addPrintImage = function(
|
|
10466
|
-
|
|
10467
|
-
}, y.prototype.addPrintLongText = function(
|
|
10468
|
-
|
|
10469
|
-
}, y.prototype.addPrintVline = function(
|
|
10470
|
-
|
|
10471
|
-
}, y.prototype.addPrintHline = function(
|
|
10472
|
-
|
|
10473
|
-
}, y.prototype.addPrintRect = function(
|
|
10474
|
-
|
|
10475
|
-
}, y.prototype.addPrintOval = function(
|
|
10476
|
-
|
|
10477
|
-
}, y.prototype.getPrintElementTypeByEntity = function(
|
|
10455
|
+
}, y.prototype.addPrintText = function(t) {
|
|
10456
|
+
t.printElementType = t.printElementType || {}, t.printElementType.type = "text", this.insertPrintElementToPanel(t);
|
|
10457
|
+
}, y.prototype.addPrintHtml = function(t) {
|
|
10458
|
+
t.printElementType = t.printElementType || {}, t.printElementType.type = "html", this.insertPrintElementToPanel(t);
|
|
10459
|
+
}, y.prototype.addPrintTable = function(t) {
|
|
10460
|
+
if (t.printElementType = t.printElementType || {}, t.printElementType.type = "table", t.options && t.options.columns) {
|
|
10461
|
+
var i = x.extend({}, t.options.columns);
|
|
10462
|
+
t.printElementType.columns = i.columns, i.columns = void 0;
|
|
10463
|
+
}
|
|
10464
|
+
this.insertPrintElementToPanel(t);
|
|
10465
|
+
}, y.prototype.addPrintImage = function(t) {
|
|
10466
|
+
t.printElementType = t.printElementType || {}, t.printElementType.type = "image", this.insertPrintElementToPanel(t);
|
|
10467
|
+
}, y.prototype.addPrintLongText = function(t) {
|
|
10468
|
+
t.printElementType = t.printElementType || {}, t.printElementType.type = "longText", this.insertPrintElementToPanel(t);
|
|
10469
|
+
}, y.prototype.addPrintVline = function(t) {
|
|
10470
|
+
t.printElementType = t.printElementType || {}, t.printElementType.type = "vline", this.insertPrintElementToPanel(t);
|
|
10471
|
+
}, y.prototype.addPrintHline = function(t) {
|
|
10472
|
+
t.printElementType = t.printElementType || {}, t.printElementType.type = "hline", this.insertPrintElementToPanel(t);
|
|
10473
|
+
}, y.prototype.addPrintRect = function(t) {
|
|
10474
|
+
t.printElementType = t.printElementType || {}, t.printElementType.type = "rect", this.insertPrintElementToPanel(t);
|
|
10475
|
+
}, y.prototype.addPrintOval = function(t) {
|
|
10476
|
+
t.printElementType = t.printElementType || {}, t.printElementType.type = "oval", this.insertPrintElementToPanel(t);
|
|
10477
|
+
}, y.prototype.getPrintElementTypeByEntity = function(t) {
|
|
10478
10478
|
var i;
|
|
10479
|
-
return (i =
|
|
10479
|
+
return (i = t.tid ? l.instance.getElementType(t.tid) : et.createPrintElementType(t.printElementType)) || console.log("miss " + JSON.stringify(t)), i;
|
|
10480
10480
|
}, y.prototype.getPrintStyle = function() {
|
|
10481
10481
|
return ` <style printStyle>
|
|
10482
10482
|
@page
|
|
@@ -10490,65 +10490,65 @@ var At = function(q) {
|
|
|
10490
10490
|
`;
|
|
10491
10491
|
}, y.prototype.getPrintSizeStyle = function() {
|
|
10492
10492
|
return this.paperType ? "size:" + this.paperType + " " + (this.height > this.width ? "portrait" : "landscape") + ";" : "size: " + this.width + "mm " + this.height + "mm " + (this.orient ? this.orient == 1 ? "portrait" : "landscape" : "") + ";";
|
|
10493
|
-
}, y.prototype.deletePrintElement = function(
|
|
10493
|
+
}, y.prototype.deletePrintElement = function(t) {
|
|
10494
10494
|
var i = this;
|
|
10495
10495
|
this.printElements.filter(function(p, f) {
|
|
10496
|
-
p.id ==
|
|
10496
|
+
p.id == t.id && (t.delete(), i.printElements.splice(f, 1), E.a.event.trigger("hiprintTemplateDataChanged_" + i.templateId, "\u5220\u9664"));
|
|
10497
10497
|
});
|
|
10498
|
-
}, y.prototype.getElementByTid = function(
|
|
10498
|
+
}, y.prototype.getElementByTid = function(t) {
|
|
10499
10499
|
return this.printElements.filter(function(i) {
|
|
10500
|
-
return i.printElementType.tid ===
|
|
10500
|
+
return i.printElementType.tid === t;
|
|
10501
10501
|
}).map(function(i, p) {
|
|
10502
10502
|
return i;
|
|
10503
10503
|
});
|
|
10504
|
-
}, y.prototype.getElementByName = function(
|
|
10504
|
+
}, y.prototype.getElementByName = function(t) {
|
|
10505
10505
|
return this.printElements.filter(function(i) {
|
|
10506
|
-
return i.options.name ===
|
|
10506
|
+
return i.options.name === t;
|
|
10507
10507
|
}).map(function(i, p) {
|
|
10508
10508
|
return i;
|
|
10509
10509
|
});
|
|
10510
|
-
}, y.prototype.getElementById = function(
|
|
10510
|
+
}, y.prototype.getElementById = function(t) {
|
|
10511
10511
|
return this.printElements.find(function(i) {
|
|
10512
|
-
return i.id ===
|
|
10512
|
+
return i.id === t;
|
|
10513
10513
|
});
|
|
10514
10514
|
}, y.prototype.getFieldsInPanel = function() {
|
|
10515
|
-
var
|
|
10515
|
+
var t = [];
|
|
10516
10516
|
return this.printElements.forEach(function(i) {
|
|
10517
|
-
i.options && i.options.field ?
|
|
10518
|
-
}),
|
|
10517
|
+
i.options && i.options.field ? t.push(i.options.field) : i.printElementType.field && t.push(i.printElementType.field);
|
|
10518
|
+
}), t;
|
|
10519
10519
|
}, y.prototype.getTestData = function() {
|
|
10520
|
-
var
|
|
10520
|
+
var t = {};
|
|
10521
10521
|
return this.printElements.forEach(function(i) {
|
|
10522
|
-
i.printElementType.type != "table" && (i.options && i.options.field ?
|
|
10523
|
-
}),
|
|
10522
|
+
i.printElementType.type != "table" && (i.options && i.options.field ? t[i.options.field] = i.options.testData : i.printElementType.field && (t[i.printElementType.field] = i.printElementType.data || i.options.testData));
|
|
10523
|
+
}), t;
|
|
10524
10524
|
}, y.prototype.bindBatchMoveElement = function() {
|
|
10525
|
-
var
|
|
10525
|
+
var t = this;
|
|
10526
10526
|
this.designPaper.getTarget().on("mousemove", function(i) {
|
|
10527
|
-
i.target.className && jt(i.target.className) == "string" && i.target.className.includes("editing") || (i.currentTarget.className ==
|
|
10527
|
+
i.target.className && jt(i.target.className) == "string" && i.target.className.includes("editing") || (i.currentTarget.className == t.designPaper.target[0].className ? (t.mouseOffsetX = i.offsetX, t.mouseOffsetY = i.offsetY) : t.mouseOffsetX = t.mouseOffsetY = void 0, s.a.instance.draging || i.buttons === 1 && s.a.instance.rectDraging && t.mouseRect && (t.mouseRect.updateRect(i.pageX, i.pageY), t.updateRectPanel(t.mouseRect)));
|
|
10528
10528
|
}).on("mousedown", function(i) {
|
|
10529
|
-
s.a.instance.rectDraging = !0, !(i.target.className && jt(i.target.className) == "string" && i.target.className.includes("editing")) && (s.a.instance.draging || (
|
|
10529
|
+
s.a.instance.rectDraging = !0, !(i.target.className && jt(i.target.className) == "string" && i.target.className.includes("editing")) && (s.a.instance.draging || (t.mouseRect && t.mouseRect.target && t.mouseRect.target.remove(), i.buttons === 1 && s.a.instance.rectDraging && (jt(i.target.className) == "string" && i.target.className.includes("hiprint-printPaper hidroppable design") || i.target.className.includes("hiprint-printPaper-content")) && (t.mouseRect = new ht(
|
|
10530
10530
|
i.pageX,
|
|
10531
10531
|
i.pageY,
|
|
10532
|
-
s.a.instance.dragLengthCNum(i.pageX -
|
|
10533
|
-
s.a.instance.dragLengthCNum(i.pageY -
|
|
10532
|
+
s.a.instance.dragLengthCNum(i.pageX - t.designPaper.getTarget().offset().left, c.a.instance.movingDistance),
|
|
10533
|
+
s.a.instance.dragLengthCNum(i.pageY - t.designPaper.getTarget().offset().top, c.a.instance.movingDistance)
|
|
10534
10534
|
))));
|
|
10535
10535
|
}).on("mouseup", function(i) {
|
|
10536
|
-
s.a.instance.rectDraging &&
|
|
10537
|
-
E.a.event.trigger("hiprintTemplateMouseUp_" +
|
|
10536
|
+
s.a.instance.rectDraging && t.mouseRect && x(".mouseRect").length && (x(".mouseRect").height() > 10 || x(".mouseRect").width() > 10) && setTimeout(function() {
|
|
10537
|
+
E.a.event.trigger("hiprintTemplateMouseUp_" + t.templateId);
|
|
10538
10538
|
}, 300), s.a.instance.rectDraging = !1;
|
|
10539
10539
|
}).on("click", function(i) {
|
|
10540
10540
|
setTimeout(function() {
|
|
10541
|
-
E.a.event.trigger("hiprintTemplateMouseUp_" +
|
|
10541
|
+
E.a.event.trigger("hiprintTemplateMouseUp_" + t.templateId);
|
|
10542
10542
|
}, 300);
|
|
10543
10543
|
});
|
|
10544
|
-
}, y.prototype.getElementInRect = function(
|
|
10544
|
+
}, y.prototype.getElementInRect = function(t) {
|
|
10545
10545
|
var i = [];
|
|
10546
10546
|
return this.printElements.filter(function(p) {
|
|
10547
10547
|
return p.options.draggable !== !1;
|
|
10548
10548
|
}).forEach(function(p) {
|
|
10549
|
-
p.inRect(
|
|
10549
|
+
p.inRect(t) && i.push(p);
|
|
10550
10550
|
}), i;
|
|
10551
|
-
}, y.prototype.updateRectPanel = function(
|
|
10551
|
+
}, y.prototype.updateRectPanel = function(t) {
|
|
10552
10552
|
var i = this, p = this.designPaper.getTarget(), f = this.designPaper.scale || 1;
|
|
10553
10553
|
if (this.mouseRect.target || (this.mouseRect.target = x(
|
|
10554
10554
|
'<div tabindex="1" class="mouseRect" style="z-index:2;position: absolute;opacity:0.2;border: 1px dashed #000;background-color:#31676f;"><span></span></div>'
|
|
@@ -10571,39 +10571,39 @@ var At = function(q) {
|
|
|
10571
10571
|
onStopDrag: function(O) {
|
|
10572
10572
|
s.a.instance.changed && E.a.event.trigger("hiprintTemplateDataChanged_" + p.templateId, "\u6846\u9009\u79FB\u52A8"), s.a.instance.draging = !1, s.a.instance.changed = !1;
|
|
10573
10573
|
}
|
|
10574
|
-
}), this.mouseRect.target.hicontextMenu(i.getContextMenuList())),
|
|
10574
|
+
}), this.mouseRect.target.hicontextMenu(i.getContextMenuList())), t.ex >= t.bx && t.ey >= t.by)
|
|
10575
10575
|
this.mouseRect.target.css({
|
|
10576
|
-
height:
|
|
10577
|
-
width:
|
|
10578
|
-
left:
|
|
10579
|
-
top:
|
|
10576
|
+
height: t.maxY - t.minY + "px",
|
|
10577
|
+
width: t.maxX - t.minX + "px",
|
|
10578
|
+
left: t.lastLeft / f + "pt",
|
|
10579
|
+
top: t.lastTop / f + "pt",
|
|
10580
10580
|
transform: "unset"
|
|
10581
10581
|
});
|
|
10582
|
-
else if (
|
|
10582
|
+
else if (t.ex < t.bx && t.ey < t.by)
|
|
10583
10583
|
this.mouseRect.target.css({
|
|
10584
|
-
height:
|
|
10585
|
-
width:
|
|
10586
|
-
left:
|
|
10587
|
-
top:
|
|
10584
|
+
height: t.maxY - t.minY + "px",
|
|
10585
|
+
width: t.maxX - t.minX + "px",
|
|
10586
|
+
left: t.lastLeft / f + "pt",
|
|
10587
|
+
top: t.lastTop / f + "pt",
|
|
10588
10588
|
transform: "rotate(180deg)",
|
|
10589
10589
|
"transform-origin": "0 0"
|
|
10590
10590
|
});
|
|
10591
10591
|
else {
|
|
10592
10592
|
var U = "", k = "rotate(180deg)";
|
|
10593
|
-
|
|
10594
|
-
height:
|
|
10595
|
-
width:
|
|
10596
|
-
left:
|
|
10597
|
-
top:
|
|
10593
|
+
t.startX == t.minX || t.startX == t.maxX ? t.ey >= t.by ? (k = "scaleX(-1)", U = "left") : U = "center top" : (t.startY == t.minY || t.startY == t.maxY) && (U = t.ex >= t.bx ? "right" : "left"), this.mouseRect.target.css({
|
|
10594
|
+
height: t.maxY - t.minY + "px",
|
|
10595
|
+
width: t.maxX - t.minX + "px",
|
|
10596
|
+
left: t.lastLeft / f + "pt",
|
|
10597
|
+
top: t.lastTop / f + "pt",
|
|
10598
10598
|
transform: k,
|
|
10599
10599
|
"transform-origin": U
|
|
10600
10600
|
});
|
|
10601
10601
|
}
|
|
10602
|
-
|
|
10602
|
+
t.target.focus();
|
|
10603
10603
|
}, y.prototype.getContextMenuList = function() {
|
|
10604
|
-
var
|
|
10604
|
+
var t = this, i = s.a.instance.getPrintTemplateById(this.templateId);
|
|
10605
10605
|
return {
|
|
10606
|
-
panel:
|
|
10606
|
+
panel: t,
|
|
10607
10607
|
menus: [
|
|
10608
10608
|
{
|
|
10609
10609
|
text: "\u590D\u5236",
|
|
@@ -10612,7 +10612,7 @@ var At = function(q) {
|
|
|
10612
10612
|
enabled: !0,
|
|
10613
10613
|
disable: !1,
|
|
10614
10614
|
callback: function() {
|
|
10615
|
-
|
|
10615
|
+
t.copyJson();
|
|
10616
10616
|
}
|
|
10617
10617
|
},
|
|
10618
10618
|
{
|
|
@@ -10622,7 +10622,7 @@ var At = function(q) {
|
|
|
10622
10622
|
enabled: !0,
|
|
10623
10623
|
disable: !1,
|
|
10624
10624
|
callback: function() {
|
|
10625
|
-
|
|
10625
|
+
t.copyJson(), t.pasteJson();
|
|
10626
10626
|
}
|
|
10627
10627
|
},
|
|
10628
10628
|
{
|
|
@@ -10632,7 +10632,7 @@ var At = function(q) {
|
|
|
10632
10632
|
enabled: !0,
|
|
10633
10633
|
disable: !1,
|
|
10634
10634
|
callback: function() {
|
|
10635
|
-
|
|
10635
|
+
t.cutJson();
|
|
10636
10636
|
}
|
|
10637
10637
|
},
|
|
10638
10638
|
{
|
|
@@ -10643,14 +10643,14 @@ var At = function(q) {
|
|
|
10643
10643
|
borderBottom: !0,
|
|
10644
10644
|
disable: !1,
|
|
10645
10645
|
callback: function() {
|
|
10646
|
-
|
|
10646
|
+
t.deletePrintElement(g);
|
|
10647
10647
|
}
|
|
10648
10648
|
},
|
|
10649
10649
|
{
|
|
10650
10650
|
text: "\u5DE6\u5BF9\u9F50",
|
|
10651
10651
|
icon: "sv-left",
|
|
10652
10652
|
enabled: function() {
|
|
10653
|
-
return
|
|
10653
|
+
return t.getSelectEls().length > 1;
|
|
10654
10654
|
},
|
|
10655
10655
|
disable: !1,
|
|
10656
10656
|
callback: function() {
|
|
@@ -10661,7 +10661,7 @@ var At = function(q) {
|
|
|
10661
10661
|
text: "\u6C34\u5E73\u5C45\u4E2D",
|
|
10662
10662
|
icon: "sv-vertical",
|
|
10663
10663
|
enabled: function() {
|
|
10664
|
-
return
|
|
10664
|
+
return t.getSelectEls().length > 1;
|
|
10665
10665
|
},
|
|
10666
10666
|
disable: !1,
|
|
10667
10667
|
callback: function() {
|
|
@@ -10672,7 +10672,7 @@ var At = function(q) {
|
|
|
10672
10672
|
text: "\u53F3\u5BF9\u9F50",
|
|
10673
10673
|
icon: "sv-right",
|
|
10674
10674
|
enabled: function() {
|
|
10675
|
-
return
|
|
10675
|
+
return t.getSelectEls().length > 1;
|
|
10676
10676
|
},
|
|
10677
10677
|
disable: !1,
|
|
10678
10678
|
callback: function() {
|
|
@@ -10683,7 +10683,7 @@ var At = function(q) {
|
|
|
10683
10683
|
text: "\u9876\u90E8\u5BF9\u9F50",
|
|
10684
10684
|
icon: "sv-top",
|
|
10685
10685
|
enabled: function() {
|
|
10686
|
-
return
|
|
10686
|
+
return t.getSelectEls().length > 1;
|
|
10687
10687
|
},
|
|
10688
10688
|
disable: !1,
|
|
10689
10689
|
callback: function() {
|
|
@@ -10694,7 +10694,7 @@ var At = function(q) {
|
|
|
10694
10694
|
text: "\u5782\u76F4\u5C45\u4E2D",
|
|
10695
10695
|
icon: "sv-horizontal",
|
|
10696
10696
|
enabled: function() {
|
|
10697
|
-
return
|
|
10697
|
+
return t.getSelectEls().length > 1;
|
|
10698
10698
|
},
|
|
10699
10699
|
disable: !1,
|
|
10700
10700
|
callback: function() {
|
|
@@ -10705,7 +10705,7 @@ var At = function(q) {
|
|
|
10705
10705
|
text: "\u5E95\u90E8\u5BF9\u9F50",
|
|
10706
10706
|
icon: "sv-bottom",
|
|
10707
10707
|
enabled: function() {
|
|
10708
|
-
return
|
|
10708
|
+
return t.getSelectEls().length > 1;
|
|
10709
10709
|
},
|
|
10710
10710
|
disable: !1,
|
|
10711
10711
|
borderBottom: !0,
|
|
@@ -10718,11 +10718,11 @@ var At = function(q) {
|
|
|
10718
10718
|
icon: "sv-sync-width",
|
|
10719
10719
|
desc: "\u53D6\u9996\u9009\u5143\u7D20\u7684\u5BBD",
|
|
10720
10720
|
enabled: function() {
|
|
10721
|
-
return
|
|
10721
|
+
return t.getSelectEls().length > 1;
|
|
10722
10722
|
},
|
|
10723
10723
|
disable: !1,
|
|
10724
10724
|
callback: function() {
|
|
10725
|
-
var f =
|
|
10725
|
+
var f = t.getSelectEls(), U = f[0].options.width;
|
|
10726
10726
|
f.forEach((k) => {
|
|
10727
10727
|
k.updateOption("widthHeight", { width: U }, !1);
|
|
10728
10728
|
});
|
|
@@ -10733,12 +10733,12 @@ var At = function(q) {
|
|
|
10733
10733
|
icon: "sv-sync-height",
|
|
10734
10734
|
desc: "\u53D6\u9996\u9009\u5143\u7D20\u7684\u9AD8",
|
|
10735
10735
|
enabled: function() {
|
|
10736
|
-
return
|
|
10736
|
+
return t.getSelectEls().length > 1;
|
|
10737
10737
|
},
|
|
10738
10738
|
disable: !1,
|
|
10739
10739
|
borderBottom: !0,
|
|
10740
10740
|
callback: function() {
|
|
10741
|
-
var f =
|
|
10741
|
+
var f = t.getSelectEls(), U = f[0].options.height;
|
|
10742
10742
|
f.forEach((k) => {
|
|
10743
10743
|
k.updateOption("widthHeight", { height: U }, !1);
|
|
10744
10744
|
});
|
|
@@ -10748,7 +10748,7 @@ var At = function(q) {
|
|
|
10748
10748
|
text: "\u79FB\u81F3\u9876\u5C42",
|
|
10749
10749
|
icon: "sv-zIndex-top",
|
|
10750
10750
|
enabled: function() {
|
|
10751
|
-
return
|
|
10751
|
+
return t.getSelectEls().length <= 1;
|
|
10752
10752
|
},
|
|
10753
10753
|
disable: !1,
|
|
10754
10754
|
callback: function() {
|
|
@@ -10759,7 +10759,7 @@ var At = function(q) {
|
|
|
10759
10759
|
text: "\u4E0A\u79FB\u4E00\u5C42",
|
|
10760
10760
|
icon: "sv-zIndex-plus",
|
|
10761
10761
|
enabled: function() {
|
|
10762
|
-
return
|
|
10762
|
+
return t.getSelectEls().length <= 1;
|
|
10763
10763
|
},
|
|
10764
10764
|
disable: !1,
|
|
10765
10765
|
callback: function() {
|
|
@@ -10771,7 +10771,7 @@ var At = function(q) {
|
|
|
10771
10771
|
text: "\u4E0B\u79FB\u4E00\u5C42",
|
|
10772
10772
|
icon: "sv-zIndex-minus",
|
|
10773
10773
|
enabled: function() {
|
|
10774
|
-
return
|
|
10774
|
+
return t.getSelectEls().length <= 1;
|
|
10775
10775
|
},
|
|
10776
10776
|
disable: !1,
|
|
10777
10777
|
callback: function() {
|
|
@@ -10783,7 +10783,7 @@ var At = function(q) {
|
|
|
10783
10783
|
text: "\u79FB\u81F3\u5E95\u5C42",
|
|
10784
10784
|
icon: "sv-zIndex-bottom",
|
|
10785
10785
|
enabled: function() {
|
|
10786
|
-
return
|
|
10786
|
+
return t.getSelectEls().length <= 1;
|
|
10787
10787
|
},
|
|
10788
10788
|
borderBottom: !0,
|
|
10789
10789
|
disable: !1,
|
|
@@ -10796,7 +10796,7 @@ var At = function(q) {
|
|
|
10796
10796
|
icon: "sv-more",
|
|
10797
10797
|
borderBottom: !0,
|
|
10798
10798
|
enabled: function() {
|
|
10799
|
-
return
|
|
10799
|
+
return t.getSelectEls().length <= 1;
|
|
10800
10800
|
},
|
|
10801
10801
|
menus: [
|
|
10802
10802
|
{
|
|
@@ -10846,9 +10846,9 @@ var At = function(q) {
|
|
|
10846
10846
|
}
|
|
10847
10847
|
]
|
|
10848
10848
|
};
|
|
10849
|
-
}, y.prototype.bingKeyboardMoveEvent = function(
|
|
10849
|
+
}, y.prototype.bingKeyboardMoveEvent = function(t) {
|
|
10850
10850
|
var i = this;
|
|
10851
|
-
|
|
10851
|
+
t.attr("tabindex", "1"), t.keydown(function(p) {
|
|
10852
10852
|
i.mouseRect.mouseRectSelectedElement || (i.mouseRect.mouseRectSelectedElement = i.getElementInRect(i.mouseRect));
|
|
10853
10853
|
var f = i.mouseRect.mouseRectSelectedElement || [];
|
|
10854
10854
|
switch (p.keyCode) {
|
|
@@ -10886,17 +10886,17 @@ var At = function(q) {
|
|
|
10886
10886
|
if (y)
|
|
10887
10887
|
if (y.panels) {
|
|
10888
10888
|
this.panels = [];
|
|
10889
|
-
for (var
|
|
10890
|
-
this.panels.push(new st(y.panels[
|
|
10889
|
+
for (var t = 0; t < y.panels.length; t++)
|
|
10890
|
+
this.panels.push(new st(y.panels[t]));
|
|
10891
10891
|
} else
|
|
10892
10892
|
this.panels = [];
|
|
10893
10893
|
};
|
|
10894
10894
|
}(), bt = g(9), dt = function() {
|
|
10895
|
-
function y(
|
|
10895
|
+
function y(t, i) {
|
|
10896
10896
|
var p = this;
|
|
10897
|
-
this.printElementOptionSettingPanel = {}, this.printTemplate =
|
|
10897
|
+
this.printElementOptionSettingPanel = {}, this.printTemplate = t, this.settingContainer = x(i), E.a.event.on(t.getPrintElementSelectEventKey(), function(f) {
|
|
10898
10898
|
p.buildSetting(f);
|
|
10899
|
-
}), E.a.event.on(
|
|
10899
|
+
}), E.a.event.on(t.getBuildCustomOptionSettingEventKey(), function(f) {
|
|
10900
10900
|
p.buildSettingByCustomOptions(f);
|
|
10901
10901
|
}), E.a.event.on("clearSettingContainer", function() {
|
|
10902
10902
|
p.clearSettingContainer();
|
|
@@ -10906,15 +10906,15 @@ var At = function(q) {
|
|
|
10906
10906
|
}, y.prototype.clearSettingContainer = function() {
|
|
10907
10907
|
this.clearLastPrintElement(), this.settingContainer.html("");
|
|
10908
10908
|
}, y.prototype.clearLastPrintElement = function() {
|
|
10909
|
-
this.lastPrintElement && (this.lastPrintElement._editing && this.lastPrintElement.updateByContent(!0), this.lastPrintElement._printElementOptionTabs && this.lastPrintElement._printElementOptionTabs.forEach(function(
|
|
10910
|
-
|
|
10909
|
+
this.lastPrintElement && (this.lastPrintElement._editing && this.lastPrintElement.updateByContent(!0), this.lastPrintElement._printElementOptionTabs && this.lastPrintElement._printElementOptionTabs.forEach(function(t) {
|
|
10910
|
+
t.list && t.list.forEach(function(i) {
|
|
10911
10911
|
i.destroy();
|
|
10912
10912
|
});
|
|
10913
|
-
}), this.lastPrintElement._printElementOptionItems && this.lastPrintElement._printElementOptionItems.forEach(function(
|
|
10914
|
-
|
|
10913
|
+
}), this.lastPrintElement._printElementOptionItems && this.lastPrintElement._printElementOptionItems.forEach(function(t) {
|
|
10914
|
+
t.destroy();
|
|
10915
10915
|
})), this.lastPrintElement = void 0;
|
|
10916
|
-
}, y.prototype.buildSetting = function(
|
|
10917
|
-
var i = this, p = this, f =
|
|
10916
|
+
}, y.prototype.buildSetting = function(t) {
|
|
10917
|
+
var i = this, p = this, f = t.printElement, U = t.customOptionsInput, k = f.getPrintElementOptionTabs();
|
|
10918
10918
|
i.clearSettingContainer();
|
|
10919
10919
|
var G;
|
|
10920
10920
|
k.length ? (G = x('<div class="prop-tabs"><ul class="prop-tab-items"></ul></div>'), k.forEach(function(tt) {
|
|
@@ -10989,7 +10989,7 @@ var At = function(q) {
|
|
|
10989
10989
|
rt && (rt(X), f.submitOption());
|
|
10990
10990
|
}, i.buildSettingByCustomOptions(tt, i.settingContainer);
|
|
10991
10991
|
}), this.lastPrintElement = f;
|
|
10992
|
-
}, y.prototype.buildSettingByCustomOptions = function(
|
|
10992
|
+
}, y.prototype.buildSettingByCustomOptions = function(t, i) {
|
|
10993
10993
|
var p = this;
|
|
10994
10994
|
this.clearLastPrintElement();
|
|
10995
10995
|
var f = i || this.settingContainer;
|
|
@@ -10999,44 +10999,44 @@ var At = function(q) {
|
|
|
10999
10999
|
}).map(function(it) {
|
|
11000
11000
|
return it.name;
|
|
11001
11001
|
});
|
|
11002
|
-
|
|
11002
|
+
t.optionItems ? U = t.optionItems : Object.keys(t.options).filter(function(it) {
|
|
11003
11003
|
return k.includes(it);
|
|
11004
11004
|
}).forEach(function(it) {
|
|
11005
11005
|
var K = bt.a.getItem(it);
|
|
11006
11006
|
K && U.push(K);
|
|
11007
11007
|
});
|
|
11008
11008
|
var G = x('<div class="hiprint-option-items"></div>');
|
|
11009
|
-
|
|
11009
|
+
t.title && G.append(
|
|
11010
11010
|
`<div class="hiprint-option-item hiprint-option-item-row">
|
|
11011
11011
|
<div class="hiprint-option-item-label hiprint-option-title">
|
|
11012
|
-
` +
|
|
11012
|
+
` + t.title + `
|
|
11013
11013
|
</div>
|
|
11014
11014
|
</div>`
|
|
11015
11015
|
), U.forEach(function(it) {
|
|
11016
11016
|
it.submit = function(K) {
|
|
11017
|
-
|
|
11018
|
-
}, G.append(it.createTarget(p.printTemplate,
|
|
11017
|
+
t.callback(p.getValueByOptionItems(U));
|
|
11018
|
+
}, G.append(it.createTarget(p.printTemplate, t.options, void 0)), it.setValue(t.options[it.name], t.options, void 0);
|
|
11019
11019
|
});
|
|
11020
11020
|
var O = x(`<button class="hiprint-option-item-settingBtn hiprint-option-item-submitBtn"
|
|
11021
11021
|
type="button">\u786E\u5B9A</button>`);
|
|
11022
11022
|
G.append(O), O.bind("click.submitOption", function() {
|
|
11023
|
-
|
|
11023
|
+
t.callback(p.getValueByOptionItems(U));
|
|
11024
11024
|
}), G.find(".auto-submit").change(function(it) {
|
|
11025
|
-
|
|
11025
|
+
t.callback(p.getValueByOptionItems(U));
|
|
11026
11026
|
}), G.find(".auto-submit:input").bind("keydown.submitOption", function(it) {
|
|
11027
|
-
it.keyCode == 13 &&
|
|
11027
|
+
it.keyCode == 13 && t.callback(p.getValueByOptionItems(U));
|
|
11028
11028
|
}), f.append(G);
|
|
11029
|
-
}, y.prototype.getValueByOptionItems = function(
|
|
11029
|
+
}, y.prototype.getValueByOptionItems = function(t) {
|
|
11030
11030
|
var i = {};
|
|
11031
|
-
return
|
|
11031
|
+
return t.forEach(function(p) {
|
|
11032
11032
|
i[p.name] = p.getValue();
|
|
11033
11033
|
}), i;
|
|
11034
11034
|
}, y;
|
|
11035
11035
|
}(), lt = function() {
|
|
11036
|
-
function y(
|
|
11037
|
-
this.paginationContainer =
|
|
11036
|
+
function y(t, i) {
|
|
11037
|
+
this.paginationContainer = t, this.jqPaginationContainer = x(this.paginationContainer), this.template = i;
|
|
11038
11038
|
}
|
|
11039
|
-
return y.prototype.buildPagination = function(
|
|
11039
|
+
return y.prototype.buildPagination = function(t) {
|
|
11040
11040
|
var i = this.template.getPaneltotal(), p = this;
|
|
11041
11041
|
this.jqPaginationContainer.html("");
|
|
11042
11042
|
for (var f = x('<ul class="hiprint-pagination"></ul>'), U = function() {
|
|
@@ -11062,73 +11062,77 @@ var At = function(q) {
|
|
|
11062
11062
|
} else
|
|
11063
11063
|
O();
|
|
11064
11064
|
});
|
|
11065
|
-
}, y.prototype.selectPanel = function(
|
|
11066
|
-
var i =
|
|
11065
|
+
}, y.prototype.selectPanel = function(t) {
|
|
11066
|
+
var i = t || this.template.editingPanel.index, p = x(".hiprint-pagination li:nth(" + i + ")");
|
|
11067
11067
|
p.length && (p.siblings().removeClass("selected"), p.addClass("selected"));
|
|
11068
11068
|
}, y;
|
|
11069
11069
|
}(), vt = function() {
|
|
11070
|
-
function y(
|
|
11070
|
+
function y(t) {
|
|
11071
11071
|
var i = this;
|
|
11072
11072
|
this.tempimageBase64 = {}, this.id = s.a.instance.guid(), s.a.instance.setPrintTemplateById(this.id, this);
|
|
11073
|
-
var p =
|
|
11073
|
+
var p = t || {};
|
|
11074
11074
|
this.printPanels = [], this.dataMode = p.dataMode || 1, this.history = p.history != null ? p.history : !0, this.onFunctionClick = p.onFunctionClick, this.onDataChanged = p.onDataChanged, this.onUpdateError = p.onUpdateError, this.lastJson = p.template || {}, this.historyList = [{ id: s.a.instance.guid(), type: "\u521D\u59CB", json: this.lastJson }], this.historyPos = 0, this.defaultPanelName = p.defaultPanelName, this.designOptions = {};
|
|
11075
11075
|
var f = new ut(p.template || []);
|
|
11076
11076
|
p.template && f.panels.forEach(function(U) {
|
|
11077
11077
|
i.printPanels.push(new mt(U, i.id));
|
|
11078
11078
|
}), p.fontList && (this.fontList = p.fontList), p.fields && (this.fields = p.fields), p.onImageChooseClick && (this.onImageChooseClick = p.onImageChooseClick), p.onPanelAddClick && (this.onPanelAddClick = p.onPanelAddClick), p.settingContainer && new dt(this, p.settingContainer), p.paginationContainer && (this.printPaginationCreator = new lt(p.paginationContainer, this), this.printPaginationCreator.buildPagination()), this.initAutoSave();
|
|
11079
11079
|
}
|
|
11080
|
-
return y.prototype.design = function(
|
|
11080
|
+
return y.prototype.design = function(t, i) {
|
|
11081
11081
|
var p = this;
|
|
11082
11082
|
if (i || (i = {}), this.printPanels.length == 0) {
|
|
11083
11083
|
var f = this.createDefaultPanel();
|
|
11084
11084
|
this.printPanels.push(f);
|
|
11085
11085
|
}
|
|
11086
|
-
if (!
|
|
11086
|
+
if (!t)
|
|
11087
11087
|
throw new Error("options.container can not be empty");
|
|
11088
|
-
p.designOptions = i, this.createContainer(
|
|
11088
|
+
p.designOptions = i, this.createContainer(t), this.printPanels.forEach(function(U, k) {
|
|
11089
11089
|
p.container.append(U.getTarget()), k > 0 && U.disable(), U.design(i);
|
|
11090
11090
|
}), this.selectPanel(0);
|
|
11091
|
-
}, y.prototype.getSimpleHtml = function(
|
|
11091
|
+
}, y.prototype.getSimpleHtml = function(t, i) {
|
|
11092
11092
|
var p = this;
|
|
11093
11093
|
i || (i = {});
|
|
11094
|
-
var f =
|
|
11095
|
-
|
|
11094
|
+
var f = x('<div class="hiprint-printTemplate"></div>');
|
|
11095
|
+
if (p.editingPanel) {
|
|
11096
|
+
var U = "height:" + p.editingPanel.height + "mm;", k = "width:" + p.editingPanel.width + "mm;";
|
|
11097
|
+
f = x('<div class="hiprint-printTemplate" style="' + U + k + '"></div>');
|
|
11098
|
+
}
|
|
11099
|
+
return t && t.constructor === Array ? t.forEach(function(G) {
|
|
11096
11100
|
G && p.printPanels.forEach(function(O, it) {
|
|
11097
|
-
|
|
11101
|
+
f.append(O.getHtml(G, i));
|
|
11098
11102
|
});
|
|
11099
11103
|
}) : this.printPanels.forEach(function(G, O) {
|
|
11100
|
-
|
|
11101
|
-
}), i && i.imgToBase64 && this.transformImg(
|
|
11102
|
-
}, y.prototype.getHtml = function(
|
|
11103
|
-
return
|
|
11104
|
-
}, y.prototype.getJointHtml = function(
|
|
11104
|
+
f.append(G.getHtml(t, i));
|
|
11105
|
+
}), i && i.imgToBase64 && this.transformImg(f.find("img")), f;
|
|
11106
|
+
}, y.prototype.getHtml = function(t, i) {
|
|
11107
|
+
return t || (t = {}), this.getSimpleHtml(t, i);
|
|
11108
|
+
}, y.prototype.getJointHtml = function(t, i, p) {
|
|
11105
11109
|
var f = x('<div class="hiprint-printTemplate"></div>'), U = [];
|
|
11106
11110
|
return this.printPanels.forEach(function(k, G) {
|
|
11107
|
-
f.append(k.getHtml(
|
|
11111
|
+
f.append(k.getHtml(t, i, U, void 0, p));
|
|
11108
11112
|
}), f;
|
|
11109
|
-
}, y.prototype.setPaper = function(
|
|
11110
|
-
if (/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(
|
|
11111
|
-
this.editingPanel.resize(void 0, parseFloat(
|
|
11113
|
+
}, y.prototype.setPaper = function(t, i) {
|
|
11114
|
+
if (/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(t))
|
|
11115
|
+
this.editingPanel.resize(void 0, parseFloat(t), parseFloat(i), !1);
|
|
11112
11116
|
else {
|
|
11113
|
-
var p = s.a.instance[
|
|
11117
|
+
var p = s.a.instance[t];
|
|
11114
11118
|
if (!p)
|
|
11115
|
-
throw new Error("not found pagetype:" + (
|
|
11116
|
-
this.editingPanel.resize(
|
|
11119
|
+
throw new Error("not found pagetype:" + (t || ""));
|
|
11120
|
+
this.editingPanel.resize(t, p.width, p.height, !1);
|
|
11117
11121
|
}
|
|
11118
11122
|
}, y.prototype.rotatePaper = function() {
|
|
11119
11123
|
this.editingPanel.rotatePaper();
|
|
11120
|
-
}, y.prototype.zoom = function(
|
|
11121
|
-
this.editingPanel.zoom(
|
|
11122
|
-
}, y.prototype.addPrintPanel = function(
|
|
11123
|
-
var p =
|
|
11124
|
-
return
|
|
11125
|
-
}, y.prototype.selectPanel = function(
|
|
11124
|
+
}, y.prototype.zoom = function(t, i) {
|
|
11125
|
+
this.editingPanel.zoom(t, i);
|
|
11126
|
+
}, y.prototype.addPrintPanel = function(t, i) {
|
|
11127
|
+
var p = t ? new mt(new st(t), this.id) : this.createDefaultPanel();
|
|
11128
|
+
return t && (t.index = this.printPanels.length), i && (this.container.append(p.getTarget()), p.design(this.designOptions)), this.printPanels.push(p), i && this.selectPanel(p.index), p;
|
|
11129
|
+
}, y.prototype.selectPanel = function(t) {
|
|
11126
11130
|
var i = this;
|
|
11127
|
-
|
|
11128
|
-
|
|
11131
|
+
t > i.printPanels.length - 1 && (t = i.printPanels.length - 1), this.printPanels.forEach(function(p, f) {
|
|
11132
|
+
t == f ? (p.enable(), i.editingPanel = p, i.printPaginationCreator && i.printPaginationCreator.selectPanel(t)) : p.disable();
|
|
11129
11133
|
});
|
|
11130
|
-
}, y.prototype.deletePanel = function(
|
|
11131
|
-
this.printPanels[
|
|
11134
|
+
}, y.prototype.deletePanel = function(t) {
|
|
11135
|
+
this.printPanels[t].clear(), this.printPanels[t].getTarget().remove(), this.printPanels.splice(t, 1);
|
|
11132
11136
|
}, y.prototype.getPaneltotal = function() {
|
|
11133
11137
|
return this.printPanels.length;
|
|
11134
11138
|
}, y.prototype.createDefaultPanel = function() {
|
|
@@ -11140,47 +11144,47 @@ var At = function(q) {
|
|
|
11140
11144
|
}),
|
|
11141
11145
|
this.id
|
|
11142
11146
|
);
|
|
11143
|
-
}, y.prototype.createContainer = function(
|
|
11144
|
-
|
|
11147
|
+
}, y.prototype.createContainer = function(t) {
|
|
11148
|
+
t ? (this.container = x(t), this.container.addClass("hiprint-printTemplate")) : this.container = x('<div class="hiprint-printTemplate"></div>');
|
|
11145
11149
|
}, y.prototype.getJsonTid = function() {
|
|
11146
|
-
var
|
|
11150
|
+
var t = [];
|
|
11147
11151
|
return this.printPanels.forEach(function(i) {
|
|
11148
|
-
i.getPanelEntity().printElements.length &&
|
|
11152
|
+
i.getPanelEntity().printElements.length && t.push(i.getPanelEntity());
|
|
11149
11153
|
}), new ut({
|
|
11150
|
-
panels:
|
|
11154
|
+
panels: t
|
|
11151
11155
|
});
|
|
11152
11156
|
}, y.prototype.getJson = function() {
|
|
11153
|
-
var
|
|
11157
|
+
var t = [];
|
|
11154
11158
|
return this.printPanels.forEach(function(i) {
|
|
11155
|
-
|
|
11159
|
+
t.push(i.getPanelEntity(!0));
|
|
11156
11160
|
}), new ut({
|
|
11157
|
-
panels:
|
|
11161
|
+
panels: t
|
|
11158
11162
|
});
|
|
11159
|
-
}, y.prototype.undo = function(
|
|
11163
|
+
}, y.prototype.undo = function(t) {
|
|
11160
11164
|
E.a.event.trigger("hiprintTemplateDataShortcutKey_" + this.id, "undo");
|
|
11161
|
-
}, y.prototype.redo = function(
|
|
11165
|
+
}, y.prototype.redo = function(t) {
|
|
11162
11166
|
E.a.event.trigger("hiprintTemplateDataShortcutKey_" + this.id, "redo");
|
|
11163
11167
|
}, y.prototype.getPrintElementSelectEventKey = function() {
|
|
11164
11168
|
return "PrintElementSelectEventKey_" + this.id;
|
|
11165
11169
|
}, y.prototype.getBuildCustomOptionSettingEventKey = function() {
|
|
11166
11170
|
return "BuildCustomOptionSettingEventKey_" + this.id;
|
|
11167
11171
|
}, y.prototype.clear = function() {
|
|
11168
|
-
this.printPanels.forEach(function(
|
|
11169
|
-
if (
|
|
11170
|
-
var i =
|
|
11172
|
+
this.printPanels.forEach(function(t) {
|
|
11173
|
+
if (t.clear(), t.index > 0) {
|
|
11174
|
+
var i = t.getTarget();
|
|
11171
11175
|
i && i.length && i.remove();
|
|
11172
11176
|
}
|
|
11173
11177
|
}), this.printPanels = [this.printPanels[0]], this.printPaginationCreator && this.printPaginationCreator.buildPagination();
|
|
11174
|
-
}, y.prototype.getPaperType = function(
|
|
11178
|
+
}, y.prototype.getPaperType = function(t) {
|
|
11175
11179
|
return this.printPanels[0].paperType;
|
|
11176
|
-
}, y.prototype.getOrient = function(
|
|
11177
|
-
return
|
|
11178
|
-
}, y.prototype.getPrintStyle = function(
|
|
11179
|
-
return this.printPanels[
|
|
11180
|
-
}, y.prototype.print = function(
|
|
11180
|
+
}, y.prototype.getOrient = function(t) {
|
|
11181
|
+
return t == null && (t = 0), this.printPanels[t].height > this.printPanels[t].width ? 1 : 2;
|
|
11182
|
+
}, y.prototype.getPrintStyle = function(t) {
|
|
11183
|
+
return this.printPanels[t].getPrintStyle();
|
|
11184
|
+
}, y.prototype.print = function(t, i, p) {
|
|
11181
11185
|
var f = this;
|
|
11182
|
-
|
|
11183
|
-
var U = this.getHtml(
|
|
11186
|
+
t || (t = {});
|
|
11187
|
+
var U = this.getHtml(t, i), k = c.a.instance.getHooks("beforePrint");
|
|
11184
11188
|
k && k.forEach((G) => {
|
|
11185
11189
|
var { template: O, info: it, opts: K } = G.run({
|
|
11186
11190
|
template: f,
|
|
@@ -11189,8 +11193,8 @@ var At = function(q) {
|
|
|
11189
11193
|
});
|
|
11190
11194
|
f = O != null ? O : f, U = it != null ? it : it, p = K != null ? K : p;
|
|
11191
11195
|
}), U.hiwprint(p);
|
|
11192
|
-
}, y.prototype.print2 = function(
|
|
11193
|
-
if (
|
|
11196
|
+
}, y.prototype.print2 = function(t, i) {
|
|
11197
|
+
if (t || (t = {}), i || (i = {}), this.clientIsOpened()) {
|
|
11194
11198
|
var p = this, f = 0, U = {}, k = x('link[media=print][href*="print-lock.css"]'), G = "";
|
|
11195
11199
|
if (i.styleHandler && (G += i.styleHandler()), k.length <= 0)
|
|
11196
11200
|
throw new Error('\u8BF7\u5728 \u5165\u53E3\u6587\u4EF6(index.html) \u4E2D\u5F15\u5165 print-lock.css. \u6CE8\u610F: link[media="print"]');
|
|
@@ -11200,43 +11204,43 @@ var At = function(q) {
|
|
|
11200
11204
|
if (K.readyState === 4 && K.status === 200 && (U[O + ""] = '<style rel="stylesheet" type="text/css">' + K.responseText + "</style>", ++f == k.length)) {
|
|
11201
11205
|
for (var tt = "", rt = 0; rt < k.length; rt++)
|
|
11202
11206
|
tt += U[rt + ""];
|
|
11203
|
-
G && (tt = G + tt), p.sentToClient(tt,
|
|
11207
|
+
G && (tt = G + tt), p.sentToClient(tt, t, i);
|
|
11204
11208
|
}
|
|
11205
11209
|
}, K.send();
|
|
11206
11210
|
});
|
|
11207
11211
|
} else
|
|
11208
11212
|
alert("\u8FDE\u63A5\u5BA2\u6237\u7AEF\u5931\u8D25");
|
|
11209
|
-
}, y.prototype.imageToBase64 = function(
|
|
11210
|
-
var i = x(
|
|
11213
|
+
}, y.prototype.imageToBase64 = function(t) {
|
|
11214
|
+
var i = x(t).attr("src");
|
|
11211
11215
|
if (i.indexOf("base64") == -1)
|
|
11212
11216
|
try {
|
|
11213
11217
|
if (!this.tempimageBase64[i]) {
|
|
11214
11218
|
var p = document.createElement("canvas"), f = new Image();
|
|
11215
|
-
f.src =
|
|
11219
|
+
f.src = t.attr("src"), p.width = f.width, p.height = f.height, p.getContext("2d").drawImage(f, 0, 0), i && (this.tempimageBase64[i] = p.toDataURL("image/png"));
|
|
11216
11220
|
}
|
|
11217
|
-
|
|
11221
|
+
t.attr("src", this.tempimageBase64[i]);
|
|
11218
11222
|
} catch {
|
|
11219
11223
|
try {
|
|
11220
|
-
this.xhrLoadImage(
|
|
11224
|
+
this.xhrLoadImage(t);
|
|
11221
11225
|
} catch (k) {
|
|
11222
11226
|
console.log(k);
|
|
11223
11227
|
}
|
|
11224
11228
|
}
|
|
11225
|
-
}, y.prototype.xhrLoadImage = function(
|
|
11226
|
-
}, y.prototype.sentToClient = function(
|
|
11229
|
+
}, y.prototype.xhrLoadImage = function(t) {
|
|
11230
|
+
}, y.prototype.sentToClient = function(t, i, p) {
|
|
11227
11231
|
i || (i = {});
|
|
11228
11232
|
var f = x.extend({}, p || {});
|
|
11229
11233
|
f.imgToBase64 = !0;
|
|
11230
|
-
var U =
|
|
11234
|
+
var U = t + this.getHtml(i, f)[0].outerHTML;
|
|
11231
11235
|
f.id = s.a.instance.guid(), f.html = U, f.templateId = this.id;
|
|
11232
11236
|
var k = this, G = c.a.instance.getHooks("beforePrint2");
|
|
11233
11237
|
G && G.forEach((O) => {
|
|
11234
11238
|
var { template: it, info: K } = O.run({ template: k, info: f });
|
|
11235
11239
|
k = it != null ? it : k, f = K != null ? K : f;
|
|
11236
11240
|
}), hiwebSocket.send(f);
|
|
11237
|
-
}, y.prototype.printByHtml = function(
|
|
11238
|
-
x(
|
|
11239
|
-
}, y.prototype.printByHtml2 = function(
|
|
11241
|
+
}, y.prototype.printByHtml = function(t) {
|
|
11242
|
+
x(t).hiwprint();
|
|
11243
|
+
}, y.prototype.printByHtml2 = function(t, i) {
|
|
11240
11244
|
if (i || (i = {}), this.clientIsOpened()) {
|
|
11241
11245
|
var p = this, f = 0, U = {}, k = x('link[media=print][href*="print-lock.css"]');
|
|
11242
11246
|
if (k.length <= 0)
|
|
@@ -11247,23 +11251,23 @@ var At = function(q) {
|
|
|
11247
11251
|
if (it.readyState === 4 && it.status === 200 && (U[G + ""] = '<style rel="stylesheet" type="text/css">' + it.responseText + "</style>", ++f == k.length)) {
|
|
11248
11252
|
for (var K = "", tt = 0; tt < k.length; tt++)
|
|
11249
11253
|
K += U[tt + ""];
|
|
11250
|
-
var rt = K + x(
|
|
11254
|
+
var rt = K + x(t)[0].outerHTML, X = x.extend({}, i || {});
|
|
11251
11255
|
X.id = s.a.instance.guid(), X.html = rt, X.templateId = p.id, hiwebSocket.send(X);
|
|
11252
11256
|
}
|
|
11253
11257
|
}, it.send();
|
|
11254
11258
|
});
|
|
11255
11259
|
} else
|
|
11256
11260
|
alert("\u8FDE\u63A5\u5BA2\u6237\u7AEF\u5931\u8D25");
|
|
11257
|
-
}, y.prototype.deletePrintElement = function(
|
|
11261
|
+
}, y.prototype.deletePrintElement = function(t) {
|
|
11258
11262
|
this.printPanels.forEach(function(i) {
|
|
11259
|
-
i.deletePrintElement(
|
|
11263
|
+
i.deletePrintElement(t);
|
|
11260
11264
|
});
|
|
11261
|
-
}, y.prototype.transformImg = function(
|
|
11265
|
+
}, y.prototype.transformImg = function(t) {
|
|
11262
11266
|
var i = this;
|
|
11263
|
-
|
|
11267
|
+
t.map(function(p, f) {
|
|
11264
11268
|
i.imageToBase64(x(f));
|
|
11265
11269
|
});
|
|
11266
|
-
}, y.prototype.toPdf = function(
|
|
11270
|
+
}, y.prototype.toPdf = function(t, i, p) {
|
|
11267
11271
|
var f = this, U = x.Deferred(), k = !0;
|
|
11268
11272
|
if (this.printPanels.length) {
|
|
11269
11273
|
var G = E.a.mm.toPt(this.printPanels[0].width), O = E.a.mm.toPt(this.printPanels[0].height), it = x.extend(
|
|
@@ -11279,7 +11283,7 @@ var At = function(q) {
|
|
|
11279
11283
|
orientation: this.getOrient(0) == 1 ? "portrait" : "landscape",
|
|
11280
11284
|
unit: "pt",
|
|
11281
11285
|
format: this.printPanels[0].paperType ? this.printPanels[0].paperType.toLocaleLowerCase() : [G, O]
|
|
11282
|
-
}), tt = this.getHtml(
|
|
11286
|
+
}), tt = this.getHtml(t, p);
|
|
11283
11287
|
p && p.isDownload != null && (k = p.isDownload), this.createTempContainer();
|
|
11284
11288
|
var rt = this.getTempContainer();
|
|
11285
11289
|
this.svg2canvas(tt), rt.html(tt[0]);
|
|
@@ -11305,70 +11309,70 @@ var At = function(q) {
|
|
|
11305
11309
|
x(".hiprint_temp_Container").remove();
|
|
11306
11310
|
}, y.prototype.getTempContainer = function() {
|
|
11307
11311
|
return x(".hiprint_temp_Container");
|
|
11308
|
-
}, y.prototype.svg2canvas = function(
|
|
11312
|
+
}, y.prototype.svg2canvas = function(t) {
|
|
11309
11313
|
var i = this;
|
|
11310
|
-
|
|
11314
|
+
t.find("svg").each(function(p, f) {
|
|
11311
11315
|
var U = f.parentNode, k = i.parentWidthHeight(U), G = document.createElement("canvas");
|
|
11312
11316
|
G.width = k.width, G.height = k.height;
|
|
11313
11317
|
var O = G.getContext("2d"), it = new XMLSerializer().serializeToString(f);
|
|
11314
11318
|
xe.fromString(O, it).render(), x(f).before(G), U.removeChild(f);
|
|
11315
11319
|
});
|
|
11316
|
-
}, y.prototype.parentWidthHeight = function(
|
|
11317
|
-
return
|
|
11318
|
-
width: E.a.pt.toPx(parseFloat(
|
|
11319
|
-
height: E.a.pt.toPx(parseFloat(
|
|
11320
|
+
}, y.prototype.parentWidthHeight = function(t) {
|
|
11321
|
+
return t.style.width.endsWith("%") || t.style.height.endsWith("%") ? t.className != "hiprint-printPaper-content" ? this.parentWidthHeight(t.parentNode) : { width: 10, height: 10 } : {
|
|
11322
|
+
width: E.a.pt.toPx(parseFloat(t.style.width)),
|
|
11323
|
+
height: E.a.pt.toPx(parseFloat(t.style.height))
|
|
11320
11324
|
};
|
|
11321
|
-
}, y.prototype.on = function(
|
|
11322
|
-
E.a.event.clear(
|
|
11325
|
+
}, y.prototype.on = function(t, i) {
|
|
11326
|
+
E.a.event.clear(t + "_" + this.id), E.a.event.on(t + "_" + this.id, i);
|
|
11323
11327
|
}, y.prototype.clientIsOpened = function() {
|
|
11324
11328
|
return hiwebSocket.opened;
|
|
11325
11329
|
}, y.prototype.getPrinterList = function() {
|
|
11326
|
-
var
|
|
11327
|
-
return
|
|
11328
|
-
}, y.prototype.getElementByTid = function(
|
|
11329
|
-
return i == null && (i = 0), this.printPanels[i].getElementByTid(
|
|
11330
|
-
}, y.prototype.getElementByName = function(
|
|
11331
|
-
return i == null && (i = 0), this.printPanels[i].getElementByName(
|
|
11332
|
-
}, y.prototype.getPanel = function(
|
|
11333
|
-
return
|
|
11334
|
-
}, y.prototype.loadAllImages = function(
|
|
11330
|
+
var t = hiwebSocket.getPrinterList();
|
|
11331
|
+
return t || [];
|
|
11332
|
+
}, y.prototype.getElementByTid = function(t, i) {
|
|
11333
|
+
return i == null && (i = 0), this.printPanels[i].getElementByTid(t);
|
|
11334
|
+
}, y.prototype.getElementByName = function(t, i) {
|
|
11335
|
+
return i == null && (i = 0), this.printPanels[i].getElementByName(t);
|
|
11336
|
+
}, y.prototype.getPanel = function(t) {
|
|
11337
|
+
return t == null && (t = 0), this.printPanels[t];
|
|
11338
|
+
}, y.prototype.loadAllImages = function(t, i, p) {
|
|
11335
11339
|
var f = this;
|
|
11336
11340
|
p == null && (p = 0);
|
|
11337
|
-
for (var U =
|
|
11341
|
+
for (var U = t[0].getElementsByTagName("img"), k = !0, G = 0; G < U.length; G++) {
|
|
11338
11342
|
var O = U[G];
|
|
11339
11343
|
O.src && O.src !== window.location.href && O.src.indexOf("base64") == -1 && (O && O.naturalWidth !== void 0 && O.naturalWidth !== 0 && O.complete || (k = !1));
|
|
11340
11344
|
}
|
|
11341
11345
|
p++, !k && p < 10 ? setTimeout(function() {
|
|
11342
|
-
f.loadAllImages(
|
|
11346
|
+
f.loadAllImages(t, i, p);
|
|
11343
11347
|
}, 500) : i();
|
|
11344
|
-
}, y.prototype.setFontList = function(
|
|
11345
|
-
this.fontList =
|
|
11348
|
+
}, y.prototype.setFontList = function(t) {
|
|
11349
|
+
this.fontList = t;
|
|
11346
11350
|
}, y.prototype.getFontList = function() {
|
|
11347
11351
|
return this.fontList;
|
|
11348
|
-
}, y.prototype.setFields = function(
|
|
11349
|
-
this.fields =
|
|
11352
|
+
}, y.prototype.setFields = function(t) {
|
|
11353
|
+
this.fields = t;
|
|
11350
11354
|
}, y.prototype.getFields = function() {
|
|
11351
11355
|
return this.fields;
|
|
11352
|
-
}, y.prototype.setOnImageChooseClick = function(
|
|
11353
|
-
this.onImageChooseClick =
|
|
11356
|
+
}, y.prototype.setOnImageChooseClick = function(t) {
|
|
11357
|
+
this.onImageChooseClick = t;
|
|
11354
11358
|
}, y.prototype.getOnImageChooseClick = function() {
|
|
11355
11359
|
return this.onImageChooseClick;
|
|
11356
11360
|
}, y.prototype.getFieldsInPanel = function() {
|
|
11357
|
-
var
|
|
11361
|
+
var t = [];
|
|
11358
11362
|
return this.printPanels.forEach(function(i) {
|
|
11359
|
-
|
|
11360
|
-
}),
|
|
11363
|
+
t = t.concat(i.getFieldsInPanel());
|
|
11364
|
+
}), t;
|
|
11361
11365
|
}, y.prototype.getTestData = function() {
|
|
11362
|
-
var
|
|
11366
|
+
var t = {};
|
|
11363
11367
|
return this.printPanels.forEach(function(i) {
|
|
11364
|
-
|
|
11365
|
-
}),
|
|
11366
|
-
}, y.prototype.update = function(
|
|
11368
|
+
t = Object.assign(t, i.getTestData());
|
|
11369
|
+
}), t;
|
|
11370
|
+
}, y.prototype.update = function(t, i) {
|
|
11367
11371
|
var p = this;
|
|
11368
11372
|
try {
|
|
11369
|
-
if (
|
|
11373
|
+
if (t && jt(t) == "object" && t.panels.length > 0) {
|
|
11370
11374
|
var f = p.printPanels.length - 1;
|
|
11371
|
-
|
|
11375
|
+
t.panels.forEach(function(U, k) {
|
|
11372
11376
|
if (k > f) {
|
|
11373
11377
|
p.printPanels.push(new mt(U, s.a.instance.guid()));
|
|
11374
11378
|
var G = p.printPanels[k];
|
|
@@ -11383,18 +11387,18 @@ var At = function(q) {
|
|
|
11383
11387
|
}
|
|
11384
11388
|
}, y.prototype.canPaste = function() {
|
|
11385
11389
|
return this.editingPanel.canPaste();
|
|
11386
|
-
}, y.prototype.copyJson = function(
|
|
11387
|
-
return this.editingPanel.copyJson(
|
|
11390
|
+
}, y.prototype.copyJson = function(t) {
|
|
11391
|
+
return this.editingPanel.copyJson(t);
|
|
11388
11392
|
}, y.prototype.cutJson = function() {
|
|
11389
11393
|
return this.editingPanel.cutJson();
|
|
11390
11394
|
}, y.prototype.getSelectEls = function() {
|
|
11391
11395
|
return this.editingPanel.getSelectEls();
|
|
11392
|
-
}, y.prototype.updateOption = function(
|
|
11396
|
+
}, y.prototype.updateOption = function(t, i) {
|
|
11393
11397
|
var p = this.getSelectEls();
|
|
11394
11398
|
p && p.length && (p.forEach(function(f) {
|
|
11395
|
-
f.updateOption(
|
|
11399
|
+
f.updateOption(t, i, !0);
|
|
11396
11400
|
}), E.a.event.trigger("hiprintTemplateDataChanged_" + this.id, "\u6279\u91CF\u4FEE\u6539"));
|
|
11397
|
-
}, y.prototype.setElsAlign = function(
|
|
11401
|
+
}, y.prototype.setElsAlign = function(t) {
|
|
11398
11402
|
var i = this.getSelectEls();
|
|
11399
11403
|
if (i.length) {
|
|
11400
11404
|
var p = Math.min.apply(
|
|
@@ -11418,7 +11422,7 @@ var At = function(q) {
|
|
|
11418
11422
|
return X.options.top + X.options.height;
|
|
11419
11423
|
})
|
|
11420
11424
|
);
|
|
11421
|
-
switch (
|
|
11425
|
+
switch (t) {
|
|
11422
11426
|
case "left":
|
|
11423
11427
|
i.forEach(function(X) {
|
|
11424
11428
|
X.updateSizeAndPositionOptions(p), X.designTarget.css("left", X.options.displayLeft());
|
|
@@ -11481,45 +11485,45 @@ var At = function(q) {
|
|
|
11481
11485
|
break;
|
|
11482
11486
|
}
|
|
11483
11487
|
}
|
|
11484
|
-
}, y.prototype.setElsSpace = function(
|
|
11488
|
+
}, y.prototype.setElsSpace = function(t, i) {
|
|
11485
11489
|
var p = this.getSelectEls();
|
|
11486
11490
|
p.length && (i ? (p.sort(function(f, U) {
|
|
11487
11491
|
return f.options.left - U.options.left;
|
|
11488
11492
|
}), p.forEach(function(f, U) {
|
|
11489
|
-
U > 0 && (f.updateSizeAndPositionOptions(p[U - 1].options.left + p[U - 1].options.width +
|
|
11493
|
+
U > 0 && (f.updateSizeAndPositionOptions(p[U - 1].options.left + p[U - 1].options.width + t), f.designTarget.css("left", f.options.displayLeft()));
|
|
11490
11494
|
})) : (p.sort(function(f, U) {
|
|
11491
11495
|
return f.options.top - U.options.top;
|
|
11492
11496
|
}), p.forEach(function(f, U) {
|
|
11493
|
-
U > 0 && (f.updateSizeAndPositionOptions(void 0, p[U - 1].options.top + p[U - 1].options.height +
|
|
11497
|
+
U > 0 && (f.updateSizeAndPositionOptions(void 0, p[U - 1].options.top + p[U - 1].options.height + t), f.designTarget.css("top", f.options.displayTop()));
|
|
11494
11498
|
})));
|
|
11495
11499
|
}, y.prototype.initAutoSave = function() {
|
|
11496
|
-
var
|
|
11500
|
+
var t = this;
|
|
11497
11501
|
E.a.event.on("hiprintTemplateDataShortcutKey_" + this.id, function(i) {
|
|
11498
|
-
if (!!
|
|
11502
|
+
if (!!t.history)
|
|
11499
11503
|
switch (i) {
|
|
11500
11504
|
case "undo":
|
|
11501
|
-
if (
|
|
11502
|
-
|
|
11503
|
-
var p =
|
|
11504
|
-
|
|
11505
|
+
if (t.historyPos > 0) {
|
|
11506
|
+
t.historyPos -= 1;
|
|
11507
|
+
var p = t.historyList[t.historyPos];
|
|
11508
|
+
t.update(p.json);
|
|
11505
11509
|
}
|
|
11506
11510
|
break;
|
|
11507
11511
|
case "redo":
|
|
11508
|
-
if (
|
|
11509
|
-
|
|
11510
|
-
var p =
|
|
11511
|
-
|
|
11512
|
+
if (t.historyPos < t.historyList.length - 1) {
|
|
11513
|
+
t.historyPos += 1;
|
|
11514
|
+
var p = t.historyList[t.historyPos];
|
|
11515
|
+
t.update(p.json);
|
|
11512
11516
|
}
|
|
11513
11517
|
break;
|
|
11514
11518
|
}
|
|
11515
11519
|
}), E.a.event.on("hiprintTemplateDataChanged_" + this.id, function(i) {
|
|
11516
|
-
if (
|
|
11517
|
-
var p =
|
|
11518
|
-
|
|
11520
|
+
if (t.history) {
|
|
11521
|
+
var p = t.dataMode == 1 ? t.getJson() : t.getJsonTid();
|
|
11522
|
+
t.lastJson = p, t.historyPos < t.historyList.length - 1 && (t.historyList = t.historyList.slice(0, t.historyPos + 1)), t.historyList.push({
|
|
11519
11523
|
id: s.a.instance.guid(),
|
|
11520
11524
|
type: i,
|
|
11521
11525
|
json: p
|
|
11522
|
-
}),
|
|
11526
|
+
}), t.historyList.length > 50 ? t.historyList = t.historyList.slice(0, 1).concat(t.historyList.slice(1, 50)) : t.historyPos += 1, t.onDataChanged && t.onDataChanged(i, p);
|
|
11523
11527
|
}
|
|
11524
11528
|
});
|
|
11525
11529
|
}, y;
|
|
@@ -11527,33 +11531,33 @@ var At = function(q) {
|
|
|
11527
11531
|
function yt(y) {
|
|
11528
11532
|
this.getHtml(y).hiwprint();
|
|
11529
11533
|
}
|
|
11530
|
-
function Mt(y,
|
|
11534
|
+
function Mt(y, t, i) {
|
|
11531
11535
|
x.extend({}, y || {}).imgToBase64 = !0;
|
|
11532
11536
|
var p = new vt({});
|
|
11533
|
-
p.on("printSuccess",
|
|
11537
|
+
p.on("printSuccess", t), p.on("printError", i), p.printByHtml2(this.getHtml(y), y.options);
|
|
11534
11538
|
}
|
|
11535
11539
|
function Et(y) {
|
|
11536
|
-
var
|
|
11540
|
+
var t = void 0;
|
|
11537
11541
|
return y && y.templates.forEach(function(i, p) {
|
|
11538
11542
|
var f = x.extend({}, i.options || {});
|
|
11539
|
-
y.imgToBase64 && (f.imgToBase64 = !0),
|
|
11540
|
-
}),
|
|
11543
|
+
y.imgToBase64 && (f.imgToBase64 = !0), t ? t.append(i.template.getHtml(i.data, f).html()) : t = i.template.getHtml(i.data, f);
|
|
11544
|
+
}), t;
|
|
11541
11545
|
}
|
|
11542
11546
|
function Bt(y) {
|
|
11543
|
-
c.a.instance.init(y), c.a.instance.providers && c.a.instance.providers.forEach(function(
|
|
11544
|
-
|
|
11547
|
+
c.a.instance.init(y), c.a.instance.providers && c.a.instance.providers.forEach(function(t) {
|
|
11548
|
+
t.addElementTypes(l.instance);
|
|
11545
11549
|
});
|
|
11546
11550
|
}
|
|
11547
11551
|
function Ut(y) {
|
|
11548
11552
|
c.a.instance.register(y);
|
|
11549
11553
|
}
|
|
11550
11554
|
function Zt(y) {
|
|
11551
|
-
y ? y && Object.keys(y).forEach(function(
|
|
11552
|
-
if (
|
|
11555
|
+
y ? y && Object.keys(y).forEach(function(t) {
|
|
11556
|
+
if (t == "optionItems" && y.optionItems && y.optionItems.length && c.a.instance.registerItems(y.optionItems), y[t].tabs && y[t].tabs.length && (y[t].tabs.forEach(function(f, U) {
|
|
11553
11557
|
if (f.replace)
|
|
11554
|
-
x.extend(c.a.instance[
|
|
11558
|
+
x.extend(c.a.instance[t].tabs[U], f);
|
|
11555
11559
|
else {
|
|
11556
|
-
var k = f.options, G = c.a.instance[
|
|
11560
|
+
var k = f.options, G = c.a.instance[t].tabs[U].options;
|
|
11557
11561
|
k.forEach(function(O) {
|
|
11558
11562
|
var it = G.findIndex(function(K) {
|
|
11559
11563
|
return K.name == O.name;
|
|
@@ -11561,13 +11565,13 @@ var At = function(q) {
|
|
|
11561
11565
|
it > -1 ? G[it].hidden = O.hidden : O.after ? (it = G.findIndex(function(K) {
|
|
11562
11566
|
return K.name == O.after;
|
|
11563
11567
|
}), it > -1 && G.splice(it + 1, 0, O)) : G.push(O);
|
|
11564
|
-
}), x.extend(c.a.instance[
|
|
11568
|
+
}), x.extend(c.a.instance[t].tabs[U], {
|
|
11565
11569
|
name: f.name,
|
|
11566
11570
|
options: G
|
|
11567
11571
|
});
|
|
11568
11572
|
}
|
|
11569
|
-
}), delete y[
|
|
11570
|
-
var i = y[
|
|
11573
|
+
}), delete y[t].tabs), y[t].supportOptions) {
|
|
11574
|
+
var i = y[t].supportOptions, p = c.a.instance[t].supportOptions;
|
|
11571
11575
|
i.forEach(function(f) {
|
|
11572
11576
|
var U = p.findIndex(function(k) {
|
|
11573
11577
|
return k.name == f.name;
|
|
@@ -11575,25 +11579,25 @@ var At = function(q) {
|
|
|
11575
11579
|
U > -1 ? p[U].hidden = f.hidden : f.after ? (U = p.findIndex(function(k) {
|
|
11576
11580
|
return k.name == f.after;
|
|
11577
11581
|
}), U > -1 && p.splice(U + 1, 0, f)) : p.push(f);
|
|
11578
|
-
}), x.extend(c.a.instance[
|
|
11582
|
+
}), x.extend(c.a.instance[t].supportOptions, p), delete y[t].supportOptions;
|
|
11579
11583
|
}
|
|
11580
|
-
x.extend(c.a.instance[
|
|
11584
|
+
x.extend(c.a.instance[t], y[t]);
|
|
11581
11585
|
}) : x.extend(c.a.instance, HIPRINT_CONFIG);
|
|
11582
11586
|
}
|
|
11583
|
-
function Lt(y,
|
|
11584
|
-
return l.instance.updateElementType(y,
|
|
11587
|
+
function Lt(y, t) {
|
|
11588
|
+
return l.instance.updateElementType(y, t);
|
|
11585
11589
|
}
|
|
11586
11590
|
function zt(y) {
|
|
11587
11591
|
c.a.instance.clear("printerList"), c.a.instance.on("printerList", y), hiwebSocket.refreshPrinterList();
|
|
11588
11592
|
}
|
|
11589
|
-
function Wt(y,
|
|
11590
|
-
c.a.instance.clear("address_" + y), c.a.instance.on("address_" + y,
|
|
11593
|
+
function Wt(y, t, ...i) {
|
|
11594
|
+
c.a.instance.clear("address_" + y), c.a.instance.on("address_" + y, t), hiwebSocket.getAddress(y, ...i);
|
|
11591
11595
|
}
|
|
11592
|
-
function Gt(y,
|
|
11593
|
-
c.a.instance.clear("ippPrinterCallback"), c.a.instance.on("ippPrinterCallback",
|
|
11596
|
+
function Gt(y, t, i) {
|
|
11597
|
+
c.a.instance.clear("ippPrinterCallback"), c.a.instance.on("ippPrinterCallback", t), c.a.instance.clear("ippPrinterConnected"), c.a.instance.on("ippPrinterConnected", i), hiwebSocket.ippPrint(y);
|
|
11594
11598
|
}
|
|
11595
|
-
function kt(y,
|
|
11596
|
-
c.a.instance.clear("ippRequestCallback"), c.a.instance.on("ippRequestCallback",
|
|
11599
|
+
function kt(y, t) {
|
|
11600
|
+
c.a.instance.clear("ippRequestCallback"), c.a.instance.on("ippRequestCallback", t), hiwebSocket.ippRequest(y);
|
|
11597
11601
|
}
|
|
11598
11602
|
g.d(F, "register", function() {
|
|
11599
11603
|
return Ut;
|
|
@@ -11630,8 +11634,8 @@ var At = function(q) {
|
|
|
11630
11634
|
}), x(document).ready(function() {
|
|
11631
11635
|
console.log("document ready"), console.log(window.autoConnect);
|
|
11632
11636
|
var y = c.a.instance.getHooks("ready");
|
|
11633
|
-
y && y.forEach((
|
|
11634
|
-
|
|
11637
|
+
y && y.forEach((t) => {
|
|
11638
|
+
t.run({ p: c, window });
|
|
11635
11639
|
}), hiwebSocket.hasIo() && window.autoConnect && hiwebSocket.start();
|
|
11636
11640
|
});
|
|
11637
11641
|
}
|
|
@@ -11690,7 +11694,7 @@ let Re = Ue(At);
|
|
|
11690
11694
|
})(jQuery);
|
|
11691
11695
|
(function() {
|
|
11692
11696
|
window.HIPRINT_CONFIG = {
|
|
11693
|
-
version: "0.1.7-
|
|
11697
|
+
version: "0.1.7-beta4",
|
|
11694
11698
|
movingDistance: 1.5,
|
|
11695
11699
|
paperHeightTrim: 1,
|
|
11696
11700
|
showPosition: !0,
|