You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2008/03/17 18:22:36 UTC

svn commit: r637978 - /myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/logging.js

Author: weber
Date: Mon Mar 17 10:22:35 2008
New Revision: 637978

URL: http://svn.apache.org/viewvc?rev=637978&view=rev
Log:
(TOBAGO-543) replace prototype with dojo as underlying ajax library
<http://issues.apache.org/jira/browse/TOBAGO-543>
  make logPanel moveable again

Modified:
    myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/logging.js

Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/logging.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/logging.js?rev=637978&r1=637977&r2=637978&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/logging.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/logging.js Mon Mar 17 10:22:35 2008
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+dojo.require("dojo.dnd.move");
 
 var LOG = {
   IdBase: "TbgLog",
@@ -26,6 +27,7 @@
   WARN:  3,
   ERROR: 4,
   NONE: 100,
+  HISTORY_SIZE: 500,
 
   show: function() {
     for (var i = 0 ; i < this.appenders.length; i++) {
@@ -42,6 +44,9 @@
 
   addMessage: function(msg) {
     this.messages.push(msg);
+    while (this.messages.length > this.HISTORY_SIZE) {
+      this.messages.shift();
+    }
     for (var i = 0 ; i < this.appenders.length; i++) {
       var appender = this.appenders[i];
       if (appender.append
@@ -122,14 +127,6 @@
 
 LOG.LogArea.prototype.initialize = function() {
     var options = Tobago.extend({
-      handle: false,
-      starteffect: function() {},
-      reverteffect: function() {},
-      endeffect: function() {},
-      zindex: 1000,
-      revert: false,
-      snap: false,   // false, or xy or [x,y] or function(x,y){ return [x,y] }
-
       // logging
       hide: false,
       severity: LOG.DEBUG
@@ -261,8 +258,7 @@
     Tobago.addBindEventListener(this.hideButton, "click", this, "doHide");
     Tobago.addBindEventListener(this.hideButton, "mousedown", Tobago, "stopEventPropagation");
 
-    // Todo: make box dragable without prototype
-//    Draggables.register(this);
+    new dojo.dnd.Moveable(this.element, {handle: this.dragHandleTop});
 
 
     this.body = document.getElementsByTagName("body")[0];