tech: cleanup and fixed build issue

This commit is contained in:
Torkel Ödegaard 2017-09-21 21:12:49 +02:00
parent f0e0e61809
commit 6aad2a5b2d
5 changed files with 3 additions and 48 deletions

View File

@ -9,6 +9,8 @@ import 'angular-sanitize';
import 'angular-dragdrop';
import 'angular-bindonce';
import 'angular-ui';
import 'react';
import 'react-dom';
import 'ngreact';
import $ from 'jquery';

View File

@ -1,5 +1,4 @@
import * as React from 'react';
import 'react-dom';
import coreModule from '../core_module';
export interface IProps {

View File

@ -8,7 +8,6 @@ import "./directives/dropdown_typeahead";
import "./directives/metric_segment";
import "./directives/misc";
import "./directives/ng_model_on_blur";
import "./directives/password_strength";
import "./directives/spectrum_picker";
import "./directives/tags";
import "./directives/value_select_dropdown";

View File

@ -1,45 +0,0 @@
define([
'../core_module',
],
function (coreModule) {
'use strict';
coreModule.default.directive('passwordStrength2', function() {
var template = '<div class="password-strength small" ng-if="!loginMode" ng-class="strengthClass">' +
'<em>{{strengthText}}</em>' +
'</div>';
return {
template: template,
scope: {
password: "=",
},
link: function($scope) {
$scope.strengthClass = '';
function passwordChanged(newValue) {
if (!newValue) {
$scope.strengthText = "";
$scope.strengthClass = "hidden";
return;
}
if (newValue.length < 4) {
$scope.strengthText = "strength: weak sauce.";
$scope.strengthClass = "password-strength-bad";
return;
}
if (newValue.length <= 8) {
$scope.strengthText = "strength: you can do better.";
$scope.strengthClass = "password-strength-ok";
return;
}
$scope.strengthText = "strength: strong like a bull.";
$scope.strengthClass = "password-strength-good";
}
$scope.$watch("password", passwordChanged);
}
};
});
});

View File

@ -65,7 +65,7 @@
deps: ['jquery'],
exports: 'angular',
},
'vendor/angular-mocks/angular-mocks.js': {
'vendor/npm/angular-mocks/angular-mocks.js': {
format: 'global',
deps: ['angular'],
},