Permalink
Browse files

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

  • Loading branch information...
danpoltawski committed Nov 7, 2013
2 parents 48fe93f + 11f8ef1 commit 0967c74a3d82d5921f766a333a2504aff1c778ee
@@ -23,6 +23,7 @@ Feature: Duplicate activities
| Description | Test database description |
And I open "Test database name" actions menu
When I click on "Duplicate" "link" in the "Test database name" activity
And I open "Test database name" actions menu
And I click on "Edit settings" "link" in the "Test database name" activity
And I fill the moodle form with:
| Name | Original database name |
View
@@ -1995,7 +1995,7 @@ function course_get_cm_edit_actions(cm_info $mod, $indent = -1, $sr = null) {
new moodle_url($baseurl, array('id' => $mod->id, 'indent' => '1')),
new pix_icon($rightarrow, $str->moveright, 'moodle', array('class' => 'iconsmall', 'title' => '')),
$str->moveright,
array('class' => 'editing_moveright ' . $enabledclass, 'data-action' => 'moveright')
array('class' => 'editing_moveright ' . $enabledclass, 'data-action' => 'moveright', 'data-keepopen' => true)
);
if ($indent <= $indentlimits->min) {
@@ -2007,7 +2007,7 @@ function course_get_cm_edit_actions(cm_info $mod, $indent = -1, $sr = null) {
new moodle_url($baseurl, array('id' => $mod->id, 'indent' => '-1')),
new pix_icon($leftarrow, $str->moveleft, 'moodle', array('class' => 'iconsmall', 'title' => '')),
$str->moveleft,
array('class' => 'editing_moveleft ' . $enabledclass, 'data-action' => 'moveleft')
array('class' => 'editing_moveleft ' . $enabledclass, 'data-action' => 'moveleft', 'data-keepopen' => true)
);
}
@@ -27,8 +27,10 @@ Feature: Toggle activities visibility from the course page
When I open "Test forum name" actions menu
And I click on "Hide" "link" in the "Test forum name" activity
Then "Test forum name" activity should be hidden
And I open "Test forum name" actions menu
And I click on "Show" "link" in the "Test forum name" activity
And "Test forum name" activity should be visible
And I open "Test forum name" actions menu
And I click on "Hide" "link" in the "Test forum name" activity
And "Test forum name" activity should be hidden
And I reload the page
@@ -16,7 +16,8 @@ var BODY = Y.one(Y.config.doc.body),
MENUCONTENT : '.menu[data-rel=menu-content]',
MENUCONTENTCHILD: 'li a',
MENUCHILD: '.menu li a',
TOGGLE : '.toggle-display'
TOGGLE : '.toggle-display',
KEEPOPEN: '[data-keepopen="1"]'
},
ACTIONMENU,
ALIGN = {
@@ -159,6 +160,14 @@ ACTIONMENU.prototype = {
// Check tabbing.
this.events.push(menu.delegate('key', this.checkFocus, 'down:9', SELECTOR.MENUCHILD, this));
// Close the menu after a button was pushed.
this.events.push(menu.delegate('click', function(e) {
if (e.currentTarget.test(SELECTOR.KEEPOPEN)) {
return;
}
this.hideMenu();
}, SELECTOR.MENUCONTENTCHILD, this));
},
/**

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -16,7 +16,8 @@ var BODY = Y.one(Y.config.doc.body),
MENUCONTENT : '.menu[data-rel=menu-content]',
MENUCONTENTCHILD: 'li a',
MENUCHILD: '.menu li a',
TOGGLE : '.toggle-display'
TOGGLE : '.toggle-display',
KEEPOPEN: '[data-keepopen="1"]'
},
ACTIONMENU,
ALIGN = {
@@ -157,6 +158,14 @@ ACTIONMENU.prototype = {
// Check tabbing.
this.events.push(menu.delegate('key', this.checkFocus, 'down:9', SELECTOR.MENUCHILD, this));
// Close the menu after a button was pushed.
this.events.push(menu.delegate('click', function(e) {
if (e.currentTarget.test(SELECTOR.KEEPOPEN)) {
return;
}
this.hideMenu();
}, SELECTOR.MENUCONTENTCHILD, this));
},
/**
@@ -14,7 +14,8 @@ var BODY = Y.one(Y.config.doc.body),
MENUCONTENT : '.menu[data-rel=menu-content]',
MENUCONTENTCHILD: 'li a',
MENUCHILD: '.menu li a',
TOGGLE : '.toggle-display'
TOGGLE : '.toggle-display',
KEEPOPEN: '[data-keepopen="1"]'
},
ACTIONMENU,
ALIGN = {
@@ -157,6 +158,14 @@ ACTIONMENU.prototype = {
// Check tabbing.
this.events.push(menu.delegate('key', this.checkFocus, 'down:9', SELECTOR.MENUCHILD, this));
// Close the menu after a button was pushed.
this.events.push(menu.delegate('click', function(e) {
if (e.currentTarget.test(SELECTOR.KEEPOPEN)) {
return;
}
this.hideMenu();
}, SELECTOR.MENUCONTENTCHILD, this));
},
/**

0 comments on commit 0967c74

Please sign in to comment.