Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
3.0 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4. This is the template used by mod/fbrowser.php when is called from TinyMCE rich editor.
  5. See also 'filebrowser_plain.tpl'
  6. -->
  7. <head>
  8. <script type="text/javascript" src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_popup.js"></script>
  9. <style>
  10. .panel_wrapper div.current{.overflow: auto; height: auto!important; }
  11. .filebrowser.path { font-family: fixed; font-size: 10px; background-color: #f0f0ee; height:auto; overflow:auto;}
  12. .filebrowser.path a { border-left: 1px solid #C0C0AA; background-color: #E0E0DD; display: block; float:left; padding: 0.3em 1em;}
  13. .filebrowser ul{ list-style-type: none; padding:0px; }
  14. .filebrowser.folders a { display: block; padding: 0.3em }
  15. .filebrowser.folders a:hover { background-color: #f0f0ee; }
  16. .filebrowser.files.image { overflow: auto; height: auto; }
  17. .filebrowser.files.image img { height:50px;}
  18. .filebrowser.files.image li { display: block; padding: 5px; float: left; }
  19. .filebrowser.files.image span { display: none;}
  20. .filebrowser.files.file img { height:16px; vertical-align: bottom;}
  21. .filebrowser.files a { display: block; padding: 0.3em}
  22. .filebrowser.files a:hover { background-color: #f0f0ee; }
  23. .filebrowser a { text-decoration: none; }
  24. </style>
  25. <script>
  26. var FileBrowserDialogue = {
  27. init : function () {
  28. // Here goes your code for setting your custom things onLoad.
  29. },
  30. mySubmit : function (URL) {
  31. //var URL = document.my_form.my_field.value;
  32. var win = tinyMCEPopup.getWindowArg("window");
  33. // insert information now
  34. win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;
  35. // are we an image browser
  36. if (typeof(win.ImageDialog) != "undefined") {
  37. // we are, so update image dimensions...
  38. if (win.ImageDialog.getImageData)
  39. win.ImageDialog.getImageData();
  40. // ... and preview if necessary
  41. if (win.ImageDialog.showPreviewImage)
  42. win.ImageDialog.showPreviewImage(URL);
  43. }
  44. // close popup window
  45. tinyMCEPopup.close();
  46. }
  47. }
  48. tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
  49. </script>
  50. </head>
  51. <body>
  52. <div class="tabs">
  53. <ul >
  54. <li class="current"><span>FileBrowser</span></li>
  55. </ul>
  56. </div>
  57. <div class="panel_wrapper">
  58. <div id="general_panel" class="panel current">
  59. <div class="filebrowser path">
  60. {{foreach $path as $p}}<a href="{{$p.0}}">{{$p.1}}</a>{{/foreach}}
  61. </div>
  62. <div class="filebrowser folders">
  63. <ul>
  64. {{foreach $folders as $f}}<li><a href="{{$baseurl}}/fbrowser/{{$type}}/{{$f.0}}/">{{$f.1}}</a></li>{{/foreach}}
  65. </ul>
  66. </div>
  67. <div class="filebrowser files {{$type}}">
  68. <ul>
  69. {{foreach $files as $f}}
  70. <li><a href="#" onclick="FileBrowserDialogue.mySubmit('{{$f.0}}'); return false;"><img src="{{$f.2}}"><span>{{$f.1}}</span></a></li>
  71. {{/foreach}}
  72. </ul>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="mceActionPanel">
  77. <input type="button" id="cancel" name="cancel" value="{{$cancel|escape:'html'}}" onclick="tinyMCEPopup.close();" />
  78. </div>
  79. </body>
  80. </html>