[trunk]: Admin (Connect): Remove unnecessary logs

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@54788 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2019-02-14 12:20:00 +00:00
parent 8f99949213
commit d9e24bacc1
38 changed files with 62 additions and 338 deletions

View File

@ -40,7 +40,6 @@ export class DashboardComponent {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -73,7 +73,6 @@ export class CommunitiesComponent implements OnInit {
getCommunities() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -102,7 +101,6 @@ export class CommunitiesComponent implements OnInit {
}
public applyCheck(flag : boolean) {
console.info("applyCheck "+flag);
this.checkboxes.forEach(_ => _.checked = flag);
}
@ -133,7 +131,6 @@ export class CommunitiesComponent implements OnInit {
private confirmModalOpen() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.alertModalDeleteCommunities.cancelButton = true;
@ -147,7 +144,6 @@ export class CommunitiesComponent implements OnInit {
public confirmedDeleteCommunities(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -179,7 +175,6 @@ export class CommunitiesComponent implements OnInit {
private communitiesModalOpen(modal: any, title: string, yesBtn: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
modal.cancelButton = true;
@ -192,7 +187,6 @@ export class CommunitiesComponent implements OnInit {
public communitySaveConfirmed(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(!this.formGroup.valid) {
@ -212,7 +206,6 @@ export class CommunitiesComponent implements OnInit {
public communityUpdateConfirmed(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(!this.formGroup.valid) {
@ -231,7 +224,6 @@ export class CommunitiesComponent implements OnInit {
public communitySavedSuccessfully(community: Community) {
this.checkboxes.push(<CheckCommunity>{community : community, checked : false});
console.info("checkboxes length: "+this.checkboxes.length);
this.applyCheck(false);
}
@ -276,7 +268,6 @@ export class CommunitiesComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -77,7 +77,6 @@ export class CommunityEditFormComponent implements OnInit{
this.emailToInform = {body: "", subject: "", recipients: []};
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if (this.communityId != null && this.communityId != '') {
@ -90,8 +89,6 @@ export class CommunityEditFormComponent implements OnInit{
this.community = community;
this.params = {community: encodeURIComponent('"'+community.queryId+'"')};
this.firstVersionOfManagers = community.managers.slice();
console.log("First version of managers " + this.firstVersionOfManagers);
console.log(community);
this.showLoading = false;
},
error => this.handleError('System error retrieving community profile', error)
@ -103,7 +100,6 @@ export class CommunityEditFormComponent implements OnInit{
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}
@ -127,7 +123,6 @@ export class CommunityEditFormComponent implements OnInit{
public resetForm(communityId: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if (communityId != null && communityId != '') {
@ -151,16 +146,12 @@ export class CommunityEditFormComponent implements OnInit{
public updateCommunity() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if (this.communityId != null && this.communityId != '') {
this.showLoading = true;
var community = this.parseUpdatedCommunity();
// TODO delete after testing
console.log(community);
if (!Validator.hasValidEmails(community['managers']) || !this.hasFilled(community["name"])) {
this._router.navigate(['/community-edit-form'], {queryParams: { "communityId": this.communityId}});
} else {
@ -168,22 +159,18 @@ export class CommunityEditFormComponent implements OnInit{
this._communityService.updateCommunity(this.properties.communityAPI+this.communityId, community).subscribe(
community => {
// TODO delete after testing
console.log("New managers in component: " + newManagers);
if (newManagers !== null) {
this.sendMailToNewManagers(newManagers);
console.log("Old managers in component: " + this.firstVersionOfManagers);
this.informOldManagersForTheNewOnes(this.firstVersionOfManagers);
for (let i = 0; i < newManagers.length; i++) {
console.log(newManagers[i]);
this._subscribeService.subscribeToCommunity(this.communityId, newManagers[i], this.properties.adminToolsAPIURL).subscribe(
res => {
console.log(res);
//console.log(res);
}
);
this._subscribeService.getCommunitySubscribers(this.communityId, this.properties.adminToolsAPIURL).subscribe(
res => {
console.log(res);
//console.log(res);
}
);
}
@ -230,7 +217,6 @@ export class CommunityEditFormComponent implements OnInit{
newManagers.push(this.community['managers'][i]);
}
}
console.log("New managers are: " + newManagers);
return newManagers;
}
@ -238,7 +224,7 @@ export class CommunityEditFormComponent implements OnInit{
this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/sendMail/",
Composer.composeEmailForNewManager(this.communityId, this.community.title, managers)).subscribe(
res => {
console.log("The email has been sent successfully!")
//console.log("The email has been sent successfully!")
},
error => console.log(error)
);
@ -250,7 +236,7 @@ export class CommunityEditFormComponent implements OnInit{
this.firstVersionOfManagers,
this.community.managers)).subscribe(
res => {
console.log("The email has been sent successfully!")
//console.log("The email has been sent successfully!")
},
error => console.log(error)
);
@ -279,12 +265,8 @@ export class CommunityEditFormComponent implements OnInit{
private hasFilled(data: any): boolean {
if (this.isNonEmpty(data) && !this.isEmpty(data)) {
// TODO remove console message after final testing
console.log("NAME IS NOT EMPTY");
return true;
}
// TODO remove console message after final testing
console.log("NAME IS EMPTY");
return false;
}
@ -306,14 +288,10 @@ export class CommunityEditFormComponent implements OnInit{
this.hasChanged = true;
this.successfulSaveMessage = '';
this.successfulResetMessage = '';
// TODO remove after testing
console.log('I have changed: I AM TRUE');
}
private resetChange() {
this.hasChanged = false;
// TODO remove after testing
console.log('I have changed: I AM FALSE');
}
public get form() {

View File

@ -83,44 +83,34 @@ export class AddContentProvidersComponent implements OnInit {
public addContentProvider(contenProvider: SearchResult) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("Add: "+ contenProvider.id);
this.subAdd = this._manageCommunityContentProvidersService.addContentProvider(this.properties, this.community, contenProvider).subscribe(
data => {
console.info("data ADD");
console.info(data);
this.undo[contenProvider.id] = data.id;
},
err => {
console.info("error ADD");
console.log(err.status);
},
}/*,
() => {
console.info("completed ADD");
}
)
}*/
);
}
}
public removeContentProvider(contentProviderId: string, communityContentProviderId: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("REMOVE: "+ contentProviderId);
this.subRemove = this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community, contentProviderId).subscribe(
data => {
console.info("data REMOVE");
console.info(data);
//console.info(data);
},
err => {
console.info("error REMOVE");
console.log(err);
},
() => {
console.info("completed REMOVE");
this.undo[communityContentProviderId] = "";
}
)
@ -142,10 +132,8 @@ export class AddContentProvidersComponent implements OnInit {
private _getOpenaireContentProviders(parameters:string, page: number, size: number){
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("_getOpenaireContentProviders");
if(page > this.pagingLimit) {
size=0;
}
@ -160,7 +148,6 @@ export class AddContentProvidersComponent implements OnInit {
this.subResults = this._searchContentProvidersService.searchDataproviders(parameters, null, page, size, [], this.properties).subscribe(
data => {
this.undo = {};
console.info("total openaire content providers = "+data[0]);
this.openaireSearchUtils.totalResults = data[0];
this.openaireContentProviders = data[1];

View File

@ -57,7 +57,6 @@ export class ManageContentProvidersComponent implements OnInit {
public updateCommunityContentProviders() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.scroll();
@ -69,12 +68,10 @@ export class ManageContentProvidersComponent implements OnInit {
this.removeContentProvidersComponent._getCommunityContentProviders();
this.addContentProvidersComponent.undo = {};
console.info("In remove");
} else {
this.updateCommunityContentProvidersOnToggle = false;
this.pageTitle = "Search content providers";
//this.toggleLinkMessage = "Manage content providers";
console.info("In add");
}
}
}
@ -84,7 +81,6 @@ export class ManageContentProvidersComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -128,7 +128,7 @@ export class RemoveContentProvidersComponent implements OnInit {
return false;
});
console.info("ngAfterViewInit");
//console.info("ngAfterViewInit");
}
filterData(row: any, query: string) {
@ -165,7 +165,7 @@ export class RemoveContentProvidersComponent implements OnInit {
*/
triggerInitialLoad(){
this.triggered = true;
console.info("triggerInitialLoad");
//console.info("triggerInitialLoad");
setTimeout(function(){
var table = (<any>$('#dpTable')).DataTable();
table.page( 0 ).draw( false );
@ -180,7 +180,6 @@ export class RemoveContentProvidersComponent implements OnInit {
table.page( page - 1 ).draw( false );
var info = table.page.info();
console.info("records: "+info.recordsDisplay);
this.communitySearchUtils.totalResults = info.recordsDisplay;
}
@ -194,21 +193,16 @@ export class RemoveContentProvidersComponent implements OnInit {
public confirmedDeleteContentProvider(data : any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("REMOVE: "+ this.selectedCommunityContentProvider.id);
this.subRemove = this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community, this.selectedCommunityContentProvider.id).subscribe(
data => {
console.info("data REMOVE");
console.info(data);
//console.info(data);
},
err => {
console.info("error REMOVE");
console.log(err);
},
() => {
console.info("completed REMOVE");
let index = this.communityContentProviders.indexOf(this.selectedCommunityContentProvider);
this.communityContentProviders.splice(index, 1);
@ -223,7 +217,6 @@ export class RemoveContentProvidersComponent implements OnInit {
public removeContentProvider(communityContentProvider: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.selectedCommunityContentProvider = communityContentProvider;
@ -255,10 +248,8 @@ export class RemoveContentProvidersComponent implements OnInit {
public _getCommunityContentProviders(){
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("_getCommunityContentProviders");
this.communitySearchUtils.status = this.errorCodes.LOADING;
this.disableForms = true;
this.communityContentProviders = [];
@ -268,8 +259,7 @@ export class RemoveContentProvidersComponent implements OnInit {
this.subResults = this._searchCommunityContentProvidersService.searchDataproviders(this.properties, this.community).subscribe(
data => {
console.info(data);
console.info("search Content Providers [total communityContentProviders:"+data.length+"]");
//console.info("search Content Providers [total communityContentProviders:"+data.length+"]");
this.communityContentProviders = data;
this.communitySearchUtils.totalResults = data.length;

View File

@ -94,44 +94,34 @@ export class AddProjectsComponent implements OnInit {
public addProject(project: SearchResult) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("Add: "+ project.id);
this.subAdd = this._manageCommunityProjectsService.addProject(this.properties, this.community, project).subscribe(
data => {
console.info("data ADD");
console.info(data);
this.undo[project.id] = data.id;
},
err => {
console.info("error ADD");
console.log(err.status);
},
}/*,
() => {
console.info("completed ADD");
}
)
}*/
);
}
}
public removeProject(projectId: string, communityProjectId: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("REMOVE: "+ projectId);
this.subRemove = this._manageCommunityProjectsService.removeProject(this.properties, this.community, projectId).subscribe(
data => {
console.info("data REMOVE");
console.info(data);
//console.info(data);
},
err => {
console.info("error REMOVE");
console.log(err);
},
() => {
console.info("completed REMOVE");
this.undo[communityProjectId] = "";
}
)
@ -148,20 +138,15 @@ export class AddProjectsComponent implements OnInit {
}
if(this.undo[project.id]) {
console.info("true: "+ this.undo[project.id])
return true;
} else {
console.info("false: "+ this.undo[project.id])
}
return false;
}
getFunders () {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("Getting Funders....");
this.subFunders = this._searchProjectsService.getFunders(this.properties).subscribe(
data => {
this.funders = data[1];
@ -173,10 +158,8 @@ export class AddProjectsComponent implements OnInit {
private _getOpenaireProjects(parameters:string, page: number, size: number){
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("_getOpenaireProjects");
if(page > this.pagingLimit) {
size=0;
}
@ -191,7 +174,7 @@ export class AddProjectsComponent implements OnInit {
this.subResults = this._searchProjectsService.searchProjects(parameters, null, page, size, [], this.properties).subscribe(
data => {
this.undo = {};
console.info("total openaire projects = "+data[0]);
//console.info("total openaire projects = "+data[0]);
this.openaireSearchUtils.totalResults = data[0];
this.openaireProjects = data[1];

View File

@ -57,7 +57,6 @@ export class ManageProjectsComponent implements OnInit {
public updateCommunityProjects() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.scroll();
@ -84,7 +83,6 @@ export class ManageProjectsComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -136,7 +136,7 @@ export class RemoveProjectsComponent implements OnInit {
return false;
});
console.info("ngAfterViewInit");
//console.info("ngAfterViewInit");
}
filterData(row: any, query: string, selectedFunder: string) {
@ -177,7 +177,7 @@ export class RemoveProjectsComponent implements OnInit {
*/
triggerInitialLoad(){
this.triggered = true;
console.info("triggerInitialLoad");
//console.info("triggerInitialLoad");
setTimeout(function(){
var table = (<any>$('#dpTable')).DataTable();
table.page( 0 ).draw( false );
@ -205,7 +205,6 @@ export class RemoveProjectsComponent implements OnInit {
table.page( page - 1 ).draw( false );
var info = table.page.info();
console.info("records: "+info.recordsDisplay);
this.communitySearchUtils.totalResults = info.recordsDisplay;
}
@ -219,21 +218,16 @@ export class RemoveProjectsComponent implements OnInit {
public confirmedDeleteProject(data : any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("REMOVE: "+ this.selectedCommunityProject.id);
this.subRemove = this._manageCommunityProjectsService.removeProject(this.properties, this.community, this.selectedCommunityProject.id).subscribe(
data => {
console.info("data REMOVE");
console.info(data);
//console.info(data);
},
err => {
console.info("error REMOVE");
console.log(err);
},
() => {
console.info("completed REMOVE");
let index = this.communityProjects.indexOf(this.selectedCommunityProject);
this.communityProjects.splice(index, 1);
@ -248,7 +242,6 @@ export class RemoveProjectsComponent implements OnInit {
public removeProject(communityProject: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.selectedCommunityProject = communityProject;
@ -280,7 +273,6 @@ export class RemoveProjectsComponent implements OnInit {
public _getCommunityProjects(){
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.communitySearchUtils.status = this.errorCodes.LOADING;
@ -293,8 +285,7 @@ export class RemoveProjectsComponent implements OnInit {
this.subResults = this._searchCommunityProjectsService.searchProjects(this.properties, this.community).subscribe(
data => {
console.info(data);
console.info("search Projects [total communityProjects:"+data.length+"]");
//console.info("search Projects [total communityProjects:"+data.length+"]");
this.communityProjects = data;
this.communitySearchUtils.totalResults = data.length;
@ -353,7 +344,6 @@ export class RemoveProjectsComponent implements OnInit {
this.funders.add(funder);
}
}
console.info(this.funders);
return this.funders;
}
}

View File

@ -48,7 +48,6 @@ export class DivIdFormComponent implements OnInit{
getPages(includedPages: Set<String>) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -73,7 +72,6 @@ export class DivIdFormComponent implements OnInit{
public toggle() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.myForm.value.isCollapsed = !this.myForm.value.isCollapsed;
@ -163,7 +161,6 @@ export class DivIdFormComponent implements OnInit{
}*/
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
let index: number = -1;

View File

@ -73,7 +73,6 @@ export class DivIdsComponent implements OnInit {
getDivIds() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -105,7 +104,6 @@ export class DivIdsComponent implements OnInit {
}
public applyCheck(flag : boolean) {
console.info("applyCheck "+flag);
this.checkboxes.forEach(_ => _.checked = flag);
}
@ -136,7 +134,6 @@ export class DivIdsComponent implements OnInit {
private confirmModalOpen() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.alertModalDeleteDivIds.cancelButton = true;
@ -150,7 +147,6 @@ export class DivIdsComponent implements OnInit {
public confirmedDeleteDivIds(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -192,7 +188,6 @@ export class DivIdsComponent implements OnInit {
private divIdsModalOpen(modal: any, title: string, yesBtn: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
modal.cancelButton = true;
@ -205,7 +200,6 @@ export class DivIdsComponent implements OnInit {
public divIdSaveConfirmed(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(!this.formGroup.valid) {
@ -225,7 +219,6 @@ export class DivIdsComponent implements OnInit {
public divIdUpdateConfirmed(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(!this.formGroup.valid) {
@ -244,7 +237,6 @@ export class DivIdsComponent implements OnInit {
public divIdSavedSuccessfully(divId: DivId) {
this.checkboxes.push(<CheckDivId>{divId : divId, checked : false});
console.info("checkboxes length: "+this.checkboxes.length);
this.applyCheck(false);
}
@ -289,7 +281,6 @@ export class DivIdsComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -53,7 +53,6 @@ export class DivContentFormComponent implements OnInit{
this.route.queryParams.subscribe(params => {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(this.pageId) {
@ -79,7 +78,6 @@ export class DivContentFormComponent implements OnInit{
public pageSelected(event) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.getDivs(event.target.value);
@ -92,7 +90,6 @@ export class DivContentFormComponent implements OnInit{
public getCommunity(communityPid: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -114,7 +111,6 @@ export class DivContentFormComponent implements OnInit{
public getDivs(pageId: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;

View File

@ -81,7 +81,6 @@ export class DivHelpContentsComponent implements OnInit {
getPage(pageId: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -99,7 +98,6 @@ export class DivHelpContentsComponent implements OnInit {
getPages(community_pid: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -130,7 +128,6 @@ export class DivHelpContentsComponent implements OnInit {
getDivHelpContents(community_pid: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this._helpService.getCommunityDivHelpContents(community_pid, this.properties.adminToolsAPIURL).subscribe(
@ -190,7 +187,6 @@ export class DivHelpContentsComponent implements OnInit {
private confirmModalOpen() {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.alertModalDeleteDivHelpContents.cancelButton = true;
@ -204,7 +200,6 @@ export class DivHelpContentsComponent implements OnInit {
public confirmedDeleteDivHelpContents(data: any) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -241,7 +236,6 @@ export class DivHelpContentsComponent implements OnInit {
public toggleDivHelpContents(status : boolean, ids : string[]) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -346,7 +340,6 @@ export class DivHelpContentsComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -72,7 +72,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
private getDivHelpContent(divContentId: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -90,7 +89,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
getDivId(divId: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -120,7 +118,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
private saveCustom() {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
if(this.formComponent.myForm.valid) {
@ -128,7 +125,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
this.updateErrorMessage = "";
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
console.info(divHelpContent);
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL).subscribe(
_ => {
@ -159,7 +155,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -50,7 +50,6 @@ export class NewDivHelpContentComponent {
private saveCustom() {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
if(this.formComponent.myForm.valid) {
@ -58,7 +57,6 @@ export class NewDivHelpContentComponent {
this.updateErrorMessage = "";
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
console.info(divHelpContent);
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL).subscribe(
_ => {
@ -92,7 +90,6 @@ export class NewDivHelpContentComponent {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -75,7 +75,6 @@ export class EntitiesComponent implements OnInit {
constructor(private element: ElementRef, private route: ActivatedRoute, private _router: Router, private _helpContentService: HelpContentService) {}
getEntities(community_pid: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -107,7 +106,6 @@ export class EntitiesComponent implements OnInit {
}
public applyCheck(flag : boolean) {
console.info("applyCheck "+flag);
this.checkboxes.forEach(_ => _.checked = flag);
}
@ -138,7 +136,6 @@ export class EntitiesComponent implements OnInit {
private confirmDeleteEntitiesModalOpen() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.alertModalDeleteEntities.cancelButton = true;
@ -152,7 +149,6 @@ export class EntitiesComponent implements OnInit {
public confirmedDeleteEntities(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -184,7 +180,6 @@ export class EntitiesComponent implements OnInit {
private entitiesModalOpen(modal: any, title: string, yesBtn: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
modal.cancelButton = true;
@ -197,7 +192,6 @@ export class EntitiesComponent implements OnInit {
public entitySaveConfirmed(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(!this.formGroup.valid) {
@ -217,7 +211,6 @@ export class EntitiesComponent implements OnInit {
public entityUpdateConfirmed(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(!this.formGroup.valid) {
@ -292,7 +285,6 @@ export class EntitiesComponent implements OnInit {
private confirmRelatedPagesModalOpen() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.alertModalRelatedPages.cancelButton = true;
@ -306,7 +298,6 @@ export class EntitiesComponent implements OnInit {
public continueToggling(event: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -327,7 +318,6 @@ export class EntitiesComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -143,7 +143,6 @@ export class QuestionsComponent implements OnInit {
topics.push(topic._id)
}
question.topics = topics;
console.log(question);
this.formGroup.patchValue(question);
this.updateModal.showModal();
}
@ -163,7 +162,6 @@ export class QuestionsComponent implements OnInit {
}
public saveQuestion(data : any):void {
console.log(data);
this._faqService.saveQuestion(data).subscribe(
question => this.questionSavedSuccessfully(question),
error => this.handleError(<any>error)

View File

@ -76,7 +76,6 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
private getPageHelpContent(pageContentId: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -94,14 +93,12 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
private updateForm(pageHelpContent : PageHelpContent) {
this.pageHelpContent = pageHelpContent;
console.info(pageHelpContent);
this.formComponent.myForm.patchValue((pageHelpContent));
// console.log("patching",pageHelpContent);
}
private saveCustom() {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
if(this.formComponent.myForm.valid) {
@ -109,7 +106,6 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
this.updateErrorMessage = "";
let pageHelpContent : PageHelpContent = this.formComponent.myForm.value;
console.info(pageHelpContent.community);
this._helpContentService.updatePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL).subscribe(
_ => {
if(this.pageId) {
@ -139,7 +135,6 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -53,7 +53,6 @@ export class NewPageHelpContentComponent {
private saveCustom() {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
//this.errorMessage = null;
@ -97,7 +96,6 @@ export class NewPageHelpContentComponent {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -41,7 +41,6 @@ export class PageContentFormComponent implements OnInit{
this.properties = data.envSpecific;
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this._helpContentService.getPages(this.properties.adminToolsAPIURL, this.communityPid).subscribe(

View File

@ -94,7 +94,6 @@ export class PageHelpContentsComponent implements OnInit {
getPage(pageId: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -112,7 +111,6 @@ export class PageHelpContentsComponent implements OnInit {
getPages(community_pid: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -143,7 +141,6 @@ export class PageHelpContentsComponent implements OnInit {
getPageHelpContents(community_pid: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this._helpService.getCommunityPageHelpContents(community_pid, this.properties.adminToolsAPIURL).subscribe(
@ -204,7 +201,6 @@ export class PageHelpContentsComponent implements OnInit {
private confirmModalOpen() {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.alertModalDeletePageHelpContents.cancelButton = true;
@ -218,7 +214,6 @@ export class PageHelpContentsComponent implements OnInit {
public confirmedDeletePageHelpContents(data: any) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -255,7 +250,6 @@ export class PageHelpContentsComponent implements OnInit {
public togglePageHelpContents(status : boolean, ids : string[]) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -265,7 +259,6 @@ export class PageHelpContentsComponent implements OnInit {
() => {
for(let id of ids) {
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
console.info(i);
this.checkboxes[i].pageHelpContent.isActive=status;
}
this.countPageHelpContents();
@ -357,7 +350,6 @@ export class PageHelpContentsComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -82,7 +82,6 @@ export class EditHtmlPageContentComponent implements OnInit {
private getPage(communityId: string, pageId: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this._helpContentService.getPage(pageId, this.properties.adminToolsAPIURL).subscribe(
@ -96,7 +95,6 @@ export class EditHtmlPageContentComponent implements OnInit {
private getHtmlPageContent(communityId: string, pageRoute: string) {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
@ -121,7 +119,6 @@ export class EditHtmlPageContentComponent implements OnInit {
private saveCustom() {
if(!Session.isLoggedIn()){
console.info(this.router.url);
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.formComponent.myForm.value.content = this.formComponent.myeditor.instance.getData();
@ -131,7 +128,6 @@ export class EditHtmlPageContentComponent implements OnInit {
//this.mode = "";
let htmlPageContent : HtmlPageContent = this.formComponent.myForm.value;
console.info(htmlPageContent.community);
this._htmlContentService.updateHtmlPageContent(htmlPageContent, this.properties.adminToolsAPIURL).subscribe(
_ => {
//this.mode = "preview";
@ -165,7 +161,6 @@ export class EditHtmlPageContentComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -92,14 +92,12 @@ export class ModalFormComponent {
data => this.emmitObject.emit(data),
error => this.emmitError.emit(error)
);
console.info(<Community> obj);
} else if(this.saveText == 'Save') {
this._helpService.saveCommunity(<Community> obj, this.properties.adminToolsAPIURL).subscribe(
data => this.emmitObject.emit(data),
error => this.emmitError.emit(error)
);
console.info(<Community> obj);
}
} else if (this.type == 'page') {
if(this.saveText == 'Update') {

View File

@ -43,7 +43,6 @@ export class PageFormComponent implements OnInit{
public toggle() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.myForm.value.isCollapsed = !this.myForm.value.isCollapsed;
@ -76,7 +75,6 @@ export class PageFormComponent implements OnInit{
public getEntities(includedEntities: Set<String>) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -142,7 +140,6 @@ export class PageFormComponent implements OnInit{
public toggleEntity(status : boolean, id : string, entity: Entity) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
let index: number = -1;

View File

@ -93,7 +93,6 @@ export class PagesComponent implements OnInit {
getPages(community_pid: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -122,7 +121,6 @@ export class PagesComponent implements OnInit {
getPagesWithDivIds(community_pid: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this._helpContentService.getPagesWithDivIds(community_pid, this.properties.adminToolsAPIURL).subscribe(
@ -165,7 +163,6 @@ export class PagesComponent implements OnInit {
}
public applyCheck(flag : boolean) {
console.info("applyCheck "+flag);
this.checkboxes.forEach(_ => _.checked = flag);
}
@ -196,7 +193,6 @@ export class PagesComponent implements OnInit {
private confirmModalOpen() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.alertModalDeletePages.cancelButton = true;
@ -210,7 +206,6 @@ export class PagesComponent implements OnInit {
public confirmedDeletePages(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -231,7 +226,7 @@ export class PagesComponent implements OnInit {
this.formGroup.patchValue(page);
this.formComponent.setEntities(page.entities as Entity[]);
console.info(this.formGroup.value);
//console.info(this.formGroup.value);
//this.updateModal.showModal();
this.modalErrorMessage = "";
this.pagesModalOpen(this.alertModalUpdatePage, "Update", "Update Page");
@ -245,7 +240,6 @@ export class PagesComponent implements OnInit {
private pagesModalOpen(modal: any, title: string, yesBtn: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
modal.cancelButton = true;
@ -258,7 +252,6 @@ export class PagesComponent implements OnInit {
public pageSaveConfirmed(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(!this.formGroup.valid) {
@ -278,7 +271,6 @@ export class PagesComponent implements OnInit {
public pageUpdateConfirmed(data: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if(!this.formGroup.valid) {
@ -297,14 +289,10 @@ export class PagesComponent implements OnInit {
public pageSavedSuccessfully(page: Page) {
this.checkboxes.push(<CheckPage>{page : page, checked : false});
console.info("checkboxes length: "+this.checkboxes.length);
this.applyCheck(false);
}
public pageUpdatedSuccessfully(page : Page) {
console.info(page._id);
console.info(this.checkboxes.find(checkItem => (checkItem.page._id == page._id)));
console.info(page.entities);
this.checkboxes.find(checkItem => checkItem.page._id==page._id).page = page;
this.applyCheck(false);
}
@ -359,7 +347,6 @@ export class PagesComponent implements OnInit {
public togglePages(status : boolean, ids : string[]) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -384,7 +371,6 @@ export class PagesComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -72,7 +72,6 @@ export class StatsComponent implements OnInit {
getStatistics() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
// this.loadingMessage = 'Retrieving statistics';
@ -98,7 +97,6 @@ export class StatsComponent implements OnInit {
this.handleError('Failed to retrieve statistics for the chosen community!', error);
},
() => {
console.log(`I have statistics!`);
//this.loadingMessage = '';
this.getDisplayOptions();
}
@ -108,7 +106,6 @@ export class StatsComponent implements OnInit {
getDisplayOptions() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.contentService.getCommunityAdminStatisticsChoices(this.properties.adminToolsAPIURL, this.communityId)
@ -129,10 +126,9 @@ export class StatsComponent implements OnInit {
getCommunityInfo() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`);
//console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`);
this.configService.getCommunityInformation(this.properties.adminToolsAPIURL, this.communityId).subscribe(
res => {
this.communityInfo = res;
@ -149,21 +145,15 @@ export class StatsComponent implements OnInit {
onChangeEntity (entity: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
this.deactivatedEntity = false;
this.displayedEntity = entity;
console.log(`displayed entity is ${entity}`);
console.log(`statisticsSum[${entity}].total is ${this.statisticsSum[entity].total}`);
console.log(`found ${entity} in allowedEntities`);
this.displayedTimeline = `${entity}Timeline`;
console.log(`displayed Timeline is: ${this.displayedTimeline}`);
this.displayedGraph = `${entity}Graph`;
console.log(`displayed Graph is: ${this.displayedGraph}`);
this.changeDisplayedProjectChart(`${entity}Projectcolumn`);
if (this.statisticsDisplay.entities[entity].charts.map['projectColumn'].showInMonitor &&
this.statisticsDisplay.entities[entity].charts.map['projectPie'].showInMonitor &&
@ -187,7 +177,6 @@ export class StatsComponent implements OnInit {
changeDisplayedProjectChart(chartName: string) {
this.displayedProjectChart = chartName;
console.log(`displayed ProjectChart is: ${this.displayedProjectChart}`);
}
createChartUrlMap() {
@ -218,7 +207,6 @@ export class StatsComponent implements OnInit {
toggleShowAllInMonitor(entity: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -234,9 +222,9 @@ export class StatsComponent implements OnInit {
'projectColumn',
this.showAllInMonitor,
true).subscribe(
response => console.log(JSON.stringify(response)),
response => {},//console.log(JSON.stringify(response)),
error => {
console.log(error);
//console.log(error);
//this.loadingMessage = '';
//this.errorMessage = 'The changes could not be saved';
@ -252,9 +240,9 @@ export class StatsComponent implements OnInit {
'projectPie',
this.showAllInMonitor,
true).subscribe(
response => console.log(JSON.stringify(response)),
response => {},//console.log(JSON.stringify(response)),
error => {
console.log(error);
//console.log(error);
//this.loadingMessage = '';
//this.errorMessage = 'The changes could not be saved';
@ -270,9 +258,9 @@ export class StatsComponent implements OnInit {
'projectTable',
this.showAllInMonitor,
true).subscribe(
response => console.log(JSON.stringify(response)),
response => {},//console.log(JSON.stringify(response)),
error => {
console.log(error);
//console.log(error);
//this.loadingMessage = '';
//this.errorMessage = 'The changes could not be saved';
@ -339,7 +327,6 @@ export class StatsComponent implements OnInit {
toggleShowAllInDashboard(entity: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -354,9 +341,9 @@ export class StatsComponent implements OnInit {
'projectColumn',
!this.showAllInDashboard,
false).subscribe(
response => console.log(JSON.stringify(response)),
response => {},//console.log(JSON.stringify(response)),
error => {
console.log(error);
//console.log(error);
//this.loadingMessage = '';
//this.errorMessage = 'The changes could not be saved';
this.handleUpdateError('The changed could not be saved', error);
@ -371,9 +358,9 @@ export class StatsComponent implements OnInit {
'projectPie',
!this.showAllInDashboard,
false).subscribe(
response => console.log(JSON.stringify(response)),
response => {},//console.log(JSON.stringify(response)),
error => {
console.log(error);
//console.log(error);
//this.loadingMessage = '';
//this.errorMessage = 'The changes could not be saved';
this.handleUpdateError('The changes could not be saved', error);
@ -388,9 +375,9 @@ export class StatsComponent implements OnInit {
'projectTable',
!this.showAllInDashboard,
false).subscribe(
response => console.log(JSON.stringify(response)),
response => {},//console.log(JSON.stringify(response)),
error => {
console.log(error);
//console.log(error);
//this.loadingMessage = '';
//this.errorMessage = 'The changes could not be saved';
this.handleUpdateError('The changes could not be saved', error);
@ -415,7 +402,6 @@ export class StatsComponent implements OnInit {
toggleShowInMonitor(entity: string, chartsOrNumbers: string, title: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -429,7 +415,7 @@ export class StatsComponent implements OnInit {
title,
!this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor,
true).subscribe(
response => console.log(JSON.stringify(response)),
response => {},//console.log(JSON.stringify(response)),
error => this.handleUpdateError('The changes could not be saved', error),//console.log(error),
() => {
this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor = !this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor;
@ -441,7 +427,6 @@ export class StatsComponent implements OnInit {
toggleShowInDashboard(entity: string, chartsOrNumbers: string, title: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.showLoading = true;
@ -455,7 +440,7 @@ export class StatsComponent implements OnInit {
title,
!this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard,
false).subscribe(
response => console.log(JSON.stringify(response)),
response => {},//console.log(JSON.stringify(response)),
error => this.handleUpdateError('The changes could not be saved', error),//console.log(error),
() => {
this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard = !this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard;
@ -485,7 +470,6 @@ export class StatsComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -64,7 +64,6 @@ export class SubjectsEditFormComponent implements OnInit{
this.communityId = communityId['communityId'];
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if (this.communityId != null && this.communityId != '') {
@ -97,7 +96,6 @@ export class SubjectsEditFormComponent implements OnInit{
public addSubject() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.community.subjects.push("");
@ -106,7 +104,6 @@ export class SubjectsEditFormComponent implements OnInit{
public removeSubject(i: any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.community.subjects.splice(i, 1);
@ -115,7 +112,6 @@ export class SubjectsEditFormComponent implements OnInit{
public resetForm(communityId: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if (communityId != null && communityId != '') {
@ -170,7 +166,6 @@ export class SubjectsEditFormComponent implements OnInit{
}
public updateSubjects() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if (this.communityId != null && this.communityId != '') {
@ -184,7 +179,6 @@ export class SubjectsEditFormComponent implements OnInit{
let obs = concat(this._subjectsService.addSubjects(this.properties.communityAPI + this.communityId + "/subjects", subjectsToAdd),
this._subjectsService.removeSubjects(this.properties.communityAPI + this.communityId + "/subjects", subjectsToDelete));
obs.subscribe(res => {
console.log(res);
if (res["method"] == "delete") {
this.afterUpdateActions(res);
}
@ -193,7 +187,6 @@ export class SubjectsEditFormComponent implements OnInit{
);
}else if (subjectsToAddAr.length > 0){
this._subjectsService.addSubjects(this.properties.communityAPI + this.communityId +"/subjects", subjectsToAdd).subscribe(res => {
console.log(res);
this.afterUpdateActions(res);
},
@ -201,7 +194,6 @@ export class SubjectsEditFormComponent implements OnInit{
);
}else if (subjectsToDeleteAr.length > 0) {
this._subjectsService.removeSubjects(this.properties.communityAPI + this.communityId + "/subjects", subjectsToDelete).subscribe(res => {
console.log(res);
this.afterUpdateActions(res);
},
@ -240,11 +232,9 @@ export class SubjectsEditFormComponent implements OnInit{
let j = 0;
for (let i = 0; i < length; i++) {
if (this.isEmpty(data[i])) {
// console.log(data[i]);
} else if (this.isNonEmpty(data[i])) {
arrayNonEmpty[j] = data[i];
j++;
// console.log(data[i]);
}
}
return arrayNonEmpty;
@ -252,12 +242,8 @@ export class SubjectsEditFormComponent implements OnInit{
private hasFilled(data: any): boolean {
if (this.isNonEmpty(data) && !this.isEmpty(data)) {
// TODO remove console message after final testing
console.log("NAME IS NOT EMPTY");
return true;
}
// TODO remove console message after final testing
console.log("NAME IS EMPTY");
return false;
}
@ -281,12 +267,12 @@ export class SubjectsEditFormComponent implements OnInit{
for (let i = 0; i < length; i++) {
if (!this.emailValidator(data['managers'][i])){
// TODO remove console message after final testing
console.log("INVALID EMAIL");
//console.log("INVALID EMAIL");
return false;
}
}
// TODO remove console message after final testing
console.log("ALL EMAILS ARE VALID");
//console.log("ALL EMAILS ARE VALID");
return true;
}
@ -301,14 +287,10 @@ export class SubjectsEditFormComponent implements OnInit{
this.hasChanged = true;
this.successfulSaveMessage = '';
this.successfulResetMessage = '';
// TODO remove after testing
console.log('I have changed: I AM TRUE');
}
private resetChange() {
this.hasChanged = false;
// TODO remove after testing
console.log('I have changed: I AM FALSE');
}
public get form() {
@ -354,7 +336,6 @@ export class SubjectsEditFormComponent implements OnInit{
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -15,10 +15,8 @@ export class SubjectsService {
let body = JSON.stringify(subjects);
console.log(body);
return this.http.post(url, body, options)
.do(request => console.log("Insert Response:"+request.status))
//.do(request => console.log("Insert Response:"+request.status))
.map(res => res.json())
.map(res => {
res["method"]="post";
@ -32,11 +30,8 @@ export class SubjectsService {
let body = JSON.stringify(subjects);
let options = new RequestOptions({headers: headers,body:body});
console.log(body);
return this.http.delete(url, options)
.do(request => console.log("Delete Response:"+request.status))
//.do(request => console.log("Delete Response:"+request.status))
.map(res => res.json())
.map(res => {
res["method"]="delete";

View File

@ -133,12 +133,11 @@ export class ManageSubscribersComponent implements OnInit {
return false;
});
console.info("ngAfterViewInit");
//console.info("ngAfterViewInit");
}
filterData(row: any, query: string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
let returnValue: boolean = false;
@ -173,7 +172,7 @@ export class ManageSubscribersComponent implements OnInit {
*/
triggerInitialLoad(){
this.triggered = true;
console.info("triggerInitialLoad");
//console.info("triggerInitialLoad");
setTimeout(function() {
var table = (<any>$('#dpTable')).DataTable();
table.page( 0 ).draw( false );
@ -183,7 +182,6 @@ export class ManageSubscribersComponent implements OnInit {
public goTo(page:number = 1) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.subscribersSearchUtils.page=page;
@ -192,7 +190,6 @@ export class ManageSubscribersComponent implements OnInit {
table.page( page - 1 ).draw( false );
var info = table.page.info();
console.info("records: "+info.recordsDisplay);
this.subscribersSearchUtils.totalResults = info.recordsDisplay;
}
}
@ -207,7 +204,6 @@ export class ManageSubscribersComponent implements OnInit {
public removeSubscriber(email:string) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.selectedSubscriberEmail = email;
@ -228,25 +224,16 @@ export class ManageSubscribersComponent implements OnInit {
public confirmedDeleteSubscriber() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("REMOVE: "+ this.selectedSubscriberEmail);
this.subRemove = this._subscribeService.unSubscribeToCommunity(this.communityId, this.selectedSubscriberEmail, this.properties.adminToolsAPIURL).subscribe(
result => {
console.log(result);
console.info("email REMOVE");
console.log(this.selectedSubscriberEmail);
this.communitySubscribers = result;
},
err => {
console.info("error REMOVE");
console.log(err);
},
() => {
console.info("completed REMOVE");
console.log(this.selectedSubscriberEmail);
console.log(this.communitySubscribers["subscribers"]);
this.subscribersSearchUtils.totalResults--;
this.subscribersSearchUtils.page=1;
@ -258,7 +245,6 @@ export class ManageSubscribersComponent implements OnInit {
public _getCommunitySubscribers(){
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.subscribersSearchUtils.status = this.errorCodes.LOADING;
@ -271,8 +257,7 @@ export class ManageSubscribersComponent implements OnInit {
this.subResults = this._subscribeService.getCommunitySubscribers(this.communityId, this.properties.adminToolsAPIURL).subscribe(
res => {
console.info(res);
console.info("search Subscribers [total communitySubscribers:"+res.subscribers.length+"]");
//console.info("search Subscribers [total communitySubscribers:"+res.subscribers.length+"]");
this.communitySubscribers = res;
this.subscribersSearchUtils.totalResults = res.subscribers.length;
@ -319,7 +304,6 @@ export class ManageSubscribersComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -73,15 +73,11 @@ export class ManageUserNotificationsComponent implements OnInit {
this.userNotifications = JSON.parse(JSON.stringify( this.initialUserNotifications ));
//TODO remove after final testing
console.log("Before: ", userNotifications);
console.log("After: ", this.initialUserNotifications);
this.showLoading = false;
},
error => {
console.log(error.status);
if (error.status == '404') {
this.initialUserNotifications = this.initiateUserNotifications();
console.log(this.initialUserNotifications);
this.userNotifications = JSON.parse(JSON.stringify( this.initialUserNotifications ));
} else {
this.handleError('System error retrieving user notifications', error)
@ -108,7 +104,6 @@ export class ManageUserNotificationsComponent implements OnInit {
public updateUserNotifications() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if (this.communityId != null && this.communityId != '') {
@ -117,7 +112,6 @@ export class ManageUserNotificationsComponent implements OnInit {
this.successfulSaveMessage = "";
this.showLoading = true;
var userNotifications = this.parseUpdatedUserNotifications();
console.log(userNotifications);
this._manageUserNotificationsService.updateUserNotifications(this.properties.adminToolsAPIURL + "community/" + this.communityId + "/notifications", userNotifications).subscribe(
userNotifications => {
@ -168,7 +162,6 @@ export class ManageUserNotificationsComponent implements OnInit {
*/
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.mailPrefs.restoreNotification(0);
@ -187,7 +180,6 @@ export class ManageUserNotificationsComponent implements OnInit {
public changeValueForNewManagers(notifyForManagers : any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.userNotifications.notifyForNewManagers = !notifyForManagers;
@ -197,7 +189,6 @@ export class ManageUserNotificationsComponent implements OnInit {
public changeValueForNewSubscribers(notifyForSubscribers : any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.userNotifications.notifyForNewSubscribers = !notifyForSubscribers;
@ -209,19 +200,14 @@ export class ManageUserNotificationsComponent implements OnInit {
this.hasChanged = true;
this.successfulSaveMessage = '';
this.successfulResetMessage = '';
// TODO remove after testing
console.log('I have changed: I AM TRUE');
}
private resetChange() {
this.hasChanged = false;
// TODO remove after testing
console.log('I have changed: I AM FALSE');
}
public mailPrefsChanged(): boolean {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
return this.mailPrefs.prefsChanged["0"];//(0);
@ -253,7 +239,6 @@ export class ManageUserNotificationsComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -22,10 +22,8 @@ export class ManageUserNotificationsService {
//let options = new RequestOptions({headers: headers});
let body = JSON.stringify(userNotificationsRights);
console.log(body);
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
.do(request => console.log("Insert Response:"+request.status));
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody());
//.do(request => console.log("Insert Response:"+request.status));
}
parseUserNotifications(data:any, email:string): UserNotificationsRights {

View File

@ -47,7 +47,6 @@ export class AddZenodoCommunitiesComponent implements OnInit {
ngOnInit() {
this.zenodoCommunitySearchUtils.keyword = "";
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
@ -78,7 +77,6 @@ export class AddZenodoCommunitiesComponent implements OnInit {
public goTo(page:number = 1) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.zenodoCommunitySearchUtils.page=page;
@ -118,32 +116,27 @@ export class AddZenodoCommunitiesComponent implements OnInit {
public addCommunity(community) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this._manageZenodoCommunitiesService.addZCommunity(this.properties, this.communityId, community.id ).subscribe(
data => {
console.info("data ADD");
console.info(data);
// this.undo[project.id] = data.id;
community["openaireId"]=data.id;
this.selectedCommunities.push(community);
this.newlySelectedCommunities.push(community)
},
err => {
console.info("error ADD");
console.log(err.status);
},
}/*,
() => {
console.info("completed ADD");
}
}*/
)
}
}
public removeCommunity( comm) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
var openaireId = this.getOpenaireId(comm);
@ -151,7 +144,6 @@ export class AddZenodoCommunitiesComponent implements OnInit {
data => {
var pos = -1;
for(var i=0; i< this.selectedCommunities.length;i++) {
console.info(this.selectedCommunities[i].id+ " "+ this.selectedCommunities[i].openaireId+" "+ comm.id);
if( this.selectedCommunities[i].id == comm.id) {
pos= i;
break;
@ -172,12 +164,11 @@ export class AddZenodoCommunitiesComponent implements OnInit {
},
err => {
console.info("error remove");
console.log(err.status);
},
}/*,
() => {
console.info("completed remove");
}
}*/
)
}
}

View File

@ -111,7 +111,7 @@ export class ManageZenodoCommunitiesComponent implements OnInit {
return false;
});
console.info("ngAfterViewInit");
//console.info("ngAfterViewInit");
this.searchUtils.totalResults = this.selectedCommunities.length;
}
@ -150,7 +150,7 @@ export class ManageZenodoCommunitiesComponent implements OnInit {
*/
triggerInitialLoad(){
this.triggered = true;
console.info("triggerInitialLoad");
//console.info("triggerInitialLoad");
setTimeout(function(){
var table = (<any>$('#dpTable')).DataTable();
table.page( 0 ).draw( false );
@ -165,17 +165,14 @@ export class ManageZenodoCommunitiesComponent implements OnInit {
table.page( page - 1 ).draw( false );
var info = table.page.info();
console.info("records: "+info.recordsDisplay);
this.searchUtils.totalResults = info.recordsDisplay;
}
public confirmedDeleteCommunity(data : any) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
console.info("REMOVE: "+ this.communityId + " "+this.selectedToDelete.openaireId);
this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.communityId,this.selectedToDelete.openaireId ).subscribe(
data => {
var pos = -1;
@ -196,19 +193,17 @@ export class ManageZenodoCommunitiesComponent implements OnInit {
},
err => {
console.info("error remove");
console.log(err.status);
},
}/*,
() => {
console.info("completed remove");
}
}*/
)
}
}
public removeCommunity( comm) {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.selectedToDelete = comm;

View File

@ -83,7 +83,6 @@ export class ZenodoCommunitiesComponent implements OnInit {
if(params['communityId']) {
this.communityId = params['communityId'];
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
if (this.communityId != null && this.communityId != '') {
@ -151,7 +150,6 @@ export class ZenodoCommunitiesComponent implements OnInit {
public toggleAction() {
if(!Session.isLoggedIn()){
console.info(this._router.url);
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
} else {
this.scroll();
@ -195,7 +193,6 @@ export class ZenodoCommunitiesComponent implements OnInit {
}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}

View File

@ -338,17 +338,15 @@ export class HelpContentService {
getCommunityStatistics(apiUrl: string, communityId: string): Observable<StatisticsSummary> {
const url = `${apiUrl}communities/${communityId}`;
console.log(`getting statistics summary from: ${url}`);
//console.log(`getting statistics summary from: ${url}`);
return this.http.get(url)
.map(res => <any>res.json())
.do(res => { console.log(res); })
.map(res => res.statistics)
.do(res => { console.log(res); });
.map(res => res.statistics);
}
getCommunityAdminStatisticsChoices(apiUrl: string, communityId: string): Observable<StatisticsDisplay> {
const url = `${apiUrl}statistics/${communityId}`;
console.log(`getting admin choices for statistics from: ${url}`);
//console.log(`getting admin choices for statistics from: ${url}`);
return this.http.get(url)
.map(stats => <StatisticsDisplay>stats.json())
.catch(this.handleError);
@ -362,7 +360,7 @@ export class HelpContentService {
status: boolean,
monitor: boolean): Observable<any> {
const url = `${apiUrl}statistics/${communityId}/${entity}/${chartsOrNumbers}?status=${status.toString()}&monitor=${monitor.toString()}`;
console.log(`getting admin choices for statistics from: ${url}`);
//console.log(`getting admin choices for statistics from: ${url}`);
return this.http.post(url, title, CustomOptions.getAuthOptionsWithBody())
.map(stats => <any>stats.json())

View File

@ -16,8 +16,6 @@ export class ManageCommunityContentProvidersService {
let options = new RequestOptions({headers: headers, body: id});
let url = properties.communityAPI+communityId+"/contentproviders";
console.info(url);
return this.http.delete(url, options)
}
@ -26,11 +24,8 @@ export class ManageCommunityContentProvidersService {
let options = new RequestOptions({headers: headers});
let url = properties.communityAPI+communityId+"/contentproviders";
console.info(url);
let communityContentProvider = this.convertSearchContentProviderToCommunityContentProvider(contentProvider, communityId);
console.info(contentProvider);
console.info(communityContentProvider);
return this.http.post(url, JSON.stringify(communityContentProvider), options)
.map(res => <any> res.json())

View File

@ -16,8 +16,6 @@ export class ManageCommunityProjectsService {
let options = new RequestOptions({headers: headers, body: id});
let url = properties.communityAPI+communityId+"/projects";
console.info(url);
return this.http.delete(url, options)
}
@ -26,11 +24,8 @@ export class ManageCommunityProjectsService {
let options = new RequestOptions({headers: headers});
let url = properties.communityAPI+communityId+"/projects";
console.info(url);
let communityProject = this.convertSearchProjectToCommunityProject(project, communityId);
console.info(project);
console.info(communityProject);
let testProject: any = {
"acronym": "test",
"communityId": "egi",

View File

@ -16,7 +16,6 @@ export class ManageZenodoCommunitiesService {
let options = new RequestOptions({headers: headers, body: id});
let url = properties.communityAPI+communityId+"/zenodocommunities";
console.info(url);
return this.http.delete(url, options)
}
@ -26,13 +25,11 @@ export class ManageZenodoCommunitiesService {
let options = new RequestOptions({headers: headers});
let url = properties.communityAPI+communityId+"/zenodocommunities";
console.info(url);
var zCommunity: any = {
"communityId": communityId,
"zenodoid": zenodoid
};
console.info(zCommunity);
return this.http.post(url, JSON.stringify(zCommunity), options)
.map(res => <any> res.json())
}