MDL-40874 Retire MyMobile as a standard theme
@@ -1103,7 +1103,7 @@ class core_plugin_manager {
|
||||
'theme' => array(
|
||||
'afterburner', 'anomaly', 'arialist', 'base', 'binarius', 'bootstrapbase',
|
||||
'boxxie', 'brick', 'canvas', 'clean', 'formal_white', 'formfactor',
|
||||
'fusion', 'leatherbound', 'magazine', 'mymobile', 'nimble',
|
||||
'fusion', 'leatherbound', 'magazine', 'nimble',
|
||||
'nonzero', 'overlay', 'serenity', 'sky_high', 'splash',
|
||||
'standard', 'standardold'
|
||||
),
|
||||
|
||||
@@ -2774,5 +2774,38 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2013102500.01);
|
||||
}
|
||||
|
||||
if ($oldversion < 2013110400.00) {
|
||||
|
||||
if (!check_dir_exists($CFG->dirroot . '/theme/mymobile', false)) {
|
||||
// Delete from config_plugins.
|
||||
$DB->delete_records('config_plugins', array('plugin' => 'theme_mymobile'));
|
||||
// Delete the config logs.
|
||||
$DB->delete_records('config_log', array('plugin' => 'theme_mymobile'));
|
||||
|
||||
// Replace the mymobile settings.
|
||||
$DB->set_field('course', 'theme', 'clean', array('theme' => 'mymobile'));
|
||||
$DB->set_field('course_categories', 'theme', 'clean', array('theme' => 'mymobile'));
|
||||
$DB->set_field('user', 'theme', 'clean', array('theme' => 'mymobile'));
|
||||
$DB->set_field('mnet_host', 'theme', 'clean', array('theme' => 'mymobile'));
|
||||
|
||||
// Replace the theme configs.
|
||||
if (get_config('core', 'theme') == 'mymobile') {
|
||||
set_config('theme', 'clean');
|
||||
}
|
||||
if (get_config('core', 'thememobile') == 'mymobile') {
|
||||
set_config('thememobile', 'clean');
|
||||
}
|
||||
if (get_config('core', 'themelegacy') == 'mymobile') {
|
||||
set_config('themelegacy', 'clean');
|
||||
}
|
||||
if (get_config('core', 'themetablet') == 'mymobile') {
|
||||
set_config('themetablet', 'clean');
|
||||
}
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2013110400.00);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Config file for mymobile theme
|
||||
*
|
||||
* @package theme_mymobile
|
||||
* @copyright John Stabinger
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
// The name of the theme
|
||||
$THEME->name = 'mymobile';
|
||||
|
||||
// This theme relies on canvas and of course base themes
|
||||
$THEME->parents = array(
|
||||
'canvas',
|
||||
'base',
|
||||
);
|
||||
|
||||
// Set the stylesheets that we want to include for this theme
|
||||
$THEME->sheets = array(
|
||||
'jmobile131',
|
||||
'jmobile131_rtl',
|
||||
'core',
|
||||
'media'
|
||||
);
|
||||
|
||||
// Exclude parent sheets that we don't want
|
||||
$THEME->parents_exclude_sheets = array(
|
||||
'base' => array(
|
||||
'pagelayout',
|
||||
'dock',
|
||||
'editor',
|
||||
),
|
||||
'canvas' => array(
|
||||
'pagelayout',
|
||||
'tabs',
|
||||
'editor',
|
||||
),
|
||||
);
|
||||
|
||||
// Disable the dock - this theme does not support it.
|
||||
$THEME->enable_dock = false;
|
||||
|
||||
// Set up the default layout options. Note that none of these have block
|
||||
// regions. See the code below this for where and when block regions are added.
|
||||
$THEME->layouts = array(
|
||||
'base' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'standard' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'course' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'coursecategory' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'incourse' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'frontpage' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'admin' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'mydashboard' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nonavbar' => true),
|
||||
),
|
||||
'mypublic' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'login' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
'options' => array('langmenu'=>true, 'nonavbar'=>true),
|
||||
),
|
||||
'popup' => array(
|
||||
'file' => 'embedded.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true),
|
||||
),
|
||||
'frametop' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'nocoursefooter'=>true),
|
||||
),
|
||||
'maintenance' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true),
|
||||
),
|
||||
'embedded' => array(
|
||||
'file' => 'embedded.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocourseheaderfooter'=>true),
|
||||
),
|
||||
// Should display the content and basic headers only.
|
||||
'print' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true, 'nocourseheaderfooter'=>true),
|
||||
),
|
||||
// The pagelayout used when a redirection is occuring.
|
||||
'redirect' => array(
|
||||
'file' => 'embedded.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true, 'nocourseheaderfooter'=>true),
|
||||
),
|
||||
// The pagelayout used for reports
|
||||
'report' => array(
|
||||
'file' => 'general.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
|
||||
),
|
||||
);
|
||||
|
||||
// Get whether to show blocks and use appropriate pagelayout
|
||||
// this is necessary for block JS errors and other block problems.
|
||||
$thisdevice = core_useragent::get_device_type();
|
||||
if ($thisdevice === core_useragent::DEVICETYPE_DEFAULT || $thisdevice === core_useragent::DEVICETYPE_TABLET ||
|
||||
optional_param('mymobile_blocks', false, PARAM_BOOL)) {
|
||||
// These are layouts with blocks.
|
||||
$blocklayouts = array('course', 'incourse', 'frontpage', 'mydashboard', 'mypublic');
|
||||
foreach ($blocklayouts as $layout) {
|
||||
$THEME->layouts[$layout]['regions'] = array('myblocks');
|
||||
$THEME->layouts[$layout]['defaultregion'] = 'myblocks';
|
||||
}
|
||||
}
|
||||
|
||||
// Sets a custom render factory to use with the theme, used when working with custom renderers.
|
||||
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
|
||||
$THEME->csspostprocess = 'mymobile_user_settings';
|
||||
|
||||
// Disables CSS Optimiser for MyMobile theme.
|
||||
$THEME->supportscssoptimisation = false;
|
||||
@@ -1,257 +0,0 @@
|
||||
$(document).bind("mobileinit", function(){
|
||||
//mobile init stuff 11/12/10
|
||||
//turn off ajax forms...
|
||||
$.mobile.defaultPageTransition = "slide";
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
//get some vars to start
|
||||
var siteurl = $('.mobilesiteurl').attr("id");
|
||||
var mytheme = $(".datatheme").attr("id");
|
||||
var mythemeb = $(".datathemeb").attr("id");
|
||||
|
||||
|
||||
//function below does generic stuff before creating all pages...
|
||||
$('div').live('pagebeforecreate', function(event, ui) {
|
||||
//turn off ajax on all forms for now as of beta1
|
||||
$('form').attr("data-ajax", "false");
|
||||
//lesson
|
||||
$('.lessonbutton.standardbutton a').attr("data-role", "button");
|
||||
$('#page-mod-lesson-viewPAGE div.fitemtitle label').addClass("afirst");
|
||||
|
||||
//tablet column removal switch
|
||||
$('.slider').live("change",function() {
|
||||
var slids = $(this).val();
|
||||
M.util.set_user_preference('theme_mymobile_chosen_colpos', slids);
|
||||
if (slids == "off") {
|
||||
$('.ui-page-active').removeClass("has-myblocks");
|
||||
} else {
|
||||
$('.ui-page-active').addClass("has-myblocks");
|
||||
}
|
||||
});
|
||||
|
||||
//tabs- links set to external to fix forms
|
||||
$('div.tabtree ul.tabrow0').attr("data-role", "controlgroup");
|
||||
$('div.tabtree ul.tabrow12').attr("data-role", "controlgroup");
|
||||
$('div.tabtree li a').attr("data-role", "button").attr("data-ajax", "false");
|
||||
|
||||
//jump to current or bottom
|
||||
$('a.jumptocurrent').live('tap', function() {
|
||||
var position = $(".ui-page-active .section.current").position();
|
||||
if (!position) {
|
||||
var position = $(".ui-page-active .mobilefooter").position();
|
||||
}
|
||||
$.mobile.silentScroll(position.top);
|
||||
$(this).removeClass("ui-btn-active");
|
||||
return false;
|
||||
});
|
||||
|
||||
//scroll to top
|
||||
$('a#uptotop').live('tap', function() {
|
||||
var position = $(".ui-page-active").position();
|
||||
$.mobile.silentScroll(position.top);
|
||||
$(this).removeClass("ui-btn-active");
|
||||
return false;
|
||||
});
|
||||
|
||||
//remove message notifcation overlay on tap 6/21/11
|
||||
$('a#notificationno').live('tap', function() {
|
||||
$('#newmessageoverlay').remove();
|
||||
return false;
|
||||
});
|
||||
|
||||
//calendar and other links that need to be external
|
||||
$('.maincalendar .filters a, li.activity.scorm a, div.files a, #page-user-filesPAGE li div a, .maincalendar .bottom a, .section li.url.modtype_url a, .resourcecontent .resourcemediaplugin a, #underfooter .noajax a, .block_mnet_hosts .content a, .block_private_files .content a, a.portfolio-add-link, #attempts td a, .settingsul li a, .foldertree li a').attr("data-ajax", "false");
|
||||
|
||||
//add blank to open in window for some
|
||||
$('#page-mod-url-viewPAGE div.urlworkaround a, #page-mod-resource-viewPAGE div.resourceworkaround a, .mediaplugin a.mediafallbacklink, #page-mod-resource-viewPAGE .resourcemp3 a, .foldertree li a').attr("target", "_blank").attr("data-role", "button").attr("data-icon", "plus");
|
||||
|
||||
//// **** general stuff *** ////
|
||||
$('form fieldset').attr("data-role", "fieldcontain");
|
||||
$('form .fitem').attr("data-role", "fieldcontain");
|
||||
|
||||
//submit button for forum
|
||||
$('#page-mod-url-viewPAGE div.urlworkaround a').attr("data-role", "button");
|
||||
|
||||
//survey form fix
|
||||
$('#surveyform').attr("action", siteurl + '/mod/survey/save.php');
|
||||
|
||||
//nav select navigtation NEW
|
||||
$("#navselect").live("change",function() {
|
||||
var meb = encodeURI($(this).val());
|
||||
$(this).val("-1");
|
||||
if (meb != "" && meb != "-1") {
|
||||
$.mobile.changePage(meb);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
//course page only js
|
||||
$('div.path-site, div.path-course-view, .path-course-view div.generalpage').live('pagebeforecreate', function(event, ui) {
|
||||
//course listing
|
||||
$('.section li img.activityicon').addClass("ui-li-icon");
|
||||
$('.course-content ul.section, .sitetopic ul.section').attr("data-role", "listview").attr("data-inset", "true").attr("data-theme", mythemeb);
|
||||
$('.topics div.left.side').addClass("ui-bar-" + mytheme);
|
||||
$('.section.hidden div.headingwrap').attr("data-theme", mythemeb);
|
||||
//$('.topics #section-0 div.left.side').removeClass("ui-li ui-li-divider ui-btn ui-bar-a");
|
||||
$('.section .resource.modtype_resource a, .section .modtype_survey a').attr("data-ajax", "false");
|
||||
|
||||
//toggle completion checkmarks and form fixes
|
||||
$('.togglecompletion input[type="image"]').attr("data-role", "none");
|
||||
$('.togglecompletion input[type="image"]').click(function() {
|
||||
$(".section .togglecompletion").attr("action", '');
|
||||
var mylocc = siteurl + "/course/togglecompletion.php";
|
||||
$(".section .togglecompletion").attr("action", mylocc);
|
||||
this.form.submit();
|
||||
return false;
|
||||
});
|
||||
|
||||
// Force the class ui-li-desc on non-detected elements.
|
||||
$('ul.section div.availabilityinfo, ul.section div.contentafterlink').addClass('ui-li-desc');
|
||||
|
||||
// Force some classes on dimmed elements.
|
||||
$('ul.section div.dimmed_text > span').addClass('instancename');
|
||||
});
|
||||
|
||||
//forum listing only stuff
|
||||
$('div#page-mod-forum-viewPAGE, #page-mod-forum-view div.generalpage').live('pagebeforecreate',function(event, ui){
|
||||
//forums listing change theme for other theme
|
||||
$('table.forumheaderlist').attr("data-role", "controlgroup");
|
||||
$('table.forumheaderlist thead tr').attr("data-role", "button").attr("data-theme", mythemeb);
|
||||
$('table.forumheaderlist td.topic a').attr("data-role", "button").attr("data-icon", "arrow-r").attr("data-iconpos", "right").attr("data-theme", mythemeb);
|
||||
});
|
||||
|
||||
$('div#page-mod-forum-viewPAGE').live('pageinit',function(event, ui){
|
||||
$('.forumheaderlist td.topic').each(function(index) {
|
||||
var ggg = $(this).nextAll("td.replies").text();
|
||||
$(this).find('a').append('<span class="ui-li-count ui-btn-up-a ui-btn-corner-all"> ' + ggg + '</span>');
|
||||
});
|
||||
});
|
||||
|
||||
//forum discussion page only stuff
|
||||
$('div#page-mod-forum-discussPAGE, #page-mod-forum-discuss div.generalpage, div.forumtype-single, .forumtype-single div.generalpage, div#page-mod-forum-postPAGE').live('pagebeforecreate',function(event, ui){
|
||||
//actual forum posting
|
||||
$('.forumpost div.row.header').addClass("ui-li ui-li-divider ui-btn ui-bar-" + mytheme);
|
||||
$('.options div.commands').attr("data-role", "controlgroup").attr("data-type", "horizontal");
|
||||
$('.options div.commands a').attr("data-role", "button").attr("data-ajax", "false").attr("data-inline", "true");
|
||||
$('.forumpost div.author a').attr("data-inline", "true");
|
||||
$('.options div.commands').contents().filter(function() {
|
||||
return this.nodeType == 3; //Node.TEXT_NODE
|
||||
}).remove();
|
||||
//function above removes | in div.commands
|
||||
});
|
||||
|
||||
//frontpage only stuff
|
||||
$('div#page-site-indexPAGE, div.pagelayout-coursecategory').live('pagebeforecreate',function(event, ui){
|
||||
//course boxes on category pages and front page stuff
|
||||
//forum posts on front page only
|
||||
$('.forumpost div.row.header').addClass("ui-li ui-li-divider ui-btn ui-bar-" + mytheme);
|
||||
$('div.subscribelink a').attr("data-role", "button").attr("data-inline", "true");
|
||||
$('.unlist').attr("data-role", "controlgroup");
|
||||
$('div.coursebox a').attr("data-role", "button").attr("data-icon", "arrow-r").attr("data-iconpos", "right").attr("data-theme", mythemeb);
|
||||
$('.box.categorybox').attr("data-role", "controlgroup");
|
||||
$('div.categorylist div.category a').attr("data-role", "button").attr("data-theme", mythemeb);
|
||||
$('#shortsearchbox, #coursesearch2 #shortsearchbox').attr("data-type", "search");
|
||||
});
|
||||
|
||||
$('div#page-site-indexPAGE').live('pageinit',function(event, ui){
|
||||
$('div.categorylist div.category').each(function(index) {
|
||||
var ggb = $(this).find("span.numberofcourse").text().replace('(','').replace(')','');
|
||||
if (ggb != "") {
|
||||
$(this).find('a').append('<span class="ui-li-count ui-btn-up-a ui-btn-corner-all">' + ggb + '</span>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//chat only stuff
|
||||
$('div#chatpage, div.path-mod-chat').live('pagebeforecreate',function(event, ui){
|
||||
$('#input-message, #button-send').attr("data-role", "none");
|
||||
$('#enterlink a').attr("data-role", "button").attr("data-ajax", "false").attr("data-icon", "plus");
|
||||
$('form, input, button').attr("data-ajax", "false");
|
||||
});
|
||||
|
||||
//login page only stuff
|
||||
$('div#page-login-indexPAGE').live('pagebeforecreate',function(event, ui){
|
||||
//signup form fix
|
||||
$('.path-login .signupform #signup').attr("action", siteurl + '/login/signup.php');
|
||||
$('.path-login #guestlogin').attr("action", siteurl + '/login/index.php');
|
||||
});
|
||||
|
||||
//messaging only stuff
|
||||
$('div#page-message-indexPAGE').live('pagebeforecreate',function(event, ui){
|
||||
//below to fix form actions here and there
|
||||
$("#usergroupform").attr("action", '');
|
||||
//if (userform == "") {
|
||||
var myloc = siteurl + "/message/index.php";
|
||||
$("#usergroupform").attr("action", myloc);
|
||||
//messaging links
|
||||
$('.path-message td.link').attr("data-role", "controlgroup").attr("data-type", "horizontal");
|
||||
$('.path-message td.link a').attr("data-role", "button").attr("data-inline", "true");
|
||||
});
|
||||
|
||||
//database and glossary only stuff
|
||||
$('div#page-mod-data-viewPAGE, div#page-mod-glossary-viewPAGE').live('pagebeforecreate',function(event, ui){
|
||||
$('.defaulttemplate td a').attr("data-role", "button").attr("data-ajax", "false").attr("data-inline", "true");
|
||||
$('#options select, .aliases select').attr("data-native-menu", "true");
|
||||
$('#pref_search, .glossarysearchbox input[type="text"]').attr("data-type", "search");
|
||||
$('#options').attr("action", siteurl + '/mod/data/view.php');
|
||||
$('#page-mod-glossary-viewPAGE form').each(function(index) {
|
||||
var glossform = $(this).attr("action");
|
||||
if (glossform == "view.php") {
|
||||
$(this).attr("action", siteurl + '/mod/glossary/view.php');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//mymoodle only stuff
|
||||
$('div#page-my-indexPAGE').live('pagebeforecreate',function(event, ui){
|
||||
//my moodle page fixes
|
||||
//block_course_overview
|
||||
$('.block_course_overview div.headingwrap').attr("data-role", "none");
|
||||
$('.block_course_overview h3 a').attr("data-theme", mytheme);
|
||||
});
|
||||
|
||||
//resource only stuff to help embedded PDFs, provides link to open in new window
|
||||
$('div#page-mod-resource-viewPAGE').live('pagebeforecreate',function(event, ui){
|
||||
$('div.resourcepdf').each(function(index) {
|
||||
var thisopen = $(this).find('#resourceobject').attr("data");
|
||||
$(this).append('<a class="mobileresource" href="' +thisopen+ '" target="_blank"></a>');
|
||||
});
|
||||
});
|
||||
|
||||
//quiz page only js
|
||||
$('div#page-mod-quiz-viewPAGE, div#page-mod-quiz-attemptPAGE, div#page-mod-quiz-summaryPAGE, div#page-mod-quiz-reviewPAGE, #page-mod-quiz-attempt #content2').live('pagebeforecreate',function(event, ui){
|
||||
//add quiz timer into quiz page
|
||||
$('#quiz-timer').remove();
|
||||
$('.mymobilecontent').prepend('<div id="quiz-timer" > <span id="quiz-time-left"></span></div>');
|
||||
$('.que .info').addClass("ui-bar-" + mytheme);
|
||||
$('.que input.submit').attr("data-role", "none");
|
||||
$('div.submitbtns a, div.quizattemptcounts a').attr("data-role", "button").attr("data-ajax", "false");
|
||||
$('#page-mod-quiz-attemptPAGE .questionflag input, .path-mod-quiz .questionflag input').attr("data-role", "none");
|
||||
});
|
||||
|
||||
//assignment page only stuff
|
||||
$('#page-mod-assignment-viewPAGE').live('pagebeforecreate',function(event, ui){
|
||||
//below fixes the advanced upload edit notes button
|
||||
$('#page-mod-assignment-viewPAGE div[rel="upload.php"]').parent().attr("action", siteurl + '/mod/assignment/upload.php');
|
||||
});
|
||||
|
||||
//hotpot page only stuff
|
||||
$('div.path-mod-hotpot').live('pagebeforecreate',function(event, ui){
|
||||
$('.path-mod-hotpot button').attr("data-role", "none");
|
||||
});
|
||||
|
||||
///// functions below does stuff after creating page for some cleaning...
|
||||
$('div').live('pageinit',function(event, ui){
|
||||
$('.path-calendar div.ui-radio label:first-child, .path-mod-lesson div.ui-radio label:first-child, #page-mod-wiki-createPAGE div.ui-radio label:first-child').addClass("afirst");
|
||||
$('.forumpost div.author a').removeAttr('data-role');
|
||||
//$('.questionflagimage2').removeClass("ui-btn-hidden");a#notificationyes
|
||||
//image replacement
|
||||
$(this).find(".ithumb .course-content .summary img, .ithumb .course-content .activity.label img, .ithumb .sitetopic .no-overflow img").click(function() {
|
||||
var turl = $(this).attr("src");
|
||||
window.open(turl);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* This file describes jQuery plugins available in the moodle
|
||||
* core component. These can be included in page using:
|
||||
* $PAGE->requires->jquery();
|
||||
* $PAGE->requires->jquery_plugin('migrate', 'core');
|
||||
* $PAGE->requires->jquery_plugin('ui', 'core');
|
||||
* $PAGE->requires->jquery_plugin('ui-css', 'core');
|
||||
*
|
||||
* Please note that other moodle plugins can not use the sample
|
||||
* jquery plugin names, only one is loaded if collision detected.
|
||||
*
|
||||
* Any Moodle plugin may add jquery/plugins.php and include extra
|
||||
* jQuery plugins.
|
||||
*
|
||||
* Themes or other plugin may blacklist any jquery plugin,
|
||||
* for example to override default jQueryUI theme.
|
||||
*
|
||||
* @package core
|
||||
* @copyright 2013 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note: If you want to change the contents of 'custom131.js' because you are
|
||||
* developing but don't want to up the version until you are happy with
|
||||
* it, then 'Purge All Caches' does not work, you need to clear the browsers
|
||||
* cache at the client end so that it requests a new copy on page load.
|
||||
* This also applies to the small 'hack' that is contained witin
|
||||
* 'jquery.mobile-1.3.1.js'.
|
||||
* G J Barnard 14th April 2013
|
||||
*/
|
||||
$plugins = array(
|
||||
'mymobile' => array('files' => array('custom131.js')), // Do not forget to bump up version after modification!
|
||||
'mobile' => array('files' => array('jquery.mobile-1.3.1.js'))
|
||||
);
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* mymobile language pack
|
||||
*
|
||||
* @package theme_mymobile
|
||||
* @copyright John Stabinger
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['choosereadme'] = '<div class="clearfix"><div class="theme_screenshot"><h2>MyMobile</h2><img src="mymobile/pix/screenshot.png" /><h2>About</h2><p>MyMobile is a mobile theme for Moodle 2.x. More information on modifying themes can be found in the <a href="http://docs.moodle.org/en/Theme">MoodleDocs</a>.</p></div></div>';
|
||||
$string['colourswatch'] = 'Mobile theme colour swatch';
|
||||
$string['colourswatch_desc'] = 'Toggle the colour swatch of the theme between grey and light/blue.';
|
||||
$string['grey'] = 'Grey';
|
||||
$string['light'] = 'Light/Blue';
|
||||
$string['mtoggle'] = 'Toggle 2nd Column';
|
||||
$string['no'] = 'No';
|
||||
$string['pluginname'] = 'MyMobile';
|
||||
$string['region-myblocks'] = 'block region';
|
||||
$string['showmobileintro'] = 'Mobile Intro Text';
|
||||
$string['showmobileintro_desc'] = 'Add mobile only text/images to the mobile homepage.';
|
||||
$string['showsitetopic'] = 'Show site topic:';
|
||||
$string['showsitetopic_desc'] = 'Show the standard site topic section(s) on the front page for mobile theme users (if available).';
|
||||
$string['showfullsizeimages'] = 'Show full images on site index and course pages.';
|
||||
$string['showfullsizeimages_desc'] = 'Show full size images on site index and course pages instead of replaced thumb icon method. Default is to not show full size images.';
|
||||
$string['usetableview'] = 'Tablet View';
|
||||
$string['usetableview_desc'] = 'Use the tablet view for larger devices (yes by default).';
|
||||
$string['yes'] = 'Yes';
|
||||
$string['customcss'] = 'Custom CSS';
|
||||
$string['customcssdesc'] = 'Any CSS you enter here will be added to every page allowing your to easily customise this theme.';
|
||||
@@ -1,73 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Embedded layout for the mymobile theme
|
||||
*
|
||||
* @package theme_mymobile
|
||||
* @copyright John Stabinger
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
if (!empty($PAGE->theme->settings->colourswatch)) {
|
||||
$showswatch = $PAGE->theme->settings->colourswatch;
|
||||
} else {
|
||||
$showswatch = "light";
|
||||
}
|
||||
if ($showswatch == "light") {
|
||||
$datatheme = 'b';
|
||||
$databodytheme = 'd';
|
||||
} else {
|
||||
$datatheme = 'a';
|
||||
$databodytheme = 'c';
|
||||
}
|
||||
$bodyclasses = array();
|
||||
$mypagetype = $PAGE->pagetype;
|
||||
|
||||
echo $OUTPUT->doctype() ?>
|
||||
<html id="mymobile" <?php echo $OUTPUT->htmlattributes() ?>>
|
||||
<head>
|
||||
<title><?php echo $PAGE->title ?></title>
|
||||
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
|
||||
<?php if ($mypagetype != 'mod-chat-gui_ajax-index') { ?>
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />
|
||||
<?php } ?>
|
||||
<?php echo $OUTPUT->standard_head_html() ?>
|
||||
</head>
|
||||
<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
|
||||
<?php echo $OUTPUT->standard_top_of_body_html() ?>
|
||||
<!-- END OF HEADER -->
|
||||
<?php if ($mypagetype == 'mod-chat-gui_ajax-index') { ?>
|
||||
<div data-role="page" id="chatpage" data-fullscreen="true" data-title="<?php p($SITE->shortname) ?>">
|
||||
<?php echo $OUTPUT->main_content(); ?>
|
||||
<input type="button" value="back" data-role="none" id="chatback" onClick="history.back()">
|
||||
<?php } else { ?>
|
||||
<div id="content2" data-role="page" data-title="<?php p($SITE->shortname) ?>" data-theme="<?php echo $datatheme;?>">
|
||||
<div data-role="header" data-theme="<?php echo $datatheme;?>">
|
||||
<h1><?php echo $PAGE->heading ?> </h1>
|
||||
<?php if ($mypagetype != "help") { ?>
|
||||
<a class="ui-btn-right" data-ajax="false" data-icon="home" href="<?php p($CFG->wwwroot) ?>" data-iconpos="notext"><?php p(get_string('home')); ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div data-role="content" class="mymobilecontent" data-theme="<?php echo $databodytheme;?>">
|
||||
<?php echo $OUTPUT->main_content(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- START OF FOOTER -->
|
||||
<?php echo $OUTPUT->standard_end_of_body_html() ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,292 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* General layout for the mymobile theme
|
||||
*
|
||||
* @package theme_mymobile
|
||||
* @copyright John Stabinger
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
// Get blocks?
|
||||
$toblock = optional_param('mymobile_blocks', false, PARAM_BOOL);
|
||||
// Get settings?
|
||||
$toset = optional_param('mymobile_settings', false, PARAM_BOOL);
|
||||
|
||||
$mypagetype = $PAGE->pagetype;
|
||||
$mylayoutype = $PAGE->pagelayout;
|
||||
$mydevice = $PAGE->devicetypeinuse;
|
||||
|
||||
if (!empty($PAGE->theme->settings->colourswatch)) {
|
||||
$showswatch = $PAGE->theme->settings->colourswatch;
|
||||
} else {
|
||||
$showswatch = 'light';
|
||||
}
|
||||
|
||||
if ($showswatch == 'light') {
|
||||
$dtheme = 'd';
|
||||
$dthemeb = 'd';
|
||||
$datatheme = 'data-theme="b"';
|
||||
$databodytheme = 'data-theme="d"';
|
||||
} else {
|
||||
$dtheme = 'd';
|
||||
$dthemeb = 'c';
|
||||
$datatheme = 'data-theme="a"';
|
||||
$databodytheme = '';
|
||||
}
|
||||
|
||||
// Custom settings.
|
||||
$hasshowmobileintro = (!empty($PAGE->theme->settings->showmobileintro));
|
||||
|
||||
if (!empty($PAGE->theme->settings->showfullsizeimages)) {
|
||||
$hasithumb = $PAGE->theme->settings->showfullsizeimages;
|
||||
} else {
|
||||
$hasithumb = 'ithumb';
|
||||
}
|
||||
|
||||
if (!empty($PAGE->theme->settings->showsitetopic)) {
|
||||
$showsitetopic = $PAGE->theme->settings->showsitetopic;
|
||||
} else {
|
||||
$showsitetopic = 'topicnoshow';
|
||||
}
|
||||
|
||||
if (!empty($PAGE->theme->settings->usetableview)) {
|
||||
$showusetableview = $PAGE->theme->settings->usetableview;
|
||||
} else {
|
||||
$showusetableview = 'tabshow';
|
||||
}
|
||||
|
||||
// TODO: Fix this hardcoding there are other course formats that peopleuse.
|
||||
// Probably changing to an appropriate regex will do.
|
||||
if ($mypagetype == 'course-view-topics' || $mypagetype == 'course-view-weeks') {
|
||||
// Jump to current topic only in course pages.
|
||||
$jumptocurrent = 'true';
|
||||
} else {
|
||||
$jumptocurrent = 'false';
|
||||
}
|
||||
|
||||
// Below sets a URL variable to use in some links.
|
||||
$urlblocks = new moodle_url($PAGE->url, array('mymobile_blocks' => 'true'));
|
||||
$urlsettings = new moodle_url($PAGE->url, array('mymobile_settings' => 'true'));
|
||||
|
||||
$hasheading = ($PAGE->heading);
|
||||
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
|
||||
$hasfooter = (empty($PAGE->layout_options['nofooter']));
|
||||
$hasmyblocks = $PAGE->blocks->region_has_content('myblocks', $OUTPUT);
|
||||
|
||||
$courseheader = $coursecontentheader = $coursecontentfooter = $coursefooter = '';
|
||||
if (empty($PAGE->layout_options['nocourseheaderfooter'])) {
|
||||
$courseheader = $OUTPUT->course_header();
|
||||
$coursecontentheader = $OUTPUT->course_content_header();
|
||||
if (empty($PAGE->layout_options['nocoursefooter'])) {
|
||||
$coursecontentfooter = $OUTPUT->course_content_footer();
|
||||
$coursefooter = $OUTPUT->course_footer();
|
||||
}
|
||||
}
|
||||
|
||||
$bodyclasses = array();
|
||||
$bodyclasses[] = (string)$hasithumb;
|
||||
$bodyclasses[] = (string)$showsitetopic;
|
||||
// Add ithumb class to decide whether to show or hide images and site topic.
|
||||
|
||||
// TODO: Better illustrate preceedence.
|
||||
$gowide = ($mydevice == 'default' && $showusetableview == 'tabshow' || $mydevice == 'tablet' && $showusetableview == 'tabshow');
|
||||
if ($gowide) {
|
||||
// Initialize column position choices.
|
||||
mymobile_initialise_colpos($PAGE);
|
||||
}
|
||||
$usercol = (mymobile_get_colpos() == 'on');
|
||||
|
||||
$renderer = $PAGE->get_renderer('theme_mymobile');
|
||||
|
||||
echo $OUTPUT->doctype() ?>
|
||||
<html id="mymobile" <?php echo $OUTPUT->htmlattributes() ?>>
|
||||
<head>
|
||||
<title><?php echo $PAGE->title ?></title>
|
||||
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo $OUTPUT->pix_url('m2m2x', 'theme')?>" />
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo $OUTPUT->pix_url('m2m', 'theme')?>" />
|
||||
<link rel="apple-touch-icon-precomposed" href="<?php echo $OUTPUT->pix_url('m2m', 'theme')?>" />
|
||||
|
||||
<meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" />
|
||||
|
||||
<?php echo $OUTPUT->standard_head_html() ?>
|
||||
</head>
|
||||
<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
|
||||
<?php echo $OUTPUT->standard_top_of_body_html() ?>
|
||||
<div id="<?php p($PAGE->bodyid) ?>PAGE" data-role="page" class="generalpage <?php echo 'ajaxedclass '; p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)); ?> <?php if ($hasmyblocks && $usercol) { echo 'has-myblocks'; } ?> " data-title="<?php p($SITE->shortname) ?>">
|
||||
<!-- start header -->
|
||||
<div id="page-header" data-role="header" <?php echo($datatheme);?> class="mymobileheader" data-position="fixed">
|
||||
<h1><?php echo $PAGE->heading ?></h1>
|
||||
<?php if (isloggedin() && $mypagetype != 'site-index') { ?>
|
||||
<a class="ui-btn-right" data-icon="home" href="<?php p($CFG->wwwroot) ?>" data-iconpos="notext" data-ajax="false"><?php p(get_string('home')); ?></a>
|
||||
<?php } else if (!isloggedin()) {
|
||||
echo $OUTPUT->login_info();
|
||||
} ?>
|
||||
<?php if (!empty($courseheader)) { ?>
|
||||
<div data-role="course-header"><?php echo $courseheader; ?></div>
|
||||
<?php } ?>
|
||||
<!-- start navbar -->
|
||||
<div data-role="navbar">
|
||||
<ul>
|
||||
<?php if (!$gowide && !$hasmyblocks && !$toblock && $mypagetype == "mod-quiz-attempt" || !$gowide && !$hasmyblocks && !$toblock && $mylayoutype != "incourse") { ?>
|
||||
<li><a data-theme="c" class="blockload" href="<?php echo $urlblocks->out(); ?>"><?php p(get_string('blocks')); ?></a></li>
|
||||
<?php } ?>
|
||||
<?php if (!$toset) { ?>
|
||||
<li><a data-theme="c" href="<?php echo $urlsettings->out(); ?>"><?php p(get_string('settings')); ?></a></li>
|
||||
<?php } ?>
|
||||
<?php if ($jumptocurrent == 'true' && !$toblock && !$toset) { ?>
|
||||
<li><a data-theme="c" class="jumptocurrent" href="#"><?php p(get_string('jump')); ?></a></li>
|
||||
<?php } ?>
|
||||
<?php if (isloggedin() && $hasnavbar) { ?>
|
||||
<li><?php echo $OUTPUT->navbar(); ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- end navbar -->
|
||||
</div>
|
||||
<!-- end header -->
|
||||
|
||||
<!-- main content -->
|
||||
<div data-role="content" class="mymobilecontent" <?php echo $databodytheme; ?>>
|
||||
<?php if($toset) { // If we get the true, that means load/show settings only. ?>
|
||||
<h2 class="jsets"><?php p(get_string('settings')); ?></h2>
|
||||
<?php
|
||||
// Load lang menu if available.
|
||||
echo $OUTPUT->lang_menu();
|
||||
?>
|
||||
<ul data-role="listview" data-theme="<?php echo $dthemeb;?>" data-dividertheme="<?php echo $dtheme;?>" data-inset="true" class="settingsul">
|
||||
<?php echo $renderer->settings_tree($PAGE->settingsnav); ?>
|
||||
</ul>
|
||||
<?php echo $OUTPUT->login_info(); ?>
|
||||
<?php } ?>
|
||||
|
||||
<div class="content-primary">
|
||||
<div class="region-content <?php if ($toblock) { echo 'mobile_blocksonly'; } ?>" id="themains">
|
||||
<?php
|
||||
// Only show main content if we are not showing anything else.
|
||||
if (!$toblock && !$toset) { ?>
|
||||
<?php if ($hasshowmobileintro && $mypagetype == 'site-index') { ?>
|
||||
<?php echo $PAGE->theme->settings->showmobileintro; ?>
|
||||
<?php } ?>
|
||||
<?php echo $coursecontentheader; ?>
|
||||
<?php echo $OUTPUT->main_content(); ?>
|
||||
<?php echo $coursecontentfooter; ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($gowide && $hasmyblocks && !$toset) {
|
||||
// If we get the true, that means load/show blocks only for tablet views only. ?>
|
||||
<div class="content-secondary">
|
||||
<div class="tablets">
|
||||
<h1><?php echo $PAGE->heading ?></h1>
|
||||
<span><?php echo $PAGE->course->summary; ?></span>
|
||||
</div>
|
||||
|
||||
<?php if ($hasmyblocks) { ?>
|
||||
<div data-role="collapsible-set" data-theme="<?php echo $dthemeb;?>">
|
||||
<?php echo $OUTPUT->blocks_for_region('myblocks') ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($gowide && isloggedin() && !isguestuser()) { ?>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="false" <?php echo $datatheme;?> data-content-theme="<?php echo $dthemeb;?>" id="profcol">
|
||||
<h3><?php p(''.$USER->firstname.' '.$USER->lastname.''); ?></h3>
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a">
|
||||
<?php echo html_writer::tag('div', $OUTPUT->user_picture($USER, array('size'=>80)), array('class'=>'userimg'));?>
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<a data-role="button" data-icon="home" href="<?php p($CFG->wwwroot) ?>/my/"><?php p(get_string('myhome')); ?></a>
|
||||
<a data-role="button" data-icon="info" href="<?php p($CFG->wwwroot) ?>/user/profile.php"><?php p(get_string('myprofile')); ?></a>
|
||||
<a data-role="button" data-icon="back" data-ajax="false" href="<?php p($CFG->wwwroot) ?>/login/logout.php"><?php p(get_string('logout')); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="fieldcontain" id="sliderdiv">
|
||||
<label for="slider"><?php p(get_string('mtoggle', 'theme_mymobile')); ?>:</label>
|
||||
<select name="slider" class="slider" data-role="slider" id="slider">
|
||||
<option value="on">On</option>
|
||||
<option value="off">Off</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<?php } else if (!isloggedin() || isguestuser()) { ?>
|
||||
<a data-role="button" <?php echo $datatheme;?> data-ajax="false" href="<?php p($CFG->wwwroot) ?>/login/index.php"><?php p(get_string('login')); ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ($toblock && !$gowide) {
|
||||
// Regular block load for phones + handhelds.
|
||||
if ($hasmyblocks) {
|
||||
?><div class="headingwrap ui-bar-<?php echo $dtheme;?> ui-footer jsetsbar">
|
||||
<h2 class="jsets ui-title"><?php p(get_string('blocks')); ?></h2>
|
||||
</div>
|
||||
<div data-role="collapsible-set"><?php echo $OUTPUT->blocks_for_region('myblocks') ?></div><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<!-- end main content -->
|
||||
|
||||
<!-- start footer -->
|
||||
<?php if (!empty($coursefooter)) { ?>
|
||||
<div data-role="course-footer"><?php echo $coursefooter; ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<div id="page-footer">
|
||||
<div data-role="footer" class="mobilefooter" <?php echo $datatheme;?>>
|
||||
<div data-role="navbar" class="jnav" >
|
||||
<ul>
|
||||
<li><a id="mycal" class="callink" href="<?php p($CFG->wwwroot) ?>/calendar/view.php" data-icon="info" data-iconpos="top" ><?php p(get_string('calendar', 'calendar')); ?></a></li>
|
||||
<?php if (!empty($CFG->messaging)) { ?>
|
||||
<li><a id="mymess" href="<?php p($CFG->wwwroot) ?>/message/index.php" data-iconpos="top" data-icon="mymessage" ><?php p(get_string('messages', 'message')); ?></a></li>
|
||||
<?php } ?>
|
||||
<?php if ($mypagetype != 'site-index') { ?>
|
||||
<li><a href="#" data-inline="true" data-role="button" data-iconpos="top" data-icon="arrow-u" id="uptotop"><?php p(get_string('up')); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="underfooter">
|
||||
<?php
|
||||
echo $OUTPUT->login_info_footer();
|
||||
echo '<div class="noajax">';
|
||||
echo $OUTPUT->standard_footer_html();
|
||||
echo '</div>';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end footer -->
|
||||
<!-- empty divs with info for the JS to use -->
|
||||
<div id="<?php echo sesskey(); ?>" class="mobilesession"></div>
|
||||
<div id="<?php p($CFG->wwwroot); ?>" class="mobilesiteurl"></div>
|
||||
<div id="<?php echo $dtheme;?>" class="datatheme"></div>
|
||||
<div id="<?php echo $dthemeb;?>" class="datathemeb"></div>
|
||||
<!-- end js divs -->
|
||||
|
||||
<?php echo $OUTPUT->standard_end_of_body_html() ?>
|
||||
</div><!-- ends page -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,73 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Lib file for mymobile theme
|
||||
*
|
||||
* @package theme_mymobile
|
||||
* @copyright John Stabinger
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* Allow AJAX updating of the user defined columns for tablets or not
|
||||
*
|
||||
* @param moodle_page $page
|
||||
*/
|
||||
function mymobile_initialise_colpos(moodle_page $page) {
|
||||
user_preference_allow_ajax_update('theme_mymobile_chosen_colpos', PARAM_ALPHA);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user preference for columns for tablets or not
|
||||
*
|
||||
* @param string $default
|
||||
* @return mixed
|
||||
*/
|
||||
function mymobile_get_colpos($default = 'on') {
|
||||
return get_user_preferences('theme_mymobile_chosen_colpos', $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes our changes to the CSS
|
||||
*
|
||||
* @param string $css
|
||||
* @param theme_config $theme
|
||||
* @return string
|
||||
*/
|
||||
function mymobile_user_settings($css, $theme) {
|
||||
if (!empty($theme->settings->customcss)) {
|
||||
$customcss = $theme->settings->customcss;
|
||||
} else {
|
||||
$customcss = null;
|
||||
}
|
||||
$css = mymobile_set_customcss($css, $customcss);
|
||||
return $css;
|
||||
}
|
||||
|
||||
function mymobile_set_customcss($css, $customcss) {
|
||||
$tag = '[[setting:customcss]]';
|
||||
$css = str_replace($tag, $customcss, $css);
|
||||
return $css;
|
||||
}
|
||||
|
||||
function theme_mymobile_page_init(moodle_page $page) {
|
||||
$page->requires->jquery();
|
||||
// Remove 'migrate' when '.live' event handlers successfully converted to '.on' in 'custom131.js':...
|
||||
$page->requires->jquery_plugin('migrate');
|
||||
$page->requires->jquery_plugin('mymobile', 'theme_mymobile');
|
||||
$page->requires->jquery_plugin('mobile', 'theme_mymobile');
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 388 B |
|
Before Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 364 B |
|
Before Width: | Height: | Size: 460 B |
|
Before Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 519 B |
|
Before Width: | Height: | Size: 840 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 596 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 232 B |
|
Before Width: | Height: | Size: 236 B |
|
Before Width: | Height: | Size: 236 B |
|
Before Width: | Height: | Size: 231 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 965 B |
|
Before Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 444 B |
|
Before Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 554 B |
|
Before Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 532 B |
|
Before Width: | Height: | Size: 729 B |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 366 B |
|
Before Width: | Height: | Size: 117 B |
|
Before Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 193 B |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 133 B |
|
Before Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 133 B |
|
Before Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 511 B |
|
Before Width: | Height: | Size: 437 B |
|
Before Width: | Height: | Size: 865 B |
|
Before Width: | Height: | Size: 145 B |
|
Before Width: | Height: | Size: 138 B |
|
Before Width: | Height: | Size: 124 B |
|
Before Width: | Height: | Size: 139 B |
|
Before Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 531 B |
|
Before Width: | Height: | Size: 537 B |
|
Before Width: | Height: | Size: 133 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 143 B |
|
Before Width: | Height: | Size: 135 B |
|
Before Width: | Height: | Size: 119 B |
|
Before Width: | Height: | Size: 510 B |
|
Before Width: | Height: | Size: 813 B |
|
Before Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 156 B |
|
Before Width: | Height: | Size: 127 B |
|
Before Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 111 B |
|
Before Width: | Height: | Size: 129 B |