mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-02 21:51:51 +08:00
Hound formatting
This commit is contained in:
parent
d60cc2cd1c
commit
d9a9045658
1 changed files with 7 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
// Opens create wopi modal on the click of the button
|
||||
function applyCreateWopiFileCallback() {
|
||||
$(".create-wopi-file-btn").off().on('click', function(e){
|
||||
function applyCreateWopiFileCallback() {
|
||||
$('.create-wopi-file-btn').off().on('click', function(e) {
|
||||
var $modal = $('#new-office-file-modal');
|
||||
$($modal).find('form').clearFormErrors();
|
||||
$($modal).find('#new-wopi-file-name').val('');
|
||||
|
@ -17,16 +17,18 @@ function applyCreateWopiFileCallback() {
|
|||
// Show errors on create wopi modal
|
||||
function initCreateWopiFileModal() {
|
||||
// Ajax actions
|
||||
$("#new-office-file-modal form")
|
||||
$('#new-office-file-modal form')
|
||||
.on('ajax:success', function(ev, data) {
|
||||
window.open(data.edit_url, '_blank');
|
||||
$('#new-office-file-modal').modal('hide');
|
||||
|
||||
//location.reload();
|
||||
// location.reload();
|
||||
})
|
||||
.on('ajax:error', function(ev, response) {
|
||||
var element;
|
||||
var msg;
|
||||
|
||||
$(this).clearFormErrors();
|
||||
var element, msg;
|
||||
|
||||
if (response.status === 400) {
|
||||
element = $(this).find('#new-wopi-file-name');
|
||||
|
|
Loading…
Reference in a new issue