Update v1.0.6.6
This commit is contained in:
@@ -45,12 +45,12 @@ class="active"
|
||||
@endif
|
||||
<div class="box-body">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
{!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<input type="submit" class="btn btn-default text-blue btn-sm" name="submit" value="{!! Lang::get('lang.open') !!}">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<input type="submit" class="btn btn-default text-blue btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.open') !!}">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" id="close" value="{!! Lang::get('lang.close') !!}">
|
||||
|
||||
</div>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
@@ -76,8 +76,30 @@ class="active"
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
<!-- Modal -->
|
||||
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel"></h4>
|
||||
</div>
|
||||
<div class="modal-body" id="custom-alert-body" >
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary pull-left yes" data-dismiss="modal">{{Lang::get('lang.ok')}}</button>
|
||||
<button type="button" class="btn btn-default no">{{Lang::get('lang.cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var option = null;
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
@@ -117,6 +139,61 @@ class="active"
|
||||
$('#count_refresh').load('trash #count_refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
|
||||
$('#delete').on('click', function(){
|
||||
option = 0;
|
||||
$('#myModalLabel').html("{{Lang::get('lang.open-tickets')}}");
|
||||
});
|
||||
|
||||
$('#close').on('click', function(){
|
||||
option = 1;
|
||||
$('#myModalLabel').html("{{Lang::get('lang.close-tickets')}}");
|
||||
});
|
||||
|
||||
$("#modalpopup").on('submit', function(e){
|
||||
e.preventDefault();
|
||||
var msg ="{{Lang::get('lang.confirm')}}";
|
||||
var values = getValues();
|
||||
if(values == ""){
|
||||
msg = "{{Lang::get('lang.select-ticket')}}";
|
||||
$('.yes').html("{{Lang::get('lang.ok')}}");
|
||||
$('#myModalLabel').html("{{Lang::get('lang.alert')}}");
|
||||
} else {
|
||||
$('.yes').html("Yes");
|
||||
}
|
||||
$('#custom-alert-body').html(msg);
|
||||
$("#myModal").css("display", "block");
|
||||
});
|
||||
$(".closemodal, .no").click(function(){
|
||||
|
||||
$("#myModal").css("display", "none");
|
||||
|
||||
});
|
||||
|
||||
$('.yes').click(function(){
|
||||
var values = getValues();
|
||||
if(values == ""){
|
||||
$("#myModal").css("display", "none");
|
||||
} else {
|
||||
$("#myModal").css("display", "none");
|
||||
$("#modalpopup").unbind('submit');
|
||||
if (option == 0) {
|
||||
//alert('delete');
|
||||
$('#delete').click();
|
||||
} else {
|
||||
//alert('close');
|
||||
$('#close').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function getValues(){
|
||||
var values = $('.selectval:checked').map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
return values;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user