Commit 38f4dbbf authored by yPhil's avatar yPhil

Dialog: Solved the https://stackoverflow.com/q/47121981/1729094 bug (destroy the dialog)

parent 4b11c098
This diff is collapsed.
......@@ -54,19 +54,31 @@
color: green !important;
}
div.mobDialog legend,
#menu legend {
font-family: 'Ubuntu' !important;
font-weight: normal;
legend {
font-family: 'FyodorBold' !important;
font-weight: bold;
font-style: italic;
/* color: #6E7A94 !important; */
/* font-size:100% !important; */
}
fieldset > p {
margin: 0 0 .2em 0;
}
p, label {
font-size:12pt;
font-family: 'ArimaKoshiRegular';
font-weight: normal;
font-style: normal;
line-height: 1.2em;
color: #FFD05B;
}
fieldset,
legend {
background-color: #84A6CB !important;
/* color: #3C2413 !important; */
background-color: #453246 !important;
color: #BFD8D1 !important;
/* font-size:76% !important; */
}
......@@ -74,7 +86,7 @@ legend {
.ui-dialog,
.ui-dialog .ui-dialog-buttonpane,
.handle {
background-color: #9099A2 !important;
background-color: #2B374B !important;
color: #000000 !important;
}
......@@ -93,7 +105,7 @@ legend {
#menu .ui-state-active,
#menu .ui-state-hover {
background-color: #FFDC00 !important;
background-color: #FFD05B !important;
color: #001F3F !important;
}
......@@ -162,7 +174,6 @@ input {
}
fieldset.prefsForm {
text-align:left;
display:flex;
flex-flow: row wrap;
}
......@@ -174,10 +185,6 @@ fieldset.menuForm {
align-items: stretch;
}
fieldset > p {
font-size:12pt;
}
label {
margin: 5px 0;
}
......@@ -266,11 +273,6 @@ legend {
font-size: 1.5rem !important;
}
.mobDialog p {
vertical-align: middle;
line-height: normal;
}
#killDialog .mobylette {
color: red;
font-size: 3.5rem !important;
......
......@@ -130,14 +130,13 @@ var Dialog = (function() {
Feed.populateFeed($feedPrefsButton);
Tab.saveTabs();
$(this).dialog( 'close' );
$(this).dialog( 'destroy' );
$('#mobDialogs').empty();
}
},
open: function(event, ui) {
var $dialog = $(this),
$tabFeedId = $('li#' + $dataStore.data('id')),
$mobFeedRefresh = $tabFeedId.find('.mobFeedRefresh'),
......@@ -185,25 +184,32 @@ var Dialog = (function() {
console.log( 'Always %s (status: %s)', $guessField.val(), status);
});
});
$spinner.spinner( "value", oldLimit);
$(this).find('input#feedGuess').val(oldUrl);
$dialog.find('input#feedGuess').val(oldUrl);
$(this).find('.feedType').checkboxradio();
// $dialog.find('.feedType').checkboxradio();
$(this).find('input#' + oldType || 'mixed').prop("checked", true)
$("input:radio, input:checkbox").checkboxradio({
icon: true
});
$dialog.find('input#' + oldType || 'mixed').prop("checked", true)
.checkboxradio('refresh');
$(this).find('#feedType').controlgroup();
$dialog.find('#feedType').controlgroup();
$(this).find('.feedType').on("change", function(event){
console.log("CHANGE EVENT!", $(this).attr('id'));
$dialog.find('#feedType').controlgroup('refresh');
$(this).addClass('ui-state-checked ui-state-active');
});
// $dialog.find('.feedType').on("change", function(event){
// console.log("CHANGE EVENT!", $(this).attr('id'));
// $(this).attr("checked","checked").change();
// });
// $dialog.find('.feedType').click(function(event){
// console.log("CHANGE EVENT!", $(this).attr('id'));
// $dialog.find('#feedType').controlgroup('refresh');
// });
$dialog.find('div#feedLimit').slider({
value: oldLimit,
......
......@@ -52,13 +52,13 @@
What type of feed? All text, all image, or mixed.
</p>
<label for="mixed">Mixed</label>
<input type="radio" name="radio-1" id="mixed" class="feedType" />
<input type="radio" name="radio-1" id="mixed">
<label for="photo">Photo</label>
<input type="radio" name="radio-1" id="photo" class="feedType" />
<input type="radio" name="radio-1" id="photo">
<label for="text">Text</label>
<input type="radio" name="radio-1" id="text" class="feedType" />
<input type="radio" name="radio-1" id="text">
</fieldset>
<fieldset id="feedLimit" class="ui-widget ui-widget-content ui-corner-all">
......
......@@ -6,8 +6,6 @@ var request = require('request'); // for fetching the feed
var feedrat = require('feedrat');
var cheerio = require('cheerio');
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
});
......
......@@ -5,12 +5,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mobylette</title>
<link rel="shortcut icon" type="image/png" href="/static/images/favicon.png" />
<link rel="stylesheet" href="/static/css/fontello.css">
<link rel="preload" href="/static/css/themes/day.css">
<link rel="preload" href="/static/css/themes/night.css">
<link rel="shortcut icon" type="image/png" href="/static/images/favicon.png" />
<script src="/bower/jquery/dist/jquery.js"></script>
<script src="/bower/jquery-ui/jquery-ui.js"></script>
......@@ -25,8 +26,8 @@
<link rel="stylesheet" id="mobStyle" href="/static/css/themes/day.css">
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/fyodor" type="text/css"/>
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/arima-koshi" type="text/css"/>
<script>
document.fonts.onloadingdone = function (fontFaceSetEvent) {
......
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