aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton McConville2012-02-13 11:26:40 (EST)
committersfranklin2012-02-13 14:54:36 (EST)
commit43ea285743c06e0c56823e5a4e2a536d11dfb061 (patch)
tree5c58eda99a20743f2b2c0285ee41c009f5d5c136
parent75a762cdc55c3a310e11a4131b8e9f3a7ac6f6fe (diff)
downloadorg.eclipse.orion.client-43ea285743c06e0c56823e5a4e2a536d11dfb061.zip
org.eclipse.orion.client-43ea285743c06e0c56823e5a4e2a536d11dfb061.tar.gz
org.eclipse.orion.client-43ea285743c06e0c56823e5a4e2a536d11dfb061.tar.bz2
Addresses: 371318 and 371293.v20120213-1954
I had coincidentally moved the Plugin list entry code into it's own widget, the initialization of which is cleaner and fixes the scroll problem. In doing this work, I moved the service css to it's own file too. I also refined some functions and comments.
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/widgets/PluginEntry.js107
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/widgets/PluginList.js80
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/widgets/ServiceCarousel.js38
-rw-r--r--bundles/org.eclipse.orion.client.core/web/settings/services.css196
-rw-r--r--bundles/org.eclipse.orion.client.core/web/settings/settings.css218
-rw-r--r--bundles/org.eclipse.orion.client.core/web/settings/settings.js51
6 files changed, 358 insertions, 332 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/PluginEntry.js b/bundles/org.eclipse.orion.client.core/web/orion/widgets/PluginEntry.js
new file mode 100644
index 0000000..0ed857f
--- /dev/null
+++ b/bundles/org.eclipse.orion.client.core/web/orion/widgets/PluginEntry.js
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
+ *
+ * Contributors: Anton McConville - IBM Corporation - initial API and implementation
+ ******************************************************************************/
+/*global dojo dijit widgets orion window console define*/
+/*jslint browser:true*/
+
+/* This PluginEntry widget supplies the HTML and related interactivity to display
+ detailed information about a single plugin. It is designed to work with the
+ PluginList widget, but each plugin entry element should fit into any HTML list
+ or table */
+
+define(['require', 'dojo', 'dijit', 'orion/util', 'orion/commands', 'dijit/TooltipDialog', 'orion/widgets/ServiceCarousel'], function(require, dojo, dijit, mUtil, mCommands) {
+
+ dojo.declare("orion.widgets.PluginEntry", [dijit._Widget, dijit._Templated], {
+
+ templateString: '<list style="overflow:hidden;">' +
+ '<div class="plugin-list-item">' +
+ '<div data-dojo-attach-point="pluginContainer">' +
+ '<img class="plugin-icon" src ="' + this.iconSource + '"></img>' +
+ '<div class="stretch" data-dojo-attach-point="detailsView">' +
+ '<span data-dojo-attach-point="pluginTitle" class="plugin-title"></span>' +
+ '<div></div>' +
+ '<span class="plugin-description">A plugin for Eclipse Orion</span>' +
+ '<a class="plugin-link" data-dojo-attach-point="pluginLink">Plugin Link</a>' +
+ '</div>' +
+ '<span class="plugin-commands" data-dojo-attach-point="commandSpan"></span>' +
+ '</div>' +
+ '</div>'+
+ '<div class="plugin-service-item" data-dojo-attach-point="serviceContainer"></div>' +
+ '</list>',
+
+ iconSource: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wBFxMFB6T1TK0AAAfOSURBVGjevZpLbFzlGYaf9x87DnZCyLUhCSSOY9PgmdwQdxrRVqhR1aYgpVXUTbvohgqRtrQCsWjFolSqBIUKCXXRsmkFCygiUpu2QgkFWkoIGOKZQIRj5yYSUifNhdiO7TlvF/+Mb4zt8bGTszmamXP+//2+7/2u/4gZulxgAYmWWl4kWG6zVGI+5gLQjziOOeYQzmgwOar19AMkpyEsTL+v0ryUAK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AdQI3gPK8YrNTZhL2IrrXn61A8J+04mX6UbOjXc+VnVjm7RRR61ex9wSj990WbQe5+gewHpSOT9SzXuT9sRuh7CRS+qvvVXB98gaiCfzM2eNEtmFnWeAJcr5EXdlYoKdrgDKlTap60etvGp7geFhxCe2cUphht6xQbxha2vIkdNGzia7QY1FwleqGtFNQ3MFbXbCM8hrhGYBmRKBS8lVpflNjO1RyQbUjzwIvESGH4e1nE6dA1ODPwC6cSiLzwetxG4BsqCsxBzwEuCSrTOCbnAbIm+HLik5omzpLzedEFanw/F/byy0oCz4lroAAAAASUVORK5CYII=",
+
+ services: null,
+ serviceDescriptions: null,
+
+ /* formatPluginName - temporary function -
+ the current plugins don't provide useful enough, or
+ consistent meta-data to use for descriptions - so this
+ function derives what it can from naming patterns seen in
+ existing commonly used plugin urls. */
+
+ formatPluginName: function( location ){
+
+ function wordToUpper(strSentence) {
+
+ function convertToUpper() {
+ return arguments[0].toUpperCase();
+ }
+
+ return strSentence.toLowerCase().replace(/\b[a-z]/g, convertToUpper);
+ }
+
+ var divides = location.split( "/" );
+ var last = divides[divides.length-1];
+ last = last.split( ".html" )[0];
+ last = last.replace( /([a-z])([A-Z])/, "$1 $2");
+ last = wordToUpper( last );
+ last = last.replace( 'plugin', '' );
+ last = last.replace( 'Plugin', '' );
+ return last;
+ },
+
+ getServiceDescriptions: function(){
+ this.services = this.plugin.getServiceReferences();
+
+ var rcount=0;
+ this.serviceDescriptions = [];
+
+ for( rcount;rcount<this.services.length;rcount++ ){
+
+ var s = { 'service': this.services[rcount].name };
+ var props = [];
+ var properties = this.services[rcount].properties;
+
+ for( var pItem in properties ){
+ if( pItem ){
+ var item = { 'item':pItem, 'value':properties[pItem] };
+ props.push(item);
+ }
+ }
+
+ s.items = props;
+ this.serviceDescriptions.push(s);
+ }
+ },
+
+ postCreate: function(){
+ this.getServiceDescriptions();
+ var location = this.plugin.getLocation();
+ var name = this.formatPluginName( location );
+ this.pluginTitle.innerHTML = name;
+ this.pluginLink.href = location;
+ this.commandSpan.id = name;
+ this.commandService.renderCommands(this.commandSpan, "object", location, this, "tool");
+ this.carousel = new orion.widgets.ServiceCarousel({serviceData:this.serviceDescriptions}, this.serviceContainer );
+ this.carousel.startup();
+ }
+ });
+}); \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/PluginList.js b/bundles/org.eclipse.orion.client.core/web/orion/widgets/PluginList.js
index 86a8d01..8621569 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/PluginList.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/widgets/PluginList.js
@@ -11,7 +11,11 @@
/*global dojo dijit widgets orion window console define*/
/*jslint browser:true*/
-define(['require', 'dojo', 'dijit', 'orion/util', 'orion/commands', 'dijit/TooltipDialog', 'orion/widgets/ServiceCarousel'], function(require, dojo, dijit, mUtil, mCommands) {
+/* This PluginList widget provides a HTML list placeholder for PluginEntries, and
+ provides JavaScript functions for user management of Orion plugins. It is designed
+ to contain PluginEntry widgets */
+
+define(['require', 'dojo', 'dijit', 'orion/util', 'orion/commands', 'dijit/TooltipDialog', 'orion/widgets/PluginEntry'], function(require, dojo, dijit, mUtil, mCommands) {
dojo.declare("orion.widgets.PluginList", [dijit._Widget, dijit._Templated], {
@@ -25,36 +29,8 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'orion/commands', 'dijit/Toolt
'</div>' +
'</div>' +
'</div>',
-
- iconSource: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wBFxMFB6T1TK0AAAfOSURBVGjevZpLbFzlGYaf9x87DnZCyLUhCSSOY9PgmdwQdxrRVqhR1aYgpVXUTbvohgqRtrQCsWjFolSqBIUKCXXRsmkFCygiUpu2QgkFWkoIGOKZQIRj5yYSUifNhdiO7TlvF/+Mb4zt8bGTszmamXP+//2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PVXlCk+c+W3/mSvvD2HwLh12kNaynp+oTGneBsrwsfK8keeg044ppPWYW6zyBDaqpDH5cAdQI3gPK8YrNTZhL2IrrXn61A8J+04mX6UbOjXc+VnVjm7RRR61ex9wSj990WbQe5+gewHpSOT9SzXuT9sRuh7CRS+qvvVXB98gaiCfzM2eNEtmFnWeAJcr5EXdlYoKdrgDKlTap60etvGp7geFhxCe2cUphht6xQbxha2vIkdNGzia7QY1FwleqGtFNQ3MFbXbCM8hrhGYBmRKBS8lVpflNjO1RyQbUjzwIvESGH4e1nE6dA1ODPwC6cSiLzwetxG4BsqCsxBzwEuCSrTOCbnAbIm+HLik5omzpLzedEFanw/F/byy0oCz4lroAAAAASUVORK5CYII=",
pluginDialogState: false,
-
- /* derivePluginNameFromLocation - temporary function -
- the current plugins don't provide useful enough, or
- consistent meta-data to use for descriptions. */
-
- derivePluginNameFromLocation: function( location ){
-
- function wordToUpper(strSentence) {
-
- function convertToUpper() {
- return arguments[0].toUpperCase();
- }
-
- return strSentence.toLowerCase().replace(/\b[a-z]/g, convertToUpper);
- }
-
- var divides = location.split( "/" );
- var last = divides[divides.length-1];
- last = last.split( ".html" )[0];
- last = last.replace( /([a-z])([A-Z])/, "$1 $2");
- last = wordToUpper( last );
- last = last.replace( 'plugin', '' );
- last = last.replace( 'Plugin', '' );
- return last;
- },
-
postCreate: function(){
// set up the toolbar level commands
@@ -125,53 +101,13 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'orion/commands', 'dijit/Toolt
var list = this.pluginSettingsList;
dojo.empty( list );
-
var pluginList = this.settings.pluginRegistry.getPlugins();
-
this.pluginTitle.innerHTML = "Plugins [" + pluginList.length +"]";
for( var p = 0; p < pluginList.length; p++ ){
-
- var plg = pluginList[p].getData();
- var ref = pluginList[p].getServiceReferences();
-
- var rcount=0;
- var serviceData = [];
-
- for( rcount;rcount<ref.length;rcount++ ){
-
- var s = { 'service': ref[rcount].name };
- var props = [];
- var properties = ref[rcount].properties;
-
- for( var pItem in properties ){
- if( pItem ){
- var item = { 'item':pItem, 'value':properties[pItem] };
- props.push(item);
- }
- }
-
- s.items = props;
- serviceData.push(s);
- }
-
- var location = pluginList[p].getLocation();
-
- var name = this.derivePluginNameFromLocation( location );
-
- var extensionListItem = dojo.create( "div", { "class":"plugin-list-item" }, list );
- var container = dojo.create( "div", /*{ "class":"container" }*/ null, extensionListItem );
- var icon = dojo.create( "img", { "class":"plugin-icon", "src": this.iconSource }, container );
- var detailsView = dojo.create( "div", { "class":"stretch" }, container );
- var title = dojo.create( "span", { "class":"plugin-title", innerHTML: name }, detailsView );
- dojo.create( "div", null, detailsView );
- var description = dojo.create( "span", { "class":"plugin-description", innerHTML: "A plugin for Eclipse Orion" }, detailsView );
- dojo.create( "a", { "class":"plugin-link", href: location, innerHTML: "Plugin Link" }, detailsView );
- var commandSpan = dojo.create( "span", {id: "actions"+p, "class": "plugin-commands"}, container );
- this.commandService.renderCommands(commandSpan, "object", location, this, "tool");
- var serviceContainer = dojo.create("div", {'class':'plugin-service-item'}, list);
-
- new orion.widgets.ServiceCarousel({serviceData:serviceData}, serviceContainer );
+ var pluginEntry = new orion.widgets.PluginEntry( {plugin:pluginList[p], commandService:this.commandService} );
+ list.appendChild( pluginEntry.domNode );
+ pluginEntry.startup();
}
},
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/ServiceCarousel.js b/bundles/org.eclipse.orion.client.core/web/orion/widgets/ServiceCarousel.js
index d834c05..25df374 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/ServiceCarousel.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/widgets/ServiceCarousel.js
@@ -23,7 +23,7 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'dijit/TooltipDialog', 'dojo/f
openIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAMCAYAAAC5tzfZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46NddkXU4AAAFuSURBVCjPXZG/q9NwFMU/5yYQOhVKoF1SDK9OOjl1URxcQl+G5/LgLeJf4K7wRjdBxMXRxcFR6TfZ3e3iUGe3DKXYQSEk10GjwbPdy+X8uEdVVVEUBVVVJcBt4MrdHwI3gG/u/lHSO3f/vNlsfoQQEEBd19O+799IunR3JAHg7gxw92Bmj4uiaLTdbifAe0nnkvDfl+IfxvMnSUUs6Q5wLom+7+m6TmMFSYrjeFjcdfd7MfBozLjb7WiaBjPD3ZlOp6zXa8VxPNh9YsCDgdTMmM/nHI9H9vs9TdOQpilRFI3cct+A7+PgWZaxXC5JkoQsy8jznP/w04Aw2JNEFEXkec5isWC1WjGZTIZvDrk+KIRwC/jyJzQAfd9zOByYzWZ/s42wNklfgZejXtzMSNMUMxsrALx1952G46qqnrr7tZklQ8EjhRZ40XXddVmWrdV1jSROp9Nz4MzdL4BX7h6A18ClpJtt2z4ry7INIfAL982ks01Z8EgAAAAASUVORK5CYII=",
templateString:'<div class="plugin-service-item"><div class="serviceContainerClosed" data-dojo-attach-point="serviceLabel" data-dojo-attach-event="onclick:showServices">Services</div>' +
- '<div class="serviceRailsVisible" data-dojo-attach-point="rails" data-dojo-attach-event="onmouseenter:showButtons,onmouseleave:hideButtons">' +
+ '<div class="serviceRailsHidden" data-dojo-attach-point="rails" data-dojo-attach-event="onmouseenter:showButtons,onmouseleave:hideButtons">' +
'<div class="leftButtonArea" data-dojo-attach-point="leftbutton">' +
'<span class="carouselControl" data-dojo-attach-event="onclick:slideLeft">&lt;</span>' +
'</div>' +
@@ -44,19 +44,28 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'dijit/TooltipDialog', 'dojo/f
this.addData( this.serviceData );
this.serviceLabel.innerHTML = "Services [" + this.serviceData.length +"]";
dojo.style( this.domNode, "width", railsBox.w - 63 + 'px' );
-
- this.box = dojo.marginBox( this.rails );
+ },
+
+ show: function(){
+ dojo.removeClass( this.rails, "serviceRailsHidden" );
+ dojo.addClass( this.rails, "serviceRailsVisible" );
+ dojo.removeClass( this.serviceLabel, "serviceContainerClosed" );
+ dojo.addClass( this.serviceLabel, "serviceContainerOpen" );
+ this.serviceState = true;
+ },
+
+ hide: function(){
+ dojo.removeClass( this.serviceLabel, "serviceContainerOpen" );
+ dojo.addClass( this.serviceLabel, "serviceContainerClosed" );
dojo.removeClass( this.rails, "serviceRailsVisible" );
dojo.addClass( this.rails, "serviceRailsHidden" );
+ this.serviceState = false;
},
showServices: function(){
if( this.serviceState === false ){
- dojo.removeClass( this.rails, "serviceRailsHidden" );
- dojo.addClass( this.rails, "serviceRailsVisible" );
- dojo.removeClass( this.serviceLabel, "serviceContainerClosed" );
- dojo.addClass( this.serviceLabel, "serviceContainerOpen" );
+ this.show();
if( this.box ){
dojo.marginBox( this.rails, this.box );
@@ -64,17 +73,9 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'dijit/TooltipDialog', 'dojo/f
this.box = dojo.marginBox( this.rails );
}
- this.serviceState = true;
-
-
}else{
dojo.marginBox( this.rails, { h:0 } );
-
- dojo.removeClass( this.serviceLabel, "serviceContainerOpen" );
- dojo.addClass( this.serviceLabel, "serviceContainerClosed" );
- dojo.removeClass( this.rails, "serviceRailsVisible" );
- dojo.addClass( this.rails, "serviceRailsHidden" );
- this.serviceState = false;
+ this.hide();
}
},
@@ -124,7 +125,6 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'dijit/TooltipDialog', 'dojo/f
}
this.showButtons();
-
},
slideLeft: function(){
@@ -189,6 +189,10 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'dijit/TooltipDialog', 'dojo/f
for( itemCount=0;itemCount<services.length;itemCount++ ){
this.createServiceTable( services[itemCount], this.testlist );
}
+ },
+
+ startup: function(){
+ this.inherited(arguments);
}
});
}); \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.core/web/settings/services.css b/bundles/org.eclipse.orion.client.core/web/settings/services.css
new file mode 100644
index 0000000..def9a5a
--- /dev/null
+++ b/bundles/org.eclipse.orion.client.core/web/settings/services.css
@@ -0,0 +1,196 @@
+.serviceContainerClosed{
+ position: relative;
+ background: white;
+ padding-left:16px;
+ background-image: url("data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAwAAAANCAYAAACdKY9CAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46FewKfYYAAAF4SURBVCjPbZEvyFNhGMV/590ciANhjNs2nC66osHiJ8b9cdVgN4uKyWbRaDGZBIvwYRB2723WBUEEy5igYeZxYQzd7t2x7IUFn/bAOec55zxK05TxeEyWZZds3wEeAXeBP8An4I3tr5PJZJemKQLIsiyxfQ6c8f95V1XVw+l0utdsNrsInEsaA5akE6Btx/3Vfr9/HiTdOIIBKMsS29gGOCU/bTQanWD7QVQry1Lz+ZzFYsFutyOEgCQkGbhg+1Zd0vRIkG2KomC5XLJarej3+3S7XUII8dJZHehIihaQxHq9ZrvdUhQFzWaTdrvNEXO1DvwCrkSjh8OBJEnodrv0ej1arVZMD/CjLumj7SexoSRJGAwGdDodarVaBFqSbH9WlmU3gS9RHSCEgG1iw8fW/gLXAvDd9gfbhBAIIThmOf4hZnux2Wx+CyDP88tVVb2XdC9mOVUHXo9Go8eSCFmWMRwOC+A+cBt4C/y0/c32S+C6pGeSyPOcfyAyt4A7QPcNAAAAAElFTkSuQmCC" );
+ background-repeat:no-repeat;
+ background-position:left;
+ color: #666;
+ font-size: 0.9em;
+ float:left;
+ -webkit-user-select: none;
+ cursor:pointer;
+}
+
+.serviceContainerOpen{
+ position: relative;
+ background: white;
+ padding-left:16px;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAMCAYAAAC5tzfZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46NddkXU4AAAFuSURBVCjPXZG/q9NwFMU/5yYQOhVKoF1SDK9OOjl1URxcQl+G5/LgLeJf4K7wRjdBxMXRxcFR6TfZ3e3iUGe3DKXYQSEk10GjwbPdy+X8uEdVVVEUBVVVJcBt4MrdHwI3gG/u/lHSO3f/vNlsfoQQEEBd19O+799IunR3JAHg7gxw92Bmj4uiaLTdbifAe0nnkvDfl+IfxvMnSUUs6Q5wLom+7+m6TmMFSYrjeFjcdfd7MfBozLjb7WiaBjPD3ZlOp6zXa8VxPNh9YsCDgdTMmM/nHI9H9vs9TdOQpilRFI3cct+A7+PgWZaxXC5JkoQsy8jznP/w04Aw2JNEFEXkec5isWC1WjGZTIZvDrk+KIRwC/jyJzQAfd9zOByYzWZ/s42wNklfgZejXtzMSNMUMxsrALx1952G46qqnrr7tZklQ8EjhRZ40XXddVmWrdV1jSROp9Nz4MzdL4BX7h6A18ClpJtt2z4ry7INIfAL982ks01Z8EgAAAAASUVORK5CYII=" );
+ background-repeat:no-repeat;
+ background-position:left;
+ color: #666;
+ font-size: 0.9em;
+ float:left;
+ -webkit-user-select: none;
+ cursor:pointer;
+}
+
+.service-container:hover{
+ color: #039;
+}
+
+.serviceTable{
+ border-collapse: separate;
+ border-spacing: 2px;
+ font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
+ font-size: 9px;
+ text-align: left;
+ border-collapse: collapse;
+ width: 200px;
+ -webkit-user-select: none;
+}
+
+ .serviceTable th{
+ padding: 8px 2px;
+ font-weight: normal;
+ font-size: 10px;
+ border-bottom: 2px solid #6678B1;
+ border-right: 30px solid white;
+ border-left: 30px solid white;
+ color: #039;
+ -webkit-user-select: none;
+}
+
+.serviceTable td {
+ padding : 3px 2px 0px 2px;
+ border-right: 30px solid white;
+ border-left: 30px solid white;
+ width:100px;
+ color: #669;
+ -webkit-user-select: none;
+}
+
+.serviceTable td, th {
+ display: table-cell;
+ vertical-align: inherit;
+ -webkit-user-select: none;
+}
+
+.tablecontainer{
+ padding:1px;
+ border: 1px solid #039;
+ display: inline-block;
+ border-radius:5px;
+ vertical-align:top;
+ -webkit-user-select: none;
+}
+
+.serviceData{
+ display: inline;
+ list-style-type: none;
+ padding-right: 20px;
+}
+
+.serviceRailsVisible{
+ white-space: nowrap;
+ border-top: solid 1px #EEE;
+ border-bottom: solid 1px #EEE;
+ margin-top:30px;
+ overflow:hidden;
+ -webkit-user-select: none;
+ transition:height 1s;
+ width:700px;
+ -moz-transition:height 1s; /* Firefox 4 */
+ -webkit-transition:height 1s; /* Safari and Chrome */
+ -o-transition:height 1s;
+ -ms-transition:height 1s; /* Safari and Chrome */
+}
+
+.serviceRailsHidden{
+ white-space: nowrap;
+ border-top: solid 1px #EEE;
+ border-bottom: solid 1px #EEE;
+ margin-top:30px;
+ margin-right:20px;
+ overflow:hidden;
+ visibility:hidden;
+ height:0px;
+ transition:height 1s;
+ width:700px;
+ -moz-transition:height 1s; /* Firefox 4 */
+ -webkit-transition:height 1s; /* Safari and Chrome */
+ -o-transition:height 1s;
+ -ms-transition:height 1s; /* Safari and Chrome */
+}
+
+.serviceList{
+ margin-right:20px;
+ padding-right:20px;
+
+ float:left;
+ // position:relative;
+ overflow:hidden;
+}
+
+.leftButtonArea{
+ width: 40px;
+ float:left;
+ position:relative;
+ visibility:hidden;
+ display: inline;
+ text-align:right;
+}
+
+.rightButtonArea{
+ width: 40px;
+ float:left;
+ position:relative;
+ visibility:hidden;
+ display: inline;
+ margin: 0 1em 0 1em;
+ text-align:right;
+}
+
+.carouselControl{
+ background:#666;
+ opacity:0.4;
+ padding-left:6px;
+ padding-right:6px;
+ border-radius:23px;
+ display: table-cell;
+ vertical-align: middle;
+ position:absolute;
+ color:white;
+ font-weight:bolder;
+ border: #333 solid 1px;
+ cursor:pointer;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ background: #222;
+ text-align:right;
+}
+
+.carouselControl:hover{
+ opacity:0.8;
+}
+
+.listContainer{
+ float:left;
+ overflow:hidden;
+ padding-left:0px;
+ margin-left:0px;
+ width:600px;
+}
+
+.listEntry{
+ padding:1px;
+ display: inline-block;
+ vertical-align:top;
+ text-align:center;
+}
+
+.listTitle{
+ font-weight: bold;
+ font-size: 10px;
+ color: #039;
+ margin-top:5px;
+}
+
+.objectLink{
+ cursor:pointer;
+}
+
+.objectLink:hover{
+ color: orange;
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.core/web/settings/settings.css b/bundles/org.eclipse.orion.client.core/web/settings/settings.css
index 06c1a84..6089cf4 100644
--- a/bundles/org.eclipse.orion.client.core/web/settings/settings.css
+++ b/bundles/org.eclipse.orion.client.core/web/settings/settings.css
@@ -1,22 +1,12 @@
@import "../org.dojotoolkit/dojo/resources/dojo.css";
-
@import "../org.dojotoolkit/dijit/themes/nihilo/nihilo.css";
-
-@import "../org.dojotoolkit/dijit/themes/nihilo/Tree.css";
-
-@import
- "../org.dojotoolkit/dijit/themes/nihilo/layout/BorderContainer.css";
-
+@import "../org.dojotoolkit/dijit/themes/nihilo/layout/BorderContainer.css";
@import "../org.dojotoolkit/dijit/themes/nihilo/form/Common.css";
-
@import "../org.dojotoolkit/dijit/themes/nihilo/form/Button.css";
-
@import "../css/ide.css";
-
@import "../css/breadcrumbs.css";
-
@import "../css/commands.css";
-
+@import "./services.css";
html,body {
height: 100%;
@@ -24,7 +14,7 @@ html,body {
h1 {
position: relative;
- margin-top: 18px;
+ margin-top: 18px
}
select {
@@ -387,204 +377,4 @@ list>*,grid>* {
.plugin-service-item {
width: 100%;
margin-left: 63px;
-}
-
-
-
-.serviceContainerClosed{
- position: relative;
- background: white;
- padding-left:16px;
- background-image: url("data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAwAAAANCAYAAACdKY9CAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46FewKfYYAAAF4SURBVCjPbZEvyFNhGMV/590ciANhjNs2nC66osHiJ8b9cdVgN4uKyWbRaDGZBIvwYRB2723WBUEEy5igYeZxYQzd7t2x7IUFn/bAOec55zxK05TxeEyWZZds3wEeAXeBP8An4I3tr5PJZJemKQLIsiyxfQ6c8f95V1XVw+l0utdsNrsInEsaA5akE6Btx/3Vfr9/HiTdOIIBKMsS29gGOCU/bTQanWD7QVQry1Lz+ZzFYsFutyOEgCQkGbhg+1Zd0vRIkG2KomC5XLJarej3+3S7XUII8dJZHehIihaQxHq9ZrvdUhQFzWaTdrvNEXO1DvwCrkSjh8OBJEnodrv0ej1arVZMD/CjLumj7SexoSRJGAwGdDodarVaBFqSbH9WlmU3gS9RHSCEgG1iw8fW/gLXAvDd9gfbhBAIIThmOf4hZnux2Wx+CyDP88tVVb2XdC9mOVUHXo9Go8eSCFmWMRwOC+A+cBt4C/y0/c32S+C6pGeSyPOcfyAyt4A7QPcNAAAAAElFTkSuQmCC" );
- background-repeat:no-repeat;
- background-position:left;
- color: #666;
- font-size: 0.9em;
- float:left;
- -webkit-user-select: none;
- cursor:pointer;
-}
-
-.serviceContainerOpen{
- position: relative;
- background: white;
- padding-left:16px;
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAMCAYAAAC5tzfZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46NddkXU4AAAFuSURBVCjPXZG/q9NwFMU/5yYQOhVKoF1SDK9OOjl1URxcQl+G5/LgLeJf4K7wRjdBxMXRxcFR6TfZ3e3iUGe3DKXYQSEk10GjwbPdy+X8uEdVVVEUBVVVJcBt4MrdHwI3gG/u/lHSO3f/vNlsfoQQEEBd19O+799IunR3JAHg7gxw92Bmj4uiaLTdbifAe0nnkvDfl+IfxvMnSUUs6Q5wLom+7+m6TmMFSYrjeFjcdfd7MfBozLjb7WiaBjPD3ZlOp6zXa8VxPNh9YsCDgdTMmM/nHI9H9vs9TdOQpilRFI3cct+A7+PgWZaxXC5JkoQsy8jznP/w04Aw2JNEFEXkec5isWC1WjGZTIZvDrk+KIRwC/jyJzQAfd9zOByYzWZ/s42wNklfgZejXtzMSNMUMxsrALx1952G46qqnrr7tZklQ8EjhRZ40XXddVmWrdV1jSROp9Nz4MzdL4BX7h6A18ClpJtt2z4ry7INIfAL982ks01Z8EgAAAAASUVORK5CYII=" );
- background-repeat:no-repeat;
- background-position:left;
- color: #666;
- font-size: 0.9em;
- float:left;
- -webkit-user-select: none;
- cursor:pointer;
-}
-
-.service-container:hover{
- color: #039;
-}
-
-.serviceTable{
- border-collapse: separate;
- border-spacing: 2px;
- font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
- font-size: 9px;
- text-align: left;
- border-collapse: collapse;
- width: 200px;
- -webkit-user-select: none;
-}
-
- .serviceTable th{
- padding: 8px 2px;
- font-weight: normal;
- font-size: 10px;
- border-bottom: 2px solid #6678B1;
- border-right: 30px solid white;
- border-left: 30px solid white;
- color: #039;
- -webkit-user-select: none;
-}
-
-.serviceTable td {
- padding : 3px 2px 0px 2px;
- border-right: 30px solid white;
- border-left: 30px solid white;
- width:100px;
- color: #669;
- -webkit-user-select: none;
-}
-
-.serviceTable td, th {
- display: table-cell;
- vertical-align: inherit;
- -webkit-user-select: none;
-}
-
-.tablecontainer{
- padding:1px;
- border: 1px solid #039;
- display: inline-block;
- border-radius:5px;
- vertical-align:top;
- -webkit-user-select: none;
-}
-
-.serviceData{
- display: inline;
- list-style-type: none;
- padding-right: 20px;
-}
-
-.serviceRailsVisible{
- white-space: nowrap;
- border-top: solid 1px #EEE;
- border-bottom: solid 1px #EEE;
- margin-top:30px;
- overflow:hidden;
- -webkit-user-select: none;
- transition:height 1s;
- width:700px;
- -moz-transition:height 1s; /* Firefox 4 */
- -webkit-transition:height 1s; /* Safari and Chrome */
- -o-transition:height 1s;
- -ms-transition:height 1s; /* Safari and Chrome */
-}
-
-.serviceRailsHidden{
- white-space: nowrap;
- border-top: solid 1px #EEE;
- border-bottom: solid 1px #EEE;
- margin-top:30px;
- margin-right:20px;
- overflow:hidden;
- visibility:hidden;
- height:0px;
- transition:height 1s;
- width:700px;
- -moz-transition:height 1s; /* Firefox 4 */
- -webkit-transition:height 1s; /* Safari and Chrome */
- -o-transition:height 1s;
- -ms-transition:height 1s; /* Safari and Chrome */
-}
-
-.serviceList{
- margin-right:20px;
- padding-right:20px;
-
- float:left;
- // position:relative;
- overflow:hidden;
-}
-
-.leftButtonArea{
- width: 40px;
- float:left;
- position:relative;
- visibility:hidden;
- display: inline;
- text-align:right;
-}
-
-.rightButtonArea{
- width: 40px;
- float:left;
- position:relative;
- visibility:hidden;
- display: inline;
- margin: 0 1em 0 1em;
- text-align:right;
-}
-
-.carouselControl{
- background:#666;
- opacity:0.4;
- padding-left:6px;
- padding-right:6px;
- border-radius:23px;
- display: table-cell;
- vertical-align: middle;
- position:absolute;
- color:white;
- font-weight:bolder;
- border: #333 solid 1px;
- cursor:pointer;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- background: #222;
- text-align:right;
-}
-
-.carouselControl:hover{
- opacity:0.8;
-}
-
-.listContainer{
- float:left;
- overflow:hidden;
- padding-left:0px;
- margin-left:0px;
- width:600px;
-}
-
-.listEntry{
- padding:1px;
- display: inline-block;
- vertical-align:top;
- text-align:center;
-}
-
-.listTitle{
- font-weight: bold;
- font-size: 10px;
- color: #039;
- margin-top:5px;
-}
-
-.objectLink{
- cursor:pointer;
-}
-
-.objectLink:hover{
- color: orange;
-}
-
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.core/web/settings/settings.js b/bundles/org.eclipse.orion.client.core/web/settings/settings.js
index 0fb8936..bb2fcd9 100644
--- a/bundles/org.eclipse.orion.client.core/web/settings/settings.js
+++ b/bundles/org.eclipse.orion.client.core/web/settings/settings.js
@@ -271,12 +271,12 @@ function showPlugins( id ){
dojo.empty( tableNode );
- var settingsPluginList = settingsCore.pluginRegistry.getPlugins();
-
if( pluginWidget ){
pluginWidget.destroyRecursive(true);
}
+ updateToolbar(id);
+
pluginWidget = new orion.widgets.PluginList( { settings: settingsCore, statusService: preferencesStatusService, dialogService:preferenceDialogService, commandService: commandService, toolbarID: "pageActions" }, tableNode );
}
@@ -346,42 +346,35 @@ function drawUserInterface( settings ) {
function manageDefaultData( preferences, settings ){
// var example = [ { "subcategory":"Font", [ { "label":"Family", "value":"serif" }, {"label":"Size", "value":"10pt"}, {"label":"Line Height", "value":"12pt"} ] ];
-
- // preferences.getPreferences('OrionPluginDefaults').then( function(prefs){
- for( var count = 0; count < settings.length; count++ ){
+ for( var count = 0; count < settings.length; count++ ){
+
+ var category = settings[count].category;
- var category = settings[count].category;
-
- if( !localStorage.getItem( category ) ){
+ if( !localStorage.getItem( category ) ){
+
+ var subcategories = [];
- // if( prefs.get( category ) === undefined ){
+ var subcategory = settings[count].subcategory;
+
+ for( var sub = 0; sub < subcategory.length; sub++ ){
- var subcategories = [];
+ var elements = [];
- var subcategory = settings[count].subcategory;
-
- for( var sub = 0; sub < subcategory.length; sub++ ){
-
- var elements = [];
-
- for( var item = 0; item < subcategory[sub].items.length; item++ ){
-
- var element = {};
- element.label = subcategory[sub].items[item].label;
- element.value = subcategory[sub].items[item].setting;
- elements.push( element );
- }
+ for( var item = 0; item < subcategory[sub].items.length; item++ ){
- subcategories.push( { "label":subcategory[sub].label, "data":elements } );
+ var element = {};
+ element.label = subcategory[sub].items[item].label;
+ element.value = subcategory[sub].items[item].setting;
+ elements.push( element );
}
- localStorage.setItem( category, JSON.stringify( subcategories ) );
-
- // prefs.put( category, subcategories );
+ subcategories.push( { "label":subcategory[sub].label, "data":elements } );
}
- }
- // });
+
+ localStorage.setItem( category, JSON.stringify( subcategories ) );
+ }
+ }
}
define(['require', 'dojo', 'orion/bootstrap', 'orion/status', 'orion/commands', 'orion/operationsClient', 'orion/fileClient',