options.htm revision 99690585c1f4c3ffb83c50bcb5cc0725cadff899
409N/A<link rel="stylesheet" type="text/css" href="$context/assets/css/Specific/optionUpgrade.css" />
49N/A<script type="text/javascript">
49N/A YAHOO.namespace("sun.identity.config.options");
49N/A
49N/A var ie7fix = 1;
49N/A
49N/A var okImage = '<img class="pointer" src="$context/assets/images/ok.jpg">';
49N/A var okString = okImage + '<small>$page.getLocalizedString("ok.string")</small>';
49N/A var errorImage = '<img class="pointer" src="$context/assets/images/error.jpg">';
49N/A var warningImage = '<img class="pointer" src="$context/assets/images/warning.jpg">';
49N/A var userStoreChoice;
49N/A var licenseTXT = '';
49N/A
49N/A //convenient alias:
49N/A var $ = YAHOO.util.Dom.get;
49N/A
49N/A function launchConsole() {
49N/A document.location = "$context/UI/Login";
49N/A }
49N/A
49N/A #if ( $upgrade || $upgradeCompleted)
49N/A
49N/A function downloadInstructions() {
873N/A /* TODO - enable download - where does this file reside? */
49N/A alert( "Not implemented!" );
49N/A }
49N/A
49N/A function onUpgradeResponse( response ) {
49N/A if ( response.responseText == "true" ) {
49N/A //operation was successful, hide the writing dialog, show the confComplete:
342N/A
51N/A //in actuality, this usually happens very fast, so put a delay when removing the testUrlPanel.
873N/A //if we don't do this, the window blinks and looks unsightly, so we actually impose an unnecessary
873N/A //gui delay for a slightly cleaner 'expected' UI experience:
95N/A setTimeout("YAHOO.sun.identity.config.options.upgrading.hide()", 1500);
873N/A setTimeout("YAHOO.sun.identity.config.options.upgradeComplete.show()", 1500);
873N/A } else {
873N/A //TODO - show a specific (nice looking) error message dialog that explains why the upgrade failed.
873N/A //for now, just alert:
873N/A alert( "Unexpected error: [" + response.responseText + "]. Please contact your System " +
51N/A "Administrator. If you are the System Administrator, please direct your questions to the " +
289N/A "OpenAM user's mailing list for help.");
1231N/A }
1281N/A
51N/A }
49N/A
49N/A function renderUpgradePanel() {
49N/A YAHOO.sun.identity.config.options.upgrade = new YAHOO.widget.Panel("upgrade", { fixedcenter: false, modal: true, close: true, visible:false, constraintoviewport:true });
49N/A YAHOO.sun.identity.config.options.upgrade.beforeHideEvent.subscribe(function() {
49N/A YAHOO.util.Dom.removeClass('upgrade', 'license-accepted');
49N/A document.getElementById("upgrade-accept-check").checked = false;
49N/A document.getElementById("upgrade-accept-license-button").disabled = true;
49N/A });
49N/A YAHOO.sun.identity.config.options.upgrade.renderEvent.subscribe(function() {
72N/A $("upgrade-license-message").innerHTML = licenseTXT;
51N/A YAHOO.util.Dom.removeClass('upgradeLink', 'disabled');
72N/A YAHOO.util.Event.addListener("upgradeLink", "click", showUpgradePanel );
72N/A });
51N/A
72N/A YAHOO.sun.identity.config.options.upgrade.render();
72N/A YAHOO.sun.identity.config.options.upgrade.center();
72N/A
72N/A }
72N/A
72N/A function showUpgradePanel() {
51N/A YAHOO.sun.identity.config.options.upgrade.show();
281N/A }
315N/A
315N/A #else
315N/A var configOption = 0;
315N/A
315N/A
281N/A function onDefaultSummarySuccess( response ) {
315N/A var formError = (response != null && (response.getResponseHeader["formError"] != null));
315N/A YAHOO.sun.identity.config.options.inProgress.hide();
281N/A if ( !formError ) {
315N/A YAHOO.sun.identity.config.options.defaultSummary.hide();
315N/A YAHOO.sun.identity.config.options.confComplete.show();
315N/A } else {
315N/A
315N/A YAHOO.sun.identity.config.options.defaultSummary.show();
315N/A }
315N/A }
315N/A
315N/A function cancelDefaultSummary() {
315N/A YAHOO.sun.identity.config.options.defaultSummary.hide();
315N/A }
315N/A
315N/A function onDefaultSummaryFailure(response ) {
315N/A YAHOO.sun.identity.config.options.defaultSummary.hide();
315N/A alert("configuration failed");
315N/A document.location = "$context/config/options.htm";
315N/A }
315N/A
281N/A function submitDefaultSummaryForm() {
49N/A YAHOO.sun.identity.config.options.defaultSummary.hide();
49N/A if ( window.frames['progressIframe'] ) {
49N/A window.frames['progressIframe'].location = "$context/setup/setSetupProgress";
51N/A }
49N/A YAHOO.sun.identity.config.options.inProgress.show();
49N/A
49N/A AjaxUtils.doPost("defaultSummary", "$context/config/defaultSummary.htm?" + getLocale(), AjaxUtils.serializeForm("defaultForm"), onDefaultSummarySuccess, onDefaultSummaryFailure);
49N/A }
49N/A
49N/A function getLocale() {
49N/A var queryString = window.top.location.search.substring(1);
49N/A var locale = 'locale=';
49N/A var localeValue = '';
281N/A if (queryString.length > 0) {
315N/A var idx = queryString.indexOf(locale);
315N/A if (idx != -1) {
315N/A idx += locale.length;
281N/A var idx1 = queryString.indexOf('&', idx);
49N/A if (idx1 == -1) {
49N/A idx1 = queryString.length;
315N/A }
315N/A localeValue = queryString.substring (idx, idx1);
315N/A }
315N/A }
552N/A return locale + localeValue;
873N/A }
873N/A
873N/A function renderDefaultSummary() {
873N/A YAHOO.sun.identity.config.options.defaultSummary = new YAHOO.widget.Panel("defaultSummary", { width:"810px", fixedcenter: false, modal: true, close: true, visible:false, constraintoviewport:true });
873N/A YAHOO.sun.identity.config.options.defaultSummary.beforeHideEvent.subscribe(function() {
873N/A YAHOO.util.Dom.removeClass('defaultSummary', 'license-accepted');
873N/A document.getElementById("accept-check").checked = false;
51N/A document.getElementById("acceptLicenseButton").disabled = true;
289N/A });
51N/A YAHOO.sun.identity.config.options.defaultSummary.renderEvent.subscribe(function() {
873N/A $("license-message").innerHTML = licenseTXT;
873N/A YAHOO.util.Dom.removeClass('DemoConfiguration', 'disabled');
1038N/A YAHOO.util.Event.addListener("DemoConfiguration", "click", setOptionOne );
873N/A });
873N/A YAHOO.sun.identity.config.options.defaultSummary.render();
873N/A YAHOO.sun.identity.config.options.defaultSummary.center();
873N/A
873N/A }
873N/A
873N/A function setOptionOne() {
873N/A setOption(1);
873N/A }
49N/A function setOptionTwo() {
873N/A setOption(2);
873N/A }
873N/A
873N/A function showWizard() {
873N/A renderWizard();
873N/A YAHOO.sun.identity.config.options.wizard.show();
873N/A }
873N/A
873N/A function renderWizard() {
873N/A YAHOO.sun.identity.config.options.wizard = new YAHOO.widget.Panel("wizard", { fixedcenter: false, modal: true, close: true, visible:false, constraintoviewport:true });
873N/A YAHOO.sun.identity.config.options.wizard.beforeHideEvent.subscribe(function() {
873N/A YAHOO.util.Dom.removeClass('wizard', 'license-accepted');
873N/A document.getElementById("wizard-accept-check").checked = false;
873N/A document.getElementById("wizard-accept-license-button").disabled = true;
873N/A });
873N/A YAHOO.sun.identity.config.options.wizard.renderEvent.subscribe(function() {
873N/A $("wizard-license-message").innerHTML = licenseTXT;
873N/A YAHOO.util.Dom.removeClass('CreateNewConf', 'disabled');
873N/A YAHOO.util.Event.addListener("CreateNewConf", "click", setOptionTwo );
873N/A });
873N/A YAHOO.sun.identity.config.options.wizard.render();
873N/A YAHOO.sun.identity.config.options.wizard.center();
873N/A
873N/A }
873N/A
873N/A function setOption(inOption) {
873N/A configOption = inOption;
873N/A AjaxUtils.call( "$context$path?actionLink=resetSessionAttributes", onSetOption);
873N/A }
873N/A
873N/A function onSetOption(response) {
873N/A if (configOption == 1) {
873N/A YAHOO.sun.identity.config.options.defaultSummary.show();
873N/A } else if (configOption == 2) {
51N/A YAHOO.sun.identity.config.options.wizard.show();
51N/A } else {
51N/A alert("Not Implemented Yet");
51N/A }
51N/A }
51N/A
315N/A #end
49N/A
51N/A function writeConfigResponse(response) {
51N/A if (response.responseText === "true") {
51N/A YAHOO.sun.identity.config.options.inProgress.hide();
51N/A YAHOO.sun.identity.config.options.confComplete.show();
51N/A } else {
51N/A document.getElementById("returnToConfig").style.display = "";
315N/A document.getElementById("setupMessage").innerHTML = errorImage + "&nbsp;" + response.responseText;
873N/A }
51N/A }
873N/A
57N/A var isProgressShow = false;
57N/A function toggleProgressDiv() {
57N/A var obj = document.getElementById("progressControl");
57N/A var obj1 = document.getElementById("progressDiv");
57N/A if (isProgressShow == true ) {
57N/A obj.innerHTML = "Show Progress";
57N/A obj1.style.display ="none";
315N/A isProgressShow = false;
315N/A } else {
315N/A obj.innerHTML = "Hide progress log";
315N/A obj1.style.display="block";
1337N/A isProgressShow = true;
873N/A }
873N/A }
873N/A
315N/A function licenseReady(response) {
873N/A YAHOO.util.Dom.addClass('options-container', 'license-loaded');
315N/A licenseTXT = response.responseText;
873N/A
57N/A #if ( $upgrade || $upgradeCompleted)
873N/A AjaxUtils.load('upgradeContainer', "$context/config/upgrade/upgrade.htm?" + getLocale(), renderUpgradePanel);
49N/A #else
51N/A AjaxUtils.load('defaultSummaryContainer', "$context/config/defaultSummary.htm?" + getLocale(), renderDefaultSummary);
315N/A AjaxUtils.load('wizardContainer', "$context/config/wizard/wizard.htm?" + getLocale(), renderWizard);
315N/A #end
315N/A
49N/A }
315N/A
315N/A function init() {
315N/A
281N/A YAHOO.sun.identity.config.options.inProgress = new YAHOO.widget.Panel("inProgress", { width:"700px", fixedcenter: false, modal:true, close: false, visible:false, constraintoviewport:true });
315N/A YAHOO.sun.identity.config.options.inProgress.render();
281N/A YAHOO.sun.identity.config.options.inProgress.center();
315N/A
384N/A YAHOO.sun.identity.config.options.confComplete = new YAHOO.widget.Panel("confComplete", { fixedcenter: false, modal:true, close: false, visible:false, constraintoviewport:true });
51N/A YAHOO.sun.identity.config.options.confComplete.render();
72N/A YAHOO.sun.identity.config.options.confComplete.center();
873N/A
873N/A #if ( $upgrade || $upgradeCompleted)
227N/A
72N/A YAHOO.sun.identity.config.options.upgradeComplete = new YAHOO.widget.Panel("upgradeComplete", { fixedcenter: true, modal: true, close: false, visible:false, constraintoviewport:true });
72N/A YAHOO.sun.identity.config.options.upgradeComplete.render();
72N/A #if ($upgradeCompleted)
72N/A YAHOO.sun.identity.config.options.confComplete.show();
72N/A #end
72N/A YAHOO.sun.identity.config.options.upgrading = new YAHOO.widget.Panel("upgrading", { width:"240px", fixedcenter:true, close:false, draggable:false, zindex:4, modal:true, visible:false });
72N/A YAHOO.sun.identity.config.options.upgrading.setHeader("Upgrading configuration. Please wait...");
81N/A YAHOO.sun.identity.config.options.upgrading.setBody('<img src="$context/assets/images/rel_interstitial_loading.gif" />');
81N/A YAHOO.sun.identity.config.options.upgrading.render(document.body);
81N/A #end
81N/A
81N/A #if ( $isOpenDS1x )
72N/A YAHOO.sun.identity.config.options.cannotContinue = new YAHOO.widget.Panel("cannotContinue", { fixedcenter: true, modal: true, close: false, visible:false, constraintoviewport:true });
81N/A YAHOO.sun.identity.config.options.cannotContinue.render();
72N/A YAHOO.sun.identity.config.options.cannotContinue.show();
72N/A #end
72N/A
72N/A AjaxUtils.simpleCall("$context/legal-notices/license.txt", licenseReady);
72N/A
72N/A }
72N/A
72N/A YAHOO.util.Event.onDOMReady(init);
72N/A
315N/A</script>
315N/A
315N/A
315N/A<div id="options-container">
281N/A <div id="container" align="center">
315N/A
315N/A <div id="options" align="left" style="width:600px">
315N/A #if ( $upgrade || $upgradeCompleted)
315N/A <h1>$page.getLocalizedString("upgrade.available")</h1>
315N/A <span class="yellowBlock">$page.getLocalizedString("upgrade.available.option"):<br/><span class="currentVersion">$currentVersion</span></span>
315N/A #else
281N/A <h1>$page.getLocalizedString("configuration.options.title")</h1>
144N/A <h4>$page.getLocalizedString("configuration.options.subtitle")</h4>
941N/A #end
227N/A
941N/A #if ($upgrade || $upgradeCompleted)
941N/A <div style="width: 100%">
941N/A <h3>$page.getLocalizedString("upgrade.title")</h3>
941N/A $page.getLocalizedString("upgrade.description")
941N/A <a id="upgradeLink" class="blue pointer disabled">$page.getLocalizedString("upgrade.link")</a>
941N/A #else
941N/A <div class="borderRight">
941N/A <h3>$page.getLocalizedString("configuration.options.option1.title")</h3>
941N/A $page.getLocalizedString("configuration.options.option1.description")
941N/A <br>
941N/A <p>
941N/A <a id="DemoConfiguration" class="blue pointer disabled" >$page.getLocalizedString("configuration.options.option1.link")</a>
60N/A </p>
60N/A #end
60N/A </div>
941N/A <!-- enable if adding third option
941N/A <div class="borderRight">
941N/A -->
941N/A #if($upgrade || $upgradeCompleted)
60N/A #else
235N/A <div>
235N/A <h3>$page.getLocalizedString("configuration.options.option2.title")</h3>
235N/A $page.getLocalizedString("configuration.options.option2.description")
235N/A <br>
235N/A <p>
235N/A <a id="CreateNewConf" class="blue pointer disabled" >$page.getLocalizedString("configuration.options.option2.link")</a>
235N/A </p>
235N/A </div>
235N/A #end
235N/A </div>
235N/A </div>
235N/A #if ( $upgrade || $upgradeCompleted)
235N/A <style type="text/css">
95N/A div.colum{
136N/A width:280px;
136N/A float:left;
136N/A padding:5px;
136N/A text-align:left;
95N/A }
136N/A
136N/A </style>
136N/A <div id="upgradeContainer"></div>
136N/A <div id="upgradeComplete" style="width:400px;visibility:hidden">
136N/A <div class="header">$page.getLocalizedString("upgrade.option.complete.title")</div>
95N/A <div class="bd" style="background-color: white; text-align: center">
289N/A <h2>$page.getLocalizedString("upgrade.option.complete.body")</h2>
289N/A <a id="launchConsoleLink2" class="blueSmall pointer">$page.getLocalizedString("launch.console.link")</a>
289N/A </div>
289N/A </div>
289N/A #else
289N/A <div id="defaultSummaryContainer"></div>
289N/A <div id="wizardContainer"></div>
289N/A #end
289N/A
95N/A <div id="inProgress" style="visibility:hidden">
95N/A <div class="header"> </div>
95N/A <div class="bd">
289N/A <div class="bodyPopup borderPopUpGray" align="center" style="background:#FFFFFF">
95N/A <br/>
136N/A #if ($upgrade || $upgradeCompleted)
873N/A <h2>$page.getLocalizedString("upgrade.progress")</h2>
873N/A #else
873N/A <h2>$page.getLocalizedString("configurator.progress")</h2>
873N/A #end
873N/A <img src="$context/assets/images/rel_interstitial_loading.gif" />
873N/A
873N/A <br>
227N/A
227N/A <div id="progressDiv">
227N/A <iframe id="progressIframe" name="progressIframe" src="$context/assets/images/rel_interstitial_loading.gif" height=220 width=600 scrolling="no" frameborder="0">This browser cannot dipslay iframes.</iframe>
227N/A </div>
227N/A <br>
227N/A <hr>
227N/A <br> <br>
227N/A <span id="setupMessage"></span>
289N/A <br>
227N/A <br>
271N/A <div id="returnToConfig">
271N/A <a href="#" onClick="YAHOO.sun.identity.config.options.inProgress.hide(); return false;">$page.getLocalizedString("return.config.link")</a>
227N/A </div>
136N/A <br>
95N/A </div>
289N/A </div>
95N/A </div>
289N/A
136N/A
170N/A <div id="confComplete" style="visibility:hidden">
136N/A #if ($upgrade || $upgradeCompleted)
289N/A <div class="header">$page.getLocalizedString("upgrade.complete.header")</div>
136N/A <div class="bd">
136N/A <div class="bodyPopup borderPopUpGray" align="center" style="background:#FFFFFF">
136N/A
95N/A <br>
136N/A <h1>$page.getLocalizedString("upgrade.complete.message")</h1>
136N/A <br/>
136N/A <p align="center" class="blueSmall">$page.getLocalizedString("upgrade.restart.container")</p>
136N/A #else
136N/A <div class="header">$page.getLocalizedString("configuration.option1.complete.header")</div>
136N/A <div class="bd">
170N/A <div class="bodyPopup borderPopUpGray" align="center" style="background:#FFFFFF">
136N/A
289N/A <br>
136N/A <h1>$page.getLocalizedString("configuration.option1.complete.message")</h1>
136N/A <br/>
136N/A <p align="center" class="blueSmall">
95N/A <a href="#" onclick="launchConsole(); return false">$page.getLocalizedString("go.to.login.screen")</a>
838N/A </p>
873N/A #end
873N/A </div>
838N/A </div>
838N/A </div>
838N/A
838N/A #if ( $isOpenDS1x )
838N/A <style type="text/css">
838N/A div.singlecolumn{
838N/A width:560px;
838N/A float:left;
838N/A padding:5px;
838N/A text-align:left;
838N/A }
1231N/A </style>
1337N/A <div id="cannotContinue" align="center" style="width:600px;visibility:hidden">
1337N/A <div class="header">$page.getLocalizedString("cannot.continue.header")</div>
1231N/A <div class="bd" style="background-color: white; height: 150px; text-align: left">
1231N/A <h2>$page.getLocalizedString("cannot.continue.body")</h2>
342N/A <div class="singlecolumn">
342N/A <p>$page.getLocalizedString("cannot.continue.text1")</p>
873N/A <p>$page.getLocalizedString("cannot.continue.text2") $odsdir</p>
873N/A <p>$page.getLocalizedString("cannot.continue.text3")</p>
342N/A </div>
342N/A </div>
342N/A </div>
342N/A #end
342N/A </div>