basic.html revision 16479f9c396537f36d0d9c5633b24df618eee1e6
<!doctype html>
<html>
<head>
<title>Test Page</title>
<link type="text/css" rel="stylesheet" href="/assets/dpSyntaxHighlighter.css">
<!--link type="text/css" rel="stylesheet" href="/build/console/assets/skins/sam/console.css"-->
<style type="text/css">
.yui-skin-sam #c .yui-console {
position: relative;
top: auto;
right: auto;
}
#c {
margin-bottom: 1em;
}
</style>
</head>
<body class="yui-skin-sam">
<div class="markup">
<div id="c"></div>
<input type="button" id="foo" value="Log foo msg">
<input type="button" id="info" value="Log info msg">
<input type="button" id="warn" value="Log warn msg">
<input type="button" id="error" value="Log error msg">
<button type="button" id="hide">Hide</button>
<button type="button" id="show">Show</button>
<button type="button" id="collapse">Collapse</button>
<button type="button" id="expand">Expand</button>
<button type="button" id="destroy">Destroy</button>
</div>
<script type="text/javascript" src="/build/yui/yui.js"></script>
<script type="text/javascript">
YUI({
base: '/build/',
useBrowserConsole:false,
//logLevel: 'warn',
filter: 'debug',
logInclude : { global: true }
}).use('console',function (Y) {
var x = {
foo : 0,
info : 0,
warn : 0,
error : 0
};
Y.on('click',function (e) { Y.log('FOO message '+(++x.foo),'foo'); },'#foo');
Y.on('click',function (e) { Y.log('INFO message '+(++x.info)); },'#info');
Y.on('click',function (e) { Y.log('WARN message '+(++x.warn),'warn'); },'#warn');
Y.on('click',function (e) { Y.log('ERROR message '+(++x.error),'error'); },'#error');
Y.get('#hide').on('click', function () { yconsole.hide(); });
Y.get('#show').on('click', function () { yconsole.show(); });
Y.get('#collapse').on('click', function () { yconsole.collapse(); });
Y.get('#expand').on('click', function () { yconsole.expand(); });
Y.get('#destroy').on('click', function () { yconsole.destroy(); });
var yconsole = new Y.Console({
//verbose : true,
//consoleLimit : 10,
logLevel : "Garbage",
newestOnTop : false
});
yconsole.render('#c');
Y.log('testing');
Y.log('testing known category','info');
Y.log('testing new category','foo');
Y.log('testing known source','info','global');
Y.log('testing new source','info','bar');
yconsole.log("Test from the console object",'info','Console');
});
</script>
<script type="text/javascript" src="/assets/dpSyntaxHighlighter.js"></script>
<script type="text/javascript" src="/assets/dpSyntaxHighlightExample.js"></script>
</body>
</html>