From 4e80837375579fd21d73155509cf6c43c6b7e749 Mon Sep 17 00:00:00 2001 From: Suvigya Vijay Date: Wed, 19 Jul 2017 22:59:29 +0530 Subject: [PATCH] preview help --- .../components/customWidget/customWidget.service.js | 13 ++++++++----- .../components/customWidget/customWidgetModal.html | 5 +++-- src/app/main/main.controller.js | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/app/components/customWidget/customWidget.service.js b/src/app/components/customWidget/customWidget.service.js index d78ce9ce7..b5ccfe75f 100644 --- a/src/app/components/customWidget/customWidget.service.js +++ b/src/app/components/customWidget/customWidget.service.js @@ -19,7 +19,7 @@ 'use strict'; /** - * @name CustomWidgetService + * @name CustomWidgetServices * @desc */ function CustomWidgetService($uibModal) { @@ -56,14 +56,17 @@ angular.extend(modalOptions, defaultModalOptions, customModalOptions); modal.controller = ['$scope','$uibModalInstance', 'widgetOptions', function ($scope, $uibModalInstance, widgetOptions) { - $scope.selected = ''; + $scope.selected = { + name: '', + 'text-oneline':'' + }; $scope.widgetOptions = {}; angular.extend($scope.widgetOptions, widgetOptions); $scope.modalOptions = modalOptions; $scope.modalOptions.ok = function (result) { - widgetOptions.name = $scope.selected; - widgetOptions.title = $scope.selected; - widgetOptions.dataModelOptions.name = $scope.selected; + widgetOptions.name = $scope.selected.name; + widgetOptions.title = $scope.selected.name; + widgetOptions.dataModelOptions.name = $scope.selected.name; $uibModalInstance.close(result); }; $scope.modalOptions.close = function () { diff --git a/src/app/components/customWidget/customWidgetModal.html b/src/app/components/customWidget/customWidgetModal.html index b7ed936a2..908f32f8d 100644 --- a/src/app/components/customWidget/customWidgetModal.html +++ b/src/app/components/customWidget/customWidgetModal.html @@ -1,7 +1,7 @@ +

{{ selected['text-oneline'] }}

Type