|
Lines 426-432
Link Here
|
| 426 |
var func = isCopy ? fileClient.copyFile : fileClient.moveFile; |
426 |
var func = isCopy ? fileClient.copyFile : fileClient.moveFile; |
| 427 |
var message = i18nUtil.formatMessage(isCopy ? messages["Copying ${0}"] : messages["Moving ${0}"], item.Location); |
427 |
var message = i18nUtil.formatMessage(isCopy ? messages["Copying ${0}"] : messages["Moving ${0}"], item.Location); |
| 428 |
if (isCopy && item.parent && item.parent.Location === location) { |
428 |
if (isCopy && item.parent && item.parent.Location === location) { |
| 429 |
newName = window.prompt(i18nUtil.formatMessage(messages["Enter a new name for '${0}'"], item.Name), i18nUtil.formatMessage(messages["Copy of ${0}"], item.Name)); |
429 |
newName = window.prompt(i18nUtil.formatMessage(messages["Enter name"], item.Name), i18nUtil.formatMessage(messages["Copy of ${0}"], item.Name)); |
| 430 |
// user cancelled? don't copy this one |
430 |
// user cancelled? don't copy this one |
| 431 |
if (!newName) { |
431 |
if (!newName) { |
| 432 |
location = null; |
432 |
location = null; |
|
Lines 513-519
Link Here
|
| 513 |
if (proposedPaths.length > 0) { |
513 |
if (proposedPaths.length > 0) { |
| 514 |
choices.push({}); //separator |
514 |
choices.push({}); //separator |
| 515 |
} |
515 |
} |
| 516 |
choices.push({name: messages["Choose folder..."], callback: prompt}); |
516 |
choices.push({name: messages["Choose folder"], callback: prompt}); |
| 517 |
return choices; |
517 |
return choices; |
| 518 |
} |
518 |
} |
| 519 |
|
519 |
|
|
Lines 659-665
Link Here
|
| 659 |
|
659 |
|
| 660 |
var renameCommand = new mCommands.Command({ |
660 |
var renameCommand = new mCommands.Command({ |
| 661 |
name: messages["Rename"], |
661 |
name: messages["Rename"], |
| 662 |
tooltip: messages["Rename the selected files or folders"], |
662 |
tooltip: messages["Rename files or folders"], |
| 663 |
imageClass: "core-sprite-rename", //$NON-NLS-0$ |
663 |
imageClass: "core-sprite-rename", //$NON-NLS-0$ |
| 664 |
id: "eclipse.renameResource", //$NON-NLS-0$ |
664 |
id: "eclipse.renameResource", //$NON-NLS-0$ |
| 665 |
visibleWhen: function(item) { |
665 |
visibleWhen: function(item) { |
|
Lines 698-705
Link Here
|
| 698 |
|
698 |
|
| 699 |
var contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry); |
699 |
var contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry); |
| 700 |
var compareWithEachOtherCommand = new mCommands.Command({ |
700 |
var compareWithEachOtherCommand = new mCommands.Command({ |
| 701 |
name: messages["Compare with each other"], |
701 |
name: messages["Compare each"], |
| 702 |
tooltip: messages["Compare the selected 2 files with each other"], |
702 |
tooltip: messages["Compare 2 files"], |
| 703 |
id: "eclipse.compareWithEachOther", //$NON-NLS-0$ |
703 |
id: "eclipse.compareWithEachOther", //$NON-NLS-0$ |
| 704 |
visibleWhen: function(item) { |
704 |
visibleWhen: function(item) { |
| 705 |
if (!explorer || !explorer.isCommandsVisible()) { |
705 |
if (!explorer || !explorer.isCommandsVisible()) { |
|
Lines 730-736
Link Here
|
| 730 |
|
730 |
|
| 731 |
var compareWithCommand = new mCommands.Command({ |
731 |
var compareWithCommand = new mCommands.Command({ |
| 732 |
name : messages["Compare with..."], |
732 |
name : messages["Compare with..."], |
| 733 |
tooltip: messages["Compare the selected folder with a specified folder"], |
733 |
tooltip: messages["Compare folders"], |
| 734 |
id: "eclipse.compareWith", //$NON-NLS-0$ |
734 |
id: "eclipse.compareWith", //$NON-NLS-0$ |
| 735 |
visibleWhen: function(item) { |
735 |
visibleWhen: function(item) { |
| 736 |
if (!explorer || !explorer.isCommandsVisible()) { |
736 |
if (!explorer || !explorer.isCommandsVisible()) { |
|
Lines 792-798
Link Here
|
| 792 |
visibleWhen: oneOrMoreFilesOrFolders, |
792 |
visibleWhen: oneOrMoreFilesOrFolders, |
| 793 |
callback: function(data) { |
793 |
callback: function(data) { |
| 794 |
var items = Array.isArray(data.items) ? data.items : [data.items]; |
794 |
var items = Array.isArray(data.items) ? data.items : [data.items]; |
| 795 |
var confirmMessage = items.length === 1 ? i18nUtil.formatMessage(messages["Are you sure you want to delete '${0}'?"], items[0].Name) : i18nUtil.formatMessage(messages["Are you sure you want to delete these ${0} items?"], items.length); |
795 |
var confirmMessage = items.length === 1 ? i18nUtil.formatMessage(messages["delete target msg"], items[0].Name) : i18nUtil.formatMessage(messages["delete item msg"], items.length); |
| 796 |
serviceRegistry.getService("orion.page.dialog").confirm(confirmMessage, //$NON-NLS-0$ |
796 |
serviceRegistry.getService("orion.page.dialog").confirm(confirmMessage, //$NON-NLS-0$ |
| 797 |
function(doit) { |
797 |
function(doit) { |
| 798 |
if (!doit) { |
798 |
if (!doit) { |
|
Lines 848-855
Link Here
|
| 848 |
commandService.addCommand(deleteCommand); |
848 |
commandService.addCommand(deleteCommand); |
| 849 |
|
849 |
|
| 850 |
var downloadCommand = new mCommands.Command({ |
850 |
var downloadCommand = new mCommands.Command({ |
| 851 |
name: messages["Export as zip"], |
851 |
name: messages["Zip"], |
| 852 |
tooltip: messages["Create a zip file of the folder contents and download it"], |
852 |
tooltip: messages["Zip Download"], |
| 853 |
imageClass: "core-sprite-exportzip", //$NON-NLS-0$ |
853 |
imageClass: "core-sprite-exportzip", //$NON-NLS-0$ |
| 854 |
id: "eclipse.downloadFile", //$NON-NLS-0$ |
854 |
id: "eclipse.downloadFile", //$NON-NLS-0$ |
| 855 |
visibleWhen: function(item) { |
855 |
visibleWhen: function(item) { |
|
Lines 970-976
Link Here
|
| 970 |
|
970 |
|
| 971 |
var importZipURLCommand = new mCommands.Command({ |
971 |
var importZipURLCommand = new mCommands.Command({ |
| 972 |
name: messages["Import from HTTP..."], |
972 |
name: messages["Import from HTTP..."], |
| 973 |
tooltip: messages["Import a file from a URL and optionally unzip it"], |
973 |
tooltip: messages["import frm url"], |
| 974 |
id: "orion.importZipURL", //$NON-NLS-0$ |
974 |
id: "orion.importZipURL", //$NON-NLS-0$ |
| 975 |
parameters: zipURLParameters, |
975 |
parameters: zipURLParameters, |
| 976 |
callback: function(data) { |
976 |
callback: function(data) { |
|
Lines 996-1002
Link Here
|
| 996 |
name: messages["New Folder"], |
996 |
name: messages["New Folder"], |
| 997 |
imageClass: "core-sprite-new_folder", //$NON-NLS-0$ |
997 |
imageClass: "core-sprite-new_folder", //$NON-NLS-0$ |
| 998 |
tooltip: messages["Create an empty folder"], |
998 |
tooltip: messages["Create an empty folder"], |
| 999 |
description: messages["Create an empty folder on the Orion server. You can import, upload, or create content in the editor."], |
999 |
description: messages["Create empty folder msg"], |
| 1000 |
id: "orion.new.project", //$NON-NLS-0$ |
1000 |
id: "orion.new.project", //$NON-NLS-0$ |
| 1001 |
callback: function(data) { |
1001 |
callback: function(data) { |
| 1002 |
var item; |
1002 |
var item; |
|
Lines 1018-1025
Link Here
|
| 1018 |
|
1018 |
|
| 1019 |
var linkProjectCommand = new mCommands.Command({ |
1019 |
var linkProjectCommand = new mCommands.Command({ |
| 1020 |
name: messages["Link to Server"], |
1020 |
name: messages["Link to Server"], |
| 1021 |
tooltip: messages["Link to existing content on the server"], |
1021 |
tooltip: messages["Link content msg"], |
| 1022 |
description: messages["Create a folder that links to an existing folder on the server."], |
1022 |
description: messages["Create linked folder"], |
| 1023 |
imageClass: "core-sprite-link", //$NON-NLS-0$ |
1023 |
imageClass: "core-sprite-link", //$NON-NLS-0$ |
| 1024 |
id: "orion.new.linkProject", //$NON-NLS-0$ |
1024 |
id: "orion.new.linkProject", //$NON-NLS-0$ |
| 1025 |
parameters: new mCommandRegistry.ParametersDescription([new mCommandRegistry.CommandParameter('name', 'text', messages['Name:'], messages['New Folder']), new mCommandRegistry.CommandParameter('url', 'url', messages['Server path:'], '')]), //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ |
1025 |
parameters: new mCommandRegistry.ParametersDescription([new mCommandRegistry.CommandParameter('name', 'text', messages['Name:'], messages['New Folder']), new mCommandRegistry.CommandParameter('url', 'url', messages['Server path:'], '')]), //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ |
|
Lines 1035-1041
Link Here
|
| 1035 |
if (data.parameters && data.parameters.valueFor('name') && data.parameters.valueFor('url')) { //$NON-NLS-1$ //$NON-NLS-0$ |
1035 |
if (data.parameters && data.parameters.valueFor('name') && data.parameters.valueFor('url')) { //$NON-NLS-1$ //$NON-NLS-0$ |
| 1036 |
createFunction(data.parameters.valueFor('name'), data.parameters.valueFor('url')); //$NON-NLS-1$ //$NON-NLS-0$ |
1036 |
createFunction(data.parameters.valueFor('name'), data.parameters.valueFor('url')); //$NON-NLS-1$ //$NON-NLS-0$ |
| 1037 |
} else { |
1037 |
} else { |
| 1038 |
errorHandler(messages["The name and server location were not specified."]); |
1038 |
errorHandler(messages["name location not clear"]); |
| 1039 |
} |
1039 |
} |
| 1040 |
}, |
1040 |
}, |
| 1041 |
visibleWhen: canCreateProject |
1041 |
visibleWhen: canCreateProject |
|
Lines 1044-1050
Link Here
|
| 1044 |
|
1044 |
|
| 1045 |
var goUpCommand = new mCommands.Command({ |
1045 |
var goUpCommand = new mCommands.Command({ |
| 1046 |
name: messages["Go Up"], |
1046 |
name: messages["Go Up"], |
| 1047 |
tooltip: messages["Move up to the parent folder"], |
1047 |
tooltip: messages["cd parent"], |
| 1048 |
imageClass: "core-sprite-go-up", //$NON-NLS-0$ |
1048 |
imageClass: "core-sprite-go-up", //$NON-NLS-0$ |
| 1049 |
// addImageClassToElement: true, |
1049 |
// addImageClassToElement: true, |
| 1050 |
id: "eclipse.upFolder", //$NON-NLS-0$ |
1050 |
id: "eclipse.upFolder", //$NON-NLS-0$ |
|
Lines 1065-1071
Link Here
|
| 1065 |
|
1065 |
|
| 1066 |
var goIntoCommand = new mCommands.Command({ |
1066 |
var goIntoCommand = new mCommands.Command({ |
| 1067 |
name: messages["Go Into"], |
1067 |
name: messages["Go Into"], |
| 1068 |
tooltip: messages["Move into the selected folder"], |
1068 |
tooltip: messages["cd selected"], |
| 1069 |
imageClass: "core-sprite-go-down", //$NON-NLS-0$ |
1069 |
imageClass: "core-sprite-go-down", //$NON-NLS-0$ |
| 1070 |
id: "eclipse.downFolder", //$NON-NLS-0$ |
1070 |
id: "eclipse.downFolder", //$NON-NLS-0$ |
| 1071 |
callback: function(data) { |
1071 |
callback: function(data) { |
|
Lines 1088-1094
Link Here
|
| 1088 |
|
1088 |
|
| 1089 |
var importCommand = new mCommands.Command({ |
1089 |
var importCommand = new mCommands.Command({ |
| 1090 |
name : messages["File or zip archive"], |
1090 |
name : messages["File or zip archive"], |
| 1091 |
tooltip: messages["Import a file or zip archive from your local file system"], |
1091 |
tooltip: messages["import local file"], |
| 1092 |
imageClass: "core-sprite-importzip", //$NON-NLS-0$ |
1092 |
imageClass: "core-sprite-importzip", //$NON-NLS-0$ |
| 1093 |
id: "orion.import", //$NON-NLS-0$ |
1093 |
id: "orion.import", //$NON-NLS-0$ |
| 1094 |
callback : function(data) { |
1094 |
callback : function(data) { |
|
Lines 1119-1125
Link Here
|
| 1119 |
|
1119 |
|
| 1120 |
var importSFTPCommand = new mCommands.Command({ |
1120 |
var importSFTPCommand = new mCommands.Command({ |
| 1121 |
name : messages["SFTP from..."], |
1121 |
name : messages["SFTP from..."], |
| 1122 |
tooltip: messages["Copy files and folders from a specified SFTP connection"], |
1122 |
tooltip: messages["cpy from SFTP"], |
| 1123 |
imageClass: "core-sprite-transferin", //$NON-NLS-0$ |
1123 |
imageClass: "core-sprite-transferin", //$NON-NLS-0$ |
| 1124 |
id: "orion.importSFTP", //$NON-NLS-0$ |
1124 |
id: "orion.importSFTP", //$NON-NLS-0$ |
| 1125 |
callback : function(data) { |
1125 |
callback : function(data) { |
|
Lines 1146-1152
Link Here
|
| 1146 |
|
1146 |
|
| 1147 |
var exportSFTPCommand = new mCommands.Command({ |
1147 |
var exportSFTPCommand = new mCommands.Command({ |
| 1148 |
name : messages["SFTP to..."], |
1148 |
name : messages["SFTP to..."], |
| 1149 |
tooltip: messages["Copy files and folders to a specified SFTP location"], |
1149 |
tooltip: messages["cpy to SFTP"], |
| 1150 |
imageClass: "core-sprite-transferout", //$NON-NLS-0$ |
1150 |
imageClass: "core-sprite-transferout", //$NON-NLS-0$ |
| 1151 |
id: "eclipse.exportSFTPCommand", //$NON-NLS-0$ |
1151 |
id: "eclipse.exportSFTPCommand", //$NON-NLS-0$ |
| 1152 |
callback : function(data) { |
1152 |
callback : function(data) { |
|
Lines 1192-1198
Link Here
|
| 1192 |
|
1192 |
|
| 1193 |
var moveCommand = new mCommands.Command({ |
1193 |
var moveCommand = new mCommands.Command({ |
| 1194 |
name : messages["Move to"], |
1194 |
name : messages["Move to"], |
| 1195 |
tooltip: messages["Move files and folders to a new location"], |
1195 |
tooltip: messages["mv to new dir"], |
| 1196 |
id: "eclipse.moveFile", //$NON-NLS-0$ |
1196 |
id: "eclipse.moveFile", //$NON-NLS-0$ |
| 1197 |
choiceCallback: function(items, userData) { |
1197 |
choiceCallback: function(items, userData) { |
| 1198 |
return makeMoveCopyTargetChoices(items, userData, false); |
1198 |
return makeMoveCopyTargetChoices(items, userData, false); |