zet-lib 1.4.22 → 1.4.23

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.
Files changed (2) hide show
  1. package/lib/moduleLib.js +15 -2
  2. package/package.json +1 -1
package/lib/moduleLib.js CHANGED
@@ -569,7 +569,8 @@ m.dropboxview = (req, res) => {
569
569
  let head = ``;
570
570
  let end = ``;
571
571
  script +=
572
- `$(()=>{
572
+ `let dropbox_image = {}
573
+ $(()=>{
573
574
  $(".zdropbox-view").each(function (index, item) {
574
575
  let dropboxLength = $(".zdropbox-view").length || 0;
575
576
  ajaxPost('/zdropbox-file/' + index, {
@@ -577,6 +578,7 @@ m.dropboxview = (req, res) => {
577
578
  table: $(this).attr('data-table'),
578
579
  field: $(this).attr('data-field'),
579
580
  }, function (result) {
581
+ dropbox_image[result.name] = result.link;
580
582
  $(item).attr("src", result.link)
581
583
  $(item).attr('data-link', result.link);
582
584
  if (+result.index == (+dropboxLength - 1)) {
@@ -602,7 +604,18 @@ function modaldropbox() {
602
604
  })
603
605
  }
604
606
  })
605
- }` + newLine;
607
+ setTimeout(() => {
608
+ $("img").each(function(){
609
+ if($(this).attr("src") == "/img/dropbox.png") {
610
+ let name = $(this).attr("data-name");
611
+ if(dropbox_image[name]) {
612
+ $(this).attr("src",dropbox_image[name]);
613
+ }
614
+ }
615
+ })
616
+ },3000)
617
+ }
618
+ ` + newLine;
606
619
 
607
620
  return {
608
621
  head: head,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.4.22",
3
+ "version": "1.4.23",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"