* refactor codes.
This commit is contained in:
@@ -130,11 +130,11 @@ $(function()
|
||||
var action = event.action, $target = $(event.target), item = event.item;
|
||||
if(action.type === 'edit')
|
||||
{
|
||||
$target.modalTrigger(
|
||||
{
|
||||
new $.zui.ModalTrigger({
|
||||
type: 'ajax',
|
||||
url: action.linkTemplate.format(item.id)
|
||||
}).trigger('click');
|
||||
url: action.linkTemplate.format(item.id),
|
||||
keyboard: true
|
||||
}).show();
|
||||
}
|
||||
else if(action.type === 'delete')
|
||||
{
|
||||
|
||||
@@ -15,24 +15,32 @@ $webRoot = $this->app->getWebRoot();
|
||||
$jsRoot = $webRoot . "js/";
|
||||
?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<form action="<?php echo inlink('edit', 'deptID=' . $dept->id);?>" target='hiddenwin' method='post' class='mt-10px' id='dataform'>
|
||||
<table class='table table-form' style='width:100%'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->parent;?></th>
|
||||
<td><?php echo html::select('parent', $optionMenu, $dept->parent, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->name;?></th>
|
||||
<td><?php echo html::input('name', $dept->name, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->manager;?></th>
|
||||
<td><?php echo html::select('manager', $users, $dept->manager, "class='form-control chosen'", true);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div class='modal-dialog w-500px'>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
|
||||
<h4 class="modal-title"><strong><?php echo $lang->dept->edit;?></strong></h4>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<form action="<?php echo inlink('edit', 'deptID=' . $dept->id);?>" target='hiddenwin' method='post' class='mt-10px' id='dataform'>
|
||||
<table class='table table-form' style='width:100%'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->parent;?></th>
|
||||
<td><?php echo html::select('parent', $optionMenu, $dept->parent, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->name;?></th>
|
||||
<td><?php echo html::input('name', $dept->name, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->dept->manager;?></th>
|
||||
<td><?php echo html::select('manager', $users, $dept->manager, "class='form-control chosen'", true);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -178,12 +178,11 @@ $(function()
|
||||
var action = event.action, $target = $(event.target), item = event.item;
|
||||
if(action.type === 'edit')
|
||||
{
|
||||
$target.modalTrigger(
|
||||
{
|
||||
new $.zui.ModalTrigger({
|
||||
type: 'ajax',
|
||||
url: action.linkTemplate.format(item.id),
|
||||
keyboard: true
|
||||
}).trigger('click');
|
||||
}).show();
|
||||
}
|
||||
else if(action.type === 'delete')
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ $jsRoot = $webRoot . "js/";
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<div class='modal-dialog w-500px'>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<button type="button" class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
|
||||
<h4 class="modal-title"><strong><?php echo $lang->tree->edit;?></strong></h4>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
|
||||
Reference in New Issue
Block a user