-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #895 from MetadataConsulting/MET-1331-classifications
Met 1331 classifications
- Loading branch information
Showing
81 changed files
with
1,187 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
.../grails-app/assets/javascripts/modelcatalogue/core/ui/bs/modals/modalPromptTagEdit.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
angular.module('mc.core.ui.bs.modalPromptTagEdit', ['mc.util.messages', 'mc.core.ui.bs.withClassificationCtrlMixin']).config ['messagesProvider', (messagesProvider)-> | ||
factory = [ '$uibModal', '$q', 'messages', ($uibModal, $q, messages) -> | ||
(title, body, args) -> | ||
if not args?.element? and not args?.create? | ||
messages.error('Cannot create relationship dialog.', 'The element to be edited is missing.') | ||
return $q.reject('Missing element argument!') | ||
|
||
dialog = $uibModal.open { | ||
windowClass: 'basic-edit-modal-prompt' | ||
size: 'lg' | ||
template: ''' | ||
<div class="modal-header"> | ||
<h4>''' + title + '''</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<messages-panel messages="messages"></messages-panel> | ||
<form role="form" ng-submit="saveElement()"> | ||
<div class="form-group" ng-if="!hideDataModels()"> | ||
<label for="dataModel"> Data Models</label> | ||
<elements-as-tags elements="copy.dataModels"></elements-as-tags> | ||
<input id="dataModel" placeholder="Data Model" ng-model="pending.dataModel" catalogue-element-picker="dataModel" label="el.name" typeahead-on-select="addToDataModels()"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="name" class="">Name</label> | ||
<input type="text" class="form-control" id="name" placeholder="Name" ng-model="copy.name"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="modelCatalogueId" class="">Catalogue ID</label> | ||
<input type="text" class="form-control" id="modelCatalogueId" placeholder="e.g. external ID, namespace (leave blank for generated)" ng-model="copy.modelCatalogueId"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="description" class="">Description</label> | ||
<textarea rows="10" ng-model="copy.description" placeholder="Description" class="form-control" id="description"></textarea> | ||
</div> | ||
<fake-submit-button/> | ||
</form> | ||
</div> | ||
<div class="modal-footer"> | ||
<contextual-actions role="modal"></contextual-actions> | ||
</div> | ||
''' | ||
controller: ['$scope', 'messages', '$controller', '$uibModalInstance', ($scope, messages, $controller, $uibModalInstance) -> | ||
$scope.pending = {dataModel: null} | ||
$scope.newEntity = -> {dataModels: $scope.copy?.dataModels ? []} | ||
$scope.copy = angular.copy(args.element ? $scope.newEntity()) | ||
$scope.original = args.element ? {} | ||
$scope.messages = messages.createNewMessages() | ||
$scope.create = args.create | ||
$scope.currentDataModel = args.currentDataModel | ||
|
||
angular.extend(this, $controller('withClassificationCtrlMixin', {$scope: $scope})) | ||
angular.extend(this, $controller('saveAndCreateAnotherCtrlMixin', {$scope: $scope, $uibModalInstance: $uibModalInstance})) | ||
|
||
$scope.hasChanged = -> | ||
$scope.copy.name != $scope.original.name\ | ||
or $scope.copy.description != $scope.original.description\ | ||
or $scope.copy.modelCatalogueId != $scope.original.modelCatalogueId | ||
|
||
] | ||
|
||
} | ||
|
||
dialog.result | ||
] | ||
|
||
messagesProvider.setPromptFactory 'edit-tag', factory | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
ModelCatalogueCorePluginTestApp/grails-app/assets/other/schema/2.1/metadataregistry.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.