summaryrefslogtreecommitdiffstats
path: root/module/web/templates
diff options
context:
space:
mode:
authorGravatar therazer <devnull@localhost> 2010-11-09 15:57:49 +0100
committerGravatar therazer <devnull@localhost> 2010-11-09 15:57:49 +0100
commit46f947f7d8fd3012c648750e685cec8628e5db91 (patch)
treef39f5be671a7c7d64cbcaa8374701fe62321ddc6 /module/web/templates
parentaccount cache fix (diff)
downloadpyload-46f947f7d8fd3012c648750e685cec8628e5db91.tar.xz
added browser to set paths in settings
Diffstat (limited to 'module/web/templates')
-rw-r--r--module/web/templates/default/pathchooser.html52
-rw-r--r--module/web/templates/default/settings.html8
2 files changed, 59 insertions, 1 deletions
diff --git a/module/web/templates/default/pathchooser.html b/module/web/templates/default/pathchooser.html
new file mode 100644
index 000000000..3c5329f09
--- /dev/null
+++ b/module/web/templates/default/pathchooser.html
@@ -0,0 +1,52 @@
+{% load truncate %}
+<html>
+<head>
+ <script class="javascript">
+ function chosen()
+ {
+ opener.ifield.value = document.forms[0].p.value;
+ close();
+ }
+ function exit()
+ {
+ close();
+ }
+ </script>
+ <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pathchooser.css"/>
+</head>
+<body>
+<center>
+ <form method="get" action="?" onSubmit="chosen();" onReset="exit();">
+ <input type="text" name="p" value="{{ cwd }}" size="60">
+ <input type="submit" value="Ok">
+ </form>
+
+ <table border="0" cellspacing="0" cellpadding="3" width="90%">
+ <tr>
+ <th>Name</th>
+ <th>Size</th>
+ <th>Type</th>
+ <th>Last modified</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <a href="{% url path parentdir %}"><span class="parentdir">parent directory</span></a>
+ </td>
+ </tr>
+{% for file in files %}
+ <tr>
+ <td class="name">{% ifequal file.type 'dir' %}<a href="{% url path file.fullpath %}"><span class="directory">{{ file.name|truncate:25 }}</a></span>{% else %}<span class="file">{{ file.name|truncate:25 }}{% endifequal %}</span></td>
+ <td class="size">{{ file.size|floatformat:-2 }} {{ file.unit }}</td>
+ <td class="type">{% ifequal file.type 'dir' %}directory{% else %}{{ file.ext }}{% endifequal %}</td>
+ <td class="mtime">{{ file.modified|date:"d.m.Y - H:i:s" }}</td>
+ <tr>
+{% empty %}
+ <tr>
+ <td colspan="4">no content</td>
+ </tr>
+{% endfor %}
+ </table>
+ </center>
+</body>
+</html>
+
diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html
index 6c9c2982a..dd67801a9 100644
--- a/module/web/templates/default/settings.html
+++ b/module/web/templates/default/settings.html
@@ -114,7 +114,13 @@
{% endfor %}
</select>
{% else %}
- <input id="{{skey}}|{{okey}}" name="{{configname}}|{{skey}}|{{okey}}" type="text" value="{{option.value}}"/>
+ {% if okey|contains:"_folder" %}
+
+ <input name="{{configname}}|{{skey}}|{{okey}}" type="text" id="{{skey}}|{{okey}}" value="{{option.value}}"/>
+ <input name="browsebutton" type="button" onClick="ifield = document.getElementById('{{skey}}|{{okey}}'); pathchooser = window.open('{% if option.value %}{% url path option.value %}{% else %}{% url root %}{% endif %}', 'pathchooser', 'scrollbars=yes,toolbar=no,menubar=no,statusbar=no,width=650,height=300'); pathchooser.ifield = ifield; window.ifield = ifield;" value="browse"/>
+ {% else %}
+ <input id="{{skey}}|{{okey}}" name="{{configname}}|{{skey}}|{{okey}}" type="text" value="{{option.value}}"/>
+ {% endif %}
{% endif %}
{% endifequal %}
</td>