Fix custom class name focusing in labelAdd.tpl
authorTim Düsterhus <timwolla@googlemail.com>
Mon, 3 Jun 2013 13:01:16 +0000 (15:01 +0200)
committerTim Düsterhus <timwolla@googlemail.com>
Mon, 3 Jun 2013 13:01:16 +0000 (15:01 +0200)
see http://beta.woltlab.com/index.php/Thread/1780-Label-customCssClassName-kein-Input-m%C3%B6glich/

wcfsetup/install/files/acp/templates/labelAdd.tpl

index 93289d0ba7c2ab47beab3ceff4a5c57821185f8a..59b64ca6ce3f995c78b82093f1747b35546b4890 100644 (file)
@@ -8,6 +8,10 @@
                });
                
                new WCF.Label.ACPList();
+               
+               $('#customCssClassName').click(function() {
+                       $(this).parents('li').find('input[type=radio]').click();
+               });
        });
        //]]>
 </script>
@@ -86,7 +90,7 @@
                                                <ul id="labelList">
                                                        {foreach from=$availableCssClassNames item=className}
                                                                {if $className == 'custom'}
-                                                                       <li class="labelCustomClass"><label><input type="radio" name="cssClassName" value="custom"{if $cssClassName == 'custom'} checked="checked"{/if} /> <span><input type="text" id="customCssClassName" name="customCssClassName" value="{$customCssClassName}" class="long" /></span></label></li>
+                                                                       <li class="labelCustomClass"><input type="radio" name="cssClassName" value="custom"{if $cssClassName == 'custom'} checked="checked"{/if} /> <span><input type="text" id="customCssClassName" name="customCssClassName" value="{$customCssClassName}" class="long" /></span></li>
                                                                {else}
                                                                        <li><label><input type="radio" name="cssClassName" value="{$className}"{if $cssClassName == $className} checked="checked"{/if} /> <span class="badge label{if $className != 'none'} {$className}{/if}">Label</span></label></li>
                                                                {/if}