Skip to content

Commit

Permalink
Use a gif instead 'Submitting' string
Browse files Browse the repository at this point in the history
git-svn-id: svn://cherokee-project.com/CTK/trunk@4240 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
ionmx committed Feb 12, 2010
1 parent 8b537b5 commit f7192d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions static/css/CTK.css
Expand Up @@ -89,3 +89,7 @@ h1 { color: #c00; font-weight: normal; }
top: 0;
right: 0;
}

/* Loading Message
*/
.notice { display: inline; padding-left: 8px; }
7 changes: 4 additions & 3 deletions static/js/Submitter.js
Expand Up @@ -67,8 +67,8 @@ function Submitter (id, url) {

/* Block the fields */
$(pre +" input").attr("disabled", true);
$(pre +" .notice").html("Submitting..");

// XXX: Probably we need to know if it's input or select... is better to have an ID for the field...
$("#submitter"+ self.submitter_id +" input").after('<img class="notice" id="notice' + self.submitter_id + '" src="/CTK/images/loading.gif" alt="Submitting..."/>');
/* Build the post */
info = {};
$(pre +" input:text, "+ pre +" input:password, "+ pre +" input:hidden").each(function(){
Expand Down Expand Up @@ -116,7 +116,8 @@ function Submitter (id, url) {
},
complete: function (XMLHttpRequest, textStatus) {
/* Unlock fields */
$("#submitter"+ self.submitter_id +" .notice").html("");
$("#notice"+ self.submitter_id).remove();
// XXX: Probably we need to know if it's input or select...
$("#submitter"+ self.submitter_id +" input").removeAttr("disabled");
}
});
Expand Down

0 comments on commit f7192d2

Please sign in to comment.