Commit 4d72e035 by yPhil

Merge branch 'feed-item'

parents 0730102b c99aadb4
Pipeline #44984 passed with stage
in 44 seconds
......@@ -130,7 +130,7 @@ PTL.dialog = {
.data('url', newUrl)
.data('type', newType);
if ($('input[name=killFeedChbox]:checked').val() === 'on') {
if ($('input[name=kill-feed-check]:checked').val() === 'on') {
$feed.hide('fade', 1000, function() {
$feed.remove();
......@@ -149,8 +149,6 @@ PTL.dialog = {
],
open: function() {
// $('.ui-dialog :button').focus();
$('.ui-widget-overlay, .ui-dialog-titlebar-close').on('click', function() {
PTL.dialog.kill($dialog);
if (isNewFeed) {
......@@ -196,16 +194,28 @@ PTL.dialog = {
$guessSpinner = $dialog.find('button#feed-guess > i'),
$guessField = $dialog.find('input#feed-guess'),
$okButton = $dialog.find('.ui-dialog-buttonpane'),
$helpButton = $('<button type="button" class="ui-button ui-corner-all ui-widget ui-button-icon-only ui-dialog-titlebar-help" title="Help"><span class="ui-button-icon ui-icon ui-icon-help"></span><span class="ui-button-icon-space"> </span>Help</button>');
// var $helpSpan = $('<span>').attr('class', 'ui-button-icon ui-icon ui-icon-help');
$killFeedFieldset = $('fieldset#kill-feed'),
$helpMiniButtonIcon,
$helpMiniButton,
oldUrl = $dataStore.data('url'),
oldType = $dataStore.data('type'),
oldLimit = $dataStore.data('limit');
// var $helpButton = $('<button').attr('title', 'Help').append($helpSpan);
$helpMiniButtonIcon = $('<span>')
.attr('class', 'ui-button-icon ui-icon ui-icon-help');
$('#killFeedChbox').button();
$helpMiniButton = $('<button>')
.attr('class', 'ui-button ui-corner-all ui-widget ui-button-icon-only ui-dialog-titlebar-help')
.attr('title', PTL.tr('How does it work?'))
.attr('type', 'button')
.append($helpMiniButtonIcon)
.on('click', function() {
PTL.util.help('dialog');
}).appendTo($dialog.parent().find('.ui-dialog-titlebar'));
$dialog.parent().find('.ui-dialog-titlebar').append($helpButton);
if (isNewFeed) {
$killFeedFieldset.remove();
}
if (!PTL.util.isMobile()) {
$guessField.click(function() {
......@@ -213,16 +223,6 @@ PTL.dialog = {
});
}
$helpButton.on('click', function() {
PTL.util.help('dialog');
});
var oldUrl = $dataStore.data('url'),
oldType = $dataStore.data('type'),
oldLimit = $dataStore.data('limit');
$guessButton.click(function() {
$guessSpinner
......@@ -236,7 +236,6 @@ PTL.dialog = {
timeout: 1200
}, function() {
$guessSpinner.removeClass('spin icon-cog');
}).done(function(feed, status) {
$guessField.val(feed);
......@@ -251,7 +250,6 @@ PTL.dialog = {
}).fail(function(feed, status) {
guessError();
});
});
......@@ -265,12 +263,12 @@ PTL.dialog = {
$dialog.find('input#' + oldType || 'mixed').prop('checked', true)
.checkboxradio('refresh');
$spinner.on( 'spinstop', function() {
$dialog.find('div#feedLimit').slider( 'option', 'value', $(this).val());
$dialog.find('.ui-slider-handle').text($(this).val());
});
$spinner.spinner( 'value', oldLimit);
$spinner
.spinner( 'value', oldLimit)
.on( 'spinstop', function() {
$dialog.find('div#feedLimit').slider( 'option', 'value', $(this).val());
$dialog.find('.ui-slider-handle').text($(this).val());
});
$dialog.find('div#feedLimit').slider({
value: oldLimit,
......@@ -294,15 +292,11 @@ PTL.dialog = {
$dialog.on('submit', function () {
PTL.feed.populate($feedRefresh);
PTL.tab.saveTabs();
$(this).dialog('destroy');
return false;
});
// $dialog.find('#feed-guess').select();
}
});
......
......@@ -87,7 +87,7 @@
</fieldset>
<fieldset id="killFeed" class="prefsForm ui-widget ui-widget-content ui-corner-all">
<fieldset id="kill-feed" class="prefsForm ui-widget ui-widget-content ui-corner-all">
<legend data-title="Delete this feed"
data-content="Delete this feed"
......@@ -96,10 +96,10 @@
<div id="feedDel"
class="flex-box">
<input type="checkbox" name="killFeedChbox" id="killFeedChbox">
<label id="killFeed"
<input type="checkbox" name="kill-feed-check" id="kill-feed-check">
<label id="kill-feed"
class="dangerous translate last"
for="killFeedChbox"
for="kill-feed-check"
data-title="Delete feed"
title="Delete feed"
data-content="Delete feed">
......
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