diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index a96c2367..59c3359c 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -370,31 +370,42 @@
- +
- -
- - +
+
+ + +
diff --git a/gui/slick/js/config.js b/gui/slick/js/config.js index 709d3ac7..e9fafc52 100644 --- a/gui/slick/js/config.js +++ b/gui/slick/js/config.js @@ -9,7 +9,38 @@ $(document).ready(function(){ $('#content_'+$(this).attr('id')).fadeIn("fast", "linear"); else $('#content_'+$(this).attr('id')).fadeOut("fast", "linear"); - }); + }); + + $(".viewIf").click(function() { + if ($(this).prop('checked')) { + $('.hide_if_'+$(this).attr('id')).css('display','none'); + $('.show_if_'+$(this).attr('id')).fadeIn("fast", "linear"); + } else { + $('.show_if_'+$(this).attr('id')).css('display','none'); + $('.hide_if_'+$(this).attr('id')).fadeIn("fast", "linear"); + } + }); + + $(".datePresets").click(function() { + var def = $('#date_presets').val() + if ($(this).prop('checked') && '%x' == def) { + def = '%a, %b %d, %Y' + $('#date_use_system_default').html('1') + } else if (!$(this).prop('checked') && '1' == $('#date_use_system_default').html()) + def = '%x' + + $('#date_presets').attr('name', 'date_preset_old') + $('#date_presets').attr('id', 'date_presets_old') + + $('#date_presets_na').attr('name', 'date_preset') + $('#date_presets_na').attr('id', 'date_presets') + + $('#date_presets_old').attr('name', 'date_preset_na') + $('#date_presets_old').attr('id', 'date_presets_na') + + if (def) + $('#date_presets').val(def) + }); // bind 'myForm' and provide a simple callback function $('#configForm').ajaxForm({ diff --git a/gui/slick/js/fuzzyMoment.js b/gui/slick/js/fuzzyMoment.js index f1812dc6..0b24597b 100644 --- a/gui/slick/js/fuzzyMoment.js +++ b/gui/slick/js/fuzzyMoment.js @@ -108,8 +108,8 @@ airdate = airdatetime.clone().hour(0).minute(0).second(0).millisecond(0), today = moment({}), day = Math.abs(airdate.diff(today, 'days')), - week = airdate.diff(today, 'week'), isPast = week < 0, week = Math.abs(week), - titleThis = false, qTipTime = false + week = Math.abs(weekdiff = airdate.diff(today, 'week')), isPast = weekdiff < 0, + titleThis = false, qTipTime = false, result = (0 == week ? airdatetime.calendar() : ''); if (/\bOn\b/i.test(result)) { diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 66315646..fe356eff 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -1047,7 +1047,7 @@ class ConfigGeneral: web_password=None, version_notify=None, enable_https=None, https_cert=None, https_key=None, handle_reverse_proxy=None, sort_article=None, auto_update=None, proxy_setting=None, anon_redirect=None, git_path=None, calendar_unprotected=None, - fuzzy_dating=None, trim_zero=None, date_preset=None, time_preset=None, + fuzzy_dating=None, trim_zero=None, date_preset=None, date_preset_na=None, time_preset=None, indexer_timeout=None): results = [] @@ -1081,6 +1081,7 @@ class ConfigGeneral: if date_preset: sickbeard.DATE_PRESET = date_preset + discarded_na_data = date_preset_na if indexer_default: sickbeard.INDEXER_DEFAULT = config.to_int(indexer_default)