Added option to modify search term on album page (manually override the automatic search term headphones makes with your own)

This commit is contained in:
rembo10
2012-12-25 00:55:32 -05:00
parent 4c43b6539e
commit aec1603885
4 changed files with 70 additions and 23 deletions
+21
View File
@@ -41,6 +41,23 @@
%endfor
%endif
</div>
</div>
<a class="menu_link_edit" id="edit_search_term" href="#">Edit Search Term</a>
<div id="dialog2" title="Enter your own search term for this album" style="display:none" class="configtable">
<form action="editSearchTerm" method="GET" id="editSearchTerm">
<input type="hidden" name="AlbumID" value="${album['AlbumID']}">
<div class="row">
<%
if not album['SearchTerm']:
search_term = ""
else:
search_term = album['SearchTerm']
%>
<input type="text" value="${search_term}" name="SearchTerm" size="40" />
</div>
<input type="button" value="Save changes" onclick="doAjaxCall('editSearchTerm',$(this),'tabs',true);return false;" data-success="Search term updated"/>
</form>
</div>
</div>
</div>
@@ -162,6 +179,10 @@
$('#dialog').dialog({ width: "500px" });
return false;
});
$('#edit_search_term').click(function() {
$('#dialog2').dialog({ width: "500px" });
return false;
});
$('#refresh_artist').click(function() {
$('#dialog').dialog("close");
});