|
1184 | 1184 | case 'deichman:CompositionType': |
1185 | 1185 | case 'deichman:ClassificationSource': |
1186 | 1186 | case 'deichman:ClassificationEntry': |
| 1187 | + case 'deichman:WorkSeries' : |
| 1188 | + case 'deichman:WorkSeriesPart': |
1187 | 1189 | case 'http://www.w3.org/2001/XMLSchema#anyURI': |
1188 | 1190 | rdfType = 'http://www.w3.org/2001/XMLSchema#anyURI' |
1189 | 1191 | inputType = 'input-string' |
|
1346 | 1348 | _.each(resourceForm.inputs, function (formInput) { |
1347 | 1349 | var predicate = ontologyUri + formInput.rdfProperty |
1348 | 1350 | var ontologyInput = inputMap[ resourceForm.rdfType + '.' + predicate ] |
1349 | | - _.extend(formInput, _.omit(ontologyInput, formInput.type ? 'type' : '')) |
| 1351 | + _.extend(formInput, _.omit(ontologyInput, formInput.type ? 'type' : '', formInput.label ? 'label' : '')) |
1350 | 1352 | formInput[ 'values' ] = emptyValues(false) |
1351 | 1353 | formInput[ 'rdfType' ] = resourceForm.rdfType |
1352 | 1354 | if (targetResourceIsMainEntry) { |
|
1463 | 1465 | if (input.oneLiner) { |
1464 | 1466 | ontologyInput.oneLiner = input.oneLiner |
1465 | 1467 | } |
| 1468 | + if (input.label) { |
| 1469 | + ontologyInput.label = input.label |
| 1470 | + } |
1466 | 1471 | if (input.showOnlyWhenInputHasValue) { |
1467 | 1472 | ontologyInput.showOnlyWhenInputHasValue = input.showOnlyWhenInputHasValue |
1468 | 1473 | } |
|
1859 | 1864 | } |
1860 | 1865 | } |
1861 | 1866 |
|
| 1867 | + let closePreview = function () { |
| 1868 | + $('#iframecontainer').hide() |
| 1869 | + $('#block').fadeOut() |
| 1870 | + } |
| 1871 | + |
1862 | 1872 | function showOverlay (uri) { |
1863 | | - let closePreview = function () { |
1864 | | - $('#iframecontainer').hide() |
1865 | | - $('#block').fadeOut() |
1866 | | - } |
1867 | | - $('#block').click(closePreview) |
1868 | | - $('#block').fadeIn() |
| 1873 | + $('#block').click(closePreview).fadeIn() |
1869 | 1874 | $('#close-preview-button').click(closePreview) |
1870 | | - $('#iframecontainer').fadeIn() |
1871 | | - $('#iframecontainer iframe').attr('src', uri).load(function () { |
| 1875 | + $('#iframecontainer').fadeIn().find('iframe').attr('src', uri).load(function () { |
1872 | 1876 | $('#loader').fadeOut(function () { |
1873 | 1877 | $('iframe').fadeIn() |
1874 | 1878 | }) |
|
2915 | 2919 | } |
2916 | 2920 | return resourceUri |
2917 | 2921 | } |
| 2922 | + |
2918 | 2923 | function setCreatedResourceValuesInMainInputs () { |
2919 | 2924 | let groupInputs = ractive.get('inputGroups') |
2920 | 2925 | _.each(event.context.inputs, function (input) { |
|
2927 | 2932 | }) |
2928 | 2933 | }) |
2929 | 2934 | } |
| 2935 | + |
2930 | 2936 | let setTargetUri = function (resourceUri) { |
2931 | 2937 | if (useAfterCreation) { |
2932 | 2938 | ractive.set('targetUri.' + event.context.rdfType, resourceUri) |
|
3730 | 3736 | .then(setDisplayMode) |
3731 | 3737 | .then(function (applicationData) { |
3732 | 3738 | setTaskDescription(options.task) |
| 3739 | + $(document).keyup(function (e) { |
| 3740 | + if (e.keyCode === 27) { |
| 3741 | + closePreview() |
| 3742 | + } |
| 3743 | + }) |
3733 | 3744 | return applicationData |
3734 | 3745 | }) |
3735 | 3746 | .then(hideGrowler) |
|
0 commit comments