mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 11:07:29 +00:00
Initial state
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<div class="modal fade">
|
||||
<div class="modal-dialog" *ng-if="album">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Delete {{ album.Title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Really delete <strong>{{ album.Title }}</strong> by <strong>{{ album.Artist.Name }}</strong>?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger">Confirm Delete</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
@@ -0,0 +1,25 @@
|
||||
import * as ng from 'angular2/angular2';
|
||||
import * as models from '../../../models/models';
|
||||
|
||||
@ng.Component({
|
||||
selector: 'album-delete-prompt'
|
||||
})
|
||||
@ng.View({
|
||||
templateUrl: './ng-app/components/admin/album-delete-prompt/album-delete-prompt.html',
|
||||
directives: [ng.NgIf]
|
||||
})
|
||||
export class AlbumDeletePrompt {
|
||||
private modalElement: any;
|
||||
public album: models.Album;
|
||||
|
||||
constructor(@ng.Inject(ng.ElementRef) elementRef: ng.ElementRef) {
|
||||
if (typeof window !== 'undefined') {
|
||||
this.modalElement = (<any>window).jQuery(".modal", elementRef.nativeElement);
|
||||
}
|
||||
}
|
||||
|
||||
public show(album: models.Album) {
|
||||
this.album = album;
|
||||
this.modalElement.modal();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user