This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -329,13 +329,17 @@ function upgradeAction()
329
329
*/
330
330
function serversidefilechooserAction ()
331
331
{
332
- $ userid = $ this ->CheckSession ();
333
- if (!$ this ->User ->isAdmin ($ userid ))
332
+ if (!$ this ->logged )
334
333
{
335
- echo "Administrative privileges required " ;
336
- exit ();
334
+ throw new Zend_Exception ("You should be logged in " );
337
335
}
338
-
336
+ if (!$ this ->userSession ->Dao ->isAdmin ())
337
+ {
338
+ throw new Zend_Exception ("Administrative privileges required " );
339
+ }
340
+
341
+ $ this ->_helper ->layout ->disableLayout ();
342
+ $ this ->_helper ->viewRenderer ->setNoRender ();
339
343
340
344
// Display the tree
341
345
$ _POST ['dir ' ] = urldecode ($ _POST ['dir ' ]);
@@ -386,7 +390,6 @@ function serversidefilechooserAction()
386
390
echo "File " .$ _POST ['dir ' ]." doesn't exist " ;
387
391
}
388
392
// No views
389
- exit ();
390
393
} // end function serversidefilechooserAction
391
394
392
395
@@ -396,8 +399,9 @@ function serversidefilechooserAction()
396
399
*/
397
400
function migratemidas2Action ()
398
401
{
402
+ $ this ->_helper ->layout ->disableLayout ();
403
+ $ this ->_helper ->viewRenderer ->setNoRender ();
399
404
$ this ->Component ->MIDAS2Migration ->migrate ();
400
- exit ();
401
405
}
402
406
403
407
} // end class
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ $(document).ready(function()
14
14
$ ( '#inputdirectory' ) . change ( function ( ) { inputdirectoryChanged ( ) } ) ;
15
15
16
16
// Form for the new assetstore
17
- options = { success :assetstoreAddCallback , beforeSubmit : assetstoreSubmit , dataType :'json' } ;
17
+ options = { success :assetstoreAddCallback , beforeSubmit : assetstoreSubmit , dataType :'json' } ;
18
18
$ ( '#assetstoreForm' ) . ajaxForm ( options ) ;
19
19
20
20
// Load the window for the new assetstore
@@ -33,6 +33,18 @@ $(document).ready(function()
33
33
$ ( "#assetstoretype" ) . attr ( 'disabled' , 'disabled' ) ;
34
34
35
35
importSubmitButtonValue = $ ( "#importsubmit" ) . html ( ) ;
36
+
37
+ //Init Browser
38
+ $ ( 'input[name=importFolder]' ) . val ( '' ) ;
39
+ $ ( 'input[name=importFolder]' ) . attr ( 'id' , 'destinationId' ) ;
40
+ $ ( 'input[name=importFolder]' ) . hide ( ) ;
41
+ $ ( 'input[name=importFolder]' ) . before ( '<input style="margin-left:0px;" id="browseMIDASLink" class="globalButton" type="button" value="Select location" />' ) ;
42
+ $ ( 'input[name=importFolder]' ) . before ( '<span style="margin-left:5px;" id="destinationUpload"/>' ) ;
43
+ $ ( '#browseMIDASLink' ) . click ( function ( )
44
+ {
45
+ loadDialog ( "select" , "/browse/movecopy/?selectElement=true" ) ;
46
+ showDialog ( 'Browse' ) ;
47
+ } ) ;
36
48
} ) ;
37
49
38
50
You can’t perform that action at this time.
0 commit comments