quick search: exchange accounts search fix

This commit is contained in:
doctogonzo 2015-05-20 17:19:52 +02:00
parent 2942a7eab6
commit 65026b745d
4 changed files with 28 additions and 15 deletions

View file

@ -12216,7 +12216,7 @@ SET @columnFullName = 'FullName'
DECLARE @curUsers cursor
DECLARE @curSpace cursor
DECLARE @sqlSpace nvarchar(2000)
DECLARE @sqlSpace nvarchar(3000)
DECLARE @sqlUsers nvarchar(2000)
DECLARE @sqlReturn nvarchar(4000)
@ -12325,7 +12325,7 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID
INNER JOIN ServiceItems AS SI ON I.ItemID = SI.ItemID
INNER JOIN ServiceItemTypes AS STYPE ON SI.ItemTypeID = STYPE.ItemTypeID
WHERE STYPE.Searchable = 1
UNION
UNION (
SELECT
D.DomainID AS ItemID,
D.DomainName as TextSearch,
@ -12339,14 +12339,37 @@ SET @sqlSpace = @sqlSpace + 'SI.ItemID
UNION
SELECT
EA.ItemID AS ItemID,
EA.AccountName as TextSearch,
EA.DisplayName as TextSearch,
''ExchangeAccount'' as ColumnType,
''ExchangeAccountMailbox'' as FullType,
''ExchangeAccount'' as FullType,
SI2.PackageID as PackageID,
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
UNION
SELECT
EA4.ItemID AS ItemID,
EA4.PrimaryEmailAddress as TextSearch,
''ExchangeAccount'' as ColumnType,
''ExchangeAccount'' as FullType,
SI4.PackageID as PackageID,
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
UNION
SELECT
EA3.ItemID AS ItemID,
EAEA.EmailAddress as TextSearch,
''ExchangeAccount'' as ColumnType,
''ExchangeAccount'' as FullType,
SI3.PackageID as PackageID,
EA3.AccountID as AccountID
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';
SET @sqlSpace = @sqlSpace + ' open @curValue'

View file

@ -5292,9 +5292,6 @@
<data name="UserItemType.ExchangeAccount" xml:space="preserve">
<value>Exchange Account</value>
</data>
<data name="UserItemType.ExchangeAccountMailbox" xml:space="preserve">
<value>Exchange Mailbox</value>
</data>
<data name="UserItemType.Users" xml:space="preserve">
<value>Account Home</value>
</data>

View file

@ -50,7 +50,7 @@
$ImgBtn.attr('disabled', 'disabled');
}
});
if (document.referrer.search("pid=Login") > 0) {
if (document.referrer.search("pid=Login") > 0 || window.location.href.search("pid=SearchObject") > 0) {
$("#<%= tbSearch.ClientID %>").focus();
}

View file

@ -48,7 +48,6 @@ namespace WebsitePanel.Portal.SkinControls
const string TYPE_DOMAIN = "Domain";
const string TYPE_ORGANIZATION = "Organization";
const string TYPE_EXCHANGEACCOUNT = "ExchangeAccount";
const string TYPE_EXCHANGEACCOUNT_MAILBOX = "ExchangeAccountMailbox";
const string PID_SPACE_WEBSITES = "SpaceWebSites";
const string PID_SPACE_DIMAINS = "SpaceDomains";
const string PID_SPACE_EXCHANGESERVER = "SpaceExchangeServer";
@ -151,12 +150,6 @@ namespace WebsitePanel.Portal.SkinControls
"moduleDefId=ExchangeServer");
break;
case TYPE_EXCHANGEACCOUNT:
res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_user",//"mid="+this.ModuleID.ToString(),
"AccountID="+this.tbAccountId.Text,"Context=User",
"moduleDefId=ExchangeServer");
break;
case TYPE_EXCHANGEACCOUNT_MAILBOX:
res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, "ctl=edit_user",//"mid="+this.ModuleID.ToString(),
"AccountID=" + this.tbAccountId.Text, "Context=Mailbox",