kopia lustrzana https://github.com/magicbug/Cloudlog
Edit functions moved to a popup window
rodzic
12706b313c
commit
c3f0ebd967
|
@ -74,15 +74,15 @@ class QSO extends CI_Controller {
|
|||
|
||||
if ($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('layout/mini_header');
|
||||
$this->load->view('qso/edit', $data);
|
||||
$this->load->view('layout/footer');
|
||||
$this->load->view('layout/mini_footer');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->logbook_model->edit();
|
||||
$this->session->set_flashdata('notice', 'Record Updated');
|
||||
redirect('logbook');
|
||||
redirect('qso/edit/'.$this->input->post('id'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,10 @@ class QSO extends CI_Controller {
|
|||
$this->logbook_model->delete($id);
|
||||
|
||||
$this->session->set_flashdata('notice', 'QSO Deleted Successfully');
|
||||
redirect('logbook');
|
||||
$data['message_title'] = "Deleted";
|
||||
$data['message_contents'] = "QSO Deleted Successfully";
|
||||
$this->load->view('messages/message', $data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
'transitionOut' : 'fade',
|
||||
'type' : 'iframe'
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>Web Logbook</title>
|
||||
<link rel="stylesheet" href="<?php echo base_url();?>css/reset.css" type="text/css" />
|
||||
<link type="text/css" href="<?php echo base_url(); ?>css/flick/jquery-ui-1.8.12.custom.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>/css/popup.css">
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>js/jquery-1.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>js/jquery-ui-1.8.12.custom.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>js/global.js"></script>
|
||||
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
|
@ -0,0 +1,33 @@
|
|||
<html>
|
||||
<head>
|
||||
<title><?php echo $message_title; ?></title>
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font-family: Lucida Grande, Verdana, Sans-serif;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#content {
|
||||
border: #999 1px solid;
|
||||
background-color: #fff;
|
||||
padding: 20px 20px 12px 20px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
color: #990000;
|
||||
margin: 0 0 4px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<h1><?php echo $message_title; ?></h1>
|
||||
<p><?php echo $message_contents; ?></p> </div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,9 +1,9 @@
|
|||
<h2>Add QSO</h2>
|
||||
<div class="wrap_content note">
|
||||
<?php echo validation_errors(); ?>
|
||||
<div style="float: right">
|
||||
<p><a href="<?php echo site_url('qso/delete'); ?>/<?php echo $COL_PRIMARY_KEY; ?>" ><img src="<?php echo base_url(); ?>/images/delete.png" width="16" height="16" alt="Delete" /> Delete QSO</a></p>
|
||||
<div style="float: right; padding-right: 10px;">
|
||||
<p><a href="<?php echo site_url('qso/delete'); ?>/<?php echo $COL_PRIMARY_KEY; ?>" >Delete QSO <img src="<?php echo base_url(); ?>/images/delete.png" width="16" height="16" alt="Delete" /></a></p>
|
||||
</div>
|
||||
<h2>Edit QSO</h2>
|
||||
<div class="wrap_content">
|
||||
<?php echo validation_errors(); ?>
|
||||
<form method="post" action="<?php echo site_url('qso/edit'); ?>" name="qsos">
|
||||
<table>
|
||||
<tr>
|
||||
|
|
|
@ -14,9 +14,53 @@ i=0;
|
|||
$(document).ready(function(){
|
||||
$("#callsign").keyup(function(){
|
||||
if ($(this).val()) {
|
||||
$('#partial_view').load("logbook/search_result/" + $(this).val()).fadeIn("slow");
|
||||
|
||||
$('#partial_view').load("logbook/search_result/" + $(this).val(), function() {
|
||||
// after load trigger your fancybox
|
||||
$(".editbox").fancybox({
|
||||
'autoDimensions' : false,
|
||||
'width' : 700,
|
||||
'height' : 550,
|
||||
'transitionIn' : 'fade',
|
||||
'transitionOut' : 'fade',
|
||||
'type' : 'iframe',
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url() ;?>/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url() ;?>/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ;?>/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(".qsobox").fancybox({
|
||||
'autoDimensions' : false,
|
||||
'width' : 700,
|
||||
'height' : 300,
|
||||
'transitionIn' : 'fade',
|
||||
'transitionOut' : 'fade',
|
||||
'type' : 'iframe'
|
||||
});
|
||||
|
||||
$(".editbox").fancybox({
|
||||
'autoDimensions' : false,
|
||||
'width' : 700,
|
||||
'height' : 550,
|
||||
'transitionIn' : 'fade',
|
||||
'transitionOut' : 'fade',
|
||||
'type' : 'iframe',
|
||||
onCleanup : function() {
|
||||
return window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
|
@ -14,6 +14,19 @@
|
|||
'transitionOut' : 'fade',
|
||||
'type' : 'iframe'
|
||||
});
|
||||
|
||||
$(".editbox").fancybox({
|
||||
'autoDimensions' : false,
|
||||
'width' : 700,
|
||||
'height' : 550,
|
||||
'transitionIn' : 'fade',
|
||||
'transitionOut' : 'fade',
|
||||
'type' : 'iframe',
|
||||
onCleanup : function() {
|
||||
return window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -100,7 +113,7 @@
|
|||
<td><?php echo $row->COL_BAND; ?></td>
|
||||
<?php } ?>
|
||||
<td><?php echo $row->COL_COUNTRY; ?></td>
|
||||
<td><?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?><a href="<?php echo site_url('qso/edit'); ?>/<?php echo $row->COL_PRIMARY_KEY; ?>" ><img src="<?php echo base_url(); ?>/images/application_edit.png" width="16" height="16" alt="Edit" />
|
||||
<td><?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?><a class="editbox" href="<?php echo site_url('qso/edit'); ?>/<?php echo $row->COL_PRIMARY_KEY; ?>" ><img src="<?php echo base_url(); ?>/images/application_edit.png" width="16" height="16" alt="Edit" />
|
||||
<?php } ?></a></td>
|
||||
</tr>
|
||||
<?php $i++; } ?>
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
body { font-size: 15px; font-family: Arial, "Trebuchet MS", sans-serif; }
|
||||
pre { font-family: Courier New; font-size: 11px;}
|
||||
h2 { margin: 0 auto; font-weight: bold; font-size: 23px; margin-top: 5px; margin-bottom: 10px; }
|
||||
h3 { font-weight: bold; font-size: 16px; margin: 5px; margin-left: 0px; }
|
||||
.clear { clear: both; }
|
||||
.small { font-size: 9px; }
|
||||
.error { color: #a00; }
|
||||
p { line-height: 1.7; margin: 0px 0; }
|
||||
|
||||
/* Tables */
|
||||
td { padding: 1px;}
|
||||
.tr1 td { background:none repeat scroll 0 0 #F0FFFF; }
|
||||
table .titles { font-weight: bold; }
|
||||
|
||||
/* Content Area */
|
||||
.wrap_content { background-color: #ffffff; }
|
||||
|
||||
/* Message boxes */
|
||||
#message { margin: 0 auto; width: 770px; border: 1px solid #fcefa1; background-color: #fbfaf3; padding: 5px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; font-size: 12px; }
|
||||
#message p { line-height: 1.7; margin: 0px 0; }
|
||||
|
||||
/* Links */
|
||||
a { text-decoration: none; color: #000; }
|
||||
a:hover { text-decoration: underline; }
|
||||
|
||||
/* Tabs */
|
||||
#tabs { margin: 5px; }
|
||||
.ui-widget-content { border: none; }
|
||||
.ui-widget-header { background: none; border: none; border-bottom: 1px solid #DDD; }
|
Ładowanie…
Reference in New Issue