NotifyMyAndroid notifications

This commit is contained in:
rembo10
2012-04-09 10:36:14 +05:30
parent 1249153db7
commit 589a3ee333
5 changed files with 115 additions and 3 deletions

View File

@@ -456,6 +456,34 @@
<h3>XBMC Password:</h3><input type="password" name="xbmc_password" value="${config['xbmc_password']}" size="30"><br><br>
<h3><input type="checkbox" name="xbmc_update" value="1" ${config['xbmc_update']} />Update XBMC Library</h3><br>
<h3><input type="checkbox" name="xbmc_notify" value="1" ${config['xbmc_notify']} />Send Notification to XBMC</h3><br>
</div>
<h3><input type="checkbox" name="nma_enabled" id="nma" value="1" ${config['nma_enabled']} />Enable NotifyMyAndroid</h3><br>
<div id="nmaoptions">
<h3>NotifyMyAndroid API Key:</h3><input type="text" name="nma_apikey" value="${config['nma_apikey']}" size="30"><br>
<i class="smalltext">Separate multiple api keys with commas</i><br>
<h3>Priority:<select name="nma_priority"></h3>
%for x in [-2,-1,0,1,2]:
<%
if config['nma_priority'] == x:
nma_priority_selected = 'selected'
else:
nma_priority_selected = ''
if x == -2:
nma_priority_value = 'Very Low'
elif x == -1:
nma_priority_value = 'Moderate'
elif x == 0:
nma_priority_value = 'Normal'
elif x == 1:
nma_priority_value = 'High'
else:
nma_priority_value = 'Emergency'
%>
<option value=${x} ${nma_priority_selected}>${nma_priority_value}</option>
%endfor
</select>
<br><br>
</div>
</td>
</tr>
@@ -610,6 +638,26 @@
}
});
if ($("#nma").is(":checked"))
{
$("#nmaoptions").show();
}
else
{
$("#nmaoptions").hide();
}
$("#nma").click(function(){
if ($("#nma").is(":checked"))
{
$("#nmaoptions").show("fast");
}
else
{
$("#nmaoptions").hide("fast");
}
});
$("#mirror").change(handleNewSelection);
handleNewSelection.apply($("#mirror"));