diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF index db2b7bb..268db9e 100644 --- a/META-INF/MANIFEST.MF +++ b/META-INF/MANIFEST.MF @@ -52,6 +52,3 @@ Web-Component: True Name: formcomponent/formcomponent.spec Web-Component: True - -Name: list/list.spec -Web-Component: True diff --git a/list/list.css b/list/list.css deleted file mode 100644 index 24d1048..0000000 --- a/list/list.css +++ /dev/null @@ -1,9 +0,0 @@ -.svy-wrapper > * > .bts-list { - width: 100%; - height: 100%; -} - -.svy-wrapper > * > .bts-list input { - height: 100%; - padding: 0px 5px; -} \ No newline at end of file diff --git a/list/list.html b/list/list.html deleted file mode 100644 index 4adab0e..0000000 --- a/list/list.html +++ /dev/null @@ -1,19 +0,0 @@ -
- - - - - -
\ No newline at end of file diff --git a/list/list.js b/list/list.js deleted file mode 100644 index be634c1..0000000 --- a/list/list.js +++ /dev/null @@ -1,65 +0,0 @@ -angular.module('bootstrapcomponentsList',['servoy', 'bootstrapcomponentscommon']).directive('bootstrapcomponentsList', ['$log', '$sabloConstants', '$filter', '$utils', function($log, $sabloConstants, $filter, $utils) { - return { - restrict: 'E', - scope: { - name: "=", - model: "=svyModel", - handlers: "=svyHandlers", - api: "=svyApi", - svyServoyapi: "=" - }, - link: function($scope, $element, $attrs) { - var inputEl = $element.find('input'); - - function updateDataprovider() { - var listValue = inputEl.val(); - - if($scope.model.valuelistID) { - for (i = 0; i < $scope.model.valuelistID.length; i++) { - var displayValue = $scope.model.valuelistID[i].displayValue; - if (displayValue === undefined || displayValue === null || displayValue === '') { - displayValue = ' '; - } - if (listValue === displayValue) { - listValue = $scope.model.valuelistID[i].realValue; - break; - } - } - } - - $scope.model.dataProviderID = listValue; - $scope.svyServoyapi.apply("dataProviderID"); - } - - inputEl.on("keydown", function(event) { - if($utils.testEnterKey(event)) { - updateDataprovider(); - } - }); - - $scope.$watch('model.dataProviderID', function(newValue, oldValue) { - var listValue = newValue; - - if($scope.model.valuelistID) { - var showDisplayValueFilter = $filter("showDisplayValue"); - listValue = showDisplayValueFilter(listValue, $scope.model.valuelistID, true); - } - - inputEl.val(listValue); - }) - - $scope.onBlur = function(event) { - updateDataprovider(); - } - - /** - * Set the focus to the list input - * @example %%prefix%%%%elementName%%.requestFocus(); - */ - $scope.api.requestFocus = function() { - inputEl[0].focus(); - } - }, - templateUrl: 'bootstrapcomponents/list/list.html' - }; -}]); \ No newline at end of file diff --git a/list/list.spec b/list/list.spec deleted file mode 100644 index 2dfb247..0000000 --- a/list/list.spec +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "bootstrapcomponents-list", - "displayName": "Data List", - "version": 1, - "icon": "servoydefault/typeahead/bhdropdownlisticon.gif", - "definition": "bootstrapcomponents/list/list.js", - "libraries": [{"name":"bootstrapcomponents-list-css", "version":"1.0", "url":"bootstrapcomponents/list/list.css", "mimetype":"text/css"}], - "model": - { - "dataProviderID" : { "type":"dataprovider","pushToServer": "allow", "tags": { "scope" :"design" }, "ondatachange": { "onchange":"onDataChangeMethodID", "callback":"onDataChangeCallback"}}, - "enabled" : { "type": "enabled", "blockingOn": false, "default": true, "for": ["dataProviderID","onActionMethodID","onDataChangeMethodID"] }, - "readOnly" : { "type": "protected", "blockingOn": true, "default": false,"for": ["dataProviderID","onDataChangeMethodID"], "tags": {"scope":"runtime"} }, - "editable" : { "type": "protected", "blockingOn": false, "default": true,"for": ["dataProviderID","onDataChangeMethodID"] }, - "styleClass" : { "type" :"styleclass", "tags": { "scope" :"design" }, "default" : "form-control"}, - "valuelistID" : { "type" : "valuelist", "tags": { "scope" :"design" }, "for": "dataProviderID"}, - "tabSeq" : {"type" :"tabseq", "tags": { "scope" :"design" }}, - "visible" : "visible" - }, - "handlers": - { - "onActionMethodID" : { - - "parameters":[ - { - "name":"event", - "type":"JSEvent" - } - ] - }, - "onDataChangeMethodID" : { - "returns": "boolean", - - "parameters":[ - { - "name":"oldValue", - "type":"${dataproviderType}" - }, - { - "name":"newValue", - "type":"${dataproviderType}" - }, - { - "name":"event", - "type":"JSEvent" - } - ] - } - }, - "api": - { - "requestFocus": { - "delayUntilFormLoads": true, - "discardPreviouslyQueuedSimilarCalls": true - } - } - -}