From 468257167a5f500e1a5f1bb7df22d7f906816e8c Mon Sep 17 00:00:00 2001 From: pengpengshui Date: Sat, 29 Jul 2017 06:19:46 +0800 Subject: [PATCH] fix #2896 #2886 #2888 about tooltips,inline alert ,datagrid leftside style --- src/ui_ng/src/app/project/project.component.ts | 10 +++++++--- src/ui_ng/src/styles.css | 13 ++++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/ui_ng/src/app/project/project.component.ts b/src/ui_ng/src/app/project/project.component.ts index 921ba8179..8242ed498 100644 --- a/src/ui_ng/src/app/project/project.component.ts +++ b/src/ui_ng/src/app/project/project.component.ts @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core'; +import {Component, OnInit, ViewChild, OnDestroy, ChangeDetectorRef, ChangeDetectionStrategy} from '@angular/core'; import { Router } from '@angular/router'; @@ -43,7 +43,8 @@ import { StatisticHandler } from '../shared/statictics/statistic-handler.service @Component({ selector: 'project', templateUrl: 'project.component.html', - styleUrls: ['./project.component.css'] + styleUrls: ['./project.component.css'], + changeDetection: ChangeDetectionStrategy.OnPush }) export class ProjectComponent implements OnInit, OnDestroy { @@ -68,7 +69,8 @@ export class ProjectComponent implements OnInit, OnDestroy { private appConfigService: AppConfigService, private sessionService: SessionService, private deletionDialogService: ConfirmationDialogService, - private statisticHandler: StatisticHandler) { + private statisticHandler: StatisticHandler, + private ref: ChangeDetectorRef) { this.subscription = deletionDialogService.confirmationConfirm$.subscribe(message => { if (message && message.state === ConfirmationState.CONFIRMED && @@ -136,6 +138,8 @@ export class ProjectComponent implements OnInit, OnDestroy { this.messageHandlerService.handleError(error); } ); + let hnd = setInterval(()=>this.ref.markForCheck(), 100); + setTimeout(()=>clearInterval(hnd), 2000); } openModal(): void { diff --git a/src/ui_ng/src/styles.css b/src/ui_ng/src/styles.css index cc0ee8f2d..c02851a6c 100644 --- a/src/ui_ng/src/styles.css +++ b/src/ui_ng/src/styles.css @@ -28,4 +28,15 @@ align-items: center; overflow-y: auto; overflow-x: hidden; -} \ No newline at end of file +} +.tooltip-content{white-space: normal;word-wrap: break-word;} + + .alert.alert-warning{ + padding:10px 12px; +} + .alert-warning .alert-actions button{ + margin: -2px 0 0px 0; +} + .modal-header{ + padding: 0; + } \ No newline at end of file