accurator/commit
solved some merging conflicts and minor formatting
author | Cristina-Iulia Bucur |
---|---|
Mon Mar 28 17:10:45 2016 +0200 | |
committer | Cristina-Iulia Bucur |
Mon Mar 28 17:10:45 2016 +0200 | |
commit | 53d76ddc4b599d01e6f48c4c52075c1483cd64e2 |
tree | 35f4d44aade8aa627117ae76423413d2163d4e03 |
parent | 16219bf45c21982d2b86ee3d965e7cb01343e0c6 66f89e76b3473b55a53e92af2cd8f373d4d9166a |
Diff style: patch stat
diff --cc web/js/components/path.js index 6d00127,ae3a6dd..3afff07 --- a/web/js/components/path.js +++ b/web/js/components/path.js @@@ -44,8 -45,10 +45,10 @@@ Path.prototype.addTitle = function() Path.prototype.enrich = function() { var _path = this; - // no need for enriching if we have a title + // no need for enriching if we have a title, e.g. "random" for random objects - if (typeof this.path === 'string' || this.path instanceof String) return; + if (typeof this.path === 'string' || this.path instanceof String) { + return $.Deferred().resolve().promise(); + } return $.ajax({type: "POST", url: "metadata", @@@ -71,15 -74,13 +74,13 @@@ Path.prototype.unfoldEvent = function( var _path = this; var pathHtml = $.el.h4(); - for (var i=0; i<this.elements.length; i++) { + for (var i = 0; i < this.elements.length; i++) { // label colouring - if (i==0) { + if (i == 0) { pathHtml.appendChild( $.el.span({'class':'path-label path-literal'}, - //TODO: Get the query? - // query)); - "query")); + this.query)); - } else if (i%2==0) { + } else if (i%2 == 0) { pathHtml.appendChild( $.el.span({'class':'path-label path-resource'}, this.elements[i].label)); diff --cc web/js/results.js index f7c5757,4298220..717e840 --- a/web/js/results.js +++ b/web/js/results.js @@@ -229,9 -227,8 +229,9 @@@ function processClusters(data, query, l for(var j = 0; j < data.clusters[i].items.length; j++) uris[j] = data.clusters[i].items[j].uri; - clusters[i] = new Cluster(id, uris, path); + clusters[i] = new Cluster(id, uris, path, query); } + return clusters; } } @@@ -327,9 -323,10 +327,10 @@@ function drawCluster(cluster, clusters function displayClusterAsList(cluster, clusters) { // determine from where to start adding items based on the contents of the previous clusters var itemsAdded = itemsInClusters(clusters, clusters.indexOf(cluster)); + var allUris = mergeUrisClusters(clusters, "list"); //for every item in this cluster, add the thumbnail in the list view - for (var itemIndex=0; itemIndex < cluster.uris.length; itemIndex++) { + for (var itemIndex = 0; itemIndex < cluster.uris.length; itemIndex++) { var rowNumber = parseInt(itemsAdded/display.numberDisplayedItems, 10); var rowId = "resultsDivThumbnails" + rowNumber; var index = itemsAdded%display.numberDisplayedItems;