Aspects: A new idea for the detail page.
http://imgur.com/Re14XKc,6fYHJqp,39nnQiT#0
Camlistore is built around the idea that every object is a blob,
but blobs can also self-describe themselves as more than a blob.
For example, some blobs are also files, or images, or sets, or
permanodes, or movies, or foursquare checkins. Etc.
Here is an idea for the detail page that reflects that underlying
reality of Camlistore.
Each blob has a single canonical URL in the web UI for its detail
page. Currently this is /?p=<...>, but should ideally be just
/<blobref>.
Within the web UI, many "aspects" register interest in providing
views on blobs. Each time the user navigates to a detail page,
each aspects gets to say whether it can provide a useful view on
the blob.
Aspects are currently rendered (crappily) as tabs along the bottom
of the UI. I'm not sure how they should actually be rendered, this
is temporary.
This patch includes the following aspects:
- image (the old image detail)
- permanode (the old old permanode page)
- blob (the old old blob page)
Change-Id: Idb3cdbb203799a5d9c113d1b37b67a2724040085
2014-04-14 16:20:22 +00:00
|
|
|
/*
|
|
|
|
Copyright 2014 The Camlistore Authors
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
goog.provide('cam.BlobDetail');
|
|
|
|
|
|
|
|
goog.require('cam.CacheBusterIframe');
|
|
|
|
|
2014-08-15 06:04:37 +00:00
|
|
|
cam.BlobDetail.getAspect = function(baseURL, onChildFrameClick, blobref, targetSearchSession) {
|
2014-08-10 03:17:10 +00:00
|
|
|
if(!targetSearchSession) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var m = targetSearchSession.getMeta(blobref);
|
2014-08-15 06:04:37 +00:00
|
|
|
if (!m) {
|
2014-08-10 03:17:10 +00:00
|
|
|
return null;
|
|
|
|
}
|
Aspects: A new idea for the detail page.
http://imgur.com/Re14XKc,6fYHJqp,39nnQiT#0
Camlistore is built around the idea that every object is a blob,
but blobs can also self-describe themselves as more than a blob.
For example, some blobs are also files, or images, or sets, or
permanodes, or movies, or foursquare checkins. Etc.
Here is an idea for the detail page that reflects that underlying
reality of Camlistore.
Each blob has a single canonical URL in the web UI for its detail
page. Currently this is /?p=<...>, but should ideally be just
/<blobref>.
Within the web UI, many "aspects" register interest in providing
views on blobs. Each time the user navigates to a detail page,
each aspects gets to say whether it can provide a useful view on
the blob.
Aspects are currently rendered (crappily) as tabs along the bottom
of the UI. I'm not sure how they should actually be rendered, this
is temporary.
This patch includes the following aspects:
- image (the old image detail)
- permanode (the old old permanode page)
- blob (the old old blob page)
Change-Id: Idb3cdbb203799a5d9c113d1b37b67a2724040085
2014-04-14 16:20:22 +00:00
|
|
|
|
2014-08-15 06:04:37 +00:00
|
|
|
return {
|
|
|
|
fragment: 'blob',
|
|
|
|
title: 'Blob',
|
|
|
|
createContent: function(size) {
|
|
|
|
var url = baseURL.clone();
|
|
|
|
url.setParameterValue('b', blobref);
|
|
|
|
return cam.CacheBusterIframe({
|
2014-08-17 02:13:36 +00:00
|
|
|
baseURL: baseURL,
|
2014-08-15 06:04:37 +00:00
|
|
|
height: size.height,
|
|
|
|
onChildFrameClick: onChildFrameClick,
|
|
|
|
key: 'blob',
|
|
|
|
src: url,
|
|
|
|
width: size.width,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|
Aspects: A new idea for the detail page.
http://imgur.com/Re14XKc,6fYHJqp,39nnQiT#0
Camlistore is built around the idea that every object is a blob,
but blobs can also self-describe themselves as more than a blob.
For example, some blobs are also files, or images, or sets, or
permanodes, or movies, or foursquare checkins. Etc.
Here is an idea for the detail page that reflects that underlying
reality of Camlistore.
Each blob has a single canonical URL in the web UI for its detail
page. Currently this is /?p=<...>, but should ideally be just
/<blobref>.
Within the web UI, many "aspects" register interest in providing
views on blobs. Each time the user navigates to a detail page,
each aspects gets to say whether it can provide a useful view on
the blob.
Aspects are currently rendered (crappily) as tabs along the bottom
of the UI. I'm not sure how they should actually be rendered, this
is temporary.
This patch includes the following aspects:
- image (the old image detail)
- permanode (the old old permanode page)
- blob (the old old blob page)
Change-Id: Idb3cdbb203799a5d9c113d1b37b67a2724040085
2014-04-14 16:20:22 +00:00
|
|
|
};
|