diff --git a/conlite/classes/gui/class.file.list.php b/conlite/classes/gui/class.file.list.php
index 3ea84ff..5694bec 100644
--- a/conlite/classes/gui/class.file.list.php
+++ b/conlite/classes/gui/class.file.list.php
@@ -52,14 +52,22 @@ class cGuiFileList {
}
}
} else {
- $sList .= '
'. i18n("No files in directory.").'' . "\n";
+ $sList .= '' . i18n("No files in directory.") . '' . "\n";
}
$sList .= '' . "\n";
$this->_oTpl->set('s', 'item_list', $sList);
+ $this->_oTpl->set('s', 'multilinkf1', $sess->url("main.php?area=$area&frame=1"));
+ $this->_oTpl->set('s', 'multilinkf2', $sess->url("main.php?area=$area&frame=2"));
+ $this->_oTpl->set('s', 'multilinkf3', $sess->url("main.php?area=$area&frame=3"));
+ $this->_oTpl->set('s', 'multilinkf4', $sess->url("main.php?area=$area&frame=4"));
+
$this->_oTpl->set('s', 'multilink1', $sess->url("main.php?area=$area&frame=3&file=\${file}"));
$this->_oTpl->set('s', 'multilink2', $sess->url("main.php?area=$area&frame=4&action=js_edit&file=\${file}&tmp_file=\${file}"));
+ $this->_oTpl->set('s', 'multilink3', $sess->url("main.php?area=$area&frame=1&file=\${file}"));
+
+ $this->_oTpl->set('s', 'multilink4', $sess->url("main.php?area=$area&frame=2&action=file_delete&delfile=\${file}"));
$this->_oTpl->generate(cRegistry::getConfigValue('path', 'contenido') . cRegistry::getConfigValue('path', 'templates') . "html5/file_list.html", $bReturn);
}
diff --git a/conlite/includes/include.js_edit_form.php b/conlite/includes/include.js_edit_form.php
index 69217fd..c7a20f7 100644
--- a/conlite/includes/include.js_edit_form.php
+++ b/conlite/includes/include.js_edit_form.php
@@ -41,6 +41,8 @@ $sFileType = "js";
$sActionCreate = 'js_create';
$sActionEdit = 'js_edit';
+$bNewFile = false;
+
$page = new cPage;
$tpl->reset();
@@ -60,25 +62,21 @@ if (!$perm->have_perm_area_action($area, $action)) {
} else {
$sFilename .= stripslashes($_REQUEST['file']);
}
-
- if(!empty($_REQUEST['dirname']) && trim($_REQUEST['dirname']) != '.') {
- $sFilename = stripslashes($_REQUEST['dirname']).DIRECTORY_SEPARATOR.$sFilename;
- }
- echo $sFilename;
- if (stripslashes($_REQUEST['file'])) {
- $sReloadScript = "";
- } else {
- $sReloadScript = "";
+ if (!empty($_REQUEST['dirname']) && trim($_REQUEST['dirname']) != '.') {
+ if (empty($sFilename)) {
+ $sFilename = "newfile.js";
+ $bNewFile = true;
+ }
+ $sFilename = stripslashes($_REQUEST['dirname']) . DIRECTORY_SEPARATOR . $sFilename;
}
-$sReloadScript = "";
+ $sReloadScript = "";
// Content Type is template
$sTypeContent = "js";
$aFileInfo = getFileInformation($client, $sTempFilename, $sTypeContent, $db);
@@ -86,8 +84,8 @@ $sReloadScript = "";
# create new file
if ($_REQUEST['action'] == $sActionCreate AND $_REQUEST['status'] == 'send') {
$sTempFilename = $sFilename;
- createFile($sFilename, $path);
- $bEdit = fileEdit($sFilename, $_REQUEST['code'], $path);
+ createFile(pathinfo($sFilename, PATHINFO_BASENAME), $path.pathinfo($sFilename, PATHINFO_DIRNAME).DIRECTORY_SEPARATOR);
+ $bEdit = fileEdit(pathinfo($sFilename, PATHINFO_BASENAME), $_REQUEST['code'], $path.pathinfo($sFilename, PATHINFO_DIRNAME).DIRECTORY_SEPARATOR);
updateFileInformation($client, $sFilename, 'js', $auth->auth['uid'], $_REQUEST['description'], $db);
$sReloadScript .= "
diff --git a/conlite/templates/standard/template.js_left_top.html b/conlite/templates/standard/template.js_left_top.html
index 30a9294..05b2a3c 100644
--- a/conlite/templates/standard/template.js_left_top.html
+++ b/conlite/templates/standard/template.js_left_top.html
@@ -1,27 +1,28 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-{CAPTION}
-{NEWSCRIPT}
-
-
+
+
+
+
+
+ {CAPTION}
+ {NEWSCRIPT}
+
+