Skip to content

Commit

Permalink
Finish 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLion9 committed Nov 23, 2016
2 parents 3850aee + 5391f3c commit eda0385
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 45 deletions.
21 changes: 11 additions & 10 deletions business_logic/static/business_logic/main.bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions business_logic/static/business_logic/polyfills.bundle.js

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions business_logic/static/business_logic/vendor.bundle.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion frontend/src/app/components/editor/editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ export class EditorComponent {
this.params["Program"] = this.base.programs.getCurrent().getTitle();
this.params["Version"] = this.base.versions.getCurrent().getTitle();

this.xmlForFunctionLibs = this.environment.generateXmlForToolbox();
if( this.environment.getEnvironment() ){
this.xmlForFunctionLibs = this.environment.generateXmlForToolbox();
}else{
this.xmlForFunctionLibs = '';
}

this.ref.fetchReferenceDescriptors().subscribe(() => {
this.xmlForReferenceDescriptors = this.ref.generateXmlForToolbox();
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/app/models/program.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
import { BaseCollection } from "./base.collection";
import { BaseModel } from "./base.model";
import {Environment} from "./environment";

export class Program extends BaseModel{
environment = null;

constructor(id: number, title: string){
super(id, title);
}

setEnvironment(data: any){
if(data) this.environment = new Environment(data);
}

getEnvironment(){
return this.environment;
}
}

export class ProgramCollection extends BaseCollection{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/models/programInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class ProgramInterface extends BaseModel{
}

setEnvironment(data: any){
this.environment = new Environment(data);
if(data) this.environment = new Environment(data);
}

setArgs(args: any){
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/models/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class Version extends BaseModel{
}

setEnvironment(data: any){
this.environment = new Environment(data);
if(data) this.environment = new Environment(data);
}

setXml(xml: string){
Expand Down
1 change: 1 addition & 0 deletions frontend/src/app/services/environment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class EnvironmentService {

getEnvironment(){
return this.base.currentVersion.getEnvironment()
// || this.base.currentProgram.getEnvironment()
|| this.base.currentProgramInterface.getEnvironment();
}

Expand Down

0 comments on commit eda0385

Please sign in to comment.