PageSourceSearch

https://support.mygoldcare.com/App/Components/Community/CommunityT…?dcacb91770fb53d94ee8e16739b531cf

js mygoldcare.com collected 2026-10-08 12:44:37 UTC 2,459 bytes, 69 lines download raw bytes

1app.controller('communityTopicController', ['$scope', '$rootScope', '$filter', '$stateParams', '$timeout', 'Upload', 'communityService', 'ngMeta', function ($scope, $rootscope, $filter, $stateParams, $timeout, Upload, communityService, ngMeta) {
2    $scope.files = [];
3
4    $scope.Category = $stateParams.category;
5    $scope.SubCategory = $stateParams.subcategory;
6    $scope.Topic = $stateParams.topic;
7    $scope.newPostForm = {};
8
9    communityService.getCommunityTopic($stateParams.topic, function (community) {
10        $scope.CommunityTopic = community;
11
12        ngMeta.setTitle($scope.CommunityTopic.Topic.Name);
13    });
14
15    $scope.saveCommunityPost = function (comment, callback) {
16        $scope.newPostForm.TicketID = $scope.CommunityTopic.Topic.TicketID;
17        $scope.newPostForm.Comment = comment;
18
19        communityService.saveCommunityPost($scope.newPostForm, function (data) {
20            if ($scope.files.length > 0) {
21                $scope.uploadFiles($scope.files, data.PostContent.ActionID, function (result) {
22                    data.Attachments = result.Attachments
23                });
24            }
25            $scope.CommunityTopic.Posts.push(data);
26            callback();
27            $scope.files = [];
28        });
29    }
30
31    $scope.addFiles = function (files) {
32        $scope.files = $scope.files.concat(files);
33    };
34
35    $scope.uploadFiles = function (files, actionID, callback) {
36        if (files && files.length) {
37            Upload.upload({
38                url: '../../api/ticket/UploadFiles',
39                data: { files: files, actionID: actionID }
40            }).then(function (response) {
41                $timeout(function () {
42                    $scope.result = response.data;
43                    callback(response.data);
44                });
45            }, function (response) {
46                if (response.status > 0) {
47                    $scope.errorMsg = response.status + ': ' + response.data;
48                }
49            }, function (evt) {
50                $scope.progress =
51                     Math.min(100, parseInt(100.0 * evt.loaded / evt.total));
52            });
53        }
54    };
55
56    $scope.deleteFile = function (idx) {
57        $scope.files.splice(idx, 1);
58    };
59
60    $scope.formatPostDate = function (date) {
61        if (date != undefined) {
62            return $filter('date')(new Date(date), 'MM/dd/yyyy hh:mm a');
63        }
64        else {
65            return null;
66        }
67    };
68
69}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.