diff --git a/server/camlistored/newui/blob_item.css b/server/camlistored/newui/blob_item.css index 388964014..ae59b6096 100644 --- a/server/camlistored/newui/blob_item.css +++ b/server/camlistored/newui/blob_item.css @@ -3,16 +3,18 @@ margin: 0.25em; border: 1px solid gray; padding: 8px; - max-width: 250px; display: inline-block; overflow: hidden; text-align: center; vertical-align: top; + outline: 0; + cursor: default; } -.cam-blobitem-150 { +.cam-blobitemcontainer-150 .cam-blobitem { width: 150px; height: 150px; + max-width: 250px; } .cam-blobitem:hover { diff --git a/server/camlistored/newui/blob_item.js b/server/camlistored/newui/blob_item.js index b386c4cd8..4a2bd4bd3 100644 --- a/server/camlistored/newui/blob_item.js +++ b/server/camlistored/newui/blob_item.js @@ -90,8 +90,8 @@ camlistore.BlobItem.resolve = function(blobRef, metaBag) { * @return {string} */ camlistore.BlobItem.prototype.getThumbSrc_ = function() { - // TODO(bslatkin): Make this prefix configured by globals, discovered by - // the page at initialization. + // TODO(bslatkin): Remove the '../' once we move the new UI to the right + // handler, or change the server side to return an absolute URL. return '../' + this.metaData_.thumbnailSrc; }; @@ -112,6 +112,16 @@ camlistore.BlobItem.prototype.getThumbWidth_ = function() { }; +/** + * @return {string} + */ +camlistore.BlobItem.prototype.getLink_ = function() { + // TODO(bslatkin): Remove the '../' once we move the new UI to the right + // handler, or change the server side to return an absolute URL. + return '../?p=' + this.blobRef_; +}; + + /** * @return {string} */ @@ -140,16 +150,18 @@ camlistore.BlobItem.prototype.decorateInternal = function(element) { camlistore.BlobItem.superClass_.decorateInternal.call(this, element); var el = this.getElement(); - goog.dom.classes.add(el, 'cam-blobitem', 'cam-blobitem-150'); + goog.dom.classes.add(el, 'cam-blobitem'); var linkEl = this.dom_.createDom('a'); - + linkEl.href = this.getLink_(); var thumbEl = this.dom_.createDom('img', 'cam-blobitem-thumb'); thumbEl.src = this.getThumbSrc_(); thumbEl.height = this.getThumbHeight_(); thumbEl.width = this.getThumbWidth_(); - this.dom_.appendChild(el, thumbEl); + + this.dom_.appendChild(linkEl, thumbEl); + this.dom_.appendChild(el, linkEl); var titleEl = this.dom_.createDom('p', 'cam-blobitem-thumbtitle'); this.dom_.setTextContent(titleEl, this.getTitle_()); diff --git a/server/camlistored/newui/blob_item_container.js b/server/camlistored/newui/blob_item_container.js index 51af19efd..43e9f5e65 100644 --- a/server/camlistored/newui/blob_item_container.js +++ b/server/camlistored/newui/blob_item_container.js @@ -72,7 +72,8 @@ camlistore.BlobItemContainer.prototype.decorateInternal = function(element) { camlistore.BlobItemContainer.superClass_.decorateInternal.call(this, element); var el = this.getElement(); - goog.dom.classes.add(el, 'cam-blobitemcontainer'); + goog.dom.classes.add( + el, 'cam-blobitemcontainer', 'cam-blobitemcontainer-150'); }; diff --git a/server/camlistored/newui/create_item.css b/server/camlistored/newui/create_item.css index d0f356e7d..954bf6649 100644 --- a/server/camlistored/newui/create_item.css +++ b/server/camlistored/newui/create_item.css @@ -2,6 +2,7 @@ font-size: 40pt; text-decoration: none; } + .cam-createitem { - cursor: pointer;; + cursor: pointer !important; } diff --git a/server/camlistored/newui/create_item.js b/server/camlistored/newui/create_item.js index 19d1dad88..a19d2a89e 100644 --- a/server/camlistored/newui/create_item.js +++ b/server/camlistored/newui/create_item.js @@ -48,12 +48,10 @@ camlistore.CreateItem.prototype.decorateInternal = function(element) { camlistore.CreateItem.superClass_.decorateInternal.call(this, element); var el = this.getElement(); - // TODO(bslatkin): Put cam-blobitem-150 on the parent container. - goog.dom.classes.add(el, 'cam-blobitem', 'cam-blobitem-150', - 'cam-createitem'); + goog.dom.classes.add(el, 'cam-blobitem', 'cam-createitem'); var plusEl = this.dom_.createDom('a', 'cam-createitem-link'); - plusEl.href = '#'; + plusEl.href = 'javascript:void(0)'; this.dom_.setTextContent(plusEl, "+") this.dom_.appendChild(el, plusEl); diff --git a/server/camlistored/newui/server_connection.js b/server/camlistored/newui/server_connection.js index df8d6fad4..29a50d49a 100644 --- a/server/camlistored/newui/server_connection.js +++ b/server/camlistored/newui/server_connection.js @@ -71,6 +71,5 @@ camlistore.ServerConnection.prototype.getRecentlyUpdatedPermanodesDone_ = } return; } - success(result); };