Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
BUG: refs #840. Cleanup select item dialog
Browse files Browse the repository at this point in the history
* Fix table header click bug
* Style/UI improvements
  • Loading branch information
zachmullen committed Oct 8, 2012
1 parent ec93cef commit 310c450
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 46 deletions.
25 changes: 16 additions & 9 deletions core/public/css/browse/browse.selectitem.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,37 @@ table#moveTable{
right: 10px!important;
}

div.selectedItemContainer {
margin-bottom: 5px;
}

div.bottomButtons {
float: right;
margin-top: 10px;
}

input#live_search_item {
background: white url(../../images/icons/search.png) no-repeat scroll 3px 1px;
background: white url(../../images/icons/search.png) no-repeat scroll 2px 1px;
border: 1px solid white;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-khtml-border-radius: 4px;
border-radius: 4px;
font-size: 12px;
opacity: 0.9;
padding: 3px 10px 3px 24px;
width: 400px;
padding: 2px 10px 2px 22px;
-webkit-box-shadow: #666 0 0 3px;
box-shadow: #666 0 0 3px;
-moz-box-shadow: 0px 0px 3px #666;
width:200px;
width:260px;
}

#searchloadingSelectItem{
position:absolute;
background: url("../../images/icons/loading-small.gif") bottom center no-repeat;
display: inline-block;
background: url("../../images/icons/loading-small.gif") bottom center no-repeat;
color:#FFFFFF;
text-decoration:none;
width: 16px;
height: 16px;
top: 12px;
right: 7px;
}
margin-left: 6px;
}
Binary file modified core/public/images/icons/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 40 additions & 37 deletions core/views/browse/selectitem.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,53 @@ echo '<script type="text/javascript" src="' . $this->coreWebroot . '/public/js/b
<link type="text/css" rel="stylesheet" href="<?php echo $this->coreWebroot?>/public/css/common/common.browser.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->coreWebroot?>/public/css/browse/browse.selectitem.css" />

<h4><?php echo $this->t('Please select an item.')?></h4>
<img class="tableLoading" alt="" src="<?php echo $this->coreWebroot?>/public/images/icons/loading.gif"/>
<input type="text" id="live_search_item" value="<?= $this->t('Or search it...') ?>" autocomplete="off" autocorrect="off" autocapitalize="off" />
<input type="hidden" id="live_search_item_value" value="init" />
<div id="searchloadingSelectItem" style="display:none"></div>
<div class="selectedItemContainer"><b>Selection:</b> <span id="selectedDestination" > <?php echo $this->t('Please select an item.') ?> </span></div>

<table id="moveTable" class="midasTree">
<thead>
<?php
if(!empty($this->communities))
{ ?>
<tr>
<th class="thData"><?php echo $this->t('Name');?></th>
</tr>
<?php
<img class="tableLoading" alt="" src="<?php echo $this->coreWebroot?>/public/images/icons/loading.gif"/>
<table id="moveTable" class="midasTree">
<thead>
<?php
if(!empty($this->communities))
{ ?>
<tr>
<th><?php echo $this->t('Name');?></th>
</tr>
<?php
}
?>
</thead>
<tbody>
<?php
$node=1;
foreach($this->communities as $community)
{
$folder=$community->getFolder();
echo "<tr id='node--$node' class='parent' privacy='".($community->getPrivacy() == 1 ? MIDAS_PRIVACY_PRIVATE : MIDAS_PRIVACY_PUBLIC )."' type='community' element='{$folder->getFolderId()}'>";
echo " <td class='treeBrowseElement'><span class='community'>{$community->getName()}</span></td>";
echo "</tr>";
$node++;
}
?>
</thead>
<tbody>
<?php
$node=1;
foreach($this->communities as $community)
{
$folder=$community->getFolder();
echo "<tr id='node--$node' class='parent' privacy='".($community->getPrivacy() == 1 ? MIDAS_PRIVACY_PRIVATE : MIDAS_PRIVACY_PUBLIC )."' type='community' element='{$folder->getFolderId()}'>";
echo " <td class='treeBrowseElement'><span class='community'>{$community->getName()}</span></td>";
echo "</tr>";
$node++;
}

$folder=$this->user->getFolder();
echo "<tr id='node--$node' class='parent' privacy='{$folder->getPrivacyStatus()}' type='folder' element='{$folder->getFolderId()}'>";
echo " <td class='treeBrowseElement'><span class='folder'>{$this->t('My Files')} ({$this->user->getFullName()})</span></td>";
echo "</tr>";
$node++;
?>
</tbody>
</table>
$folder=$this->user->getFolder();
echo "<tr id='node--$node' class='parent' privacy='{$folder->getPrivacyStatus()}' type='folder' element='{$folder->getFolderId()}'>";
echo " <td class='treeBrowseElement'><span class='folder'>{$this->t('My Files')} ({$this->user->getFullName()})</span></td>";
echo "</tr>";
$node++;
?>
</tbody>
</table>

<br/> <br/>
<br/>
<input type="text" id="live_search_item" value="<?= $this->t('Or search it...') ?>" autocomplete="off" autocorrect="off" autocapitalize="off" />
<input type="hidden" id="live_search_item_value" value="init" />
<div id="searchloadingSelectItem" style="display:none"></div>
<br/>

<div class="bottomButtons">
<form class="genericForm" type='post' action="<?php echo $this->webroot?>/browse/selectitem">
<input type='hidden' name='elements' value='<?php echo $this->folderIds?>;<?php echo $this->itemIds?>' />
<input type='hidden' id="selectedDestinationHidden" name='destination' />
Selection: <span id="selectedDestination" > <?php echo $this->t('Please select an item.') ?> </span> <br/>
<input type="submit" disabled name='selectElements' id='selectElements' value="<?php echo $this->t('Select')?>"/>
</form>
</div>

0 comments on commit 310c450

Please sign in to comment.