Merge branch 'master' of ssh://camlistore.org:29418/camlistore

This commit is contained in:
Brad Fitzpatrick 2012-12-23 16:58:35 -08:00
commit e3bda63e68
6 changed files with 27 additions and 14 deletions

View File

@ -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 {

View File

@ -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_());

View File

@ -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');
};

View File

@ -2,6 +2,7 @@
font-size: 40pt;
text-decoration: none;
}
.cam-createitem {
cursor: pointer;;
cursor: pointer !important;
}

View File

@ -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);

View File

@ -71,6 +71,5 @@ camlistore.ServerConnection.prototype.getRecentlyUpdatedPermanodesDone_ =
}
return;
}
success(result);
};