From 6b9ed9e467c963d77fd5fe8769e75eb2567d3a22 Mon Sep 17 00:00:00 2001 From: Aaron Boodman Date: Fri, 15 Aug 2014 21:37:22 -0700 Subject: [PATCH] Some cleanup: remove an unneeded file and rename another. Change-Id: I7ef87c7fcfc831d40b2c507128de04b7c8b20d1c --- server/camlistored/ui/container_detail.js | 72 ------------------- ...irectory_aspect.js => directory_detail.js} | 0 2 files changed, 72 deletions(-) delete mode 100644 server/camlistored/ui/container_detail.js rename server/camlistored/ui/{directory_aspect.js => directory_detail.js} (100%) diff --git a/server/camlistored/ui/container_detail.js b/server/camlistored/ui/container_detail.js deleted file mode 100644 index facbc52dc..000000000 --- a/server/camlistored/ui/container_detail.js +++ /dev/null @@ -1,72 +0,0 @@ -/* -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.ContainerDetail'); - -goog.require('cam.BlobItemContainerReact'); -goog.require('goog.object'); -goog.require('goog.string'); - -cam.ContainerDetail.getAspect = function(detailURL, handlers, history, getSearchSession, thumbnailSize, blobref, searchSession) { - var m = searchSession.getMeta(blobref); - if (m.camliType != 'permanode') { - return null; - } - - // TODO(aa): Also handle directories and static sets. - if (!cam.permanodeUtils.isContainer(m.permanode)) { - return null; - } - - return new cam.ContainerDetail.Aspect(detailURL, handlers, history, getSearchSession, thumbnailSize, blobref); -}; - -cam.ContainerDetail.Aspect = function(detailURL, handlers, history, getSearchSession, thumbnailSize, blobref) { - this.detailURL_ = detailURL; - this.handlers_ = handlers; - this.history_ = history; - this.getSearchSession_ = getSearchSession; - this.thumbnailSize_ = thumbnailSize; - this.blobref_ = blobref; -}; - -cam.ContainerDetail.Aspect.prototype.getTitle = function() { - return 'Container'; -}; - -cam.ContainerDetail.Aspect.prototype.createContent = function(size) { - if (!this.searchSession) { - this.searchSession_ = this.getSearchSession_(this.blobref_); - } - return cam.BlobItemContainerReact({ - detailURL: this.detailURL_, - handlers: this.handlers_, - history: this.history_, - searchSession: this.searchSession_, - selection: {}, - style: { - background: 'white', - height: size.height, - left: 0, - overflowX: 'hidden', - overflowY: 'scroll', - position: 'absolute', - top: 0, - width: size.width, - }, - thumbnailSize: this.thumbnailSize_, - }); -}; diff --git a/server/camlistored/ui/directory_aspect.js b/server/camlistored/ui/directory_detail.js similarity index 100% rename from server/camlistored/ui/directory_aspect.js rename to server/camlistored/ui/directory_detail.js