Merged from 1.7

This commit is contained in:
vyshane
2006-10-18 07:05:21 +00:00
parent 819e5a70c3
commit 8b8a8779dc
4 changed files with 32 additions and 32 deletions
-5
View File
@@ -71,11 +71,6 @@
print_require_js(array('yui_yahoo','yui_dom','yui_event','yui_dragdrop', 'yui_connection',
'ajaxcourse_blocks','ajaxcourse_sections','ajaxcourse'));
//javascript logging facilities
if (debugging()) {
print_require_js(Array('yui_logger'));
}
}
}
-5
View File
@@ -56,11 +56,6 @@
print_require_js(array('yui_yahoo','yui_dom','yui_event','yui_dragdrop', 'yui_connection',
'ajaxcourse_blocks','ajaxcourse_sections','ajaxcourse'));
//javascript logging facilities
if (debugging()) {
print_require_js(Array('yui_logger'));
}
}
}
+31 -2
View File
@@ -1,8 +1,9 @@
<?php // Library functions for using AJAX with Moodle
/**
* Print require statements for javascript libraries
* Takes in an array of either full paths or shortnames and it will translate them to full paths
* Print require statements for javascript libraries.
* Takes in an array of either full paths or shortnames and it will translate
* them to full paths.
**/
function print_require_js($list) {
global $CFG;
@@ -33,6 +34,34 @@ function print_require_js($list) {
echo "<script type='text/javascript' src='".$CFG->wwwroot.''.$list[$i]."'></script>\n";
}
}
if (debugging('', DEBUG_DEVELOPER)) {
echo "<script type='text/javascript' src='".$CFG->wwwroot.''.$translatelist['yui_logger']."'></script>\n";
// Dependencies for the logger.
echo "<link type='text/css' rel='stylesheet' href='{$CFG->wwwroot}/lib/yui/logger/assets/logger.css'>";
// FIXME: Below might get included more than once.
echo "<script type='text/javascript' src='".$CFG->wwwroot.''.$translatelist['yui_yahoo']."'></script>\n";
echo "<script type='text/javascript' src='".$CFG->wwwroot.''.$translatelist['yui_dom']."'></script>\n";
echo "<script type='text/javascript' src='".$CFG->wwwroot.''.$translatelist['yui_event']."'></script>\n";
echo "<script type='text/javascript' src='".$CFG->wwwroot.''.$translatelist['yui_dragdrop']."'></script>\n";
?>
<script type="text/javascript">
var logcontainer = null;
var logconfig = {
left: "60%",
top: "40px",
}
var logreader = new YAHOO.widget.LogReader(logcontainer, logconfig);
logreader.newestOnTop = false;
logreader.setTitle('Moodle Debug: YUI Log Console');
</script>
<?php
}
}
+1 -20
View File
@@ -1,20 +1 @@
/* logger default styles */
/* font size is controlled here: default 77% */
#yui-log {position:absolute;top:1em;right:1em;font-size:77%;text-align:left;}
/* width is controlled here: default 31em */
.yui-log {padding:1em;width:31em;background-color:#AAA;border:1px solid black;font-family:monospace;z-index:9000;}
.yui-log p {margin:1px;padding:.1em;}
.yui-log button {font-family:monospace;}
.yui-log .yui-log-hd {margin-top:1em;padding:.5em;background-color:#575757;color:#FFF;}
/* height is controlled here: default 20em*/
.yui-log .yui-log-bd {width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}
/* logger default styles */