Source

yii-ddmedia / views / default / index.php

Diff from to

views/default/index.php

 <h1><?php echo CHtml::encode(Yii::t('main', 'Media Browser')); ?></h1>
 
 <?php 
+/* DEBUG
 echo "<li>basePath: ".$basePath; 
 echo "<li>path: ".$path; 
 echo "<li>currentPath: ".$currentPath; 
+ */
 ?>
 
 <?php
             case 'newdir': // {{{ 
                 jQuery('#mediaActionSubmitButton').val('<?php echo CHtml::encode(Yii::t('main', 'Create')); ?>');
                 jQuery('.msg').html('<?php echo CHtml::encode(Yii::t('main', 'Enter the name for the new directory:')); ?>').show();
-                jQuery('#DDMediaAction_path').val(currentPath);
+                jQuery('#DDMediaAction_path').val(jQuery('#path').val());
+                jQuery('#selectedItemsRow').hide();
                 jQuery('#p1Row').show();
                 jQuery('label[for=DDMediaAction_p1]').html('<?php echo CHtml::encode(Yii::t('main', 'New Directory')); ?>');
                 jQuery('#DDMediaAction_p1').val('').focus().select();
             case 'upload': // {{{ 
                 jQuery('#mediaActionSubmitButton').val('<?php echo CHtml::encode(Yii::t('main', 'Upload')); ?>');
                 jQuery('.msg').html('<?php echo CHtml::encode(Yii::t('main', 'Select a file to be uploaded:')); ?>').show();
-                jQuery('#DDMediaAction_path').val(currentPath);
+                jQuery('#DDMediaAction_path').val(jQuery('#path').val());
+                jQuery('#selectedItemsRow').hide();
                 jQuery('#uploadedFileRow').show();
                 jQuery('#DDMediaAction_uploadedFile').focus().select();
                 break; // }}} 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.