diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-01-10 16:20:31 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-01-10 16:20:31 +0100 |
commit | 3d655ddbfbd96abecb9a9c9bebf6e43eb710ab12 (patch) | |
tree | dc1ce469a6c75ce5f44561cf1d2c3c269ef90f94 /module/web/templates | |
parent | moved Hooks.py (diff) | |
download | pyload-3d655ddbfbd96abecb9a9c9bebf6e43eb710ab12.tar.xz |
fixed manage.py, addBox working, some code formatted and cleaned
Diffstat (limited to 'module/web/templates')
-rw-r--r-- | module/web/templates/default/base.html | 19 | ||||
-rw-r--r-- | module/web/templates/default/home.html | 3 | ||||
-rw-r--r-- | module/web/templates/default/window.html | 7 |
3 files changed, 11 insertions, 18 deletions
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html index cd0b85903..7171a1f1c 100644 --- a/module/web/templates/default/base.html +++ b/module/web/templates/default/base.html @@ -12,13 +12,16 @@ <script src="{{ MEDIA_URL }}js/sprintf.js"></script>
<script src="{{ MEDIA_URL }}js/funktions.js"></script>
<script src="{{ MEDIA_URL }}js/jquery.progressbar.js"></script>
+<script src="{{ MEDIA_URL }}js/jquery.form.js"></script>
<title>{% block title %}pyLoad Webinterface{% endblock %}</title>
<script type="text/javascript">
$(document).ready(function(){
$.getJSON('/json/status', LoadJsonToContent );
- $.getJSON('/json/links', LinksToContent );
+ $('#add_form').ajaxForm(function() {
+ AddBox();
+ });
});
@@ -58,20 +61,6 @@ function AddBox() }
}
-function AddSubmit()
-{
- $("#add_form").submit();
- /*
- $.post("/json/add_package", { links: $("#add_links").text() } );
- return false;
- if( $("#add_cf").val() != "" )
- {
- //$("#add_form").submit();
- }
- */
- AddBox();
-
-}
</script>
{% block head %}
diff --git a/module/web/templates/default/home.html b/module/web/templates/default/home.html index 49633f94a..96f3015d9 100644 --- a/module/web/templates/default/home.html +++ b/module/web/templates/default/home.html @@ -9,6 +9,9 @@ $("#aktiv_percent").text(parseInt($("#aktiv_percent").text)+1)
setTimeout( UpdateLinks( SetInver, index+1 ), SetInver[index]*1000);
}*/
+$(document).ready(function(){
+ $.getJSON('/json/links', LinksToContent );
+});
function LinksToContent(data)
{
diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html index ec4ca496a..fa49565d3 100644 --- a/module/web/templates/default/window.html +++ b/module/web/templates/default/window.html @@ -2,10 +2,11 @@ <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>
<h1>Add</h1>
- <form id="add_form" action="" method="post" onsubmit="return AddSubmit();">
+ <form id="add_form" action="json/add_package" method="post">
+ Packagename<input name="add_name" type="text" size="20" />
<textarea rows="5" style="width: 890px;" name="add_links" id="add_links"></textarea>
<br />
- <input type="file" name="add_cf" id="add_cf" />
- <input type="submit" value="Add Links" />
+ <input type="file" name="add_file" id="add_file" />
+ <input id="add_submit" type="submit" value="Add Links"/>
</form>
</div>
|