Commit d4e81782 authored by yPhil's avatar yPhil
Browse files

UI: No content state(s)

parent b36b9add
:root {
--ui-bg-color-pri: #2B374B;
--ui-color-pri: #BFD8D1;
--ui-color-sec: #FF4136;
--ui-color-sec: #FFDC00;
--ui-color-ter: #6E7A94;
--var-header-height: 26px;
--var-controls-width: 150px;
--var-controls-font-size: 16pt;
--var-controls-toggle-size: 18px;
--var-controls-flex-basis: 100px;
}
--dialog-flex-direction: row;
--color-danger: #FF4136;
}
@media screen and (max-width: 700px) {
:root {
......@@ -19,6 +21,8 @@
--var-controls-toggle-size: 28px;
--var-controls-flex-basis: 160px;
--dialog-flex-direction: column;
}
}
......@@ -503,6 +507,11 @@ p.dialog-warning {
div.dialog {
display:flex;
flex-direction: var(--dialog-flex-direction);
}
div.dialog div.content p.value button {
width: 100%;
}
div.dialog > div {
......@@ -612,8 +621,6 @@ button > i {
flex-grow: 0;
flex-shrink: 0;
flex-basis: auto;
cursor: pointer;
font-size: var(--var-controls-font-size);
}
.mobHeader > .feedControls {
......@@ -634,10 +641,6 @@ button > i {
cursor:pointer;
font-size: var(--var-controls-font-size);
&:hover {
color: var(--ui-color-sec) !important;
}
}
.feedControl:hover {
......
......@@ -13,7 +13,7 @@ MOB.dialog = {
title: MOB.tr('Collection'),
autoOpen: false,
closeOnEscape: true,
resizable: false,
resizable: true,
height: 'auto',
width: MOB.utilities.vWidth(),
modal: true,
......@@ -35,9 +35,8 @@ MOB.dialog = {
MOB.dialog.kill($dialog);
});
var $rightSources = $('<button>').text('I want right sources');
var $leftSources = $('<button>').text('I want left sources');
var $noSources = $('<button>').text('I want to reset everything');
// MOB.tab.populate(JSON.parse(MOB.prefs.readConfig('tabs')));
......@@ -46,18 +45,32 @@ MOB.dialog = {
MOB.tab.populate(JSON.parse(MOB.prefs.collection('rightFr')));
});
$leftSources.click(function() {
MOB.tab.populate(JSON.parse(MOB.prefs.collection('leftFr')));
});
$noSources.click(function() {
MOB.tab.empty();
$('#nothingButton').fadeIn('slow');
});
var $nameLegend = $('<p class="name">').text(MOB.tr('I\'m a fascist'));
var $nameValue = $('<p class="value">').html($rightSources);
var $rightLegend = $('<p class="name">').text(MOB.tr('I\'m a fascist')),
$rightValue = $('<p class="value">').html($rightSources),
$leftLegend = $('<p class="name">').text(MOB.tr('I\'m a leftist')),
$leftValue = $('<p class="value">').html($leftSources),
$noLegend = $('<p class="name">').text(MOB.tr('I\'m fed up')),
$noValue = $('<p class="value">').html($noSources);
$dialog.find('div.content')
.append($nameLegend)
.append($nameValue)
.append($noSources);
.append($rightLegend)
.append($rightValue)
.append($leftLegend)
.append($leftValue)
.append($noLegend)
.append($noValue);
}
});
......
......@@ -10,7 +10,7 @@ MOB.feed = {
.attr('title', MOB.tr('Fold / unfold'));
var $controlsToggle = $('<i>')
.attr('class', 'icon-left-open rotate')
.attr('class', 'feedControl icon-left-open rotate')
.data('title', 'Fold / unfold')
.attr('title', MOB.tr('Fold / unfold'));
......
......@@ -13,7 +13,7 @@ $('<div id="menu">').appendTo($('body')).load('/static/templates/menu.html', fun
$slider = $('div#gallerySpeedSlider'),
$spinner = $('#gallerySpeedSpinner');
MOB.utilities.translate();
// MOB.utilities.translate();
$langMenu.val(MOB.prefs.readConfig('lang')).prop('selected', true);
......
......@@ -99,17 +99,58 @@ MOB.prefs = (function() {
}
];
var leftistTabListFr = [
{"name":"Actu",
"feeds": [
{"url":"http://www.lemonde.fr/rss/une.xml",
"type":"mixed",
"limit": 16
},
{
"url":"http://rss.liberation.fr/rss/latest/",
"type":"mixed",
"limit": 12
},
{
"url":"http://rezo.net/backend/",
"type":"photo",
"limit": 4
},
{
"url":"http://www.acrimed.org/spip.php?page=backend",
"type":"text",
"limit": 16
}
]
},
{"name":"Culture",
"feeds": [
{"url":"http://www.lesinrocks.com/actualite/feed/",
"type":"mixed",
"limit": 12},
{"url":"https://feeds.feedburner.com/TechCrunch/","type":"mixed","limit": 8},
{"url":"http://xkcd.com/rss.xml","type":"photo","limit": 4},
{"url":"https://www.reddit.com/.rss","type":"text","limit": 8}
]
}
];
// var newTabList = jQuery.extend(true, {}, tabList);
var defaults = {'gallerySlideTransition': 'fade',
'gallerySlideshowSpeed': 3000,
'tabDropActivate': true,
'theme': 'day',
'lang': 'en',
'explicitLang': false,
'tabs': JSON.stringify(tabList)};
var defaults = {
'gallerySlideTransition': 'fade',
'gallerySlideshowSpeed': 3000,
'tabDropActivate': true,
'theme': 'day',
'lang': 'en',
'explicitLang': false,
'tabs': JSON.stringify(tabList)
};
var collections = {'rightFr': JSON.stringify(fascistTabListFr)};
var collections = {
'rightFr': JSON.stringify(fascistTabListFr),
'leftFr': JSON.stringify(leftistTabListFr)
};
return {
collection:function(key) {
......
......@@ -104,7 +104,7 @@
MOB.dialog.killTab($(this));
});
$('button#nothingButton').click(function() {
$('#nothingButton button').click(function() {
MOB.dialog.collection();
});
......@@ -165,9 +165,9 @@
</div>
</div>
<div class="deadCenter">
<button id="nothingButton">
You have no content. <br/>
<div id="nothingButton" class="deadCenter hidden">
<button>
Whoops, no content! <br/>
Click here to add some.
</button>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment