rbrindley: branch rbrindley/astman_revamp r4558 - /team/rbrindley/astman_reva...
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Tue Mar 3 11:14:52 CST 2009
Author: rbrindley
Date: Tue Mar 3 11:14:49 2009
New Revision: 4558
URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4558
Log:
- added a comment for log.clear
- copied miscFunctions.DEBUG_START to log.init
Modified:
team/rbrindley/astman_revamp/config/js/log.js
Modified: team/rbrindley/astman_revamp/config/js/log.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/astman_revamp/config/js/log.js?view=diff&rev=4558&r1=4557&r2=4558
==============================================================================
--- team/rbrindley/astman_revamp/config/js/log.js (original)
+++ team/rbrindley/astman_revamp/config/js/log.js Tue Mar 3 11:14:49 2009
@@ -59,7 +59,7 @@
};
/**
- *
+ * Clear log messages.
*/
log.clear = function() {
top.session.debug_log = [];
@@ -124,6 +124,63 @@
};
/**
+ * Init Logging.
+ * @param html the jQuery selector or jQuery object storing mesgs
+ */
+log.init = function(html) {
+ if (top.sessionData.DEBUG_PROFILER_BEGIN) {
+ return;
+ }
+
+ var m = _$('debug_messages');
+ var aaaaa = function() {
+ if (top.session.log && top.session.debug_log.length) {
+ if (m.style.display == '') {
+ m.innerHTML = '<li>' + top.session.debug_log.join('<li>');
+ }
+ }
+ };
+ m.innerHTML = 'No log messages';
+ var now = new Date();
+ top.session.DEBUG_PROFILER_BEGIN = now.getTime();
+ setInterval(aaaaa, 3000);
+
+ m.style.display = '';
+ $('#dbw_flip').click( function() {
+ if (m.style.display == '') {
+ m.style.display = 'none';
+ this.innerHTML = 'Show debug messages';
+ this.className = 'dbw_flip_hide';
+ } else if ( m.style.display == 'none') {
+ m.innerHTML = (top.session.debug_log.length) ? '<li>' + top.session.debug_log.join('<li>') : 'No log messages';
+ m.style.display = '';
+ this.innerHTML = 'Hide debug messages';
+ this.className = 'dbw_flip_show';
+ }
+ }):
+
+ aaaaa();
+
+ _$('debugWindow_which_Ajax').checked = sessionData.DEBUG_WHICH.Ajax ;
+ $('#debugWindow_which_Ajax').click(function(){ sessionData.DEBUG_WHICH.Ajax = this.checked ; });
+
+ _$('debugWindow_which_Debug').checked = sessionData.DEBUG_WHICH.Debug ;
+ $('#debugWindow_which_Debug').click(function(){ sessionData.DEBUG_WHICH.Debug = this.checked ; });
+
+ _$('debugWindow_which_Error').checked = sessionData.DEBUG_WHICH.Error ;
+ $('#debugWindow_which_Error').click(function(){ sessionData.DEBUG_WHICH.Error = this.checked ; });
+
+ _$('debugWindow_which_Console').checked = sessionData.DEBUG_WHICH.Console ;
+ $('#debugWindow_which_Console').click(function(){ sessionData.DEBUG_WHICH.Console = this.checked ; });
+
+ _$('debugWindow_which_Info').checked = sessionData.DEBUG_WHICH.Info ;
+ $('#debugWindow_which_Info').click(function(){ sessionData.DEBUG_WHICH.Info = this.checked ; });
+
+ _$('debugWindow_which_Warnings').checked = sessionData.DEBUG_WHICH.Warn ;
+ $('#debugWindow_which_Warnings').click(function(){ sessionData.DEBUG_WHICH.Warn = this.checked ; });
+};
+
+/**
* Log as Warning.
* @param msg The message.
*/
More information about the asterisk-gui-commits
mailing list