issue 160, added toggle checkbox on addon setup

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9153 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-09-15 06:30:56 +00:00
parent 3301e40cf5
commit 562b227f74

View file

@ -48,6 +48,7 @@
<block cond="$mid_list">
<h3 class="h3">{$lang->module}</h3>
<p>{$lang->about_addon_mid}</p>
<p><input type="checkbox" id="check_all" /> <label for="check_all">Check all</label></p>
<fieldset loop="$mid_list => $module_category_srl, $modules" style="border: 1px solid #ccc; margin:1em 0; padding:.5em 1em">
<legend cond="$modules->title">{$modules->title}</legend>
<legend cond="!$modules->title">{$lang->none_category}</legend>
@ -61,4 +62,16 @@
<span class="btn medium"><input type="submit" value="{$lang->cmd_save}" /></span>
</div>
</form>
</block>
</block>
<script type="text/javascript">
(function($){
$('#check_all')
.bind('click', function(e){
if (this.checked){
$('input[name=mid_list\\[\\]]').attr('checked', 'checked');
}else{
$('input[name=mid_list\\[\\]]').removeAttr('checked');
}
});
})(jQuery);
</script>