Skip to content

Commit 85aad77

Browse files
committed
MOBILE-1966 glossary: Solve toggles disabled options
1 parent dfac906 commit 85aad77

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

www/addons/mod/glossary/controllers/edit.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ angular.module('mm.addons.mod_glossary')
4040
$scope.title = module.name;
4141
$scope.component = mmaModGlossaryComponent;
4242
$scope.componentId = module.id;
43-
$scope.autolinking = glossary.usedynalink;
43+
$scope.autolinking = !!glossary.usedynalink;
4444
$scope.options = {
4545
categories: null,
4646
aliases: "",
47-
usedynalink: glossary.usedynalink,
47+
usedynalink: false,
4848
casesensitive: false,
4949
fullmatch: false
5050
};
@@ -62,9 +62,11 @@ angular.module('mm.addons.mod_glossary')
6262
if (entry.options) {
6363
$scope.options.categories = entry.options.categories || null;
6464
$scope.options.aliases = entry.options.aliases || "";
65-
$scope.options.usedynalink = !!entry.options.usedynalink || glossary.usedynalink;
66-
$scope.options.casesensitive = !!entry.options.casesensitive;
67-
$scope.options.fullmatch = !!entry.options.fullmatch;
65+
$scope.options.usedynalink = !!entry.options.usedynalink;
66+
if ($scope.options.usedynalink) {
67+
$scope.options.casesensitive = !!entry.options.casesensitive;
68+
$scope.options.fullmatch = !!entry.options.fullmatch;
69+
}
6870
}
6971

7072
// Treat offline attachments if any.

www/core/scss/styles.scss

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ p.item-text-wrap {
263263

264264
// Defines a "disabled" item.
265265
.item.item-disabled,
266+
.item-toggle[disabled],
266267
.platform-android .item.item-disabled {
267268
color: $item-disabled-color;
268269
h2 {
@@ -1376,13 +1377,19 @@ mm-format-text[max-height], *[mm-format-text][max-height] {
13761377

13771378
mm-format-text[max-height], *[mm-format-text][max-height] {
13781379
// This is to allow clicking on activated areas and have background the same color.
1379-
&.mm-text-formatted.mm-shortened:before {
1380-
background: -moz-linear-gradient(top, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1381-
background: -webkit-gradient(left top, left bottom, color-stop(calc(100% - 50px), rgba($item-default-active-bg, 0)), color-stop(calc(100% - 15px), $item-default-active-bg));
1382-
background: -webkit-linear-gradient(top, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1383-
background: -o-linear-gradient(top, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1384-
background: -ms-linear-gradient(top, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1385-
background: linear-gradient(to bottom, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1380+
&.mm-text-formatted.mm-shortened {
1381+
.mm-show-more {
1382+
background-color: $item-default-active-bg;
1383+
}
1384+
1385+
&:before {
1386+
background: -moz-linear-gradient(top, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1387+
background: -webkit-gradient(left top, left bottom, color-stop(calc(100% - 50px), rgba($item-default-active-bg, 0)), color-stop(calc(100% - 15px), $item-default-active-bg));
1388+
background: -webkit-linear-gradient(top, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1389+
background: -o-linear-gradient(top, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1390+
background: -ms-linear-gradient(top, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1391+
background: linear-gradient(to bottom, rgba($item-default-active-bg, 0) calc(100% - 50px), $item-default-active-bg calc(100% - 15px));
1392+
}
13861393
}
13871394
}
13881395
}

0 commit comments

Comments
 (0)