|
@@ -341,130 +341,8 @@
|
|
|
</div>
|
|
|
|
|
|
@endsection
|
|
|
-@push('js')
|
|
|
-
|
|
|
- {{-- @include('supervisor.layouts.modal') --}}
|
|
|
-
|
|
|
- <script>
|
|
|
-
|
|
|
- function fetch_sub_content(selector, url, args=null){
|
|
|
-
|
|
|
- var config={
|
|
|
- spinner: true
|
|
|
- }
|
|
|
-
|
|
|
- if(typeof args=='object'){
|
|
|
- config=Object.assign(config, args);
|
|
|
- }
|
|
|
-
|
|
|
- if(config.spinner){
|
|
|
-
|
|
|
- $(selector).waitMe({
|
|
|
- effect: 'facebook',
|
|
|
- text: 'Please! Wait ...'
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- $(selector).load(url, null, function(){
|
|
|
- $(selector).waitMe('hide');
|
|
|
- if(typeof args=='function') args();
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- function wait_me(selector, config=null){
|
|
|
-
|
|
|
- if(config){
|
|
|
-
|
|
|
- selector.waitMe(config);
|
|
|
-
|
|
|
- }else{
|
|
|
-
|
|
|
- selector.waitMe({
|
|
|
- effect: 'facebook',
|
|
|
-
|
|
|
- text: 'Please! Wait ...'
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- function pop_up_msg(msg='No message specified', type='success', callback=null){
|
|
|
- new Noty({
|
|
|
- theme:'sunset',
|
|
|
- text: msg,
|
|
|
- type: type,
|
|
|
- timeout:1500,
|
|
|
- callbacks:{
|
|
|
- afterClose: callback
|
|
|
- }
|
|
|
- }).show();
|
|
|
- }
|
|
|
-
|
|
|
- function err_msg(err){
|
|
|
-
|
|
|
- var msg="Request failed to process, try again later.";
|
|
|
-
|
|
|
- if(err.responseJSON && err.responseJSON.msg){
|
|
|
- msg=err.responseJSON.msg;
|
|
|
- }
|
|
|
-
|
|
|
- return msg;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- function ajax_form(form, cllback=null, config={spinner: true}){
|
|
|
-
|
|
|
- $('.btn-submit').prop('disabled', true);
|
|
|
- var redirect=$(form).data('redirect');
|
|
|
-
|
|
|
- if(typeof config=='object'){
|
|
|
-
|
|
|
- if(config.spinner) wait_me($(form));
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- $(form).ajaxSubmit({
|
|
|
- success:function(res){
|
|
|
-
|
|
|
- wait_me($(form), 'hide');
|
|
|
-
|
|
|
- if(res.msg){
|
|
|
-
|
|
|
- pop_up_msg(res.msg, 'success', function(){
|
|
|
-
|
|
|
- $('.btn-submit').prop('disabled', false);
|
|
|
-
|
|
|
- if(redirect) window.location.replace(redirect);
|
|
|
- else if(typeof cllback=='function'){
|
|
|
- cllback(form, res);
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
- error:function(res){
|
|
|
-
|
|
|
- wait_me($(form), 'hide');
|
|
|
-
|
|
|
- var msg="Request failed to process, try again later.";
|
|
|
-
|
|
|
- if(res.responseJSON && res.responseJSON.msg){
|
|
|
- msg=res.responseJSON.msg;
|
|
|
- }
|
|
|
-
|
|
|
- pop_up_msg(msg, 'error');
|
|
|
- $('.btn-submit').prop('disabled', false);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+@push('js')
|
|
|
+ <script>
|
|
|
|
|
|
$(function(){
|
|
|
|
|
@@ -494,35 +372,35 @@
|
|
|
});
|
|
|
|
|
|
$('.delete_feedback').on('click', function(){
|
|
|
- var id = $(this).attr("data-id");
|
|
|
- var form_data={
|
|
|
- _token: "{{ csrf_token() }}",
|
|
|
- delete_id: id,
|
|
|
- }
|
|
|
- swal({
|
|
|
- title: "Are you sure?",
|
|
|
- text: "You will not be able to recover this data!",
|
|
|
- type: "warning",
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonClass: "btn-danger",
|
|
|
- cancelButtonClass: "btn-info",
|
|
|
- confirmButtonText: "Yes, delete!",
|
|
|
- cancelButtonText: "No, cancel!",
|
|
|
-
|
|
|
- }, function(isConfirm){
|
|
|
-
|
|
|
- if(isConfirm){
|
|
|
- $.post("{{ route('ajax-post', ['name'=>'delete_student_feedback_msg']) }}",form_data
|
|
|
- ).done(function(res){
|
|
|
- pop_up_msg(res.msg);
|
|
|
- window.location.reload();
|
|
|
- }).fail(function(err){
|
|
|
- pop_up_msg(err_msg(err), 'error');
|
|
|
- });
|
|
|
+ var id = $(this).attr("data-id");
|
|
|
+ var form_data={
|
|
|
+ _token: "{{ csrf_token() }}",
|
|
|
+ delete_id: id,
|
|
|
}
|
|
|
- });
|
|
|
+ swal({
|
|
|
+ title: "Are you sure?",
|
|
|
+ text: "You will not be able to recover this data!",
|
|
|
+ type: "warning",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: "btn-danger",
|
|
|
+ cancelButtonClass: "btn-info",
|
|
|
+ confirmButtonText: "Yes, delete!",
|
|
|
+ cancelButtonText: "No, cancel!",
|
|
|
|
|
|
- });
|
|
|
+ }, function(isConfirm){
|
|
|
+
|
|
|
+ if(isConfirm){
|
|
|
+ $.post("{{ route('ajax-post', ['name'=>'delete_student_feedback_msg']) }}",form_data
|
|
|
+ ).done(function(res){
|
|
|
+ pop_up_msg(res.msg);
|
|
|
+ window.location.reload();
|
|
|
+ }).fail(function(err){
|
|
|
+ pop_up_msg(err_msg(err), 'error');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
|
|
|
$('.rate_star_update').on('click', function(){
|
|
|
var self =$(this);
|