File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed
Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class="btn btn-default btn-xs">
5555 </button >
5656 <ul class =" dropdown-menu" role =" menu" >
5757 <li ><a href =" javascript:rename('{!! basename ($file ) ! !} ')" >Rename</a ></li >
58- <li ><a href =" javascript:notImp( )" >View</a ></li >
58+ <li ><a href =" javascript:fileView(' {!! basename ( $file ) ! !} ' )" >View</a ></li >
5959 <li ><a href =" javascript:download('{!! basename ($file ) ! !} ')" >Download</a ></li >
6060 <li class =" divider" ></li >
6161 <li ><a href =" javascript:notImp()" >Rotate</a ></li >
Original file line number Diff line number Diff line change @@ -115,6 +115,24 @@ class="fa fa-list"></i> List</a>
115115 </div >
116116</div >
117117
118+ <div class =" modal fade" id =" fileViewModal" tabindex =" -1" role =" dialog" aria-labelledby =" fileLabel" aria-hidden =" true" >
119+ <div class =" modal-dialog" >
120+ <div class =" modal-content" >
121+ <div class =" modal-header" >
122+ <button type =" button" class =" close" data-dismiss =" modal" aria-label =" Close" ><span
123+ aria-hidden =" true" >× ; </span ></button >
124+ <h4 class =" modal-title" id =" fileLabel" >View Fiile</h4 >
125+ </div >
126+ <div class =" modal-body" id =" fileview_body" >
127+
128+ </div >
129+ <div class =" modal-footer" >
130+ <button type =" button" class =" btn btn-default" data-dismiss =" modal" >Close</button >
131+ </div >
132+ </div >
133+ </div >
134+ </div >
135+
118136<script src =" //code.jquery.com/jquery-1.11.2.min.js" ></script >
119137<script src =" //code.jquery.com/jquery-migrate-1.2.1.min.js" ></script >
120138<script src =" //maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" ></script >
@@ -252,7 +270,6 @@ function trash(x) {
252270 }
253271
254272
255-
256273 function loadFiles () {
257274 $ .ajax ({
258275 type: " GET" ,
@@ -268,8 +285,6 @@ function loadFiles() {
268285 });
269286 }
270287
271-
272-
273288 function cropImage (x ) {
274289 $ .ajax ({
275290 type: " GET" ,
@@ -399,6 +414,13 @@ function scaleImage(x) {
399414 $ (" #show_list" ).val (1 );
400415 loadImages ();
401416 });
417+
418+ function fileView (x ){
419+ $ (' #fileview_body' ).html (
420+ " <img class='img img-responsive' src='{!! Config:: get (' lfm.images_url' ) ! !}" + $ (" #working_dir" ).val () + " /" + x + " '>"
421+ );
422+ $ (' #fileViewModal' ).modal ();
423+ }
402424 </script >
403425</body >
404426</html >
You can’t perform that action at this time.
0 commit comments