From a269cd1e7f1685b602df74c89270306a228d5f52 Mon Sep 17 00:00:00 2001 From: Jay Mathis Date: Sat, 18 Sep 2021 12:36:29 -0400 Subject: [PATCH] Resolves #13 --- Dnn.StructuredContent.csproj | 5 +- .../radio-button-list/controller.js | 65 ------------------- .../radio-button-list/directive.js | 9 --- .../radio-button-list/template.html | 34 ---------- 4 files changed, 1 insertion(+), 112 deletions(-) delete mode 100644 app/content-field-type-options/radio-button-list/controller.js delete mode 100644 app/content-field-type-options/radio-button-list/directive.js delete mode 100644 app/content-field-type-options/radio-button-list/template.html diff --git a/Dnn.StructuredContent.csproj b/Dnn.StructuredContent.csproj index e880a31..ef3350e 100644 --- a/Dnn.StructuredContent.csproj +++ b/Dnn.StructuredContent.csproj @@ -161,7 +161,6 @@ - @@ -180,7 +179,6 @@ - @@ -219,7 +217,6 @@ - @@ -301,7 +298,7 @@ - + diff --git a/app/content-field-type-options/radio-button-list/controller.js b/app/content-field-type-options/radio-button-list/controller.js deleted file mode 100644 index fa8b618..0000000 --- a/app/content-field-type-options/radio-button-list/controller.js +++ /dev/null @@ -1,65 +0,0 @@ -app.controller('contentFieldTypeOptionsRadioButtonListController', ['$scope', '$uibModal', function ($scope, $uibModal) { - - $scope.addChoice = function () { - modalInstance = $uibModal.open({ - templateUrl: '/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.StructuredContent/app/content-field-types/choice/template.html?c=' + new Date().getTime(), - controller: 'contentFieldTypeChoiceController', - size: 'md dnn-structured-content', - backdrop: 'static', - resolve: { - choice: function () { - return null; - } - } - }); - - modalInstance.result.then( - function (retChoice) { - if (!$scope.contentField.options.choices) { - $scope.contentField.options.choices = []; - } - var newChoice = { - text: retChoice.text, - value: retChoice.value - }; - $scope.contentField.options.choices.push(newChoice); - }, - function () { } - ); - }; - - $scope.editChoice = function (choice) { - var clone = $.extend({}, choice); - - var modalInstance = $uibModal.open({ - templateUrl: '/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.StructuredContent/app/content-field-types/choice/template.html?c=' + new Date().getTime(), - controller: 'contentFieldTypeChoiceController', - size: 'md dnn-structured-content', - backdrop: 'static', - resolve: { - choice: function () { - return clone; - } - } - }); - - modalInstance.result.then( - function (retChoice) { - choice.text = retChoice.text; - choice.value = retChoice.value; - }, - function () { } - ); - }; - - $scope.deleteChoice = function (choice) { - for (var x = 0; x < $scope.contentField.options.choices.length; x++) { - var listChoice = $scope.contentField.options.choices[x]; - if (choice === listChoice) { - $scope.contentField.options.choices.splice(x, 1); - break; - } - } - }; - -}]); \ No newline at end of file diff --git a/app/content-field-type-options/radio-button-list/directive.js b/app/content-field-type-options/radio-button-list/directive.js deleted file mode 100644 index 89d866e..0000000 --- a/app/content-field-type-options/radio-button-list/directive.js +++ /dev/null @@ -1,9 +0,0 @@ -app.directive('contentFieldTypeOptionsRadioButtonList', function () { - return { - templateUrl: '/DesktopModules/Admin/Dnn.PersonaBar/Modules/Dnn.StructuredContent/app/content-field-type-options/radio-button-list/template.html', - controller: 'contentFieldTypeOptionsRadioButtonListController', - scope: { - contentField: '=' - } - }; -}); diff --git a/app/content-field-type-options/radio-button-list/template.html b/app/content-field-type-options/radio-button-list/template.html deleted file mode 100644 index c57555b..0000000 --- a/app/content-field-type-options/radio-button-list/template.html +++ /dev/null @@ -1,34 +0,0 @@ -
-
- - -
- - Choices - - - - - - - - - - - - - - - -
{{choice.text}}
- -

No choices defined yet

- -
- - -
-
\ No newline at end of file