Browse Source

Merge branch 'feature/AddSearchToMenu' into develop

pull/1107/head
JackDandy 7 years ago
parent
commit
f550d66c9f
  1. 1
      CHANGES.md
  2. 12
      gui/slick/css/style.css
  3. 3
      gui/slick/interfaces/default/inc_top.tmpl
  4. 22
      gui/slick/js/inc_top.js

1
CHANGES.md

@ -31,6 +31,7 @@
* Change Show List text "Search Show Name" to "Filter Show Name", and "Reset Search" to "Reset Filter" for clarity
* Change when getting a non existing folder, add the failed location to log messages
* Change add pulsing effect to warning indicators
* Add show search ability to menu Shows/"Add show"
[develop changelog]

12
gui/slick/css/style.css

@ -688,6 +688,18 @@ inc_top.tmpl
background-position:-337px 0
}
#add-show-name:hover{
cursor:pointer
}
#add-show-name input{
margin:0 0 0 -1px;
padding:0 2px;
height:18px;
width:135px;
font-size:12px
}
/* =======================================================================
inc_bottom.tmpl
========================================================================== */

3
gui/slick/interfaces/default/inc_top.tmpl

@ -133,7 +133,8 @@
<li><a href="$sbRoot/history/" tabindex="$tab#set $tab += 1#"><i class="sgicon-mediafile"></i>History $history_home</a></li>
<li class="divider"></li>
<li class="menu-item-noicon opacity60">Add show...</li>
<li><a href="$sbRoot/home/addShows/new_show/" tabindex="$tab#set $tab += 1#"><i class="sgicon-addshow"></i>Search
<li><a id="add-show-name" data-href="$sbRoot/home/addShows/new_show/" tabindex="$tab#set $tab += 1#"><i class="sgicon-addshow"></i>
<input class="form-control form-control-inline input-sm" type="text" placeholder="Search" tabindex="$tab#set $tab += 1#">
<div class="menu-item-desc opacity60">find show at TV info source</div></a></li>
<li><a href="$sbRoot/home/addShows/trakt_default/" tabindex="$tab#set $tab += 1#"><i class="sgicon-trakt"></i>Trakt Cards
<div class="menu-item-desc opacity60">trends, tailored suggestions...</div></a></li>

22
gui/slick/js/inc_top.js

@ -37,7 +37,7 @@ function initActions() {
// menu$.find('a:contains("Update show in XBMC")').addClass('btn').html('<i class="sgicon-xbmc"></i>Update show in XBMC');
}
$(document).ready(function(){
$(function(){
initActions();
$('#NAV' + topmenu).addClass('active');
$('.dropdown-toggle').dropdownHover();
@ -55,4 +55,24 @@ $(document).ready(function(){
doLast && $('.bubble').last().addClass('last');
return !1;
});
var search = function(){
var link$ = $('#add-show-name'), text = link$.find('input').val(),
param = '?show_to_add=|||' + text + '&use_show_name=True';
window.location.href = link$.attr('data-href') + (!text.length ? '' : param);
}, removeHref = function(){$('#add-show-name').removeAttr('href');};
$('#add-show-name')
.on('click', function(){ search(); })
.hover(function() {$(this).attr('href', $(this).attr('data-href'));}, removeHref);
$('#add-show-name input')
.hover(removeHref)
.on('click', function(e){ e.stopPropagation(); })
.keydown(function(e){
if (13 === e.keyCode) {
e.stopPropagation();
e.preventDefault();
search();
return !1;
}
});
});

Loading…
Cancel
Save