Add angular-tld and its dependencies

This commit is contained in:
Johannes Zellner
2017-02-09 16:56:15 +01:00
parent 9692aa3c08
commit 5ca2c2d564
2 changed files with 1941 additions and 0 deletions

28
webadmin/src/3rdparty/js/angular-tld.js vendored Normal file
View File

@@ -0,0 +1,28 @@
angular.module('ngTld', [])
.factory('ngTld', ngTld)
.directive('checkTld', checkTld);
function ngTld() {
var tldExists = function($path) {
return tld.tldExists($path.$viewValue);
}
return {
tldExists: tldExists,
}
}
function checkTld(ngTld) {
return {
restrict: 'A',
require: 'ngModel',
link: function(scope, element, attr, ngModel) {
ngModel.$validators.invalidTld = function(modelValue, viewValue) {
var status = true;
status = ngTld.tldExists(ngModel);
return status;
}
}
}
}

1913
webadmin/src/3rdparty/js/tld.js vendored Normal file

File diff suppressed because one or more lines are too long