Autoedit a new document. Ref #104
This commit is contained in:
parent
593c760686
commit
6fb03c35c7
@ -33,6 +33,8 @@ class DocumentController extends Controller{
|
||||
}
|
||||
|
||||
$view->file_put_contents($path, $content);
|
||||
$info = $view->getFileInfo($path);
|
||||
\OCP\JSON::success(array ('fileid' => $info['fileid']) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -287,7 +287,15 @@ var documentsMain = {
|
||||
$.post(
|
||||
OC.generateUrl('apps/documents/ajax/documents/create'),
|
||||
{},
|
||||
documentsMain.show
|
||||
function(response){
|
||||
if (response && response.fileid){
|
||||
documentsMain.prepareSession();
|
||||
documentsMain.joinSession(response.fileid);
|
||||
} else {
|
||||
documentsMain.show();
|
||||
}
|
||||
}
|
||||
|
||||
);
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user