diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2012-07-24 17:09:26 +0200 | 
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2012-07-24 17:09:26 +0200 | 
| commit | fd40e841cb89bf9591fea06b1d396d444102243c (patch) | |
| tree | d36e2da6e85a05b48ff0c65d58ec9495fc0daf84 | |
| parent | 5bdec7669b742286a6808438a453827ce6f493d8 (diff) | |
| download | forums-fd40e841cb89bf9591fea06b1d396d444102243c.tar forums-fd40e841cb89bf9591fea06b1d396d444102243c.tar.gz forums-fd40e841cb89bf9591fea06b1d396d444102243c.tar.bz2 forums-fd40e841cb89bf9591fea06b1d396d444102243c.tar.xz forums-fd40e841cb89bf9591fea06b1d396d444102243c.zip | |
[ticket/11004] Always update suggestion button in timezone_preselect_select
Suggestion must also be updated when the suggestion is selected at first,
so we can display a correct button, when the suggestion is not selected anymore.
PHPBB3-11004
| -rw-r--r-- | phpBB/assets/javascript/core.js | 14 | 
1 files changed, 8 insertions, 6 deletions
| diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 669f662b16..17e859eedc 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -499,18 +499,20 @@ phpbb.timezone_preselect_select = function(force_selector) {  			if ($('#tz_date').val() != option.value && !force_selector) {  				// We do not select the option for the user, but notify him,  				// that we would suggest a different setting. -				$('#tz_select_date_suggest').css('display', 'inline'); -				$('#tz_select_date_suggest').attr('title', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML)); -				$('#tz_select_date_suggest').attr('value', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML.substring(0, 9))); -				$('#tz_select_date_suggest').attr('data-suggested-tz', option.innerHTML);  				phpbb.timezone_switch_date(true); +				$('#tz_select_date_suggest').css('display', 'inline');  			} else {  				option.selected = true;  				phpbb.timezone_switch_date(!force_selector); -				$('#tz_select_date_suggest').attr('data-suggested-tz', option.innerHTML);  				$('#tz_select_date_suggest').css('display', 'none');  			} -			break; + +			$('#tz_select_date_suggest').attr('title', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML)); +			$('#tz_select_date_suggest').attr('value', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML.substring(0, 9))); +			$('#tz_select_date_suggest').attr('data-suggested-tz', option.innerHTML); + +			// Found the suggestion, there cannot be more, so return from here. +			return;  		}  	}  } | 
