summaryrefslogtreecommitdiffstats
path: root/pyload/web
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/web')
-rw-r--r--pyload/web/app/scripts/helpers/formatSize.js7
-rw-r--r--pyload/web/app/scripts/views/accounts/accountView.js3
-rw-r--r--pyload/web/app/styles/default/accounts.less6
-rw-r--r--pyload/web/app/styles/default/dashboard.less5
-rw-r--r--pyload/web/app/styles/default/style.less49
-rw-r--r--pyload/web/app/templates/default/accounts/account.html25
-rw-r--r--pyload/web/app/templates/default/accounts/actionbar.html10
-rw-r--r--pyload/web/app/templates/default/accounts/layout.html27
-rw-r--r--pyload/web/app/templates/default/dashboard/actionbar.html7
-rw-r--r--pyload/web/app/templates/default/dashboard/select.html2
10 files changed, 77 insertions, 64 deletions
diff --git a/pyload/web/app/scripts/helpers/formatSize.js b/pyload/web/app/scripts/helpers/formatSize.js
index 3b62e74c7..926c4793d 100644
--- a/pyload/web/app/scripts/helpers/formatSize.js
+++ b/pyload/web/app/scripts/helpers/formatSize.js
@@ -1,10 +1,15 @@
// Format bytes in human readable format
-define('helpers/formatSize', ['handlebars'], function(Handlebars) {
+define('helpers/formatSize', ['handlebars', './gettext'], function(Handlebars, gettext) {
'use strict';
var sizes = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'];
function formatSize(bytes, options) {
if (!bytes || bytes === 0) return '0 B';
+ if (bytes === -1)
+ return gettext('not available');
+ if (bytes === -2)
+ return gettext('unlimited');
+
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10);
// round to two digits
return (bytes / Math.pow(1024, i)).toFixed(2) + ' ' + sizes[i];
diff --git a/pyload/web/app/scripts/views/accounts/accountView.js b/pyload/web/app/scripts/views/accounts/accountView.js
index 89f69d7e7..7d1f04315 100644
--- a/pyload/web/app/scripts/views/accounts/accountView.js
+++ b/pyload/web/app/scripts/views/accounts/accountView.js
@@ -4,7 +4,8 @@ define(['jquery', 'underscore', 'backbone', 'app', 'hbs!tpl/accounts/account'],
return Backbone.Marionette.ItemView.extend({
- tagName: 'tr',
+ tagName: 'div',
+ className: 'row-fluid',
template: template,
events: {
diff --git a/pyload/web/app/styles/default/accounts.less b/pyload/web/app/styles/default/accounts.less
index 9b45b64b3..c388015b6 100644
--- a/pyload/web/app/styles/default/accounts.less
+++ b/pyload/web/app/styles/default/accounts.less
@@ -3,4 +3,10 @@
.logo-select {
width: 20px;
height: 20px;
+}
+
+.vertical-header {
+ .rotate(-90deg);
+ font-weight: bold;
+ text-transform: uppercase;
} \ No newline at end of file
diff --git a/pyload/web/app/styles/default/dashboard.less b/pyload/web/app/styles/default/dashboard.less
index ed87e19a1..336070737 100644
--- a/pyload/web/app/styles/default/dashboard.less
+++ b/pyload/web/app/styles/default/dashboard.less
@@ -309,6 +309,11 @@ FANCY CHECKBOXES
}
+.li-check > a {
+ padding-left: 8px !important;
+ padding-right: 8px !important;
+}
+
li.finished > a, li.finished:hover > a {
background-color: @green;
color: @light;
diff --git a/pyload/web/app/styles/default/style.less b/pyload/web/app/styles/default/style.less
index b75f45a65..b24e5ff21 100644
--- a/pyload/web/app/styles/default/style.less
+++ b/pyload/web/app/styles/default/style.less
@@ -174,8 +174,8 @@ header { // background-color: @greyDark;
float: right;
width: 100%;
.centered;
-// height: @header-height - 16px;
-// margin: 8px 0;
+ // height: @header-height - 16px;
+ // margin: 8px 0;
font-family: sans-serif;
}
}
@@ -240,36 +240,35 @@ header { // background-color: @greyDark;
padding-top: 2px;
margin-bottom: 5px;
-}
-
-.actionbar > li > a {
- margin-top: 4px;
-}
+ & > li > a, & > li > button {
+ margin-top: 4px;
+ }
-.actionbar .breadcrumb {
- margin: 0;
- padding-top: 10px;
- padding-bottom: 0;
+ .breadcrumb {
+ margin: 0;
+ padding-top: 10px;
+ padding-bottom: 0;
- .active {
- color: @grey;
+ .active {
+ color: @grey;
+ }
}
-}
+ form {
+ margin-top: 6px;
+ margin-bottom: 0;
+ }
-.actionbar form {
- margin-top: 6px;
- margin-bottom: 0;
-}
+ input, button {
+ padding-top: 2px;
+ padding-bottom: 2px;
+ }
-.actionbar input, .actionbar button {
- padding-top: 2px;
- padding-bottom: 2px;
-}
+ .dropdown-menu i {
+ margin-top: 4px;
+ padding-right: 5px;
+ }
-.actionbar .dropdown-menu i {
- margin-top: 4px;
- padding-right: 5px;
}
/*
diff --git a/pyload/web/app/templates/default/accounts/account.html b/pyload/web/app/templates/default/accounts/account.html
index 90bd632c8..927072350 100644
--- a/pyload/web/app/templates/default/accounts/account.html
+++ b/pyload/web/app/templates/default/accounts/account.html
@@ -1,10 +1,15 @@
-<td>{{ plugin }}</td>
-<td>{{ loginname }}</td>
-<td>{{ valid }}</td>
-<td>{{ premium }}</td>
-<td>{{ trafficleft }}</td>
-<td>{{ shared }}</td>
-<td>{{ activated }}</td>
-<td>
- <button type="button" class="btn btn-danger">Delete</button>
-</td> \ No newline at end of file
+<div class="span3">
+ <img src="{{ pluginIcon plugin }}"> {{ plugin }}
+</div>
+<div class="span3">
+ {{ loginname }}
+</div>
+<div class="span3">
+ {{ premium }}
+ {{ formatSize trafficleft }}
+ {{ shared }}
+ {{ activated }}
+</div>
+<div class="span3">
+ <button type="button" class="btn btn-danger">Delete</button>
+</div> \ No newline at end of file
diff --git a/pyload/web/app/templates/default/accounts/actionbar.html b/pyload/web/app/templates/default/accounts/actionbar.html
index f4652ec42..239254dc1 100644
--- a/pyload/web/app/templates/default/accounts/actionbar.html
+++ b/pyload/web/app/templates/default/accounts/actionbar.html
@@ -1,5 +1,5 @@
-<div class="span2 offset1">
-</div>
-<span class="span9">
- <button class="btn btn-small btn-blue btn-add">Add Account</button>
-</span> \ No newline at end of file
+<ul class="actionbar nav span8 offset3">
+ <li>
+ <button class="btn btn-small btn-blue btn-add">Add Account</button>
+ </li>
+</ul> \ No newline at end of file
diff --git a/pyload/web/app/templates/default/accounts/layout.html b/pyload/web/app/templates/default/accounts/layout.html
index e6627500d..bd8256659 100644
--- a/pyload/web/app/templates/default/accounts/layout.html
+++ b/pyload/web/app/templates/default/accounts/layout.html
@@ -1,19 +1,10 @@
-<!--{# TODO: responsive layout instead of table #}-->
-<div class="span10 offset2">
- <table class="table table-striped">
- <thead>
- <tr>
- <th>Plugin</th>
- <th>Name</th>
- <th>Valid</th>
- <th>Premium</th>
- <th>Traffic</th>
- <th>Shared</th>
- <th>Activated</th>
- <th>Delete</th>
- </tr>
- </thead>
- <tbody class="account-list">
- </tbody>
- </table>
+<div class="span3">
+ <h1 class="vertical-header">
+ {{ _ "Accounts" }}
+ </h1>
+</div>
+<div class="span9">
+ <div class="container-fluid account-list">
+
+ </div>
</div> \ No newline at end of file
diff --git a/pyload/web/app/templates/default/dashboard/actionbar.html b/pyload/web/app/templates/default/dashboard/actionbar.html
index ad9a1278d..341ece0bc 100644
--- a/pyload/web/app/templates/default/dashboard/actionbar.html
+++ b/pyload/web/app/templates/default/dashboard/actionbar.html
@@ -1,6 +1,10 @@
<div class="span2 offset1">
</div>
<ul class="actionbar nav nav-pills span9">
+ <li class="li-check">
+ <a href="#"><i class="icon-check-empty btn-check"></i></a>
+ </li>
+
<li>
<ul class="breadcrumb">
<li><a href="#">Local</a> <span class="divider">/</span></li>
@@ -16,9 +20,6 @@
</div>
</form>
</li>
- <li style="float: right" class="li-check">
- <a href="#"><i class="icon-check-empty btn-check"></i></a>
- </li>
<li class="dropdown" style="float: right;">
<a class="dropdown-toggle type"
data-toggle="dropdown"
diff --git a/pyload/web/app/templates/default/dashboard/select.html b/pyload/web/app/templates/default/dashboard/select.html
index f4c696d11..8f04d410e 100644
--- a/pyload/web/app/templates/default/dashboard/select.html
+++ b/pyload/web/app/templates/default/dashboard/select.html
@@ -2,7 +2,7 @@
{{#if packs }}{{ ngettext "1 package" "%d packages" packs }}{{/if}}
{{#if files}}
{{#if packs}}, {{/if}}
-{{ ngettext "1 file" "%d files" files }}
+{{ngettext "1 file" "%d files" files}}
{{/if }}
selected
&nbsp;|&nbsp;