forked from 40fingers/DNN-SEORedirect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
View.ascx
92 lines (87 loc) · 5.5 KB
/
View.ascx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="View.ascx.cs" Inherits="FortyFingers.SeoRedirect.View" %>
<%@ Import Namespace="FortyFingers.SeoRedirect.Components" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke.Web" Namespace="DotNetNuke.Web.UI.WebControls" %>
<script type="text/javascript">
ff_seo_selectedPageChanged = function (selectedNode, arg2) {
// no way to figure out which textbox to clear
//console.log(JSON.stringify(selectedNode));
FF.log("triggering change on : " + $("#" + arg2[0].previousElementSibling.id).attr('id'));
$("#" + arg2[0].previousElementSibling.id).trigger('change');
};
</script>
<script type="text/javascript">
var srPid = <%= PortalId %>;
var srMid = <%= ModuleId %>;
var srVM;
$(document).ready(function () {
SR.service = $.ServicesFramework(srMid);
SR.service.baseUrl = SR.service.getServiceRoot("40Fingers") + "SeoRedirect/";
srVM = new SR.UnhandledUrlsVm({ urls: [] });
srVM.load();
});
</script>
<asp:PlaceHolder runat="server" ID="LoggingPlaceholder"></asp:PlaceHolder>
<asp:Panel runat="server" ID="UnhandledUrlsPanel" Visible="False">
<div class="ffsr ffsr-view">
<h4>
<asp:Label runat="server" ID="UnhandledUrlsPanelHeader"></asp:Label></h4>
<div id="koUnhandledUrlsWrapper">
<div class="loader" data-bind="visible: isLoading"></div>
<table class="dnnGrid">
<thead>
<tr class="dnnGridHeader">
<th><%= Localization.GetString("Url.Header", LocalResourceFile) %></th>
<th><%= Localization.GetString("Occurrences.Header", LocalResourceFile) %></th>
<th><%= Localization.GetString("Actions.Header", LocalResourceFile) %></th>
</tr>
</thead>
<tbody data-bind="foreach: urls">
<tr class="dnnGridItem ffsr-item" data-bind="css: { hidden : isHandled }">
<td><a target="_new"><span data-bind="text: url"></span></a></td>
<td><span data-bind="text: occurrences"></span></td>
<td>
<a href="#" data-bind="click: toggleAddRedirectPanel($index)">
<span class="icon" data-bind="attr: {id: 'showAddRedirect_' + $index()}"><%= Icons.GetUrl(IconTypes.Open) %></span>
<span class="icon hidden" data-bind="attr: {id: 'hideAddRedirect_' + $index()}"><%= Icons.GetUrl(IconTypes.Close) %></span>
</a>
</td>
</tr>
<tr class="ffsr-edit ffrs-addRedirectPanel hidden" data-bind="attr: {id: 'addRedirectPanel_' + $index()} ">
<td colspan="3">
<div class="loader" data-bind="visible: isLoading"></div>
<div class="">
<div class="">
<div>
<input type="radio" data-bind="checked: mapToType, attr: {id: 'redirectTypeRadioUrl_' + $index(), name: 'redirectType_' + $index(), value: 'URL'} " /><%= Localization.GetString("RedirectToUrl", LocalResourceFile) %>
</div>
<input type="text" data-bind="value: targetUrl, attr: {id: 'redirectUrl_' + $index(), name: 'redirectUrl_' + $index()} " />
</div>
<div class="" data-bind="attr: {id: 'redirectPageDropdown_' + $index()} ">
<div>
<input type="radio" data-bind="checked: mapToType, attr: {id: 'redirectTypeRadioTab_' + $index(), name: 'redirectType_' + $index(), value: 'TAB'} " /><%= Localization.GetString("RedirectToTabId", LocalResourceFile) %>
</div>
<div class="page dnnDropDownList" data-bind="attr: {id: 'createPageDropdown_' + $index()}">
<div class="selected-item">
<a href="javascript:void(0);" title="Click to expand" class="selected-value">Select A Web Page</a>
</div>
<input type="hidden" data-bind="attr: {id: 'createPageDropdownState_' + $index()}, event: { change: setSelectedTab }" />
</div>
</div>
<div class="">
<div>
<input type="radio" data-bind="checked: mapToType, attr: {id: 'redirectTypeRadioNone_' + $index(), name: 'redirectType_' + $index(), value: 'NONE'} " /><%= Localization.GetString("NoRedirect", LocalResourceFile) %>
</div>
<span> </span>
</div>
</div>
<ul class="dnnActions dnnClear">
<li><a class="dnnPrimaryAction" data-bind="click: saveRedirect">Save</a></li>
<li><a class="dnnSecondaryAction">Cancel</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</asp:Panel>