PageSourceSearch

https://membership.crn.de/Resource/Javascript/virtualpage.js

js crn.de collected 2026-10-02 03:27:53 UTC 9,687 bytes, 268 lines download raw bytes

1/// <reference path="Base.js" />
2/// <reference path="WyvernCore.js" />
3/// <reference path="jquery.sfForm.js" />
4/// <reference path="jquery.sftip.js" />
5/// <reference path="jquery.popup.js" />
6/// <reference path="jquery.sfautocomplete.js" />
7/// <reference path="jquery.FlyoutTween.js" />
8/// <reference path="jquery.cookie.js" />
9/// <reference path="jquery.CalendarStrip.js" />
10/// <reference path="Wyvern.js" />
11/// <reference path="jquery.panelConfig.js" />
12
13$(function () {
14    var virtualPageTitle = $("#VirtualPageTitle").val();
15    var buttons = new Array();
16    buttons.push( new ConfigButtonClass("icon-basesmall-info-w", "Help"));
17
18    if (virtualPageTitle === "Event View") {
19        buttons.push(new ConfigButtonClass("icon-basesmall-new-w", "New Event", "ReportShowEventAddNew();"));        
20    }
21
22    //Main panel display
23    $("#UIFrameworkMainPanel").panelConfig({
24        title: virtualPageTitle, titleClass: 'titlebarcolor-cb', closeButtonIcon: 'icon-base-bulb-w', closeButtonType: 'display'
25        , titleWidth: 300, closeButtonTitle: virtualPageTitle, buttonList: buttons, borderWidth: '0'
26    });
27
28    uiFrameWork.SetDisplay();
29    uiFrameWork.Resize();
30   
31});
32
33function ReportShowMapPopup(lat, lon, mapID, label) {
34
35    var panelDialog = CreatePopup({ Name: "PopupPanelShowMap", Type: "inline", Content: '<div class="virtualpagemapbox"><div id="PopupPanelMap" class="mappanel"></div></div>' });
36
37    panelDialog.panelConfig({
38        title: "Location",
39        titleClass: '',
40        closeButtonType: 'on',
41        titleWidth: 300,
42        height: 550,
43        width: 510,
44        contentSize: 5,
45        contentHeightOffset: 20,
46        closeButtonIcon: 'icon-basesmall-no-w',
47        closeButtonClickEvent: PopupGenClose,
48        isPopupCreated: true
49    }).sfPopup({ modalColor: c_wyvernItemSettings.ModalColor });
50
51    var popupPanelMap = L.map('PopupPanelMap').setView([lat, lon], mapID);
52    L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
53        attribution: '&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>'
54    }).addTo(popupPanelMap);
55    L.marker([lat, lon]).addTo(popupPanelMap).bindPopup(label).openPopup();
56}
57
58function EventGallerySetNav(prefix, t, displayCount, total, pageMode,pageWidth) {
59    var pageCount = $("#EventGalleryMain_" + prefix).data("count");
60    var index = $("#EventGalleryMain_" + prefix).data("index");
61    var w =0;
62    var d;
63
64    if (pageWidth > 0) {
65        w = pageWidth;
66    }
67    else {
68        w = parseInt($("#EventGalleryElement_0_" + prefix).width());
69    }
70    
71    if (t === 1) {
72        if (index < 1) {
73            return;
74        }
75
76        if (displayCount === 1) {
77            index -= 1;
78
79            for (i = 0; i < total; i++) {
80                $("#EventGalleryElement_" + i + "_" + prefix).animate({ left: '+=' + w + 'px' });
81            }
82        }
83        else {
84            
85
86            if (pageMode === 0) {
87                index -= displayCount;
88                d = '+=' + w * displayCount + 'px';
89            }
90            else if (pageMode === 1) {
91                index -= 1;
92                d = '+=' + w + 'px';
93            }
94
95            for (i = 0; i < total; i++) {
96                $("#EventGalleryElement_" + i + "_" + prefix).animate({ left: d });
97            }
98        }
99        
100        $("#EventGalleryMain_" + prefix).data("index", index);
101        $(".eventgallerynavcircle").removeClass("selected");
102
103        if (displayCount > 1) {
104            $("#EventGalleryElementCircle_" + (total / displayCount) * index + "_" + prefix).addClass("selected");
105        }
106        else {
107            $("#EventGalleryElementCircle_" + index + "_" + prefix).addClass("selected");
108        }
109    }
110    else if (t === 2) {
111        if (displayCount === 1) {
112            if (index >= total - 1) {
113                return;
114            }
115        }
116        else if (pageMode === 1) {
117            if (index >= total - 1) {
118                return;
119            }
120        }
121        else {
122            if (index + displayCount >= total) {
123                return;
124            }
125        }
126
127        if (displayCount === 1) {
128            index += 1;
129
130            for (i = 0; i < total; i++) {
131                $("#EventGalleryElement_" + i + "_" + prefix).animate({ left: '-=' + w + 'px' });
132            }
133        }
134        else
135        {
136            if (pageMode === 0) {
137                index += displayCount;
138                d = '-=' + w * displayCount + 'px';
139            }
140            else if (pageMode === 1) {
141                index += 1;
142                d = '-=' + w + 'px';
143            }
144
145            if (index > total) { index = total; }
146
147
148
149            for (i = 0; i < total; i++) {
150                $("#EventGalleryElement_" + i + "_" + prefix).animate({ left: d });
151            }
152        }
153
154        $(".eventgallerynavcircle").removeClass("selected");
155        $("#EventGalleryMain_" + prefix).data("index", index);
156        if (displayCount > 1) {
157            $("#EventGalleryElementCircle_" + (total / displayCount) * index + "_" + prefix).addClass("selected");
158        }
159        else {
160            $("#EventGalleryElementCircle_" + index + "_" + prefix).addClass("selected");
161        }
162    }
163
164}
165
166function VirtualPageEventMediaPopup(mediaID, filePath, mediaTypeID)
167{
168    var html = "";
169    switch (mediaTypeID) {
170        case 1:
171        case 2:
172        case 3: //Image 
173            html='<img src="' + filePath + '" style="margin: 10px;max-width:100%;" />';
174
175            break;
176        case 6:
177            html='<embed width="980" height="760" src="' + filePath + '" type="application/pdf" style="margin: 10px;"></embed>';
178
179            break;
180        case 7:
181            var args = new WyvernAjaxArgsClass();
182            var params = "WebControl.rep?Action=CsvDataPreview";
183
184            args.parameters.push(new WyvernParameterItemClass("MediaID", mediaID));
185            args.parameters.push(new WyvernParameterItemClass("Type", 2));
186            args.parameters.push(new WyvernParameterItemClass("Count", 20));
187            args.parameters.push(new WyvernParameterItemClass("OrderBy", 0));
188            args.parameters.push(new WyvernParameterItemClass("OrderDirection", 0));
189            args.parameters.push(new WyvernParameterItemClass("FilterIndex", -1));
190            args.parameters.push(new WyvernParameterItemClass("Filter", ""));
191            args.parameters.push(new WyvernParameterItemClass("FilterType", 0));
192            args.parameters.push(new WyvernParameterItemClass("Prefix", "Main"));
193
194            WyvernAjax(params, function (data) {
195                if (data.Status === 1) {
196                    c_folderMediaItem.CSVHeader = data.DataB;
197                    html='<div class="foldermediacsvboxbig reporttablebox" id="MediaFolderContainerMain">' + data.Data + '</div>' + data.Paging; //data.DataB +
198
199                    var buttons = new Array();
200                    buttons.push(new ConfigButtonClass("icon-basesmall-info-w", "Help"));
201
202                    var popupPanel = CreatePopup({ Name: "PopupPanelPreview" + name, Type: "inline", Content: html });
203                    //$("#PopupPanelInlineSubContent").html(data.Data);
204
205                    popupPanel.panelConfig({
206                        title: "Preview Media",
207                        titleClass: '',
208                        closeButtonType: 'on',
209                        titleWidth: 300,
210                        buttonList: buttons,
211                        height: 800,
212                        width: 1000,
213                        contentSize: 5,
214                        closeButtonIcon: 'icon-basesmall-no-w',
215                        closeButtonClickEvent: PopupGenClose,
216                        isPopupCreated: true
217                    }).sfPopup({ modalColor: c_wyvernItemSettings.ModalColor });
218
219                    var elm = $("#MediaFolderContainerMain");
220                    elm.data("OrderBy", 0);
221                    elm.data("OrderDirection", 0);
222                    elm.data("FilterIndex", -1);
223                    elm.data("Filter", "");
224                    elm.data("FilterType", 0);
225                    elm.data("mediaid", mediaID);
226                    return;
227                }
228
229            }, args);
230
231            break;
232
233        case 12:
234            html = '<video width="980" height="760" controls><source src="' + filePath + '" style="margin: 10px;"/></video>';
235            break;
236    }
237
238    if (html !== "") {
239        var buttons = new Array();        
240        buttons.push(new ConfigButtonClass("icon-basesmall-info-w", "Help"));
241
242        var popupPanel = CreatePopup({ Name: "PopupPanelPreview" + name, Type: "inline", Content: html });
243        //$("#PopupPanelInlineSubContent").html(data.Data);
244
245        popupPanel.panelConfig({
246            title: "Preview Media",
247            titleClass: '',
248            closeButtonType: 'on',
249            titleWidth: 300,
250            buttonList: buttons,
251            height: 800,
252            width: 1000,
253            contentSize: 5,
254            closeButtonIcon: 'icon-basesmall-no-w',
255            closeButtonClickEvent: PopupGenClose,
256            isPopupCreated: true
257        }).sfPopup({ modalColor: c_wyvernItemSettings.ModalColor });
258    }
259}
260
261function VirtualPageEventShowSpeaker(a,b) {
262    window.location.href ="/Speakers_EventID21";
263}
264
265function VirtualPageShowMenu() {
266    $(".virtualpagelinkmenu").show();
267    $(".virtualpagemenuicon").hide();
268}

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.