From bf6d235b26fd44d992196c646ac2532cb729c747 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 26 Jan 2017 23:04:38 -0500 Subject: [PATCH] - Replace TinyMCE-enabled filebrowser.tpl by filebrowser_plain.tpl content --- mod/fbrowser.php | 13 +- view/templates/filebrowser.tpl | 116 ++++++------------ view/templates/filebrowser_plain.tpl | 51 -------- ...{filebrowser_plain.tpl => filebrowser.tpl} | 3 +- view/theme/frost/templates/filebrowser.tpl | 85 ------------- 5 files changed, 46 insertions(+), 222 deletions(-) delete mode 100644 view/templates/filebrowser_plain.tpl rename view/theme/frio/templates/{filebrowser_plain.tpl => filebrowser.tpl} (91%) delete mode 100644 view/theme/frost/templates/filebrowser.tpl diff --git a/mod/fbrowser.php b/mod/fbrowser.php index 09ecf032e7..9a0e9244c1 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -12,24 +12,23 @@ require_once('include/Photo.php'); */ function fbrowser_content(App $a) { - if (!local_user()) + if (!local_user()) { killme(); + } - if ($a->argc==1) + if ($a->argc == 1) { killme(); + } $template_file = "filebrowser.tpl"; $mode = ""; if (x($_GET,'mode')) { - $template_file = "filebrowser_plain.tpl"; $mode = "?mode=".$_GET['mode']; } - //echo "
"; var_dump($a->argv); killme();
-
-	switch($a->argv[1]){
+	switch ($a->argv[1]) {
 		case "image":
-			$path = array( array("", t("Photos")));
+			$path = array(array("", t("Photos")));
 			$albums = false;
 			$sql_extra = "";
 			$sql_extra2 = " ORDER BY created DESC LIMIT 0, 10";
diff --git a/view/templates/filebrowser.tpl b/view/templates/filebrowser.tpl
index c40b854743..2c683f784a 100644
--- a/view/templates/filebrowser.tpl
+++ b/view/templates/filebrowser.tpl
@@ -1,88 +1,50 @@
-
-
 	
-	
-	
-	
-	
+
+
+
+ - // insert information now - win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL; +
+ {{foreach $path as $p}}{{$p.1}}{{/foreach}} +
- // are we an image browser - if (typeof(win.ImageDialog) != "undefined") { - // we are, so update image dimensions... - if (win.ImageDialog.getImageData) - win.ImageDialog.getImageData(); - - // ... and preview if necessary - if (win.ImageDialog.showPreviewImage) - win.ImageDialog.showPreviewImage(URL); - } - - // close popup window - tinyMCEPopup.close(); - } - } - - tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue); - - - - -
-
    -
  • FileBrowser
  • + {{if $folders }} +
    +
      + {{foreach $folders as $f}}
    • {{$f.1}}
    • {{/foreach}}
    -
    + {{/if}} -
    -
    - {{foreach $path as $p}}{{$p.1}}{{/foreach}} -
    -
    -
      - {{foreach $folders as $f}}
    • {{$f.1}}
    • {{/foreach}} -
    -
    -
    -
      - {{foreach $files as $f}} -
    • {{$f.1}}
    • - {{/foreach}} -
    -
    +
    + {{foreach $files as $f}} + + {{/foreach}}
    -
    - -
    + +
    + +
    +
    + + - + diff --git a/view/templates/filebrowser_plain.tpl b/view/templates/filebrowser_plain.tpl deleted file mode 100644 index 1ebf8a2ccb..0000000000 --- a/view/templates/filebrowser_plain.tpl +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -
    - - -
    - {{foreach $path as $p}}{{$p.1}}{{/foreach}} -
    - - {{if $folders }} -
    -
      - {{foreach $folders as $f}}
    • {{$f.1}}
    • {{/foreach}} -
    -
    - {{/if}} - -
    - {{foreach $files as $f}} - - {{/foreach}} -
    - -
    - -
    -
    - - - - - diff --git a/view/theme/frio/templates/filebrowser_plain.tpl b/view/theme/frio/templates/filebrowser.tpl similarity index 91% rename from view/theme/frio/templates/filebrowser_plain.tpl rename to view/theme/frio/templates/filebrowser.tpl index b1127c8a35..55cecabb8f 100644 --- a/view/theme/frio/templates/filebrowser_plain.tpl +++ b/view/theme/frio/templates/filebrowser.tpl @@ -1,6 +1,5 @@ - - - - -
    -
      -
    • FileBrowser
    • -
    -
    -
    - -
    -
    - {{foreach $path as $p}}{{$p.1}}{{/foreach}} -
    -
    -
      - {{foreach $folders as $f}}
    • {{$f.1}}
    • {{/foreach}} -
    -
    -
    -
      - {{foreach $files as $f}} -
    • {{$f.1}}
    • - {{/foreach}} -
    -
    -
    -
    -
    - -
    - - -