aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/comments/frontend/uncollapseinterfacelink.js
blob: 0fc3912c5c46114e89311902a22be171dd3690a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Creates the interface uncollapse button (uncollapseinterfacelink.js)
HashOver.prototype.uncollapseInterfaceLink = function ()
{
	// Decide button text
	var uncollapseLocale = (this.instance['total-count'] >= 1) ? 'show-number-comments' : 'post-comment-on';
	var uncollapseText = this.instance[uncollapseLocale];

	// Create hyperlink to uncollapse the comment interface
	var uncollapseLink = this.elements.create ('a', {
		id: 'hashover-uncollapse-interface-link',
		className: 'hashover-more-link',
		href: '#',
		title: uncollapseText,
		textContent: uncollapseText,

		onclick: function () {
			hashover.uncollapseInterface ();
			return false;
		}
	});

	// Add uncollapse hyperlink to HashOver div
	hashover.instance['main-element'].appendChild (uncollapseLink);
};