Skip to content

Commit

Permalink
more work on bootstrap compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
shprink committed Jun 25, 2012
1 parent 6d73407 commit 3553ee3
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions Source/UI/Mercor.Tip.js
Expand Up @@ -247,7 +247,12 @@ Mercor.Tip.Complexe = new Class({
} }
}); });


Mercor.Tip.Bootstrap = Mercor.Tip.implement({ Mercor.Tip.Bootstrap = new Class({

Implements : [ Events, Options ],

Extends : Mercor.Tip,

options : { options : {
node : { node : {
element : 'div', element : 'div',
Expand Down Expand Up @@ -276,14 +281,23 @@ Mercor.Tip.Bootstrap = Mercor.Tip.implement({
break; break;
} }
this.node.addClass(this.options.position); this.node.addClass(this.options.position);
if (this.options.sticky) {
this.node.addClass('mercor-tip-sticky');
} else {
this.template.get('close').destroy();
}
} }
}); });


Mercor.Tip.Complexe.Bootstrap = new Class({

Implements : [ Events, Options ],


Extends : Mercor.Tip.Complexe,

options : {
node : {
element : 'div',
id : 'mercor-tip-container',
classes : 'mercor-element mercor-tip tooltip',
template : '<div class="tooltip-arrow"></div><button class="mercor-close" title="Close">x</button><div class="tooltip-inner mercor-body"></div>'
}
}
});




0 comments on commit 3553ee3

Please sign in to comment.