summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/web/media/default/img/error.pngbin0 -> 701 bytes
-rw-r--r--module/web/media/default/img/notice.pngbin0 -> 778 bytes
-rw-r--r--module/web/media/default/img/parseUri.pngbin0 -> 666 bytes
-rw-r--r--module/web/media/default/img/success.pngbin0 -> 781 bytes
-rw-r--r--module/web/media/default/js/funktions.js25
-rw-r--r--module/web/templates/default/window.html6
6 files changed, 30 insertions, 1 deletions
diff --git a/module/web/media/default/img/error.png b/module/web/media/default/img/error.png
new file mode 100644
index 000000000..c37bd062e
--- /dev/null
+++ b/module/web/media/default/img/error.png
Binary files differ
diff --git a/module/web/media/default/img/notice.png b/module/web/media/default/img/notice.png
new file mode 100644
index 000000000..12cd1aef9
--- /dev/null
+++ b/module/web/media/default/img/notice.png
Binary files differ
diff --git a/module/web/media/default/img/parseUri.png b/module/web/media/default/img/parseUri.png
new file mode 100644
index 000000000..937bded9d
--- /dev/null
+++ b/module/web/media/default/img/parseUri.png
Binary files differ
diff --git a/module/web/media/default/img/success.png b/module/web/media/default/img/success.png
new file mode 100644
index 000000000..89c8129a4
--- /dev/null
+++ b/module/web/media/default/img/success.png
Binary files differ
diff --git a/module/web/media/default/js/funktions.js b/module/web/media/default/js/funktions.js
index c0f38b0bb..6240d32ad 100644
--- a/module/web/media/default/js/funktions.js
+++ b/module/web/media/default/js/funktions.js
@@ -8,6 +8,31 @@ function HumanFileSize(size)
return (size == 0) ? "0 B" : (Math.round( size / a , 2) + " " + filesizename[i]);
}
+function parseUri() {
+ var oldString = $("add_links").value;
+ var regxp= new RegExp('(ht|f)tp(s?):\/\/[a-zA-Z0-9\-\.\/\?=]+[<| |\"|\'|\r|\n|\t]{1}', 'g');
+ var resu=oldString.match(regxp);
+ if (resu == null) return;
+ var res="";
+ for(var i=0; i < resu.length; i++){
+ // remove the last char, if ...
+ if (resu[i].indexOf(" ") != -1){
+ res = res + resu[i].replace(" ","\n");
+ } else if (resu[i].indexOf("\t") != -1){
+ res = res + resu[i].replace("\t","\n");
+ } else if (resu[i].indexOf("\r") != -1){
+ res = res + resu[i].replace("\r","\n");
+ } else if (resu[i].indexOf("\"") != -1){
+ res = res + resu[i].replace("\"","\n");
+ } else if (resu[i].indexOf("<") != -1){
+ res = res + resu[i].replace("<","\n");
+ } else {
+ res = res + "\n" + resu[i].replace("'","\n");
+ }
+ }
+ $("add_links").value = res;
+}
+
Array.prototype.remove = function(from, to) {
var rest = this.slice((to || from) + 1 || this.length);
this.length = from < 0 ? this.length + from : from;
diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html
index 734745887..b59189a93 100644
--- a/module/web/templates/default/window.html
+++ b/module/web/templates/default/window.html
@@ -1,5 +1,5 @@
<iframe id="upload_target" name="upload_target" src="" style="display: none; width:0;height:0"></iframe>
-<div id="add_bg" style="filter:alpha(opacity:80);KHTMLOpacity:0.80;MozOpacity:0.80;opacity:0.80; background:#000; width:100%; height: 100%; position:fixed; top:0; left:0; display:none;">&nbsp;</div>
+<div id="add_bg" class=".window_box" style="filter:alpha(opacity:80);KHTMLOpacity:0.80;MozOpacity:0.80;opacity:0.80; background:#000; width:100%; height: 100%; position:fixed; top:0; left:0; display:none;">&nbsp;</div>
<!--<div id="add_box" style="left:50%; top:200px; margin-left: -450px; width: 900px; position: absolute; background: #FFF; padding: 10px 10px 10px 10px; display:none;">-->
<!--<div style="width: 900px; text-align: right;"><b onclick="AddBox();">[Close]</b></div>-->
@@ -14,6 +14,10 @@
<label for="add_links">{{_("Links")}}
<span class="small">{{_("Paste your links here")}}</span>
+<span class="small"> {{ _("Filter urls") }}
+<img alt="URIParsing" Title="Parse Uri" src="/media/default/img/parseUri.png" style="cursor:pointer;" onclick="parseUri()"/>
+</span>
+
</label>
<textarea rows="5" name="add_links" id="add_links"></textarea>