mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
navigation MDL-14632 Fixed minor regressions for recent patches
* Search field now takes input again * Javascript event propogration is stopped to prevent refreshing when switch block position
This commit is contained in:
parent
50476da5c3
commit
fff23fcd86
@ -108,8 +108,7 @@ class block_settings_navigation_tree extends block_tree {
|
||||
$searchform->url = new moodle_url("$CFG->wwwroot/$CFG->admin/search.php");
|
||||
$searchform->method = 'get';
|
||||
$searchform->button->text = get_string('search');
|
||||
|
||||
$searchfield = html_field::make_text('query', optional_param('query', '', PARAM_RAW));
|
||||
$searchfield = html_field::make_text('query', optional_param('query', '', PARAM_RAW), '', 50);
|
||||
$searchfield->id = 'query';
|
||||
$searchfield->style .= 'width: 7em;';
|
||||
$searchfield->set_label(get_string('searchinsettings', 'admin'), 'query');
|
||||
|
@ -292,6 +292,9 @@ navigation_tree.prototype.toggle_block_display = function(e) {
|
||||
* @return {bool}
|
||||
*/
|
||||
navigation_tree.prototype.move_to_sidebar_popout = function(e) {
|
||||
|
||||
YAHOO.util.Event.stopEvent(e);
|
||||
|
||||
var element = document.getElementById(this.name).parentNode;
|
||||
if (element == null) {
|
||||
return false;
|
||||
@ -357,6 +360,8 @@ navigation_tree.prototype.move_to_sidebar_popout = function(e) {
|
||||
*/
|
||||
navigation_tree.prototype.move_to_block_position = function(e) {
|
||||
|
||||
YAHOO.util.Event.stopEvent(e);
|
||||
|
||||
if (this.sideblockwidth !== null) {
|
||||
YAHOO.util.Dom.setStyle(sideblocknode, 'width', this.sideblockwidth);
|
||||
this.sideblockwidth = null;
|
||||
@ -609,7 +614,6 @@ navigation_tab_panel.prototype.resize_tab = function () {
|
||||
YAHOO.util.Dom.setStyle(this.tabpanels[this.showntab.tabname].body, 'height', (screenheight-59)+'px');
|
||||
YAHOO.util.Dom.addClass(this.tabpanels[this.showntab.tabname].body, 'oversized_content');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* This function sets everything up for the show even and then calls the panel's
|
||||
@ -648,15 +652,14 @@ navigation_tab_panel.prototype.show_tab = function (e, tabname) {
|
||||
navigation_tab_panel.prototype.hide_tab = function(e, tabname) {
|
||||
if (this.preventhide===true) {
|
||||
this.preventhide = false;
|
||||
return true;
|
||||
} else {
|
||||
this.showntab = null;
|
||||
YAHOO.util.Event.addListener(tabname+'_sidebarpopup', "mouseover", this.show_tab, tabname, this);
|
||||
YAHOO.util.Event.removeListener(window, 'resize', this.resize_tab);
|
||||
YAHOO.util.Event.removeListener(document.body, "click", this.hide_tab);
|
||||
YAHOO.util.Dom.removeClass(tabname+'_title', 'active_tab');
|
||||
this.tabpanels[tabname].hide(e, this.tabpanel);
|
||||
}
|
||||
this.showntab = null;
|
||||
YAHOO.util.Event.addListener(tabname+'_sidebarpopup', "mouseover", this.show_tab, tabname, this);
|
||||
YAHOO.util.Event.removeListener(window, 'resize', this.resize_tab);
|
||||
YAHOO.util.Event.removeListener(document.body, "click", this.hide_tab);
|
||||
YAHOO.util.Dom.removeClass(tabname+'_title', 'active_tab');
|
||||
this.tabpanels[tabname].hide(e, this.tabpanel);
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* This function removes a tab from the navigation tab panel
|
||||
|
Loading…
x
Reference in New Issue
Block a user