Skip to content

Commit

Permalink
fix wenzhixin#2509: Updated the style of loading message.
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin committed Mar 18, 2019
1 parent 13540e7 commit d8b945f
Show file tree
Hide file tree
Showing 52 changed files with 137 additions and 65 deletions.
18 changes: 12 additions & 6 deletions src/bootstrap-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@
const LOCALES = {}
LOCALES['en-US'] = LOCALES.en = {
formatLoadingMessage () {
return 'Loading, please wait...'
return 'Loading, please wait'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} rows per page`
Expand Down Expand Up @@ -670,7 +670,10 @@
<div class="fixed-table-header"><table></table></div>
<div class="fixed-table-body">
<div class="fixed-table-loading">
${this.options.formatLoadingMessage()}
<span class="loading-wrap">
<span class="loading-text">${this.options.formatLoadingMessage()}</span>
<span class="animation-wrap"><span class="animation-dot"></span></span>
</span>
</div>
</div>
<div class="fixed-table-footer"><table><thead><tr></tr></thead></table></div>
Expand All @@ -697,6 +700,7 @@
this.$container.after('<div class="clearfix"></div>')

this.$el.addClass(this.options.classes)
this.$tableLoading.addClass(this.options.classes)

if (this.options.height) {
this.$tableContainer.addClass('fixed-height')
Expand Down Expand Up @@ -2132,7 +2136,7 @@
}

if (!silent) {
this.$tableLoading.show()
this.showLoading()
}
const request = $.extend({}, Utils.calculateObjectValue(null, this.options.ajaxOptions), {
type: this.options.method,
Expand All @@ -2149,7 +2153,7 @@
this.load(res)
this.trigger('load-success', res)
if (!silent) {
this.$tableLoading.hide()
this.hideLoading()
}
},
error: jqXHR => {
Expand Down Expand Up @@ -2276,6 +2280,8 @@
.html('').attr('class', this.$el.attr('class'))
.append(this.$header_)

this.$tableLoading.css('width', this.$el.outerWidth())

const focusedTemp = $('.focus-temp:visible:eq(0)')
if (focusedTemp.length > 0) {
focusedTemp.focus()
Expand Down Expand Up @@ -2989,11 +2995,11 @@
}

showLoading () {
this.$tableLoading.show()
this.$tableLoading.css('display', 'flex')
}

hideLoading () {
this.$tableLoading.hide()
this.$tableLoading.css('display', 'none')
}

togglePagination () {
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-af-ZA.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['af-ZA'] = {
formatLoadingMessage () {
return 'Besig om te laai, wag asseblief ...'
return 'Besig om te laai, wag asseblief'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} rekords per bladsy`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-ar-SA.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['ar-SA'] = {
formatLoadingMessage () {
return 'جاري التحميل, يرجى الإنتظار...'
return 'جاري التحميل, يرجى الإنتظار'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} سجل لكل صفحة`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-ca-ES.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
($ => {
$.fn.bootstrapTable.locales['ca-ES'] = {
formatLoadingMessage () {
return 'Espereu, si us plau...'
return 'Espereu, si us plau'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} resultats per pàgina`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-cs-CZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
($ => {
$.fn.bootstrapTable.locales['cs-CZ'] = {
formatLoadingMessage () {
return 'Čekejte, prosím...'
return 'Čekejte, prosím'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} položek na stránku`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-da-DK.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['da-DK'] = {
formatLoadingMessage () {
return 'Indlæser, vent venligst...'
return 'Indlæser, vent venligst'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} poster pr side`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-de-DE.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['de-DE'] = {
formatLoadingMessage () {
return 'Lade, bitte warten...'
return 'Lade, bitte warten'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} Zeilen pro Seite.`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-el-GR.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['el-GR'] = {
formatLoadingMessage () {
return 'Φορτώνει, παρακαλώ περιμένετε...'
return 'Φορτώνει, παρακαλώ περιμένετε'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} αποτελέσματα ανά σελίδα`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['en-US'] = {
formatLoadingMessage () {
return 'Loading, please wait...'
return 'Loading, please wait'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} rows per page`
Expand Down
4 changes: 2 additions & 2 deletions src/locale/bootstrap-table-es-AR.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['es-AR'] = {
formatLoadingMessage () {
return 'Cargando, espere por favor...'
return 'Cargando, espere por favor'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} registros por página`
Expand Down Expand Up @@ -61,4 +61,4 @@
}

$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['es-AR'])
})(jQuery)
})(jQuery)
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-es-CL.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
($ => {
$.fn.bootstrapTable.locales['es-CL'] = {
formatLoadingMessage () {
return 'Cargando, espere por favor...'
return 'Cargando, espere por favor'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} filas por p\u00E1gina`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-es-CR.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['es-CR'] = {
formatLoadingMessage () {
return 'Cargando, por favor espere...'
return 'Cargando, por favor espere'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} registros por página`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-es-ES.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['es-ES'] = {
formatLoadingMessage () {
return 'Por favor espere...'
return 'Por favor espere'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} resultados por página`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-es-MX.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
($ => {
$.fn.bootstrapTable.locales['es-MX'] = {
formatLoadingMessage () {
return 'Cargando, espere por favor...'
return 'Cargando, espere por favor'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} registros por página`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-es-NI.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['es-NI'] = {
formatLoadingMessage () {
return 'Cargando, por favor espere...'
return 'Cargando, por favor espere'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} registros por página`
Expand Down
4 changes: 2 additions & 2 deletions src/locale/bootstrap-table-es-SP.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['es-SP'] = {
formatLoadingMessage () {
return 'Cargando, por favor espera...'
return 'Cargando, por favor espera'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} registros por p&#225;gina.`
Expand Down Expand Up @@ -61,4 +61,4 @@
}

$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['es-SP'])
})(jQuery)
})(jQuery)
4 changes: 2 additions & 2 deletions src/locale/bootstrap-table-et-EE.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['et-EE'] = {
formatLoadingMessage () {
return 'Päring käib, palun oota...'
return 'Päring käib, palun oota'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} rida lehe kohta`
Expand Down Expand Up @@ -61,4 +61,4 @@
}

$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['et-EE'])
})(jQuery)
})(jQuery)
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-eu-EU.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['eu-EU'] = {
formatLoadingMessage () {
return 'Itxaron mesedez...'
return 'Itxaron mesedez'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} emaitza orriko.`
Expand Down
4 changes: 2 additions & 2 deletions src/locale/bootstrap-table-fa-IR.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['fa-IR'] = {
formatLoadingMessage () {
return 'در حال بارگذاری, لطفا صبر کنید...'
return 'در حال بارگذاری, لطفا صبر کنید'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} رکورد در صفحه`
Expand Down Expand Up @@ -61,4 +61,4 @@
}

$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['fa-IR'])
})(jQuery)
})(jQuery)
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-fi-FI.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['fi-FI'] = {
formatLoadingMessage () {
return 'Ladataan, ole hyvä ja odota...'
return 'Ladataan, ole hyvä ja odota'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} riviä sivulla`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-fr-BE.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['fr-BE'] = {
formatLoadingMessage () {
return 'Chargement en cours...'
return 'Chargement en cours'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} entrées par page`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-fr-FR.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
($ => {
$.fn.bootstrapTable.locales['fr-FR'] = {
formatLoadingMessage () {
return 'Chargement en cours, patientez, s´il vous plaît ...'
return 'Chargement en cours, patientez, s´il vous plaît'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} lignes par page`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-he-IL.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['he-IL'] = {
formatLoadingMessage () {
return 'טוען, נא להמתין...'
return 'טוען, נא להמתין'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} שורות בעמוד`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-hr-HR.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
($ => {
$.fn.bootstrapTable.locales['hr-HR'] = {
formatLoadingMessage () {
return 'Molimo pričekajte ...'
return 'Molimo pričekajte'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} broj zapisa po stranici`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-hu-HU.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['hu-HU'] = {
formatLoadingMessage () {
return 'Betöltés, kérem várjon...'
return 'Betöltés, kérem várjon'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} rekord per oldal`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-id-ID.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['id-ID'] = {
formatLoadingMessage () {
return 'Memuat, mohon tunggu...'
return 'Memuat, mohon tunggu'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} baris per halaman`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-it-IT.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
($ => {
$.fn.bootstrapTable.locales['it-IT'] = {
formatLoadingMessage () {
return 'Caricamento in corso...'
return 'Caricamento in corso'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} elementi per pagina`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-ka-GE.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['ka-GE'] = {
formatLoadingMessage () {
return 'იტვირთება, გთხოვთ მოიცადოთ...'
return 'იტვირთება, გთხოვთ მოიცადოთ'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} ჩანაწერი თითო გვერდზე`
Expand Down
4 changes: 2 additions & 2 deletions src/locale/bootstrap-table-ko-KR.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['ko-KR'] = {
formatLoadingMessage () {
return '데이터를 불러오는 중입니다...'
return '데이터를 불러오는 중입니다'
},
formatRecordsPerPage (pageNumber) {
return `페이지 당 ${pageNumber}개 데이터 출력`
Expand Down Expand Up @@ -61,4 +61,4 @@
}

$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ko-KR'])
})(jQuery)
})(jQuery)
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-ms-MY.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['ms-MY'] = {
formatLoadingMessage () {
return 'Permintaan sedang dimuatkan. Sila tunggu sebentar...'
return 'Permintaan sedang dimuatkan. Sila tunggu sebentar'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} rekod setiap muka surat`
Expand Down
4 changes: 2 additions & 2 deletions src/locale/bootstrap-table-nb-NO.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['nb-NO'] = {
formatLoadingMessage () {
return 'Oppdaterer, vennligst vent...'
return 'Oppdaterer, vennligst vent'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} poster pr side`
Expand Down Expand Up @@ -61,4 +61,4 @@
}

$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['nb-NO'])
})(jQuery)
})(jQuery)
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-nl-NL.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['nl-NL'] = {
formatLoadingMessage () {
return 'Laden, even geduld...'
return 'Laden, even geduld'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} records per pagina`
Expand Down
2 changes: 1 addition & 1 deletion src/locale/bootstrap-table-pl-PL.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
($ => {
$.fn.bootstrapTable.locales['pl-PL'] = {
formatLoadingMessage () {
return 'Ładowanie, proszę czekać...'
return 'Ładowanie, proszę czekać'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} rekordów na stronę`
Expand Down
Loading

0 comments on commit d8b945f

Please sign in to comment.