Save image
This commit is contained in:
@@ -6,4 +6,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fm-edit-image-modal #modal></fm-edit-image-modal>
|
||||
<fm-edit-image-modal #modal (changed)="onChanged()"></fm-edit-image-modal>
|
||||
|
@@ -4,6 +4,7 @@ import { Store } from '@ngrx/store';
|
||||
import { IListItem } from '../../models/list.item';
|
||||
import { commonReducers,ItemTypeService } from '../../../public-api'
|
||||
import { EditImageModalComponent} from '../edit-image-modal/edit-image-modal.component';
|
||||
import { AppConfig } from "../../shared/app.config";
|
||||
|
||||
@Component({
|
||||
selector: 'fm-thumbnail',
|
||||
@@ -18,11 +19,11 @@ import { EditImageModalComponent} from '../edit-image-modal/edit-image-modal.com
|
||||
@ViewChild('thumbnail') el:ElementRef;
|
||||
@ViewChild('modal') modal:EditImageModalComponent;
|
||||
|
||||
constructor(public store: Store<commonReducers.State>, public itemTypeService: ItemTypeService) {
|
||||
constructor(public store: Store<commonReducers.State>, public itemTypeService: ItemTypeService,public appConfig: AppConfig,) {
|
||||
}
|
||||
|
||||
getThumbnailUrl(item:IListItem):string {
|
||||
return item.url+'/thumbnail?v=' + Date.parse(item.updated);
|
||||
return this.appConfig.getConfig("apiEndPoint")+item.url+'/thumbnail?v=' + Date.parse(item.updated);
|
||||
}
|
||||
|
||||
getFontSize():string {
|
||||
@@ -47,6 +48,11 @@ import { EditImageModalComponent} from '../edit-image-modal/edit-image-modal.com
|
||||
}
|
||||
|
||||
onEditClick() {
|
||||
this.modal.open(this.item.url+"/thumbnail",4/3);
|
||||
var endpoint = `${this.appConfig.getConfig("apiEndPoint")}/api/v1/items/${this.item.code}/thumbnail`;
|
||||
this.modal.open(endpoint,4/3);
|
||||
}
|
||||
|
||||
onChanged() {
|
||||
console.log("changed");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user