Commit 7f39f938 authored by yPhil's avatar yPhil
Browse files

Added video embed to (side menu) help tour

- Also, removed now useless isQueryString boolean
- New param isNewFeed to rule them all
parent 4a6d6ec8
......@@ -279,8 +279,8 @@ PTL.dialog = {
}
var newUrl = DOMPurify.sanitize($(this).find('input#feedGuessInput').val()),
newName = DOMPurify.sanitize($(this).find('input#feedNameInput').val()),
newType = $('#feedTypeDiv :radio:checked').attr('id');
newName = DOMPurify.sanitize($(this).find('input#feedNameInput').val()),
newType = $('#feedTypeDiv :radio:checked').attr('id');
$dataStore
.data('url', newUrl)
......
......@@ -2,7 +2,7 @@
PTL.feed = {
add: function($column, url, name, type, limit, status, iconhash, nbitems, lastitem, clickNew, isQueryString, progress) {
add: function($column, url, name, type, limit, status, iconhash, nbitems, lastitem, isNewFeed, progress) {
const $feed = $('<li>')
.attr('class', 'feed');
......@@ -182,9 +182,9 @@ PTL.feed = {
$feed.append($feedHeader, $feedBody);
if (clickNew) {
if (isNewFeed) {
$feed.prependTo($column);
PTL.dialog.feedPrefs($prefsIcon, true, isQueryString);
PTL.dialog.feedPrefs($prefsIcon, true);
} else {
$feed.appendTo($column);
$refreshIcon.click();
......
......@@ -66,6 +66,8 @@ PTL.i18n.translations = {
"Bookmark to quickly add a website\'s feed to Pétrolette" : { fr: "Marque-page pour ajouter le flux d'un site dans Pétrolette", ja: "ブックマークして、PétroletteにWebサイトのフィードを追加します", es: "Marcador para agregar el feed de un sitio web en Pétrolette" },
"e9156a58-a059-430d-ad36-4b14ab3b00bf" : { fr: "521311c2-ad41-4d7a-b4f0-71a27b1a9edd", ja: "e9156a58-a059-430d-ad36-4b14ab3b00bf", es: "e9156a58-a059-430d-ad36-4b14ab3b00bf" },
"Click to focus current tab" : { fr: "Cliquer pour sélectionner l'onglet courant", ja: "カレントタブを焦点を合わせるにはクリックしてください", es: "Haga clic para enfocar la pestaña actual" },
"A click on the Pétrolette logo puts the focus on the current tab" : { fr: "Un clic sur le logo Pétrolette met l'accent sur l'onglet en cours", ja: "Pétroletteのロゴをクリックすると、現在のタブに焦点が合わせる", es: "Un clic en el logotipo de Pétrolette pone el enfoque en la pestaña actual" },
......
......@@ -166,7 +166,7 @@ var PTL = (function() {
}
PTL.sideMenu('close');
PTL.feed.add($column, '', '', 'mixed', 220, 'on', '', 16, '', 30, true, false);
PTL.feed.add($column, '', '', 'mixed', 220, 'on', '', 16, '', true);
});
$feedCodeButton.click(function(event) {
......
......@@ -231,7 +231,7 @@ PTL.tab = {
$column.appendTo($tabPanel);
if (PTL.queryString) {
PTL.feed.add($column, encodeURI(PTL.queryString), '', 'mixed', 260, 'on', '', 17, '', 30, true, true);
PTL.feed.add($column, encodeURI(PTL.queryString), '', 'mixed', 260, 'on', '', 17, '', true);
PTL.queryString = null;
}
......@@ -242,7 +242,7 @@ PTL.tab = {
nbitems = Number.isInteger(feed.nbitems) ? feed.nbitems : 10,
limit = Number.isInteger(feed.limit) ? feed.limit : 260,
lastItem = feed.lastitem;
PTL.feed.add($column, feed.url, feed.name, type, limit, feed.status, feed.iconhash, nbitems, lastItem, false, false, progress);
PTL.feed.add($column, feed.url, feed.name, type, limit, feed.status, feed.iconhash, nbitems, lastItem, false, progress);
});
}
......
......@@ -372,7 +372,7 @@ PTL.util = {
{
title: 'Pétrolette',
element: 'fieldset.ptlFieldset',
intro: '<h4>' + PTL.tr('Bookmark to quickly add a website\'s feed to Pétrolette') + '</h4>' + PTL.tr('Bookmark this link, and use it to add a website\'s feed to Pétrolette.') + '<h4>' + PTL.tr('Source') + '</h4>' + PTL.tr('Use the force, read the source') + '.' + '<h4>' + PTL.tr('License') + '</h4>' + PTL.tr('JavaScript licensing information') + '.',
intro: '<h4>' + PTL.tr('Bookmark to quickly add a website\'s feed to Pétrolette') + '</h4>' + PTL.tr('Bookmark this link, and use it to add a website\'s feed to Pétrolette.') + '<iframe width="320" sandbox="allow-same-origin allow-scripts allow-popups" src="https://exode.me/videos/embed/'+ PTL.tr('e9156a58-a059-430d-ad36-4b14ab3b00bf') + '" frameborder="0" allowfullscreen style="margin-top:0.3em;"></iframe>' + '<h4>' + PTL.tr('Source') + '</h4>' + PTL.tr('Use the force, read the source') + '.' + '<h4>' + PTL.tr('License') + '</h4>' + PTL.tr('JavaScript licensing information') + '.',
position: 'right'
}
]
......
<div id="newFeedDialog">
<form>
<fieldset>
<legend class="translate" data-content="Name">URL</legend>
<div class="flexBox">
<input
name="name"
id="tabNameInput"
value=""
onclick="this.select()"
class="grow ui-corner-all" />
</div>
</fieldset>
</form>
</div>
<div id="feed-prefs">
<form>
<legend data-content="Location"
......
Supports Markdown
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