Commit 1e7eea7d authored by yPhil's avatar yPhil
Browse files

UI: Last tab standing OK

parent e6482fa3
......@@ -471,15 +471,46 @@ li.ui-droppable-hover a {
border-radius: 0px !important;
}
img.icon-warning {
img.warning {
vertical-align:middle;
width:100px;
width:10em;
}
p.dialog-warning {
font-size:26pt;
}
div.dialog {
display:flex;
}
div.dialog > div {
flex: 1 1 auto;
}
div.dialog > div.icon {
flex: 0 0 200px;
}
div.dialog > div.content {
padding: 0 0 0 .2em;
font-size:26pt;
}
div.dialog > div.content p {
margin:0 0 .5em 0;
}
div.dialog > div.content p.name {
font-size: .5em;
color: var(--ui-color-ter) !important;
}
div.dialog > div.content p.value {
font-size: .8em;
color: var(--ui-color-pri) !important;
}
/* Hacks & workarounds */
button > i {
......
......@@ -262,7 +262,7 @@ MOB.dialog = {
var $dialog = $('#killDialog');
$dialog.dialog({
title: MOB.tr('Tab: Kill'),
title: MOB.tr('Delete group'),
autoOpen: false,
closeOnEscape: true,
resizable: false,
......@@ -282,7 +282,7 @@ MOB.dialog = {
MOB.tab.saveTabs();
MOB.dialog.kill($dialog);
$tabs.tabs('option', 'active', previousTabIndex).tabs('refresh');
// $tabs.tabs('option', 'active', previousTabIndex).tabs('refresh');
}
},
......@@ -301,7 +301,19 @@ MOB.dialog = {
MOB.dialog.kill($dialog);
});
$dialog.children('p').append(MOB.tr('Really delete this group? (%1, %2 sources)', $a.text(), $selectedPanel.find('li.feed').length));
var $nameLegend = $('<p class="name">').text(MOB.tr('Name'));
var $nameValue = $('<p class="value">').text($a.text());
var $numberLegend = $('<p class="name">').text(MOB.tr('Number of sources'));
var $numberValue = $('<p class="value">').text($selectedPanel.find('li.feed').length);
$dialog.find('div.content')
.append($nameLegend)
.append($nameValue)
.append($numberLegend)
.append($numberValue);
// $dialog.children('p').append(MOB.tr('Really delete this group? (%1, %2 sources)', $a.text(), $selectedPanel.find('li.feed').length));
}
});
......@@ -315,12 +327,12 @@ MOB.dialog = {
var $dialog = $('#killDialog');
var $thisFeedId = $button.parent().parent().parent().parent().attr('id');
var thisFeedName = $button.parent().parent().prev().text();
var thisFeedName = $button.parent().parent().parent().find('.feedTitle').text();
console.log('ID: %s', $thisFeedId);
$dialog.dialog({
title: MOB.tr('Source: Kill'),
title: MOB.tr('Delete source'),
autoOpen: false,
closeOnEscape: true,
resizable: false,
......@@ -361,7 +373,12 @@ MOB.dialog = {
MOB.dialog.kill($dialog);
});
$dialog.children('p').append(MOB.tr('Really delete this source? (%1)', thisFeedName));
var $name = $('<p class="name">').text(MOB.tr('Name'));
var $value = $('<p class="value">').text(thisFeedName);
$dialog.find('div.content')
.append($name)
.append($value);
}
});
......
......@@ -44,7 +44,7 @@ MOB.i18n.translations = {
"In progress": { fr: "En cours", ja: "進行中" },
"Manage": { fr: "Gérer", ja: "管理する" },
"Mandatory field" : { fr: "Champ obligatoire", ja: "必須事項" },
"Name": { fr: "Nom", ja: "" },
"Name": { fr: "Nom", ja: "", es: "Nombre" },
"No" : { fr: "Non", ja: "いいえ" },
"Ok": { fr: "Ok", ja: "Ok", es: "Ok" },
"Search": { fr: "Rechercher", ja: "検索" },
......@@ -160,6 +160,8 @@ MOB.i18n.translations = {
"Image" : { fr: "Image", ja: "画像", es: "Imagen" },
"Text" : { fr: "Texte", ja: "テキスト", es: "Texto" },
"Number of items" : { fr: "Nombre de titres", ja: "タイトル数", es: "Cantidad de títulos" },
"Number of sources" : { fr: "Nombre de sources", ja: "ソース数", es: "Cantidad de fuentes" },
"How many new items should the source display at a time?" : { fr: "Combien de nouveaux articles cette source peut-elle contenir?", ja: "フィードは一度にいくつ表示する必要がありますか?", es: "¿Cuántos elementos nuevos debería mostrar el source a la vez?" },
"Just answer the question" : { fr: "Répond juste à la question", ja: "ちょうど質問に答える", es: "Solo responde la pregunta" },
......@@ -175,9 +177,11 @@ MOB.i18n.translations = {
"Fold / unfold" : { fr: "Plier / déplier", ja: "ウーブリール - ファーマー", es: "Abrir / cerrar" },
"Select this source" : { fr: "Sélectionner cette source", ja: "RSSフィードを選択", es: "Selecciona este source" },
"Delete this source" : { fr: "Supprimer cette source", ja: "このRSSフィードを削除", es: "Eliminar este source rss" },
"Delete the [%1] group" : { fr: "Supprimer le groupe [%1]", ja: "サプリメント [%1]", es: "Eliminar este grupo [%1]" },
"Delete group" : { fr: "Supprimer groupe", ja: "グループを削除する", es: "Eliminar grupo" },
"%1 | Click to rename, drag to re-order" : { fr: "%1 | Clic pour renommer, glisse pour ranger", ja: "%1 | クリックして名前を変更し、ドラッグして再注文します", es: "%1 | Haga clic para cambiar el nombre, arrastre para volver a ordenar" },
"Really delete this source? (%1)" : { fr: "Réellement supprimer cette source (%1) ?", ja: "本当にこのフィードを削除しますか? (%1)", es: "¿Realmente borraste este source? (%1)" },
"Delete source" : { fr: "Supprimer source", ja: "本当にこのフィードを削除しますか", es: "Borraste source" },
"Really delete this group? (%1, %2 sources)" : { fr: "Réellement supprimer ce groupe (%1, %2 sources) ?", ja: "本当にこのタブを削除しますか? (%1, %2 フィード)", es: "¿Realmente borras esta grupo? (%1, %2 sources)" },
"Options" : { fr: "Options", ja: "嗜好", es: "Preferencias" },
......
......@@ -5,6 +5,8 @@ MOB.tab = {
},
populate:function(tabs, clickToRefresh) {
console.log('POPTABS: (%s)', $('div#tabs').length);
$('div#tabs ul li').remove();
$('div#tabs div').remove();
......
<div id="killDialog">
<p class="ui dialog-warning">
<img class="icon-warning" alt="Petrolette attention!" src="/static/images/icon-flamable.png"/>
</p>
<div class="dialog">
<div class="icon">
<img class="warning" alt="Petrolette attention!" src="/static/images/icon-flamable.png"/>
</div>
<div class="content"></div>
</div>
</div>
<div id="questionDialog" title="Just answer the question">
......
......@@ -101,8 +101,15 @@
// INIT
MOB.tab.populate(JSON.parse(MOB.prefs.readConfig('tabs')));
console.log('TABS: (%s)', $.parseJSON(MOB.prefs.readConfig('tabs')).length)
MOB.tab.makeNewTabButton($tabs);
if ($.parseJSON(MOB.prefs.readConfig('tabs')).length > 0) {
MOB.tab.populate(JSON.parse(MOB.prefs.readConfig('tabs')));
} else {
console.error('Zero tabs!')
}
// $tabs.find('div.feedControls').slideUp();
});
......@@ -150,6 +157,7 @@
<div id="preloaded-images">
<img src="/static/images/feed-toggle-triangle-fff.png" width="1" height="1" alt="Image 01" />
<img src="/static/images/feed-toggle-triangle-000.png" width="1" height="1" alt="Image 02" />
<img src="/static/images/icon-flamable.png" width="1" height="1" alt="Image 03" />
</div>
</body>
......
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