From 649ac85dec64bfa59fc422519b15fef2dc756deb Mon Sep 17 00:00:00 2001 From: David Monllao Date: Mon, 20 Aug 2012 17:24:34 +0800 Subject: [PATCH] MDL-31496 mod_data Replacing inline styles for CSS classes in templates and browse view --- mod/data/field/latlong/field.class.php | 9 +++++---- mod/data/styles.css | 7 ++++++- mod/data/templates.php | 14 +++++++------- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/mod/data/field/latlong/field.class.php b/mod/data/field/latlong/field.class.php index a6f688961fb..e94169996bc 100644 --- a/mod/data/field/latlong/field.class.php +++ b/mod/data/field/latlong/field.class.php @@ -130,7 +130,6 @@ class data_field_latlong extends data_field_base { } else { $compasslong = sprintf('%01.4f', $long) . '°E'; } - $str = '
'; // Now let's create the jump-to-services link $servicesshown = explode(',', $this->field->param1); @@ -148,10 +147,11 @@ class data_field_latlong extends data_field_base { ); if(sizeof($servicesshown)==1 && $servicesshown[0]) { - $str .= " linkoutservices[$servicesshown[0]]) ."' title='$servicesshown[0]'>$compasslat, $compasslong"; } elseif (sizeof($servicesshown)>1) { + $str = ''; $str .= "$compasslat, $compasslong\n"; $str .= ""; $str .= ""; + $str .= '
'; } else { - $str.= "$compasslat, $compasslong"; + $str = "$compasslat, $compasslong"; } - $str.= ''; + return $str; } return false; diff --git a/mod/data/styles.css b/mod/data/styles.css index ba002fd8703..600c79d4d8b 100644 --- a/mod/data/styles.css +++ b/mod/data/styles.css @@ -13,7 +13,8 @@ #page-mod-data-view div.search_none { display: none; } -#page-mod-data-view div.search_inline { +#page-mod-data-view div.search_inline, +#page-mod-data-view form#latlongfieldbrowse { display: inline; } #page-mod-data-view div#data_adv_form { @@ -57,6 +58,10 @@ .mod-data-default-template .template-token {text-align:left;} .mod-data-default-template .controls {text-align:center;} .mod-data-default-template searchcontrols {text-align:right;} +#page-mod-data-templates td.save_template, +#page-mod-data-templates .template_heading { + text-align:center; +} .dir-rtl .mod-data-default-template .template-field {text-align:left;} .dir-rtl .mod-data-default-template .template-token {text-align:right;} diff --git a/mod/data/templates.php b/mod/data/templates.php index 4751732f8ec..c551e03a10c 100644 --- a/mod/data/templates.php +++ b/mod/data/templates.php @@ -141,7 +141,7 @@ if (($mytemplate = data_submitted()) && confirm_sesskey()) { } } } else { - echo '
'.get_string('header'.$mode,'data').'
'; + echo '
'.get_string('header'.$mode,'data').'
'; } /// If everything is empty then generate some defaults @@ -198,7 +198,7 @@ if ($mode == 'listtemplate'){ echo ''; echo ' '; echo ''; - echo '
'; + echo '
'; $field = 'listtemplateheader'; $editor->use_editor($field, $options); @@ -290,9 +290,9 @@ echo ''; echo ''; if ($mode == 'listtemplate'){ - echo '
'; + echo '
'; } else { - echo '
'; + echo '
'; } $field = 'template'; @@ -305,7 +305,7 @@ if ($mode == 'listtemplate'){ echo ''; echo ' '; echo ''; - echo '
'; + echo '
'; $field = 'listtemplatefooter'; $editor->use_editor($field, $options); @@ -316,7 +316,7 @@ if ($mode == 'listtemplate'){ echo ''; echo ' '; echo ''; - echo '
'; + echo '
'; $field = 'rsstitletemplate'; $editor->use_editor($field, $options); @@ -325,7 +325,7 @@ if ($mode == 'listtemplate'){ echo ''; } -echo ''; +echo ''; echo ' '; echo ''; -- 2.43.0