From 4c384853e150a827824428248578dcec770a338b Mon Sep 17 00:00:00 2001 From: xq2005 Date: Mon, 12 Jul 2010 02:07:26 +0000 Subject: [PATCH] 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 --- xCAT-UI/ui.old/js/xcat.js | 15 +++++++++++++-- xCAT-UI/ui.old/update.php | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/xCAT-UI/ui.old/js/xcat.js b/xCAT-UI/ui.old/js/xcat.js index f115933e6..40c0ad06e 100644 --- a/xCAT-UI/ui.old/js/xcat.js +++ b/xCAT-UI/ui.old/js/xcat.js @@ -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'); diff --git a/xCAT-UI/ui.old/update.php b/xCAT-UI/ui.old/update.php index 7a70f5e86..db9468509 100644 --- a/xCAT-UI/ui.old/update.php +++ b/xCAT-UI/ui.old/update.php @@ -38,7 +38,7 @@ } echo "name='reporadio' value='" . $StableRepository . "'>" . $StableRepository . "(Stable)
"; - if((1 != $_COOKIE["xcatrepository"]) && (2 != $_COOKIE["xcatrepository"])) + if(isset($_COOKIE["xcatrepository"]) && (1 != $_COOKIE["xcatrepository"]) && (2 != $_COOKIE["xcatrepository"])) { echo "Other:"; echo "";