mirror of https://github.com/apache/lucene.git
SOLR-14120: Solr Admin UI breaks when using IE11
This commit is contained in:
parent
b73e27d1ca
commit
3ab59aa1c9
|
@ -157,6 +157,9 @@ New Features
|
||||||
|
|
||||||
Improvements
|
Improvements
|
||||||
---------------------
|
---------------------
|
||||||
|
* SOLR-14120: Define JavaScript methods 'includes' and 'startsWith' to ensure AdminUI can be displayed when using
|
||||||
|
Internet Explorer 11 (jafurrer).
|
||||||
|
|
||||||
* SOLR-14042: Fix varargs precommit warnings (Andraas Salamon via Jason Gerlowski)
|
* SOLR-14042: Fix varargs precommit warnings (Andraas Salamon via Jason Gerlowski)
|
||||||
|
|
||||||
* SOLR-14095: Replace Java serialization with Javabin in the Overseer queues (Tomás Fernández Löbbe)
|
* SOLR-14095: Replace Java serialization with Javabin in the Overseer queues (Tomás Fernández Löbbe)
|
||||||
|
|
|
@ -15,6 +15,36 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* SOLR-14120: Providing a manual definition for the methods 'includes' and 'startsWith' to support Internet Explorer 11. */
|
||||||
|
if (!String.prototype.includes) {
|
||||||
|
String.prototype.includes = function(search, start) { 'use strict';
|
||||||
|
if (search instanceof RegExp) {
|
||||||
|
throw TypeError('first argument must not be a RegExp');
|
||||||
|
}
|
||||||
|
if (start === undefined) { start = 0; }
|
||||||
|
return this.indexOf(search, start) !== -1;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (!Array.prototype.includes) {
|
||||||
|
Object.defineProperty(Array.prototype, "includes", {
|
||||||
|
enumerable: false,
|
||||||
|
value: function(obj) {
|
||||||
|
var newArr = this.filter(function(el) {
|
||||||
|
return el == obj;
|
||||||
|
});
|
||||||
|
return newArr.length > 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!String.prototype.startsWith) {
|
||||||
|
Object.defineProperty(String.prototype, 'startsWith', {
|
||||||
|
value: function(search, rawPos) {
|
||||||
|
var pos = rawPos > 0 ? rawPos|0 : 0;
|
||||||
|
return this.substring(pos, pos + search.length) === search;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var solrAdminApp = angular.module("solrAdminApp", [
|
var solrAdminApp = angular.module("solrAdminApp", [
|
||||||
"ngResource",
|
"ngResource",
|
||||||
"ngRoute",
|
"ngRoute",
|
||||||
|
|
Loading…
Reference in New Issue