mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-11-24 00:13:28 +00:00
feat: add HTTP status code to error message
Also use default MediaWiki message 'error' instead of self-defined one.
This commit is contained in:
parent
2cd680df50
commit
38a47307d7
|
@ -34,7 +34,7 @@
|
|||
}
|
||||
],
|
||||
"messages": [
|
||||
"tabberneue-error"
|
||||
"error"
|
||||
],
|
||||
"styles": [
|
||||
"ext.tabberNeue.less"
|
||||
|
|
|
@ -6,6 +6,5 @@
|
|||
"Ciencia Al Poder"
|
||||
]
|
||||
},
|
||||
"tabberneue-desc": "Allows to create tabs within a page. Forked from [https://www.mediawiki.org/wiki/Extension:Tabber Extension:Tabber].",
|
||||
"tabberneue-error": "Error."
|
||||
"tabberneue-desc": "Allows to create tabs within a page. Forked from [https://www.mediawiki.org/wiki/Extension:Tabber Extension:Tabber]."
|
||||
}
|
||||
|
|
|
@ -4,7 +4,5 @@
|
|||
"Ciencia Al Poder"
|
||||
]
|
||||
},
|
||||
"tabberneue-desc": "Permite usar pestañas dentro de una página.",
|
||||
"tabberneue-loading": "Cargando...",
|
||||
"tabberneue-error": "Error."
|
||||
"tabberneue-desc": "Permite usar pestañas dentro de una página."
|
||||
}
|
|
@ -4,6 +4,5 @@
|
|||
"Shirayuki"
|
||||
]
|
||||
},
|
||||
"tabberneue-desc": "{{desc|name=TabberNeue|url=http://www.mediawiki.org/wiki/Extension:TabberNeue}}",
|
||||
"tabberneue-error": "Error message shown loading tab content"
|
||||
"tabberneue-desc": "{{desc|name=TabberNeue|url=http://www.mediawiki.org/wiki/Extension:TabberNeue}}"
|
||||
}
|
||||
|
|
|
@ -269,9 +269,11 @@ function initTabber( tabber, count ) {
|
|||
function onLoadEndPage() {
|
||||
var targetPanel = currentRequest.targetPanel;
|
||||
if ( xhr.status != 200 ) {
|
||||
var err = document.createElement( 'div' );
|
||||
err.setAttribute( 'class', 'tabber__transclusion--error' );
|
||||
err.appendChild( document.createTextNode( mw.message( 'tabberneue-error' ).text() ) );
|
||||
var err = document.createElement( 'div' ),
|
||||
errMsg = mw.message( 'error' ).text() + ': HTTP ' + xhr.status;
|
||||
|
||||
err.setAttribute( 'class', 'tabber__transclusion--error error' );
|
||||
err.appendChild( document.createTextNode( errMsg ) );
|
||||
targetPanel.textContent = '';
|
||||
targetPanel.appendChild( err );
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue