Skip to content

Commit

Permalink
fix the empty author and copyright values
Browse files Browse the repository at this point in the history
  • Loading branch information
HamoudaAmine committed Jan 18, 2019
1 parent bd478d3 commit 87a3400
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
12 changes: 9 additions & 3 deletions front-backOffice/src/app/add-photo/add-photo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export class AddPhotoComponent implements OnInit {
datePickerConfig: NgbDatepickerConfig,
private authService: AuthService,
) {
datePickerConfig.minDate = {year: 1800, month: 1, day: 1};
datePickerConfig.maxDate = {year: 2200, month: 12, day: 31};
datePickerConfig.minDate = { year: 1800, month: 1, day: 1 };
datePickerConfig.maxDate = { year: 2200, month: 12, day: 31 };
datePickerConfig.outsideDays = 'hidden';
}

Expand Down Expand Up @@ -130,7 +130,7 @@ export class AddPhotoComponent implements OnInit {
'display_gal_photo': this.inputImage.display_gal_photo,
'id_licence_photo': id_licence_photo,
'date_photo': this.inputImage.date_photo,
// 'legende_photo': this.inputImage.legende_photo,
// 'legende_photo': this.inputImage.legende_photo,
'filter_date': filter_date_format,
'photo_file': this.inputImage.photo_file,
'main_photo': this.inputImage.main_photo,
Expand Down Expand Up @@ -165,6 +165,12 @@ export class AddPhotoComponent implements OnInit {

submitPhoto(photoForm: any) {
this.alert = null;
if (!photoForm.value.id_role) {
photoForm.value.id_role = null;
}
if (!photoForm.value.id_licence_photo) {
photoForm.value.id_licence_photo = null;
}
if (photoForm.valid && this.imageName) {
photoForm.value.filter_date = photoForm.value.filter_date.year + '-' + photoForm.value.filter_date.month + '-' +
photoForm.value.filter_date.day;
Expand Down
15 changes: 15 additions & 0 deletions front-backOffice/src/app/add-site/add-site.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,21 @@ export class AddSiteComponent implements OnInit, OnDestroy {
this.router.navigate(['/sites/details/', id_site]);
}
);
} else {
this.siteForm.disable();
this.edit_btn = false;
this.toastr.success(this.toast_msg, '', { positionClass: 'toast-bottom-right' });
// ###### can reload the same route #######
this.router.routeReuseStrategy.shouldReuseRoute = function () {
return false;
};
this.mySubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationEnd) {
this.router.navigated = false;
}
});
// ##########
this.router.navigate(['/sites/details/', id_site]);
}
}
addThemes(id_site, themes, sthemes, new_site) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ManageSitesComponent implements OnInit, OnDestroy {
onMapReady(map: Map) {
L.control.scale().addTo(map);
const street = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
const ignLayer = L.tileLayer(this.layerUrl(
const ignLayer = L.tileLayer(this.layerUrl(
Conf.ign_Key, 'GEOGRAPHICALGRIDSYSTEMS.MAPS'
));
const baseLayers = {
Expand Down Expand Up @@ -117,8 +117,10 @@ export class ManageSitesComponent implements OnInit, OnDestroy {
}

onCenterChange(event) {
setTimeout(() => {
event.row.marker.openPopup();
}, 200);
this.center = event.row.geom;
event.row.marker.openPopup();
this.changeDetector.detectChanges();
}

Expand Down
2 changes: 1 addition & 1 deletion front-backOffice/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>GeopaysageBackOffice</title>
<base href="/">
<base href="./">

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
Expand Down

0 comments on commit 87a3400

Please sign in to comment.