code cleanup; initial button usage
This commit is contained in:
parent
27179741c1
commit
f88c78147e
7 changed files with 25 additions and 65 deletions
|
@ -2068,20 +2068,11 @@ function updateFeedBrowser() {
|
||||||
var c = $("browseFeedList");
|
var c = $("browseFeedList");
|
||||||
var r = transport.responseXML.getElementsByTagName("content")[0];
|
var r = transport.responseXML.getElementsByTagName("content")[0];
|
||||||
var nr = transport.responseXML.getElementsByTagName("num-results")[0];
|
var nr = transport.responseXML.getElementsByTagName("num-results")[0];
|
||||||
var sb = $("feed_browser_subscribe");
|
|
||||||
|
|
||||||
if (c && r) {
|
if (c && r) {
|
||||||
c.innerHTML = r.firstChild.nodeValue;
|
c.innerHTML = r.firstChild.nodeValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nr && sb) {
|
|
||||||
if (nr.getAttribute("value") > 0) {
|
|
||||||
sb.disabled = false;
|
|
||||||
} else {
|
|
||||||
sb.disabled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} });
|
} });
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -17,9 +17,8 @@
|
||||||
print "<p>".__("Help topic not found.")."</p>";
|
print "<p>".__("Help topic not found.")."</p>";
|
||||||
}
|
}
|
||||||
print "<div align='center'>
|
print "<div align='center'>
|
||||||
<input type='submit' class='button'
|
<button onclick=\"javascript:window.close()\">".
|
||||||
onclick=\"javascript:window.close()\"
|
__('Close this window')."</button></div>";
|
||||||
value=\"".__('Close this window')."\"></div>";
|
|
||||||
|
|
||||||
if (!$_REQUEST["noheaders"]) {
|
if (!$_REQUEST["noheaders"]) {
|
||||||
print "</body></html>";
|
print "</body></html>";
|
||||||
|
|
|
@ -72,11 +72,9 @@
|
||||||
|
|
||||||
print __("URL:") . " ";
|
print __("URL:") . " ";
|
||||||
|
|
||||||
print "<input size=\"40\" onblur=\"javascript:enableHotkeys()\"
|
print "<input size=\"40\"
|
||||||
onkeypress=\"return filterCR(event, subscribeToFeed)\"
|
onkeypress=\"return filterCR(event, subscribeToFeed)\"
|
||||||
onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
|
name=\"feed_url\"></td></tr>";
|
||||||
onchange=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
|
|
||||||
onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>";
|
|
||||||
|
|
||||||
print "<br/>";
|
print "<br/>";
|
||||||
|
|
||||||
|
@ -87,31 +85,15 @@
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
|
|
||||||
/* print "<tr><td colspan='2'><div class='insensitive'>";
|
|
||||||
|
|
||||||
print __("Some feeds require authentication. If you subscribe to such
|
|
||||||
feed, you will have to enter your login and password in Feed Editor");
|
|
||||||
|
|
||||||
print "</div></td></tr>"; */
|
|
||||||
|
|
||||||
/* print "<div id='fadd_login_prompt'><br/>
|
|
||||||
<a href='javascript:appearBlockElement(\"fadd_login_container\",
|
|
||||||
\"fadd_login_prompt\")'>".__('Click here if this feed requires authentication.')."</a></div>"; */
|
|
||||||
|
|
||||||
print "<div id='fadd_login_container' style='display:none'>
|
print "<div id='fadd_login_container' style='display:none'>
|
||||||
|
|
||||||
<div class=\"dlgSec\">".__("Authentication")."</div>
|
<div class=\"dlgSec\">".__("Authentication")."</div>
|
||||||
<div class=\"dlgSecCont\">".
|
<div class=\"dlgSecCont\">".
|
||||||
|
|
||||||
__('Login:') . " <input name='auth_login' size=\"20\"
|
__('Login:') . " <input name='auth_login' size=\"20\"
|
||||||
onfocus=\"javascript:disableHotkeys()\"
|
|
||||||
onfocus=\"javascript:disableHotkeys()\"
|
|
||||||
onkeypress=\"return filterCR(event, subscribeToFeed)\"> ".
|
onkeypress=\"return filterCR(event, subscribeToFeed)\"> ".
|
||||||
__('Password:') . "<input type='password'
|
__('Password:') . "<input type='password'
|
||||||
name='auth_pass' size=\"20\"
|
name='auth_pass' size=\"20\"
|
||||||
onfocus=\"javascript:disableHotkeys()\"
|
|
||||||
onfocus=\"javascript:disableHotkeys()\"
|
|
||||||
onkeypress=\"return filterCR(event, subscribeToFeed)\">
|
onkeypress=\"return filterCR(event, subscribeToFeed)\">
|
||||||
</div></div>";
|
</div></div>";
|
||||||
|
|
||||||
|
@ -125,15 +107,10 @@
|
||||||
print "</form>";
|
print "</form>";
|
||||||
|
|
||||||
print "<div class=\"dlgButtons\">
|
print "<div class=\"dlgButtons\">
|
||||||
<input class=\"button\"
|
<button class=\"button\" id=\"fadd_submit_btn\"
|
||||||
id=\"fadd_submit_btn\" disabled=\"true\"
|
onclick=\"return subscribeToFeed()\">".__('Subscribe')."</button>
|
||||||
type=\"submit\" onclick=\"return subscribeToFeed()\" value=\"".__('Subscribe')."\">
|
<button onclick=\"return browseFeeds()\">".__('More feeds')."</button>
|
||||||
<input class=\"button\"
|
<button onclick=\"return closeInfoBox()\">".__('Cancel')."</button></div>";
|
||||||
type=\"submit\" onclick=\"return browseFeeds()\" value=\"".__('More feeds')."\">
|
|
||||||
|
|
||||||
<input class=\"button\"
|
|
||||||
type=\"submit\" onclick=\"return closeInfoBox()\"
|
|
||||||
value=\"".__('Cancel')."\"></div>";
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,15 +121,12 @@
|
||||||
$owner_uid = $_SESSION["uid"];
|
$owner_uid = $_SESSION["uid"];
|
||||||
|
|
||||||
print "<ul class='browseFeedList' id='browseFeedList'>";
|
print "<ul class='browseFeedList' id='browseFeedList'>";
|
||||||
$subscribe_btn_disabled = print_feed_browser($link, $search, 25) == 0 ? "disabled" : "";
|
print_feed_browser($link, $search, 25);
|
||||||
print "</ul>";
|
print "</ul>";
|
||||||
|
|
||||||
print "<div align='center'>
|
print "<div align='center'>
|
||||||
<input type=\"submit\" class=\"button\" id=\"feed_browser_subscribe\"
|
<button onclick=\"feedBrowserSubscribe()\">".__('Subscribe')."</button>
|
||||||
$subscribe_btn_disabled
|
<button onclick=\"closeInfoBox()\" >".__('Cancel')."</button></div>";
|
||||||
onclick=\"feedBrowserSubscribe()\" value=\"".__('Subscribe')."\">
|
|
||||||
<input type='submit' class='button'
|
|
||||||
onclick=\"closeInfoBox()\" value=\"".__('Cancel')."\"></div>";
|
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -139,9 +139,10 @@
|
||||||
|
|
||||||
<div id="errorBoxShadow" style="display : none">
|
<div id="errorBoxShadow" style="display : none">
|
||||||
<div id="errorBox">
|
<div id="errorBox">
|
||||||
<div id="xebTitle">Fatal Exception</div><div id="xebContent"> </div>
|
<div id="xebTitle"><?php echo __('Fatal Exception') ?></div><div id="xebContent"> </div>
|
||||||
<div id="xebBtn" align='center'><input type="submit"
|
<div id="xebBtn" align='center'>
|
||||||
onclick="closeErrorBox()" value="Close this window"/></div>
|
<button onclick="closeErrorBox()"><?php echo __('Close this window') ?></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -919,7 +919,7 @@ function clearFeedArticles(feed_id) {
|
||||||
|
|
||||||
function collapse_feedlist() {
|
function collapse_feedlist() {
|
||||||
try {
|
try {
|
||||||
debug("toggle_feedlist");
|
debug("collapse_feedlist");
|
||||||
|
|
||||||
var theme = getInitParam("theme");
|
var theme = getInitParam("theme");
|
||||||
if (theme != "" && theme != "compact" && theme != "graycube" &&
|
if (theme != "" && theme != "compact" && theme != "graycube" &&
|
||||||
|
@ -981,7 +981,7 @@ function collapse_feedlist() {
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("toggle_feedlist", e);
|
exception_error("collapse_feedlist", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
21
tt-rss.php
21
tt-rss.php
|
@ -98,9 +98,10 @@
|
||||||
|
|
||||||
<div id="errorBoxShadow" style="display : none">
|
<div id="errorBoxShadow" style="display : none">
|
||||||
<div id="errorBox">
|
<div id="errorBox">
|
||||||
<div id="xebTitle">Fatal Exception</div><div id="xebContent"> </div>
|
<div id="xebTitle"><?php echo __('Fatal Exception') ?></div><div id="xebContent"> </div>
|
||||||
<div id="xebBtn" align='center'><input type="submit"
|
<div id="xebBtn" align='center'>
|
||||||
onclick="closeErrorBox()" value="Close this window"/></div>
|
<button onclick="closeErrorBox()"><?php echo __('Close this window') ?></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -206,10 +207,6 @@
|
||||||
id="collapse_feeds_btn" onclick="collapse_feedlist()" class="button"
|
id="collapse_feeds_btn" onclick="collapse_feedlist()" class="button"
|
||||||
title="<?php echo __('Collapse feedlist') ?>" style="display : none"/>
|
title="<?php echo __('Collapse feedlist') ?>" style="display : none"/>
|
||||||
|
|
||||||
<input type="submit" value="<?php echo __("Toggle Feedlist") ?>"
|
|
||||||
id="toggle_feeds_btn" class="button"
|
|
||||||
onclick="toggle_feedlist()" style="display : none"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select name="view_mode" title="<?php echo __('Show articles') ?>"
|
<select name="view_mode" title="<?php echo __('Show articles') ?>"
|
||||||
|
@ -234,13 +231,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<input class="button" type="submit" name="update"
|
<button onclick="return viewCurrentFeed('ForceUpdate')">
|
||||||
onclick="return viewCurrentFeed('ForceUpdate')"
|
<?php echo __('Update') ?></button>
|
||||||
value="<?php echo __('Update') ?>"/>
|
|
||||||
|
|
||||||
<input class="button" type="submit" name="update"
|
<button onclick="return catchupCurrentFeed()">
|
||||||
onclick="return catchupCurrentFeed()"
|
<?php echo __('Mark as read') ?></button>
|
||||||
value="<?php echo __('Mark as read') ?>"/>
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue