From: Marcel Werk Date: Wed, 13 Jun 2012 22:24:27 +0000 (+0200) Subject: Small fixes X-Git-Tag: 2.0.0_Beta_1~1072 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=859e856641dd7f3f356e6f6490a3ef4b17bffc72;p=GitHub%2FWoltLab%2FWCF.git Small fixes --- diff --git a/wcfsetup/install/files/acp/templates/cronjobList.tpl b/wcfsetup/install/files/acp/templates/cronjobList.tpl index a3e941fc50..d38b26d713 100644 --- a/wcfsetup/install/files/acp/templates/cronjobList.tpl +++ b/wcfsetup/install/files/acp/templates/cronjobList.tpl @@ -5,34 +5,34 @@

{lang}wcf.acp.cronjob.list{/lang}

{lang}wcf.acp.cronjob.subtitle{/lang}

- - + +
{pages print=true assign=pagesLinks controller="CronjobList" link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"} @@ -132,10 +132,9 @@ {/content} -
{hascontentelse} -

{lang}wcf.acp.cronjob.noneAvailable{/lang}

+

{lang}wcf.acp.cronjob.noneAvailable{/lang}

{/hascontent}
diff --git a/wcfsetup/install/files/acp/templates/optionFieldList.tpl b/wcfsetup/install/files/acp/templates/optionFieldList.tpl index d16ee009e6..70d15c7520 100644 --- a/wcfsetup/install/files/acp/templates/optionFieldList.tpl +++ b/wcfsetup/install/files/acp/templates/optionFieldList.tpl @@ -5,7 +5,7 @@ {else} {assign var=error value=''} {/if} -
+
{@$optionData[html]} {if $error} @@ -13,7 +13,7 @@ {if $error == 'empty'} {lang}wcf.global.form.error.empty{/lang} {else} - {lang}wcf.user.option.error.{$error}{/lang} + {lang}{@$langPrefix}error.{$error}{/lang} {/if} {/if} diff --git a/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php b/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php index a6fda43f96..26978f1bda 100644 --- a/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php +++ b/wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php @@ -129,7 +129,7 @@ class UserOptionHandler extends OptionHandler { $option->setUser($this->user); } - if ($this->inRegistration && !$option->askDuringRegistration) { + if ($this->inRegistration && !$option->askDuringRegistration && !$option->required) { return false; } diff --git a/wcfsetup/install/files/lib/system/template/plugin/EncodeJSModifierTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/EncodeJSModifierTemplatePlugin.class.php index 8a5b66e763..3494d32718 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/EncodeJSModifierTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/EncodeJSModifierTemplatePlugin.class.php @@ -23,18 +23,6 @@ class EncodeJSModifierTemplatePlugin implements IModifierTemplatePlugin { * @see wcf\system\template\IModifierTemplatePlugin::execute() */ public function execute($tagArgs, TemplateEngine $tplObj) { - // escape backslash - $tagArgs[0] = StringUtil::replace("\\", "\\\\", $tagArgs[0]); - - // escape singe quote - $tagArgs[0] = StringUtil::replace("'", "\'", $tagArgs[0]); - - // escape new lines - $tagArgs[0] = StringUtil::replace("\n", '\n', $tagArgs[0]); - - // escape slashes - $tagArgs[0] = StringUtil::replace("/", '\/', $tagArgs[0]); - - return $tagArgs[0]; + return StringUtil::encodeJS($tagArgs[0]); } } diff --git a/wcfsetup/install/files/lib/util/StringUtil.class.php b/wcfsetup/install/files/lib/util/StringUtil.class.php index eacf669f43..0278114ce1 100644 --- a/wcfsetup/install/files/lib/util/StringUtil.class.php +++ b/wcfsetup/install/files/lib/util/StringUtil.class.php @@ -139,6 +139,30 @@ final class StringUtil { return @htmlspecialchars($string, ENT_COMPAT, 'UTF-8'); } + /** + * Converts javascript special characters. + * + * @param string $string + * @return string $string + */ + public static function encodeJS($string) { + if (is_object($string)) $string = $string->__toString(); + + // escape backslash + $string = StringUtil::replace("\\", "\\\\", $string); + + // escape singe quote + $string = StringUtil::replace("'", "\'", $string); + + // escape new lines + $string = StringUtil::replace("\n", '\n', $string); + + // escape slashes + $string = StringUtil::replace("/", '\/', $string); + + return $string; + } + /** * Decodes html entities. * diff --git a/wcfsetup/install/files/style/alerts.less b/wcfsetup/install/files/style/alerts.less index 8df228fc30..dcab7773f0 100644 --- a/wcfsetup/install/files/style/alerts.less +++ b/wcfsetup/install/files/style/alerts.less @@ -22,7 +22,7 @@ height: 24px; left: 13px; position: absolute; - top: 6px; + top: 5px; width: 24px; } diff --git a/wcfsetup/install/files/style/forms.less b/wcfsetup/install/files/style/forms.less index bea8612171..04f1fb8425 100644 --- a/wcfsetup/install/files/style/forms.less +++ b/wcfsetup/install/files/style/forms.less @@ -110,8 +110,10 @@ fieldset { } /* disabled state */ - &.disabled > dt { - color: @wcfDimmedColor; + &.disabled { + > dt, > dd > label { + color: @wcfDimmedColor; + } } } } diff --git a/wcfsetup/install/files/style/inputs.less b/wcfsetup/install/files/style/inputs.less index e0e4e155f1..4f7276c6a6 100644 --- a/wcfsetup/install/files/style/inputs.less +++ b/wcfsetup/install/files/style/inputs.less @@ -86,7 +86,7 @@ textarea:focus, select[multiple]:focus { background-color: @wcfInputHoverBackgroundColor; border-color: @wcfInputHoverBorderColor; - outline: none; + outline: 0; .boxShadowNative(~"0 0 5px" fade(@wcfInputHoverBorderColor, 50%) ~", inset 0 1px 5px rgba(0, 0, 0, .1)"); } @@ -134,6 +134,18 @@ select[multiple][disabled] { .boxShadowNative(~"0 0 5px" fade(@wcfErrorBackgroundColor, 50%) ~", inset 0 1px 5px rgba(0, 0, 0, .1)"); } +/* success state */ +.formSuccess input[type='text'], +.formSuccess input[type='search'], +.formSuccess input[type='email'], +.formSuccess input[type='url'], +.formSuccess input[type='password'], +.formSuccess textarea { + border-color: @wcfSuccessBackgroundColor; + + .boxShadowNative(~"0 0 5px" fade(@wcfSuccessBackgroundColor, 50%) ~", inset 0 1px 5px rgba(0, 0, 0, .1)"); +} + /* width */ textarea { width: 99%; diff --git a/wcfsetup/install/files/style/layout.less b/wcfsetup/install/files/style/layout.less index e10f6bb740..3a4996d53e 100644 --- a/wcfsetup/install/files/style/layout.less +++ b/wcfsetup/install/files/style/layout.less @@ -26,7 +26,7 @@ a { } :focus { - outline: 0; + /*outline: 0;*/ } #pageHeader {