Skip to content

Commit

Permalink
Criação de uma função javascript para suportar a lógica #50.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliano Maciel authored and Gustavo Fonseca committed Dec 14, 2018
1 parent 84703b3 commit 33a99a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions application/views/partials/journals.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<div class="input-group">
<input type="text" name="search" id="search" class="form-control">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button type="button" id="matchingButton" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<?=lang('contains')?> <span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="javascript:$('#matching').val('contains');"><?=lang('contains')?></a></li>
<li><a href="javascript:$('#matching').val('extact_title');"><?=lang('extact_title')?></a></li>
<li><a href="javascript:$('#matching').val('starts_with');"><?=lang('starts_with')?></a></li>
<li><a href="javascript:scieloLib.SetMatching('<?=lang('contains')?>', 'contains');"><?=lang('contains')?></a></li>
<li><a href="javascript:scieloLib.SetMatching('<?=lang('extact_title')?>', 'extact_title');"><?=lang('extact_title')?></a></li>
<li><a href="javascript:scieloLib.SetMatching('<?=lang('starts_with')?>', 'starts_with');"><?=lang('starts_with')?></a></li>
</ul>
</div><!-- /input-group-btn -->
</div><!-- /input-group -->
Expand Down
2 changes: 1 addition & 1 deletion static/js/scielo-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions static/js/scielo.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ var scieloLib = {
$("html").addClass("lt-ie9");
}
},
SetMatching: function(label, matching) {

$('#matchingButton').html(label + ' <span class="caret"></span>');
$('#matching').val(matching);
},
InitializeSlickTo: function (selector) {
selector.slick({
dots: false,
Expand Down

0 comments on commit 33a99a4

Please sign in to comment.