From 22590afbe68637819ce639a951b98f1bd7ae050a Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Mon, 18 May 2015 03:58:37 -0700 Subject: [PATCH 01/11] password feedback changes --- .../Resources/UI.Designer.cs | 2 +- .../Resources/UI.resx | 2 +- .../App_Themes/Default/Styles/Skin.css | 71 +++++++++++++++++++ .../ExchangeContactGeneralSettings.ascx.resx | 2 +- ...zationDeletedUserGeneralSettings.ascx.resx | 2 +- .../OrganizationUserGeneralSettings.ascx.resx | 2 +- .../ExchangeContactGeneralSettings.ascx | 2 +- ...ngeContactGeneralSettings.ascx.designer.cs | 28 -------- .../ExchangeServer/ExchangeCreateMailbox.ascx | 2 +- .../OrganizationCreateUser.ascx | 2 +- ...rganizationDeletedUserGeneralSettings.ascx | 2 +- .../OrganizationUserGeneralSettings.ascx | 5 +- .../UserControls/PasswordControl.ascx | 58 ++++++++++++++- .../UserControls/PasswordControl.ascx.cs | 4 +- .../PasswordControl.ascx.designer.cs | 31 +------- .../JavaScript/jquery.poshytip.min.js | 7 ++ .../WebsitePanel.WebPortal.csproj | 1 + 17 files changed, 150 insertions(+), 73 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/JavaScript/jquery.poshytip.min.js diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs index 4c1d4299..b093a75e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs @@ -430,7 +430,7 @@ namespace WebsitePanel.WebDavPortal.Resources { } /// - /// Looks up a localized string similar to Initials. + /// Looks up a localized string similar to Middle Initial. /// public static string Initials { get { diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx index 1f4ec733..f1a4390d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx @@ -235,7 +235,7 @@ Info - Initials + Middle Initial File already exist diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css index 448cd1bb..8bb2fc07 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css @@ -379,4 +379,75 @@ p.warningText {font-size:14px; color:Red; text-align:center;} } .ui-menu-item:hover { background-color: #f0f0f0; +} + + + +.tip-bluesimple { + z-index:1000; + text-align:left; + border:1px solid #5e86aa; + border-radius:4px; + -moz-border-radius:4px; + -webkit-border-radius:4px; + min-width:50px; + max-width:300px; + color:#333; + background-color:#ffffff; + /** + * - If you set a background-image, border/padding/background-color will be ingnored. + * You can set any padding to .tip-inner instead if you need. + * - If you want a tiled background-image and border/padding for the tip, + * set the background-image to .tip-inner instead. + */ +} +.tip-bluesimple .tip-inner { + font:12px/16px arial,helvetica,sans-serif; +} + +/* Configure an arrow image - the script will automatically position it on the correct side of the tip */ +.tip-bluesimple .tip-arrow-top { + margin-top:-6px; + margin-left:-5px; /* approx. half the width to center it */ + top:0; + left:50%; + width:9px; + height:6px; +} +.tip-bluesimple .tip-arrow-right { + margin-top:-4px; /* approx. half the height to center it */ + margin-left:0; + top:50%; + left:100%; + width:6px; + height:9px; +} +.tip-bluesimple .tip-arrow-bottom { + margin-top:0; + margin-left:-5px; /* approx. half the width to center it */ + top:100%; + left:50%; + width:9px; + height:6px; +} +.tip-bluesimple .tip-arrow-left { + margin-top:-3px; /* approx. half the height to center it */ + margin-left:-6px; + top:50%; + left:0; + width:6px; + height:9px; +} + +.popover-title { +padding: 8px 14px; +margin: 0 !important; +font-size: 14px; +background-color: #f7f7f7; +border-bottom: 1px solid #ebebeb; +border-radius: 5px 5px 0 0; +} + +.popover-content { + padding:6px 8px; } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeContactGeneralSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeContactGeneralSettings.ascx.resx index ac4b01a6..6539dbf9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeContactGeneralSettings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeContactGeneralSettings.ascx.resx @@ -163,7 +163,7 @@ Home Phone: - Initials: + Middle Initial: Job Title: diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationDeletedUserGeneralSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationDeletedUserGeneralSettings.ascx.resx index 9180fb9b..c0313977 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationDeletedUserGeneralSettings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationDeletedUserGeneralSettings.ascx.resx @@ -157,7 +157,7 @@ Home Phone: - Initials: + Middle Initial: Job Title: diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx index ab9d05c4..97d921a2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx @@ -166,7 +166,7 @@ Home Phone: - Initials: + Middle Initial: Job Title: diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx index 0958c36f..edd88567 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx @@ -61,7 +61,7 @@   - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx.designer.cs index 30402103..12bec3b9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeContactGeneralSettings.ascx.designer.cs @@ -1,31 +1,3 @@ -// Copyright (c) 2015, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - //------------------------------------------------------------------------------ // // This code was generated by a tool. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx index 55926fa6..2a117368 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx @@ -73,7 +73,7 @@   - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx index 8f4282d1..0c857e01 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx @@ -47,7 +47,7 @@   - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationDeletedUserGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationDeletedUserGeneralSettings.ascx index 664293e5..78dea510 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationDeletedUserGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationDeletedUserGeneralSettings.ascx @@ -77,7 +77,7 @@   - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx index dad039a0..65998382 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx @@ -95,7 +95,7 @@   - + @@ -294,4 +294,5 @@ - \ No newline at end of file + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx index be120dae..02f5e3c4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx @@ -9,7 +9,8 @@ Generate random - + + @@ -18,7 +19,7 @@ meta:resourcekey="valRequireConfirmPassword" ErrorMessage="*" ControlToValidate="txtConfirmPassword" SetFocusOnError="True"> - + @@ -33,4 +34,55 @@ ClientValidationFunction="wspValidatePasswordSymbols" OnServerValidate="valRequireSymbols_ServerValidate"> - \ No newline at end of file + + + +<% if (ValidationEnabled) + {%> + +<% }%> + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs index d297936e..c6879b35 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs @@ -277,7 +277,9 @@ namespace WebsitePanel.Portal return ((matches != null) && matches.length >= minMatches); } ", true); - + + + Page.ClientScript.RegisterClientScriptInclude("jqueryui-tooltip", ResolveUrl("~/JavaScript/jquery.poshytip.min.js")); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.designer.cs index 113b3729..47c7e325 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.designer.cs @@ -1,38 +1,9 @@ -// Copyright (c) 2015, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.1873 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/JavaScript/jquery.poshytip.min.js b/WebsitePanel/Sources/WebsitePanel.WebPortal/JavaScript/jquery.poshytip.min.js new file mode 100644 index 00000000..e057cf26 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/JavaScript/jquery.poshytip.min.js @@ -0,0 +1,7 @@ +/* + * Poshy Tip jQuery plugin v1.2 + * http://vadikom.com/tools/poshy-tip-jquery-plugin-for-stylish-tooltips/ + * Copyright 2010-2013, Vasil Dinkov, http://vadikom.com/ + */ + +(function(e){var a=[],d=/^url\(["']?([^"'\)]*)["']?\);?$/i,c=/\.png$/i,b=!!window.createPopup&&document.documentElement.currentStyle.minWidth=="undefined";function f(){e.each(a,function(){this.refresh(true)})}e(window).resize(f);e.Poshytip=function(h,g){this.$elm=e(h);this.opts=e.extend({},e.fn.poshytip.defaults,g);this.$tip=e(['
','
','
',"
"].join("")).appendTo(document.body);this.$arrow=this.$tip.find("div.tip-arrow");this.$inner=this.$tip.find("div.tip-inner");this.disabled=false;this.content=null;this.init()};e.Poshytip.prototype={init:function(){a.push(this);var g=this.$elm.attr("title");this.$elm.data("title.poshytip",g!==undefined?g:null).data("poshytip",this);if(this.opts.showOn!="none"){this.$elm.bind({"mouseenter.poshytip":e.proxy(this.mouseenter,this),"mouseleave.poshytip":e.proxy(this.mouseleave,this)});switch(this.opts.showOn){case"hover":if(this.opts.alignTo=="cursor"){this.$elm.bind("mousemove.poshytip",e.proxy(this.mousemove,this))}if(this.opts.allowTipHover){this.$tip.hover(e.proxy(this.clearTimeouts,this),e.proxy(this.mouseleave,this))}break;case"focus":this.$elm.bind({"focus.poshytip":e.proxy(this.showDelayed,this),"blur.poshytip":e.proxy(this.hideDelayed,this)});break}}},mouseenter:function(g){if(this.disabled){return true}this.$elm.attr("title","");if(this.opts.showOn=="focus"){return true}this.showDelayed()},mouseleave:function(g){if(this.disabled||this.asyncAnimating&&(this.$tip[0]===g.relatedTarget||jQuery.contains(this.$tip[0],g.relatedTarget))){return true}if(!this.$tip.data("active")){var h=this.$elm.data("title.poshytip");if(h!==null){this.$elm.attr("title",h)}}if(this.opts.showOn=="focus"){return true}this.hideDelayed()},mousemove:function(g){if(this.disabled){return true}this.eventX=g.pageX;this.eventY=g.pageY;if(this.opts.followCursor&&this.$tip.data("active")){this.calcPos();this.$tip.css({left:this.pos.l,top:this.pos.t});if(this.pos.arrow){this.$arrow[0].className="tip-arrow tip-arrow-"+this.pos.arrow}}},show:function(){if(this.disabled||this.$tip.data("active")){return}this.reset();this.update();if(!this.content){return}this.display();if(this.opts.timeOnScreen){this.hideDelayed(this.opts.timeOnScreen)}},showDelayed:function(g){this.clearTimeouts();this.showTimeout=setTimeout(e.proxy(this.show,this),typeof g=="number"?g:this.opts.showTimeout)},hide:function(){if(this.disabled||!this.$tip.data("active")){return}this.display(true)},hideDelayed:function(g){this.clearTimeouts();this.hideTimeout=setTimeout(e.proxy(this.hide,this),typeof g=="number"?g:this.opts.hideTimeout)},reset:function(){this.$tip.queue([]).detach().css("visibility","hidden").data("active",false);this.$inner.find("*").poshytip("hide");if(this.opts.fade){this.$tip.css("opacity",this.opacity)}this.$arrow[0].className="tip-arrow tip-arrow-top tip-arrow-right tip-arrow-bottom tip-arrow-left";this.asyncAnimating=false},update:function(j,k){if(this.disabled){return}var i=j!==undefined;if(i){if(!k){this.opts.content=j}if(!this.$tip.data("active")){return}}else{j=this.opts.content}var h=this,g=typeof j=="function"?j.call(this.$elm[0],function(l){h.update(l)}):j=="[title]"?this.$elm.data("title.poshytip"):j;if(this.content!==g){this.$inner.empty().append(g);this.content=g}this.refresh(i)},refresh:function(h){if(this.disabled){return}if(h){if(!this.$tip.data("active")){return}var k={left:this.$tip.css("left"),top:this.$tip.css("top")}}this.$tip.css({left:0,top:0}).appendTo(document.body);if(this.opacity===undefined){this.opacity=this.$tip.css("opacity")}var l=this.$tip.css("background-image").match(d),m=this.$arrow.css("background-image").match(d);if(l){var i=c.test(l[1]);if(b&&i){this.$tip.css("background-image","none");this.$inner.css({margin:0,border:0,padding:0});l=i=false}else{this.$tip.prepend('
').css({border:0,padding:0,"background-image":"none","background-color":"transparent"}).find(".tip-bg-image").css("background-image",'url("'+l[1]+'")').end().find("td").eq(3).append(this.$inner)}if(i&&!e.support.opacity){this.opts.fade=false}}if(m&&!e.support.opacity){if(b&&c.test(m[1])){m=false;this.$arrow.css("background-image","none")}this.opts.fade=false}var o=this.$tip.find("> table.tip-table");if(b){this.$tip[0].style.width="";o.width("auto").find("td").eq(3).width("auto");var n=this.$tip.width(),j=parseInt(this.$tip.css("min-width")),g=parseInt(this.$tip.css("max-width"));if(!isNaN(j)&&ng){n=g}}this.$tip.add(o).width(n).eq(0).find("td").eq(3).width("100%")}else{if(o[0]){o.width("auto").find("td").eq(3).width("auto").end().end().width(document.defaultView&&document.defaultView.getComputedStyle&&parseFloat(document.defaultView.getComputedStyle(this.$tip[0],null).width)||this.$tip.width()).find("td").eq(3).width("100%")}}this.tipOuterW=this.$tip.outerWidth();this.tipOuterH=this.$tip.outerHeight();this.calcPos();if(m&&this.pos.arrow){this.$arrow[0].className="tip-arrow tip-arrow-"+this.pos.arrow;this.$arrow.css("visibility","inherit")}if(h&&this.opts.refreshAniDuration){this.asyncAnimating=true;var p=this;this.$tip.css(k).animate({left:this.pos.l,top:this.pos.t},this.opts.refreshAniDuration,function(){p.asyncAnimating=false})}else{this.$tip.css({left:this.pos.l,top:this.pos.t})}},display:function(h){var i=this.$tip.data("active");if(i&&!h||!i&&h){return}this.$tip.stop();if((this.opts.slide&&this.pos.arrow||this.opts.fade)&&(h&&this.opts.hideAniDuration||!h&&this.opts.showAniDuration)){var n={},m={};if(this.opts.slide&&this.pos.arrow){var l,g;if(this.pos.arrow=="bottom"||this.pos.arrow=="top"){l="top";g="bottom"}else{l="left";g="right"}var k=parseInt(this.$tip.css(l));n[l]=k+(h?0:(this.pos.arrow==g?-this.opts.slideOffset:this.opts.slideOffset));m[l]=k+(h?(this.pos.arrow==g?this.opts.slideOffset:-this.opts.slideOffset):0)+"px"}if(this.opts.fade){n.opacity=h?this.$tip.css("opacity"):0;m.opacity=h?0:this.opacity}this.$tip.css(n).animate(m,this.opts[h?"hideAniDuration":"showAniDuration"])}h?this.$tip.queue(e.proxy(this.reset,this)):this.$tip.css("visibility","inherit");if(i){var j=this.$elm.data("title.poshytip");if(j!==null){this.$elm.attr("title",j)}}this.$tip.data("active",!i)},disable:function(){this.reset();this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.reset();this.$tip.remove();delete this.$tip;this.content=null;this.$elm.unbind(".poshytip").removeData("title.poshytip").removeData("poshytip");a.splice(e.inArray(this,a),1)},clearTimeouts:function(){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}},calcPos:function(){var n={l:0,t:0,arrow:""},h=e(window),k={l:h.scrollLeft(),t:h.scrollTop(),w:h.width(),h:h.height()},p,j,m,i,q,g;if(this.opts.alignTo=="cursor"){p=j=m=this.eventX;i=q=g=this.eventY}else{var o=this.$elm.offset(),l={l:o.left,t:o.top,w:this.$elm.outerWidth(),h:this.$elm.outerHeight()};p=l.l+(this.opts.alignX!="inner-right"?0:l.w);j=p+Math.floor(l.w/2);m=p+(this.opts.alignX!="inner-left"?l.w:0);i=l.t+(this.opts.alignY!="inner-bottom"?0:l.h);q=i+Math.floor(l.h/2);g=i+(this.opts.alignY!="inner-top"?l.h:0)}switch(this.opts.alignX){case"right":case"inner-left":n.l=m+this.opts.offsetX;if(this.opts.keepInViewport&&n.l+this.tipOuterW>k.l+k.w){n.l=k.l+k.w-this.tipOuterW}if(this.opts.alignX=="right"||this.opts.alignY=="center"){n.arrow="left"}break;case"center":n.l=j-Math.floor(this.tipOuterW/2);if(this.opts.keepInViewport){if(n.l+this.tipOuterW>k.l+k.w){n.l=k.l+k.w-this.tipOuterW}else{if(n.lk.t+k.h){n.t=i-this.tipOuterH-this.opts.offsetY;if(n.arrow=="top"){n.arrow="bottom"}}break;case"center":n.t=q-Math.floor(this.tipOuterH/2);if(this.opts.keepInViewport){if(n.t+this.tipOuterH>k.t+k.h){n.t=k.t+k.h-this.tipOuterH}else{if(n.t',"div.",j.className,"{visibility:hidden;position:absolute;top:0;left:0;}","div.",j.className," table.tip-table, div.",j.className," table.tip-table td{margin:0;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;font-variant:inherit;vertical-align:middle;}","div.",j.className," td.tip-bg-image span{display:block;font:1px/1px sans-serif;height:",j.bgImageFrameSize,"px;width:",j.bgImageFrameSize,"px;overflow:hidden;}","div.",j.className," td.tip-right{background-position:100% 0;}","div.",j.className," td.tip-bottom{background-position:100% 100%;}","div.",j.className," td.tip-left{background-position:0 100%;}","div.",j.className," div.tip-inner{background-position:-",j.bgImageFrameSize,"px -",j.bgImageFrameSize,"px;}","div.",j.className," div.tip-arrow{visibility:hidden;position:absolute;overflow:hidden;font:1px/1px sans-serif;}",""].join("")).appendTo("head")}if(j.liveEvents&&j.showOn!="none"){var i,k=e.extend({},j,{liveEvents:false});switch(j.showOn){case"hover":i=function(){var m=e(this);if(!m.data("poshytip")){m.poshytip(k).poshytip("mouseenter")}};this.live?this.live("mouseenter.poshytip",i):e(document).delegate(this.selector,"mouseenter.poshytip",i);break;case"focus":i=function(){var m=e(this);if(!m.data("poshytip")){m.poshytip(k).poshytip("showDelayed")}};this.live?this.live("focus.poshytip",i):e(document).delegate(this.selector,"focus.poshytip",i);break}return this}return this.each(function(){new e.Poshytip(this,j)})};e.fn.poshytip.defaults={content:"[title]",className:"tip-yellow",bgImageFrameSize:10,showTimeout:500,hideTimeout:100,timeOnScreen:0,showOn:"hover",liveEvents:false,alignTo:"cursor",alignX:"right",alignY:"top",offsetX:-22,offsetY:18,keepInViewport:true,allowTipHover:true,followCursor:false,fade:true,slide:true,slideOffset:8,showAniDuration:300,hideAniDuration:300,refreshAniDuration:200}})(jQuery); \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj index 385f2d7d..d0921a2f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj @@ -241,6 +241,7 @@ + From 0ff8fa899600b5af21a0d8cf21b7df14f2693b0f Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 18 May 2015 11:04:01 -0400 Subject: [PATCH 02/11] Added tag build-2.1.0.726 for changeset 6208e4867779 From fc2abbd92cde3f5054bbb535b1bab57f91ff753d Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 18 May 2015 19:44:13 -0400 Subject: [PATCH 03/11] Added tag build-2.1.0.727 for changeset 853491dd56c4 From 492394675db2397f7ed2c8163f31302cef22ce3c Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 19 May 2015 07:39:42 -0400 Subject: [PATCH 04/11] Added tag build-2.1.0.729 for changeset 7ebcec15abfd From bba637b6890d6688e6cf907e8a507eb01fc893b1 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Wed, 20 May 2015 07:06:02 -0400 Subject: [PATCH 05/11] Added tag build-2.1.0.730 for changeset 1498b9c5d37d From 659bf1c990b714873312a7f32d4a633f79fb7460 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Wed, 20 May 2015 07:27:34 -0700 Subject: [PATCH 06/11] Allow collections import checkbox location changed --- .../RemoteDesktopServicesProxy.cs | 72 +++++++++++++++++++ .../RemoteDesktopServicesController.cs | 5 ++ .../esRemoteDesktopServices.asmx.cs | 6 ++ .../RdsServerSettings.cs | 2 +- .../App_LocalResources/RDS_Settings.ascx.resx | 3 + .../ProviderControls/RDS_Settings.ascx | 7 +- .../ProviderControls/RDS_Settings.ascx.cs | 9 ++- .../RDS_Settings.ascx.designer.cs | 9 +++ .../WebsitePanel/RDS/RDSCollections.ascx.cs | 20 +++++- .../WebsitePanel/SettingsRdsPolicy.ascx | 11 --- .../WebsitePanel/SettingsRdsPolicy.ascx.cs | 6 +- .../SettingsRdsPolicy.ascx.designer.cs | 27 ------- .../WebsitePanel.Portal.Modules.csproj | 4 +- 13 files changed, 133 insertions(+), 48 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs index a273af30..7c345ef6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs @@ -141,6 +141,8 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback ImportCollectionOperationCompleted; + private System.Threading.SendOrPostCallback GetRemoteDesktopServiceIdOperationCompleted; + /// public esRemoteDesktopServices() { this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx"; @@ -311,6 +313,9 @@ namespace WebsitePanel.EnterpriseServer { /// public event ImportCollectionCompletedEventHandler ImportCollectionCompleted; + /// + public event GetRemoteDesktopServiceIdCompletedEventHandler GetRemoteDesktopServiceIdCompleted; + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public RdsCollection GetRdsCollection(int collectionId) { @@ -2772,6 +2777,47 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRemoteDesktopServiceId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int GetRemoteDesktopServiceId(int itemId) { + object[] results = this.Invoke("GetRemoteDesktopServiceId", new object[] { + itemId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginGetRemoteDesktopServiceId(int itemId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetRemoteDesktopServiceId", new object[] { + itemId}, callback, asyncState); + } + + /// + public int EndGetRemoteDesktopServiceId(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void GetRemoteDesktopServiceIdAsync(int itemId) { + this.GetRemoteDesktopServiceIdAsync(itemId, null); + } + + /// + public void GetRemoteDesktopServiceIdAsync(int itemId, object userState) { + if ((this.GetRemoteDesktopServiceIdOperationCompleted == null)) { + this.GetRemoteDesktopServiceIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRemoteDesktopServiceIdOperationCompleted); + } + this.InvokeAsync("GetRemoteDesktopServiceId", new object[] { + itemId}, this.GetRemoteDesktopServiceIdOperationCompleted, userState); + } + + private void OnGetRemoteDesktopServiceIdOperationCompleted(object arg) { + if ((this.GetRemoteDesktopServiceIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetRemoteDesktopServiceIdCompleted(this, new GetRemoteDesktopServiceIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// public new void CancelAsync(object userState) { base.CancelAsync(userState); @@ -4207,4 +4253,30 @@ namespace WebsitePanel.EnterpriseServer { } } } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetRemoteDesktopServiceIdCompletedEventHandler(object sender, GetRemoteDesktopServiceIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRemoteDesktopServiceIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetRemoteDesktopServiceIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index 88bb4567..ba91ef4a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -56,6 +56,11 @@ namespace WebsitePanel.EnterpriseServer } + public static int GetRemoteDesktopServiceId(int itemId) + { + return GetRdsServiceId(itemId); + } + public static RdsCollection GetRdsCollection(int collectionId) { return GetRdsCollectionInternal(collectionId); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs index e509dd99..8507c3e5 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs @@ -392,5 +392,11 @@ namespace WebsitePanel.EnterpriseServer { return RemoteDesktopServicesController.ImportCollection(itemId, collectionName); } + + [WebMethod] + public int GetRemoteDesktopServiceId(int itemId) + { + return RemoteDesktopServicesController.GetRemoteDesktopServiceId(itemId); + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerSettings.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerSettings.cs index c132a79f..73acb7a3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerSettings.cs @@ -48,7 +48,7 @@ namespace WebsitePanel.EnterpriseServer.Base.RDS public const string DISABLE_CMD = "DisableCMD"; public const string DISABLE_CMD_ADMINISTRATORS = "DisableCMDAdministrators"; public const string DISABLE_CMD_USERS = "DisableCMDUsers"; - public const string ALLOWCONNECTIONSIMPORT = "AllowConnectionsImport"; + public const string ALLOWCOLLECTIONSIMPORT = "AllowCollectionsImport"; public string SettingsName { get; set; } public int ServerId { get; set; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/RDS_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/RDS_Settings.ascx.resx index dd9c465d..f35bb026 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/RDS_Settings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/RDS_Settings.ascx.resx @@ -147,4 +147,7 @@ Computers Root OU: + + Allow Collections Import + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx index 415fd085..c317985a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx @@ -57,7 +57,12 @@
- +
+ + +
+ +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs index 8806b61d..5eda17cc 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs @@ -32,13 +32,14 @@ using System.Collections.Generic; using System.Security.Cryptography.X509Certificates; using System.Web.UI.WebControls; using WebsitePanel.EnterpriseServer; +using WebsitePanel.EnterpriseServer.Base.RDS; using WebsitePanel.Providers.Common; using WebsitePanel.Providers.RemoteDesktopServices; namespace WebsitePanel.Portal.ProviderControls { public partial class RDS_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings - { + { protected void Page_Load(object sender, EventArgs e) { FillCertificateInfo(); @@ -98,6 +99,11 @@ namespace WebsitePanel.Portal.ProviderControls txtCentralNPS.Enabled = false; txtCentralNPS.Text = string.Empty; } + + if (!string.IsNullOrEmpty(settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT])) + { + cbCollectionsImport.Checked = Convert.ToBoolean(settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT]); + } } public void SaveSettings(System.Collections.Specialized.StringDictionary settings) @@ -108,6 +114,7 @@ namespace WebsitePanel.Portal.ProviderControls settings["PrimaryDomainController"] = txtPrimaryDomainController.Text; settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString(); settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty; + settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT] = cbCollectionsImport.Checked.ToString(); settings["GWServrsList"] = GWServers; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs index 81ceb1a6..491c9736 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs @@ -84,6 +84,15 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::System.Web.UI.WebControls.Label lblExpiryDate; + /// + /// cbCollectionsImport control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbCollectionsImport; + /// /// lblConnectionBroker control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.cs index 7fc90d67..accb1fe3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx.cs @@ -27,6 +27,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using System; +using System.Collections.Specialized; using System.Linq; using System.Web.UI.WebControls; using WebsitePanel.EnterpriseServer; @@ -55,8 +56,10 @@ namespace WebsitePanel.Portal.RDS btnAddCollection.Enabled = (!(cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue <= gvRDSCollections.Rows.Count) || (cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue == -1)); } - var defaultSettings = ES.Services.Users.GetUserSettings(PanelSecurity.EffectiveUserId, UserSettings.RDS_POLICY); - var allowImport = Convert.ToBoolean(defaultSettings[RdsServerSettings.ALLOWCONNECTIONSIMPORT]); + var serviceId = ES.Services.RDS.GetRemoteDesktopServiceId(PanelRequest.ItemID); + var settings = ConvertArrayToDictionary(ES.Services.Servers.GetServiceSettings(serviceId)); + + var allowImport = Convert.ToBoolean(settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT]); if (!allowImport) { @@ -64,6 +67,8 @@ namespace WebsitePanel.Portal.RDS } } + + private void BindQuota(PackageContext cntx) { OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID); @@ -142,5 +147,16 @@ namespace WebsitePanel.Portal.RDS { return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID); } + + private StringDictionary ConvertArrayToDictionary(string[] settings) + { + StringDictionary r = new StringDictionary(); + foreach (string setting in settings) + { + int idx = setting.IndexOf('='); + r.Add(setting.Substring(0, idx), setting.Substring(idx + 1)); + } + return r; + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx index a197dc73..7e2de954 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx @@ -181,14 +181,3 @@

- - - - - - -
- -
-
-
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.cs index e4cb2829..5d10f450 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.cs @@ -52,8 +52,7 @@ namespace WebsitePanel.Portal cbDisableCmdAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_CMD_ADMINISTRATORS]); cbDisableCmdUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_CMD_USERS]); - ddTreshold.SelectedValue = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE]; - cbAllowImport.Checked = Convert.ToBoolean(settings[RdsServerSettings.ALLOWCONNECTIONSIMPORT]); + ddTreshold.SelectedValue = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE]; } public void SaveSettings(UserSettings settings) @@ -81,8 +80,7 @@ namespace WebsitePanel.Portal settings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_ADMINISTRATORS] = cbControlSessionAdministrators.Checked.ToString(); settings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_Users] = cbControlSessionUsers.Checked.ToString(); settings[RdsServerSettings.DISABLE_CMD_ADMINISTRATORS] = cbDisableCmdAdministrators.Checked.ToString(); - settings[RdsServerSettings.DISABLE_CMD_USERS] = cbDisableCmdUsers.Checked.ToString(); - settings[RdsServerSettings.ALLOWCONNECTIONSIMPORT] = cbAllowImport.Checked.ToString(); + settings[RdsServerSettings.DISABLE_CMD_USERS] = cbDisableCmdUsers.Checked.ToString(); } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.designer.cs index d1eea2a7..9ecc5ff4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.designer.cs @@ -443,32 +443,5 @@ namespace WebsitePanel.Portal { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CheckBox cbDisableCmdAdministrators; - - /// - /// secAllowImport control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::WebsitePanel.Portal.CollapsiblePanel secAllowImport; - - /// - /// allowImportPanel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel allowImportPanel; - - /// - /// cbAllowImport control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox cbAllowImport; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index e6c1c930..12466ab5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -6538,7 +6538,9 @@ Designer - + + Designer + Designer From ac77b7564ae9c18199dbb8d5517e5c58487cf718 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Wed, 20 May 2015 11:30:25 -0400 Subject: [PATCH 07/11] Added tag build-2.1.0.731 for changeset 1df9bccc82aa From 95f0fefa5bc9417ba8b8699dcf107bb817ca862a Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Wed, 20 May 2015 12:05:29 -0400 Subject: [PATCH 08/11] Added tag build-2.1.0.732 for changeset 6e93314fc30d From 6320eee5d5c7dbbdc323c8756fcf8d9581cf70ba Mon Sep 17 00:00:00 2001 From: Alexander Trofimov Date: Thu, 21 May 2015 12:04:16 +0300 Subject: [PATCH 09/11] HyperV-R2 fixes --- .../SetupNetworkAdapterModule.cs | 2 +- .../Sources/WebsitePanel.VmConfig/App.config | 2 +- .../HyperV2012R2.cs | 28 +++++++++++++------ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/WebsitePanel.VmConfig/Sources/WebsitePanel.VmConfig.Common/SetupNetworkAdapterModule.cs b/WebsitePanel.VmConfig/Sources/WebsitePanel.VmConfig.Common/SetupNetworkAdapterModule.cs index f89e0ccc..10368789 100644 --- a/WebsitePanel.VmConfig/Sources/WebsitePanel.VmConfig.Common/SetupNetworkAdapterModule.cs +++ b/WebsitePanel.VmConfig/Sources/WebsitePanel.VmConfig.Common/SetupNetworkAdapterModule.cs @@ -91,7 +91,7 @@ namespace WebsitePanel.VmConfig } attempts++; - Log.WriteError(string.Format("Attempt #{0} to find network adapter failed!", attempts)); + Log.WriteError(string.Format("Attempt #{0} to find network adapter (mac: {1}) failed!", attempts, macAddress)); // wait 1 min System.Threading.Thread.Sleep(60000); //repeat loop diff --git a/WebsitePanel.VmConfig/Sources/WebsitePanel.VmConfig/App.config b/WebsitePanel.VmConfig/Sources/WebsitePanel.VmConfig/App.config index 91660b84..02e7119e 100644 --- a/WebsitePanel.VmConfig/Sources/WebsitePanel.VmConfig/App.config +++ b/WebsitePanel.VmConfig/Sources/WebsitePanel.VmConfig/App.config @@ -6,7 +6,7 @@ - + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/HyperV2012R2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/HyperV2012R2.cs index e36bf665..6670be2b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/HyperV2012R2.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/HyperV2012R2.cs @@ -228,21 +228,31 @@ namespace WebsitePanel.Providers.Virtualization try { - Command cmd = new Command("Get-VM"); + HostedSolutionLog.LogInfo("Before Get-VM command"); + Command cmd = new Command("Get-VM"); Collection result = PowerShell.Execute(cmd, true); + + HostedSolutionLog.LogInfo("After Get-VM command"); foreach (PSObject current in result) { - VirtualMachine vm = new VirtualMachine - { - VirtualMachineId = current.GetProperty("Id").ToString(), - Name = current.GetString("Name"), - State = current.GetEnum("State"), - Uptime = Convert.ToInt64(current.GetProperty("UpTime").TotalMilliseconds), - ReplicationState = current.GetEnum("ReplicationState") - }; + HostedSolutionLog.LogInfo("- start VM -"); + var vm = new VirtualMachine(); + HostedSolutionLog.LogInfo("create"); + vm.VirtualMachineId = current.GetProperty("Id").ToString(); + HostedSolutionLog.LogInfo("VirtualMachineId {0}", vm.VirtualMachineId); + vm.Name = current.GetString("Name"); + HostedSolutionLog.LogInfo("Name {0}", vm.Name); + vm.State = current.GetEnum("State"); + HostedSolutionLog.LogInfo("State {0}", vm.State); + vm.Uptime = Convert.ToInt64(current.GetProperty("UpTime").TotalMilliseconds); + HostedSolutionLog.LogInfo("Uptime {0}", vm.Uptime); + vm.ReplicationState = current.GetEnum("ReplicationState"); + HostedSolutionLog.LogInfo("ReplicationState {0}", vm.ReplicationState); vmachines.Add(vm); + HostedSolutionLog.LogInfo("- end VM -"); } + HostedSolutionLog.LogInfo("Finish"); } catch (Exception ex) { From 013a9c16d7d4ad802e0825f0b17809b757bd22ab Mon Sep 17 00:00:00 2001 From: doctogonzo Date: Thu, 21 May 2015 11:16:30 +0200 Subject: [PATCH 10/11] quick search: autocomplete fix --- WebsitePanel/Database/update_db.sql | 95 +++++++++++++++++++---------- 1 file changed, 64 insertions(+), 31 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index dbe9c447..5b9305ad 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -12232,12 +12232,8 @@ DECLARE @Users TABLE UserID int ) INSERT INTO @Users (UserID) -SELECT ' - -IF @OnlyFind = 1 -SET @sqlUsers = @sqlUsers + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' ' - -SET @sqlUsers = @sqlUsers + 'U.UserID +SELECT + U.UserID FROM UsersDetailed AS U WHERE U.UserID <> @UserID AND U.IsPeer = 0 AND @@ -12249,8 +12245,12 @@ WHERE AND ((@RoleID = 0) OR (@RoleID > 0 AND U.RoleID = @RoleID)) AND @HasUserRights = 1 SET @curValue = cursor local for -SELECT - U.ItemID, +SELECT ' + +IF @OnlyFind = 1 +SET @sqlUsers = @sqlUsers + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' ' + +SET @sqlUsers = @sqlUsers + 'U.ItemID, U.TextSearch, U.ColumnType, ''Users'' as FullType, @@ -12274,8 +12274,10 @@ SELECT U3.UserID as ItemID, U3.FirstName + '' '' + U3.LastName as TextSearch, @c FROM dbo.Users AS U3) as U WHERE TextSearch<>'' '' OR ISNULL(TextSearch, 0) > 0 ) - AS U ON TU.UserID = U.ItemID - ORDER BY TextSearch' + AS U ON TU.UserID = U.ItemID' +IF @FilterValue <> '' + SET @sqlUsers = @sqlUsers + ' WHERE TextSearch LIKE ''' + @FilterValue + '''' +SET @sqlUsers = @sqlUsers + ' ORDER BY TextSearch' SET @sqlUsers = @sqlUsers + ' open @curValue' @@ -12288,12 +12290,8 @@ SET @sqlSpace = ' ItemID int ) INSERT INTO @ItemsService (ItemID) - SELECT ' - -IF @OnlyFind = 1 -SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' ' - -SET @sqlSpace = @sqlSpace + 'SI.ItemID + SELECT + SI.ItemID FROM ServiceItems AS SI INNER JOIN Packages AS P ON P.PackageID = SI.PackageID INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID @@ -12313,8 +12311,12 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID dbo.CheckUserParent(@UserID, P.UserID) = 1 SET @curValue = cursor local for - SELECT - + SELECT ' + +IF @OnlyFind = 1 +SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' ' + +SET @sqlSpace = @sqlSpace + ' SI.ItemID as ItemID, SI.ItemName as TextSearch, STYPE.DisplayName as ColumnType, @@ -12324,9 +12326,17 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID FROM @ItemsService AS I INNER JOIN ServiceItems AS SI ON I.ItemID = SI.ItemID INNER JOIN ServiceItemTypes AS STYPE ON SI.ItemTypeID = STYPE.ItemTypeID - WHERE STYPE.Searchable = 1 + WHERE (STYPE.Searchable = 1)' +IF @FilterValue <> '' + SET @sqlSpace = @sqlSpace + ' AND (SI.ItemName LIKE ''' + @FilterValue + ''')' +SET @sqlSpace = @sqlSpace + ' UNION ( - SELECT + SELECT ' + +IF @OnlyFind = 1 +SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' ' + +SET @sqlSpace = @sqlSpace + ' D.DomainID AS ItemID, D.DomainName as TextSearch, ''Domain'' as ColumnType, @@ -12335,9 +12345,17 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID 0 as AccountID FROM @ItemsDomain AS I INNER JOIN Domains AS D ON I.ItemID = D.DomainID - WHERE D.IsDomainPointer=0 + WHERE (D.IsDomainPointer=0)' +IF @FilterValue <> '' + SET @sqlSpace = @sqlSpace + ' AND (D.DomainName LIKE ''' + @FilterValue + ''')' +SET @sqlSpace = @sqlSpace + ' UNION - SELECT + SELECT ' + +IF @OnlyFind = 1 +SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' ' + +SET @sqlSpace = @sqlSpace + ' EA.ItemID AS ItemID, EA.DisplayName as TextSearch, ''ExchangeAccount'' as ColumnType, @@ -12346,9 +12364,17 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID EA.AccountID as AccountID FROM @ItemsService AS I2 INNER JOIN ServiceItems AS SI2 ON I2.ItemID = SI2.ItemID - INNER JOIN ExchangeAccounts AS EA ON I2.ItemID = EA.ItemID + INNER JOIN ExchangeAccounts AS EA ON I2.ItemID = EA.ItemID' +IF @FilterValue <> '' + SET @sqlSpace = @sqlSpace + ' WHERE (EA.DisplayName LIKE ''' + @FilterValue + ''')' +SET @sqlSpace = @sqlSpace + ' UNION - SELECT + SELECT ' + +IF @OnlyFind = 1 +SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' ' + +SET @sqlSpace = @sqlSpace + ' EA4.ItemID AS ItemID, EA4.PrimaryEmailAddress as TextSearch, ''ExchangeAccount'' as ColumnType, @@ -12357,9 +12383,17 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID EA4.AccountID as AccountID FROM @ItemsService AS I4 INNER JOIN ServiceItems AS SI4 ON I4.ItemID = SI4.ItemID - INNER JOIN ExchangeAccounts AS EA4 ON I4.ItemID = EA4.ItemID + INNER JOIN ExchangeAccounts AS EA4 ON I4.ItemID = EA4.ItemID' +IF @FilterValue <> '' + SET @sqlSpace = @sqlSpace + ' WHERE (EA4.PrimaryEmailAddress LIKE ''' + @FilterValue + ''')' +SET @sqlSpace = @sqlSpace + ' UNION - SELECT + SELECT ' + +IF @OnlyFind = 1 +SET @sqlSpace = @sqlSpace + 'TOP ' + CAST(@MaximumRows AS varchar(12)) + ' ' + +SET @sqlSpace = @sqlSpace + ' EA3.ItemID AS ItemID, EAEA.EmailAddress as TextSearch, ''ExchangeAccount'' as ColumnType, @@ -12369,8 +12403,10 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID FROM @ItemsService AS I3 INNER JOIN ServiceItems AS SI3 ON I3.ItemID = SI3.ItemID INNER JOIN ExchangeAccounts AS EA3 ON I3.ItemID = EA3.ItemID - INNER JOIN ExchangeAccountEmailAddresses AS EAEA ON I3.ItemID = EAEA.AccountID) - ORDER BY TextSearch'; + INNER JOIN ExchangeAccountEmailAddresses AS EAEA ON I3.ItemID = EAEA.AccountID' +IF @FilterValue <> '' + SET @sqlSpace = @sqlSpace + ' WHERE (EAEA.EmailAddress LIKE ''' + @FilterValue + ''')' +SET @sqlSpace = @sqlSpace + ') ORDER BY TextSearch'; SET @sqlSpace = @sqlSpace + ' open @curValue' @@ -12434,9 +12470,6 @@ SET @sqlReturn = @sqlReturn + ' AND IA.ColumnType in ( ' + @ColType + ' ) '; IF @FullType <> '' SET @sqlReturn = @sqlReturn + ' AND IA.FullType = ''' + @FullType + ''''; -IF @FilterValue <> '' -SET @sqlReturn = @sqlReturn + ' AND IA.' + @FilterColumn + ' LIKE @FilterValue ' - SET @sqlReturn = @sqlReturn + ' SELECT COUNT(ItemID) FROM @ItemsReturn; SELECT DISTINCT(ColumnType) FROM @ItemsReturn WHERE (1 = 1) '; From 42f5f3bbf6ba0a55b9cdb813b0921cdd8659ddef Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Thu, 21 May 2015 12:53:30 +0300 Subject: [PATCH 11/11] fix WebsitePanel.Import.Enterprise --- .../ApplicationForm.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/ApplicationForm.cs b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/ApplicationForm.cs index fda8ddab..b3234f0f 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/ApplicationForm.cs +++ b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/ApplicationForm.cs @@ -285,10 +285,22 @@ namespace WebsitePanel.Import.Enterprise case "group": if (child.Properties["mail"] != null) email = (string)child.Properties["mail"].Value; - if ((typeProp != null) && (typeProp.Value != null) && (1073741833 == (int)typeProp.Value)) + + bool isDistributionList = false; + + if ((typeProp != null) && (typeProp.Value != null) && (1073741833 == (int)typeProp.Value)) + isDistributionList = true; + + if (typeDetails == 262144) + isDistributionList = true; + + if (typeDetails == 0) + isDistributionList = true; + + if (isDistributionList) { //Universal Security Group - type = "Mail-Enabled Universal Security Group"; + type = "Distribution List"; //email PropertyValueCollection proxyAddresses = child.Properties["proxyAddresses"]; if (proxyAddresses != null)