pari: trunk r1287 - in /trunk/config: cdr.html cdr_conf.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Aug 1 17:35:08 CDT 2007
Author: pari
Date: Wed Aug 1 17:35:07 2007
New Revision: 1287
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1287
Log:
minor improvements to bryant's CDR stuff :-)
Modified:
trunk/config/cdr.html
trunk/config/cdr_conf.html
Modified: trunk/config/cdr.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cdr.html?view=diff&rev=1287&r1=1286&r2=1287
==============================================================================
--- trunk/config/cdr.html (original)
+++ trunk/config/cdr.html Wed Aug 1 17:35:07 2007
@@ -1,3 +1,23 @@
+<!--
+ * Asterisk-GUI - an Asterisk configuration interface
+ *
+ * CDR Reader - show cdr entries from Master.csv
+ *
+ * Copyright (C) 2007, Digium, Inc.
+ *
+ * Brett Bryant <bbryant at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ *
+-->
<script type="text/javascript" src="scripts/prototype.js"></script>
<script type="text/javascript" src="scripts/astman.js"></script>
<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
@@ -22,30 +42,26 @@
}
- #tr0 {
+ .tr0 {
background-color: #efaa50;
color: white;
font-weight: bold;
}
- #tr1 {
+ .tr1 {
background-color: #6b79a5;
color: white;
font-weight: bold
}
- #tr2 {
+ .tr2 {
background-color: white;
color: black;
text-decoration: underline;
}
- #tr0 td, #tr1 td, #tr2 td {
+ .tr0 td, .tr1 td, .tr2 td {
font-size: xx-small;
- }
-
- #cdr_content {
- overflow: scroll;
}
.info {
@@ -83,12 +99,15 @@
function loadRecords() {
var c = viewCount;
- clearContent();
+ var e = _$("cdr_content_container");
+ e.innerHTML = "";
+ var d = document.createElement("TABLE");
+ d.style.overflow = "scroll" ;
_$("info").innerHTML = "Viewing " + (offset+1) + "-" + (offset+viewCount) + " of " + records.length;
var tr = document.createElement("tr");
- tr.id = "tr2";
+ tr.className = "tr2";
for(var i=0;i<=records[offset].length;i++) {
var td = document.createElement("td");
@@ -96,11 +115,11 @@
tr.appendChild(td);
}
- _$("cdr_content").appendChild(tr);
+ d.appendChild(tr);
for(var i=0;c--&&isset(records[i+offset]);i++) {
var tr = document.createElement("tr");
- tr.id = "tr"+(i%2);
+ tr.className = "tr"+(i%2);
var r = records[i+offset];
for(var j=-1;j<r.length;j++) {
@@ -113,16 +132,10 @@
tr.appendChild(td);
}
- _$("cdr_content").appendChild(tr);
+ d.appendChild(tr);
}
- }
-
- function clearContent() {
- while(_$("cdr_content").childNodes.length) {
- _$("cdr_content").removeChild(
- _$("cdr_content").childNodes[0]
- );
- }
+
+ e.appendChild(d);
}
window.onload = function() {
@@ -133,6 +146,13 @@
if (isset(config.enable) && !ast_true(config.enable))
this.location.href = "cdr_conf.html?needssetup";
});
+
+ var adjust_toScreen = function(){
+ var i = ASTGUI.displayHeight();
+ _$('cdr_content_container').style.height = (i -120);
+ }
+ ASTGUI.events.add( window , 'resize', adjust_toScreen);
+ top._$('mainscreen').width= 798;
parent.astmanEngine.run_tool("sh " + asterisk_scriptsFolder + "mastercsvexists", function (){
new Ajax.Request("/asterisk/static/Master.csv", {
@@ -152,9 +172,13 @@
});
});
}
+
+ window.onunload = function() {
+ top._$('mainscreen').width= 540;
+ }
//]]>
</script>
-<body>
+<body bgcolor="FFFFFF">
<div id="page_header">
<span style="margin-left: 4px"><strong>CDR viewer</strong></span>
<img src="images/refresh.png" alt=" Refresh " onclick="javascript: this.location.href=this.location.href" />
@@ -174,7 +198,5 @@
</select>
</div>
<div id="info" class="info"></div><div class="info"> (most recent first) <a href="cdr_conf.html" target="_self">Configure CDRs</a></div>
- <div style="width: 500px; position: relative; left: 10px; height: 320px; overflow: auto;" id="cdr_content_container">
- <table id="cdr_content"></table>
- </div>
+ <div style="width:770 ; margin-left: 10px; overflow: auto;" id="cdr_content_container"></div>
</body>
Modified: trunk/config/cdr_conf.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cdr_conf.html?view=diff&rev=1287&r1=1286&r2=1287
==============================================================================
--- trunk/config/cdr_conf.html (original)
+++ trunk/config/cdr_conf.html Wed Aug 1 17:35:07 2007
@@ -1,3 +1,23 @@
+<!--
+ * Asterisk-GUI - an Asterisk configuration interface
+ *
+ * CDR Configuration
+ *
+ * Copyright (C) 2007, Digium, Inc.
+ *
+ * Brett Bryant <bbryant at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ *
+-->
<script type="text/javascript" src="scripts/prototype.js"></script>
<script type="text/javascript" src="scripts/astman.js"></script>
<script type="text/javascript" src="scripts/tooltip.js"></script>
More information about the asterisk-gui-commits
mailing list