modify by xu qing

on web.pm update.php updateprocess.php
for update page to remember user's last choice

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6698 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2010-07-12 02:07:26 +00:00
parent b6d9cf4e4a
commit 4c384853e1
2 changed files with 14 additions and 3 deletions

View File

@ -514,7 +514,18 @@ function fun_js_update()
if ("" == rpm_path)
{
//user input the repo, and we must stroe it in the cookie
rpm_path = $('#repositoryaddr').val() + "&remember=1";
rpm_path = $('#repositoryaddr').val() + "&remember=3";
}
else
{
if(-1 == rpm_path.toLowerCase().indexOf("devel"))
{
rpm_path = rpm_path + "&remember=1";
}
else
{
rpm_path = rpm_path + "&remember=2";
}
}
$("input[type=checkbox]:checked").each(function(){
@ -564,6 +575,6 @@ function fun_js_lsdef_edit()
placeholder : '',
onblur : 'submit'
});
};
}
// load progress bar
myBar.loaded('xcat.js');

View File

@ -38,7 +38,7 @@
}
echo "name='reporadio' value='" . $StableRepository . "'>" . $StableRepository . "(<strong>Stable</strong>)<br/>";
if((1 != $_COOKIE["xcatrepository"]) && (2 != $_COOKIE["xcatrepository"]))
if(isset($_COOKIE["xcatrepository"]) && (1 != $_COOKIE["xcatrepository"]) && (2 != $_COOKIE["xcatrepository"]))
{
echo "<input type=\"radio\" checked=\"true\" name=\"reporadio\" value=\"\">Other:";
echo "<input style=\"width: 500px\" id=repositoryaddr value=\"" . $_COOKIE["xcatrepository"] ."\"<br/>";