#4517 mark "add torrent" and "blacklist" url fields as html5 url fields

This commit is contained in:
Mitchell Livingston
2011-09-27 02:34:04 +00:00
parent 0543d53500
commit cee778d694
2 changed files with 10 additions and 2 deletions

View File

@@ -153,7 +153,7 @@
<div class="prefs-section"> <div class="prefs-section">
<div class="title">Blocklist</div> <div class="title">Blocklist</div>
<div class="row"><div class="key"><input type="checkbox" id="blocklist-enabled"/><label for="blocklist-enabled">Enable blocklist:</label></div> <div class="row"><div class="key"><input type="checkbox" id="blocklist-enabled"/><label for="blocklist-enabled">Enable blocklist:</label></div>
<div class="value"><input type="text" id="blocklist-url"/></div></div> <div class="value"><input type="url" id="blocklist-url"/></div></div>
<div class="row"><div class="key" style="margin-top: 3px; font-size: smaller;">Blocklist has <span id="blocklist-size">?</span> rules</div> <div class="row"><div class="key" style="margin-top: 3px; font-size: smaller;">Blocklist has <span id="blocklist-size">?</span> rules</div>
<div class="value"><input type="button" id="blocklist-update-button" value="Update"/></div></div> <div class="value"><input type="button" id="blocklist-update-button" value="Update"/></div></div>
</div> </div>
@@ -367,7 +367,7 @@
<label for="torrent_upload_file">Please select a torrent file to upload:</label> <label for="torrent_upload_file">Please select a torrent file to upload:</label>
<input type="file" name="torrent_files[]" id="torrent_upload_file" multiple="multiple" /> <input type="file" name="torrent_files[]" id="torrent_upload_file" multiple="multiple" />
<label for="torrent_upload_url">Or enter a URL:</label> <label for="torrent_upload_url">Or enter a URL:</label>
<input type="text" id="torrent_upload_url"/> <input type="url" id="torrent_upload_url"/>
<input type="checkbox" id="torrent_auto_start" /> <input type="checkbox" id="torrent_auto_start" />
<label for="torrent_auto_start" id="auto_start_label">Start when added</label> <label for="torrent_auto_start" id="auto_start_label">Start when added</label>
</div> </div>

View File

@@ -205,6 +205,10 @@ function PrefsDialog(remote) {
break; break;
case 'text': case 'text':
case 'url':
case 'email':
case 'number':
case 'search':
e.focus(onControlFocused); e.focus(onControlFocused);
e.blur(onControlBlurred); e.blur(onControlBlurred);
@@ -266,6 +270,10 @@ function PrefsDialog(remote) {
setGroupEnabled(key, val); setGroupEnabled(key, val);
break; break;
case 'text': case 'text':
case 'url':
case 'email':
case 'number':
case 'search':
// don't change the text if the user's editing it. // don't change the text if the user's editing it.
// it's very annoying when that happens! // it's very annoying when that happens!
if (e[0] !== document.activeElement) if (e[0] !== document.activeElement)