customizeAjaxFile:GWM
This commit is contained in:
parent
e49dbb3f99
commit
b792186e1d
@ -188,7 +188,7 @@
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="col-md-6 col-sm-6 offset-md-7">
|
||||
<div class="col-md-6 col-sm-6 offset-md-4">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button class="btn btn-primary" type="reset">Reset</button>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
|
||||
@ -78,7 +78,7 @@ public function create_business()
|
||||
$upload_logo = $this->upload->data();
|
||||
$data['logo'] = $upload_logo['file_name'];
|
||||
}
|
||||
//print_r($data); die();
|
||||
|
||||
$table="business";
|
||||
$add_admin = 0;
|
||||
if($this->input->post('add_admin'))
|
||||
@ -87,10 +87,12 @@ public function create_business()
|
||||
unset($data['add_admin']);
|
||||
}
|
||||
|
||||
//$create_assets = $this->MY_Model->insert($data,$table);
|
||||
$create_business = $this->MY_Model->insert($data,$table);
|
||||
//print_r($create_business); die();
|
||||
$create_business = 3;
|
||||
if($add_admin == 1)
|
||||
{
|
||||
redirect('user/addUser');
|
||||
redirect('user/addUser/'.$create_business);
|
||||
}else{
|
||||
redirect('business/business_list');
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<div class="col-md-6 col-sm-6 offset-md-4">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button class="btn btn-primary" type="reset">Reset</button>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
|
||||
@ -79,163 +79,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="<?php echo base_url(); ?>/assets/default/customize/ajax.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#myDatepicker').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
|
||||
$('#myDatepicker2').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
|
||||
$('#myDatepicker3').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
$('#myDatepicker4').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
|
||||
$('#myDatepicker5').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$(document).on('click','.test',function(){
|
||||
var id = $(this).attr("id");
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetDetails/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#sub-value').css('display', 'block');
|
||||
$('#sub-value').html(JSON.parse(data));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.asset_value',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetValueForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click','.asset_usage',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetUsageForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.asset_amc',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetAMCForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.asset_insurance',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetInsuranceForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.asset_image',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetImageForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).on('click','#close-form',function(){
|
||||
|
||||
$('#edit-form').css('display', 'none');
|
||||
|
||||
});
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
||||
var tab_value = $("#current_tab").val();
|
||||
|
||||
if(tab_value == 1)
|
||||
{
|
||||
$("#asset_usage-tab").tab('show');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -83,7 +83,12 @@
|
||||
<ul class=" navbar-right">
|
||||
<li class="nav-item dropdown open" style="padding-left: 15px;">
|
||||
<a href="javascript:;" class="user-profile dropdown-toggle" aria-haspopup="true" id="navbarDropdown" data-toggle="dropdown" aria-expanded="false">
|
||||
<img src="<?php echo base_url(); ?>/assets/default/images/img.jpg" alt="">
|
||||
<?php if(user()->profile_image == '' || user()->profile_image == null) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/profile_picture/profile.jpg" alt="">
|
||||
|
||||
<?php } else { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/profile_picture/<?php echo user()->profile_image; ?>" alt="">
|
||||
<?php } ?>
|
||||
<?php if(check_auth() && is_admin() || is_user()){echo user()->name;}else{echo user()->name; }?>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-usermenu pull-right" aria-labelledby="navbarDropdown">
|
||||
|
||||
@ -20,7 +20,14 @@
|
||||
<!-- menu profile quick info -->
|
||||
<div class="profile clearfix">
|
||||
<div class="profile_pic">
|
||||
<img src="<?php echo base_url(); ?>/assets/default/images/img.jpg" alt="..." class="img-circle profile_img">
|
||||
<?php if(user()->profile_image == '' || user()->profile_image == null) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/profile_picture/profile.jpg" alt="..." class="img-circle profile_img">
|
||||
<?php } else { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/profile_picture/<?php echo user()->profile_image; ?>"
|
||||
alt="..." class="img-circle profile_img">
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
<div class="profile_info">
|
||||
<span>Welcome,</span>
|
||||
|
||||
@ -54,9 +54,13 @@ public function userList()
|
||||
|
||||
}
|
||||
|
||||
public function addUser()
|
||||
public function addUser($businessId = 0)
|
||||
{
|
||||
$business = $this->user_model->business();
|
||||
if($businessId != 0){
|
||||
$businessData = $this->MY_Model->get_by_id($businessId,'business');
|
||||
$this->layout->set('businessData', $businessData);
|
||||
}
|
||||
$this->layout->set('data', user());
|
||||
$this->layout->set('business_dropdown', $business);
|
||||
$this->layout->buffer('main_content', 'User/add_user');
|
||||
|
||||
@ -57,7 +57,9 @@
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Business </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="business_id" name="business_id" required="required" class="form-control" >
|
||||
<option value="">Select business</option>
|
||||
<option value="<?php if(isset($businessData)) { echo $businessData->uid; } ?>">
|
||||
<?php if(isset($businessData)) { echo $businessData->business_name; }else{ echo "Select business"; } ?>
|
||||
</option>
|
||||
<?php foreach ($business_dropdown as $key => $value) { ?>
|
||||
<option value="<?php echo $value->uid; ?>"><?php echo $value->business_name; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
150
assets/default/customize/ajax.js
Normal file
150
assets/default/customize/ajax.js
Normal file
@ -0,0 +1,150 @@
|
||||
|
||||
|
||||
$('#myDatepicker').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
|
||||
$('#myDatepicker2').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
|
||||
$('#myDatepicker3').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
$('#myDatepicker4').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
|
||||
$('#myDatepicker5').datetimepicker({
|
||||
format: 'DD-MM-YYYY'
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click','.test',function(){
|
||||
var id = $(this).attr("id");
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetDetails/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#sub-value').css('display', 'block');
|
||||
$('#sub-value').html(JSON.parse(data));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.asset_value',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetValueForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click','.asset_usage',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetUsageForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.asset_amc',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetAMCForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.asset_insurance',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetInsuranceForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.asset_image',function(){
|
||||
var id = $(this).attr("id");
|
||||
|
||||
var getUrl = window.location;
|
||||
var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
var url = baseUrl+"/";
|
||||
|
||||
$.ajax({
|
||||
url:url+"asset/getAssetImageForm/"+id,
|
||||
type:"GET",
|
||||
success:function(data){
|
||||
|
||||
$('#edit-form').html(JSON.parse(data));
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).on('click','#close-form',function(){
|
||||
|
||||
$('#edit-form').css('display', 'none');
|
||||
|
||||
});
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
||||
var tab_value = $("#current_tab").val();
|
||||
|
||||
if(tab_value == 1)
|
||||
{
|
||||
$("#asset_usage-tab").tab('show');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
BIN
assets/uploads/profile_picture/gwm.jpg
Normal file
BIN
assets/uploads/profile_picture/gwm.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 342 KiB |
BIN
assets/uploads/profile_picture/venba-information-technology.png
Normal file
BIN
assets/uploads/profile_picture/venba-information-technology.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
Loading…
Reference in New Issue
Block a user