refactor qaddFeed, addFilter
This commit is contained in:
parent
288487e429
commit
18ab3d7ae1
|
@ -1347,7 +1347,7 @@ function infobox_callback2(transport) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addFilter() {
|
function createFilter() {
|
||||||
|
|
||||||
var form = document.forms['filter_add_form'];
|
var form = document.forms['filter_add_form'];
|
||||||
var reg_exp = form.reg_exp.value;
|
var reg_exp = form.reg_exp.value;
|
||||||
|
@ -1379,7 +1379,7 @@ function isValidURL(s) {
|
||||||
return s.match("http://") != null || s.match("https://") != null || s.match("feed://") != null;
|
return s.match("http://") != null || s.match("https://") != null || s.match("feed://") != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function qaddFeed() {
|
function subscribeToFeed() {
|
||||||
|
|
||||||
var form = document.forms['feed_add_form'];
|
var form = document.forms['feed_add_form'];
|
||||||
var feed_url = form.feed_url.value;
|
var feed_url = form.feed_url.value;
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
print "<table width='100%'>
|
print "<table width='100%'>
|
||||||
<tr><td width='20%'>".__('Feed URL:')."</td><td>
|
<tr><td width='20%'>".__('Feed URL:')."</td><td>
|
||||||
<input class=\"iedit\" onblur=\"javascript:enableHotkeys()\"
|
<input class=\"iedit\" onblur=\"javascript:enableHotkeys()\"
|
||||||
onkeypress=\"return filterCR(event, qaddFeed)\"
|
onkeypress=\"return filterCR(event, subscribeToFeed)\"
|
||||||
onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
|
onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
|
||||||
onchange=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
|
onchange=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
|
||||||
onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>";
|
onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>";
|
||||||
|
@ -87,9 +87,9 @@
|
||||||
|
|
||||||
print "<div id='fadd_login_container' style='display:none'>
|
print "<div id='fadd_login_container' style='display:none'>
|
||||||
<table width='100%'>
|
<table width='100%'>
|
||||||
<tr><td width='20%'>".__('Login:')."</td><td><input name='auth_login' class='iedit' onfocus=\"javascript:disableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onkeypress=\"return filterCR(event, qaddFeed)\"></td></tr>
|
<tr><td width='20%'>".__('Login:')."</td><td><input name='auth_login' class='iedit' onfocus=\"javascript:disableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onkeypress=\"return filterCR(event, subscribeToFeed)\"></td></tr>
|
||||||
<tr><td>".__('Password:')."</td><td><input type='password'
|
<tr><td>".__('Password:')."</td><td><input type='password'
|
||||||
name='auth_pass' class='iedit' onfocus=\"javascript:disableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onkeypress=\"return filterCR(event, qaddFeed)\"></td></tr>
|
name='auth_pass' class='iedit' onfocus=\"javascript:disableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onkeypress=\"return filterCR(event, subscribeToFeed)\"></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
print "<div style='float : right'>
|
print "<div style='float : right'>
|
||||||
<input class=\"button\"
|
<input class=\"button\"
|
||||||
id=\"fadd_submit_btn\" disabled=\"true\"
|
id=\"fadd_submit_btn\" disabled=\"true\"
|
||||||
type=\"submit\" onclick=\"return qaddFeed()\" value=\"".__('Subscribe')."\">
|
type=\"submit\" onclick=\"return subscribeToFeed()\" value=\"".__('Subscribe')."\">
|
||||||
<input class=\"button\"
|
<input class=\"button\"
|
||||||
type=\"submit\" onclick=\"return closeInfoBox()\"
|
type=\"submit\" onclick=\"return closeInfoBox()\"
|
||||||
value=\"".__('Cancel')."\"></div>
|
value=\"".__('Cancel')."\"></div>
|
||||||
|
@ -271,7 +271,7 @@
|
||||||
print "<table width='100%'>";
|
print "<table width='100%'>";
|
||||||
|
|
||||||
print "<tr><td>".__('Match:')."</td>
|
print "<tr><td>".__('Match:')."</td>
|
||||||
<td><input onkeypress=\"return filterCR(event, qaddFilter)\"
|
<td><input onkeypress=\"return filterCR(event, createFilter)\"
|
||||||
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
||||||
onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
||||||
name=\"reg_exp\" class=\"iedit\">";
|
name=\"reg_exp\" class=\"iedit\">";
|
||||||
|
@ -320,7 +320,7 @@
|
||||||
|
|
||||||
print "<input type=\"submit\"
|
print "<input type=\"submit\"
|
||||||
id=\"infobox_submit\"
|
id=\"infobox_submit\"
|
||||||
class=\"button\" onclick=\"return addFilter()\"
|
class=\"button\" onclick=\"return createFilter()\"
|
||||||
disabled=\"true\" value=\"".__('Create')."\"> ";
|
disabled=\"true\" value=\"".__('Create')."\"> ";
|
||||||
|
|
||||||
print "<input class=\"button\"
|
print "<input class=\"button\"
|
||||||
|
|
Loading…
Reference in New Issue