Skip to content

Commit f018700

Browse files
committed
fix useFile() in script.blade.php
1 parent 8e3d9bd commit f018700

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/views/demo.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</div>
2121
</div>
2222
<div class="row">
23-
<div class="col-md-4 col-md-offset-4">
23+
<div class="col-md-6 col-md-offset-3">
2424
<h2>Independent usage</h2>
2525
<div class="input-group">
2626
<span class="input-group-btn">

src/views/script.blade.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,21 +365,22 @@ function getFileUrl(file) {
365365
if (window.opener || window.tinyMCEPopup || field_name || getUrlParam('CKEditorCleanUpFuncNum') || is_ckeditor) {
366366
if (window.tinyMCEPopup) { // use TinyMCE > 3.0 integration method
367367
useTinymce3(url);
368-
} else if (field_name) { // tinymce 4 and colorbox
368+
} else if (field_name) { // tinymce 4 and colorbox
369369
useTinymce4AndColorbox(url, field_name);
370-
} else if(is_ckeditor) { // use CKEditor 3.0 + integration method
370+
} else if(is_ckeditor) { // use CKEditor 3.0 + integration method
371371
useCkeditor3(url);
372-
} else if (is_fcke) { // use FCKEditor 2.0 integration method
372+
} else if (is_fcke) { // use FCKEditor 2.0 integration method
373373
useFckeditor2(url);
374-
} else { // standalone button or other situations
374+
} else { // standalone button or other situations
375375
window.opener.SetUrl(url);
376376
}
377377
378378
if (window.opener) {
379379
window.close();
380380
}
381381
} else {
382-
alert('Editor not found, cannot apply image.');
382+
// No WYSIWYG editor found, use custom method.
383+
window.opener.SetUrl(url);
383384
}
384385
}
385386
//end useFile

0 commit comments

Comments
 (0)