diff options
author | wei <> | 2006-10-06 03:46:05 +0000 |
---|---|---|
committer | wei <> | 2006-10-06 03:46:05 +0000 |
commit | fe60cc221f922ea362826e2d00431c5df28fe85f (patch) | |
tree | 9c0449718a862a5b51d62c4ac9697db15c13863f /framework/Web/Javascripts/js/debug | |
parent | 9fee2935d91e92235b068632d3608c748ef41bfe (diff) |
fixed #410 #412
Diffstat (limited to 'framework/Web/Javascripts/js/debug')
-rw-r--r-- | framework/Web/Javascripts/js/debug/ajax.js | 32 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/debug/logger.js | 17 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/debug/prado.js | 4 |
3 files changed, 34 insertions, 19 deletions
diff --git a/framework/Web/Javascripts/js/debug/ajax.js b/framework/Web/Javascripts/js/debug/ajax.js index 77df7bc2..ba777546 100644 --- a/framework/Web/Javascripts/js/debug/ajax.js +++ b/framework/Web/Javascripts/js/debug/ajax.js @@ -2614,6 +2614,7 @@ Prado.WebUI.TRatingList = Base.extend( {
selectedIndex : -1,
enabled : true,
+ readOnly : false,
constructor : function(options)
{
@@ -2632,20 +2633,20 @@ Prado.WebUI.TRatingList = Base.extend( _init: function(options)
{
Element.addClassName($(this.options.ListID),this.options.Style);
- var radios = document.getElementsByName(this.options.ListName);
this.radios = new Array();
var index=0;
- for(var i = 0; i<radios.length; i++)
+ for(var i = 0; i<this.options.ItemCount; i++)
{
- var node = radios[i].parentNode;
- if(node.tagName.toLowerCase()=='td')
+ var radio = $(this.options.ListID+'_c'+i);
+ var td = radio.parentNode;
+ if(radio && td.tagName.toLowerCase()=='td')
{
- this.radios.push(radios[i]);
- Event.observe(node, "mouseover", this.hover.bindEvent(this,index));
- Event.observe(node, "mouseout", this.recover.bindEvent(this,index));
- Event.observe(node, "click", this.click.bindEvent(this, index));
+ this.radios.push(radio);
+ Event.observe(td, "mouseover", this.hover.bindEvent(this,index));
+ Event.observe(td, "mouseout", this.recover.bindEvent(this,index));
+ Event.observe(td, "click", this.click.bindEvent(this, index));
index++;
- Element.addClassName(node,"rating");
+ Element.addClassName(td,"rating");
}
}
},
@@ -2656,7 +2657,7 @@ Prado.WebUI.TRatingList = Base.extend( for(var i = 0; i<this.radios.length; i++)
{
var action = i <= index ? 'addClassName' : 'removeClassName'
- Element[action](this.radios[i].parentNode,"rating_hover");
+ Element[action](this.radios[i].parentNode,"rating_selected");
}
this.setCaption(index);
},
@@ -2665,7 +2666,7 @@ Prado.WebUI.TRatingList = Base.extend( {
if(this.enabled==false) return;
for(var i = 0; i<=index; i++)
- Element.removeClassName(this.radios[i].parentNode, "rating_hover");
+ Element.removeClassName(this.radios[i].parentNode, "rating_selected");
this.setRating(this.selectedIndex);
},
@@ -2679,7 +2680,7 @@ Prado.WebUI.TRatingList = Base.extend( var requestOptions = Object.extend(
{
ID : this.options.ListID+"_c"+index,
- EventTarget : this.options.ListName+"$c"+index
+ EventTarget : this.options.ListID+"$c"+index
},this.options);
var request = new Prado.CallbackRequest(requestOptions.EventTarget, requestOptions);
if(request.dispatch()==false)
@@ -2688,9 +2689,11 @@ Prado.WebUI.TRatingList = Base.extend( setRating: function(index)
{
+
for(var i = 0; i<this.radios.length; i++)
{
- var action = i <= index ? 'addClassName' : 'removeClassName'
+ var node = this.radios[i].parentNode;
+ var action = i > index ? 'removeClassName' : 'addClassName'
Element[action](this.radios[i].parentNode, "rating_selected");
}
this.setCaption(index);
@@ -2701,7 +2704,7 @@ Prado.WebUI.TRatingList = Base.extend( var value = index > -1 ? this.radios[index].value : this.options.caption;
var caption = $(this.options.CaptionID);
if(caption) caption.innerHTML = value;
- $(this.options.ListName).title = value;
+ $(this.options.ListID).title = value;
},
setEnabled : function(value)
@@ -2711,7 +2714,6 @@ Prado.WebUI.TRatingList = Base.extend( {
var action = value ? 'removeClassName' : 'addClassName'
Element[action](this.radios[i].parentNode, "rating_disabled");
- Element.removeClassName(this.radios[i].parentNode, "rating_hover");
}
}
},
diff --git a/framework/Web/Javascripts/js/debug/logger.js b/framework/Web/Javascripts/js/debug/logger.js index 2a376904..5d465d56 100644 --- a/framework/Web/Javascripts/js/debug/logger.js +++ b/framework/Web/Javascripts/js/debug/logger.js @@ -195,6 +195,8 @@ LogConsole.prototype = { commandHistory : [],
commandIndex : 0,
+ hidden : true,
+
// Methods
// -------
@@ -207,7 +209,7 @@ LogConsole.prototype = { document.body.appendChild(this.logElement)
Element.hide(this.logElement)
- this.logElement.style.position = "absolute"
+ this.logElement.style.position = "absolute"
this.logElement.style.left = '0px'
this.logElement.style.width = '100%'
@@ -272,8 +274,15 @@ LogConsole.prototype = { Event.observe(this.inputElement, 'keyup', this.handleInput.bind(this))
Event.observe(this.inputElement, 'click', function() {this.inputElement.select()}.bind(this))
+ if(document.all && !window.opera)
+ {
window.setInterval(this.repositionWindow.bind(this), 500)
- this.repositionWindow()
+ }
+ else
+ {
+ this.logElement.style.position="fixed";
+ this.logElement.style.bottom="0px";
+ }
// Listen to the logger....
Logger.onupdate.addListener(this.logUpdate.bind(this))
@@ -310,11 +319,15 @@ LogConsole.prototype = { show : function() {
Element.show(this.logElement)
this.outputElement.scrollTop = this.outputElement.scrollHeight // Scroll to bottom when toggled
+ if(document.all && !window.opera)
+ this.repositionWindow();
Cookie.set('ConsoleVisible', 'true')
this.inputElement.select()
+ this.hidden = false;
},
hide : function() {
+ this.hidden = true;
Element.hide(this.logElement)
Cookie.set('ConsoleVisible', 'false')
},
diff --git a/framework/Web/Javascripts/js/debug/prado.js b/framework/Web/Javascripts/js/debug/prado.js index 920c2150..aaae6bad 100644 --- a/framework/Web/Javascripts/js/debug/prado.js +++ b/framework/Web/Javascripts/js/debug/prado.js @@ -3504,7 +3504,7 @@ Prado.WebUI.TCheckBoxList = Base.extend( var checkBoxOptions = Object.extend(
{
ID : options.ListID+"_c"+i,
- EventTarget : options.ListName+"$c"+i
+ EventTarget : options.ListID+"$c"+i
}, options);
new Prado.WebUI.TCheckBox(checkBoxOptions);
}
@@ -3520,7 +3520,7 @@ Prado.WebUI.TRadioButtonList = Base.extend( var radioButtonOptions = Object.extend(
{
ID : options.ListID+"_c"+i,
- EventTarget : options.ListName+"$c"+i
+ EventTarget : options.ListID+"$c"+i
}, options);
new Prado.WebUI.TRadioButton(radioButtonOptions);
}
|