PageSourceSearch

https://portal.circle.ms/Content/Home/Index.js

js circle.ms collected 2026-09-24 09:20:16 UTC 7,715 bytes, 152 lines download raw bytes

1var Circlems;
2(function (Circlems) {
3    var Home;
4    (function (Home) {
5        var CircleItem = (function () {
6            function CircleItem(obj) {
7                this.Name = null;
8                this.ImageUrl = null;
9                this.Url = null;
10                if (obj.Name)
11                    this.Name = obj.Name;
12                if (obj.ImageUrl)
13                    this.ImageUrl = obj.ImageUrl;
14                if (obj.Url)
15                    this.Url = obj.Url;
16            }
17            return CircleItem;
18        }());
19        Home.CircleItem = CircleItem;
20        var IndexViewModel = (function () {
21            function IndexViewModel() {
22                this.EventItems = ko.observableArray([]);
23                this.OfficialEventItems = ko.observableArray([]);
24                this.CircleItems = ko.observableArray([]);
25                this.PnaviItems = ko.observableArray([]);
26                this.UserName = ko.observable(null);
27                this.AdvWebCatalog = ko.observableArray([]);
28                this.IndexCatalogEventItems = ko.observableArray([]);
29            }
30            return IndexViewModel;
31        }());
32        Home.IndexViewModel = IndexViewModel;
33        var Index = (function () {
34            function Index() {
35            }
36            Index.prototype.initialize = function (targetElements, bottomElement, authurl) {
37                var self = this;
38                self.viewmodel = new IndexViewModel();
39                Circlems.Event.Index.TheModel = self.viewmodel;
40                ko.applyBindings(self.viewmodel, targetElements);
41                self.AdvBottom425x70 = ko.observableArray([]);
42                if (bottomElement != null) {
43                    ko.applyBindings(self.AdvBottom425x70, bottomElement);
44                }
45                var now = new Date();
46                var job0 = $.ajax({
47                    type: "POST",
48                    url: "/Home/GetLayoutJson",
49                    data: { __RequestVerificationToken: Circlems.antiForgeryToken.value },
50                    dataType: "json"
51                }).done(function (data) {
52                    self.viewmodel.UserName(data.Header.UserName);
53                }).fail(function () {
54                    self.viewmodel.UserName(null);
55                    $("p.btn-regist-top").show();
56                });
57                var job1 = $.ajax({
58                    type: "POST",
59                    url: "/V4Proxy/EventListJson/current",
60                    data: { __RequestVerificationToken: Circlems.antiForgeryToken.value },
61                    dataType: "json"
62                }).done(function (data) {
63                    self.viewmodel.EventItems.removeAll();
64                    self.viewmodel.EventItems(data
65                        .map(function (_) { return new Circlems.Event.EventListItem(_); })
66                        .filter(function (x) { return x.InputEndDate > now && x.InputStartDate <= now; })
67                        .sort(function (a, b) {
68                        return a.InputEndDate === b.InputEndDate ? 0
69                            : a.InputEndDate < b.InputEndDate ? -1 : 1;
70                    })
71                        .map(function (value, index /* , array */) { return index < 8 ? value : null; }) // 8レコードまで
72                        .filter(function (x) { return x !== null; }));
73                });
74                var job2 = $.ajax({
75                    type: "POST",
76                    url: "/Home/IndexJson",
77                    data: { __RequestVerificationToken: Circlems.antiForgeryToken.value },
78                    dataType: "json"
79                }).done(function (data) {
80                    self.viewmodel.CircleItems.removeAll();
81                    self.viewmodel.CircleItems(data
82                        .map(function (_) { return new CircleItem(_); })
83                        .map(function (value, index /* , array */) { return index < 12 ? value : null; }) // 12レコードまで
84                        .filter(function (x) { return x !== null; }));
85                });
86                var job3 = $.ajax({
87                    type: "POST",
88                    url: "/pnavi/GetJson",
89                    data: { __RequestVerificationToken: Circlems.antiForgeryToken.value },
90                    dataType: "json",
91                    cache: false
92                }).done(function (data) {
93                    self.viewmodel.PnaviItems.removeAll();
94                    self.viewmodel.PnaviItems(data.Items
95                        .filter(function (item) { return !!item.Campaigns && item.Campaigns.length > 0; })
96                        .map(function (item) {
97                        var elem = item.Campaigns[Math.floor(Math.random() * item.Campaigns.length)];
98                        var x = new EmerPortalWeb.pnaviCampaign(elem.CampaignId, elem.CampaignSiteUrl, (!elem.CampaignImageUrl) ? "/Content/images/pnavi/camp-nobannner.png" : elem.CampaignImageUrl, elem.CampaignName, elem.CampaignDescription);
99                        x.rand = Math.random();
100                        // console.log(x.CampaignSiteUrl());
101                        return x;
102                    })
103                        .sort(function (a, b) { return a.rand === b.rand ? 0 : a.rand < b.rand ? -1 : 1; })
104                        .slice(0, 6) // 6レコードまで
105                    );
106                });
107                var job4 = $.ajax({
108                    type: "POST",
109                    url: "/Event/GetIndexCatalogList",
110                    data: {},
111                    dataType: "json"
112                }).done(function (data) {
113                    self.viewmodel.IndexCatalogEventItems(data);
114                });
115                //var job4 = $.ajax({
116                // type: "POST",
117                // url: "Event/OfficalEventJson",
118                // data: { /*__RequestVerificationToken: Circlems.antiForgeryToken.value*/  },
119                // dataType: "json"
120                //}).done((data: Array<OfficialEventItem>) => {
121                // self.viewmodel.OfficialEventItems.removeAll();
122                // self.viewmodel.OfficialEventItems(data);
123                //});
124                $.when(job0, job1, job2, job3, job4).always(function () {
125                    // TODO: ローディングアニメーション?
126                });
127                // data-news は全体ニュース(HTML埋め込み)を表す
128                $('div.box-message-news[data-news] p a[data-news-title]').on('click', function () {
129                    // ReSharper disable once SuspiciousThisUsage
130                    $(this).parent().next().slideToggle("fast");
131                    return false;
132                });
133                // data-news は全体ニュース(HTML埋め込み)を表す モバイル用
134                $('.box-message-news[data-news] label[data-news-title]').on('click', function () {
135                    // ReSharper disable once SuspiciousThisUsage
136                    $(this).next().slideToggle("fast");
137                    return false;
138                });
139                self.updateWebcatalog = function (items) {
140                    self.viewmodel.AdvWebCatalog(items);
141                };
142                self.updateBottom425x70 = function (items) {
143                    self.AdvBottom425x70(items);
144                };
145                return true;
146            };
147            return Index;
148        }());
149        Home.Index = Index;
150    })(Home = Circlems.Home || (Circlems.Home = {}));
151})(Circlems || (Circlems = {}));
152//# sourceMappingURL=Index.js.map

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.