Merge branch 'MDL-43243-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Sam Hemelryk 2013-12-24 11:56:01 +13:00
commit 946e770ede
3 changed files with 23 additions and 12 deletions

View file

@ -63,7 +63,7 @@ class data_field_url extends data_field_base {
$str .= '<label class="accesshide" for="' . $fieldid . '">'. $this->field->name .'</label>';
$str .= '<input type="text" name="field_'.$this->field->id.'_0" id="'.$fieldid.'" value="'.s($url).'" size="60" />';
if (count($options->repositories) > 0) {
$str .= '<button id="filepicker-button-'.$options->client_id.'" style="display:none">'.$straddlink.'</button>';
$str .= '<button id="filepicker-button-'.$options->client_id.'" class="visibleifjs">'.$straddlink.'</button>';
}
}
@ -72,7 +72,6 @@ class data_field_url extends data_field_base {
$module = array('name'=>'data_urlpicker', 'fullpath'=>'/mod/data/data.js', 'requires'=>array('core_filepicker'));
$PAGE->requires->js_init_call('M.data_urlpicker.init', array($options), true, $module);
$PAGE->requires->js_function_call('show_item', array('filepicker-button-'.$options->client_id));
$str .= '</div>';
return $str;