66 <link rel =" stylesheet" href =" //maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" >
77 <link rel =" stylesheet" href =" //maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" >
88 <link rel =" stylesheet" href =" /vendor/laravel-filemanager/css/cropper.min.css" >
9+ <link rel =" stylesheet" href =" /vendor/laravel-filemanager/css/lfm.css" >
910 <link rel =" stylesheet" href =" //cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.css" >
10- <style >
11- html , body {
12- height : 100% ;
13- }
14-
15- .img-row {
16- overflow : visible ;
17- }
18-
19- .container {
20- height : 100% ;
21- margin-left : 5px ;
22- margin-right : 5px ;
23- width : 99% ;
24- }
25-
26- .fill {
27- height : 100% ;
28- min-height : 100% ;
29- }
30-
31- .wrapper {
32- height : 100% ;
33- }
34-
35- #lfm-leftcol {
36- min-height : 80% ;
37- }
38-
39- #right-nav {
40- border-left : 1px solid silver ;
41- height : 90% ;
42- min-height : 90% ;
43- }
44-
45- #content {
46- overflow : auto ;
47- }
48-
49- #tree1 {
50- margin-left : 5px ;
51- }
52-
53- .pointer {
54- cursor : pointer ;
55- }
56-
57- .img-preview {
58- background-color : #f7f7f7 ;
59- overflow : hidden ;
60- width : 100% ;
61- text-align : center ;
62- height : 200px ;
63- }
64-
65- .hidden {
66- display : none ;
67- }
68- </style >
6911</head >
7012<body >
7113<div class =" container" >
@@ -193,12 +135,6 @@ class="fa fa-list"></i> List</a>
193135 $ (" #tree1" ).html (data);
194136 });
195137 loadImages ();
196-
197- @if (Input:: has (' base' ) )
198-
199- @endif
200-
201-
202138 });
203139
204140 function highlight (x ) {
@@ -211,19 +147,16 @@ function highlight(x) {
211147 }
212148
213149 $ (" #upload-btn" ).click (function () {
214- $ (" #upload-btn" ).html (' <i class="fa fa-refresh fa-spin"></i> Uploading...' );
215- // $("#uploadForm").submit();
216-
217150 var options = {
218- beforeSubmit: showRequest, // pre-submit callback
219- success: showResponse // post-submit callback
151+ beforeSubmit: showRequest,
152+ success: showResponse
220153 };
221154
222155 function showRequest (formData , jqForm , options ) {
156+ $ (" #upload-btn" ).html (' <i class="fa fa-refresh fa-spin"></i> Uploading...' );
223157 return true ;
224158 }
225159
226- // post-submit callback
227160 function showResponse (responseText , statusText , xhr , $form ) {
228161 $ (" #uploadModal" ).modal (' hide' );
229162 loadImages ();
@@ -356,7 +289,6 @@ function notImp() {
356289 });
357290 });
358291
359-
360292 function useFile (file ) {
361293 var path = $ (' #working_dir' ).val ();
362294
@@ -369,11 +301,19 @@ function getUrlParam(paramName) {
369301 var funcNum = getUrlParam (' CKEditorFuncNum' );
370302 window .opener .CKEDITOR .tools .callFunction (funcNum, path + " /" + file);
371303
372- if (path != ' /' ) {
373- window .opener .CKEDITOR .tools .callFunction (funcNum, ' {{ \Config:: get (' lfm.images_url' ) } }' + path + " /" + file);
304+ @if ((Session:: has (' lfm_type' )) && (Session:: get (' lfm_type' ) == " Images" ) )
305+ if (path != ' /' ) {
306+ window .opener .CKEDITOR .tools .callFunction (funcNum, ' {{ \Config:: get (' lfm.images_url' ) } }' + path + " /" + file);
307+ } else {
308+ window .opener .CKEDITOR .tools .callFunction (funcNum, ' {{ \Config:: get (' lfm.images_url' ) } }' + file);
309+ }
310+ @else
311+ if (path != ' /' ) {
312+ window .opener .CKEDITOR .tools .callFunction (funcNum, ' {{ \Config:: get (' lfm.files_url' ) } }' + path + " /" + file);
374313 } else {
375- window .opener .CKEDITOR .tools .callFunction (funcNum, ' {{ \Config:: get (' lfm.images_url ' ) } }' + file);
314+ window .opener .CKEDITOR .tools .callFunction (funcNum, ' {{ \Config:: get (' lfm.files_url ' ) } }' + file);
376315 }
316+ @endif
377317 window .close ();
378318 }
379319
0 commit comments