<html>
<head>
<title>Combo Widget Test</title>
<link href="/DownloadProject/downloadProject/js/ActiveWidgets/runtime/styles/classic/aw.css"
rel="stylesheet" type="text/css"></link>
<script src="/DownloadProject/downloadProject/js/ActiveWidgets/runtime/lib/aw.js"></script>
<style>
.active-column-0 {display: none!important;}
.aw-templates-link{color: blue; font-size: 10px; font-family: Verdana;}
.aw-ui-link{color: blue; font-size: 10px; font-family: Verdana;}
.aw-grid-control { height:250px; margin: 0px; border: none; font: menu; align: center}
.aw-grid-control .aw-column-0 {width: 400px; text-align: center }
.aw-grid-control .aw-row-selector {width: 32px; text-align: center}
.aw-grid-control .aw-alternate-odd {background: #FBEAB5;}
.aw-grid-control .aw-grid-cell {border-right: 1px solid threedlightshadow;}
.aw-grid-control .aw-grid-row {height: 20px; border-bottom: 1px solid threedlightshadow;}
.aw-grid-control .aw-mouseover-row .aw-row-selector {color: red;}
.aw-mouseover-row {background: #B9FFB9;}
/******Grid******/
.aw-grid-control-header-0-1 {color: brown}
.aw-header-0 .aw-item-box {background:#cdcdcd;border-bottom-color:#c4c4c4;}
.aw-header-0 .aw-grid-header {background:#b7b7b7!important;border-bottom-color:#adadad;}
.aw-header-0 .aw-mouseover-header
{
border-bottom-color: #f9b119;
background: #B9FFB9!important;
}
.aw-header-0 .aw-mouseover-header .aw-item-box
{
border-bottom-color: #f9a900;
background: #FCC418;
}
.aw-grid-control { width: 250px }
/******Headers******/
.aw-grid-control .aw-grid-headers {color: blue}
.aw-grid-control .aw-mouseover-header {color: red;}
.aw-grid-control .aw-mousedown-header {color: yellow;}
/******Row Selectors******/
.aw-grid-control .aw-row-selector {width: 20px; text-align: center}
.aw-grid-control .aw-row-2 .aw-row-selector {font-weight: bold}
.aw-grid-control .aw-mouseover-row .aw-row-selector {color: red;}
.aw-grid-control .aw-mouseover-selector {background: green;}
.aw-grid-control .aw-mousedown-selector {background: yellow;}
</style>
</head>
<body onload="resetCombo();" bgcolor="#ffffff" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" class="scroll" >
<script>
//------------------------------------------------------------------
//Values
//------------------------------------------------------------------
var comboValues = [ "move",
"copy",
"releaseWith",
"releaseWithout",
"unrelease",
"delete",
"changeAccessLevel",
"publicRelease",
"publicUnrelease" ];
var comboLabels = [ "Move",
"Copy",
"Release With Notification",
"Release Without Notification",
"Unrelease",
"Delete",
"Change Access Level",
"Release to General Public",
"Unrelease from General Public" ];
var comboTooltips = [ "Move selected document(s) to another community",
"Copy selected document(s) to another community",
"Release selected document(s) with notification",
"Release selected document(s) without notification",
"Unrelease selected document(s)",
"Delete selected document(s)",
"Change access level for selected document(s)",
"Make selected document(s) available to the general public",
"Make selected document(s) unavailable to the general public" ];
//------------------------------------------------------------------
//Combo widget
//------------------------------------------------------------------
var combo = new AW.UI.Combo;
combo.setId("myCombo");
combo.setItemCount(9);
combo.setItemValue(comboValues);
combo.setItemText(comboLabels);
combo.setItemTooltip(comboTooltips);
combo.setControlText("--Combo Widget--");
combo.onSelectedItemsChanged = function(items)
{
this.setTimeout(
function()
{
alert('selected "' + this.getItemText(items[0]) + '"');
}
);
}
combo.setStyle("width", "250px");
combo.getContent("box/text").setStyle("font-size", "11px");
combo.getContent("box/text").setStyle("font-family", "Verdana");
combo.getContent("box/text").setStyle("cursor", "default");
combo.getPopupTemplate().setStyle("width", combo.getStyle("width"));
combo.getContent("box/text").setAttribute("readonly", true);
combo.onControlActivated = function()
{
return true;
}
combo.onControlEditStarted = function()
{
this.getContent("box/text").element().contentEditable = false;
}
combo.onControlClicked = function()
{
this.showPopup();
}
//------------------------------------------------------------------
//Display combo
//------------------------------------------------------------------
document.write("<br><br>");
document.write("<table border='0' width='100%'>");
document.write("<tr><td width='3%'></td>");
document.write("<td width='97%' align='left'>");
document.write(combo);
document.write("</td></tr>");
document.write("</table>");
function resetCombo()
{
combo.refresh();
}
</script>
</body>
</html>
This topic is archived.