Remove another AssignDomain dialog & Punycode lib which was only used in AssignDomain2 dialog

This commit is contained in:
Warren
2018-08-02 11:36:13 +01:00
parent b59c7d8af6
commit c0ccc79604
6 changed files with 0 additions and 247 deletions

View File

@@ -350,7 +350,6 @@
</Content>
<Content Include="Umbraco_Client\Dialogs\SortDialog.css" />
<Content Include="Umbraco_client\Dialogs\SortDialog.js" />
<Content Include="Umbraco_Client\PunyCode\punycode.min.js" />
<Content Include="Umbraco_Client\Tablesorting\img\asc.gif" />
<Content Include="Umbraco_Client\Tablesorting\img\desc.gif" />
<Content Include="Umbraco_Client\Tablesorting\jquery.tablesorter.min.js" />

View File

@@ -1,2 +0,0 @@
/*! https://mths.be/punycode v1.3.2 by @mathias */
!function(a){function b(a){throw RangeError(E[a])}function c(a,b){for(var c=a.length,d=[];c--;)d[c]=b(a[c]);return d}function d(a,b){var d=a.split("@"),e="";d.length>1&&(e=d[0]+"@",a=d[1]),a=a.replace(D,".");var f=a.split("."),g=c(f,b).join(".");return e+g}function e(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function f(a){return c(a,function(a){var b="";return a>65535&&(a-=65536,b+=H(a>>>10&1023|55296),a=56320|1023&a),b+=H(a)}).join("")}function g(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:t}function h(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function i(a,b,c){var d=0;for(a=c?G(a/x):a>>1,a+=G(a/b);a>F*v>>1;d+=t)a=G(a/F);return G(d+(F+1)*a/(a+w))}function j(a){var c,d,e,h,j,k,l,m,n,o,p=[],q=a.length,r=0,w=z,x=y;for(d=a.lastIndexOf(A),0>d&&(d=0),e=0;d>e;++e)a.charCodeAt(e)>=128&&b("not-basic"),p.push(a.charCodeAt(e));for(h=d>0?d+1:0;q>h;){for(j=r,k=1,l=t;h>=q&&b("invalid-input"),m=g(a.charCodeAt(h++)),(m>=t||m>G((s-r)/k))&&b("overflow"),r+=m*k,n=x>=l?u:l>=x+v?v:l-x,!(n>m);l+=t)o=t-n,k>G(s/o)&&b("overflow"),k*=o;c=p.length+1,x=i(r-j,c,0==j),G(r/c)>s-w&&b("overflow"),w+=G(r/c),r%=c,p.splice(r++,0,w)}return f(p)}function k(a){var c,d,f,g,j,k,l,m,n,o,p,q,r,w,x,B=[];for(a=e(a),q=a.length,c=z,d=0,j=y,k=0;q>k;++k)p=a[k],128>p&&B.push(H(p));for(f=g=B.length,g&&B.push(A);q>f;){for(l=s,k=0;q>k;++k)p=a[k],p>=c&&l>p&&(l=p);for(r=f+1,l-c>G((s-d)/r)&&b("overflow"),d+=(l-c)*r,c=l,k=0;q>k;++k)if(p=a[k],c>p&&++d>s&&b("overflow"),p==c){for(m=d,n=t;o=j>=n?u:n>=j+v?v:n-j,!(o>m);n+=t)x=m-o,w=t-o,B.push(H(h(o+x%w,0))),m=G(x/w);B.push(H(h(m,0))),j=i(d,r,f==g),d=0,++f}++d,++c}return B.join("")}function l(a){return d(a,function(a){return B.test(a)?j(a.slice(4).toLowerCase()):a})}function m(a){return d(a,function(a){return C.test(a)?"xn--"+k(a):a})}var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o="object"==typeof module&&module&&!module.nodeType&&module,p="object"==typeof global&&global;(p.global===p||p.window===p||p.self===p)&&(a=p);var q,r,s=2147483647,t=36,u=1,v=26,w=38,x=700,y=72,z=128,A="-",B=/^xn--/,C=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},F=t-u,G=Math.floor,H=String.fromCharCode;if(q={version:"1.3.2",ucs2:{decode:e,encode:f},decode:j,encode:k,toASCII:m,toUnicode:l},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return q});else if(n&&o)if(module.exports==n)o.exports=q;else for(r in q)q.hasOwnProperty(r)&&(n[r]=q[r]);else a.punycode=q}(this);

View File

@@ -978,13 +978,6 @@
<Compile Include="umbraco.presentation\umbraco\dialogs\create.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\dialogs\AssignDomain2.aspx.cs">
<DependentUpon>AssignDomain2.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\dialogs\AssignDomain2.aspx.designer.cs">
<DependentUpon>AssignDomain2.aspx</DependentUpon>
</Compile>
<Compile Include="Controllers\UmbLoginController.cs" />
<Compile Include="UrlHelperExtensions.cs" />
<Compile Include="Editors\MediaController.cs" />
@@ -1458,9 +1451,6 @@
</Content>
<Content Include="umbraco.presentation\umbraco\developer\RelationTypes\RelationTypesWebService.asmx" />
<Content Include="umbraco.presentation\umbraco\dashboard\FeedProxy.aspx" />
<Content Include="umbraco.presentation\umbraco\dialogs\AssignDomain2.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\dialogs\Preview.aspx" />
<Content Include="umbraco.presentation\umbraco\dialogs\empty.htm" />
<Content Include="umbraco.presentation\umbraco\dialogs\insertMasterpageContent.aspx">

View File

@@ -1,82 +0,0 @@
<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" CodeBehind="AssignDomain2.aspx.cs" AutoEventWireup="True" Inherits="umbraco.dialogs.AssignDomain2" %>
<%@ Import Namespace="Umbraco.Web" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" %>
<asp:Content ContentPlaceHolderID="head" runat="server">
<umb:JsInclude runat="server" FilePath="Dialogs/AssignDomain2.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude runat="server" FilePath="PunyCode/punycode.min.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude runat="server" FilePath="/Umbraco/lib/jquery-validate/jquery.validate.min.js" PathNameAlias="UmbracoClient" />
<umb:CssInclude runat="server" FilePath="Dialogs/AssignDomain2.css" PathNameAlias="UmbracoClient" />
<script type="text/javascript">
(function ($) {
$(document).ready(function () {
var dialog = new Umbraco.Dialogs.AssignDomain2({
nodeId: <%=GetNodeId()%>,
restServiceLocation: '<%=GetRestServicePath() %>',
invalidDomain: '<%=Services.TextService.Localize("assignDomain/invalidDomain") %>',
duplicateDomain: '<%=Services.TextService.Localize("assignDomain/duplicateDomain") %>',
<asp:Literal runat="server" ID="data" />
});
dialog.init();
});
})(jQuery);
</script>
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
<div class="umb-dialog-body">
<cc1:Feedback ID="feedback" runat="server" />
<div id="komask"></div>
<cc1:Pane runat="server" ID="pane_language">
<cc1:PropertyPanel runat="server" ID="prop_language">
<select class="umb-editor umb-dropdown" name="language" data-bind="options: languages, optionsText: 'Code', optionsValue: 'Id', value: language, optionsCaption: '<%=Services.TextService.Localize("assignDomain/inherit") %> '"></select>
<!-- <small class="help-inline"><%=Services.TextService.Localize("assignDomain/setLanguageHelp") %></small>-->
</cc1:PropertyPanel>
</cc1:Pane>
<cc1:Pane runat="server" ID="pane_domains">
<cc1:PropertyPanel runat="server">
<table class="table domains" data-bind="visible: domains().length > 0">
<thead>
<tr>
<th><%=Services.TextService.Localize("assignDomain/domain") %></th>
<th><%=Services.TextService.Localize("assignDomain/language") %></th>
<th />
</tr>
</thead>
<tbody data-bind="foreach: domains">
<tr>
<td valign="top">
<input class="domain" data-bind="value: Name, uniqueName: true" /><input type="hidden" value="0" data-bind="uniqueName: true"/></td>
<td valign="top">
<select class="language" data-bind="options: $parent.languages, optionsText: 'Code', optionsValue: 'Id', value: Lang, uniqueName: true"></select></td>
<td valign="top"><a href="#" class="btn btn-danger" data-bind="click: $parent.removeDomain"><i class="icon icon-trash"></i></a></td>
</tr>
</tbody>
</table>
</cc1:PropertyPanel>
<cc1:PropertyPanel runat="server">
<small data-bind="visible: domains().length == 0" class="help-inline"><%=Services.TextService.Localize("assignDomain/domainHelp") %></small>
<button class="btn" data-bind="click: addDomain"><%=Services.TextService.Localize("assignDomain/addNew") %></button>
</cc1:PropertyPanel>
</cc1:Pane>
</div>
<div runat="server" id="p_buttons" class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<a href="#" class="btn btn-link" onclick="UmbClientMgr.closeModalWindow()"><%=Services.TextService.Localize("general/cancel")%></a>
<button class="btn btn-primary" id="btnSave"><%=Services.TextService.Localize("buttons/save") %></button>
</div>
</asp:Content>

View File

@@ -1,83 +0,0 @@
using System;
using System.Text;
using System.Linq;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Services;
using Umbraco.Web.UI.Pages;
using Umbraco.Web;
using Umbraco.Web.Composing;
using Umbraco.Web.Editors;
using Umbraco.Web.WebServices;
using Umbraco.Web._Legacy.Actions;
namespace umbraco.dialogs
{
public partial class AssignDomain2 : UmbracoEnsuredPage
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
var nodeId = GetNodeId();
CheckPathAndPermissions(nodeId, UmbracoObjectTypes.Document, ActionAssignDomain.Instance);
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
var nodeId = GetNodeId();
var node = Services.ContentService.GetById(nodeId);
if (node == null)
{
feedback.Text = Services.TextService.Localize("assignDomain/invalidNode");
pane_language.Visible = false;
pane_domains.Visible = false;
p_buttons.Visible = false;
return;
}
pane_language.Title = Services.TextService.Localize("assignDomain/setLanguage");
pane_domains.Title = Services.TextService.Localize("assignDomain/setDomains");
prop_language.Text = Services.TextService.Localize("assignDomain/language");
var nodeDomains = Services.DomainService.GetAssignedDomains(nodeId, true).ToArray();
var wildcard = nodeDomains.FirstOrDefault(d => d.IsWildcard);
var sb = new StringBuilder();
sb.Append("languages: [");
var i = 0;
foreach (var language in Current.Services.LocalizationService.GetAllLanguages())
sb.AppendFormat("{0}{{ \"Id\": {1}, \"Code\": \"{2}\" }}", (i++ == 0 ? "" : ","), language.Id, language.IsoCode);
sb.Append("]\r\n");
sb.AppendFormat(",language: {0}", wildcard == null ? "undefined" : wildcard.LanguageId.ToString());
sb.Append(",domains: [");
i = 0;
foreach (var domain in nodeDomains.Where(d => d.IsWildcard == false))
sb.AppendFormat("{0}{{ \"Name\": \"{1}\", \"Lang\": \"{2}\" }}", (i++ == 0 ? "" :","), domain.DomainName, domain.LanguageId);
sb.Append("]\r\n");
data.Text = sb.ToString();
}
protected int GetNodeId()
{
int nodeId;
if (int.TryParse(Request.QueryString["id"], out nodeId) == false)
nodeId = -1;
return nodeId;
}
protected string GetRestServicePath()
{
const string action = "ListDomains";
var path = Url.GetUmbracoApiService<ContentController>(action);
return path.TrimEnd(action).EnsureEndsWith('/');
}
}
}

View File

@@ -1,69 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.dialogs {
public partial class AssignDomain2 {
/// <summary>
/// data control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal data;
/// <summary>
/// feedback control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Umbraco.Web._Legacy.Controls.Feedback feedback;
/// <summary>
/// pane_language control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Umbraco.Web._Legacy.Controls.Pane pane_language;
/// <summary>
/// prop_language control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Umbraco.Web._Legacy.Controls.PropertyPanel prop_language;
/// <summary>
/// pane_domains control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Umbraco.Web._Legacy.Controls.Pane pane_domains;
/// <summary>
/// p_buttons control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl p_buttons;
}
}