Commit fa9ca4a3 authored by haemmer's avatar haemmer
Browse files

Improved drop down list and search options

parent ba1a86e2
...@@ -33,6 +33,8 @@ SWITCHwayf Changes and Version History: ...@@ -33,6 +33,8 @@ SWITCHwayf Changes and Version History:
Embedded WAYF Embedded WAYF
- If the Discovery Feed feature is activated only those IdPs are shown - If the Discovery Feed feature is activated only those IdPs are shown
that are contained in the feed. Others will be hidden automatically. that are contained in the feed. Others will be hidden automatically.
- Added Locations to format of IDP entries to allow users to search
Identity Providers using a geographical hint.
1.15 Release date: 21. October 2011 1.15 Release date: 21. October 2011
- A default and custom CSS file can now be used - A default and custom CSS file can now be used
......
...@@ -141,9 +141,13 @@ pre { ...@@ -141,9 +141,13 @@ pre {
/* dropdown arrow control */ /* dropdown arrow control */
.idd_icon { .idd_icon {
border-color: #C0C0C0; border-width: 0;
border-style: solid solid solid none; }
border-width: 0;
.idd_icon:hover {
box-shadow: 1px 1px 8px #999999;
-webkit-box-shadow: 1px 1px 8px #00247D;
-moz-box-shadow: 1px 1px 8px #00247D;
} }
/* Dropdown list */ /* Dropdown list */
...@@ -178,7 +182,7 @@ div.idd_list { ...@@ -178,7 +182,7 @@ div.idd_list {
/* Dropdown list items nested under group headers */ /* Dropdown list items nested under group headers */
.idd_listItem_Nested { .idd_listItem_Nested {
padding-left: 15px; margin-left: 15px;
} }
/* mouseover on all list items except group headers */ /* mouseover on all list items except group headers */
......

/* textbox part of the dropdown list */
.idd_textbox {
border-style: solid;
border-color: #333333;
vertical-align: middle;
}
/* dropdown arrow control */
.idd_icon {
border-color: #C0C0C0;
border-style: solid solid solid none;
border-width: 0;
}
/* Dropdown list */
div.idd_list {
border: thin solid #C0C0C0;
max-height: 300px;
background-color: #FFFFFF;
padding-left: 5px;
padding-top: 0px;
padding-bottom: 0px;
z-index: 900;
}
/* Option Group headers */
.idd_listItemGroupHeader
{
font-family:Verdana, sans-serif;
font-size: 12px;
padding-bottom: 2px;
font-weight: bold;
text-align: left
}
/* Dropdown list items except group headers */
.idd_listItem {
font-family:Verdana, sans-serif;
font-size: 12px;
height: 1em;
margin: 0px;
padding-bottom: 2px;
text-align:left;
}
/* Dropdown list items nested under group headers */
.idd_listItem_Nested {
padding-left: 15px;
}
/* mouseover on all list items except group headers */
.idd_listItem_Hover
{
color: #FFFFFF;
background-color: #00247D;
}
/* List items that are disabled */
.idd_listItem_Disabled {
color: #C0C0C0;
cursor: default;
}
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<meta name="description" content="Choose your home organization to authenticate"> <meta name="description" content="Choose your home organization to authenticate">
<script type="text/javascript" src="<?php echo $javascriptURL ?>/jquery.js"></script> <script type="text/javascript" src="<?php echo $javascriptURL ?>/jquery.js"></script>
<script type="text/javascript" src="<?php echo $javascriptURL ?>/improvedDropDown.js"></script> <script type="text/javascript" src="<?php echo $javascriptURL ?>/improvedDropDown.js"></script>
<link rel="StyleSheet" href="<?php echo $cssURL ?>/improvedDropdown.css" type="text/css">
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
<!-- <!--
......
...@@ -472,8 +472,8 @@ function composeOptionTitle($IdPValues){ ...@@ -472,8 +472,8 @@ function composeOptionTitle($IdPValues){
foreach($IdPValues as $key => $value){ foreach($IdPValues as $key => $value){
if (is_array($value) && isset($value['Name'])){ if (is_array($value) && isset($value['Name'])){
$title .= ' '.$value['Name']; $title .= ' '.$value['Name'];
} elseif ($key != 'SSO') { } elseif ($key == 'Locations' && is_array($value)) {
$title .= ' '.$value; $title .= ' '.implode(' ', $value);
} }
} }
......
images/drop_icon.png

326 Bytes | W: | H:

images/drop_icon.png

2.63 KB | W: | H:

images/drop_icon.png
images/drop_icon.png
images/drop_icon.png
images/drop_icon.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -133,7 +133,7 @@ function getTextElement(sourceElement, imgElement) { ...@@ -133,7 +133,7 @@ function getTextElement(sourceElement, imgElement) {
.css('height', sourceElement.outerHeight() + 'px') .css('height', sourceElement.outerHeight() + 'px')
.css('font-family', sourceElement.css('font-family')) .css('font-family', sourceElement.css('font-family'))
.css('font-size', sourceElement.css('font-size')) .css('font-size', sourceElement.css('font-size'))
.css('border-width', '1px') .css('border-width', '1px')
.attr('autocomplete', 'off') .attr('autocomplete', 'off')
.attr('padding','0') .attr('padding','0')
.width(controlWidth); .width(controlWidth);
...@@ -194,6 +194,7 @@ function getTextElement(sourceElement, imgElement) { ...@@ -194,6 +194,7 @@ function getTextElement(sourceElement, imgElement) {
} }
}); });
// Clear text area on click
newTextElement.click(function (obj) { newTextElement.click(function (obj) {
obj.target.value = ""; obj.target.value = "";
}); });
...@@ -508,7 +509,9 @@ function positionList(listControl) { ...@@ -508,7 +509,9 @@ function positionList(listControl) {
var childItems = listControl.children('.idd_listItem:visible,.idd_listItemGroupHeader:visible'); var childItems = listControl.children('.idd_listItem:visible,.idd_listItemGroupHeader:visible');
var elementHeightPx = getElementsTotalHeightPx(childItems) + 5; var elementHeightPx = getElementsTotalHeightPx(childItems) + 5;
var maxHeightPx = $(window).height() + $(document).scrollTop() - listControl.position().top - 20;
// Use absolute position of list to calculate list height
var maxHeightPx = $(window).height() + $(document).scrollTop() - listControl.offset().top - 20;
var minListHeigtPx = 12; var minListHeigtPx = 12;
var listhHeight = Math.min(elementHeightPx, maxHeightPx) var listhHeight = Math.min(elementHeightPx, maxHeightPx)
listhHeight = Math.max(listhHeight, minListHeigtPx); listhHeight = Math.max(listhHeight, minListHeigtPx);
...@@ -523,7 +526,9 @@ function positionList(listControl) { ...@@ -523,7 +526,9 @@ function positionList(listControl) {
listWidthPx = Math.min(maxListWidthPx, listWidthPx); listWidthPx = Math.min(maxListWidthPx, listWidthPx);
childItems.css('width', listWidthPx + 'px'); childItems.css('width', listWidthPx + 'px');
listControl.css('width', listWidthPx + 'px');
// Add some margin for compensating scrollbar
listControl.css('width', (listWidthPx + 15) + 'px');
} catch (err) { /*eat any sizing errors */ } } catch (err) { /*eat any sizing errors */ }
} }
...@@ -573,8 +578,14 @@ function updateListFilter(textControl) { ...@@ -573,8 +578,14 @@ function updateListFilter(textControl) {
} }
function doesListItemMach(listItem, compareText) { function doesListItemMach(listItem, compareText) {
// Ensure the is not returned
if (listItem.attr('savedValue') == '-'){
return false;
}
// Compares a listItem (jQuery object representing item in dropdown list) to compareText // Compares a listItem (jQuery object representing item in dropdown list) to compareText
return (!listItem.hasClass('idd_listItem_Disabled')) && (stringContainsCaseInsensitive(listItem.text(), compareText) || stringContainsCaseInsensitive(listItem.attr('savedValue'), compareText) || stringContainsCaseInsensitive(listItem.attr('savedTitle'), compareText)) return (!listItem.hasClass('idd_listItem_Disabled')) && (stringContainsCaseInsensitive(listItem.text(), compareText) || stringContainsCaseInsensitive(listItem.attr('savedTitle'), compareText))
} }
function getIsDirty(textControl) { function getIsDirty(textControl) {
......
...@@ -96,7 +96,8 @@ function printDropDownList($IDProviders, $selectedIDP = ''){ ...@@ -96,7 +96,8 @@ function printDropDownList($IDProviders, $selectedIDP = ''){
} }
// Add additional information as title to the entry // Add additional information as title to the entry
$title = composeOptionTitle($values); $title = getDomainNameFromURI($key);
$title .= composeOptionTitle($values);
// Figure out if entry is valid or a category // Figure out if entry is valid or a category
if (!isset($values['SSO'])){ if (!isset($values['SSO'])){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment