Switch to using a slider for tiddler info

This commit is contained in:
Jeremy Ruston
2013-05-19 12:11:18 +01:00
parent f5a5cbe35a
commit d3fa781287
4 changed files with 19 additions and 6 deletions
+5
View File
@@ -40,6 +40,9 @@ RevealWidget.prototype.generate = function() {
if(this["class"]) {
$tw.utils.pushTop(classes,this["class"]);
}
if(this.isOpen) {
$tw.utils.pushTop(classes,"tw-reveal-open");
}
switch(this.type) {
case "popup":
styles.push("position:absolute;");
@@ -146,6 +149,8 @@ RevealWidget.prototype.refreshInDom = function(changedAttributes,changedTiddlers
}
// Set the visibility of the children
this.renderer.domNode.style.display = this.isOpen ? (this.renderer.parseTreeNode.isBlock ? "block" : "inline") : "none";
// Add or remove the tw-reveal-open class
$tw.utils.toggleClass(this.renderer.domNode,"tw-reveal-open",this.isOpen);
}
// Position the content if required
if(this.isOpen) {