Commit 19cbbe43 authored by Yadd's avatar Yadd

Update javascripts

parent 5d35b327
......@@ -201,7 +201,7 @@ MANAGERJSONDST=$(SRCMANAGERDIR)/site/htdocs/static/struct.json \
# Javascript and CSS to minify
JSSRCFILES:=$(shell find */site/htdocs/static/js $(SRCPORTALDIR)/site/htdocs/static -type f -name '*.js' ! -name '*.min.js') \
$(SRCMANAGERDIR)/site/htdocs/static/bwr/file-saver.js/FileSaver.js
CSSSRCFILES:=$(shell find */site/htdocs/static/css $(SRCPORTALDIR)/site/htdocs/static -type f -name '*.css' ! -name '*.min.css')
CSSSRCFILES:=$(shell find $(SRCMANAGERDIR)/site/htdocs/static $(SRCPORTALDIR)/site/htdocs/static -type f -name '*.css' ! -name '*.min.css')
# Coffee files
MANAGERCOFFEESRCFILES:=$(shell find lemonldap-ng-manager/site/coffee -type f -name '*.coffee')
......
/**
* @license Angular UI Tree v2.22.5
* @license Angular UI Tree v2.22.6
* (c) 2010-2017. https://github.com/angular-ui-tree/angular-ui-tree
* License: MIT
*/
......@@ -10,6 +10,7 @@
.constant('treeConfig', {
treeClass: 'angular-ui-tree',
emptyTreeClass: 'angular-ui-tree-empty',
dropzoneClass: 'angular-ui-tree-dropzone',
hiddenClass: 'angular-ui-tree-hidden',
nodesClass: 'angular-ui-tree-nodes',
nodeClass: 'angular-ui-tree-node',
......@@ -197,8 +198,8 @@
angular.module('ui.tree')
.controller('TreeNodesController', ['$scope', '$element',
function ($scope, $element) {
.controller('TreeNodesController', ['$scope', '$element', '$timeout',
function ($scope, $element, $timeout) {
this.scope = $scope;
$scope.$element = $element;
......@@ -242,22 +243,11 @@
return $scope.$modelValue.length > 0;
};
$scope.safeApply = function (fn) {
var phase = this.$root.$$phase;
if (phase == '$apply' || phase == '$digest') {
if (fn && (typeof (fn) === 'function')) {
fn();
}
} else {
this.$apply(fn);
}
};
//Called in apply method of UiTreeHelper.dragInfo.
$scope.removeNode = function (node) {
var index = $scope.$modelValue.indexOf(node.$modelValue);
if (index > -1) {
$scope.safeApply(function () {
$timeout(function () {
$scope.$modelValue.splice(index, 1)[0];
});
return $scope.$treeScope.$callbacks.removed(node);
......@@ -267,7 +257,7 @@
//Called in apply method of UiTreeHelper.dragInfo.
$scope.insertNode = function (index, nodeData) {
$scope.safeApply(function () {
$timeout(function () {
$scope.$modelValue.splice(index, 0, nodeData);
});
};
......@@ -315,6 +305,7 @@
$scope.$nodesScope = null; // root nodes
$scope.$type = 'uiTree';
$scope.$emptyElm = null;
$scope.$dropzoneElm = null;
$scope.$callbacks = null;
$scope.dragEnabled = true;
......@@ -323,6 +314,7 @@
$scope.dragDelay = 0;
$scope.cloneEnabled = false;
$scope.nodropEnabled = false;
$scope.dropzoneEnabled = false;
// Check if it's a empty tree
$scope.isEmpty = function () {
......@@ -345,7 +337,17 @@
}
};
this.resetDropzoneElement = function () {
if ((!$scope.$nodesScope.$modelValue || $scope.$nodesScope.$modelValue.length !== 0) &&
$scope.dropzoneEnabled) {
$element.append($scope.$dropzoneElm);
} else {
$scope.$dropzoneElm.remove();
}
};
$scope.resetEmptyElement = this.resetEmptyElement;
$scope.resetDropzoneElement = this.resetDropzoneElement;
}
]);
})();
......@@ -396,11 +398,15 @@
scope.$emptyElm.append(tdElm);
} else {
scope.$emptyElm = angular.element($window.document.createElement('div'));
scope.$dropzoneElm = angular.element($window.document.createElement('div'));
}
if (config.emptyTreeClass) {
scope.$emptyElm.addClass(config.emptyTreeClass);
}
if (config.dropzoneClass) {
scope.$dropzoneElm.addClass(config.dropzoneClass);
}
scope.$watch('$nodesScope.$modelValue.length', function (val) {
if (!angular.isNumber(val)) {
......@@ -408,6 +414,7 @@
}
ctrl.resetEmptyElement();
ctrl.resetDropzoneElement();
}, true);
scope.$watch(attrs.dragEnabled, function (val) {
......@@ -429,6 +436,13 @@
}
});
scope.$watch(attrs.dropzoneEnabled, function (val) {
if ((typeof val) == 'boolean') {
scope.dropzoneEnabled = val;
ctrl.resetDropzoneElement();
}
});
scope.$watch(attrs.cloneEnabled, function (val) {
if ((typeof val) == 'boolean') {
scope.cloneEnabled = val;
......@@ -902,7 +916,8 @@
targetBeforeBuffer,
targetHeight,
targetChildElm,
targetChildHeight;
targetChildHeight,
isDropzone;
//If check ensures that drag element was created.
if (dragElm) {
......@@ -1040,6 +1055,9 @@
targetNode = targetElm.controller('uiTreeNodes').scope;
} else if (UiTreeHelper.elementIsPlaceholder(targetElm)) {
targetNode = targetElm.controller('uiTreeNodes').scope;
} else if (UiTreeHelper.elementIsDropzone(targetElm)) {
targetNode = targetElm.controller('uiTree').scope;
isDropzone = true;
} else if (targetElm.controller('uiTreeNode')) {
//Is a child element of a node.
targetNode = targetElm.controller('uiTreeNode').scope;
......@@ -1106,8 +1124,8 @@
targetNode = targetNode.$nodeScope;
}
//Check if it is a uiTreeNode or it's an empty tree.
if (targetNode.$type !== 'uiTreeNode' && !isEmpty) {
//Check if it is a uiTreeNode or it's an empty tree or it's a dropzone.
if (targetNode.$type !== 'uiTreeNode' && !isEmpty && !isDropzone) {
// Allow node to return to its original position if no longer hovering over target
if (config.appendChildOnHover) {
......@@ -1125,6 +1143,7 @@
//If placeholder move from empty tree, reset it.
if (treeScope && placeElm.parent()[0] != treeScope.$element[0]) {
treeScope.resetEmptyElement();
treeScope.resetDropzoneElement();
treeScope = null;
}
......@@ -1132,9 +1151,14 @@
if (isEmpty) {
treeScope = targetNode;
if (targetNode.$nodesScope.accept(scope, 0)) {
targetNode.place(placeElm);
dragInfo.moveTo(targetNode.$nodesScope, targetNode.$nodesScope.childNodes(), 0);
}
//It's a dropzone
} else if (isDropzone) {
treeScope = targetNode;
if (targetNode.$nodesScope.accept(scope, targetNode.$nodesScope.childNodes().length)) {
dragInfo.moveTo(targetNode.$nodesScope, targetNode.$nodesScope.childNodes(), targetNode.$nodesScope.childNodes().length);
}
//Not empty and drag enabled.
} else if (targetNode.dragEnabled()) {
......@@ -1791,6 +1815,9 @@
elementIsPlaceholder: function (element) {
return element.hasClass(treeConfig.placeholderClass);
},
elementIsDropzone: function (element) {
return element.hasClass(treeConfig.dropzoneClass);
},
elementContainsTreeNodeHandler: function (element) {
return element[0].querySelectorAll('[ui-tree-handle]').length >= 1;
},
......
.angular-ui-tree-empty{border:1px dashed #bbb;min-height:100px;background-color:#e5e5e5;background-image:-webkit-linear-gradient(45deg,#fff 25%,transparent 0,transparent 75%,#fff 0,#fff),-webkit-linear-gradient(45deg,#fff 25%,transparent 0,transparent 75%,#fff 0,#fff);background-image:linear-gradient(45deg,#fff 25%,transparent 0,transparent 75%,#fff 0,#fff),linear-gradient(45deg,#fff 25%,transparent 0,transparent 75%,#fff 0,#fff);background-size:60px 60px;background-position:0 0,30px 30px;pointer-events:none}.angular-ui-tree-nodes{position:relative;margin:0;padding:0;list-style:none}.angular-ui-tree-nodes .angular-ui-tree-nodes{padding-left:20px}.angular-ui-tree-node,.angular-ui-tree-placeholder{position:relative;margin:0;padding:0;min-height:20px;line-height:20px}.angular-ui-tree-hidden{display:none}.angular-ui-tree-placeholder{margin:10px;padding:0;min-height:30px}.angular-ui-tree-handle{cursor:move;text-decoration:none;font-weight:700;box-sizing:border-box;min-height:20px;line-height:20px}.angular-ui-tree-drag{position:absolute;pointer-events:none;z-index:999;opacity:.8}.angular-ui-tree-drag .tree-node-content{margin-top:0}
\ No newline at end of file
.angular-ui-tree-dropzone,.angular-ui-tree-empty{border:1px dashed #bbb;min-height:100px;background-color:#e5e5e5;background-image:-webkit-linear-gradient(45deg,#fff 25%,transparent 0,transparent 75%,#fff 0,#fff),-webkit-linear-gradient(45deg,#fff 25%,transparent 0,transparent 75%,#fff 0,#fff);background-image:linear-gradient(45deg,#fff 25%,transparent 0,transparent 75%,#fff 0,#fff),linear-gradient(45deg,#fff 25%,transparent 0,transparent 75%,#fff 0,#fff);background-size:60px 60px;background-position:0 0,30px 30px}.angular-ui-tree-empty{pointer-events:none}.angular-ui-tree-nodes{position:relative;margin:0;padding:0;list-style:none}.angular-ui-tree-nodes .angular-ui-tree-nodes{padding-left:20px}.angular-ui-tree-node,.angular-ui-tree-placeholder{position:relative;margin:0;padding:0;min-height:20px;line-height:20px}.angular-ui-tree-hidden{display:none}.angular-ui-tree-placeholder{margin:10px;padding:0;min-height:30px}.angular-ui-tree-handle{cursor:move;text-decoration:none;font-weight:700;box-sizing:border-box;min-height:20px;line-height:20px}.angular-ui-tree-drag{position:absolute;pointer-events:none;z-index:999;opacity:.8}.angular-ui-tree-drag .tree-node-content{margin-top:0}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* Fingerprintjs2 1.5.0 - Modern & flexible browser fingerprint library v2
* Fingerprintjs2 1.5.1 - Modern & flexible browser fingerprint library v2
* https://github.com/Valve/fingerprintjs2
* Copyright (c) 2015 Valentin Vasilyev (valentin.vasilyev@outlook.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
......@@ -24,36 +24,6 @@
else { context[name] = definition(); }
})("Fingerprint2", this, function() {
"use strict";
// This will only be polyfilled for IE8 and older
// Taken from Mozilla MDC
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function(searchElement, fromIndex) {
var k;
if (this == null) {
throw new TypeError("'this' is null or undefined");
}
var O = Object(this);
var len = O.length >>> 0;
if (len === 0) {
return -1;
}
var n = +fromIndex || 0;
if (Math.abs(n) === Infinity) {
n = 0;
}
if (n >= len) {
return -1;
}
k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
while (k < len) {
if (k in O && O[k] === searchElement) {
return k;
}
k++;
}
return -1;
};
}
var Fingerprint2 = function(options) {
if (!(this instanceof Fingerprint2)) {
......@@ -81,11 +51,6 @@
}
return target;
},
log: function(msg){
if(window.console){
console.log(msg);
}
},
get: function(done){
var keys = [];
keys = this.userAgentKey(keys);
......@@ -113,6 +78,7 @@
keys = this.hasLiedOsKey(keys);
keys = this.hasLiedBrowserKey(keys);
keys = this.touchSupportKey(keys);
keys = this.customEntropyFunction(keys);
var that = this;
this.fontsKey(keys, function(newKeys){
var values = [];
......@@ -127,6 +93,12 @@
return done(murmur, newKeys);
});
},
customEntropyFunction: function (keys) {
if (typeof this.options.customFunction === "function") {
keys.push({key: "custom", value: this.options.customFunction()});
}
return keys;
},
userAgentKey: function(keys) {
if(!this.options.excludeUserAgent) {
keys.push({key: "user_agent", value: this.getUserAgent()});
......@@ -260,15 +232,9 @@
},
webglKey: function(keys) {
if(this.options.excludeWebGL) {
if(typeof NODEBUG === "undefined"){
this.log("Skipping WebGL fingerprinting per excludeWebGL configuration option");
}
return keys;
}
if(!this.isWebGlSupported()) {
if(typeof NODEBUG === "undefined"){
this.log("Skipping WebGL fingerprinting because it is not supported in this browser");
}
return keys;
}
keys.push({key: "webgl", value: this.getWebglFp()});
......@@ -313,28 +279,16 @@
// flash fonts (will increase fingerprinting time 20X to ~ 130-150ms)
flashFontsKey: function(keys, done) {
if(this.options.excludeFlashFonts) {
if(typeof NODEBUG === "undefined"){
this.log("Skipping flash fonts detection per excludeFlashFonts configuration option");
}
return done(keys);
}
// we do flash if swfobject is loaded
if(!this.hasSwfObjectLoaded()){
if(typeof NODEBUG === "undefined"){
this.log("Swfobject is not detected, Flash fonts enumeration is skipped");
}
return done(keys);
}
if(!this.hasMinFlashInstalled()){
if(typeof NODEBUG === "undefined"){
this.log("Flash is not installed, skipping Flash fonts enumeration");
}
return done(keys);
}
if(typeof this.options.swfPath === "undefined"){
if(typeof NODEBUG === "undefined"){
this.log("To use Flash fonts detection, you must pass a valid swfPath option, skipping Flash fonts enumeration");
}
return done(keys);
}
this.loadSwfAndDetectFonts(function(fonts){
......@@ -830,20 +784,13 @@
try {
// Add the unmasked vendor and unmasked renderer if the debug_renderer_info extension is available
var extensionDebugRendererInfo = gl.getExtension("WEBGL_debug_renderer_info");
if (!extensionDebugRendererInfo) {
if (typeof NODEBUG === "undefined") {
this.log("WebGL fingerprinting is incomplete, because your browser does not have the extension WEBGL_debug_renderer_info");
}
} else {
if (extensionDebugRendererInfo) {
result.push("webgl unmasked vendor:" + gl.getParameter(extensionDebugRendererInfo.UNMASKED_VENDOR_WEBGL));
result.push("webgl unmasked renderer:" + gl.getParameter(extensionDebugRendererInfo.UNMASKED_RENDERER_WEBGL));
}
} catch(e) { /* squelch */ }
if (!gl.getShaderPrecisionFormat) {
if (typeof NODEBUG === "undefined") {
this.log("WebGL fingerprinting is incomplete, because your browser does not support getShaderPrecisionFormat");
}
return result.join("~");
}
......@@ -1327,6 +1274,6 @@
return ("00000000" + (h1[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h1[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[1] >>> 0).toString(16)).slice(-8);
}
};
Fingerprint2.VERSION = "1.5.0";
Fingerprint2.VERSION = "1.5.1";
return Fingerprint2;
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment