fix Content-Type for javascript code

This commit is contained in:
Uwe Steinmann 2016-01-28 16:50:06 +01:00
parent 5abe031222
commit 52344c0842
13 changed files with 14 additions and 14 deletions

View File

@ -32,7 +32,7 @@ require_once("class.Bootstrap.php");
class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style {
function js() { /* {{{ */
header('Content-Type: application/json');
header('Content-Type: application/javascript');
$this->printFolderChooserJs("form1");
$this->printFolderChooserJs("form2");

View File

@ -35,7 +35,7 @@ class SeedDMS_View_Charts extends SeedDMS_Bootstrap_Style {
$data = $this->params['data'];
$type = $this->params['type'];
header('Content-Type: application/json');
header('Content-Type: application/javascript');
?>
$("<div id='tooltip'></div>").css({

View File

@ -41,7 +41,7 @@ class SeedDMS_View_DocumentAccess extends SeedDMS_Bootstrap_Style {
} /* }}} */
function js() { /* {{{ */
header('Content-Type: application/json');
header('Content-Type: application/javascript');
?>
function checkForm()
{

View File

@ -35,7 +35,7 @@ class SeedDMS_View_DocumentChooser extends SeedDMS_Bootstrap_Style {
$folder = $this->params['folder'];
$form = $this->params['form'];
header('Content-Type: application/json');
header('Content-Type: application/javascript');
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 1, $form);
} /* }}} */

View File

@ -32,7 +32,7 @@ require_once("class.Bootstrap.php");
class SeedDMS_View_DocumentNotify extends SeedDMS_Bootstrap_Style {
function js() { /* {{{ */
header('Content-Type: application/json');
header('Content-Type: application/javascript');
?>
function checkForm()
{

View File

@ -36,7 +36,7 @@ class SeedDMS_View_FolderChooser extends SeedDMS_Bootstrap_Style {
$form = $this->params['form'];
$mode = $this->params['mode'];
header('Content-Type: application/json');
header('Content-Type: application/javascript');
$this->printNewTreeNavigationJs($rootfolderid, $mode, 0, $form);
} /* }}} */

View File

@ -33,7 +33,7 @@ class SeedDMS_View_KeywordChooser extends SeedDMS_Bootstrap_Style {
function js() { /* {{{ */
$form = $this->params['form'];
header('Content-Type: application/json');
header('Content-Type: application/javascript');
?>
var targetObj = document.<?php echo $form ?>.keywords;
var myTA;

View File

@ -70,7 +70,7 @@ class SeedDMS_View_LogManagement extends SeedDMS_Bootstrap_Style {
} /* }}} */
function js() { /* {{{ */
header('Content-Type: application/json');
header('Content-Type: application/javascript');
?>
$(document).ready( function() {
$('i.icon-arrow-up').on('click', function(e) {

View File

@ -32,7 +32,7 @@ require_once("class.Bootstrap.php");
class SeedDMS_View_MoveDocument extends SeedDMS_Bootstrap_Style {
function js() { /* {{{ */
header('Content-Type: application/json');
header('Content-Type: application/javascript');
$this->printFolderChooserJs("form1");
} /* }}} */

View File

@ -48,7 +48,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
} /* }}} */
function js() { /* {{{ */
header('Content-Type: application/json');
header('Content-Type: application/javascript');
$this->printFolderChooserJs("form1");
$this->printDeleteFolderButtonJs();

View File

@ -121,12 +121,12 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
);
}
}
header('Content-Type: application/json');
header('Content-Type: application/json'),
echo json_encode($jsondata);
} /* }}} */
function js() { /* {{{ */
header('Content-Type: application/json');
header('Content-Type: application/javascript');
?>
$(document).ready(function () {
$('#update').click(function(ev){

View File

@ -113,7 +113,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
function js() { /* {{{ */
$document = $this->params['document'];
header('Content-Type: application/json');
header('Content-Type: application/javascript');
$this->printTimelineJs('out.ViewDocument.php?action=timelinedata&documentid='.$document->getID(), 300, '', date('Y-m-d'));
$this->printDocumentChooserJs("form1");
} /* }}} */

View File

@ -78,7 +78,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
$expandFolderTree = $this->params['expandFolderTree'];
$enableDropUpload = $this->params['enableDropUpload'];
header('Content-Type: application/json');
header('Content-Type: application/javascript');
?>
function folderSelected(id, name) {
window.location = '../out/out.ViewFolder.php?folderid=' + id;