Sha256: 079fd3fc86cae64cc1872f054d9a9580cedd8e8b635e21b26806c89e972b1106
Contents?: true
Size: 855 Bytes
Versions: 9
Compression:
Stored size: 855 Bytes
Contents
pageflow.outlineNavigationBar.Expander = pageflow.Object.extend({ initialize: function(options) { this.options = options; this.expandedBy = {}; }, expand: function(options) { this.expandedBy[(options && options.by) || 'button'] = true; clearTimeout(this.collapseTimeout); if (!this.expanded && this.options.enabled()) { this.expanded = true; this.options.expand(); } }, collapse: function(options) { delete this.expandedBy[(options && options.by) || 'button']; clearTimeout(this.collapseTimeout); if (this.expanded && _.keys(this.expandedBy).length === 0) { this.expanded = false; this.options.collapse(); } }, scheduleCollapse: function(options) { var that = this; this.collapseTimeout = setTimeout(function() { that.collapse(options); }, 200); } });
Version data entries
9 entries across 9 versions & 1 rubygems