MDL-31496 mod_data Replacing inline styles for CSS classes in templates and browse view
This commit is contained in:
@@ -130,7 +130,6 @@ class data_field_latlong extends data_field_base {
|
||||
} else {
|
||||
$compasslong = sprintf('%01.4f', $long) . '°E';
|
||||
}
|
||||
$str = '<form style="display:inline;">';
|
||||
|
||||
// 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 .= " <a href='"
|
||||
$str = " <a href='"
|
||||
. str_replace(array_keys($urlreplacements), array_values($urlreplacements), $this->linkoutservices[$servicesshown[0]])
|
||||
."' title='$servicesshown[0]'>$compasslat, $compasslong</a>";
|
||||
} elseif (sizeof($servicesshown)>1) {
|
||||
$str = '<form id="latlongfieldbrowse">';
|
||||
$str .= "$compasslat, $compasslong\n";
|
||||
$str .= "<label class='accesshide' for='jumpto'>". get_string('jumpto') ."</label>";
|
||||
$str .= "<select id='jumpto' name='jumpto'>";
|
||||
@@ -164,10 +164,11 @@ class data_field_latlong extends data_field_base {
|
||||
// NB! If you are editing this, make sure you don't break the javascript reference "previousSibling"
|
||||
// which allows the "Go" button to refer to the drop-down selector.
|
||||
$str .= "\n</select><input type='button' value='" . get_string('go') . "' onclick='if(previousSibling.value){self.location=previousSibling.value}'/>";
|
||||
$str .= '</form>';
|
||||
} else {
|
||||
$str.= "$compasslat, $compasslong";
|
||||
$str = "$compasslat, $compasslong";
|
||||
}
|
||||
$str.= '</form>';
|
||||
|
||||
return $str;
|
||||
}
|
||||
return false;
|
||||
|
||||
+6
-1
@@ -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;}
|
||||
|
||||
@@ -141,7 +141,7 @@ if (($mytemplate = data_submitted()) && confirm_sesskey()) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo '<div class="littleintro" style="text-align:center">'.get_string('header'.$mode,'data').'</div>';
|
||||
echo '<div class="template_heading">'.get_string('header'.$mode,'data').'</div>';
|
||||
}
|
||||
|
||||
/// If everything is empty then generate some defaults
|
||||
@@ -198,7 +198,7 @@ if ($mode == 'listtemplate'){
|
||||
echo '<tr>';
|
||||
echo '<td> </td>';
|
||||
echo '<td>';
|
||||
echo '<div style="text-align:center"><label for="edit-listtemplateheader">'.get_string('header','data').'</label></div>';
|
||||
echo '<div class="template_heading"><label for="edit-listtemplateheader">'.get_string('header','data').'</label></div>';
|
||||
|
||||
$field = 'listtemplateheader';
|
||||
$editor->use_editor($field, $options);
|
||||
@@ -290,9 +290,9 @@ echo '</td>';
|
||||
|
||||
echo '<td valign="top">';
|
||||
if ($mode == 'listtemplate'){
|
||||
echo '<div style="text-align:center"><label for="edit-template">'.get_string('multientry','data').'</label></div>';
|
||||
echo '<div class="template_heading"><label for="edit-template">'.get_string('multientry','data').'</label></div>';
|
||||
} else {
|
||||
echo '<div style="text-align:center"><label for="edit-template">'.get_string($mode,'data').'</label></div>';
|
||||
echo '<div class="template_heading"><label for="edit-template">'.get_string($mode,'data').'</label></div>';
|
||||
}
|
||||
|
||||
$field = 'template';
|
||||
@@ -305,7 +305,7 @@ if ($mode == 'listtemplate'){
|
||||
echo '<tr>';
|
||||
echo '<td> </td>';
|
||||
echo '<td>';
|
||||
echo '<div style="text-align:center"><label for="edit-listtemplatefooter">'.get_string('footer','data').'</label></div>';
|
||||
echo '<div class="template_heading"><label for="edit-listtemplatefooter">'.get_string('footer','data').'</label></div>';
|
||||
|
||||
$field = 'listtemplatefooter';
|
||||
$editor->use_editor($field, $options);
|
||||
@@ -316,7 +316,7 @@ if ($mode == 'listtemplate'){
|
||||
echo '<tr>';
|
||||
echo '<td> </td>';
|
||||
echo '<td>';
|
||||
echo '<div style="text-align:center"><label for="edit-rsstitletemplate">'.get_string('rsstitletemplate','data').'</label></div>';
|
||||
echo '<div class="template_heading"><label for="edit-rsstitletemplate">'.get_string('rsstitletemplate','data').'</label></div>';
|
||||
|
||||
$field = 'rsstitletemplate';
|
||||
$editor->use_editor($field, $options);
|
||||
@@ -325,7 +325,7 @@ if ($mode == 'listtemplate'){
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
echo '<tr><td style="text-align:center" colspan="2">';
|
||||
echo '<tr><td class="save_template" colspan="2">';
|
||||
echo '<input type="submit" value="'.get_string('savetemplate','data').'" /> ';
|
||||
|
||||
echo '</td></tr></table>';
|
||||
|
||||
Reference in New Issue
Block a user