From 9475694a95a5fecbc01529b3285eb11bfaf8b2c9 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 6 Nov 2016 15:20:44 +0800 Subject: [PATCH] fix setting option always show error tool-tip bug --- src/scripts/config/constants.js | 2 +- src/scripts/directives/setting.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/scripts/config/constants.js b/src/scripts/config/constants.js index 824f8a3..82194a5 100644 --- a/src/scripts/config/constants.js +++ b/src/scripts/config/constants.js @@ -13,7 +13,7 @@ globalStatStorageCapacity: 120, taskStatStorageCapacity: 300, lazySaveTimeout: 500, - errorTooltipDelay: 200, + errorTooltipDelay: 500, notificationInPageTimeout: 2000 }).constant('ariaNgFileTypes', { video: [ diff --git a/src/scripts/directives/setting.js b/src/scripts/directives/setting.js index 4bc6fc6..12bfe0b 100644 --- a/src/scripts/directives/setting.js +++ b/src/scripts/directives/setting.js @@ -32,6 +32,12 @@ } $timeout(function () { + var currentValue = scope.optionStatus.getValue(); + + if (currentValue !== 'failed' && currentValue !== 'error') { + return; + } + angular.element(element).tooltip({ title: $translate.instant(cause, causeParams), trigger: 'focus',