summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-17 15:46:42 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-17 15:46:42 +0200
commit68f1510f5a6ab632db19fc63f29c0475de9feb9d (patch)
tree7be8c9c3890465128a50ad8c6880d70ed7720bc7 /module/web
parentadded bootstrap (diff)
downloadpyload-68f1510f5a6ab632db19fc63f29c0475de9feb9d.tar.xz
nav + search bar for dashboard
Diffstat (limited to 'module/web')
-rw-r--r--module/web/pyload_app.py11
-rw-r--r--module/web/static/css/default/queue.css94
-rw-r--r--module/web/static/css/default/style.css22
-rw-r--r--module/web/static/js/default.js3
-rw-r--r--module/web/static/js/views/packageTreeView.js2
-rw-r--r--module/web/templates/default/base.html3
-rw-r--r--module/web/templates/default/dashboard.html34
-rw-r--r--module/web/templates/default/queue.html105
8 files changed, 62 insertions, 212 deletions
diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py
index 04cd07cb2..8401e1778 100644
--- a/module/web/pyload_app.py
+++ b/module/web/pyload_app.py
@@ -136,18 +136,13 @@ def logout():
s.delete()
return render_to_response("login.html", {"logout": True}, proc=[pre_processor])
-@route("/queue")
+@route("/")
@login_required()
-def queue(api):
- return render_to_response("queue.html", proc=[pre_processor])
+def index(api):
+ return render_to_response("dashboard.html", proc=[pre_processor])
@route("/settings")
@login_required()
def settings(api):
return render_to_response("settings.html", proc=[pre_processor])
-@route("/")
-@login_required()
-def index(api):
- return base(["It works!"])
-
diff --git a/module/web/static/css/default/queue.css b/module/web/static/css/default/queue.css
deleted file mode 100644
index 265432331..000000000
--- a/module/web/static/css/default/queue.css
+++ /dev/null
@@ -1,94 +0,0 @@
-
-#queue-list {
- list-style: none;
- padding-left: 0;
-}
-
-#page-actions{
- list-style: none;
-}
-
-.pack{
- border: 2px solid #CFCFCF;
- padding: 0;
-}
-
-.pack_header{
- background-color: #CFCFCF;
- cursor: pointer;
- border: 2px solid #CFCFCF;
- margin: 0px;
- height: 25px;
-
-}
-
-.pack_icon{
- display:inline-block;
- cursor: move;
- height:20px;
- margin: 2px 7px;
- padding: 0 0 0 20px;
- background: url("../../img/default/icon_folder.png")no-repeat;
-}
-
-.pack_name{
- display:inline-block;
-
- top:0px;
- margin: 0;
- padding:0;
- color: #000000;
-}
-
-.pack_progressbar_wrapper{
- display:inline-block;
- vertical-align: middle;
- height:9px;
- width:50%;
- right:15%;
- margin-top: 6px;
- position:absolute;
-}
-
-.pack_progressbar{
- display:block;
- width:100%;
- height: inherit;
- text-align: center;
- margin: 0;
-}
-
-.pack_toolbar{
- display:inline-block;
- height:inherit;
- right:0;
- margin: 0;
-
-}
-
-.pack_toolbar div{
- height: 20px;
- float: left;
- padding-left: 22px;
-}
-
-.pack_toolbar_delete {
- background: url("../../img/default/delete.png")no-repeat;
-}
-
-.pack_toolbar_restart {
- background: url("../../img/default/arrow_refresh.png")no-repeat;
-}
-
-.pack_toolbar_edit{
- background: url("../../img/default/pencil.png")no-repeat;
-}
-
-.pack_children{
- display: none;
-}
-
-.sort_children{
- list-style: none;
- padding-left: 0;
-} \ No newline at end of file
diff --git a/module/web/static/css/default/style.css b/module/web/static/css/default/style.css
index 93ac91d89..844955e29 100644
--- a/module/web/static/css/default/style.css
+++ b/module/web/static/css/default/style.css
@@ -38,10 +38,12 @@ ul, ol {
a {
text-decoration: none;
- color: #FF7637;
+ color: #3a79aa;
}
a:hover {
+ text-decoration: none;
+ color: #FF7637;
}
#wrap {
@@ -290,4 +292,22 @@ footer h2 {
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#007f7f7f', endColorstr='#e67f7f7f',GradientType=1 );
z-index: 50;
opacity: 0;
+}
+
+/*
+ Dashboard
+*/
+
+.nav > li > a:hover {
+ color: #3a79aa;
+}
+
+#dash-nav form {
+ margin-top: 8px;
+ margin-bottom: 0;
+}
+
+#dash-nav input, #dash-nav button {
+ padding-top: 2px;
+ padding-bottom: 2px;
} \ No newline at end of file
diff --git a/module/web/static/js/default.js b/module/web/static/js/default.js
index c5f1e6054..e200f470a 100644
--- a/module/web/static/js/default.js
+++ b/module/web/static/js/default.js
@@ -30,7 +30,8 @@ require.config({
},
"flot" : ["jquery"],
"transit" : ["jquery"],
- "omniwindow" : ["jquery"]
+ "omniwindow" : ["jquery"],
+ "bootstrap" : ["jquery"]
} // end Shim Configuration
});
diff --git a/module/web/static/js/views/packageTreeView.js b/module/web/static/js/views/packageTreeView.js
index e26924db2..30f159cf7 100644
--- a/module/web/static/js/views/packageTreeView.js
+++ b/module/web/static/js/views/packageTreeView.js
@@ -24,8 +24,6 @@ define(['jquery', 'backbone', 'underscore', 'models/TreeCollection', 'views/pack
},
render: function() {
- this.$el.html("<br>");
-
var packs = this.tree.get('packages'),
files = this.tree.get('files');
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 34957344c..3a5a6e83e 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -18,7 +18,8 @@
<script>
require(['default'], function (App) {
App.init();
- App.initPackageTree();
+ {% block require %}
+ {% endblock %}
});
</script>
diff --git a/module/web/templates/default/dashboard.html b/module/web/templates/default/dashboard.html
new file mode 100644
index 000000000..a962011cd
--- /dev/null
+++ b/module/web/templates/default/dashboard.html
@@ -0,0 +1,34 @@
+{% extends 'default/base.html' %}
+{% block require %}
+ App.initPackageTree();
+{% endblock %}
+
+{% block content %}
+ <ul id="dash-nav" class="nav nav-pills">
+ <li class="active">
+ <a class="active">All</a>
+ </li>
+ <li>
+ <a>Active</a>
+ </li>
+ <li class="dropdown">
+ <a class="dropdown-toggle"
+ data-toggle="dropdown"
+ href="#">
+ Dropdown
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <!-- links -->
+ </ul>
+ </li>
+ <li style="float: right;">
+ <form class="form-search">
+ <div class="input-append">
+ <input type="text" class="span2 search-query">
+ <button type="submit" class="btn">{{ _("Search") }}</button>
+ </div>
+ </form>
+ </li>
+ </ul>
+{% endblock %} \ No newline at end of file
diff --git a/module/web/templates/default/queue.html b/module/web/templates/default/queue.html
deleted file mode 100644
index 455916763..000000000
--- a/module/web/templates/default/queue.html
+++ /dev/null
@@ -1,105 +0,0 @@
-{% extends 'default/base.html' %}
-{% block head %}
-
-<link href="static/css/default/queue.css" rel="stylesheet" type="text/css" media="screen"/>
-<script type="text/javascript" src="/media/js/package_ui.js"></script>
-
-<script type="text/javascript">
-document.addEvent("domready", function(){
- var pUI = new PackageUI("url", {{ target }});
-});
-</script>
-{% endblock %}
-
-{% block title %}{{name}} - {{super()}} {% endblock %}
-{% block subtitle %}{{name}}{% endblock %}
-
-{% block pageactions %}
-<ul id="page-actions">
- <li id="del_finished"><a href="#">{{_("Delete Finished")}}</a></li>
- <li id="restart_failed"><a href="#">{{_("Restart Failed")}}</a></li>
-</ul>
-{% endblock %}
-
-{% block content %}
-
-<ul id="queue-list">
-
-
-
- <script>
- $(function() {
- $( "#pack_progress_1" ).progressbar({
- value: 59
- });
- });
- </script>
-
-
-
-
-<li>
- <div id="package_1" class="pack">
- <div class="pack_header">
- <div class="pack_icon"></div>
- <span class="pack_name">TestPackage</span>
- <div class="pack_progressbar_wrapper">
- <div id="pack_progress_1" class="pack_progressbar"></div>
- </div>
- </div>
-
- <div id="children_1" class="pack_children">
-
- <ul id="sort_children_1" class="sort_children">
-
-
-
-
-
-
-
- <li>
- <div id="package_2" class="pack">
- <div class="pack_header">
- <div class="pack_icon"></div>
- <span class="pack_name">TestPackage2</span>
- <div class="pack_progressbar_wrapper">
- <div id="pack_progress_2" class="pack_progressbar"></div>
- </div>
- </div>
-
- <div id="children_2" class="pack_children">
-
- <ul id="sort_children_2" class="sort_children">
-
-
-
-
-
-
-
- </ul>
- </div>
- </div>
- </li>
-
-
-
-
-
-
-
-
-
-
-
-
-
- </ul>
- </div>
- </div>
-</li>
-
-
-</ul>
-{% endblock %} \ No newline at end of file