From 1402214831d2d4d296fc7d58c5c26678211745e9 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 19 Mar 2014 17:24:13 -0400 Subject: [PATCH] Cleanup ui.dialog params and css --- css/civicrm.css | 4 ++-- js/Common.js | 5 +++-- templates/CRM/Case/Form/ActivityChangeStatusJs.tpl | 2 +- templates/CRM/Case/Form/CaseView.tpl | 12 ------------ templates/CRM/Contact/Import/Form/Preview.tpl | 2 -- templates/CRM/Contact/Page/Inline/Email.tpl | 11 +---------- templates/CRM/Core/I18n/Dialog.tpl | 2 -- templates/CRM/Financial/Form/Search.tpl | 6 ------ templates/CRM/Financial/Page/BatchTransaction.tpl | 5 ----- templates/CRM/Report/Form/Case/Detail.tpl | 5 ----- templates/CRM/common/dedupe.tpl | 5 ----- 11 files changed, 7 insertions(+), 52 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index dc02ed50ae..aa65716293 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -3946,11 +3946,11 @@ div.m ul#civicrm-menu, background-image: url("../packages/jquery/css/images/pbar-ani.gif"); } -div.ui-dialog { +.crm-container.ui-dialog { box-shadow: 0 0 10px rgba(0, 0, 0, 0.6); } -.ui-dialog-titlebar.ui-widget-header { +.crm-container .ui-dialog-titlebar.ui-widget-header { background: url("../i/crm-button-bg.gif") repeat-x scroll left center #70716B; color: white; } diff --git a/js/Common.js b/js/Common.js index f16aba4844..dce5b31b2b 100644 --- a/js/Common.js +++ b/js/Common.js @@ -425,6 +425,7 @@ CRM.validate = CRM.validate || { }) // Modal dialogs should disable scrollbars .on('dialogopen', function(e) { + $(e.target).parent().addClass('crm-container'); if ($(e.target).dialog('option', 'modal')) { $(e.target).addClass('modal-dialog'); $('body').css({overflow: 'hidden'}); @@ -670,7 +671,7 @@ CRM.validate = CRM.validate || { } }; }); - dialog = $('
') + dialog = $('
') .html(options.message) .dialog(settings) .trigger('crmLoad'); @@ -789,7 +790,7 @@ CRM.validate = CRM.validate || { // bind the event for image popup $('body') .on('click', 'a.crm-image-popup', function() { - var o = $('
'); + var o = $('
'); CRM.confirm('', { diff --git a/templates/CRM/Case/Form/ActivityChangeStatusJs.tpl b/templates/CRM/Case/Form/ActivityChangeStatusJs.tpl index f6bbf8fc46..eca6d42e62 100644 --- a/templates/CRM/Case/Form/ActivityChangeStatusJs.tpl +++ b/templates/CRM/Case/Form/ActivityChangeStatusJs.tpl @@ -36,7 +36,7 @@ current_status_id = $(this).attr('current_status'), caseId = $(this).attr('case_id'), data = 'snippet=1&reset=1', - $el = $('
'); + $el = $('
'); $el.block({theme:true}); $el.load(CRM.url('civicrm/case/changeactivitystatus'), data, function() { diff --git a/templates/CRM/Case/Form/CaseView.tpl b/templates/CRM/Case/Form/CaseView.tpl index 2b51c4b818..6b90eaaff0 100644 --- a/templates/CRM/Case/Form/CaseView.tpl +++ b/templates/CRM/Case/Form/CaseView.tpl @@ -330,13 +330,7 @@ cj("#dialog").dialog({ title: "Assign Case Role", modal: true, - bgiframe: true, close: function(event, ui) { cj("#rel_contact").unautocomplete( ); }, - overlay: { - opacity: 0.5, - background: "black" - }, - open:function() { /* set defaults if editing */ cj("#rel_contact").val(""); @@ -610,13 +604,7 @@ function addRole() { cj("#addRoleDialog").dialog({ title: "Add Role", modal: true, - bgiframe: true, close: function(event, ui) { cj("#role_contact").unautocomplete( ); }, - overlay: { - opacity: 0.5, - background: "black" - }, - open:function() { /* set defaults if editing */ cj("#role_contact").val( "" ); diff --git a/templates/CRM/Contact/Import/Form/Preview.tpl b/templates/CRM/Contact/Import/Form/Preview.tpl index e58c7c9fa7..67ce8b4296 100644 --- a/templates/CRM/Contact/Import/Form/Preview.tpl +++ b/templates/CRM/Contact/Import/Form/Preview.tpl @@ -56,10 +56,8 @@ function verify( ) { width : 350, height : 160, resizable : false, - bgiframe : true, draggable : true, closeOnEscape : false, - overlay : { opacity: 0.5, background: "black" }, open : function ( ) { cj("#id-processing").dialog().parents(".ui-dialog").find(".ui-dialog-titlebar").remove(); } diff --git a/templates/CRM/Contact/Page/Inline/Email.tpl b/templates/CRM/Contact/Page/Inline/Email.tpl index c18f2f46a8..67c109d9ec 100644 --- a/templates/CRM/Contact/Page/Inline/Email.tpl +++ b/templates/CRM/Contact/Page/Inline/Email.tpl @@ -73,21 +73,12 @@ function showHideSignature( blockId ) { cj("#Email_Block_" + blockId + "_signature").dialog({ title: "Signature", modal: true, - bgiframe: true, width: 900, height: 500, - overlay: { - opacity: 0.5, - background: "black" - }, - beforeclose: function(event, ui) { cj(this).dialog("destroy"); }, - open:function() { - }, - - buttons: { + buttons: { "Done": function() { cj(this).dialog("destroy"); } diff --git a/templates/CRM/Core/I18n/Dialog.tpl b/templates/CRM/Core/I18n/Dialog.tpl index 0f70cd9a43..291002f66c 100644 --- a/templates/CRM/Core/I18n/Dialog.tpl +++ b/templates/CRM/Core/I18n/Dialog.tpl @@ -37,8 +37,6 @@ function loadDialog( url, fieldName ) { width : 290, height : 290, resizable : true, - bgiframe : true, - overlay : { opacity: 0.5, background: "black" }, beforeclose : function(event, ui) { cj(this).dialog("destroy"); } diff --git a/templates/CRM/Financial/Form/Search.tpl b/templates/CRM/Financial/Form/Search.tpl index 72028b6987..3975986860 100644 --- a/templates/CRM/Financial/Form/Search.tpl +++ b/templates/CRM/Financial/Form/Search.tpl @@ -164,12 +164,6 @@ cj(function($) { $("#enableDisableStatusMsg").dialog({ title: {/literal}'{ts escape="js"}Confirm Changes{/ts}'{literal}, modal: true, - bgiframe: true, - position: "center", - overlay: { - opacity: 0.5, - background: "black" - }, open:function() { switch (op) {{/literal} case 'reopen': diff --git a/templates/CRM/Financial/Page/BatchTransaction.tpl b/templates/CRM/Financial/Page/BatchTransaction.tpl index 091d29fa90..20aef58a11 100644 --- a/templates/CRM/Financial/Page/BatchTransaction.tpl +++ b/templates/CRM/Financial/Page/BatchTransaction.tpl @@ -101,11 +101,6 @@ function assignRemove(recordID, op) { cj("#enableDisableStatusMsg").dialog({ title: {/literal}'{ts escape="js"}Close Batch{/ts}'{literal}, modal: true, - bgiframe: true, - overlay: { - opacity: 0.5, - background: "black" - }, open:function() { if (op == 'close') { var msg = {/literal}'{ts escape="js"}Are you sure you want to close this batch?{/ts}'{literal}; diff --git a/templates/CRM/Report/Form/Case/Detail.tpl b/templates/CRM/Report/Form/Case/Detail.tpl index dcf9bf3ecc..7db6b69fc9 100644 --- a/templates/CRM/Report/Form/Case/Detail.tpl +++ b/templates/CRM/Report/Form/Case/Detail.tpl @@ -293,13 +293,8 @@ function viewCase( caseId ,contactId ) { cj("#casedetails").dialog({ title: "Case Details", modal: true, - bgiframe: true, width : 700, height: 400, - overlay: { - opacity: 0.5, - background: "black" - }, open:function() { var dataUrl = {/literal}"{crmURL p='civicrm/case/ajax/details' h=0 q="snippet=4" }"{literal}; dataUrl = dataUrl + '&caseId=' +caseId + '&contactId=' +contactId ; diff --git a/templates/CRM/common/dedupe.tpl b/templates/CRM/common/dedupe.tpl index 93b10d11e9..1b9b2a45d0 100644 --- a/templates/CRM/common/dedupe.tpl +++ b/templates/CRM/common/dedupe.tpl @@ -22,11 +22,6 @@ function processDupes( cid, oid, oper, context, reloadURL ) { cj("#processDupes").dialog({ title: title, modal: true, - bgiframe: true, - overlay: { - opacity: 0.5, - background: "black" - }, open:function() { cj( '#processDupes' ).show( ).html( msg ); -- 2.25.1