Merge branch 'new-services'

This commit is contained in:
Tom Morris 2014-07-03 18:07:44 -04:00
commit 4c2859a467
7 changed files with 115 additions and 31 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

View File

@ -364,7 +364,8 @@
"fb-key": "a Freebase key in",
"fb-en-ns": "the Wikipedia English namespace",
"this-ns": "this namespace:",
"max-candidates" : "Maximum number of candidates to return"
"max-candidates" : "Maximum number of candidates to return",
"service-title": "Services"
},
"core-util-enc": {
"select-enc": "Select Encoding",

View File

@ -364,8 +364,8 @@
"fb-key": "a Freebase key in",
"fb-en-ns": "the Wikipedia English namespace",
"this-ns": "this namespace:",
"max-candidates" : "Maximum number of candidates to return"
"max-candidates" : "Maximum number of candidates to return",
"service-title": "Services"
},
"core-util-enc": {
"select-enc": "Select Encoding",

View File

@ -365,6 +365,7 @@
"fb-en-ns": "namespace di Wikipedia inglese",
"this-ns": "questo namespace:",
"max-candidates" : "Maximum number of candidates to return [TODO - translate]",
"service-title": "Servizi"
},
"core-util-enc": {
"select-enc": "Seleziona la codifica",

View File

@ -1,24 +1,34 @@
<div class="dialog-frame" style="width: 900px;">
<div class="dialog-header" bind="dialogHeader"></div>
<div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full grid-layout-for-ui"><table><tr>
<td width="1%">
<div class="recon-dialog-service-list" bind="serviceList"></div>
</td>
<td><div class="recon-dialog-service-panel-container" bind="servicePanelContainer">
<div class="recon-dialog-service-panel-message" bind="servicePanelMessage">
</div>
</div></td>
</tr></table></div>
</div>
<div class="dialog-footer" bind="dialogFooter"><table width="100%"><tr>
<td align="left">
<button class="button" bind="addStandardServiceButton"></button>
<button class="button" bind="addNamespacedServiceButton"></button>
</td>
<td align="right">
<button class="button" bind="reconcileButton"></button>
<button class="button" bind="cancelButton"></button>
</td>
</div>
<div class="dialog-header" bind="dialogHeader"></div>
<div class="dialog-body" bind="dialogBody">
<div class="grid-layout layout-normal layout-full grid-layout-for-ui">
<div class="recon-dialog-service">
<div class="recon-dialog-service-list-container">
<div class="recon-dialog-service-opener">
<div class="recon-dialog-service-opener-title" bind="serviceListTitle"></div>
<img class="recon-dialog-service-opener-img" src="images/menu-opener.png" />
</div>
<div class="recon-dialog-service-list" bind="serviceList"></div>
</div>
<div class="recon-dialog-service-panel-container"
bind="servicePanelContainer">
<div class="recon-dialog-service-panel-message"
bind="servicePanelMessage"></div>
</div>
</div>
</div>
</div>
<div class="dialog-footer" bind="dialogFooter">
<table width="100%">
<tr>
<td align="left">
<button class="button" bind="addStandardServiceButton"></button>
<button class="button" bind="addNamespacedServiceButton"></button>
</td>
<td align="right">
<button class="button" bind="reconcileButton"></button>
<button class="button" bind="cancelButton"></button>
</td>
</table>
</div>
</div>

View File

@ -47,6 +47,7 @@ ReconDialog.prototype._createDialog = function() {
this._elmts.dialogHeader.text($.i18n._('core-recon')["recon-col"]+' "' + this._column.name + '"');
this._elmts.servicePanelMessage.html($.i18n._('core-recon')["pick-service"]);
this._elmts.serviceListTitle.html($.i18n._('core-recon')["service-title"]);
this._elmts.addStandardServiceButton.html($.i18n._('core-buttons')["add-std-svc"]+"...");
this._elmts.addNamespacedServiceButton.html($.i18n._('core-buttons')["add-named-svc"]+"...");
this._elmts.reconcileButton.html($.i18n._('core-buttons')["start-recon"]);
@ -113,6 +114,7 @@ ReconDialog.prototype._populateDialog = function() {
.text(service.name)
.appendTo(self._elmts.serviceList)
.click(function() {
self._toggleServices();
self._selectService(record);
});
@ -132,9 +134,32 @@ ReconDialog.prototype._populateDialog = function() {
for (var i = 0; i < services.length; i++) {
renderService(services[i]);
}
$('.recon-dialog-service-opener').click(function() {
self._toggleServices();
});
}
};
ReconDialog.prototype._toggleServices = function() {
var self = this;
self._toggleServiceTitle(500);
self._toggleServiceList(500);
};
ReconDialog.prototype._toggleServiceTitle = function(duration) {
var title = $('.recon-dialog-service-opener-title');
title.animate({
width : 'toggle'
}, duration, 'swing', function() {
});
};
ReconDialog.prototype._toggleServiceList = function(duration) {
$(".recon-dialog-service-list").toggle("slide", duration);
};
ReconDialog.prototype._selectService = function(record) {
for (var i = 0; i < this._serviceRecords.length; i++) {
if (record === this._serviceRecords[i]) {
@ -244,4 +269,4 @@ ReconDialog.prototype._onAddNamespacedService = function() {
dismiss();
});
elmts.namespaceInput.focus().data("suggest").textchange();
};
};

View File

@ -33,12 +33,59 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@import-less url("../theme.less");
.recon-dialog-service-list {
border: 1px solid #aaa;
padding: 1px;
overflow: auto;
width: 200px;
.recon-dialog-service {
height: 500px;
padding: 0 0 10px;
}
.recon-dialog-service-list-container {
position: absolute;
}
.recon-dialog-service-list {
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #AAAAAA;
height: 470px;
margin-left: 10px;
overflow: auto;
padding: 1px;
width: 200px;
}
.recon-dialog-service-opener {
height: 25px;
margin-left: -5px;
}
.recon-dialog-service-opener:hover {
cursor: pointer;
}
.recon-dialog-service-opener-title {
background: none repeat scroll 0 0 #E0EDFE;
float: left;
font-size: 18px;
height: 100%;
text-align: center;
width: 220px;
}
.recon-dialog-service-opener-img {
background: none repeat scroll 0 0 #E0EDFE;
border-bottom-right-radius: 12px;
border-top-right-radius: 12px;
padding: 4px 2px;
}
.recon-dialog-service-opener-img:hover {
background: none repeat scroll 0 0 #BFDBFF;
}
.recon-dialog-service-panel-container {
float: left;
height: 500px;
margin-left: 20px;
width: 850px;
}
a.recon-dialog-service-selector {