1 // ========================================================================== 2 // Papercube.SearchResultsCollectionView 3 // 4 // License: PaperCube is open source software released under 5 // the MIT License (see license.js) 6 // ========================================================================== 7 8 require('core'); 9 10 /** @class 11 12 This is the basic search results collection view. 13 14 @extends SC.View 15 @author Peter Bergstrom 16 @version 1.0 17 @copyright 2008-2009 Peter Bergström. 18 */ 19 Papercube.SearchResultsCollectionView = SC.CollectionView.extend( 20 /** @scope Papercube.SearchResultsCollectionView.prototype */ { 21 22 /** 23 Resize based on the window height. 24 25 @param oldSize {Integer} The old size. 26 */ 27 resizeWithOldParentSize: function(oldSize) 28 { 29 this.set('frame', {height: NodeGraph.windowHeight()-194}); 30 }, 31 32 /** 33 Initialization function. 34 35 Call resizeWithOldParentSize. 36 */ 37 init: function() 38 { 39 sc_super(); 40 41 // Set the frame height on init. 42 this.resizeWithOldParentSize(); 43 } 44 45 }) ; 46