summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/controls/Comments
diff options
context:
space:
mode:
authorwei <>2007-01-15 05:21:19 +0000
committerwei <>2007-01-15 05:21:19 +0000
commit430999ec4796a7ffd2ea1e6536fd0178111ffb32 (patch)
tree2fe6833f22ecd551cfee6c64ba0d541de3fb0c2b /demos/quickstart/protected/controls/Comments
parent60ec63490dd45a43ccff9adf9e4c2bc7e2d353c6 (diff)
add loader image
Diffstat (limited to 'demos/quickstart/protected/controls/Comments')
-rw-r--r--demos/quickstart/protected/controls/Comments/CommentBlock.tpl23
-rw-r--r--demos/quickstart/protected/controls/Comments/ajax-loader.gifbin0 -> 1849 bytes
2 files changed, 21 insertions, 2 deletions
diff --git a/demos/quickstart/protected/controls/Comments/CommentBlock.tpl b/demos/quickstart/protected/controls/Comments/CommentBlock.tpl
index 08d7c87a..c9e7172b 100644
--- a/demos/quickstart/protected/controls/Comments/CommentBlock.tpl
+++ b/demos/quickstart/protected/controls/Comments/CommentBlock.tpl
@@ -24,7 +24,7 @@
<div class="username">
<div>
<com:TLabel ForControl="username" Text="Username/Password:" />
- <span class="hint">(must have 5 or more posts in forum)</span>
+ <span class="hint">(must have 5 or more posts in <a href="http://www.pradosoft.com/forum/" title="Prado Forums">forum</a>)</span>
<com:TRequiredFieldValidator
Style="font-weight: bold"
ControlToValidate="username"
@@ -52,7 +52,10 @@
</div>
<div class="submit">
- <com:TActiveButton Text="Add Comment" OnClick="add_comment" />
+ <com:TActiveButton ID="addComment" Text="Add Comment" OnClick="add_comment">
+ <prop:ClientSide OnLoading="show_posting_comment()" OnSuccess="on_posting_success()" />
+ </com:TActiveButton>
+ <img id="comment-loading" src=<%~ ajax-loader.gif %> style="border:0 none;display:none"/>
</div>
</div>
</div>
@@ -61,4 +64,20 @@
<com:TClientScript PradoScripts="prado" ScriptUrl=<%~ comments.js %> >
var hidden_block_id = '<%= $this->block_id->ClientID %>';
var content_textare_id = '<%= $this->content->ClientID %>';
+
+function show_posting_comment()
+{
+ var button = $('<%= $this->addComment->ClientID %>')
+ button.value="Posting ...";
+ button.disabled = true;
+ $('comment-loading').show();
+}
+
+function on_posting_success()
+{
+ var button = $('<%= $this->addComment->ClientID %>')
+ button.value="Add Comment";
+ button.disabled = false;
+ $('comment-loading').hide();
+}
</com:TClientScript>
diff --git a/demos/quickstart/protected/controls/Comments/ajax-loader.gif b/demos/quickstart/protected/controls/Comments/ajax-loader.gif
new file mode 100644
index 00000000..1c30a83b
--- /dev/null
+++ b/demos/quickstart/protected/controls/Comments/ajax-loader.gif
Binary files differ