Sha256: e9c4fbcdb8282d98327ecea1b379049bc404080cf50f0697d428157f0b978f63
Contents?: true
Size: 1.29 KB
Versions: 42
Compression:
Stored size: 1.29 KB
Contents
// ========================================================================== // Project: Greenhouse.filesController // Copyright: ©2010 Mike Ball // ========================================================================== /*globals Greenhouse */ /** @class @extends TreeController */ Greenhouse.filesController = SC.TreeController.create(SC.CollectionViewDelegate, /** @scope Greenhouse.filesController.prototype */ { // .......................................................... // Drag and drop support // collectionViewValidateDragOperation: function(view, drag, op, proposedInsertionIndex, proposedDropOperation) { return SC.DRAG_ANY; }, collectionViewPerformDragOperation: function(view, drag, op, proposedInsertionIndex, proposedDropOperation) { console.log('delegate works'); return SC.DRAG_NONE ; }, treeItemChildrenKey: "contents", /** Call this method whenever you want to relaod the files from the server. */ reload: function() { var fileQuery = Greenhouse.FILES_QUERY, target = Greenhouse.targetController.get('content'); fileQuery.set('urlPath', target.get('name')); var files = Greenhouse.store.find(fileQuery), root = SC.Object.create({treeItemIsExpanded: YES}); root.set('contents', files); this.set('content', root); } }) ;
Version data entries
42 entries across 42 versions & 2 rubygems