|
|
|
@ -206,8 +206,8 @@ EOT; |
|
|
|
|
*/ |
|
|
|
|
public function addCourseHiddenParams() |
|
|
|
|
{ |
|
|
|
|
$this->addHidden('cidReq', api_get_course_id()); |
|
|
|
|
$this->addHidden('id_session', api_get_session_id()); |
|
|
|
|
$this->addHidden('cid', api_get_course_id()); |
|
|
|
|
$this->addHidden('sid', api_get_session_id()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -1649,32 +1649,32 @@ EOT; |
|
|
|
|
); |
|
|
|
|
$this->addHtml('</div>'); |
|
|
|
|
|
|
|
|
|
$this->addHtml("<script> |
|
|
|
|
$this->addHtml("<script> |
|
|
|
|
$(function() { |
|
|
|
|
var defaultValue = '$defaultId'; |
|
|
|
|
$('#$typeNoDots').val(defaultValue); |
|
|
|
|
$('#$typeNoDots').selectpicker('render'); |
|
|
|
|
if (defaultValue != '') { |
|
|
|
|
var selected = $('#$typeNoDots option:selected').val(); |
|
|
|
|
$.ajax({ |
|
|
|
|
var selected = $('#$typeNoDots option:selected').val(); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: '$url' + '&id=' + selected+ '&template_name=$type', |
|
|
|
|
success: function (data) { |
|
|
|
|
$('#$templateNoDots').html(data); |
|
|
|
|
$('#$templateNoDotsBlock').show(); |
|
|
|
|
return; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$('#$typeNoDots').on('change', function(){ |
|
|
|
|
var selected = $('#$typeNoDots option:selected').val(); |
|
|
|
|
$.ajax({ |
|
|
|
|
|
|
|
|
|
$('#$typeNoDots').on('change', function(){ |
|
|
|
|
var selected = $('#$typeNoDots option:selected').val(); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: '$url' + '&id=' + selected, |
|
|
|
|
success: function (data) { |
|
|
|
|
$('#$templateNoDots').html(data); |
|
|
|
|
$('#$templateNoDotsBlock').show(); |
|
|
|
|
return; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
@ -1724,8 +1724,8 @@ EOT; |
|
|
|
|
data.submit().always(function () { |
|
|
|
|
\$this.remove(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('#".$inputName."').fileupload({ |
|
|
|
|
url: url, |
|
|
|
|
dataType: 'json', |
|
|
|
@ -1736,11 +1736,11 @@ EOT; |
|
|
|
|
previewMaxWidth: 300, |
|
|
|
|
previewMaxHeight: 169, |
|
|
|
|
previewCrop: true, |
|
|
|
|
dropzone: $('#dropzone'), |
|
|
|
|
}).on('fileuploadadd', function (e, data) { |
|
|
|
|
dropzone: $('#dropzone'), |
|
|
|
|
}).on('fileuploadadd', function (e, data) { |
|
|
|
|
data.context = $('<div class=\"row\" />').appendTo('#files'); |
|
|
|
|
$.each(data.files, function (index, file) { |
|
|
|
|
var node = $('<div class=\"col-sm-5 file_name\">').text(file.name); |
|
|
|
|
var node = $('<div class=\"col-sm-5 file_name\">').text(file.name); |
|
|
|
|
node.appendTo(data.context); |
|
|
|
|
}); |
|
|
|
|
}).on('fileuploadprocessalways', function (e, data) { |
|
|
|
@ -1790,8 +1790,8 @@ EOT; |
|
|
|
|
$('<span class=\"message-image-success\"/>').text('".addslashes(get_lang('File upload succeeded!'))."') |
|
|
|
|
); |
|
|
|
|
$(data.context.children()[index]).parent().append(message); |
|
|
|
|
}); |
|
|
|
|
$('#dropzone').removeClass('hover'); |
|
|
|
|
}); |
|
|
|
|
$('#dropzone').removeClass('hover'); |
|
|
|
|
".$redirectCondition." |
|
|
|
|
}).on('fileuploadfail', function (e, data) { |
|
|
|
|
$.each(data.files, function (index) { |
|
|
|
@ -1802,14 +1802,14 @@ EOT; |
|
|
|
|
$(data.context.children()[index]).parent().append(error); |
|
|
|
|
}); |
|
|
|
|
$('#dropzone').removeClass('hover'); |
|
|
|
|
}).prop('disabled', !$.support.fileInput).parent().addClass($.support.fileInput ? undefined : 'disabled'); |
|
|
|
|
|
|
|
|
|
}).prop('disabled', !$.support.fileInput).parent().addClass($.support.fileInput ? undefined : 'disabled'); |
|
|
|
|
|
|
|
|
|
$('#dropzone').on('dragover', function (e) { |
|
|
|
|
// dragleave callback implementation |
|
|
|
|
// dragleave callback implementation |
|
|
|
|
$('#dropzone').addClass('hover'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('#dropzone').on('dragleave', function (e) { |
|
|
|
|
|
|
|
|
|
$('#dropzone').on('dragleave', function (e) { |
|
|
|
|
$('#dropzone').removeClass('hover'); |
|
|
|
|
}); |
|
|
|
|
$('.fileinput-button').hide(); |
|
|
|
|