From 8e3272a16e9f62e27d5910041bf47447e060469e Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 15 Aug 2013 16:13:35 -0700 Subject: [PATCH] Get CRM.help working on non-civicrm pages --- css/civicrm.css | 29 ++++++++++++++--------------- js/Common.js | 4 ++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index ea9f695338..0a00e39e13 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2831,7 +2831,6 @@ div.crm-accordion-header a.helpicon { div a.helpicon:hover, div a.helpicon:focus { - background-image: url(../i/icons/jquery-ui-91CE00.png); opacity: 1; } @@ -3683,14 +3682,14 @@ div.m ul#civicrm-menu, } /* Notifications */ -#crm-container .ui-notify { +#crm-notification-container { width: 350px; position: fixed; top: 45px; right: 15px; z-index: 999999; } -#crm-container div.ui-notify-message { +.crm-container div.ui-notify-message { padding: 10px; margin-bottom: 15px; color: #fff; @@ -3700,14 +3699,14 @@ div.m ul#civicrm-menu, max-height: 600px; overflow: auto; } -#crm-container div.ui-notify-message h1 { +.crm-container div.ui-notify-message h1 { font-size: 14px; margin: 0; padding: 4px; font-weight: bold; color: #fff; } -#crm-container div.ui-notify-message p { +.crm-container div.ui-notify-message p { margin: 3px 0; padding: 0; line-height: 18px; @@ -3734,7 +3733,7 @@ div.m ul#civicrm-menu, .crm-container div.ui-notify-message .ui-notify-close { cursor: pointer; } -#crm-container div.ui-notify-message a.ui-notify-cross { +.crm-container div.ui-notify-message a.ui-notify-cross { margin-top: -4px; float: right; text-decoration: none; @@ -3744,29 +3743,29 @@ div.m ul#civicrm-menu, padding: 2px; color: #FDFDFD; } -#crm-container div.ui-notify-message .ui-notify-cross:hover, -#crm-container div.ui-notify-message .ui-notify-cross:focus { +.crm-container div.ui-notify-message .ui-notify-cross:hover, +.crm-container div.ui-notify-message .ui-notify-cross:focus { color: #ffffab; } -#crm-container div.ui-notify-message table, -#crm-container div.ui-notify-message tbody, -#crm-container div.ui-notify-message tr { +.crm-container div.ui-notify-message table, +.crm-container div.ui-notify-message tbody, +.crm-container div.ui-notify-message tr { border: 0 none; font-size: 11px; } -#crm-container div.ui-notify-message td { +.crm-container div.ui-notify-message td { background: rgba(255,255,255,0.1); border: 1px solid #111; font-size: 11px; } -#crm-container div.ui-notify-message th { +.crm-container div.ui-notify-message th { background: rgba(200,200,200,0.2); border: 1px solid #111; color: #eee; font-size: 11px; } -#crm-container div.ui-notify-message ul, -#crm-container div.ui-notify-message ol { +.crm-container div.ui-notify-message ul, +.crm-container div.ui-notify-message ol { margin: 0.5em 0 1em; padding: 0 0 0 0.5em; } diff --git a/js/Common.js b/js/Common.js index 2ebc8e7e3b..437ecffd8b 100644 --- a/js/Common.js +++ b/js/Common.js @@ -618,7 +618,7 @@ CRM.validate = CRM.validate || { }; var h; - CRM.help = function (title, params) { + CRM.help = function (title, params, url) { h && h.close && h.close(); var options = { expires: 0 @@ -626,7 +626,7 @@ CRM.validate = CRM.validate || { h = CRM.alert('...', title, 'crm-help crm-msg-loading', options); params.class_name = 'CRM_Core_Page_Inline_Help'; params.type = 'page'; - $.ajax(CRM.url('civicrm/ajax/inline'), + $.ajax(url || CRM.url('civicrm/ajax/inline'), { data: params, dataType: 'html', -- 2.25.1