Moved rico.js to minsrc and is now part of rico_min.js. Files are now sent to the...
[infodrom/rico3] / minsrc / ricoUI.js
index e5e47b7..c9bf141 100644 (file)
@@ -105,7 +105,6 @@ Rico.Popup.prototype = {
     }
     this.container.appendChild(this.content);
     this.content.className='RicoPopupContent';
-    this.content.style.position='relative';
     if (this.position != 'absolute') return;
 
     if (this.options.closeFunc) {
@@ -118,9 +117,10 @@ Rico.Popup.prototype = {
     this.container.style.left='0px';
     this.container.style.display='none';
     if (this.options.zIndex >= 0) this.container.style.zIndex=this.options.zIndex;
-    this.content.style.zIndex=2;
 
-    if (Rico.isIE && Rico.ieVersion < 7) {
+    if (Rico.isIE && Rico.ieVersion < 7 && this.options.shim!==false) {
+      this.content.style.position='relative';
+      this.content.style.zIndex=2;
       // create iframe shim
       this.ifr = document.createElement('iframe');
       this.ifr.className='RicoShim';
@@ -220,9 +220,8 @@ Rico.Popup.prototype = {
  * Display popup at specified position
  */
   openPopup: function(left,top) {
-    if (typeof left=='number') this.container.style.left=left+'px';
-    if (typeof top=='number') this.container.style.top=top+'px';
-    this.container.style.display=''; //this.position=='absolute' ? "block" : Rico.isIE && Rico.ieVersion<8 ? "inline" : "inline-block";
+    this.move(left,top);
+    this.container.style.display='';
     if (this.container.id) Rico.log('openPopup '+this.container.id+' at '+left+','+top);
     Rico._AddOpenPopup(this);
   },
@@ -260,7 +259,7 @@ Rico.closeButton = function(handle) {
   if (Rico.theme.closeAnchor) Rico.addClass(a,Rico.theme.closeAnchor);
   var span = a.appendChild(document.createElement('span'));
   span.title=Rico.getPhraseById('close');
-  new Rico.HoverSet([a]);
+  new Rico.HoverSet([a],{hoverClass: Rico.theme.hover || 'ricoCloseHover'});
   Rico.addClass(span,Rico.theme.close || 'rico-icon RicoClose');
   Rico.eventBind(a,"click", handle);
   return a;
@@ -331,7 +330,7 @@ Rico.Window.prototype = {
     if (options.width) this.contentDiv.style.width=options.width;
     if (options.overflow) this.contentDiv.style.overflow=options.overflow;
     Rico.addClass(this.content,'ricoWindow');
-    if (Rico.theme.dialog) Rico.addClass(this.content,Rico.theme.dialog);
+    if (Rico.theme.dialog) Rico.addClass(this.container,Rico.theme.dialog);
     /*
     if (Rico.isIE) {
       // fix float'ed content in IE
@@ -383,8 +382,7 @@ Rico.Menu.prototype = {
     this.createContainer(options);
     this.content.className = Rico.isWebKit ? 'ricoMenuSafari' : 'ricoMenu';
     this.content.style.width=this.options.width;
-    this.direction=Rico.getStyle(this.container,'direction') || 'ltr';
-    this.direction=this.direction.toLowerCase();  // ltr or rtl
+    this.direction=Rico.direction(this.container);
     this.hidemenu();
     this.itemCount=0;
   },
@@ -778,26 +776,10 @@ Rico._HoverItem.prototype = {
 };
 
 
-/** @namespace */
-Rico.Effect = {};
-Rico.Effect.easeIn = function(step){
-  return Math.sqrt(step);
-};
-Rico.Effect.easeOut = function(step){
-  return step*step;
-};
-
-
 /** @class core methods for transition effects */
 Rico.ContentTransitionBase = function() {};
 Rico.ContentTransitionBase.prototype = {
   initBase: function(titles, contents, options) {
-    Rico.log('ContentTransitionBase#initBase');
-    if (typeof titles == 'string')
-      titles = Rico.select(titles);
-    if (typeof contents == 'string')
-      contents = Rico.select(contents);
-
     this.options = options || {};
     this.titles = titles;
     this.contents = contents;
@@ -842,7 +824,6 @@ Rico.ContentTransitionBase.prototype = {
     Rico.hide(content);
     //this.selectionSet.select(title);
   },
-  removeBase: function(title){},
   removeAll: function(){
     this.hoverSet.removeAll();
     this.selectionSet.removeAll();
@@ -952,8 +933,10 @@ Rico.TabbedPanel.prototype = Rico.extend(new Rico.ContentTransitionBase(),
     items[1].className=options.contentContainerClass || Rico.theme.tabContentContainer || "Rico_tabContentContainer";
     var titles=Rico.getDirectChildrenByTag(items[0], childTag);
     var contents=Rico.getDirectChildrenByTag(items[1],'div');
+    var direction=Rico.direction(element);
     if (!options.corners) options.corners='top';
     for (var i=0; i<titles.length; i++) {
+      if (direction == 'rtl') Rico.setStyle(titles[i], {'float':'right'});
       titles[i].className=options.titleClass || Rico.theme.tabTitle || "Rico_tabTitle";
       var a=Rico.wrapChildren(titles[i],'','','a');
       a.href="javascript:void(0)";