Skip to content

Commit

Permalink
Merge branch 'cloud-add-hierarchy-groupbys' of https://github.com/eif…
Browse files Browse the repository at this point in the history
…fel777/xdmod into cloud-add-hierarchy-groupbys
  • Loading branch information
eiffel777 committed May 12, 2020
2 parents d6da177 + aa54f96 commit 202747c
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 121 deletions.
115 changes: 114 additions & 1 deletion html/gui/lib/internet-explorer-polyfills.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint no-extend-native: "off", no-bitwise: "off", no-param-reassign: "off" */
/* eslint-disable */

if (!Object.values) {
Object.values = function (obj) {
Expand Down Expand Up @@ -124,3 +124,116 @@ if (!String.prototype.padStart) {
return padString.slice(0, targetLength) + String(this);
};
}
// Script found @ http://stackoverflow.com/questions/2790001/fixing-javascript-array-functions-in-internet-explorer-indexof-foreach-etc

// Add ECMA262-5 method binding if not supported natively
//
if (!('bind' in Function.prototype)) {
Function.prototype.bind= function(owner) {
var that= this;
if (arguments.length<=1) {
return function() {
return that.apply(owner, arguments);
};
} else {
var args= Array.prototype.slice.call(arguments, 1);
return function() {
return that.apply(owner, arguments.length===0? args : args.concat(Array.prototype.slice.call(arguments)));
};
}
};
}

// Add ECMA262-5 string trim if not supported natively
//
if (!('trim' in String.prototype)) {
String.prototype.trim= function() {
return this.replace(/^\s+/, '').replace(/\s+$/, '');
};
}

// Add ECMA262-5 Array methods if not supported natively
//
if (!('indexOf' in Array.prototype)) {
Array.prototype.indexOf= function(find, i /*opt*/) {
if (i===undefined) i= 0;
if (i<0) i+= this.length;
if (i<0) i= 0;
for (var n= this.length; i<n; i++)
if (i in this && this[i]===find)
return i;
return -1;
};
}
if (!('lastIndexOf' in Array.prototype)) {
Array.prototype.lastIndexOf= function(find, i /*opt*/) {
if (i===undefined) i= this.length-1;
if (i<0) i+= this.length;
if (i>this.length-1) i= this.length-1;
for (i++; i-->0;) /* i++ because from-argument is sadly inclusive */
if (i in this && this[i]===find)
return i;
return -1;
};
}
if (!('forEach' in Array.prototype)) {
Array.prototype.forEach= function(action, that /*opt*/) {
for (var i= 0, n= this.length; i<n; i++)
if (i in this)
action.call(that, this[i], i, this);
};
}
if (!('map' in Array.prototype)) {
Array.prototype.map= function(mapper, that /*opt*/) {
var other= new Array(this.length);
for (var i= 0, n= this.length; i<n; i++)
if (i in this)
other[i]= mapper.call(that, this[i], i, this);
return other;
};
}
if (!('filter' in Array.prototype)) {
Array.prototype.filter= function(filter, that /*opt*/) {
var other= [], v;
for (var i=0, n= this.length; i<n; i++)
if (i in this && filter.call(that, v= this[i], i, this))
other.push(v);
return other;
};
}
if (!('every' in Array.prototype)) {
Array.prototype.every= function(tester, that /*opt*/) {
for (var i= 0, n= this.length; i<n; i++)
if (i in this && !tester.call(that, this[i], i, this))
return false;
return true;
};
}
if (!('some' in Array.prototype)) {
Array.prototype.some= function(tester, that /*opt*/) {
for (var i= 0, n= this.length; i<n; i++)
if (i in this && tester.call(that, this[i], i, this))
return true;
return false;
};
}
// Console-polyfill. MIT license.
// https://github.com/paulmillr/console-polyfill
// Make it safe to do console.log() always.
(function(global) {
'use strict';
global.console = global.console || {};
var con = global.console;
var prop, method;
var empty = {};
var dummy = function() {};
var properties = 'memory'.split(',');
var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +
'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +
'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');
while (prop = properties.pop()) if (!con[prop]) con[prop] = empty;
while (method = methods.pop()) if (!con[method]) con[method] = dummy;
})(typeof window === 'undefined' ? this : window);
// Using `this` for web workers while maintaining compatibility with browser
// targeted script loaders such as Browserify or Webpack where the only way to
// get to the global object is via `window`.
96 changes: 0 additions & 96 deletions html/gui/lib/oldie-array-methods-patch.js

This file was deleted.

20 changes: 0 additions & 20 deletions html/gui/lib/oldie-console-patch.js

This file was deleted.

5 changes: 1 addition & 4 deletions html/internal_dashboard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@
<link rel="stylesheet" type="text/css" href="css/dashboard.css">
<link rel="stylesheet" type="text/css" href="css/management.css">
<link rel="stylesheet" type="text/css" href="css/AdminPanel.css" />
<script type="text/javascript" src="../gui/lib/oldie-console-patch.js"></script>
<script type="text/javascript" src="../gui/lib/oldie-array-methods-patch.js"></script>
<script type="text/javascript" src="../gui/lib/ie-object-values-polyfill.js"></script>
<script type="text/javascript" src="../gui/lib/internet-explorer-polyfills.js"></script>
<?php ExtJS::loadSupportScripts('../gui/lib'); ?>
<script type="text/javascript" src="../gui/lib/ext-oldie-history-patch.js"></script>
<script type="text/javascript" src="../gui/lib/jquery/jquery-1.12.4.min.js"></script>

<script type="text/javascript">
Expand Down

0 comments on commit 202747c

Please sign in to comment.