Revert transition disable function
This commit is contained in:
parent
c4b57e91ab
commit
6e96974364
|
@ -372,8 +372,10 @@ export class MenuComponent implements OnInit {
|
|||
}
|
||||
|
||||
public valueChange() {
|
||||
this.elements.disable();
|
||||
this.cdr.detectChanges();
|
||||
this.elements.init();
|
||||
this.elements.enable();
|
||||
}
|
||||
|
||||
public get displayMenuItems() {
|
||||
|
|
|
@ -222,10 +222,6 @@
|
|||
[queryParams]="{view: 'RESTRICTED'}"
|
||||
(click)="hide(element)">Restricted view</a>
|
||||
</li>
|
||||
<!--<li class="disabled"><a class="uk-disabled uk-text-muted"
|
||||
uk-tooltip="Note: available only in administration dashboard"
|
||||
(click)="hide(element)">Private view</a>
|
||||
</li>-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -242,18 +242,30 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
|
|||
}
|
||||
|
||||
topicChanged(callback: Function, save: boolean = false) {
|
||||
if(this.topics && save) {
|
||||
this.topics.disable();
|
||||
}
|
||||
if(this.categories) {
|
||||
this.categories.disable();
|
||||
}
|
||||
if(this.subCategories) {
|
||||
this.subCategories.disable();
|
||||
}
|
||||
if(callback) {
|
||||
callback();
|
||||
}
|
||||
this.cdr.detectChanges();
|
||||
if(this.topics && save) {
|
||||
this.topics.init();
|
||||
this.topics.enable();
|
||||
}
|
||||
if(this.categories) {
|
||||
this.categories.init();
|
||||
this.categories.enable();
|
||||
}
|
||||
if(this.subCategories) {
|
||||
this.subCategories.init();
|
||||
this.subCategories.enable();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -378,15 +390,23 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
|
|||
}
|
||||
|
||||
categoryChanged(callback: Function, save: boolean = false) {
|
||||
if(this.categories && save) {
|
||||
this.categories.disable();
|
||||
}
|
||||
if(this.subCategories) {
|
||||
this.subCategories.disable();
|
||||
}
|
||||
if(callback) {
|
||||
callback();
|
||||
}
|
||||
this.cdr.detectChanges();
|
||||
if(this.categories && save) {
|
||||
this.categories.init();
|
||||
this.categories.enable();
|
||||
}
|
||||
if(this.subCategories) {
|
||||
this.subCategories.init();
|
||||
this.subCategories.enable();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -512,12 +532,16 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
|
|||
}
|
||||
|
||||
subCategoryChanged(callback: Function, save: boolean = false) {
|
||||
if(this.subCategories && save) {
|
||||
this.subCategories.disable();
|
||||
}
|
||||
if(callback) {
|
||||
callback();
|
||||
}
|
||||
this.cdr.detectChanges();
|
||||
if(this.subCategories && save) {
|
||||
this.subCategories.init();
|
||||
this.subCategories.enable();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,13 +30,14 @@ export class TransitionGroupComponent implements AfterViewInit, OnDestroy {
|
|||
@Input()
|
||||
public id: string;
|
||||
public size: number;
|
||||
private disabled: boolean = false;
|
||||
private subscription: Subscription;
|
||||
|
||||
constructor(public element: ElementRef) {}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.subscription = this.items.changes.subscribe(items => {
|
||||
if(items.length === this.size) {
|
||||
if(items.length === this.size && !this.disabled) {
|
||||
items.forEach(item => item.prevPos = item.newPos || item.prevPos);
|
||||
items.forEach(this.runCallback);
|
||||
this.refreshPosition('newPos');
|
||||
|
@ -126,17 +127,17 @@ export class TransitionGroupComponent implements AfterViewInit, OnDestroy {
|
|||
|
||||
/**
|
||||
* Enable transition
|
||||
* @deprecated
|
||||
*
|
||||
* */
|
||||
enable() {
|
||||
console.debug('Deprecated')
|
||||
this.disabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable transition
|
||||
* @deprecated
|
||||
*
|
||||
* */
|
||||
disable() {
|
||||
console.debug('Deprecated')
|
||||
this.disabled = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue