Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 245310 Details for
Bug 438886
The plugins settings page should clearly indicate the status of the plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
UI Improvements
Bug 438886 - The plugins settings page should clearly indicate the status of the plugin.patch (text/plain), 9.25 KB, created by
Curtis Windatt
on 2014-07-23 16:41:35 EDT
(
hide
)
Description:
UI Improvements
Filename:
MIME Type:
Creator:
Curtis Windatt
Created:
2014-07-23 16:41:35 EDT
Size:
9.25 KB
patch
obsolete
> ><!-- saved from url=(0419)https://orion.eclipse.org/gitapi/diff/Cached/file/cwindatt-OrionContent/org.eclipse.orion.client-2/?parts=diff&Path=bundles/org.eclipse.orion.client.ui/web/orion/settings/nls/root/messages.js&Path=bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginEntry.js&Path=bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginList.js&Path=bundles/org.eclipse.orion.client.ui/web/settings/settings.css --> ><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><style type="text/css"></style></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/settings/nls/root/messages.js b/bundles/org.eclipse.orion.client.ui/web/orion/settings/nls/root/messages.js >index 073e01b..30fe3b7 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/settings/nls/root/messages.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/settings/nls/root/messages.js >@@ -83,7 +83,7 @@ > "Author Name:": "Author Name:", > "Licence:": "Licence:", > "Description:": "Description:", >- "A plugin for Eclipse Orion": "A plugin for Eclipse Orion", >+ "A plugin for Orion": "A plugin for Orion", > "Plugin Link": "Plugin Link", > "Install": "Install", > "Install a plugin by specifying its URL": "Install a plugin by specifying its URL", >@@ -225,5 +225,10 @@ > "splitEditors": "Split Editors", > "splitOrientation": "Split Orientation", > "horizontal": "Horizontal", >- "vertical": "Vertical" >+ "vertical": "Vertical", >+ "pluginStatusNotLoaded": "This plug-in is not loaded.", >+ "pluginStatusNotRunning": "This plug-in is not running.", >+ "Website": "Website", >+ "License": "License", >+ "Login": "Login" > }); >diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginEntry.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginEntry.js >index b1eb339..ec99831 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginEntry.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginEntry.js >@@ -52,8 +52,8 @@ > var serviceDescriptions = []; > plugin.getServiceReferences().forEach(function(reference) { > var serviceName = ""; >- if (reference.getProperty("objectClass")){ >- serviceName = reference.getProperty("objectClass").join(" "); >+ if (reference.getProperty("objectClass")){ //$NON-NLS-0$ >+ serviceName = reference.getProperty("objectClass").join(" "); //$NON-NLS-0$ //$NON-NLS-1$ > } > > var serviceDescription = { >@@ -87,6 +87,7 @@ > '<span class="plugin-commands"></span>' + //$NON-NLS-0$ > '<div class="stretch">' + //$NON-NLS-0$ > '<span class="plugin-title"></span>' + //$NON-NLS-0$ >+ '<div class="plugin-status" style="font-size:11px;color:red"></div>' + //$NON-NLS-0$ > '<div></div>' + //$NON-NLS-0$ > '<span class="plugin-description"></span>' + //$NON-NLS-0$ > '<div class="plugin-links" style="font-size:11px"></div>' + //$NON-NLS-0$ >@@ -99,11 +100,12 @@ > > createElements: function() { > this.node.innerHTML = this.templateString; >- this.pluginTitle = lib.$(".plugin-title", this.node); >- this.pluginDescription = lib.$(".plugin-description", this.node); >- this.pluginLinks = lib.$(".plugin-links", this.node); >- this.commandSpan = lib.$(".plugin-commands", this.node); >- this.serviceContainer = lib.$(".plugin-service-item", this.node); >+ this.pluginTitle = lib.$(".plugin-title", this.node); //$NON-NLS-0$ >+ this.pluginStatus = lib.$(".plugin-status", this.node); //$NON-NLS-0$ >+ this.pluginDescription = lib.$(".plugin-description", this.node); //$NON-NLS-0$ >+ this.pluginLinks = lib.$(".plugin-links", this.node); //$NON-NLS-0$ >+ this.commandSpan = lib.$(".plugin-commands", this.node); //$NON-NLS-0$ >+ this.serviceContainer = lib.$(".plugin-service-item", this.node); //$NON-NLS-0$ > this.postCreate(); > }, > destroy: function() { >@@ -116,7 +118,7 @@ > }, > addPluginLink: function(name, url) { > if (!PageUtil.validateURLScheme(url)) { >- console.log("Illegal "+ name +" URL: " + url); >+ console.log("Illegal "+ name +" URL: " + url); //$NON-NLS-0$ //$NON-NLS-1$ > return; > } > var link = document.createElement("a"); //$NON-NLS-0$ >@@ -129,19 +131,44 @@ > postCreate: function(){ > var headers = this.plugin.getHeaders(); > var location = this.plugin.getLocation(); >- this.pluginTitle.textContent = headers.name || formatLocationAsPluginName(location); >- this.pluginDescription.textContent = headers.description || messages['A plugin for Eclipse Orion']; >+ var loaded = this.plugin.getState(); >+ >+ if (PageUtil.validateURLScheme(location)){ >+ var link = document.createElement("a"); //$NON-NLS-0$ >+ link.href = location; >+ link.title = headers.name || formatLocationAsPluginName(location); >+ link.textContent = headers.name || formatLocationAsPluginName(location); >+ this.pluginTitle.appendChild(link); >+ } else { >+ this.pluginTitle.textContent = headers.name || formatLocationAsPluginName(location); >+ } >+ >+ if (loaded){ >+ switch (loaded){ >+ // Ignore active, starting and stopping states >+ case "uninstalled": //$NON-NLS-0$ >+ this.pluginStatus.textContent = messages['pluginStatusNotLoaded']; >+ break; >+ case "installed": //$NON-NLS-0$ >+ this.pluginStatus.textContent = messages['pluginStatusNotLoaded']; >+ break; >+ case "resolved": //$NON-NLS-0$ >+ this.pluginStatus.textContent = messages['pluginStatusNotRunning']; >+ break; >+ } >+ } >+ >+ this.pluginDescription.textContent = headers.description || messages['A plugin for Orion']; > >- // Plugin Links >- this.addPluginLink("Plugin", location); >+ // Additional Links > if (headers.website) { >- this.addPluginLink("Website", headers.website); >+ this.addPluginLink(messages["Website"], headers.website); > } > if (headers.license) { >- this.addPluginLink("License", headers.license); >+ this.addPluginLink(messages["License"], headers.license); > } > if (headers.login) { >- this.addPluginLink("Login", headers.login); >+ this.addPluginLink(messages["Login"], headers.login); > } > > this.commandSpan.id = location; >diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginList.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginList.js >index e5e08e0..6b227d4 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginList.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginList.js >@@ -282,7 +282,6 @@ > }); > this.commandService.addCommand(enablePluginCommand); > this.commandService.registerCommandContribution("pluginCommand", "orion.enablePlugin", 4); //$NON-NLS-1$ //$NON-NLS-0$ >- > > var list = this.pluginList; > >@@ -295,7 +294,9 @@ > var plugins = this.settings.pluginRegistry.getPlugins(); > this.pluginTitle.textContent = messages['Plugins']; > this.pluginCount.textContent = plugins.length; >- >+ >+ plugins.sort(this._sortPlugins); >+ > // TODO maybe this should only be done once > this.explorer = new PluginListExplorer(this.commandService); > this.pluginListTree = this.explorer.createTree(this.pluginList.id, new mExplorer.SimpleFlatModel(plugins, "plugin", function(item) { //$NON-NLS-1$ //$NON-NLS-0$ >@@ -308,6 +309,42 @@ > // pluginEntry.show(); > // } > }, >+ >+ /** >+ * @name _sortPlugins >+ * @description sorts plugins by state then by name >+ * @function >+ * @private >+ * @param a first object to compare >+ * @param b second object to return >+ * @returns -1 for a first, 1 for b first, 0 if equals >+ */ >+ _sortPlugins: function(a, b) { >+ var aState = a.getState(); >+ var bState = b.getState(); >+ if ((bState == "active" || bState == "starting") && (aState !== "active" && aState !== "starting")){ //$NON-NLS-0$ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ return -1; >+ } >+ if ((aState == "active" || aState == "starting") && (bState !== "active" && bState !== "starting")){ //$NON-NLS-0$ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ return 1; >+ } >+ var aHeaders = a.getHeaders(); >+ var bHeaders = b.getHeaders(); >+ if (!aHeaders && !bHeaders){ >+ return 0; >+ } >+ if (!aHeaders){ >+ return -1; >+ } >+ if (!bHeaders){ >+ return 1; >+ } >+ var n1 = aHeaders.name && aHeaders.name.toLowerCase(); >+ var n2 = bHeaders.name && bHeaders.name.toLowerCase(); >+ if (n1 < n2) { return -1; } >+ if (n1 > n2) { return 1; } >+ return 0; >+ }, > > pluginURLFocus: function(){ > this.pluginUrlEntry.value = ''; >diff --git a/bundles/org.eclipse.orion.client.ui/web/settings/settings.css b/bundles/org.eclipse.orion.client.ui/web/settings/settings.css >index 1637933..5dadf72 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/settings/settings.css >+++ b/bundles/org.eclipse.orion.client.ui/web/settings/settings.css >@@ -282,9 +282,7 @@ > > .plugin-entry { > border-bottom: solid 1px #EEE; >- padding-bottom: 10px; >- >- padding: 15px 10px 15px 10px; >+ padding: 10px 10px 10px 10px; > } > > .plugin-icon { >@@ -360,7 +358,7 @@ > clear: left; > outline: none; > line-height:14px; >- padding-top: 10px; >+ padding-top: 5px; > } > > .serviceCount { ></pre></body></html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 438886
:
245309
|
245310
|
245355
|
245357
|
245491