MDL-31496 mod_data Replacing inline styles for CSS classes in textarea elements
This commit is contained in:
@@ -9,6 +9,6 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="c0" valign="top"><label for="param1"><?php echo get_string('fieldoptions', 'data'); ?></label></td>
|
||||
<td class="c1"><textarea style="width:300px; height:150px;" name="param1" id="param1" cols="80" rows="10"><?php if($this->field->param1) {p($this->field->param1);} ?></textarea></td>
|
||||
<td class="c1"><textarea class="optionstextarea" name="param1" id="param1" cols="80" rows="10"><?php if($this->field->param1) {p($this->field->param1);} ?></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="c0" valign="top"><label for="param1"><?php echo get_string('fieldoptions', 'data'); ?></label></td>
|
||||
<td class="c1"><textarea style="width:300px; height:150px;" name="param1" id="param1" cols="80" rows="10"><?php if($this->field->param1) {p($this->field->param1);} ?></textarea></td>
|
||||
<td class="c1"><textarea class="optionstextarea" name="param1" id="param1" cols="80" rows="10"><?php if($this->field->param1) {p($this->field->param1);} ?></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="c0" valign="top"><label for="param1"><?php echo get_string('fieldoptions', 'data'); ?></label></td>
|
||||
<td class="c1"><textarea style="width:300px; height:150px;" name="param1" id="param1" cols="80" rows="10"><?php if($this->field->param1) {p($this->field->param1);} ?></textarea></td>
|
||||
<td class="c1"><textarea class="optionstextarea" name="param1" id="param1" cols="80" rows="10"><?php if($this->field->param1) {p($this->field->param1);} ?></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -152,13 +152,13 @@ class data_field_picture extends data_field_base {
|
||||
if ($template == 'listtemplate') {
|
||||
$src = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/mod_data/content/'.$content->id.'/'.'thumb_'.$content->content);
|
||||
// no need to add width/height, because the thumb is resized properly
|
||||
$str = '<a href="view.php?d='.$this->field->dataid.'&rid='.$recordid.'"><img src="'.$src.'" alt="'.s($alt).'" title="'.s($title).'" style="border:0px" /></a>';
|
||||
$str = '<a href="view.php?d='.$this->field->dataid.'&rid='.$recordid.'"><img src="'.$src.'" alt="'.s($alt).'" title="'.s($title).'" class="list_picture"/></a>';
|
||||
|
||||
} else {
|
||||
$src = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/mod_data/content/'.$content->id.'/'.$content->content);
|
||||
$width = $this->field->param1 ? ' width="'.s($this->field->param1).'" ':' ';
|
||||
$height = $this->field->param2 ? ' height="'.s($this->field->param2).'" ':' ';
|
||||
$str = '<a href="'.$src.'"><img '.$width.$height.' src="'.$src.'" alt="'.s($alt).'" title="'.s($title).'" style="border:0px" /></a>';
|
||||
$str = '<a href="'.$src.'"><img '.$width.$height.' src="'.$src.'" alt="'.s($alt).'" title="'.s($title).'" class="list_picture"/></a>';
|
||||
}
|
||||
|
||||
return $str;
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="c0" valign="top"><label for="param1"><?php echo get_string('fieldoptions', 'data'); ?></label></td>
|
||||
<td class="c1"><textarea style="width:300px; height:150px;" name="param1" id="param1" cols="80" rows="10"><?php if($this->field->param1) {p($this->field->param1);} ?></textarea></td>
|
||||
<td class="c1"><textarea class="optionstextarea" name="param1" id="param1" cols="80" rows="10"><?php if($this->field->param1) {p($this->field->param1);} ?></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+1
-1
@@ -244,7 +244,7 @@ class data_field_base { // Base class for Database Field Types (see field/*/
|
||||
|
||||
$str = '<div title="'.s($this->field->description).'">';
|
||||
$str .= '<label class="accesshide" for="field_'.$this->field->id.'">'.$this->field->description.'</label>';
|
||||
$str .= '<input style="width:300px;" type="text" name="field_'.$this->field->id.'" id="field_'.$this->field->id.'" value="'.s($content).'" />';
|
||||
$str .= '<input class="basefieldinput" type="text" name="field_'.$this->field->id.'" id="field_'.$this->field->id.'" value="'.s($content).'" />';
|
||||
$str .= '</div>';
|
||||
|
||||
return $str;
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
.path-mod-data-field .c0,
|
||||
#page-mod-data-view #sortsearch .c0 {text-align: right;}
|
||||
#page-mod-data-view .approve img.icon {width:34px;height:34px;}
|
||||
#page-mod-data-view img.list_picture {
|
||||
border:0px;
|
||||
}
|
||||
|
||||
#page-mod-data-edit .basefieldinput {
|
||||
width:300px;
|
||||
}
|
||||
|
||||
/** Styles for preset.php **/
|
||||
#page-mod-data-preset .presetmapping table {text-align: left;margin-left: auto;margin-right: auto;}
|
||||
@@ -20,6 +27,10 @@
|
||||
.path-mod-data-field .sortdefault select {margin-left: 1em;}
|
||||
.path-mod-data-field .fieldname,
|
||||
.path-mod-data-field .fielddescription {width:300px;}
|
||||
.path-mod-data-field textarea.optionstextarea {
|
||||
width:300px;
|
||||
height:150px;
|
||||
}
|
||||
|
||||
/** UI Usability Hacks **/
|
||||
#page-mod-data-export #notice span {padding:0 10px;}
|
||||
|
||||
Reference in New Issue
Block a user