Skip to content

Commit

Permalink
MDL-54986 Quiz: Disable add button for quiz with attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
Beedell committed Nov 2, 2016
1 parent a8c64d6 commit e251d9f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Expand Up @@ -152,7 +152,7 @@ ACTIONMENU.prototype = {
if (!menucontent.hasClass('align-'+align)) {
menucontent.addClass('align-'+align);
}
if (menucontent.hasChildNodes()) {
if (menucontent.getDOMNode().childElementCount) {
menu.setAttribute('data-enhanced', '1');
}
},
Expand Down Expand Up @@ -450,7 +450,7 @@ ACTIONMENU.prototype = {
this.constrain(menucontent.set('aria-hidden', false));

this.menuChildren = this.dialogue.all(SELECTOR.MENUCHILD);
if (this.menuChildren) {
if (this.menuChildren.size() > 0) {
this.firstMenuChild = this.menuChildren.item(0);
this.lastMenuChild = this.menuChildren.item(this.menuChildren.size() - 1);

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -151,7 +151,7 @@ ACTIONMENU.prototype = {
if (!menucontent.hasClass('align-'+align)) {
menucontent.addClass('align-'+align);
}
if (menucontent.hasChildNodes()) {
if (menucontent.getDOMNode().childElementCount) {
menu.setAttribute('data-enhanced', '1');
}
},
Expand Down Expand Up @@ -446,7 +446,7 @@ ACTIONMENU.prototype = {
this.constrain(menucontent.set('aria-hidden', false));

this.menuChildren = this.dialogue.all(SELECTOR.MENUCHILD);
if (this.menuChildren) {
if (this.menuChildren.size() > 0) {
this.firstMenuChild = this.menuChildren.item(0);
this.lastMenuChild = this.menuChildren.item(this.menuChildren.size() - 1);

Expand Down
4 changes: 2 additions & 2 deletions lib/yui/src/actionmenu/js/actionmenu.js
Expand Up @@ -150,7 +150,7 @@ ACTIONMENU.prototype = {
if (!menucontent.hasClass('align-'+align)) {
menucontent.addClass('align-'+align);
}
if (menucontent.hasChildNodes()) {
if (menucontent.getDOMNode().childElementCount) {
menu.setAttribute('data-enhanced', '1');
}
},
Expand Down Expand Up @@ -448,7 +448,7 @@ ACTIONMENU.prototype = {
this.constrain(menucontent.set('aria-hidden', false));

this.menuChildren = this.dialogue.all(SELECTOR.MENUCHILD);
if (this.menuChildren) {
if (this.menuChildren.size() > 0) {
this.firstMenuChild = this.menuChildren.item(0);
this.lastMenuChild = this.menuChildren.item(this.menuChildren.size() - 1);

Expand Down

0 comments on commit e251d9f

Please sign in to comment.