Pholio - make the form maintain client side edits between file uploads
Summary: Fixes T3553. Did it by adding some code that refreshes the File object on keyup events within a given file entry. also fixes an html derp I found trying to fix this. Test Plan: added cool things like 'bbb' to every field and noted they were maintained when I added more files Reviewers: btrahan Reviewed By: btrahan CC: aran, Korvin, chad Maniphest Tasks: T3553 Differential Revision: https://secure.phabricator.com/D6488
This commit is contained in:
@@ -3,20 +3,6 @@
|
||||
final class PhabricatorFileDropUploadController
|
||||
extends PhabricatorFileController {
|
||||
|
||||
private $viewObject;
|
||||
|
||||
public function setViewObject(AphrontAbstractAttachedFileView $view) {
|
||||
$this->viewObject = $view;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getViewObject() {
|
||||
if (!$this->viewObject) {
|
||||
$this->viewObject = new AphrontAttachedFileView();
|
||||
}
|
||||
return $this->viewObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @phutil-external-symbol class PhabricatorStartup
|
||||
*/
|
||||
@@ -38,14 +24,10 @@ final class PhabricatorFileDropUploadController
|
||||
'isExplicitUpload' => true,
|
||||
));
|
||||
|
||||
$view = $this->getViewObject();
|
||||
$view->setFile($file);
|
||||
|
||||
return id(new AphrontAjaxResponse())->setContent(
|
||||
array(
|
||||
'id' => $file->getID(),
|
||||
'phid' => $file->getPHID(),
|
||||
'html' => $view->render(),
|
||||
'uri' => $file->getBestURI(),
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user