mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-43243 JavaScript: Deprecate show_item
This commit is contained in:
parent
f260850efc
commit
0d8907e3d8
@ -109,7 +109,7 @@ class MoodleQuickForm_url extends HTML_QuickForm_text{
|
||||
if (count($options->repositories) > 0) {
|
||||
$straddlink = get_string('choosealink', 'repository');
|
||||
$str .= <<<EOD
|
||||
<button id="filepicker-button-{$client_id}" style="display:none">
|
||||
<button id="filepicker-button-{$client_id}" class="visibleifjs">
|
||||
$straddlink
|
||||
</button>
|
||||
EOD;
|
||||
@ -120,7 +120,6 @@ EOD;
|
||||
|
||||
$module = array('name'=>'form_url', 'fullpath'=>'/lib/form/url.js', 'requires'=>array('core_filepicker'));
|
||||
$PAGE->requires->js_init_call('M.form_url.init', array($options), true, $module);
|
||||
$PAGE->requires->js_function_call('show_item', array('filepicker-button-'.$client_id));
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
@ -1383,12 +1383,14 @@ function close_window(e) {
|
||||
|
||||
/**
|
||||
* Used in a couple of modules to hide navigation areas when using AJAX
|
||||
* @deprecated since Moodle 2.7. This function will be removed in Moodle 2.9.
|
||||
*/
|
||||
|
||||
function show_item(itemid) {
|
||||
var item = document.getElementById(itemid);
|
||||
Y.log('show_item has been deprecated since Moodle 2.7 and will be removed in Moodle 2.9',
|
||||
'warn', 'javascript-static.js');
|
||||
var item = Y.one('#' + itemid);
|
||||
if (item) {
|
||||
item.style.display = "";
|
||||
item.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user