diff options
Diffstat (limited to 'module')
| -rw-r--r-- | module/web/templates/default/base.html | 42 | ||||
| -rw-r--r-- | module/web/templates/default/home.html | 54 | ||||
| -rw-r--r-- | module/web/templates/default/queue.html | 13 | ||||
| -rw-r--r-- | module/web/templates/default/window.html | 14 | 
4 files changed, 73 insertions, 50 deletions
| diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html index 98858b9df..ecaec98f2 100644 --- a/module/web/templates/default/base.html +++ b/module/web/templates/default/base.html @@ -12,14 +12,12 @@  <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>
 -{% block head %}
 -{% endblock %}
 +
  <title>{% block title %}pyLoad Webinterface{% endblock %}</title>
 -</head>
 +
  <script type="text/javascript">
  $(document).ready(function(){
  	$.getJSON('/json/links', LinksToContent );
 -	$.getJSON('/json/status', LoadJsonToContent );
  });
 @@ -42,35 +40,10 @@ function LoadJsonToContent(data)      $.getJSON('/json/status', LoadJsonToContent );
     }, 2000);
  }
 -function LinksToContent(data)
 -{
 -	
 -	$.each(data, function(i,item)
 -	{
 -		//$("#LinksAktiv").append('<tr id="link_'+item.id+'"><td id="link_'+item.id+'_name">'+item.name+'</td><td id="link_'+item.id+'_status">'+item.status+'</td><td>'+SecToRightTime(item.eta)+' @ '+Math.round(item.speed*100)/100+' kb/s</td><td>'+HumanFileSize(item.size)+'</td><td><font id="aktiv_percent">'+item.percent+'</font>% / '+HumanFileSize(item.size-item.kbleft)+'</td></tr>');
 -		//SetInver[i] = (item.size / 100 ) / item.speed ;
 -		//window.setInterval( $("#aktiv_percent").text(parseInt($("#aktiv_percent").text)+1), ((item.size / 100 ) / item.speed)*100);
 -		//$("#LinksAktiv").append('<tr><td colspan="5"><div class="progress_bar" style="width: '+(100/item.size)*(item.size-item.kbleft)+'%;"> </div></td></tr>');
 -		//$(".progress_bar").animate({ width: "100%"}, (item.size / item.speed)*1000, "linear" );
 -		//var width = (100/item.size)*(item.size-item.kbleft);
 -		//alert(width);
 -		//$(".link_"+item.id+"_pgb").animate({ width: +"%"}, /*(item.size / item.speed)*1000*/1500, "linear" );
 -		//$("#link_"+item.id+"_pgb").fadeIn();
 -		/*$("#link_"+item.id+"_pgb").progressBar();
 -		$("#link_"+item.id+"_pgb").progressBar('option' , 'width' , '100%');
 -		$("#link_"+item.id+"_pgb").progressBar('option' , 'showText' , true);
 -		$("#link_"+item.id+"_pgb").progressBar('option' , 'textFormat' , 'percentage');*/
 -		$("#link_"+item.id+"_pgb").progressBar((100/item.size)*(item.size-item.kbleft));
 -		
 -	});
 -	//UpdateLinks(SetInver, 0);
 -	setTimeout(function()
 -   {
 -    $.getJSON('/json/links', LinksToContent );
 -   }, 1000);
 -	
 -}
  </script>
 +
 +{% block head %}
 +{% endblock %}
  </head>
  <a class="anchor" name="top" id="top"></a>
 @@ -107,8 +80,6 @@ function LinksToContent(data)  		<li>
  		    <a href="/queue/" title=""><img src="{{ MEDIA_URL }}img/head-menu-download.png" alt="" /> Queue</a></li>
  		<li>
 -		    <a href="/add/" title=""><img src="{{ MEDIA_URL }}img/head-menu-development.png" alt="" />Add</a></li>
 -		<li>
  		    <a href="/downloads/" title=""><img src="{{ MEDIA_URL }}img/head-menu-development.png" alt="" /> Downloads</a></li>
  		<li class="right">
  		    <a href="/logs/"  class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-index.png" alt="" />Logs</a>
 @@ -169,5 +140,6 @@ function LinksToContent(data)  </div>
  </div>
 -</head>
 +
 +{% include "default/window.html" %}
  <body>
 diff --git a/module/web/templates/default/home.html b/module/web/templates/default/home.html index 16526341e..12fa55539 100644 --- a/module/web/templates/default/home.html +++ b/module/web/templates/default/home.html @@ -1,11 +1,55 @@  {% extends 'default/base.html' %}
 +{% block head %}
 +
 +<script type="text/javascript">
 +$(document).ready(function(){
 +	$.getJSON('/json/links', LinksToContent );
 +});
 +
 +
 +/*function UpdateLinks( SetInver, index )
 +{
 +	$("#aktiv_percent").text(parseInt($("#aktiv_percent").text)+1)
 +	setTimeout( UpdateLinks( SetInver, index+1 ), SetInver[index]*1000);
 +}*/
 +
 +function LinksToContent(data)
 +{
 +	
 +	$.each(data, function(i,item)
 +	{
 +		//$("#LinksAktiv").append('<tr id="link_'+item.id+'"><td id="link_'+item.id+'_name">'+item.name+'</td><td id="link_'+item.id+'_status">'+item.status+'</td><td>'+SecToRightTime(item.eta)+' @ '+Math.round(item.speed*100)/100+' kb/s</td><td>'+HumanFileSize(item.size)+'</td><td><font id="aktiv_percent">'+item.percent+'</font>% / '+HumanFileSize(item.size-item.kbleft)+'</td></tr>');
 +		//SetInver[i] = (item.size / 100 ) / item.speed ;
 +		//window.setInterval( $("#aktiv_percent").text(parseInt($("#aktiv_percent").text)+1), ((item.size / 100 ) / item.speed)*100);
 +		//$("#LinksAktiv").append('<tr><td colspan="5"><div class="progress_bar" style="width: '+(100/item.size)*(item.size-item.kbleft)+'%;"> </div></td></tr>');
 +		//$(".progress_bar").animate({ width: "100%"}, (item.size / item.speed)*1000, "linear" );
 +		//var width = (100/item.size)*(item.size-item.kbleft);
 +		//alert(width);
 +		//$(".link_"+item.id+"_pgb").animate({ width: +"%"}, /*(item.size / item.speed)*1000*/1500, "linear" );
 +		//$("#link_"+item.id+"_pgb").fadeIn();
 +		/*$("#link_"+item.id+"_pgb").progressBar();
 +		$("#link_"+item.id+"_pgb").progressBar('option' , 'width' , '100%');
 +		$("#link_"+item.id+"_pgb").progressBar('option' , 'showText' , true);
 +		$("#link_"+item.id+"_pgb").progressBar('option' , 'textFormat' , 'percentage');*/
 +		$("#link_"+item.id+"_pgb").progressBar((100/item.size)*(item.size-item.kbleft));
 +		
 +	});
 +	//UpdateLinks(SetInver, 0);
 +	setTimeout(function()
 +   {
 +    $.getJSON('/json/links', LinksToContent );
 +   }, 1000);
 +	
 +}
 +</script>
 +
 +{% endblock %}
 +
  {% block subtitle %}
  Active Downloads
  {% endblock %}
 -
 -
  {% block content %}
  <table width="100%" class="queue">
    <tr class="header">
 @@ -32,10 +76,6 @@ Active Downloads    </tr>
    {% endfor %}
 -  
 -  
    <tbody>
  </table>
 -{% endblock %}
 -
 -{% include "default/window.html" %}
\ No newline at end of file +{% endblock %}
\ No newline at end of file diff --git a/module/web/templates/default/queue.html b/module/web/templates/default/queue.html index 3995d0390..b4f1cb278 100644 --- a/module/web/templates/default/queue.html +++ b/module/web/templates/default/queue.html @@ -1,3 +1,16 @@  {% extends 'default/base.html' %}
  {% block title %}Queue - {{block.super}} {% endblock %}
 +
 +{% block menu %}
 +<li>
 +    <a href="{% url home %}" title=""><img src="{{ MEDIA_URL }}img/head-menu-home.png" alt="" /> Home</a>
 +</li>
 +<li class="selected">
 +    <a href="{% url queue %}" title=""><img src="{{ MEDIA_URL }}img/head-menu-download.png" alt="" /> Queue</a></li>
 +<li>
 +    <a href="{% url downloads %}" title=""><img src="{{ MEDIA_URL }}img/head-menu-development.png" alt="" /> Downloads</a></li>
 +<li class="right">
 +    <a href="{% url logs %}"  class="action index" accesskey="x" rel="nofollow"><img src="{{ MEDIA_URL }}img/head-menu-index.png" alt="" />Logs</a>
 +</li>
 +{% endblock %}
\ No newline at end of file diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html index f364f2338..602622719 100644 --- a/module/web/templates/default/window.html +++ b/module/web/templates/default/window.html @@ -1,19 +1,18 @@ -{% block content %}
 -<div id="{{id}}" class="StickyWinInstance SWclearfix" style="overflow: visible;visibility: visible;display: none; position: absolute; z-index: 10000; opacity: 1; left: 0px; top: 0px;">
 -<div class="DefaultStickyWin" style="width: {{width}}px;">
 +<div id="add_window" class="StickyWinInstance SWclearfix" style="overflow: visible;visibility: visible;display: none; position: absolute; z-index: 10000; opacity: 1; left: 0px; top: 0px;">
 +<div class="DefaultStickyWin" style="width: 100px;">
  <div class="top">
  <div class="top_ul"></div>
 -<div class="top_ur"><h1 class="caption dragHandle">{{caption}}</h1>
 +<div class="top_ur"><h1 class="caption dragHandle">Title</h1>
  </div></div>
  <div class="middle">
 -<div class="body">{{body}}
 +<div class="body">Body here
  </div></div>
  <div class="closeBody">
  <div class="closeButtons">
 -<a class="closeSticky button" id="bt{{button}}">{{button}}</a><a class="closeSticky button">Close</a>
 +<a class="closeSticky button" id="button_id">Button</a><a class="closeSticky button">Close</a>
  </div>
  </div>
 @@ -26,5 +25,4 @@  <div class="closeButton closeSticky"></div>
  </div>
 -</div>
 -{% block content %}
\ No newline at end of file +</div>
\ No newline at end of file | 
