Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<com:TStyleSheet StyleSheetUrl=<%~ comments.css %> />
2
<!--
3
	<%~ right_back.png %>
4
	<%~ right_tag.png %>
5
	<%~ tag.gif %>
6
-->
7
<h2 style="margin-bottom: 0.4em; margin-top: 2em; border-bottom: 0 none" id="comments-header">User Comments</h2>
8
<div id="user-comments">
9
	<ul id="comment-nav">
10
		<li><a href="#comment-list" style="display:none" id="show-comment-link" >View Comments</a></li>
11
		<li><a href="#add-comment" class="active" id="add-comment-link">Add New Comment</a></li>
12
		<li><a href="#comment-list" style="display:none" id="all-comments-link">View All Comments</a></li>
13
	</ul>
14
	<a href="javascript:;" class="right-tab" style="display:none" id="close-comments">Close</a>
15
	<a href="#" class="right-tab" id="to-top">Top</a>
16
<div id="comment-list">
17
	<com:TRepeater ID="comments">
18
		<prop:ItemTemplate>
19
		<%# $this->parent->parent->format_message($this->DataItem) %>
20
		</prop:ItemTemplate>
21
	</com:TRepeater>
22
</div>
23
	<div id="add-comment">
24
 
25
		<div class="username">
26
			<div>
27
			<com:TLabel ForControl="username" Text="Username/Password:" />
28
			<span class="hint">(must have 5 or more posts in <a href="http://www.pradosoft.com/forum/" title="Prado Forums">forum</a>)</span>
29
			<com:TRequiredFieldValidator
30
				Style="font-weight: bold"
31
				ValidationGroup="comment-group"
32
				ControlToValidate="username"
33
				ErrorMessage="*" />
34
			</div>
35
			<com:TTextBox ID="username" /> /
36
			<com:TTextBox ID="password" TextMode="Password" />
37
			<com:TActiveCustomValidator
38
				ID="credential_validator"
39
				ControlToValidate="password"
40
				ValidationGroup="comment-group"
41
				OnServerValidate="validate_credential"
42
				EnableClientScript="false"
43
				ErrorMessage="Incorrect username/password" />
44
		</div>
45
		<div class="content">
46
			<div>
47
			<com:TLabel ForControl="content" Text="Comment:" />
48
			<com:TRequiredFieldValidator
49
				Style="font-weight: bold"
50
				ValidationGroup="comment-group"
51
				ControlToValidate="content"
52
				ErrorMessage="*" />
53
			</div>
54
			<com:TActiveTextBox TextMode="MultiLine" ID="content" />
55
			<com:THiddenField ID="block_id" Value="top-content"/>
56
		</div>
57
 
58
		<div class="submit">
59
			<com:TActiveButton ID="addComment" ValidationGroup="comment-group" Text="Add Comment" OnClick="add_comment">
60
				<prop:ClientSide OnLoading="show_posting_comment()" OnSuccess="on_posting_success()" />
61
			</com:TActiveButton>
62
			<img id="comment-loading" src=<%~ ajax-loader.gif %> style="border:0 none;display:none"/>
63
		</div>
64
	</div>
65
</div>
66
 
67
<div id="modal-background"></div>
68
<com:TClientScript PradoScripts="prado" ScriptUrl=<%~ comments.js %> >
69
	var hidden_block_id = '<%= $this->block_id->ClientID %>';
70
	var content_textare_id = '<%= $this->content->ClientID %>';
71
 
72
function show_posting_comment()
73
{
74
	var button = $('<%= $this->addComment->ClientID %>')
75
	button.value="Posting ...";
76
	button.disabled = true;
77
	$('comment-loading').show();
78
}
79
 
80
function on_posting_success()
81
{
82
	var button = $('<%= $this->addComment->ClientID %>')
83
	button.value="Add Comment";
84
	button.disabled = false;
85
	$('comment-loading').hide();
86
}
87
</com:TClientScript>