The MyMobile theme contains the following code in 'custom.js':
//collapsed topic only stuff
|
$('div#page-course-view-topcollPAGE').live('pagebeforecreate',function(event, ui){
|
$('#page-course-view-topcollPAGE ul.section').attr("data-role", "none");
|
$('.section li img').removeClass("ui-li-icon");
|
$.getScript('../course/format/topcoll/module.js');
|
$('#page-course-view-topcollPAGE tr.cps a').attr("data-role", "button").attr("data-icon", "arrow-r");
|
$('#page-course-view-topcollPAGE #thetopics').attr("data-role", "controlgroup");
|
$('#page-course-view-topcollPAGE td.cps_centre').each(function(index) {
|
var cpsc = $(this).text().replace('<br>','').replace(')','');
|
$(this).prev('td').find('a').append('<span class="ui-li-count ui-btn-up-a ui-btn-corner-all">' + cpsc + '</span>');
|
});
|
});
|
In 'core.css' the following selectors need to be removed:
/*collapsed topic format*/
|
#thetopics {
|
table-layout: inherit !important;
|
width: 100%;
|
display: block !important;
|
}
|
#page-course-view-topcollPAGE .section td.content, col.content {
|
text-align: left;
|
width: 100% !important;
|
overflow: hidden;
|
}
|
#page-course-view-topcollPAGE .section td.content {
|
padding: .5em;
|
}
|
#page-course-view-topcollPAGE td.left.side, #page-course-view-topcollPAGE td.right.side {
|
display: none;
|
}
|
#page-course-view-topcollPAGE tr.cps td a {
|
background: none !important;
|
color: inherit !important;
|
padding: 7px 0 7px 0px !important;
|
}
|
tr.cps td span {
|
font-style: inherit !important;
|
font-size: 1.12em !important;
|
}
|
#page-course-view-topcollPAGE .section.separator, td.cps_centre {
|
display: none;
|
}
|
tr.cps {
|
background-color: inherit !important;
|
color: inherit !important;
|
}
|
.opencps .ui-btn-inner .ui-icon-arrow-r {
|
background-position: -216px 50%;
|
}
|
tr.cps td span.ui-li-count {
|
font-size: .6em !important;
|
right: 12px;
|
}
|
#page-course-view-topcollPAGE .cps .ui-btn-inner {
|
white-space: normal;
|
}
|
It is out of date as Collapsed Topics has moved on and as discussed on MDL-33115, core really should not have code that copes with contributed plugins. I am now in a position to adapt my code both with jQuery and styles to support MyMobile but this code is redundant.
I'm raising this as a separate issue to MDL-33115 because I believe that MDL-33115 is a container for a whole range of issues that are no longer relevant and this small change would get lost within it. A big thank you to Mary Evans for assisting me with it.
- blocks
-
CONTRIB-3655 Provide support for MyMobile theme.
- Closed
- is a QA test written for
-
MDL-38072 Remove Collapsed Topics contributed plugin code (js & css) from MyMobile theme
- Closed
- will help resolve
-
MDL-33115 MyMobile does not integrate well with Collapsed Topics
- Closed