Commit 68945745 by Tobin

DC

parent bad18390
......@@ -28,8 +28,8 @@ class Venue extends CI_Controller {
function addVenues(){
$this->load->model('Host_model');
$this->load->model('Region_model');
$template['host_data'] = $this->Host_model->getHostCategories();
$template['regionData'] = $this->Region_model->getRegionData();
$template['host_data'] = $this->Host_model->getHostCategories('','1');
$template['regionData'] = $this->Region_model->getRegionData('','1');
$template['page'] = 'Venue/venueAddForm';
$template['menu'] = 'Venue Management';
......@@ -68,8 +68,8 @@ class Venue extends CI_Controller {
} else if ($err == 0 && isset($_POST['has_layout']) && $_POST['has_layout'] == 1 &&
(!isset($_POST['seat_color']) || empty($_POST['seat_color']) || !isset($_FILES) ||
!isset($_POST['seat_price']) || empty($_POST['seat_price']) || empty($_FILES) ||
count($_POST['seat_price']) != count($_POST['seat_color'])) || !isset($_FILES['layout_image'])||
empty($_FILES['layout_image'])){
count($_POST['seat_price']) != count($_POST['seat_color']) || !isset($_FILES['layout_image']) ||
empty($_FILES['layout_image']))){
$err = 1;
$errMsg = 'Provide Proper Layout details';
}
......
......@@ -87,13 +87,13 @@
<span class="glyphicon form-control-feedback"></span>
</div>
</div>
<input id="has_layout" type="hidden" name="has_layout" value='0'>
<div class="col-md-12" id="layoutCntr" class="hide">
<!-- Layout Container -->
<?php if(isset($venue_data,$venue_data->layout,$venue_data->layout_details) &&
!empty($venue_data) && !empty($venue_data->layout) &&
!empty($venue_data->layout_details) &&
!empty($layoutDetails = json_decode($venue_data->layout_details))){ ?>
<input type="hidden" name="has_layout" value='1'>
<div class="col-md-3">
<div class="form-group">
<label>Layout</label>
......@@ -197,7 +197,6 @@
<!-- Layout Container -->
<div id="layoutCntrHtml" class="hide">
<input type="hidden" name="has_layout" value='1'>
<div class="col-md-3">
<div class="form-group">
<label>Layout</label>
......
......@@ -3,63 +3,63 @@ jQuery(document).ready(function(){
});
function setImg(input,id) {
if (input.files && input.files[0]) {
var reader = new FileReader();
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#'+id).attr('src', e.target.result);
};
reader.readAsDataURL(input.files[0]);
}
reader.onload = function (e) {
$('#'+id).attr('src', e.target.result);
};
reader.readAsDataURL(input.files[0]);
}
}
function setModal(header_msg,body_msg){
jQuery('[id="modal_body_msg"]').html(body_msg);
jQuery('[id="modal_header_msg"]').html(header_msg);
jQuery('[id="errModal"]').modal('show');
jQuery('[id="modal_body_msg"]').html(body_msg);
jQuery('[id="modal_header_msg"]').html(header_msg);
jQuery('[id="errModal"]').modal('show');
}
function slideTo(id){
jQuery('html, body').animate({
scrollTop: jQuery('[id="'+id+'"]').offset().top
}, 800);
jQuery('html, body').animate({
scrollTop: jQuery('[id="'+id+'"]').offset().top
}, 800);
}
function modalTrigger(header,body_html){
jQuery('[id="modal_content"]').html(body_html);
jQuery('[id="modal_header"]').html(header);
jQuery('[id="modal_content"]').html(body_html);
jQuery('[id="modal_header"]').html(header);
jQuery('[id="popup_modal"]').modal('show');
jQuery('[id="popup_modal"]').modal('show');
}
function modalHide(){
jQuery('[id="popup_modal"]').modal('hide');
jQuery('[id="popup_modal"]').modal('hide');
}
function addModalLoader(){
jQuery("[id='modal_content']").addClass('relative height_200');
jQuery("[id='modal_content']").prepend("<div id='modal_loader_body' class='loader'></div>");
jQuery("[id='modal_content']").addClass('relative height_200');
jQuery("[id='modal_content']").prepend("<div id='modal_loader_body' class='loader'></div>");
}
function remModalLoader(){
jQuery("[id='modal_loader_body']").remove();
jQuery("[id='modal_content']").removeClass('relative height_200');
jQuery("[id='modal_loader_body']").remove();
jQuery("[id='modal_content']").removeClass('relative height_200');
}
function showFullScreenLoader(){
var thisObj = jQuery('.overlay');
thisObj.css("display",'block');
var thisObj = jQuery('.overlay');
thisObj.css("display",'block');
thisObj.addClass('relative');
thisObj.prepend("<div id='fullScreenLoaderBody' class='loader'></div>");
thisObj.addClass('relative');
thisObj.prepend("<div id='fullScreenLoaderBody' class='loader'></div>");
}
function remFullScreenLoader(){
var thisObj = jQuery('.overlay');
thisObj.css("display",'none');
var thisObj = jQuery('.overlay');
thisObj.css("display",'none');
jQuery('[id="fullScreenLoaderBody"]').remove();
thisObj.removeClass('relative');
jQuery('[id="fullScreenLoaderBody"]').remove();
thisObj.removeClass('relative');
}
function viewImageModal(title,img_src){
......@@ -116,8 +116,10 @@ function setLayout(){
var layoutFlag = jQuery('[name="host_cat_id"]').find(":selected").attr('haveLayout');
if(layoutFlag == 1){
jQuery('[id="has_layout"]').val('1');
jQuery('[id="layoutCntr"]').html(jQuery('[id="layoutCntrHtml"]').html());
} else {
jQuery('[id="has_layout"]').val('0');
jQuery('[id="layoutCntr"]').html('');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment