From 3cd90167158f2f6db3615989c8682a710981a5f4 Mon Sep 17 00:00:00 2001 From: cdtank Date: Sat, 8 Jan 2011 00:03:26 +0000 Subject: [PATCH] 1. Fixed the notification bug in temporal graph vis for IE. --- .../entitycomparison/layout-ie.css | 3 +++ .../js/visualization/entitycomparison/util.js | 20 ++++++++++++++++++- .../entityComparisonStandaloneActivator.ftl | 15 ++++++++------ .../freemarker/VisualizationInjector.java | 5 +---- 4 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 productMods/css/visualization/entitycomparison/layout-ie.css diff --git a/productMods/css/visualization/entitycomparison/layout-ie.css b/productMods/css/visualization/entitycomparison/layout-ie.css new file mode 100644 index 00000000..005a9ee2 --- /dev/null +++ b/productMods/css/visualization/entitycomparison/layout-ie.css @@ -0,0 +1,3 @@ +.disabled-checkbox-event-receiver { + background-color: white; +} diff --git a/productMods/js/visualization/entitycomparison/util.js b/productMods/js/visualization/entitycomparison/util.js index 64a5268e..89fe7788 100644 --- a/productMods/js/visualization/entitycomparison/util.js +++ b/productMods/js/visualization/entitycomparison/util.js @@ -904,7 +904,25 @@ function disableUncheckedEntities(){ $(val).prev().show(); }); - //console.log($("input[type=checkbox].if_clicked_on_school:not(:checked)")); + /* + * This indicates the first time this function is called presumably after the 10th checkbox is selected. + * We want to display a warning message only in Internet Explorer because in IE the div that handles + * disabled-checkbox-clicks is colored white & we cant see the actual checkbox. + * + * Note that the usual Error message will still display if the user tries to click on the white box + * (or a disabled checkbox in case of non-IE browsers). + * */ + + if ($("#datatable").data("isEntitySelectionAllowed")) { + if ($.browser.msie) { + createNotification("warning-notification", { title:'Information', + text:'A Maximum of 10 entities can be compared.' },{ + custom: false, + expires: 4000 + }); + } + } + $("#datatable").data("isEntitySelectionAllowed", false); } diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl index e9aab1c6..ecdda81d 100644 --- a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl @@ -65,13 +65,18 @@ <#assign jqueryNotifyStyle = "${urls.base}/css/jquery_plugins/ui.notify.css" /> <#assign entityComparisonStyle = "${urls.base}/css/visualization/entitycomparison/layout.css" /> +<#assign entityComparisonStyleIEHack = "${urls.base}/css/visualization/entitycomparison/layout-ie.css" /> + <#assign vizStyle = "${urls.base}/css/visualization/visualization.css" /> + + + <#-- variables passed from server-side code --> @@ -88,7 +93,7 @@ var subOrganizationTemporalGraphURL = "${subOrganizationTemporalGraphURL}";