Added Edit Survey loading mask to reduce loading confusing on slow connections.

This commit is contained in:
Kaleb Murphy 2009-03-16 15:59:20 +00:00
parent 38a19674da
commit cc11480d6d
6 changed files with 41 additions and 4 deletions

View file

@ -15,7 +15,7 @@
- fixed #9943: Upgrade script fails with Payment Gateways
- fixed #9948: Data form cannot be deleted.
- fixed #9950: Wrong var in help for thread
- added Survey now has a loading mask on Survey edit ajax calls.
7.6.14
- fixed: IE6 shows Admin Bar over Asset Manager
- fixed #9808: Search i18n

View file

@ -377,7 +377,6 @@ Loads the initial edit survey page. All other edit actions are ajax calls from t
sub www_editSurvey {
my $self = shift;
return $self->session->privilege->insufficient()
if !$self->session->user->isInGroup( $self->get('groupToEditSurvey') );
@ -398,7 +397,7 @@ See L<WebGUI::Asset::Wobject::Survey::ResponseJSON/sectionIndex>.
sub www_submitObjectEdit {
my $self = shift;
return $self->session->privilege->insufficient()
if !$self->session->user->isInGroup( $self->get('groupToEditSurvey') );
@ -674,7 +673,7 @@ If undef, the address is pulled form the form POST.
sub www_loadSurvey {
my ( $self, $options ) = @_;
my $editflag = 1;
sleep(2);
my $address = defined $options->{address} ? $options->{address} : undef;
if ( !defined $address ) {
if ( my $inAddress = $self->session->form->process('data') ) {

View file

@ -353,6 +353,7 @@ if (typeof Survey === "undefined") {
}
else {
document.getElementById('questions').style.display = 'inline';
console.log(2);
Survey.Form.addWidgets(qs);
}
lastSection = s.id;
@ -361,6 +362,7 @@ if (typeof Survey === "undefined") {
document.getElementById('headertitle').style.display = 'block';
document.getElementById('headertext').style.display = 'block';
document.getElementById('questions').style.display = 'inline';
console.log(3);
Survey.Form.addWidgets(qs);
}
},

View file

@ -6,6 +6,7 @@ Survey.Comm = new function(){
var callMade = 0;
var request = function(sUrl,callback,postData){
YAHOO.util.Dom.setStyle('mask-all','display','block');
if(callMade == 1){
alert("Waiting on previous request");
}else{
@ -15,6 +16,7 @@ Survey.Comm = new function(){
}
this.callback = {
success:function(o){
YAHOO.util.Dom.setStyle('mask-all','display','none');
callMade = 0;
Survey.Data.loadData(YAHOO.lang.JSON.parse(o.responseText));
},

View file

@ -1,4 +1,38 @@
#loading-mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 20000;
background-color: white;
opacity:0.6;
filter:alpha(opacity=60);
}
#loading {
position: absolute;
left: 50%;
top: 50%;
padding: 2px;
z-index: 20001;
height: auto;
margin: -35px 0 0 -30px;
}
#loading .loading-indicator {
background: url(/extras/yui/rel_interstitial_loading.gif) no-repeat;
color: #555;
font: bold 13px tahoma,arial,helvetica;
padding: 18px 80px;
margin: 0;
text-align: center;
height: auto;
z-index: 20002;
}
div.testarea {
width: 200px;
height: 100px;