Преглед изворни кода

print format: convert relative image links to absolute ones

version-14
Rushabh Mehta пре 12 година
родитељ
комит
aa7c60b125
1 измењених фајлова са 10 додато и 0 уклоњено
  1. +10
    -0
      public/js/legacy/widgets/form/print_format.js

+ 10
- 0
public/js/legacy/widgets/form/print_format.js Прегледај датотеку

@@ -351,6 +351,16 @@ $.extend(_p, {
+ stat
+ container.innerHTML.replace(/<div/g, '\n<div').replace(/<td/g, '\n<td')
+ footer;
// replace relative links by absolute links
var prefix = window.location.href.split("app.html")[0]
$.each(finished.match(/src=['"]([^'"]*)['"]/) || [], function(i, v) {
if(v.substr(0,4)!="src=") {
if(v.substr(0,4)!="http")
finished = finished.replace(v, prefix + v);
}
});

return finished;
},


Loading…
Откажи
Сачувај