mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-15 06:01:19 +00:00
seperate javascript from html
This commit is contained in:
parent
dfeac6843f
commit
bdc3a28dcf
|
@ -51,7 +51,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'allusers'=>$allUsers, 'allgroups'=>$allGroups));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'allusers'=>$allUsers, 'allgroups'=>$allGroups));
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->setParam('accessobject', $accessop);
|
$view->setParam('accessobject', $accessop);
|
||||||
$view->show();
|
$view($_GET);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'sortusersinlist'=>$settings->_sortUsersInList));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'sortusersinlist'=>$settings->_sortUsersInList));
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->setParam('accessobject', $accessop);
|
$view->setParam('accessobject', $accessop);
|
||||||
$view->show();
|
$view($_GET);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'target'=>$target));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'target'=>$target));
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->setParam('accessobject', $accessop);
|
$view->setParam('accessobject', $accessop);
|
||||||
$view->show();
|
$view($_GET);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,23 +40,9 @@ class SeedDMS_View_DocumentAccess extends SeedDMS_Bootstrap_Style {
|
||||||
print "</select>\n";
|
print "</select>\n";
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function show() { /* {{{ */
|
function js() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
header('Content-Type: application/json');
|
||||||
$user = $this->params['user'];
|
|
||||||
$document = $this->params['document'];
|
|
||||||
$folder = $this->params['folder'];
|
|
||||||
$allUsers = $this->params['allusers'];
|
|
||||||
$allGroups = $this->params['allgroups'];
|
|
||||||
|
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
|
||||||
$this->globalNavigation($folder);
|
|
||||||
$this->contentStart();
|
|
||||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script language="JavaScript">
|
|
||||||
function checkForm()
|
function checkForm()
|
||||||
{
|
{
|
||||||
msg = new Array();
|
msg = new Array();
|
||||||
|
@ -78,9 +64,29 @@ function checkForm()
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
|
|
||||||
|
$(document).ready( function() {
|
||||||
|
$('body').on('submit', '#form1', function(ev){
|
||||||
|
if(checkForm()) return;
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
<?php
|
<?php
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
|
function show() { /* {{{ */
|
||||||
|
$dms = $this->params['dms'];
|
||||||
|
$user = $this->params['user'];
|
||||||
|
$document = $this->params['document'];
|
||||||
|
$folder = $this->params['folder'];
|
||||||
|
$allUsers = $this->params['allusers'];
|
||||||
|
$allGroups = $this->params['allgroups'];
|
||||||
|
|
||||||
|
|
||||||
|
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||||
|
$this->globalNavigation($folder);
|
||||||
|
$this->contentStart();
|
||||||
|
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||||
|
|
||||||
$this->contentHeading(getMLText("edit_document_access"));
|
$this->contentHeading(getMLText("edit_document_access"));
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
|
@ -233,7 +239,7 @@ function checkForm()
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form action="../op/op.DocumentAccess.php" name="form1" onsubmit="return checkForm();">
|
<form action="../op/op.DocumentAccess.php" name="form1" id="form1">
|
||||||
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
<?php echo createHiddenFieldWithKey('documentaccess'); ?>
|
||||||
<input type="Hidden" name="documentid" value="<?php print $document->getId()?>">
|
<input type="Hidden" name="documentid" value="<?php print $document->getId()?>">
|
||||||
<input type="Hidden" name="action" value="addaccess">
|
<input type="Hidden" name="action" value="addaccess">
|
||||||
|
|
|
@ -31,22 +31,9 @@ require_once("class.Bootstrap.php");
|
||||||
*/
|
*/
|
||||||
class SeedDMS_View_DocumentNotify extends SeedDMS_Bootstrap_Style {
|
class SeedDMS_View_DocumentNotify extends SeedDMS_Bootstrap_Style {
|
||||||
|
|
||||||
function show() { /* {{{ */
|
function js() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
header('Content-Type: application/json');
|
||||||
$user = $this->params['user'];
|
|
||||||
$folder = $this->params['folder'];
|
|
||||||
$document = $this->params['document'];
|
|
||||||
$sortusersinlist = $this->params['sortusersinlist'];
|
|
||||||
|
|
||||||
$notifyList = $document->getNotifyList();
|
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
|
||||||
$this->globalNavigation($folder);
|
|
||||||
$this->contentStart();
|
|
||||||
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script language="JavaScript">
|
|
||||||
function checkForm()
|
function checkForm()
|
||||||
{
|
{
|
||||||
msg = new Array();
|
msg = new Array();
|
||||||
|
@ -67,9 +54,30 @@ function checkForm()
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
|
|
||||||
|
$(document).ready( function() {
|
||||||
|
$('body').on('submit', '#form1', function(ev){
|
||||||
|
if(checkForm()) return;
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
<?php
|
<?php
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
|
function show() { /* {{{ */
|
||||||
|
$dms = $this->params['dms'];
|
||||||
|
$user = $this->params['user'];
|
||||||
|
$folder = $this->params['folder'];
|
||||||
|
$document = $this->params['document'];
|
||||||
|
$sortusersinlist = $this->params['sortusersinlist'];
|
||||||
|
|
||||||
|
$notifyList = $document->getNotifyList();
|
||||||
|
|
||||||
|
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||||
|
$this->globalNavigation($folder);
|
||||||
|
$this->contentStart();
|
||||||
|
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
|
||||||
|
|
||||||
$this->contentHeading(getMLText("edit_existing_notify"));
|
$this->contentHeading(getMLText("edit_existing_notify"));
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
|
|
||||||
|
@ -107,7 +115,7 @@ function checkForm()
|
||||||
?>
|
?>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<form action="../op/op.DocumentNotify.php" name="form1" onsubmit="return checkForm();">
|
<form action="../op/op.DocumentNotify.php" name="form1" id="form1">
|
||||||
<input type="hidden" name="documentid" value="<?php print $document->getID()?>">
|
<input type="hidden" name="documentid" value="<?php print $document->getID()?>">
|
||||||
<input type="hidden" name="action" value="addnotify">
|
<input type="hidden" name="action" value="addnotify">
|
||||||
<table class="table-condensed">
|
<table class="table-condensed">
|
||||||
|
|
|
@ -31,6 +31,12 @@ require_once("class.Bootstrap.php");
|
||||||
*/
|
*/
|
||||||
class SeedDMS_View_MoveDocument extends SeedDMS_Bootstrap_Style {
|
class SeedDMS_View_MoveDocument extends SeedDMS_Bootstrap_Style {
|
||||||
|
|
||||||
|
function js() { /* {{{ */
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
|
$this->printFolderChooserJs("form1");
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
function show() { /* {{{ */
|
function show() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
|
@ -50,7 +56,7 @@ class SeedDMS_View_MoveDocument extends SeedDMS_Bootstrap_Style {
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php printMLText("choose_target_folder");?>:</td>
|
<td><?php printMLText("choose_target_folder");?>:</td>
|
||||||
<td><?php $this->printFolderChooser("form1", M_READWRITE, -1, $target);?></td>
|
<td><?php $this->printFolderChooserHtml("form1", M_READWRITE, -1, $target);?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><input type="submit" class="btn" value="<?php printMLText("move");?>"></td>
|
<td colspan="2"><input type="submit" class="btn" value="<?php printMLText("move");?>"></td>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user