Permalink
Browse files

Use same script tag, use CDATA for scripts (RFE #995065).

  • Loading branch information...
1 parent d7c81e9 commit 75a16f45f864aa2bf8630070493faebc1f6f8bf3 @nijel nijel committed Dec 4, 2005
View
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
+2005-12-05 Michal Čihař <michal@cihar.com>
+ * many files: Use same script tag, use CDATA for scripts (RFE #995065).
+
2005-12-04 Marc Delisle <lem9@users.sourceforge.net>
* lang/catalan update, thanks to Xavier Navarro (xavin).
* server_privileges.php: do not use UNION DISTINCT, as it's not allowed
View
@@ -6,13 +6,13 @@
$page_title = $strCalendar;
require('./libraries/header_meta_style.inc.php');
?>
-<script type="text/javascript" src="./js/tbl_change.js"></script>
-<script type="text/javascript">
-<!--
+<script type="text/javascript" language="javascript" src="./js/tbl_change.js"></script>
+<script type="text/javascript" language="javascript">
+//<![CDATA[
var month_names = new Array("<?php echo implode('","', $month); ?>");
var day_names = new Array("<?php echo implode('","', $day_of_week); ?>");
var submit_text = "<?php echo $strGo; ?>";
-//-->
+//]]>
</script>
</head>
<body onload="initCalendar();">
View
@@ -287,16 +287,16 @@
*/
echo "\n";
?>
-<script type="text/javascript" language="javascript1.2">
-<!--
+<script type="text/javascript" language="javascript">
+//<![CDATA[
function printPage()
{
// Do print the page
if (typeof(window.print) != 'undefined') {
window.print();
}
}
-//-->
+//]]>
</script>
<?php
echo '<br /><br />&nbsp;<input type="button" class="print_ignore" style="width: 100px; height: 25px" id="print" value="' . $strPrint . '" onclick="printPage()" />' . "\n";
View
@@ -580,8 +580,9 @@ function PMA_exportOutputHandler($line)
. ' </form>' . "\n";
echo '</div>' . "\n";
echo "\n";
-?><script language="JavaScript" type="text/javascript">
-<!--
+?>
+<script type="text/javascript" language="javascript">
+//<![CDATA[
var bodyWidth=null; var bodyHeight=null;
if (document.getElementById('textSQLDUMP')) {
bodyWidth = self.innerWidth;
@@ -598,7 +599,7 @@ function PMA_exportOutputHandler($line)
document.getElementById('textSQLDUMP').style.width=(bodyWidth-50) + 'px';
document.getElementById('textSQLDUMP').style.height=(bodyHeight-100) + 'px';
}
-//-->
+//]]>
</script>
<?php
require_once('./libraries/footer.inc.php');
View
@@ -869,11 +869,16 @@ function PMA_sendHeaderLocation( $uri )
echo '<meta http-equiv="Pragma" content="no-cache">' . "\n";
echo '<meta http-equiv="Cache-Control" content="no-cache">' . "\n";
echo '<meta http-equiv="Refresh" content="0;url=' .$uri . '">' . "\n";
- echo '<script language="JavaScript">' . "\n";
+ echo '<script type="text/javascript" language="javascript">' . "\n";
+ echo '//<![CDATA[' . "\n";
echo 'setTimeout ("window.location = unescape(\'"' . $uri . '"\')",2000); </script>' . "\n";
+ echo '//]]>' . "\n";
echo '</head>' . "\n";
- echo '<body> <script language="JavaScript">' . "\n";
+ echo '<body>' . "\n";
+ echo '<script type="text/javascript" language="javascript">' . "\n";
+ echo '//<![CDATA[' . "\n";
echo 'document.write (\'<p><a href="' . $uri . '">' . $GLOBALS['strGo'] . '</a></p>\');' . "\n";
+ echo '//]]>' . "\n";
echo '</script></body></html>' . "\n";
} else {
@@ -1199,7 +1204,7 @@ function PMA_reloadNavigation() {
echo "\n";
$reload_url = './left.php?' . PMA_generate_common_url((isset($GLOBALS['db']) ? $GLOBALS['db'] : ''), '', '&');
?>
-<script type="text/javascript">
+<script type="text/javascript" language="javascript">
//<![CDATA[
if (typeof(window.parent) != 'undefined'
&& typeof(window.parent.frames[0]) != 'undefined') {
@@ -1241,7 +1246,7 @@ function PMA_showMessage($message)
$uni_tbl = PMA_jsFormat( $GLOBALS['db'] . '.' . $GLOBALS['table'], false );
echo "\n";
?>
-<script type="text/javascript">
+<script type="text/javascript" language="javascript">
//<![CDATA[
window.parent.updateTableTitle( '<?php echo $uni_tbl; ?>', '<?php echo PMA_jsFormat($tooltip, false); ?>' );
//]]>
@@ -58,8 +58,8 @@ function PMA_exportIsActive($what, $val) {
}
?>
-<script type="text/javascript">
-<!--
+<script type="text/javascript" language="javascript">
+//<![CDATA[
function hide_them_all() {
document.getElementById("csv_options").style.display = 'none';
document.getElementById("excel_options").style.display = 'none';
@@ -114,7 +114,7 @@ function show_checked_option() {
}
}
}
-//-->
+//]]>
</script>
<fieldset id="fieldsetexport">
@@ -748,10 +748,10 @@ function show_checked_option() {
<input type="hidden" name="xml_data" value="xml_data" />
</fieldset>
-<script type="text/javascript">
-<!--
+<script type="text/javascript" language="javascript">
+//<![CDATA[
show_checked_option();
-//-->
+//]]>
</script>
<?php if ( ! empty( $table ) && ! isset( $num_tables ) ) { ?>
@@ -71,7 +71,7 @@ function PMA_importIsActive($what, $val) {
echo ' <input type="hidden" name="import_type" value="' . $import_type . '" />';
?>
- <script type="text/javascript">
+ <script type="text/javascript" language="javascript">
//<![CDATA[
function hide_them_all() {
<?php
@@ -289,7 +289,7 @@ function match_file(fname) {
<input type="submit" value="<?php echo $strGo; ?>" id="buttonGo" />
</fieldset>
</form>
-<script type="text/javascript">
+<script type="text/javascript" language="javascript">
//<![CDATA[
init_options();
//]]>
View
@@ -18,7 +18,7 @@
// If query window is open, update with latest selected db/table.
?>
-<script type="text/javascript">
+<script type="text/javascript" language="javascript">
//<![CDATA[
<?php
if ( ! isset( $GLOBALS['no_history'] ) && ! empty( $GLOBALS['db'] ) && empty( $GLOBALS['error_message'] ) ) {
@@ -343,7 +343,7 @@ function PMA_sqlQueryFormInsert( $query = '', $is_querywindow = false ) {
echo '<div class="formelement">' . "\n";
if ( $is_querywindow ) {
?>
- <script type="text/javascript">
+ <script type="text/javascript" language="javascript">
//<![CDATA[
document.writeln(' <input type="checkbox" name="LockFromUpdate" value="1" id="checkbox_lock" /> <label for="checkbox_lock"><?php echo $GLOBALS['strQueryWindowLock']; ?></label> ');
//]]>
View
@@ -303,7 +303,7 @@
$with_field_names = TRUE;
}
?>
-<script type="text/javascript" src="./js/dom-drag.js"></script>
+<script type="text/javascript" language="javascript" src="./js/dom-drag.js"></script>
<form method="post" action="pdf_pages.php" name="dragdrop">
<input type="button" name="dragdrop" value="<?php echo $strToggleScratchboard; ?>" onclick="ToggleDragDrop('pdflayout');" />
<input type="button" name="dragdropreset" value="<?php echo $strReset; ?>" onclick="resetDrag();" />
@@ -344,8 +344,8 @@
}
?>
</div>
-<script type="text/javascript">
-<!--
+<script type="text/javascript" language="javascript">
+//<![CDATA[
function init() {
refreshLayout();
myid = getElement('pdflayout');
@@ -355,7 +355,7 @@ function init() {
function resetDrag() {
<?php echo $reset_draginit; ?>
}
-// -->
+//]]>
</script>
<?php
} // end if WYSIWYG-PDF
@@ -517,10 +517,10 @@ function resetDrag() {
<?php
if ((isset($showwysiwyg) && $showwysiwyg == '1')) {
?>
-<script type="text/javascript">
-<!--
+<script type="text/javascript" language="javascript">
+//<![CDATA[
ToggleDragDrop('pdflayout');
-// -->
+//]]>
</script>
<?php
}
View
@@ -1161,8 +1161,8 @@ function load_config($config_file) {
echo htmlspecialchars(get_cfg_string($configuration));
echo '</textarea></form>' . "\n";
?>
-<script language="javascript" type="text/javascript">
-<!--
+<script type="text/javascript" language="javascript">
+//<![CDATA[
var bodyWidth=null; var bodyHeight=null;
if (document.getElementById('textconfig')) {
bodyWidth = self.innerWidth;
@@ -1179,7 +1179,7 @@ function load_config($config_file) {
document.getElementById('textconfig').style.width=(bodyWidth-50) + 'px';
document.getElementById('textconfig').style.height=(bodyHeight-100) + 'px';
}
-//-->
+//]]>
</script>
<?php
break;
View
@@ -176,10 +176,10 @@
<!-- Set on key handler for moving using by Ctrl+arrows -->
<script src="./js/keyhandler.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript" language="javascript">
-<!--
+//<![CDATA[
var switch_movement = 0;
document.onkeydown = onKeyDownArrowsHandler;
-// -->
+//]]>
</script>
<?php } ?>
@@ -583,7 +583,9 @@
<input type="hidden" name="fields<?php echo $vkey; ?>[<?php echo urlencode($field); ?>]" value="" id="field_<?php echo ($idindex); ?>_1" />
<input type="text" name="field_<?php echo md5($field); ?><?php echo $vkey; ?>[]" class="textfield" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>', '<?php echo $jsvkey; ?>')" tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>" id="field_<?php echo ($idindex); ?>_3" value="<?php echo htmlspecialchars($data); ?>" />
<script type="text/javascript" language="javascript">
+ //<![CDATA[
document.writeln('<a target="_blank" onclick="window.open(this.href, \'foreigners\', \'width=640,height=240,scrollbars=yes,resizable=yes\'); return false" href="browse_foreigners.php?<?php echo PMA_generate_common_url($db, $table); ?>&amp;field=<?php echo urlencode($field) . $browse_foreigners_uri; ?>"><?php echo str_replace("'", "\'", $titles['Browse']); ?></a>');
+ //]]>
</script>
</td>
<?php
@@ -851,10 +853,10 @@
}
if ($type == 'date' || $type == 'datetime' || substr($type, 0, 9) == 'timestamp') {
?>
- <script type="text/javascript">
- <!--
+ <script type="text/javascript" language="javascript">
+ //<![CDATA[
document.write('<a title="<?php echo $strCalendar;?>" href="javascript:openCalendar(\'<?php echo PMA_generate_common_url();?>\', \'insertForm\', \'field_<?php echo ($idindex); ?>_3\', \'<?php echo (PMA_MYSQL_INT_VERSION >= 40100 && substr($type, 0, 9) == 'timestamp') ? 'datetime' : substr($type, 0, 9); ?>\')"><img class="calendar" src="<?php echo $pmaThemeImage; ?>b_calendar.png" alt="<?php echo $strCalendar; ?>"/></a>');
- //-->
+ //]]>
</script>
<?php
}
View
@@ -543,16 +543,16 @@
*/
echo "\n";
?>
-<script type="text/javascript" language="javascript1.2">
-<!--
+<script type="text/javascript" language="javascript">
+//<![CDATA[
function printPage()
{
// Do print the page
if (typeof(window.print) != 'undefined') {
window.print();
}
}
-//-->
+//]]>
</script>
<?php
echo '<br /><br />&nbsp;<input type="button" class="print_ignore" style="width: 100px; height: 25px" id="print" value="' . $strPrint . '" onclick="printPage()" />' . "\n";
View
@@ -92,7 +92,7 @@
//$foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE);
$foreigners = PMA_getForeigners($db, $table);
?>
-<script language="JavaScript" type="text/javascript">
+<script type="text/javascript" language="javascript">
// <![CDATA[
function PMA_tbl_select_operator(f, index, multiple) {
switch (f.elements["func[" + index + "]"].options[f.elements["func[" + index + "]"].selectedIndex].value) {
View
@@ -12,7 +12,7 @@
$page_title = 'phpMyAdmin - ' . $strTheme;
require('./libraries/header_meta_style.inc.php');
?>
-<script language="JavaScript" type="text/javascript">
+<script type="text/javascript" language="javascript">
// <![CDATA[
function takeThis(what){
if (window.opener && window.opener.document.forms['setTheme'].elements['set_theme']) {

0 comments on commit 75a16f4

Please sign in to comment.