[Rt-commit] r15920 - in rt/branches/3.999-DANGEROUS: share/html/NoAuth/js share/web/static/js

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Sep 11 06:46:56 EDT 2008


Author: sunnavy
Date: Thu Sep 11 06:46:49 2008
New Revision: 15920

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/class.js
   rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/combobox.js
   rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/list.js
   rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/util.js
   rt/branches/3.999-DANGEROUS/share/web/static/js/titlebox-state.js

Log:
 r16612 at sunnavys-mb:  sunnavy | 2008-09-11 18:38:25 +0800
 revert some name back for js
 r16613 at sunnavys-mb:  sunnavy | 2008-09-11 18:44:53 +0800
 RT.WebPath is right


Modified: rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/class.js
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/class.js	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/class.js	Thu Sep 11 06:46:49 2008
@@ -1,7 +1,7 @@
 /* by TKirby, released under GPL */
 
- function _ClassSetup(object) {
-  this.prototype	= object;
+ function _ClassSetup(Object) {
+  this.prototype	= Object;
   return this;
  }
  

Modified: rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/combobox.js
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/combobox.js	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/combobox.js	Thu Sep 11 06:46:49 2008
@@ -194,13 +194,13 @@
 function ComboBox_ListItemSelect(e) {
     if( this.options.length > 0 ) {
         var text = this.Container.Text;
-        var old_value = text.value;
-        var new_value = this.options[ this.selectedIndex ].text;
-        text.value = new_value;
+        var oldValue = text.value;
+        var newValue = this.options[ this.selectedIndex ].text;
+        text.value = newValue;
         if ( typeof( text.createTextRange ) != "undefined" ) {
-            if (new_value != old_value) {
+            if (newValue != oldValue) {
                 var rNew = text.createTextRange();
-                rNew.moveStart('character', old_value.length) ;
+                rNew.moveStart('character', oldValue.length) ;
                 rNew.select();
             }
         }
@@ -220,18 +220,18 @@
         this.style.width = ( this.Container.offsetWidth ) + "px";
         this.style.top = '1.2em';//( this.Container.offsetHeight + ComboBox_RecursiveOffsetTop(this.Container,true) ) + "px";
         this.style.left = '0px';// ( ComboBox_RecursiveOffsetLeft(this.Container,true) + 1 ) + "px";
-        ComboBox_setVisibility(this,true);
+        ComboBox_SetVisibility(this,true);
         this.focus();
         this.IsShowing = true;
     }
 }
 function ComboBox_HideList(e) {
     if( this.IsShowing ) {
-                    ComboBox_setVisibility(this,false);
+                    ComboBox_SetVisibility(this,false);
         this.IsShowing = false;
     }
 }
-function ComboBox_setVisibility(theList, isVisible) {
+function ComboBox_SetVisibility(theList, isVisible) {
     setVisibility(theList, isVisible);
 }
 function ComboBox_RecursiveOffsetTop(thisObject,isFirst) {

Modified: rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/list.js
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/list.js	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/list.js	Thu Sep 11 06:46:49 2008
@@ -12,7 +12,7 @@
      else {
 	 var doc	= this.xml.responseXML;
 	 var nNode	= null;
-	 if(doc.childNodes[0].nodename=="parseerror") alert("Parse Error.");
+	 if(doc.childNodes[0].nodeName=="parseerror") alert("Parse Error.");
 	 doc		= doc.getElementsByTagName("list")[0];
 	 for(i=0;i<doc.childNodes.length;i++) {
 	     if(doc.childNodes[i].childNodes.length>0) {
@@ -30,16 +30,16 @@
      this.sels		= new Array();
      var i			= 0;
      for(i=0;i<src.childNodes.length;i++) {
-	 if(src.childNodes[i].nodename=="select" || src.childNodes[i].nodename=="SELECT") {
+	 if(src.childNodes[i].nodeName=="select" || src.childNodes[i].nodeName=="SELECT") {
 	     this.sels.push(src.childNodes[i]);
 	 } 
 
-	 if((src.childNodes[i].nodename=="input" || src.childNodes[i].nodename=="INPUT")
+	 if((src.childNodes[i].nodeName=="input" || src.childNodes[i].nodeName=="INPUT")
 	    && (src.childNodes[i].name=="fromjs")) {
 	     src.childNodes[i].value = 1;
 	 }
 
-	 if((src.childNodes[i].nodename=="input" || src.childNodes[i].nodename=="INPUT")
+	 if((src.childNodes[i].nodeName=="input" || src.childNodes[i].nodeName=="INPUT")
 	    && (src.childNodes[i].type=="submit" || src.childNodes[i].type=="SUBMIT")) {
 
 	     if (src.childNodes[i].name.indexOf("Save") < 0) {
@@ -61,7 +61,7 @@
 	 } 
      }
      if (esrc) {
-	 this.xml	= (window.navigator.appname!="Microsoft Internet Explorer"
+	 this.xml	= (window.navigator.appName!="Microsoft Internet Explorer"
 			   ?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP"));
 	 this.xml.open("GET", esrc);
 	 this.xml.send("");

Modified: rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/util.js
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/util.js	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/NoAuth/js/util.js	Thu Sep 11 06:46:49 2008
@@ -116,8 +116,7 @@
 function rollup(id) {
     var e   = $(id);
     var e2  = e.parentNode;
-    
-    if ( e.className.match(/\bhidden\b/)) {
+    if (e.className.match(/\bhidden\b/)) {
         set_rollup_state(e,e2,'shown');
         createCookie(id,1,365);
     }
@@ -183,6 +182,7 @@
 /* calendar functions */
 
 function openCalWindow(field) {
+
     var objWindow = window.open(RT.WebPath+'/Helpers/CalPopup.html?field='+field, 
                                 'RT_Calendar', 
                                 'height=235,width=285,scrollbars=1');
@@ -193,11 +193,11 @@
     var e = $(input);
     if (e) {
         var link = document.createElement('a');
-        link.set_attribute('href', '#');
+        link.setAttribute('href', '#');
         $(link).observe('click', function(ev) { openCalWindow(input); ev.stop(); });
         //link.setAttribute('onclick', "openCalWindow('"+input+"'); return false;");
 
-        var text = document.createTextNode(_("Calendar"));
+        var text = document.createTextNode('<% _("Calendar") %>');
         link.appendChild(text);
 
         var space = document.createTextNode(' ');
@@ -273,7 +273,7 @@
 	}
 }
 
-function checkAllobjects()
+function checkAllObjects()
 {
 	var check = $('shredder-select-all-objects-checkbox').checked;
 	var elements = $('shredder-search-form').elements;

Modified: rt/branches/3.999-DANGEROUS/share/web/static/js/titlebox-state.js
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/web/static/js/titlebox-state.js	(original)
+++ rt/branches/3.999-DANGEROUS/share/web/static/js/titlebox-state.js	Thu Sep 11 06:46:49 2008
@@ -1,4 +1,3 @@
-/*
 %# BEGIN BPS TAGGED BLOCK {{{
 %# 
 %# COPYRIGHT:
@@ -46,9 +45,8 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-*/
 function createCookie(name,value,days) {
-    var path = RT.WebPath;
+    var path = "<%RT->config->get('WebPath')%>" ? "<%RT->config->get('WebPath')%>" : "/";
 
     if (days) {
         var date = new Date();


More information about the Rt-commit mailing list