diff options
Diffstat (limited to 'framework/Web/Javascripts/source')
4 files changed, 32 insertions, 15 deletions
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js index e19f5d49..648f3e76 100644 --- a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js +++ b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js @@ -1154,7 +1154,13 @@ if (typeof(Prado.AssetManagerClass)=="undefined") { createStyleSheetCode: function(code) { var asset = document.createElement('style'); asset.setAttribute('type', 'text/css'); - asset.innerText = code; + + if(asset.styleSheet) + asset.styleSheet.cssText = code; // IE7+IE8 + else { + var cssCodeNode = document.createTextNode(code); + asset.appendChild(cssCodeNode); + } var head = document.getElementsByTagName('head')[0]; head.appendChild(asset); diff --git a/framework/Web/Javascripts/source/prado/controls/slider.js b/framework/Web/Javascripts/source/prado/controls/slider.js index 2e26ee51..ba65de3b 100644 --- a/framework/Web/Javascripts/source/prado/controls/slider.js +++ b/framework/Web/Javascripts/source/prado/controls/slider.js @@ -18,17 +18,9 @@ Prado.WebUI.TSlider = Class.extend(Prado.WebUI.PostBackControl, this.maximum = this.options.maximum || this.range.end; this.minimum = this.options.minimum || this.range.start; this.hiddenField=$(this.options.ID+'_1'); + this.trackInitialized=false; - // Will be used to align the handle onto the track, if necessary - this.alignX = parseInt(this.options.alignX || - this.track.offsetLeft); - this.alignY = parseInt(this.options.alignY || - this.track.offsetTop); - - this.trackLength = this.maximumOffset() - this.minimumOffset(); - this.handleLength = this.isVertical() ? - (this.handle.offsetHeight != 0 ? - this.handle.offsetHeight : this.handles.style.height.replace(/px$/,"")) : - (this.handle.offsetWidth != 0 ? this.handle.offsetWidth : - this.handle.style.width.replace(/px$/,"")); + this.initializeTrack(); this.active = false; this.dragging = false; @@ -63,8 +55,26 @@ Prado.WebUI.TSlider = Class.extend(Prado.WebUI.PostBackControl, if(this.options['AutoPostBack']==true) this.observe(this.hiddenField, "change", Prado.PostBack.bindEvent(this,options)); - }, + + initializeTrack : function() + { + if(this.trackInitialized || !$(this.track).is(":visible")) + return; + + // Will be used to align the handle onto the track, if necessary + this.alignX = parseInt(this.options.alignX || - this.track.offsetLeft); + this.alignY = parseInt(this.options.alignY || - this.track.offsetTop); + + this.trackLength = this.maximumOffset() - this.minimumOffset(); + this.handleLength = this.isVertical() ? + (this.handle.offsetHeight != 0 ? + this.handle.offsetHeight : this.handles.style.height.replace(/px$/,"")) : + (this.handle.offsetWidth != 0 ? this.handle.offsetWidth : + this.handle.style.width.replace(/px$/,"")); + this.trackInitialized=true; + }, + setDisabled: function(){ this.disabled = true; @@ -151,6 +161,7 @@ Prado.WebUI.TSlider = Class.extend(Prado.WebUI.PostBackControl, startDrag: function(event) { if(Event.isLeftClick(event)) { + this.initializeTrack(); if(!this.disabled){ this.active = true; var handle = Event.element(event); @@ -223,4 +234,4 @@ Prado.WebUI.TSlider = Class.extend(Prado.WebUI.PostBackControl, } } -});
\ No newline at end of file +}); diff --git a/framework/Web/Javascripts/source/prado/prado.js b/framework/Web/Javascripts/source/prado/prado.js index 05f11dcd..1b3bd7c8 100644 --- a/framework/Web/Javascripts/source/prado/prado.js +++ b/framework/Web/Javascripts/source/prado/prado.js @@ -8,7 +8,7 @@ var Prado = * Version of Prado clientscripts * @var Version */ - Version: '3.2.3', + Version: '3.2.4', /** * Registry for Prado components diff --git a/framework/Web/Javascripts/source/prado/validator/validation3.js b/framework/Web/Javascripts/source/prado/validator/validation3.js index 0361389f..483c7ec2 100644 --- a/framework/Web/Javascripts/source/prado/validator/validation3.js +++ b/framework/Web/Javascripts/source/prado/validator/validation3.js @@ -979,7 +979,7 @@ Prado.WebUI.TBaseValidator = Class.create(Prado.WebUI.Control, if(!this.control) this.control = $(this.options.ControlToValidate); - if(!this.control || this.control.disabled) + if(!this.control || this.control.disabled || !this.control.descendantOf(document)) { this.isValid = true; return this.isValid; |