⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

search field [SOLVED]



heruprambadi
  • profile picture
  • Member

Posted 22 May 2013 - 08:17 AM

i just thinking. why was the search field in flexygrid, and multiple search in datatables placed at the bottom ?

i think it's much better if it placed on top.

do anyone here have any idea how to put it on the top of table ?

 

update : i fix it ! Have a look at this awesomeness :


davidoster
  • profile picture
  • Member

Posted 22 May 2013 - 09:18 AM

Go under assets/grocery_crud/themes/flexigrid/views/list_template.php

There at the bottom you will find this html code,

<div class="pGroup">
				<span class="pPageStat">
					<?php $paging_starts_from = "<span id='page-starts-from'>1</span>"; ?>
					<?php $paging_ends_to = "<span id='page-ends-to'>". ($total_results < $default_per_page ? $total_results : $default_per_page) ."</span>"; ?>
					<?php $paging_total_results = "<span id='total_items'>$total_results</span>"?>
					<?php echo str_replace( array('{start}','{end}','{results}'),
											array($paging_starts_from, $paging_ends_to, $paging_total_results),
											$this->l('list_displaying')
										   ); ?>   					
				</span>
			</div>

Copy and paste it wherever you need to display it.


heruprambadi
  • profile picture
  • Member

Posted 22 May 2013 - 09:51 AM

nooo dave, nooo. that was for count the result :

 

"Displaying 1 to 10 of 1000 items".

 

this is the right code :

<div class="pDiv">
		<div class="pDiv2">
			<div class="pGroup">
				<div class="pSearch pButton" id='quickSearchButton' title="<?php echo $this->l('list_search');?>">
					<span></span>
				</div>
			</div>
			<div class="btnseparator">
			</div>
          </div>
        </div>

and this :

 <?php echo form_open( $ajax_list_url, 'method="post" id="filtering_form" autocomplete = "off"'); ?>	
	<div class="sDiv" id='quickSearchBox'>
		<div class="sDiv2">
			<?php echo $this->l('list_search');?>: <input type="text" class="qsbsearch_fieldox" name="search_text" size="30" id='search_text'>
			<select name="search_field" id="search_field">
				<option value=""><?php echo $this->l('list_search_all');?></option>
				<?php foreach($columns as $column){?>
				<option value="<?php echo $column->field_name?>"><?php echo $column->display_as?>&nbsp;&nbsp;</option>
				<?php }?>
			</select>
            <input type="button" value="<?php echo $this->l('list_search');?>" id='crud_search'> 
		</div>
        <div class='search-div-clear-button'>
        	<input type="button" value="<?php echo $this->l('list_clear_filtering');?>" id='search_clear'>
        </div>
	</div>

but anyway, thank's :)


siarik
  • profile picture
  • Member

Posted 30 May 2013 - 17:39 PM

Saya sudah cek di list template kok codenya sama spt defaultnya mana yang berubah ? mohon di jelaskan

 

thx


heruprambadi
  • profile picture
  • Member

Posted 31 May 2013 - 02:13 AM

umm.. i don't understand what are you talking about. english please :p


siarik
  • profile picture
  • Member

Posted 03 June 2013 - 15:57 PM

Please master heru, my English so bad :P

 

Ok I will try with English.

 

May you expleain or give me ur full code, because I try still not change.

 

thanx a lot master heru ;)


heruprambadi
  • profile picture
  • Member

Posted 04 June 2013 - 02:10 AM

hahaha.. ok ok. here, take my code  B)

 


Umair Memon
  • profile picture
  • Member

Posted 16 March 2014 - 18:44 PM

iwas use your code but cat solve the problem

 iam use same your code plzzzzz help 

 

 


Muhammad Rizky
  • profile picture
  • Member

Posted 17 March 2014 - 03:34 AM

Bro umair u can try my code.. just copy, paste and overwrite in directory : 

 

flexygrid.css => grocery_crud\themes\flexigrid\css

list_template.php => grocery_crud\themes\flexigrid\views

 

maybe it can be help u


Umair Memon
  • profile picture
  • Member

Posted 17 March 2014 - 16:41 PM

Thanks a lots bro you are master finaly solve my problem after 7 days  credit goes to you thanks  :)