Skip to content

Commit

Permalink
modify table add,edit,delete operation
Browse files Browse the repository at this point in the history
  • Loading branch information
hivefans committed Sep 16, 2013
1 parent 72c2303 commit dacc9d4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion application/models/users_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function update_member($id)
);
$username=$this->input->post('username');
$this->db->where('id', $id);
$this->db->update('member', $member_update_data);
$this->db->update('member', $member_update_data);
if($this->input->post('username')==$this->session->userdata('user_name'))
{
$data = array(
Expand Down
6 changes: 3 additions & 3 deletions application/views/manage/addgroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
if(isset($flash_message)){
if($flash_message == TRUE)
{
echo '<div class="alert alert-success">';
echo '<div class="alert alert-success rmonitor">';
echo '<a class="close" data-dismiss="alert">×</a>';
echo '<strong>Well done!</strong> group info add with success.';
echo '</div>';
Expand All @@ -20,7 +20,7 @@

<div id="sensors" class='boxit'>

<form action="<?php echo site_url("manage/addgroup")?>" method="post" class="form-horizontal">
<form action="<?php echo site_url("manage/addgroup")?>" method="post" class="form-horizontal">
<fieldset>
<div class="control-group">
<label for="inputError" class="control-label">group name</label>
Expand All @@ -36,6 +36,6 @@
</div>
</fieldset>

</form>
</form>

</div>
2 changes: 1 addition & 1 deletion application/views/manage/edituser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if(isset($flash_message)){
if($flash_message == TRUE)
{
echo '<div class="alert alert-success">';
echo '<div class="alert alert-success rmonitor">';
echo '<a class="close" data-dismiss="alert">×</a>';
echo '<strong>Well done!</strong> user info edit with success.';
echo '</div>';
Expand Down
22 changes: 14 additions & 8 deletions application/views/table_records.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ function truntable()
if (status=="success")
{
$('#truntable').text("Truncate");
$('#truntable').attr('disabled',false);
alert(response);
$('#truntable').attr('disabled',false);
closemodal("trun");
location.reload();
$('#resultdiv').show();
$('#resultinfo').html('truncate table <?php echo $tablename?> success!');
var grid = $("#grid").data("kendoGrid");
grid.dataSource.read();
grid.refresh();
}

})
Expand All @@ -91,7 +94,7 @@ function deltable()
$('#truntable').attr('disabled',false);
alert('delete table success');
closemodal("deltab");
window.location= ('<?php echo $this->config->base_url();?>index.php');
window.location= ('<?php echo $this->config->base_url();?>');
}
})

Expand All @@ -103,6 +106,11 @@ function closemodal(divid)

</script>

<div id="resultdiv" class="alert alert-success hide">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<div id="resultinfo"></div>
</div>

<div>
<h2><?php echo $tablename?></h2>
</div>
Expand Down Expand Up @@ -311,10 +319,8 @@ function categoryDropDownEditor(container, options) {
};
function onRequestEnd(e) {
if(e.type=="update" || e.type=="create")
{
alert(e.response[0].result);
location.reload();

{
$("#grid").data("kendoGrid").dataSource.read();
}
};

Expand Down

0 comments on commit dacc9d4

Please sign in to comment.