style: ie spinner

This commit is contained in:
devezhao 2020-03-18 20:11:22 +08:00
parent ccc10985aa
commit 0465f90c72
4 changed files with 18 additions and 5 deletions

View file

@ -1,6 +1,10 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<div class="rb-spinner">
<% if (!AppUtils.isIE(request)) {%>
<svg width="40px" height="40px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" stroke-width="4" stroke-linecap="round" cx="33" cy="33" r="30" class="circle"></circle>
</svg>
<% } else {%>
<span class="spinner-border spinner-border-xl text-primary"></span>
<% }%>
</div>

View file

@ -25816,6 +25816,12 @@ div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-chil
height: 1rem;
}
.spinner-border-xl,
.spinner-grow-xl {
width: 3rem;
height: 3rem;
}
@keyframes spinner-border {
to {
transform: rotate(360deg);

View file

@ -22,8 +22,7 @@ See LICENSE and COMMERCIAL in the project root for license information.
if (state === 'loading') {
$el.attr('disabled', true)
var spinner = $el.data('spinner')
if ($('#ie-polyfill').length > 0) spinner = undefined
var spinner = rb.ie ? undefined : $el.data('spinner')
var loadingText = $el.data('loading-text')
this.__textHold = $el.html()
@ -76,6 +75,7 @@ See LICENSE and COMMERCIAL in the project root for license information.
$.fn.select2.defaults.set('placeholder', '')
window.rb = window.rb || {}
rb.ie = $('#ie-polyfill').length > 0
$('meta[name^="rb."]').each(function (idx, item) {
var k = $(item).attr('name').substr(3) // remove `rb.`
var v = $(item).attr('content')

View file

@ -339,9 +339,12 @@ function RbAlertBox(props) {
// ~~
function RbSpinner(props) {
const spinner = <div className="rb-spinner">
<svg width="40px" height="40px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" strokeWidth="4" strokeLinecap="round" cx="33" cy="33" r="30" className="circle" />
</svg>
{rb.ie
? <span className="spinner-border spinner-border-xl text-primary"></span>
: <svg width="40px" height="40px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" strokeWidth="4" strokeLinecap="round" cx="33" cy="33" r="30" className="circle" />
</svg>
}
</div>
if (props && props.fully === true) return <div className="rb-loading rb-loading-active">{spinner}</div>
return spinner