Index: branches/RC/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -r8929 -r9275 --- branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 8929) +++ branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 9275) @@ -42,17 +42,57 @@ // preg_print_pre(this.Map, /last/); } -StyleManager.ChangeStyle = function(selector, style, value) +StyleManager.ChangeStyle = function(selector, s, value) { if (!this.Inited) this.InitStyles() rule = this.Map[selector.toLowerCase()]; if (!rule) { + if (this.AddStyle(selector, s, value)) { + return true; + } alert('rule '+selector+' not found') return; } - rule.style[style] = value; + alert('adjusting rule '+selector+' setting '+s+' to '+value+' from '+rule.style[s]) + rule.style[s] = value; + alert('now it is '+rule.style[s]) } +StyleManager.AddStyle = function(selector, style, value) +{ + var sheet = document.styleSheets[0]; + var rule = false; + if (sheet.insertRule) { + sheet.insertRule(selector+'{'+style+':'+value+'}', sheet.cssRules.length); + rule = sheet.cssRules[sheet.cssRules.length-1]; + } + else if(sheet.addRule) { + sheet.addRule(selector, style+':'+value); + rule = sheet.rules[sheet.rules.length-1]; + } + if (rule) { + alert ('adding rule as '+selector); + this.Map[selector.toLowerCase()] = sheet.cssRules[sheet.cssRules.length-1]; + return true; + } + return false; +} + +StyleManager.GetStyle = function(selector) +{ + if (!this.Inited) this.InitStyles() + rule = this.Map[selector.toLowerCase()]; + if (!rule) return false; + return rule; +} + +StyleManager.GetStyleValue = function(selector, style) +{ + rule = this.GetStyle(selector); + if (!rule) return false; + return rule.selector; +} + function preg_print_pre(obj, reg) { if (!reg) reg = /.*/; @@ -113,6 +153,10 @@ this.Rendered = false; this.PickerCRC = ''; + +// this.FixedHeights = true; + this.FixedHeaderHeights = [50,30]; + this.FixedRowHeight = 25; } GridScroller.prototype.Render = function(id) @@ -123,7 +167,11 @@ // this.MinWidths = [40,null,null,250] this.MinWidths = this.PrepareWidths(); // [50,70,90,150,150,110,70,111]; - html = this.AltHTML(); + document.body.style.height = '100%'; + document.body.style.overflow = 'hidden'; + document.body.scroll = 'no' + + // html = this.AltHTML(); // Profile('Getting HTML',1); if (id && id != '') { document.getElementById(id).innerHTML = '