* refactory checkall.

This commit is contained in:
chencongzhi520@gmail.com
2012-04-29 06:52:05 +00:00
parent 7ec3b9e871
commit 039504e882
10 changed files with 2 additions and 57 deletions
-7
View File
@@ -1,7 +0,0 @@
function checkall(checker, id)
{
$('#' + id + ' input').each(function()
{
$(this).attr("checked", checker.checked)
});
}
-16
View File
@@ -1,19 +1,3 @@
function check(checker, module)
{
$('#' + module + ' input').each(function()
{
$(this).attr("checked", checker.checked)
});
}
function checkall(checker)
{
$('input').each(function()
{
$(this).attr("checked", checker.checked)
});
}
function showPriv(value)
{
$('.priv').removeClass('red');
-1
View File
@@ -32,7 +32,6 @@ $lang->group->users = 'Users';
$lang->group->module = 'Module';
$lang->group->method = 'Method';
$lang->group->priv = 'Priviledge';
$lang->group->checkall = 'Select all';
$lang->group->option = 'Option';
$lang->group->inside = 'Group users';
$lang->group->outside = 'Other users';
-1
View File
@@ -32,7 +32,6 @@ $lang->group->users = '用户列表';
$lang->group->module = '模块';
$lang->group->method = '方法';
$lang->group->priv = '权限';
$lang->group->checkall = '全选';
$lang->group->option = '选项';
$lang->group->inside = '组内用户';
$lang->group->outside = '组外用户';
-1
View File
@@ -32,7 +32,6 @@ $lang->group->users = '用戶列表';
$lang->group->module = '模組';
$lang->group->method = '方法';
$lang->group->priv = '權限';
$lang->group->checkall = '全選';
$lang->group->option = '選項';
$lang->group->inside = '組內用戶';
$lang->group->outside = '組外用戶';
+2 -2
View File
@@ -25,7 +25,7 @@
</tr>
<?php foreach($lang->resource as $moduleName => $moduleActions):?>
<tr class='f-14px <?php echo cycle('even, bg-yellow');?>'>
<th class='a-right'><?php echo $this->lang->$moduleName->common;?> <input type='checkbox' onclick='check(this, "<?php echo $moduleName;?>")'></td>
<th class='a-right'><?php echo $this->lang->$moduleName->common;?> <input type='checkbox' onclick='checkall(this, "<?php echo $moduleName;?>")'></td>
<td id='<?php echo $moduleName;?>' class='pv-10px'>
<?php $i = 1;?>
<?php foreach($moduleActions as $action => $actionLabel):?>
@@ -39,7 +39,7 @@
</tr>
<?php endforeach;?>
<tr>
<th class='rowhead'><?php echo $lang->group->checkall;?><input type='checkbox' onclick='checkall(this);'></th>
<th class='rowhead'><?php echo $lang->selectAll;?><input type='checkbox' onclick='checkall(this);'></th>
<td class='a-center'>
<?php
echo html::submitButton($lang->save);
-7
View File
@@ -1,10 +1,3 @@
function checkall(checker)
{
$('input').each(function()
{
$(this).attr("checked", checker.checked)
});
}
$(function()
{
$('#' + type + 'Tab').addClass('active');
-7
View File
@@ -1,7 +0,0 @@
function checkall(checker)
{
$('input').each(function()
{
$(this).attr("checked", checker.checked)
});
}
-8
View File
@@ -1,11 +1,3 @@
function checkall(checker)
{
$('input').each(function()
{
$(this).attr("checked", checker.checked)
});
}
function browseByModule(active)
{
$('.side').removeClass('hidden');
-7
View File
@@ -1,7 +0,0 @@
function checkall(checker)
{
$('input').each(function()
{
$(this).attr("checked", checker.checked)
});
}