mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
place javascript into external file
This commit is contained in:
parent
7c3bc05d6e
commit
a758b29369
|
@ -39,9 +39,12 @@ if ($folder->getAccessMode($user) < M_READWRITE) {
|
|||
}
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'strictformcheck'=>$settings->_strictFormCheck, 'orderby'=>$settings->_sortFoldersDefault));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->show();
|
||||
$view->setParam('folder', $folder);
|
||||
$view->setParam('strictformcheck', $settings->_strictFormCheck);
|
||||
$view->setParam('orderby', $settings->_sortFoldersDefault);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,21 +31,9 @@ require_once("class.Bootstrap.php");
|
|||
*/
|
||||
class SeedDMS_View_AddSubFolder extends SeedDMS_Bootstrap_Style {
|
||||
|
||||
function show() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$folder = $this->params['folder'];
|
||||
$strictformcheck = $this->params['strictformcheck'];
|
||||
$orderby = $this->params['orderby'];
|
||||
|
||||
$this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
|
||||
$this->contentHeading(getMLText("add_subfolder"));
|
||||
$this->contentContainerStart();
|
||||
function js() { /* {{{ */
|
||||
header('Content-Type: application/javascript');
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
function checkForm()
|
||||
{
|
||||
msg = new Array();
|
||||
|
@ -71,9 +59,31 @@ function checkForm()
|
|||
else
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
$(document).ready( function() {
|
||||
$('body').on('submit', '#form1', function(ev){
|
||||
if(checkForm()) return;
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
<?php
|
||||
} /* }}} */
|
||||
|
||||
<form action="../op/op.AddSubFolder.php" name="form1" onsubmit="return checkForm();" method="POST">
|
||||
function show() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$folder = $this->params['folder'];
|
||||
$strictformcheck = $this->params['strictformcheck'];
|
||||
$orderby = $this->params['orderby'];
|
||||
|
||||
$this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
$this->contentStart();
|
||||
$this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
|
||||
$this->contentHeading(getMLText("add_subfolder"));
|
||||
$this->contentContainerStart();
|
||||
?>
|
||||
|
||||
<form action="../op/op.AddSubFolder.php" id="form1" name="form1" method="post">
|
||||
<?php echo createHiddenFieldWithKey('addsubfolder'); ?>
|
||||
<input type="Hidden" name="folderid" value="<?php print $folder->getId();?>">
|
||||
<input type="Hidden" name="showtree" value="<?php echo showtree();?>">
|
||||
|
|
Loading…
Reference in New Issue
Block a user