summaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar plopoyop <clement@iMac-de-Clement.local> 2014-09-19 09:07:11 +0200
committerGravatar plopoyop <clement@iMac-de-Clement.local> 2014-09-19 09:07:11 +0200
commitffbfbb92cc89c5ae07e0a28ee3477fcd0c44505d (patch)
tree827469859e1300f3525196658b7191fa1dbb40f9 /p
parent4fd1478e82dabaa042f4e80d4b9b2830f29a7da8 (diff)
parent2f5304a1f7052bce1315f2ed85141568f0995e7c (diff)
Merge branch 'dev' of https://github.com/marienfressinaud/FreshRSS into dev
Diffstat (limited to 'p')
-rw-r--r--p/scripts/main.js35
-rw-r--r--p/themes/Dark/dark.css13
-rw-r--r--p/themes/Flat/flat.css13
-rw-r--r--p/themes/Origine/origine.css17
-rw-r--r--p/themes/Screwdriver/screwdriver.css13
-rw-r--r--p/themes/base-theme/base.css12
-rw-r--r--p/themes/base-theme/template.css23
7 files changed, 104 insertions, 22 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 9d2d83a32..b2ca90c5b 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -984,7 +984,7 @@ function init_load_more(box) {
}
//</endless_mode>
-//<Web login form>
+//<crypto form (Web login)>
function poormanSalt() { //If crypto.getRandomValues is not available
var text = '$2a$04$',
base = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789/abcdefghijklmnopqrstuvwxyz';
@@ -994,20 +994,24 @@ function poormanSalt() { //If crypto.getRandomValues is not available
return text;
}
-function init_loginForm() {
- var $loginForm = $('#loginForm');
- if ($loginForm.length === 0) {
+function init_crypto_form() {
+ var $crypto_form = $('#crypto-form');
+ if ($crypto_form.length === 0) {
return;
}
+
if (!(window.dcodeIO)) {
if (window.console) {
console.log('FreshRSS waiting for bcrypt.js…');
}
- window.setTimeout(init_loginForm, 100);
+ window.setTimeout(init_crypto_form, 100);
return;
}
- $loginForm.on('submit', function() {
- $('#loginButton').attr('disabled', '');
+
+ $crypto_form.on('submit', function() {
+ var $submit_button = $(this).find('button[type="submit"]');
+ $submit_button.attr('disabled', '');
+
var success = false;
$.ajax({
url: './?c=javascript&a=nonce&user=' + $('#username').val(),
@@ -1015,7 +1019,7 @@ function init_loginForm() {
async: false
}).done(function (data) {
if (data.salt1 == '' || data.nonce == '') {
- alert('Invalid user!');
+ openNotification('Invalid user!', 'bad');
} else {
try {
var strong = window.Uint32Array && window.crypto && (typeof window.crypto.getRandomValues === 'function'),
@@ -1023,22 +1027,23 @@ function init_loginForm() {
c = dcodeIO.bcrypt.hashSync(data.nonce + s, strong ? 4 : poormanSalt());
$('#challenge').val(c);
if (s == '' || c == '') {
- alert('Crypto error!');
+ openNotification('Crypto error!', 'bad');
} else {
success = true;
}
} catch (e) {
- alert('Crypto exception! ' + e);
+ openNotification('Crypto exception! ' + e, 'bad');
}
}
}).fail(function() {
- alert('Communication error!');
+ openNotification('Communication error!', 'bad');
});
- $('#loginButton').removeAttr('disabled');
+
+ $submit_button.removeAttr('disabled');
return success;
});
}
-//</Web login form>
+//</crypto form (Web login)>
//<persona>
function init_persona() {
@@ -1240,14 +1245,12 @@ function init_all() {
}
init_notifications();
switch (authType) {
- case 'form':
- init_loginForm();
- break;
case 'persona':
init_persona();
break;
}
init_confirm_action();
+ init_crypto_form();
$stream = $('#stream');
if ($stream.length > 0) {
init_actualize();
diff --git a/p/themes/Dark/dark.css b/p/themes/Dark/dark.css
index 669f4ce42..e47415366 100644
--- a/p/themes/Dark/dark.css
+++ b/p/themes/Dark/dark.css
@@ -872,7 +872,18 @@ a.btn {
.stat > table td,
.stat > table th {
border-bottom: 1px solid #333;
- text-align: center;
+}
+
+.stat > .horizontal-list {
+ margin: 0 0 5px;
+}
+.stat > .horizontal-list .item {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.stat > .horizontal-list .item:first-child {
+ width: 270px;
}
/*=== LOGS */
diff --git a/p/themes/Flat/flat.css b/p/themes/Flat/flat.css
index a942df0e8..41d03c57d 100644
--- a/p/themes/Flat/flat.css
+++ b/p/themes/Flat/flat.css
@@ -859,7 +859,18 @@ a.btn {
.stat > table td,
.stat > table th {
border-bottom: 1px solid #ddd;
- text-align: center;
+}
+
+.stat > .horizontal-list {
+ margin: 0 0 5px;
+}
+.stat > .horizontal-list .item {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.stat > .horizontal-list .item:first-child {
+ width: 270px;
}
/*=== LOGS */
diff --git a/p/themes/Origine/origine.css b/p/themes/Origine/origine.css
index 55ff3fc73..6a4ef9699 100644
--- a/p/themes/Origine/origine.css
+++ b/p/themes/Origine/origine.css
@@ -808,12 +808,12 @@ a.btn {
background: #fafafa;
}
#bigMarkAsRead:hover {
- color: #27ae60;
+ color: #0062be;
background: #fff;
box-shadow: 0 -5px 10px #eee inset;
}
#bigMarkAsRead:hover .bigTick {
- text-shadow: 0 0 5px #27ae60;
+ text-shadow: 0 0 5px #0062be;
}
/*=== Navigation menu (for articles) */
@@ -913,7 +913,18 @@ a.btn {
.stat > table td,
.stat > table th {
border-bottom: 1px solid #ddd;
- text-align: center;
+}
+
+.stat > .horizontal-list {
+ margin: 0 0 5px;
+}
+.stat > .horizontal-list .item {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.stat > .horizontal-list .item:first-child {
+ width: 270px;
}
/*=== LOGS */
diff --git a/p/themes/Screwdriver/screwdriver.css b/p/themes/Screwdriver/screwdriver.css
index 1d84753c7..c96d4bfe3 100644
--- a/p/themes/Screwdriver/screwdriver.css
+++ b/p/themes/Screwdriver/screwdriver.css
@@ -1025,7 +1025,18 @@ opacity: 1;
border-bottom: 1px solid #ccc;
background: rgba(255,255,255,0.38);
box-shadow: 0 1px #fff;
- text-align: center;
+}
+
+.stat > .horizontal-list {
+ margin: 0 0 5px;
+}
+.stat > .horizontal-list .item {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.stat > .horizontal-list .item:first-child {
+ width: 250px;
}
/*=== LOGS */
diff --git a/p/themes/base-theme/base.css b/p/themes/base-theme/base.css
index b49cd79ea..1688a6f79 100644
--- a/p/themes/base-theme/base.css
+++ b/p/themes/base-theme/base.css
@@ -678,6 +678,18 @@ a.btn {
text-align: center;
}
+.stat > .horizontal-list {
+ margin: 0 0 5px;
+}
+.stat > .horizontal-list .item {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.stat > .horizontal-list .item:first-child {
+ width: 250px;
+}
+
/*=== LOGS */
/*=========*/
.logs {
diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css
index f05ddff4e..0f00632ee 100644
--- a/p/themes/base-theme/template.css
+++ b/p/themes/base-theme/template.css
@@ -98,6 +98,15 @@ button.as-link:active {
font-size: 1.1em;
}
+/*=== Tables */
+table {
+ max-width: 100%;
+}
+th.numeric,
+td.numeric {
+ text-align: center;
+}
+
/*=== COMPONENTS */
/*===============*/
/*=== Forms */
@@ -458,6 +467,12 @@ a.btn {
.content pre {
overflow: auto;
}
+br {
+ line-height: 1em;
+}
+br + br + br {
+ display: none;
+}
/*=== Notification and actualize notification */
.notification {
@@ -526,6 +541,14 @@ a.btn {
}
/*=== Statistiques */
+.stat {
+ margin: 15px 0;
+}
+.stat.half {
+ display: inline-block;
+ width: 46%;
+ padding: 0 2%;
+}
.stat > table {
width: 100%;
}