From fe60cc221f922ea362826e2d00431c5df28fe85f Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 6 Oct 2006 03:46:05 +0000 Subject: fixed #410 #412 --- framework/Web/Javascripts/extra/logger.js | 17 +++++++++-- framework/Web/Javascripts/js/compressed/ajax.js | 20 ++++++------- framework/Web/Javascripts/js/compressed/logger.js | 14 +++++---- framework/Web/Javascripts/js/compressed/prado.js | 4 +-- framework/Web/Javascripts/js/debug/ajax.js | 32 +++++++++++---------- framework/Web/Javascripts/js/debug/logger.js | 17 +++++++++-- framework/Web/Javascripts/js/debug/prado.js | 4 +-- framework/Web/Javascripts/prado/controls.js | 4 +-- framework/Web/Javascripts/ratings/blocks.css | 11 +------ framework/Web/Javascripts/ratings/blocks.png | Bin 28159 -> 27953 bytes framework/Web/Javascripts/ratings/blocks_blank.gif | Bin 0 -> 72 bytes framework/Web/Javascripts/ratings/blocks_blank.png | Bin 227 -> 0 bytes .../Web/Javascripts/ratings/blocks_combined.gif | Bin 0 -> 237 bytes .../Web/Javascripts/ratings/blocks_combined.png | Bin 453 -> 0 bytes framework/Web/Javascripts/ratings/blocks_half.gif | Bin 0 -> 94 bytes framework/Web/Javascripts/ratings/blocks_half.png | Bin 247 -> 0 bytes .../Web/Javascripts/ratings/blocks_selected.gif | Bin 0 -> 75 bytes .../Web/Javascripts/ratings/blocks_selected.png | Bin 245 -> 0 bytes framework/Web/Javascripts/ratings/default.css | 12 ++------ framework/Web/Javascripts/ratings/default.png | Bin 64293 -> 52075 bytes .../Web/Javascripts/ratings/default_blank.gif | Bin 0 -> 158 bytes .../Web/Javascripts/ratings/default_blank.png | Bin 841 -> 0 bytes .../Web/Javascripts/ratings/default_combined.gif | Bin 0 -> 1001 bytes .../Web/Javascripts/ratings/default_combined.png | Bin 2672 -> 0 bytes framework/Web/Javascripts/ratings/default_half.gif | Bin 0 -> 610 bytes framework/Web/Javascripts/ratings/default_half.png | Bin 857 -> 0 bytes .../Web/Javascripts/ratings/default_selected.gif | Bin 0 -> 603 bytes .../Web/Javascripts/ratings/default_selected.png | Bin 831 -> 0 bytes framework/Web/Javascripts/ratings/ratings.js | 32 +++++++++++---------- 29 files changed, 92 insertions(+), 75 deletions(-) create mode 100644 framework/Web/Javascripts/ratings/blocks_blank.gif delete mode 100644 framework/Web/Javascripts/ratings/blocks_blank.png create mode 100644 framework/Web/Javascripts/ratings/blocks_combined.gif delete mode 100644 framework/Web/Javascripts/ratings/blocks_combined.png create mode 100644 framework/Web/Javascripts/ratings/blocks_half.gif delete mode 100644 framework/Web/Javascripts/ratings/blocks_half.png create mode 100644 framework/Web/Javascripts/ratings/blocks_selected.gif delete mode 100644 framework/Web/Javascripts/ratings/blocks_selected.png create mode 100644 framework/Web/Javascripts/ratings/default_blank.gif delete mode 100644 framework/Web/Javascripts/ratings/default_blank.png create mode 100644 framework/Web/Javascripts/ratings/default_combined.gif delete mode 100644 framework/Web/Javascripts/ratings/default_combined.png create mode 100644 framework/Web/Javascripts/ratings/default_half.gif delete mode 100644 framework/Web/Javascripts/ratings/default_half.png create mode 100644 framework/Web/Javascripts/ratings/default_selected.gif delete mode 100644 framework/Web/Javascripts/ratings/default_selected.png (limited to 'framework/Web/Javascripts') diff --git a/framework/Web/Javascripts/extra/logger.js b/framework/Web/Javascripts/extra/logger.js index d1434361..5771f2f4 100644 --- a/framework/Web/Javascripts/extra/logger.js +++ b/framework/Web/Javascripts/extra/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/compressed/ajax.js b/framework/Web/Javascripts/js/compressed/ajax.js index 4c3a8146..696968c7 100644 --- a/framework/Web/Javascripts/js/compressed/ajax.js +++ b/framework/Web/Javascripts/js/compressed/ajax.js @@ -302,28 +302,28 @@ this.showLabel();}},onTextChanged:function(text) {this.isSaving=false;this.isEditing=false;this.showLabel();},onTextChangedSuccess:function(sender,parameter) {this.isSaving=false;this.isEditing=false;if(this.options.AutoHide) this.showLabel();this.element.innerHTML=parameter==null?this.editField.value:parameter;this.editField.disabled=false;},onTextChangedFailure:function(sender,parameter) -{this.editField.disabled=false;this.isSaving=false;this.isEditing=false;}});Prado.WebUI.TRatingList=Base.extend({selectedIndex:-1,enabled:true,constructor:function(options) +{this.editField.disabled=false;this.isSaving=false;this.isEditing=false;}});Prado.WebUI.TRatingList=Base.extend({selectedIndex:-1,enabled:true,readOnly:false,constructor:function(options) {var cap=$(options.CaptionID);this.options=Object.extend({caption:cap?cap.innerHTML:''},options||{});Prado.WebUI.TRatingList.register(this);this._init();this.selectedIndex=options.SelectedIndex;this.setRating(this.selectedIndex);},_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;iindex?'removeClassName':'addClassName' Element[action](this.radios[i].parentNode,"rating_selected");} this.setCaption(index);},setCaption:function(index) -{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;},setEnabled:function(value) +{var value=index>-1?this.radios[index].value:this.options.caption;var caption=$(this.options.CaptionID);if(caption)caption.innerHTML=value;$(this.options.ListID).title=value;},setEnabled:function(value) {this.enabled=value;for(var i=0;i=this.outputElement.scrollHeight this.outputCount++ style=(style?style+=';':'') diff --git a/framework/Web/Javascripts/js/compressed/prado.js b/framework/Web/Javascripts/js/compressed/prado.js index 376e3a7b..9f8cdb19 100644 --- a/framework/Web/Javascripts/js/compressed/prado.js +++ b/framework/Web/Javascripts/js/compressed/prado.js @@ -392,6 +392,6 @@ window.clipboardData.setData("Text",text);},hover:function(obj) {obj.parentNode.className="copycode copycode_hover";},out:function(obj) {obj.parentNode.className="copycode";}});Prado.WebUI.TCheckBoxList=Base.extend({constructor:function(options) {for(var i=0;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); } diff --git a/framework/Web/Javascripts/prado/controls.js b/framework/Web/Javascripts/prado/controls.js index 0f1bb4d4..c26026ae 100644 --- a/framework/Web/Javascripts/prado/controls.js +++ b/framework/Web/Javascripts/prado/controls.js @@ -252,7 +252,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); } @@ -268,7 +268,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); } diff --git a/framework/Web/Javascripts/ratings/blocks.css b/framework/Web/Javascripts/ratings/blocks.css index 63cb7c2b..5d13a859 100644 --- a/framework/Web/Javascripts/ratings/blocks.css +++ b/framework/Web/Javascripts/ratings/blocks.css @@ -16,7 +16,7 @@ .TRatingList_blocks td.rating { - background-image: url(blocks_combined.png); + background-image: url(blocks_combined.gif); background-repeat: no-repeat; cursor: pointer; background-position: 1px 0px; @@ -26,15 +26,6 @@ background-position: 1px -100px; } -.TRatingList_blocks td.rating_hover -{ - background-position: 1px -200px; -} -.TRatingList_blocks td.rating_half -{ - background-position: 1px -300px; -} - .TRatingList_blocks td.rating_disabled { cursor: default !important; diff --git a/framework/Web/Javascripts/ratings/blocks.png b/framework/Web/Javascripts/ratings/blocks.png index 923cda09..0da75b19 100644 Binary files a/framework/Web/Javascripts/ratings/blocks.png and b/framework/Web/Javascripts/ratings/blocks.png differ diff --git a/framework/Web/Javascripts/ratings/blocks_blank.gif b/framework/Web/Javascripts/ratings/blocks_blank.gif new file mode 100644 index 00000000..c0db17c2 Binary files /dev/null and b/framework/Web/Javascripts/ratings/blocks_blank.gif differ diff --git a/framework/Web/Javascripts/ratings/blocks_blank.png b/framework/Web/Javascripts/ratings/blocks_blank.png deleted file mode 100644 index d5004d2d..00000000 Binary files a/framework/Web/Javascripts/ratings/blocks_blank.png and /dev/null differ diff --git a/framework/Web/Javascripts/ratings/blocks_combined.gif b/framework/Web/Javascripts/ratings/blocks_combined.gif new file mode 100644 index 00000000..04e8f7b8 Binary files /dev/null and b/framework/Web/Javascripts/ratings/blocks_combined.gif differ diff --git a/framework/Web/Javascripts/ratings/blocks_combined.png b/framework/Web/Javascripts/ratings/blocks_combined.png deleted file mode 100644 index 57c07672..00000000 Binary files a/framework/Web/Javascripts/ratings/blocks_combined.png and /dev/null differ diff --git a/framework/Web/Javascripts/ratings/blocks_half.gif b/framework/Web/Javascripts/ratings/blocks_half.gif new file mode 100644 index 00000000..a9e23d7c Binary files /dev/null and b/framework/Web/Javascripts/ratings/blocks_half.gif differ diff --git a/framework/Web/Javascripts/ratings/blocks_half.png b/framework/Web/Javascripts/ratings/blocks_half.png deleted file mode 100644 index 344aa207..00000000 Binary files a/framework/Web/Javascripts/ratings/blocks_half.png and /dev/null differ diff --git a/framework/Web/Javascripts/ratings/blocks_selected.gif b/framework/Web/Javascripts/ratings/blocks_selected.gif new file mode 100644 index 00000000..f743d27e Binary files /dev/null and b/framework/Web/Javascripts/ratings/blocks_selected.gif differ diff --git a/framework/Web/Javascripts/ratings/blocks_selected.png b/framework/Web/Javascripts/ratings/blocks_selected.png deleted file mode 100644 index dfdb6889..00000000 Binary files a/framework/Web/Javascripts/ratings/blocks_selected.png and /dev/null differ diff --git a/framework/Web/Javascripts/ratings/default.css b/framework/Web/Javascripts/ratings/default.css index cf8f7558..aa7913bf 100644 --- a/framework/Web/Javascripts/ratings/default.css +++ b/framework/Web/Javascripts/ratings/default.css @@ -16,25 +16,17 @@ .TRatingList_default td.rating { - background-image: url(default_combined.png); + background-image: url(default_combined.gif); background-repeat: no-repeat; cursor: pointer; background-position: 0px 0px; } + .TRatingList_default td.rating_selected { background-position: 0px -100px; } -.TRatingList_default td.rating_hover -{ - background-position: 0px -200px; -} -.TRatingList_default td.rating_half -{ - background-position: 0px -300px; -} - .TRatingList_default td.rating_disabled { cursor: default !important; diff --git a/framework/Web/Javascripts/ratings/default.png b/framework/Web/Javascripts/ratings/default.png index f9f380a9..17bc39a1 100644 Binary files a/framework/Web/Javascripts/ratings/default.png and b/framework/Web/Javascripts/ratings/default.png differ diff --git a/framework/Web/Javascripts/ratings/default_blank.gif b/framework/Web/Javascripts/ratings/default_blank.gif new file mode 100644 index 00000000..0337ad16 Binary files /dev/null and b/framework/Web/Javascripts/ratings/default_blank.gif differ diff --git a/framework/Web/Javascripts/ratings/default_blank.png b/framework/Web/Javascripts/ratings/default_blank.png deleted file mode 100644 index f857ff17..00000000 Binary files a/framework/Web/Javascripts/ratings/default_blank.png and /dev/null differ diff --git a/framework/Web/Javascripts/ratings/default_combined.gif b/framework/Web/Javascripts/ratings/default_combined.gif new file mode 100644 index 00000000..fe02b446 Binary files /dev/null and b/framework/Web/Javascripts/ratings/default_combined.gif differ diff --git a/framework/Web/Javascripts/ratings/default_combined.png b/framework/Web/Javascripts/ratings/default_combined.png deleted file mode 100644 index 1756f912..00000000 Binary files a/framework/Web/Javascripts/ratings/default_combined.png and /dev/null differ diff --git a/framework/Web/Javascripts/ratings/default_half.gif b/framework/Web/Javascripts/ratings/default_half.gif new file mode 100644 index 00000000..ed214acd Binary files /dev/null and b/framework/Web/Javascripts/ratings/default_half.gif differ diff --git a/framework/Web/Javascripts/ratings/default_half.png b/framework/Web/Javascripts/ratings/default_half.png deleted file mode 100644 index 6c826054..00000000 Binary files a/framework/Web/Javascripts/ratings/default_half.png and /dev/null differ diff --git a/framework/Web/Javascripts/ratings/default_selected.gif b/framework/Web/Javascripts/ratings/default_selected.gif new file mode 100644 index 00000000..98704fad Binary files /dev/null and b/framework/Web/Javascripts/ratings/default_selected.gif differ diff --git a/framework/Web/Javascripts/ratings/default_selected.png b/framework/Web/Javascripts/ratings/default_selected.png deleted file mode 100644 index e40d6b04..00000000 Binary files a/framework/Web/Javascripts/ratings/default_selected.png and /dev/null differ diff --git a/framework/Web/Javascripts/ratings/ratings.js b/framework/Web/Javascripts/ratings/ratings.js index 04ebd31d..9299d8d8 100644 --- a/framework/Web/Javascripts/ratings/ratings.js +++ b/framework/Web/Javascripts/ratings/ratings.js @@ -2,6 +2,7 @@ Prado.WebUI.TRatingList = Base.extend( { selectedIndex : -1, enabled : true, + readOnly : false, constructor : function(options) { @@ -20,20 +21,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 index ? 'removeClassName' : 'addClassName' Element[action](this.radios[i].parentNode, "rating_selected"); } this.setCaption(index); @@ -89,7 +92,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) @@ -99,7 +102,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"); } } }, -- cgit v1.2.3