Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Foren / Cotonti / Skins / Custom spinner

Twiebie
#1 4. Oktober 2013, 15:27

Is it possible to override the default spinner used by Cotonti without overriding the ./images/spinner.gif?

The reason is so that custom spinner images can be used for themes.

beforeSend: function() {
    if (!settings.nonshowloading) $('#' + settings.divId).append('<span style="position:absolute; left:' + ($('#' + settings.divId).width()/2 - 110) + 'px;top:' + ($('#' + settings.divId).height()/2 - 9) + 'px;" class="loading" id="loading"><img src="./images/spinner.gif" alt="loading"/></span>').css('position', 'relative');
},

The image path is hardcoded in base.js. Maybe we can simply use the class/ID of 'loading' in base.js and in the theme control it via the stylesheet.

#loading {
    display:    none;
    position:   fixed;
    z-index:    9999;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba(255, 255, 255, .8)
                url('../img/spinner.gif')
                50% 50%
                no-repeat;
}
Macik
#2 6. Oktober 2013, 00:54

Sounds good. Had a same problem some time ago.

But it's not a problem as I think. Just use #loading img{display:none;} to hide original and css source you post to show new.

 

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F
Twiebie
#3 7. Oktober 2013, 14:14

I guess that will work aswell.

Thanks Macik.