Rico.windowLoaded=function() {
this.windowIsLoaded=true;
if (typeof Rico_CONFIG == 'object') {
- var el = document.createElement('style');
- document.getElementsByTagName('head')[0].appendChild(el);
- if (!window.createPopup) { /* For Safari */
- el.appendChild(document.createTextNode(''));
- }
- var s = document.styleSheets[document.styleSheets.length - 1];
- this.addCssBackgroundRule(s,'.rico-icon',Rico_CONFIG.imgIcons,'no-repeat');
- this.addCssBackgroundRule(s,'.ricoLG_Resize',Rico_CONFIG.imgResize,'repeat');
- if (Rico_CONFIG.imgHeading) {
- var repeat='repeat-x';
- var pos='left center';
- this.addCssBackgroundRule(s,'tr.ricoLG_hdg th',Rico_CONFIG.imgHeading,repeat,pos);
- this.addCssBackgroundRule(s,'tr.ricoLG_hdg td',Rico_CONFIG.imgHeading,repeat,pos);
- this.addCssBackgroundRule(s,'table.ricoLiveGrid thead td',Rico_CONFIG.imgHeading,repeat,pos);
- this.addCssBackgroundRule(s,'table.ricoLiveGrid thead th',Rico_CONFIG.imgHeading,repeat,pos);
- this.addCssBackgroundRule(s,'.ricoTitle',Rico_CONFIG.imgHeading,repeat,pos);
- this.addCssBackgroundRule(s,'.Rico_accTitle',Rico_CONFIG.imgHeading,repeat,pos);
- }
-
if (Rico_CONFIG.enableLogging) this.enableLogging();
if (Rico_CONFIG.enableHTML5) this._CheckInputTypes();
}
}
};
-Rico.addCssBackgroundRule=function(sheet,selector,imageUrl,repeat,position) {
- if (!imageUrl) return;
- this.addCssRule(sheet,selector,"background-image:url('"+imageUrl+"')");
- this.addCssRule(sheet,selector,"background-repeat:"+repeat);
- if (position) this.addCssRule(sheet,selector,"background-position:"+position);
-};
-
-Rico.addCssRule=function(sheet,selector,rule) {
- if (sheet.addRule) {
- sheet.addRule(selector, rule);
- } else if (sheet.insertRule) {
- sheet.insertRule (selector+" { "+rule+" }", 0);
- } else {
- alert('unable to add rule: '+rule);
- }
-};
-
// check for availability of HTML5 input types
Rico._CheckInputTypes=function() {
var i = document.createElement("input");