57 lines
1.7 KiB
Plaintext
57 lines
1.7 KiB
Plaintext
<script type="text/javascript">
|
|
$( ".selectbox" ).ready(function() {
|
|
var option_len = $(".search-widget option").length
|
|
for (var i=0;i<option_len;i++){
|
|
if($(".search-widget option").eq(i).data('selected')=="selected"){
|
|
$(".search-widget option").eq(i).attr('selected','selected')
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<div class="search-widget personal-projects">
|
|
<h3>{{widget-title}}</h3>
|
|
<form action="{{url}}" method="get">
|
|
<label for="selectbox">{{select_text}}</label>
|
|
<select class="selectbox" name="selectbox" data-level="0" data-list="choice">
|
|
<option value={{choice_value}} data-selected='{{choice_select}}' >
|
|
{{choice_show}}</option>
|
|
</select>
|
|
<label for="keywords">{{search_text}}</label>
|
|
<input name="keywords" id="keywords" placeholder="Keywords" type="text" value="{{search_value}}" title="keywords">
|
|
<button>Go</button>
|
|
<a id="filter" style="" href="{{url}}">Clear</a>
|
|
</form>
|
|
</div>
|
|
<table class="table table-hover table-striped projects-index personal-projects dt-responsive nowrap">
|
|
<thead>
|
|
<tr data-level="0" data-list="headers">
|
|
<th class="{{head-title}}">{{head-title}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody data-level="0" data-list="projects">
|
|
<tr data-level="1" data-list="project">
|
|
<td>{{value}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
{{pagination_goes_here}}
|
|
|
|
<script>
|
|
$('.計畫類別').addClass('min-tablet');
|
|
for ( var i = 0; i < $('thead th').length ; i++ ) {
|
|
if( $('thead th').length > 2 ) {
|
|
var th = $('thead th');
|
|
for ( var q = 3; q < th.length ; q++ ) {
|
|
th.eq(q).addClass('min-tablet-l');
|
|
}
|
|
}
|
|
}
|
|
|
|
$('table.personal-projects').DataTable({
|
|
searching: false,
|
|
paging: false,
|
|
ordering: false,
|
|
info: false
|
|
});
|
|
</script> |