diff options
author | Simon | 2011-04-06 20:32:47 +0200 |
---|---|---|
committer | Simon | 2011-04-06 20:32:47 +0200 |
commit | 7008750fafc7f0c4c0b31f0a53f1ffaeb8f7e36a (patch) | |
tree | 188dfe3dda0964d485ac841a5e72612129a5176e | |
parent | Layout/Ansicht geändert, BootIso, BootOs,Client,Config,Preboot & Session (diff) | |
download | pbs2-7008750fafc7f0c4c0b31f0a53f1ffaeb8f7e36a.tar.gz pbs2-7008750fafc7f0c4c0b31f0a53f1ffaeb8f7e36a.tar.xz pbs2-7008750fafc7f0c4c0b31f0a53f1ffaeb8f7e36a.zip |
neues Design eingebettet, bei Role, Person &Group muss noch etwas überlegt werden
10 files changed, 366 insertions, 218 deletions
diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml index 0d175e8..0f9c830 100644 --- a/application/modules/user/views/scripts/bootiso/index.phtml +++ b/application/modules/user/views/scripts/bootiso/index.phtml @@ -83,7 +83,7 @@ $(document).ready(function(){ $(this).find('.title').css('cursor','pointer'); $('.title').click(function(){ - $(this).parent().find('.dispnone').toggle(); + $(this).siblings('.dispnone').toggle(); }); } }); diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml index 01842c1..c51a3ed 100644 --- a/application/modules/user/views/scripts/bootmenu/index.phtml +++ b/application/modules/user/views/scripts/bootmenu/index.phtml @@ -5,21 +5,22 @@ 'onclick' => 'self.location="/user/bootmenu/createbootmenu/page/'.$this->page.'"', 'class' => 'addbutton'))?> -<table> - <tr> - <th>ID <span class='code'>bootmenuID</span></th> - <th>Title <span class='code'>title</span></th> - <th>Changed <span class='code'>created</span></th> - <th colspan=3>Actions</th> - </tr> - <?php if(count($this->bootmenulist)==0) - echo "</table> There are no BootMenus to display." ?> - <?php foreach ($this->bootmenulist as $bootmenu): ?> - <tr class=entry> - <td><?php echo $this->escape($bootmenu->getID()); ?></td> - <td><?php echo $this->escape($bootmenu->getTitle()); ?></td> - <td><?php echo $this->escape($bootmenu->getCreated()); ?></td> - <td class='action'><a href="<?php echo $this->url( +<div class='searchvars'> + <div class='head'>Available searchfilter:</div> + <div class='code'>bootmenuID</div> + <div class='code'>title</div> + <div class='code'>created</div> +</div> + +<div class='listelement'> + <?php if(count($this->bootmenulist)==0) + echo "There are no BootMenus to display." ?> + <?php foreach ($this->bootmenulist as $bootmenu): ?> + <div class='element'> + <div class='number'><?php echo $this->escape($bootmenu->getID()); ?></div> + <div class='content'> + <div class='actions'> + <a href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'bootmenu', @@ -28,8 +29,8 @@ 'page' => $this->page ), 'default', - true, false) ?>"><img src='/media/img/edit.png' alt='Edit Bootmenu'/></a></td> - <td class='action'><a href="<?php echo $this->url( + true, false) ?>"><img src='/media/img/edit.png' alt='Edit Bootmenu'/></a> + <a href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'bootmenu', @@ -38,8 +39,8 @@ 'page' => $this->page ), 'default', - true) ?>"><img src='/media/img/delete.png' alt='Delete Bootmenu'/></a></td> - <td class='action'><a href="<?php echo $this->url( + true) ?>"><img src='/media/img/delete.png' alt='Delete Bootmenu'/></a> + <a href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'bootmenu', @@ -49,83 +50,79 @@ 'page' => $this->page ), 'default', - true) ?>"><img src='/media/img/add.png' alt='Add Entry'/></a></td> - </tr> - -<?php if(count($this->bootmenuentrylist[$bootmenu->getID()]) > 0):?> - <tr class=detail> - <td class=arrowtop>↳</td> - <td colspan=7> - <table> - <tr> - <th></th> - <th>ID</th> - <th>Title</th> - <th>BootOS</th> - <th>kcl</th> - <th>kclappend</th> - <th>Config</th> -<!-- <th>Position</th>--> - <th colspan=2>Actions</th> - - </tr> - <?php foreach ($this->bootmenuentrylist[$bootmenu->getID()] as $bootmenuentry): ?> - <tr> - <td class='action'> - <a href="<?php echo $this->url( - array( - - 'controller' => 'resource', - 'action' => 'getbootmenuentry', - 'bootmenuentryID' => $bootmenuentry->getID(), - 'page' => $this->page - ), - 'default', - true, false) ?>"><img src='/media/img/play.gif'> - </a> - </td> - <td><?php echo $this->escape($bootmenuentry->getID()); ?></td> - <td><?php echo $this->escape($bootmenuentry->getTitle()); ?></td> - <td><?php echo $this->escape($bootmenuentry->getBootosID()) ?></td> - <td><?php echo $this->escape($bootmenuentry->getKcl()); ?></td> - <td><?php echo $this->escape($bootmenuentry->getKclappend()); ?></td> - <td><?php echo $this->escape($bootmenuentry->getConfigID()) ?></td><!-- - <td><?php echo $this->escape($bootmenuentry->getOrder() + 1); ?></td> - --><td class='action'><a href="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'bootmenu', - 'action' => 'editbootmenuentry', - 'bootmenuentryID' => $bootmenuentry->getID(), - 'maxorder' => count($this->bootmenuentrylist[$bootmenu->getID()]), - 'oldorder' => $bootmenuentry->getOrder(), - 'page' => $this->page - ), - 'default', - true, false) ?>"><img src='/media/img/edit.png' alt='Edit Entry'/></a></td> - <td class='action'><a href="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'bootmenu', - 'action' => 'removebootmenuentry', - 'bootmenuentryID' => $bootmenuentry->getID(), - 'page' => $this->page - ), - 'default', - true) ?>"><img src='/media/img/delete.png' alt='Remove Entry'/></a></td> - </tr> + true) ?>"><img src='/media/img/add.png' alt='Add Entry'/></a> + </div> + <div class='title'><?php echo $this->escape($bootmenu->getTitle()); ?></div> + <div class='subtitle'><?php echo count($this->bootmenuentrylist[$bootmenu->getID()]);?> Entrys - <?php echo $this->escape($bootmenu->getCreated()); ?></div> + <div class='details dispnone'> + <?php foreach ($this->bootmenuentrylist[$bootmenu->getID()] as $bootmenuentry): ?> + <div class='element'> + <div class='number'><?php echo $this->escape($bootmenuentry->getID()); ?></div> + <div class='content'> + <div class='actions'> + <a href="<?php echo $this->url( + array( + 'controller' => 'resource', + 'action' => 'getbootmenuentry', + 'bootmenuentryID' => $bootmenuentry->getID(), + 'page' => $this->page + ), + 'default', + true, false) ?>"><img src='/media/img/play.gif'></a> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'bootmenu', + 'action' => 'editbootmenuentry', + 'bootmenuentryID' => $bootmenuentry->getID(), + 'maxorder' => count($this->bootmenuentrylist[$bootmenu->getID()]), + 'oldorder' => $bootmenuentry->getOrder(), + 'page' => $this->page + ), + 'default', + true, false) ?>"><img src='/media/img/edit.png' alt='Edit Entry'/></a> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'bootmenu', + 'action' => 'removebootmenuentry', + 'bootmenuentryID' => $bootmenuentry->getID(), + 'page' => $this->page + ), + 'default', + true) ?>"><img src='/media/img/delete.png' alt='Remove Entry'/></a> + </div> + <div class='title'><?php echo $this->escape($bootmenuentry->getTitle()); ?></div> + <div class='subtitle'><?php echo $this->escape($bootmenuentry->getBootosID()) ?></div> + <div class='details dispnone'> + <label>KCL</label> + <div class='item'><?php echo $this->escape($bootmenuentry->getKcl()); ?></div> + <label>KCL-Append</label> + <div class='item'><?php echo $this->escape($bootmenuentry->getKclappend()); ?></div> + <label>ConfigID</label> + <div class='item'><?php echo $this->escape($bootmenuentry->getConfigID()) ?></div> + </div> + </div> + <div class='clear'></div> + </div> + <?php endforeach; ?> + </div> + </div> + <div class='clear'></div> + </div> <?php endforeach; ?> - </table> - </td> - </tr> - <?php endif; ?> - <?php endforeach; ?> -</table> - <?php echo $this->pagination; ?> - - - - - - +</div> + +<?php echo $this->pagination; ?> +<script> +$(document).ready(function(){ + if($('.element').find('.dispnone').length >= 1){ + $(this).find('.title').css('cursor','pointer'); + + $('.title').click(function(){ + $(this).siblings('.dispnone').toggle(); + }); + } +}); +</script> diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml index cb2a3aa..a520ab5 100644 --- a/application/modules/user/views/scripts/bootos/index.phtml +++ b/application/modules/user/views/scripts/bootos/index.phtml @@ -102,7 +102,7 @@ $(document).ready(function(){ $(this).find('.title').css('cursor','pointer'); $('.title').click(function(){ - $(this).parent().find('.dispnone').toggle(); + $(this).siblings('.dispnone').toggle(); }); } }); diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml index 6b7c43f..7cdc03d 100644 --- a/application/modules/user/views/scripts/client/index.phtml +++ b/application/modules/user/views/scripts/client/index.phtml @@ -62,7 +62,7 @@ $(document).ready(function(){ $(this).find('.title').css('cursor','pointer'); $('.title').click(function(){ - $(this).parent().find('.dispnone').toggle(); + $(this).siblings('.dispnone').toggle(); }); } }); diff --git a/application/modules/user/views/scripts/config/index.phtml b/application/modules/user/views/scripts/config/index.phtml index aa68975..28200e2 100644 --- a/application/modules/user/views/scripts/config/index.phtml +++ b/application/modules/user/views/scripts/config/index.phtml @@ -64,7 +64,7 @@ $(document).ready(function(){ $(this).find('.title').css('cursor','pointer'); $('.title').click(function(){ - $(this).parent().find('.dispnone').toggle(); + $(this).siblings('.dispnone').toggle(); }); } }); diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml index 5d3646d..97a3077 100644 --- a/application/modules/user/views/scripts/filter/index.phtml +++ b/application/modules/user/views/scripts/filter/index.phtml @@ -5,6 +5,132 @@ 'onclick' => 'self.location="/user/filter/addfilter/page/'.$this->page.'"', 'class' => 'addbutton'))?> +<div class='searchvars'> + <div class='head'>Available searchfilter:</div> + <div class='code'>filterID</div> + <div class='code'>title</div> + <div class='code'>description</div> + <div class='code'>priority</div> + <div class='code'>bootmenuID</div> + <div class='code'>created</div> +</div> + +<div class='listelement'> + <?php if(count($this->filters)==0) + echo "There are no Filters to display." ?> + <?php foreach ($this->filters as $filter): ?> + <div class='element'> + <div class='number'><?php echo $this->escape($filter->getID()) ?></div> + <div class='content'> + <div class='actions'> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'filter', + 'action' => 'editfilter', + 'filterID' => $filter->getID(), + 'page' => $this->page + ), + 'default', + true) ?>"><img src='/media/img/edit.png' alt='Edit Filter'/></a> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'filter', + 'action' => 'removefilter', + 'filterID' => $filter->getID(), + 'page' => $this->page + ), + 'default', + true) ?>"><img src='/media/img/delete.png' alt='Delete Filter'/></a> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'filter', + 'action' => 'addfilterentry', + 'filterID' => $filter->getID(), + 'page' => $this->page + ), + 'default', + true) ?>"><img src='/media/img/add.png' alt='Add Filterentry'/></a> + </div> + <div class='title'><?php echo $this->escape($filter->title) ?></div> + <div class='subtitle'> + <?php echo $this->escape($filter->bootmenuID) ?> - Priority: <?php echo $this->escape($filter->priority) ?><br /> + Created: <?php echo $this->escape($filter->created) ?><br /> + <?php echo $this->escape($filter->Description) ?></div> + <?php + $fe = new Application_Model_FilterEntriesMapper(); + $erg = $fe->findBy(array('filterID' => $filter->getID()),true); + ?> + <div class='details dispnone'> + <?php foreach ($erg as $filterentry): ?> + <?php + $filter2 = new Application_Model_FilterTypeMapper(); + $erg = new Application_Model_FilterType(); + $filter2->find($filterentry['filtertypeID'],$erg); + //name zur ID finden + $title = "[".$filterentry['filtertypeID']."] "; + $title .= $erg->getFiltertypename(); + ?> + <div class='element'> + <div class='content'> + <div class='actions'> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'filter', + 'action' => 'editfilterentry', + 'filterentriesID' => $filterentry['filterentriesID'], + 'page' => $this->page + ), + 'default', + true) ?>"><img src='/media/img/edit.png' alt='Edit Filterentry'/></a> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'filter', + 'action' => 'removefilterentry', + 'filterentriesID' => $filterentry['filterentriesID'], + 'page' => $this->page + ), + 'default', + true) ?>"><img src='/media/img/delete.png' alt='Delete Filterentry'/></a> + </div> + + <div class='subtitle'><?php echo $title; ?> : <?php + echo $filterentry['filtervalue']; + if($filterentry['filtervalue2'] != ''){ + echo " - ".$filterentry['filtervalue2']; + } + ?></div> + + </div> + <div class='clear'></div> + </div> + <?php endforeach ?> + </div> + </div> + <div class='clear'></div> + </div> + <?php endforeach ?> +</div> + +<?php echo $this->pagination; ?> + +<script> +$(document).ready(function(){ + if($('.element').find('.dispnone').length >= 1){ + $(this).find('.title').css('cursor','pointer'); + + $('.title').click(function(){ + $(this).siblings('.dispnone').toggle(); + }); + } +}); +</script> + +<!-- <?php if ($this->filters): ?> <table> <tr> @@ -126,3 +252,4 @@ <p>There are no filters to display.</p> <?php endif;?> +--> diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml index f7d04e2..568654d 100644 --- a/application/modules/user/views/scripts/pool/index.phtml +++ b/application/modules/user/views/scripts/pool/index.phtml @@ -5,22 +5,30 @@ 'onclick' => 'self.location="/user/pool/createpool/page/'.$this->page.'"', 'class' => 'addbutton'))?> -<?php if ($this->pools): ?> - <table > - <tr> - <!--<th>ID <span class='code'>poolID</span></th>--> - <th>Title <span class='code'>title</span></th> - <th>Description <span class='code'>description</span></th> - <th>Location <span class='code'>location</span></th> - <th colspan=3>Actions</th> - </tr> +<div class='searchvars'> + <div class='head'>Available searchfilter:</div> + <div class='code'>bootosID</div> + <div class='code'>title</div> + <div class='code'>groupID</div> + <div class='code'>configID</div> + <div class='code'>init</div> + <div class='code'>kernel</div> + <div class='code'>kcl</div> + <div class='code'>description</div> + <div class='code'>changed</div> + <div class='code'>expires</div> + <div class='code'>public</div> +</div> + +<div class='listelement'> + <?php if(count($this->pools)==0) + echo "There are no Pools to display." ?> <?php foreach ($this->pools as $pool): ?> - <tr class=entry> - <!--<td><?php echo $this->escape($pool->getID()) ?></td>--> - <td><?php echo $this->escape($pool->getTitle()) ?></td> - <td><?php echo $this->escape($pool->getDescription()) ?></td> - <td><?php echo $this->escape($pool->getLocation()) ?></td> - <td class='action'><a href="<?php echo $this->url( + <div class='element'> + <div class='number'><?php echo $this->escape($pool->getID()) ?></div> + <div class='content'> + <div class='actions'> + <a href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'pool', @@ -29,8 +37,8 @@ 'page' => $this->page ), 'default', - true) ?>"><img src='/media/img/edit.png' alt='Edit Pool'/></a></td> - <td class='action'><a href="<?php echo $this->url( + true) ?>"><img src='/media/img/edit.png' alt='Edit Pool'/></a> + <a href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'pool', @@ -39,8 +47,8 @@ 'page' => $this->page ), 'default', - true) ?>"><img src='/media/img/delete.png' alt='Delete Pool'/></a></td> - <td class='action'><a href="<?php echo $this->url( + true) ?>"><img src='/media/img/delete.png' alt='Delete Pool'/></a> + <a href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'pool', @@ -49,54 +57,72 @@ 'page' => $this->page ), 'default', - true) ?>"><img src='/media/img/add.png' alt='Link Client'/></a></td> - </tr> - <?php - $poolentriesMapper = new Application_Model_PoolEntriesMapper(); - $clients = $poolentriesMapper->findBy(array('poolID' => $pool->getID()),true); - ?> - <?php if (count($clients)>0): ?> - <tr class=detail> - <td class=arrowtop>↳</td> - <td colspan=6> - <table> - <tr> - <!-- <th>ClientID</th> --> - <th>Mac</th> - <th>Hardwarehash</th> - <th>Actions</th> - </tr> - <?php - foreach ($clients as $client): ?> - <tr> - <!-- <td><?php echo $client['clientID'];?></td> --> - <?php - $cli = new Application_Model_Client(); - $clientMapper = new Application_Model_ClientMapper(); - $clientMapper->find($client['clientID'],$cli); + true) ?>"><img src='/media/img/add.png' alt='Link Client'/></a> + </div> + <?php + $poolentriesMapper = new Application_Model_PoolEntriesMapper(); + $clients = $poolentriesMapper->findBy(array('poolID' => $pool->getID()),true); ?> - <td><?php echo ($cli->macAdress); ?></td> - <td><?php echo ($cli->hardwarehash); ?></td> - <td class='action'><a href="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'pool', - 'action' => 'unlinkclient', - 'poolentriesID' => $client['poolentriesID'], - 'page' => $this->page - ), - 'default', - true) ?>"><img src='/media/img/delete.png' alt='Unlink Client'/></a></td> - </tr> - <?php endforeach ?> - </table> - </td> - </tr> - <?php endif;?> - <?php endforeach ?> - </table> - <?php echo $this->pagination; ?> - + <div class='title'><?php echo $this->escape($pool->getTitle()) ?></div> + <div class='subtitle'><?php echo $this->escape($pool->getLocation()) ?> - <?php echo count($clients);?> Clients<br/> + <?php echo $this->escape($pool->getDescription()) ?></div> + <div class='details dispnone'> + + <?php if (count($clients)>0): ?> + <?php + foreach ($clients as $client): ?> + <?php + $cli = new Application_Model_Client(); + $clientMapper = new Application_Model_ClientMapper(); + $clientMapper->find($client['clientID'],$cli); + ?> + <div class='element'> + <div class='number'><?php echo $client['clientID'];?></div> + <div class='content'> + <div class='actions'> + <a href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'pool', + 'action' => 'unlinkclient', + 'poolentriesID' => $client['poolentriesID'], + 'page' => $this->page + ), + 'default', + true) ?>"><img src='/media/img/delete.png' alt='Unlink Client'/></a> + </div> + <div class='details'> + <label>MacAdress</label> + <div class='item'><?php echo ($cli->macAdress); ?></div> + <label>Hardwarehash</label> + <div class='item'><?php echo ($cli->hardwarehash); ?></div> + </div> + </div> + <div class='clear'></div> + </div> + <?php endforeach ?> + </div> + <?php endif;?> + </div> + <div class='clear'></div> + </div> + <?php endforeach ?> +</div> + +<?php echo $this->pagination; ?> + +<script> +$(document).ready(function(){ + if($('.element').find('.dispnone').length >= 1){ + $(this).find('.title').css('cursor','pointer'); + + $('.title').click(function(){ + $(this).siblings('.dispnone').toggle(); + }); + } +}); +</script> + <?php if (isset($this->freeclients) && count($this->freeclients)>0): ?> <h2 style='margin-top:20px;'>Free clients</h2> <p style="text-align:right;"> @@ -105,41 +131,44 @@ </p> <div style="height: 200px; overflow: scroll; overflow-x: hidden; "> -<table id='tblSearch'> -<tr> -<th>ClientID</th> -<th>MacAdress</th> -<th>Hardwarehash</th> -<th>Actions</th> -</tr> -<?php -foreach ($this->freeclients as $client): ?> - <tr> - <td><?php echo $client['clientID']; ?></td> - <td><?php echo $client['macadress']; ?></td> - <td><?php echo $client['hardwarehash']; ?></td> - <td><select onChange="location.href=this.options[this.selectedIndex].value"> - <option></option> - <?php foreach ($this->pools as $pool): ?> - <option value="<?php echo $this->url( - array( - 'module' => 'user', - 'controller' => 'pool', - 'action' => 'linkclient', - 'clientID' => $client['clientID'], - 'poolID' => $pool->getID(), - 'page' => $this->page - ), - 'default', - true) ?>"><?php echo $pool->getTitle(); ?></option> - <?php //<img src='/media/img/add.png' alt='Link to Pool'/></a></td> ?> - <?php endforeach ?> - </select> - </td> - </tr> -<?php endforeach ?> -</table> + <div class='listelement' id='tblSearch'> + <?php + foreach ($this->freeclients as $client): ?> + <div class='element'> + <div class='number'>5</div> + <div class='content'> + <div class='actions'> + <select onChange="location.href=this.options[this.selectedIndex].value"> + <option></option> + <?php foreach ($this->pools as $pool): ?> + <option value="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'pool', + 'action' => 'linkclient', + 'clientID' => $client['clientID'], + 'poolID' => $pool->getID(), + 'page' => $this->page + ), + 'default', + true) ?>"><?php echo $pool->getTitle(); ?></option> + <?php //<img src='/media/img/add.png' alt='Link to Pool'/></a></td> ?> + <?php endforeach ?> + </select> + </div> + <div class='details'> + <label>MacAdress</label> + <div class='item'><?php echo $client['macadress']; ?></div> + <label>HardwareHash</label> + <div class='item'><?php echo $client['hardwarehash']; ?></div> + </div> + </div> + <div class='clear'></div> + </div> + <?php endforeach ?> + </div> </div> +<script type='text/javascript' src='/media/js/jquery.highlight-3.js'></script> <script> jQuery.expr[":"].containsNoCase = function(el, i, m) { var search = m[3]; @@ -148,8 +177,6 @@ jQuery.expr[":"].containsNoCase = function(el, i, m) { }; jQuery(document).ready(function() { - // used for the first example in the blog post - jQuery('li:contains(\'DotNetNuke\')').css('color', '#0000ff').css('font-weight', 'bold'); // hide the cancel search image jQuery('#imgSearch').hide(); @@ -171,11 +198,12 @@ jQuery.expr[":"].containsNoCase = function(el, i, m) { // only search when there are 3 or more characters in the textbox if (jQuery('#txtSearch').val().length > 2) { // hide all rows - jQuery('#tblSearch tr').hide(); + jQuery('#tblSearch .element').hide(); // show the header row - jQuery('#tblSearch tr:first').show(); + //jQuery('#tblSearch .element:first').show(); // show the matching rows (using the containsNoCase from Rick Strahl) - jQuery('#tblSearch tr td:containsNoCase(\'' + jQuery('#txtSearch').val() + '\')').parent().show(); + jQuery('#tblSearch .element .item:containsNoCase(\'' + jQuery('#txtSearch').val() + '\')').parent().parent().parent().show(); + $('#tblSearch .element .item').removeHighlight().highlight(jQuery('#txtSearch').val()); // show the cancel search image jQuery('#imgSearch').show(); } @@ -185,11 +213,11 @@ jQuery.expr[":"].containsNoCase = function(el, i, m) { } // if there were no matching rows, tell the user - if (jQuery('#tblSearch tr:visible').length == 1) { + if (jQuery('#tblSearch .element:visible').length == 0) { // remove the norecords row if it already exists jQuery('.norecords').remove(); // add the norecords row - jQuery('#tblSearch').append('<tr class="norecords"><td colspan="5" class="Normal">No records were found</td></tr>'); + jQuery('#tblSearch').append('<div class="norecords">No records found</div>'); } }); }); @@ -198,7 +226,7 @@ function resetSearch() { // clear the textbox jQuery('#txtSearch').val(''); // show all table rows - jQuery('#tblSearch tr').show(); + jQuery('#tblSearch .element').show(); // remove any no records rows jQuery('.norecords').remove(); // remove the cancel search image @@ -208,9 +236,4 @@ function resetSearch() { } </script> <?php endif;?> -<?php else: ?> - - <p>There are no pools to display.</p> - -<?php endif;?> diff --git a/application/modules/user/views/scripts/preboot/index.phtml b/application/modules/user/views/scripts/preboot/index.phtml index 76420fb..fc0d07d 100644 --- a/application/modules/user/views/scripts/preboot/index.phtml +++ b/application/modules/user/views/scripts/preboot/index.phtml @@ -76,7 +76,7 @@ $(document).ready(function(){ $(this).find('.title').css('cursor','pointer'); $('.title').click(function(){ - $(this).parent().find('.dispnone').toggle(); + $(this).siblings('.dispnone').toggle(); }); } }); diff --git a/application/modules/user/views/scripts/session/index.phtml b/application/modules/user/views/scripts/session/index.phtml index a5ed851..412b113 100644 --- a/application/modules/user/views/scripts/session/index.phtml +++ b/application/modules/user/views/scripts/session/index.phtml @@ -53,7 +53,7 @@ $(document).ready(function(){ $(this).find('.title').css('cursor','pointer'); $('.title').click(function(){ - $(this).parent().find('.dispnone').toggle(); + $(this).siblings('.dispnone').toggle(); }); } }); diff --git a/library/Pbs/Search.php b/library/Pbs/Search.php index fc05213..127c4d3 100644 --- a/library/Pbs/Search.php +++ b/library/Pbs/Search.php @@ -23,6 +23,7 @@ class Pbs_Search{ $highlight[] = "$('table').highlight('".$term."');"; $highlight[] = "$('.element .number').highlight('".$term."');"; $highlight[] = "$('.element .title').highlight('".$term."');"; + $highlight[] = "$('.element .subtitle').highlight('".$term."');"; $highlight[] = "$('.element .item').highlight('".$term."');"; } @@ -116,7 +117,7 @@ class Pbs_Search{ if(count($this->searcha) > 0){ foreach($this->searcha as $sk => $sv){ if($k == $sk){ - if(stristr($v,$sv) || $v == $sv){ + if(stristr($v,$sv) || $v == $sv){ $com1[$counter] += 1; } } @@ -131,7 +132,7 @@ class Pbs_Search{ } } } - # print_a($com2[$counter]." >= ".count($this->searchb)." && ".$com1[$counter]." >= ".count($this->searcha)); + #print_a($com2[$counter]." >= ".count($this->searchb)." && ".$com1[$counter]." >= ".count($this->searcha)); if($com2[$counter] >= count($this->searchb) && $com1[$counter] >= count($this->searcha)){ // add item in resultlist $data[] = $counter; |