diff --git a/localization/xliff/enu/constants/localizedConstants.enu.xlf b/localization/xliff/enu/constants/localizedConstants.enu.xlf index b8afeb97f..8a811da63 100644 --- a/localization/xliff/enu/constants/localizedConstants.enu.xlf +++ b/localization/xliff/enu/constants/localizedConstants.enu.xlf @@ -236,9 +236,6 @@ Your client IP address does not have access to the server. Sign in to an Azure account and create a new firewall rule to enable access. - - Your client IP address does not have access to the server. Activate the Azure Account extension and sign in to an Azure account and create a new firewall rule to enable access. - Account signed In. Create new firewall rule? @@ -266,9 +263,6 @@ Download and Install - - Activate - Create Firewall Rule diff --git a/package.json b/package.json index 71f35bb73..3b32bf2c8 100644 --- a/package.json +++ b/package.json @@ -203,17 +203,17 @@ { "command": "mssql.removeObjectExplorerNode", "when": "view == objectExplorer && viewItem =~ /^(disconnectedServer|Server)$/", - "group": "MS_SQL@3" + "group": "MS_SQL@4" }, { "command": "mssql.refreshObjectExplorerNode", "when": "view == objectExplorer && viewItem != disconnectedServer", - "group": "MS_SQL@2" + "group": "MS_SQL@10" }, { "command": "mssql.disconnectObjectExplorerNode", "when": "view == objectExplorer && viewItem == Server", - "group": "MS_SQL@4" + "group": "MS_SQL@3" }, { "command": "mssql.scriptSelect", @@ -223,22 +223,22 @@ { "command": "mssql.scriptCreate", "when": "view == objectExplorer && viewItem =~ /^(Table|View|AggregateFunction|PartitionFunction|ScalarValuedFunction|Schema|StoredProcedure|TableValuedFunction|User|UserDefinedTableType)$/", - "group": "MS_SQL@1" + "group": "MS_SQL@2" }, { "command": "mssql.scriptDelete", "when": "view == objectExplorer && viewItem =~ /^(Table|View|AggregateFunction|PartitionFunction|ScalarValuedFunction|Schema|StoredProcedure|TableValuedFunction|User|UserDefinedTableType)$/", - "group": "MS_SQL@1" + "group": "MS_SQL@3" }, { "command": "mssql.scriptExecute", "when": "view == objectExplorer && viewItem =~ /^(StoredProcedure)$/", - "group": "MS_SQL@1" + "group": "MS_SQL@5" }, { "command": "mssql.scriptAlter", "when": "view == objectExplorer && viewItem =~ /^(AggregateFunction|PartitionFunction|ScalarValuedFunction|StoredProcedure|TableValuedFunction|View)$/", - "group": "MS_SQL@1" + "group": "MS_SQL@4" } ], "commandPalette": [ diff --git a/src/controllers/queryRunner.ts b/src/controllers/queryRunner.ts index a478a21a8..baa4a2da0 100644 --- a/src/controllers/queryRunner.ts +++ b/src/controllers/queryRunner.ts @@ -415,9 +415,18 @@ export default class QueryRunner { for (let rowId of allRowIds) { let row = rowIdToRowMap.get(rowId); const rowSelections = rowIdToSelectionMap.get(rowId); + + // sort selections by column to go from left to right + rowSelections.sort((a, b) => { + return ((a.fromCell < b.fromCell) ? -1 : (a.fromCell > b.fromCell) ? 1 : 0); + }); + + // start copy paste from left-most column + const firstColumn = rowSelections[0].fromCell; + for (let i = 0; i < rowSelections.length; i++) { let rowSelection = rowSelections[i]; - for (let j = 0; j < rowSelection.fromCell; j++) { + for (let j = firstColumn; j < rowSelection.fromCell; j++) { copyString += ' \t'; } let cellObjects = row.slice(rowSelection.fromCell, (rowSelection.toCell + 1)); diff --git a/src/views/connectionUI.ts b/src/views/connectionUI.ts index 803b6a1a6..1854abfd2 100644 --- a/src/views/connectionUI.ts +++ b/src/views/connectionUI.ts @@ -507,17 +507,8 @@ export class ConnectionUI { } else { // If the extension exists but not active if (this._vscodeWrapper.azureAccountExtension) { - // Prompt user to activate the extension - let selection = await this._vscodeWrapper.showInformationMessage(LocalizedConstants.msgPromptRetryFirewallRuleNotActivated, - LocalizedConstants.activateLabel); - if (selection === LocalizedConstants.activateLabel) { - let activated = await this._vscodeWrapper.azureAccountExtension.activate(); - if (activated) { - this.showAzureExtensionActivated(); - return this.handleFirewallError(uri, profile, ipAddress); - } - } - return false; + await this._vscodeWrapper.azureAccountExtension.activate(); + return this.handleExtensionActivation(); } else { // Show recommendation to download the azure account extension const selection = await this._vscodeWrapper.showInformationMessage(LocalizedConstants.msgPromptRetryFirewallRuleExtNotInstalled, @@ -528,7 +519,7 @@ export class ConnectionUI { // Activate the Azure Account extension and call the function again if (this._vscodeWrapper.azureAccountExtension) { await this._vscodeWrapper.azureAccountExtension.activate(); - await this.showAzureExtensionActivated(); + await this.handleExtensionActivation(); } }); } @@ -538,7 +529,7 @@ export class ConnectionUI { } /** - * Save a connection profile using the connection store. + * Save a connection profile using the connection store */ private saveProfile(profile: IConnectionProfile): Promise { return this._connectionStore.saveProfile(profile); @@ -582,7 +573,7 @@ export class ConnectionUI { }); } - private async showAzureExtensionActivated(): Promise { + private async handleExtensionActivation(): Promise { if (!this._vscodeWrapper.isAccountSignedIn) { const result = await this._vscodeWrapper.showInformationMessage(LocalizedConstants.msgPromptAzureExtensionActivatedNotSignedIn, LocalizedConstants.signInLabel); @@ -591,7 +582,6 @@ export class ConnectionUI { } return false; } else { - await this._vscodeWrapper.showInformationMessage(LocalizedConstants.msgPromptAzureExtensionActivatedSignedIn); return true; } } diff --git a/src/views/htmlcontent/src/css/color-theme.css b/src/views/htmlcontent/src/css/color-theme.css index d3eda17b3..4285808f5 100644 --- a/src/views/htmlcontent/src/css/color-theme.css +++ b/src/views/htmlcontent/src/css/color-theme.css @@ -4,10 +4,16 @@ *--------------------------------------------------------------------------------------------*/ /** Disable selection in html **/ -.results.vertBox.scrollable { +.fullsize.vertBox { user-select: none; } +/** Add the ability to select messages using the cursor **/ +.scrollable.messages { + cursor: text; + user-select: text; +} + /** Light Theme **/ .vscode-light * { diff --git a/src/views/htmlcontent/src/css/styles.css b/src/views/htmlcontent/src/css/styles.css index 25a4b2679..16de32f17 100644 --- a/src/views/htmlcontent/src/css/styles.css +++ b/src/views/htmlcontent/src/css/styles.css @@ -61,6 +61,11 @@ } /* messages */ + +table#messageTable td.errorMessage { + color: var(--color-error); +} + table { font-weight: inherit; font-size: inherit; diff --git a/src/views/htmlcontent/src/js/components/app.component.ts b/src/views/htmlcontent/src/js/components/app.component.ts index b3d6bbd82..e3e0779cf 100644 --- a/src/views/htmlcontent/src/js/components/app.component.ts +++ b/src/views/htmlcontent/src/js/components/app.component.ts @@ -107,7 +107,7 @@ const template = ` -
+
`; // tslint:enable:max-line-length @@ -117,7 +117,7 @@ const template = ` */ @Component({ selector: 'my-app', - host: { '(window:keydown)': 'keyEvent($event)', '(window:gridnav)': 'keyEvent($event)' }, + host: { '(window:keydown)': 'keyEvent($event)', '(window:gridnav)': 'keyEvent($event)', '(window:keyup)' : 'keyUpEvent($event)' }, template: template, providers: [DataService, ShortcutService], styles: [` @@ -792,6 +792,24 @@ export class AppComponent implements OnInit, AfterViewChecked { }); } + /** + * Helper to deselect messages when Ctrl + A is pressed + * inside the grid + */ + keyUpEvent(e: KeyboardEvent): void { + let eString = this.shortcuts.buildEventString(e); + this.shortcuts.getEvent(eString).then((result) => { + if (result) { + let eventName = result; + if (eventName === 'event.selectAll') { + window.getSelection().empty(); + rangy.getSelection().removeAllRanges(); + } + e.stopImmediatePropagation(); + } + }); + } + /** * Handles rendering and unrendering necessary resources in order to properly * navigate from one grid another. Should be called any time grid navigation is performed diff --git a/src/views/htmlcontent/src/js/components/messagescontextmenu.component.ts b/src/views/htmlcontent/src/js/components/messagescontextmenu.component.ts index 2bfead604..e434ab483 100644 --- a/src/views/htmlcontent/src/js/components/messagescontextmenu.component.ts +++ b/src/views/htmlcontent/src/js/components/messagescontextmenu.component.ts @@ -13,7 +13,7 @@ import { IRange } from '../../../../../models/interfaces'; */ const template = ` -
    +
    • {{Constants.copyLabel}} {{keys['event.copySelection']}}