Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get latest changes #41

Merged
merged 3 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .vs/SpecIF-Viewer/v16/.suo
Binary file not shown.
1 change: 0 additions & 1 deletion .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
"\\src\\vendor\\assets\\javascripts",
"\\src\\vendor\\assets\\stylesheets"
],
"SelectedNode": "\\src\\vendor\\assets\\javascripts\\toXhtml.js",
"PreviewInSolutionExplorer": false
}
Binary file modified .vs/slnx.sqlite
Binary file not shown.
11 changes: 6 additions & 5 deletions src/config/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.. or even better as Github issue (https://github.com/GfSE/SpecIF-Viewer/issues)
*/
const CONFIG:any = {};
CONFIG.appVersion = "1.0.t",
CONFIG.appVersion = "1.0.u",
CONFIG.specifVersion = "1.0";
CONFIG.imgURL = './vendor/assets/images';
// CONFIG.userNameAnonymous = 'anonymous'; // as configured in the server
Expand Down Expand Up @@ -396,10 +396,10 @@ const CONFIG:any = {};
CONFIG.resClassFolder
];
CONFIG.vocabularyClasses = [
"SpecIF:NameResourceClass",
"SpecIF:NameStatementClass",
"SpecIF:NameProperty",
"SpecIF:NamePropertyValue"
"SpecIF:TermResourceClass",
"SpecIF:TermStatementClass",
"SpecIF:TermProperty",
"SpecIF:TermPropertyValue"
];
// A list with all model-element types by title,
// is used for example to build a glossary;
Expand Down Expand Up @@ -501,6 +501,7 @@ const vocabulary = {
var oT = '';
switch (iT.specifIdOf().toLowerCase()) {
case "_berschrift":
case "name":
case "title":
case "titel":
case "dc_title":
Expand Down
8 changes: 4 additions & 4 deletions src/config/moduleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,11 @@ var app:IApp,
getScript( 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js' ); return true;
case "bootstrapDialog": getCss( "https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.35.4/css/bootstrap-dialog.min.css" );
getScript( 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.35.4/js/bootstrap-dialog.min.js' ); return true;
// case "tree": getCss( "https://cdnjs.cloudflare.com/ajax/libs/jqtree/1.6.1/jqtree.css" );
// getScript( 'https://cdnjs.cloudflare.com/ajax/libs/jqtree/1.6.1/tree.jquery.js' ); return true;
// temporary solution with fix for buttonLeft=false:
case "tree": getCss( "https://cdnjs.cloudflare.com/ajax/libs/jqtree/1.6.1/jqtree.css" );
getScript( 'https://cdnjs.cloudflare.com/ajax/libs/jqtree/1.6.1/tree.jquery.js' ); return true;
/* // temporary solution with fix for buttonLeft=false:
case "tree": getCss(loadPath + 'vendor/assets/stylesheets//jqtree.css');
getScript( loadPath +'vendor/assets/javascripts/tree.jquery.js'); return true;
getScript( loadPath +'vendor/assets/javascripts/tree.jquery.js'); return true; */
case "fileSaver": getScript( 'https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js' ); return true;
case "zip": getScript( 'https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js' ); return true;
case "jsonSchema": getScript( 'https://cdnjs.cloudflare.com/ajax/libs/ajv/4.11.8/ajv.min.js' ); return true;
Expand Down
10 changes: 5 additions & 5 deletions src/modules/cache.mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ class CProject {
if (!opts || !opts.deduplicate) return;

let dta = this.data,
n: number, r: number, nR: Resource, rR: Resource;
r: number, n: number, rR: Resource, nR: Resource;
// console.debug('deduplicate',simpleClone(dta));

// 1. Deduplicate equal types having different ids;
Expand Down Expand Up @@ -763,7 +763,7 @@ class CProject {
};
};
// console.debug( 'deduplicate 3', simpleClone(dta) );
// return undefined
// return undefined
}
private createFolderWithResourcesByType(opts: any): Promise<void> {
// Collect all business processes, requirements etc according to 'resourcesToCollect':
Expand Down Expand Up @@ -1576,7 +1576,7 @@ class CProject {
showEmptyProperties: CONFIG.showEmptyProperties,
imgExtensions: CONFIG.imgExtensions,
applExtensions: CONFIG.applExtensions,
// hasContent: Lib.hasContent,
// hasContent: Lib.hasContent,
propertiesLabel: opts.withOtherProperties ? 'SpecIF:Properties' : undefined,
statementsLabel: opts.withStatements ? 'SpecIF:Statements' : undefined,
fileName: self.fileName || expD.title,
Expand Down Expand Up @@ -2010,7 +2010,7 @@ class CProject {
if (this.compatiblePCReferences(refC, newC, opts))
return true;
// else:
Lib.logMsg({ status: 963, statusText: "new resourceClass or statementClass '" + newC.id + "' is incompatible; propertyClasses don't match" });
Lib.logMsg({ status: 963, statusText: "new resourceClass '" + newC.id + "' is incompatible; propertyClasses don't match" });
return false;
}
private compatibleSC(refC: StatementClass, newC: StatementClass, opts?:any): boolean {
Expand All @@ -2031,7 +2031,7 @@ class CProject {
if (this.compatiblePCReferences(refC, newC, opts))
return true;
// else:
Lib.logMsg({ status: 963, statusText: "new resourceClass or statementClass '" + newC.id + "' is incompatible; propertyClasses don't match" });
Lib.logMsg({ status: 963, statusText: "new statementClass '" + newC.id + "' is incompatible; propertyClasses don't match" });
return false;
}
private substituteDT(prj: SpecIF, r: DataType, n: DataType,): void {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/helperTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Tree {
this.domE.tree({
data: [],
// saveState: true,
buttonLeft: false,
// buttonLeft: false,
dragAndDrop: options.dragAndDrop
});
for (var e in options.eventHandlers) {
Expand Down
14 changes: 7 additions & 7 deletions src/modules/specifications.mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2187,13 +2187,13 @@ moduleManager.construct({
// cache the minimal representation of a resource;
// r may be a resource, a key pointing to a resource or a resource-id;
// note that the sequence of items in L is always maintained:
Lib.cacheE( L, { id: Lib.itemIdOf(r), title: elementTitleOf( r, $.extend({},opts,{addIcon:true}), cacheData )});
Lib.cacheE( L, { id: Lib.idOf(r), title: elementTitleOf( r, $.extend({},opts,{addIcon:true}), cacheData )});
}
function cacheMinSta(L:Statement[],s:Statement):void {
// cache the minimal representation of a statement;
// s is a statement:
Lib.cacheE(L, { id: s.id, title: staClassTitleOf(s, cacheData, opts), subject: Lib.itemIdOf(s.subject), object: Lib.itemIdOf(s.object)} );
// Lib.cacheE(L, { id: s.id, title: elementTitleOf(s, opts, cacheData), subject: Lib.itemIdOf(s.subject), object: Lib.itemIdOf(s.object) });
Lib.cacheE(L, { id: s.id, title: staClassTitleOf(s, cacheData, opts), subject: Lib.idOf(s.subject), object: Lib.idOf(s.object)} );
// Lib.cacheE(L, { id: s.id, title: elementTitleOf(s, opts, cacheData), subject: Lib.idOf(s.subject), object: Lib.idOf(s.object) });
}
function cacheNet(s:Statement):void {
// skip hidden statements:
Expand All @@ -2204,7 +2204,7 @@ moduleManager.construct({
// console.debug( 'cacheNet 1', s, simpleClone(net) );

// collect the related resources:
if( Lib.itemIdOf(s.subject) == nd.ref ) {
if( Lib.idOf(s.subject) == nd.ref ) {
// the selected node is a subject, so the related resource is an object,
// list it, but only once:
cacheMinRes( net.resources, s.object );
Expand Down Expand Up @@ -2304,7 +2304,7 @@ moduleManager.construct({

function notListed( L:Statement[],s,t ):boolean {
for( var i=L.length-1;i>-1;i-- ) {
if( Lib.itemIdOf(L[i].subject)==s.id && Lib.itemIdOf(L[i].object)==t.id ) return false;
if( Lib.idOf(L[i].subject)==s.id && Lib.idOf(L[i].object)==t.id ) return false;
};
return true;
}
Expand Down Expand Up @@ -2443,7 +2443,7 @@ moduleManager.construct({
sG.rGs.forEach( function(s) {
relG.push({
id: s.id,
sId: Lib.itemIdOf(s.subject),
sId: Lib.idOf(s.subject),
sT: elementTitleWithIcon(s.subject,opts),
computed: !s['class']
});
Expand Down Expand Up @@ -2474,7 +2474,7 @@ moduleManager.construct({
sG.rGt.forEach( function(s) {
relG.push({
id: s.id,
tId: Lib.itemIdOf(s.object),
tId: Lib.idOf(s.object),
tT: elementTitleWithIcon(s.object,opts),
computed: !s['class']
});
Expand Down
Loading