sort included JS files

This commit is contained in:
Roland Gruber 2010-08-28 12:27:06 +00:00
parent 40008f9038
commit 06ccc05f6e
10 changed files with 52 additions and 2 deletions

View File

@ -70,8 +70,13 @@ echo $_SESSION['header'];
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/../lib'; $jsDirName = dirname(__FILE__) . '/../lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
} }
// set focus on password field // set focus on password field

View File

@ -135,8 +135,13 @@ echo ("<body onload=\"configLoginMethodChanged()\">\n");
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/../lib'; $jsDirName = dirname(__FILE__) . '/../lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
} }
?> ?>

View File

@ -112,8 +112,13 @@ echo "</head><body>\n";
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/../lib'; $jsDirName = dirname(__FILE__) . '/../lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
} }

View File

@ -130,8 +130,13 @@ echo "</head><body>\n";
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/../lib'; $jsDirName = dirname(__FILE__) . '/../lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
} }

View File

@ -87,8 +87,13 @@ echo $_SESSION['header'];
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/../lib'; $jsDirName = dirname(__FILE__) . '/../lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
} }
?> ?>

View File

@ -154,8 +154,13 @@ echo $_SESSION['header'];
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/../lib'; $jsDirName = dirname(__FILE__) . '/../lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
} }

View File

@ -111,8 +111,13 @@ echo "</head><body>\n";
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/../lib'; $jsDirName = dirname(__FILE__) . '/../lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
} }

View File

@ -72,8 +72,13 @@ echo $_SESSION['header'];
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/../lib'; $jsDirName = dirname(__FILE__) . '/../lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
} }

View File

@ -149,7 +149,7 @@ function display_LoginPage($config_object) {
echo $_SESSION["header"]; echo $_SESSION["header"];
?> ?>
<title>LDAP Account Manager -Login-</title> <title>LDAP Account Manager</title>
<link rel="stylesheet" type="text/css" href="../style/layout.css"> <link rel="stylesheet" type="text/css" href="../style/layout.css">
<link rel="shortcut icon" type="image/x-icon" href="../graphics/favicon.ico"> <link rel="shortcut icon" type="image/x-icon" href="../graphics/favicon.ico">
</head> </head>
@ -158,8 +158,13 @@ function display_LoginPage($config_object) {
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/lib'; $jsDirName = dirname(__FILE__) . '/lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"lib/" . $jsEntry . "\"></script>\n";
} }

View File

@ -52,8 +52,13 @@ echo "</head><body>\n";
// include all JavaScript files // include all JavaScript files
$jsDirName = dirname(__FILE__) . '/lib'; $jsDirName = dirname(__FILE__) . '/lib';
$jsDir = dir($jsDirName); $jsDir = dir($jsDirName);
$jsFiles = array();
while ($jsEntry = $jsDir->read()) { while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
$jsFiles[] = $jsEntry;
}
sort($jsFiles);
foreach ($jsFiles as $jsEntry) {
echo "<script type=\"text/javascript\" src=\"" . $headerPrefix . "lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"" . $headerPrefix . "lib/" . $jsEntry . "\"></script>\n";
} }