diff options
| author | michael pereira | 2011-04-01 16:51:07 +0200 |
|---|---|---|
| committer | michael pereira | 2011-04-01 16:51:07 +0200 |
| commit | 0576a9832661cfbfb29e1d59b72f092740388fa7 (patch) | |
| tree | 2cbd79177900de8b8ede455156c2e13a20c94697 /application/modules/user/views | |
| parent | Bootmenu & BootOs Controller (diff) | |
| parent | Pagination in ettlichen Controllern + aufgerÀumt (diff) | |
| download | pbs2-0576a9832661cfbfb29e1d59b72f092740388fa7.tar.gz pbs2-0576a9832661cfbfb29e1d59b72f092740388fa7.tar.xz pbs2-0576a9832661cfbfb29e1d59b72f092740388fa7.zip | |
merge
Diffstat (limited to 'application/modules/user/views')
6 files changed, 92 insertions, 14 deletions
diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml index c41d8d2..f43949d 100644 --- a/application/modules/user/views/scripts/bootiso/index.phtml +++ b/application/modules/user/views/scripts/bootiso/index.phtml @@ -1,7 +1,7 @@ <h1>BootMedien</h1> <?php if($this->notification != ''){echo $this->notification;} ?> <?php echo $this->formButton('createbootiso', 'Create BootISO', array( - 'onclick' => 'self.location="/user/bootiso/createbootiso"', + 'onclick' => 'self.location="/user/bootiso/createbootiso/page/'.$this->page.'"', 'class' => 'addbutton'))?> <table> <tr> diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml index 92e6bbb..8982fb2 100644 --- a/application/modules/user/views/scripts/bootos/index.phtml +++ b/application/modules/user/views/scripts/bootos/index.phtml @@ -5,7 +5,7 @@ 'class' => 'updatebutton', ))?> <?php echo $this->formButton('createbootos', 'Create BootOS', array( - 'onclick' => 'self.location="/user/bootos/createbootos"', + 'onclick' => 'self.location="/user/bootos/createbootos/page/'.$this->page.'"', 'class' => 'addbutton'))?> <table> diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml index 1e3345e..62c698c 100644 --- a/application/modules/user/views/scripts/client/index.phtml +++ b/application/modules/user/views/scripts/client/index.phtml @@ -1,7 +1,7 @@ <h1>Clients</h1> <?php if($this->notification != ''){echo $this->notification;} ?> <?php echo $this->formButton('createbootos', 'Create Client', array( - 'onclick' => 'self.location="/user/client/addclient"', + 'onclick' => 'self.location="/user/client/addclient/page/'.$this->page.'"', 'class' => 'addbutton'))?> <?php if ($this->clients): ?> diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml index bb7f11a..1716a95 100644 --- a/application/modules/user/views/scripts/filter/index.phtml +++ b/application/modules/user/views/scripts/filter/index.phtml @@ -1,7 +1,7 @@ <h1>Filters</h1> <?php if($this->notification != ''){echo $this->notification;} ?> <?php echo $this->formButton('createconfig', 'Create Filter', array( - 'onclick' => 'self.location="/user/filter/addfilter"', + 'onclick' => 'self.location="/user/filter/addfilter/page/'.$this->page.'"', 'class' => 'addbutton'))?> <?php if ($this->filters): ?> @@ -93,7 +93,7 @@ 'controller' => 'filter', 'action' => 'editfilterentry', 'filterentriesID' => $filterentry['filterentriesID'], - 'page' => $this->page + 'page' => $this->page ), 'default', true) ?>"><img src='/media/img/edit.png' alt='Edit Filterentry'/></a> @@ -103,7 +103,7 @@ 'controller' => 'filter', 'action' => 'removefilterentry', 'filterentriesID' => $filterentry['filterentriesID'], - 'page' => $this->page + 'page' => $this->page ), 'default', true) ?>"><img src='/media/img/delete.png' alt='Delete Filterentry'/></a> diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml index 36934f6..4d224a1 100644 --- a/application/modules/user/views/scripts/pool/index.phtml +++ b/application/modules/user/views/scripts/pool/index.phtml @@ -1,7 +1,7 @@ <h1>Pools</h1> <?php if($this->notification != ''){echo $this->notification;} ?> <?php echo $this->formButton('createconfig', 'Create Pool', array( - 'onclick' => 'self.location="/user/pool/createpool"', + 'onclick' => 'self.location="/user/pool/createpool/page/'.$this->page.'"', 'class' => 'addbutton'))?> <?php if ($this->pools): ?> @@ -97,8 +97,14 @@ <?php echo $this->pagination; ?> <?php if (isset($this->freeclients) && count($this->freeclients)>0): ?> -<h2>Free clients</h2> -<table > + <h2 style='margin-top:20px;'>Free clients</h2> + <p style="text-align:right;"> + <span style="font-weight:bold;">Search:</span> <input type="text" id="txtSearch" name="txtSearch" maxlength="50" /> + <img id="imgSearch" src="/media/img/delete.png" alt="Cancel Search" title="Cancel Search" style="width:150px;width:14px;height:14px;" /> + </p> + +<div style="height: 200px; overflow: scroll; overflow-x: hidden; "> +<table id='tblSearch'> <tr> <th>ClientID</th> <th>MacAdress</th> @@ -132,6 +138,74 @@ foreach ($this->freeclients as $client): ?> </tr> <?php endforeach ?> </table> +</div> +<script> +jQuery.expr[":"].containsNoCase = function(el, i, m) { + var search = m[3]; + if (!search) return false; + return eval("/" + search + "/i").test($(el).text()); +}; + + 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(); + + // reset the search when the cancel image is clicked + jQuery('#imgSearch').click(function() { + resetSearch(); + }); + + // cancel the search if the user presses the ESC key + jQuery('#txtSearch').keyup(function(event) { + if (event.keyCode == 27) { + resetSearch(); + } + }); + + // execute the search + jQuery('#txtSearch').keyup(function() { + // 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(); + // show the header row + jQuery('#tblSearch tr:first').show(); + // show the matching rows (using the containsNoCase from Rick Strahl) + jQuery('#tblSearch tr td:containsNoCase(\'' + jQuery('#txtSearch').val() + '\')').parent().show(); + // show the cancel search image + jQuery('#imgSearch').show(); + } + else if (jQuery('#txtSearch').val().length == 0) { + // if the user removed all of the text, reset the search + resetSearch(); + } + + // if there were no matching rows, tell the user + if (jQuery('#tblSearch tr:visible').length == 1) { + // 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>'); + } + }); +}); + +function resetSearch() { + // clear the textbox + jQuery('#txtSearch').val(''); + // show all table rows + jQuery('#tblSearch tr').show(); + // remove any no records rows + jQuery('.norecords').remove(); + // remove the cancel search image + jQuery('#imgSearch').hide(); + // make sure we re-focus on the textbox for usability + jQuery('#txtSearch').focus(); +} +</script> <?php endif;?> <?php else: ?> diff --git a/application/modules/user/views/scripts/preboot/index.phtml b/application/modules/user/views/scripts/preboot/index.phtml index 21ff310..9e73de1 100644 --- a/application/modules/user/views/scripts/preboot/index.phtml +++ b/application/modules/user/views/scripts/preboot/index.phtml @@ -5,7 +5,7 @@ 'class' => 'updatebutton', ))?> <?php echo $this->formButton('createpreboot', 'Create PreBoot', array( - 'onclick' => 'self.location="/user/preboot/createpreboot"', + 'onclick' => 'self.location="/user/preboot/createpreboot/page/'.$this->page.'"', 'class' => 'addbutton'))?> <table> <tr> @@ -31,7 +31,8 @@ 'module' => 'user', 'controller' => 'preboot', 'action' => 'updatepreboot', - 'prebootID' => $preboot->getID() + 'prebootID' => $preboot->getID(), + 'page' => $this->page ), 'default', true, false) ?>"><img src='/media/img/update.png' alt='Updates available' /></a></td> @@ -43,7 +44,8 @@ 'module' => 'user', 'controller' => 'preboot', 'action' => 'editpreboot', - 'prebootID' => $preboot->getID() + 'prebootID' => $preboot->getID(), + 'page' => $this->page ), 'default', true, false) ?>"><img src='/media/img/edit.png' alt='Edit Preboot' /></a></td> @@ -52,10 +54,12 @@ 'module' => 'user', 'controller' => 'preboot', 'action' => 'deletepreboot', - 'prebootID' => $preboot->getID() + 'prebootID' => $preboot->getID(), + 'page' => $this->page ), 'default', true) ?>"><img src='/media/img/delete.png' alt='Delete Preboot'/></a></td> </tr> <?php endforeach; ?> -</table>
\ No newline at end of file +</table> +<?php echo $this->pagination; ?> |
