MDL-27622 theme_mymobile: Pre-integration clean up

This commit is contained in:
Sam Hemelryk 2011-11-09 18:18:41 +13:00
parent 2fd7abbbd7
commit 3c0c2bf080
12 changed files with 1149 additions and 2217 deletions

View File

@ -23,359 +23,144 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// The name of the theme
$THEME->name = 'mymobile';
////////////////////////////////////////////////////
// Name of the theme. Most likely the name of
// the directory in which this file resides.
////////////////////////////////////////////////////
// This theme relies on canvas and of course base themes
$THEME->parents = array(
'canvas',
'base',
);
/////////////////////////////////////////////////////
// Which existing theme(s) in the /theme/ directory
// do you want this theme to extend. A theme can
// extend any number of themes. Rather than
// creating an entirely new theme and copying all
// of the CSS, you can simply create a new theme,
// extend the theme you like and just add the
// changes you want to your theme.
////////////////////////////////////////////////////
// Set the stylesheets that we want to include for this theme
$THEME->sheets = array(
'jmobilerc2',
'core',
'media'
);
////////////////////////////////////////////////////
// Name of the stylesheet(s) you've including in
// this theme's /styles/ directory.
////////////////////////////////////////////////////
// Exclude parent sheets that we don't want
$THEME->parents_exclude_sheets = array(
'base'=>array(
'pagelayout',
'dock',
'editor',
),
'canvas'=>array(
'pagelayout',
'tabs',
'editor',
),
'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),
),
'frametop' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true),
),
'maintenance' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
),
'embedded' => array(
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
),
// The pagelayout used when a redirection is occuring.
'redirect' => array(
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
),
// The pagelayout used for reports
'report' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
),
);
////////////////////////////////////////////////////
// Do you want to use the new navigation dock?
////////////////////////////////////////////////////
//$THEME->editor_sheets = array('editor');
////////////////////////////////////////////////////
// An array of stylesheets to include within the
// body of the editor.
////////////////////////////////////////////////////
$toblock = optional_param('mymobile_blocks', false, PARAM_BOOL);
// Get whether to show blocks and use appropriate pagelayout
// this is necessary for block JS errors and other block problems
$thisdevice = get_device_type();
if ($thisdevice == "default" || $thisdevice == "tablet") {
$gowide = "true";
} else {
$gowide = "false";
if ($thisdevice == "default" || $thisdevice == "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';
}
}
//get whether to show blocks and use appropriate pagelayout
//this is necessary for block JS errors and other block problems
if($toblock || $gowide == "true") {
$THEME->layouts = array(
'base' => array(
'file' => 'general.php',
'regions' => array(),
),
'standard' => array(
'file' => 'general.php',
'regions' => array(),
),
'course' => array(
'file' => 'general.php',
'regions' => array('myblocks'),
'defaultregion' => 'myblocks'
),
'coursecategory' => array(
'file' => 'general.php',
'regions' => array(),
),
'incourse' => array(
'file' => 'general.php',
'regions' => array('myblocks'),
'defaultregion' => 'myblocks',
),
'frontpage' => array(
'file' => 'general.php',
'regions' => array('myblocks'),
'defaultregion' => 'myblocks',
//'options' => array('nonavbar'=>true),
),
'admin' => array(
'file' => 'general.php',
'regions' => array(),
),
'mydashboard' => array(
'file' => 'general.php',
'regions' => array('myblocks'),
'defaultregion' => 'myblocks',
'options' => array('nonavbar'=>true),
),
'mypublic' => array(
'file' => 'general.php',
'regions' => array('myblocks'),
'defaultregion' => 'myblocks',
),
'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),
),
'frametop' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true),
),
'maintenance' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
),
'embedded' => array(
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
),
// The pagelayout used when a redirection is occuring.
'redirect' => array(
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
),
// The pagelayout used for reports
'report' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
),
// Add the required JavaScript to the page
$THEME->javascripts = array(
'jquery-1.6.4.min',
'custom',
'jquery.mobile-1.0rc2',
'scrollview',
'easing'
);
}
else {
//get rid of block region
$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(),
//'options' => array('nonavbar'=>true),
),
'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),
),
'frametop' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true),
),
'maintenance' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
),
'embedded' => array(
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
),
// The pagelayout used when a redirection is occuring.
'redirect' => array(
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
),
// The pagelayout used for reports
'report' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
),
);
}
///////////////////////////////////////////////////////////////
// These are all of the possible layouts in Moodle. The
// simplest way to do this is to keep the theme and file
// variables the same for every layout. Including them
// all in this way allows some flexibility down the road
// if you want to add a different layout template to a
// specific page.
///////////////////////////////////////////////////////////////
////////////////////////////////////////////////////
// Allows the user to provide the name of a function
// that all CSS should be passed to before being
// delivered.
////////////////////////////////////////////////////
// $THEME->filter_mediaplugin_colors
////////////////////////////////////////////////////
// Used to control the colours used in the small
// media player for the filters
////////////////////////////////////////////////////
//$THEME->javascripts = 'jquery.mobile-1.0a1.min';
//$THEME->javascripts = array('jquery.mobile-1.0a1.min');
$THEME->javascripts = array('jquery-1.6.4.min', 'custom', 'jquery.mobile-1.0rc2','scrollview','easing');
////////////////////////////////////////////////////
// An array containing the names of JavaScript files
// located in /javascript/ to include in the theme.
// (gets included in the head)
////////////////////////////////////////////////////
// $THEME->javascripts_footer
////////////////////////////////////////////////////
// As above but will be included in the page footer.
////////////////////////////////////////////////////
// $THEME->larrow
////////////////////////////////////////////////////
// Overrides the left arrow image used throughout
// Moodle
////////////////////////////////////////////////////
// $THEME->rarrow
////////////////////////////////////////////////////
// Overrides the right arrow image used throughout Moodle
////////////////////////////////////////////////////
// $THEME->layouts
////////////////////////////////////////////////////
// An array setting the layouts for the theme
////////////////////////////////////////////////////
// $THEME->parents_exclude_javascripts
////////////////////////////////////////////////////
// An array of JavaScript files NOT to inherit from
// the themes parents
////////////////////////////////////////////////////
// $THEME->parents_exclude_sheets
////////////////////////////////////////////////////
// An array of stylesheets not to inherit from the
// themes parents
////////////////////////////////////////////////////
// $THEME->plugins_exclude_sheets
////////////////////////////////////////////////////
// An array of plugin sheets to ignore and not
// include.
////////////////////////////////////////////////////
// $THEME->renderfactory
////////////////////////////////////////////////////
// Sets a custom render factory to use with the
// theme, used when working with custom renderers.
////////////////////////////////////////////////////
// $THEME->resource_mp3player_colors
////////////////////////////////////////////////////
// Controls the colours for the MP3 player
////////////////////////////////////////////////////
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
//$THEME->csspostprocess = 'mymobile_process_css';
// Sets a custom render factory to use with the theme, used when working with custom renderers.
$THEME->rendererfactory = 'theme_overridden_renderer_factory';

View File

@ -5,301 +5,279 @@ $(document).bind("mobileinit", function(){
//$.mobile.touchOverflowEnabled = true;
});
$(document).ready(function(){
$(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 .ui-header").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').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);
}
});
$('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");
}
});
//course page only js
$('div.path-course-view, .path-course-view div.generalpage').live('pagebeforecreate',function(event, ui){
//course listing
$('.section li img').addClass("ui-li-icon");
$('.course-content ul.section').attr("data-role", "listview").attr("data-inset", "true").attr("data-theme", mythemeb);
$('.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;
});
});
//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");
//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);
});
//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;
});
$('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>');
});
});
//scroll to top
$('a#uptotop').live('tap', function() {
var position = $(".ui-page-active .ui-header").position();
$.mobile.silentScroll(position.top);
$(this).removeClass("ui-btn-active");
return false;
});
//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){
//remove parent post because of hash remove this if has listening is fixed
$('.options div.commands a').each(function(index) {
var url = $(this).attr("href");
if (url.indexOf("#") != -1)
{
$(this).remove();
}
});
//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
});
//remove message notifcation overlay on tap 6/21/11
$('a#notificationno').live('tap', function() {
$('#newmessageoverlay').remove();
return false;
});
//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");
});
//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').attr("data-ajax", "false");
$('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>');
}
});
});
//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");
//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");
});
//// **** general stuff *** ////
$('form fieldset').attr("data-role", "fieldcontain");
$('form .fitem').attr("data-role", "fieldcontain");
//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');
});
//submit button for forum
$('#page-mod-url-viewPAGE div.urlworkaround a').attr("data-role", "button");
//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");
});
//survey form fix
$('#surveyform').attr("action", siteurl + '/mod/survey/save.php');
//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');
}
});
});
//nav select navigtation NEW
$("#navselect").live("change",function() {
var meb = encodeURI($(this).val());
$(this).val("-1");
if (meb != "" && meb != "-1") {
$.mobile.changePage(meb);
}
});
//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.main 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').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");
});
//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/lib.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>');
});
$('tr.cps').click(function() {
if ($(this).hasClass('opencps')) {
$(this).removeClass("opencps");
}
else {
$(this).addClass("opencps");
}
});
});
//////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
//scrollview 2/7/11 testing remove if remove scrollview
$('.gradeparent, .pagelayout-report .no-overflow, .path-mod-choice .response, .resourcecontent.resourceimg, .usersubmissions .no-overflow, .path-course-report-log .generaltable, table.results.anonymous, table.surveytable, div.resultgraph, div.reportsummary a, #completion-progress').scrollview();
//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);
});
});
//course page only js
$('div.path-course-view, .path-course-view div.generalpage').live('pagebeforecreate', function(event, ui) {
//course listing
$('.section li img').addClass("ui-li-icon");
$('.course-content ul.section').attr("data-role", "listview").attr("data-inset", "true").attr("data-theme", mythemeb);
$('.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;
});
});
//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){
//remove parent post because of hash remove this if has listening is fixed
$('.options div.commands a').each(function(index) {
var url = $(this).attr("href");
if (url.indexOf("#") != -1) {
$(this).remove();
}
});
//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.main 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').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");
});
//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/lib.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>');
});
$('tr.cps').click(function() {
if ($(this).hasClass('opencps')) {
$(this).removeClass("opencps");
} else {
$(this).addClass("opencps");
}
});
});
///// 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
//scrollview 2/7/11 testing remove if remove scrollview
$('.gradeparent, .pagelayout-report .no-overflow, .path-mod-choice .response, .resourcecontent.resourceimg, .usersubmissions .no-overflow, .path-course-report-log .generaltable, table.results.anonymous, table.surveytable, div.resultgraph, div.reportsummary a, #completion-progress').scrollview();
//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);
});
});
});

View File

@ -22,31 +22,22 @@
* @copyright John Stabinger
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['pluginname'] = 'MyMobile';
$string['region-side-post'] = 'Right';
$string['region-side-pre'] = 'Left';
$string['region-myblocks'] = 'block region';
$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['configtitle'] = 'MyMobile theme';
$string['mtext'] = 'Mobile Intro Text';
$string['mtext_desc'] = 'Add mobile only text/images to the mobile homepage.';
$string['mtopic'] = 'Show site topic:';
$string['mtopic_desc'] = 'Show the standard site topic section(s) on the front page for mobile theme users (if available).';
$string['mimgs'] = 'Show full images on site index and course pages.';
$string['mimgs_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['mdesk'] = 'Show desktop version link:';
$string['mdesk_desc'] = 'Show a link to the desktop version of the site, the link attempts to clear the mobile theme and use whatever theme you have as standard. Disabled by default.';
$string['mswatch'] = 'Mobile theme color swatch';
$string['mswatch_desc'] = 'Toggle the color swatch of the theme between grey and light/blue.';
$string['mtab'] = 'Tablet View';
$string['mtab_desc'] = 'Use the tablet view for larger devices (yes by default).';
$string['mtoggle'] = 'Toggle 2nd Column';
$string['colourswatch'] = 'Mobile theme color swatch';
$string['colourswatch_desc'] = 'Toggle the color swatch of the theme between grey and light/blue.';
$string['grey'] = 'Grey';
$string['light'] = 'Light';
$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';

View File

@ -1,63 +1,74 @@
<?php
if (!empty($PAGE->theme->settings->mswatch)) {
$showswatch = $PAGE->theme->settings->mswatch;
// 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
* @subpackage 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";
$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 = "data-theme=c";
$datatheme = 'b';
$databodytheme = 'd';
} else {
$datatheme = 'a';
$databodytheme = 'c';
}
$mypagetype = $PAGE->pagetype;
?>
<?php echo $OUTPUT->doctype() ?>
<?php $mypagetype = $this->page->pagetype; ?>
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $SITE->shortname ?></title>
<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 } ?>
<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 core_renderer::MAIN_CONTENT_TOKEN ?>
<input type="button" value="back" data-role="none" id="chatback" onClick="history.back()">
</div>
<?php } else { ?>
<div id="content2" data-role="page" data-title="<?php p($SITE->shortname) ?>" <?php p($datatheme); ?>>
<div data-role="header" <?php p($datatheme) ?>><h1><?php echo $PAGE->heading ?>&nbsp;</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" <?php p($databodytheme); ?>>
<?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 core_renderer::MAIN_CONTENT_TOKEN ?>
<input type="button" value="back" data-role="none" id="chatback" onClick="history.back()">
</div>
<?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 ?>&nbsp;</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" data-theme="<?php echo $databodytheme;?>">
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
</div>
</div>
<?php } ?>
<!-- START OF FOOTER -->
<?php echo $OUTPUT->standard_end_of_body_html() ?>
<?php } ?>
<!-- START OF FOOTER -->
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
</html>

View File

@ -1,292 +1,275 @@
<?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
* @subpackage 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 blocks?
// get settings?
$toset = optional_param('mymobile_settings', false, PARAM_BOOL);
//get settings?
$mypagetype = $this->page->pagetype;
$mylayoutype = $this->page->pagelayout;
$mypagetype = $PAGE->pagetype;
$mylayoutype = $PAGE->pagelayout;
$mydevice = $PAGE->devicetypeinuse;
if (!empty($PAGE->theme->settings->mswatch)) {
$showswatch = $PAGE->theme->settings->mswatch;
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';
$datatheme = 'data-theme="b"';
$databodytheme = 'data-theme="d"';
} else {
$dtheme = 'd';
$dthemeb = 'c';
$datatheme = 'data-theme=a';
$datatheme = 'data-theme="a"';
$databodytheme = '';
}
//custom settings
$hasmtext = (!empty($PAGE->theme->settings->mtext));
$hasshowmobileintro = (!empty($PAGE->theme->settings->showmobileintro));
if (!empty($PAGE->theme->settings->mimgs)) {
$hasithumb = $PAGE->theme->settings->mimgs;
if (!empty($PAGE->theme->settings->showfullsizeimages)) {
$hasithumb = $PAGE->theme->settings->showfullsizeimages;
} else {
$hasithumb = 'ithumb';
}
if (!empty($PAGE->theme->settings->mtopic)) {
$showsitetopic = $PAGE->theme->settings->mtopic;
if (!empty($PAGE->theme->settings->showsitetopic)) {
$showsitetopic = $PAGE->theme->settings->showsitetopic;
} else {
$showsitetopic = 'topicnoshow';
}
if (!empty($PAGE->theme->settings->mtab)) {
$showmtab = $PAGE->theme->settings->mtab;
if (!empty($PAGE->theme->settings->usetableview)) {
$showusetableview = $PAGE->theme->settings->usetableview;
} else {
$showmtab = 'tabshow';
$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';
//jump to current topic only in course pages
}
else {
} else {
$jumptocurrent = 'false';
}
// below sets a URL variable to use in some links
$url = new moodle_url($this->page->url, array('mymobile_blocks' => 'true'));
$urls = new moodle_url($this->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);
$bodyclasses = array();
$bodyclasses[] = ''.$hasithumb.'';
$bodyclasses[] = ''.$showsitetopic .'';
//add ithumb class to decide whether to show or hide images and site topic
$thisdevice = $this->page->devicetypeinuse;
if ($thisdevice == 'default' && $showmtab == 'tabshow' || $thisdevice == 'tablet' && $showmtab == 'tabshow') {
$gowide = 'true';
//initialize column position choices.
$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);
$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();
} else {
$gowide = 'false';
$usercol = (mymobile_get_colpos() == 'on');
}
$renderer = $PAGE->get_renderer('theme_mymobile');
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $SITE->shortname ?></title>
<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() ?>
<?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 data-role="header" <?php echo($datatheme);?> class="mymobileheader">
<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();
} ?>
<!-- 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>
<div id="page-header"><!-- empty page-header needed by moodle yui --></div>
<!-- end header -->
<div id="<?php p($PAGE->bodyid) ?>PAGE" data-role="page" class="generalpage <?php echo 'ajaxedclass '; p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)); ?> <?php if ($hasmyblocks && $usercol == "on") { echo 'has-myblocks'; } ?> " data-title="<?php p($SITE->shortname) ?>">
<!-- start header -->
<div data-role="header" <?php p($datatheme) ?> class="mymobileheader">
<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();
}
?>
<!-- start navbar -->
<div data-role="navbar">
<ul>
<?php if ($gowide != "true" && !$hasmyblocks && !$toblock && $mypagetype == "mod-quiz-attempt" || $gowide != "true" && !$hasmyblocks && !$toblock && $mylayoutype != "incourse") {
//if has sidepost means there are blocks so print block button
?>
<li><a data-theme="c" class="blockload" href="<?php echo''.$url.''; ?>"><?php p(get_string('blocks')); ?></a></li>
<?php } ?>
<?php if(!$toset) { ?>
<li><a data-theme="c" href="<?php echo''.$urls.''; ?>"><?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><form id="navselectform"><select id="navselect" data-theme="c" data-inline="false" data-icon="false" >
<option data-placeholder="true" value="-1"><?php p(get_string('navigation')); ?></option>
<?php echo $OUTPUT->navbar(); ?>
</select></form></li>
<?php } ?>
</ul>
</div><!-- /navbar -->
</div>
<div id="page-header"><!-- empty page-header needed by moodle yui --></div>
<!-- end header -->
<!-- main content -->
<div data-role="content" class="mymobilecontent" <?php p($databodytheme); ?>>
<?php if($toset) { //if we get the true, that means load/show settings only ?>
<h2 class="jsets">
<?php p(get_string('settings')); ?>
</h2>
<!-- 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();
$mobileblocks = new mymobile_mobileblocks_renderer($this->page, null);
?>
<ul data-role="listview" data-theme="<?php p($dthemeb) ?>" data-dividertheme="<?php p($dtheme) ?>" data-inset="true" class="settingsul">
<?php
echo $mobileblocks->settings_tree($this->page->settingsnav);
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) { ?>mobile_blocksonly<?php } ?>" id="themains">
<?php
//only show main content if we are not showing anything else
if(!$toblock && !$toset) { ?>
<?php if ($hasmtext && $mypagetype == 'site-index') { ?>
<?php echo $PAGE->theme->settings->mtext; ?>
<?php } ?>
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
<?php } ?>
</div>
</div>
<?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 $OUTPUT->main_content(); ?>
<?php } ?>
</div>
</div>
<?php if($gowide == "true" && $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 $this->page->course->summary; ?></span>
</div>
<?php if ($hasmyblocks) { ?>
<div data-role="collapsible-set" data-theme="<?php p($dthemeb) ?>">
<?php echo $OUTPUT->blocks_for_region('myblocks') ?>
</div>
<?php } ?>
<?php if($gowide == "true" && isloggedin() && !isguestuser()) { ?>
<div data-role="collapsible" data-collapsed="false" <?php p($datatheme) ?> data-content-theme="<?php p($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'));
?>
<?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" data-track-theme="b">
<option value="on">On</option>
<option value="off">Off</option>
</select>
</div>
<?php } else if (!isloggedin() || isguestuser()) { ?>
<a data-role="button" <?php echo $datatheme;?> 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>
<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>
<!-- end main content -->
<!-- start 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>
<!-- end footer -->
<div id="underfooter">
<?php
echo $OUTPUT->login_info_footer();
echo '<div class="noajax">';
echo $OUTPUT->standard_footer_html();
echo '</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" data-track-theme="b">
<option value="on">On</option>
<option value="off">Off</option>
</select>
</div>
<?php } else if (!isloggedin() || isguestuser()) { ?>
<a data-role="button" <?php echo $datatheme ?> href="<?php p($CFG->wwwroot) ?>/login/index.php"><?php p(get_string('login')); ?></a>
<?php } ?>
</div>
<?php } ?>
</div><!-- ends page -->
<?php if($toblock && $gowide != "true") {
//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 } ?>
<?php } ?>
<!-- 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>
<div id="page-footer"><!-- empty page footer needed by moodle yui for embeds --></div>
<!-- end js divs -->
</div>
<!-- end main content -->
<!-- start footer -->
<div data-role="footer" class="mobilefooter" <?php p($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>
<!-- end footer -->
<div id="underfooter">
<?php
echo $OUTPUT->login_infoB();
echo '<div class="noajax">';
echo $OUTPUT->standard_footer_html();
echo '</div>';
?>
</div>
</div><!-- ends page -->
<!-- empty divs with info for the JS to use -->
<div id="<?php p(sesskey()); ?>" class="mobilesession"></div>
<div id="<?php p($CFG->wwwroot); ?>" class="mobilesiteurl"></div>
<div id="<?php p($dtheme); ?>" class="datatheme"></div>
<div id="<?php p($dthemeb); ?>" class="datathemeb"></div>
<div id="page-footer"><!-- empty page footer needed by moodle yui for embeds --></div>
<!-- end js divs -->
<?php echo $OUTPUT->standard_end_of_body_html() ?>
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
</html>

View File

@ -22,106 +22,22 @@
* @copyright John Stabinger
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class mymobile_mobileblocks_renderer extends plugin_renderer_base {
public function settings_tree(settings_navigation $navigation) {
global $CFG;
$content = $this->navigation_node($navigation, array('class' => 'settings'));
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
}
return $content;
}
public function navigation_tree(global_navigation $navigation) {
global $CFG;
$content .= $this->navigation_node($navigation, array());
return $content;
}
protected function navigation_node(navigation_node $node, $attrs=array()) {
$items = $node->children;
// exit if empty, we don't want an empty ul element
if ($items->count() == 0) {
return '';
}
// array of nested li elements
$lis = array();
foreach ($items as $item) {
if (!$item->display) {
continue;
}
$isbranch = ($item->children->count() > 0 || $item->nodetype == navigation_node::NODETYPE_BRANCH);
$hasicon = (!$isbranch && $item->icon instanceof renderable);
if ($isbranch) {
$item->hideicon = true;
}
$item->hideicon = true;
$content = $this->output->render($item);
if(substr($item->id, 0, 17)=='expandable_branch' && $item->children->count()==0) {
// Navigation block does this via AJAX - we'll merge it in directly instead
$dummypage = new mymobile_dummy_page();
$dummypage->set_context(get_context_instance(CONTEXT_SYSTEM));
$subnav = new mymobile_expand_navigation($dummypage, $item->type, $item->key);
if (!isloggedin() || isguestuser()) {
$subnav->set_expansion_limit(navigation_node::TYPE_COURSE);
}
//below by john for too manu items...
$subnav->set_expansion_limit(navigation_node::TYPE_COURSE);
$branch = $subnav->find($item->key, $item->type);
$content .= $this->navigation_node($branch);
} else {
$content .= $this->navigation_node($item);
}
if($isbranch && !(is_string($item->action) || empty($item->action))) {
$itest = $item->key;
$content = html_writer::tag('li', $content, array('data-role' => 'list-divider', 'class' => ''.$itest.'' ));
}
else if($isbranch) {
$itest = $item->key;
$content = html_writer::tag('li', $content, array('data-role' => 'list-divider'));
}
else {
$itest = $item->text;
$content = html_writer::tag('li', $content, array('class' => ''.$itest.''));
}
$lis[] = $content;
}
if (count($lis)) {
return implode("\n", $lis);
} else {
return '';
}
}
}
//user defined columns for tablets or not
/**
* 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);
}
function mymobile_get_colpos($default='on') {
/**
* 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);
}

File diff suppressed because it is too large Load Diff

View File

@ -27,43 +27,53 @@ defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
$name = 'theme_mymobile/mswatch';
$title = get_string('mswatch','theme_mymobile');
$description = get_string('mswatch_desc', 'theme_mymobile');
// TODO: Really the yes/no settings below should be changed to checkboxes
// given checkboxes are yes/no. Also saves us having to use language
// strings for them.
$yesstr = get_string('yes','theme_mymobile');
$nostr = get_string('no','theme_mymobile');
$name = 'theme_mymobile/colourswatch';
$title = get_string('colourswatch','theme_mymobile');
$description = get_string('colourswatch_desc', 'theme_mymobile');
$default = 'light';
$choices = array('light'=>'light', 'grey'=>'grey');
$choices = array(
'light' => get_string('light', 'theme_mymobile'),
'grey' => get_string('grey', 'theme_mymobile')
);
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
$name = 'theme_mymobile/mtext';
$title = get_string('mtext','theme_mymobile');
$description = get_string('mtext_desc', 'theme_mymobile');
$name = 'theme_mymobile/showmobileintro';
$title = get_string('showmobileintro','theme_mymobile');
$description = get_string('showmobileintro_desc', 'theme_mymobile');
$setting = new admin_setting_confightmleditor($name, $title, $description, '');
$settings->add($setting);
$name = 'theme_mymobile/mtopic';
$title = get_string('mtopic','theme_mymobile');
$description = get_string('mtopic_desc', 'theme_mymobile');
$name = 'theme_mymobile/showsitetopic';
$title = get_string('showsitetopic','theme_mymobile');
$description = get_string('showsitetopic_desc', 'theme_mymobile');
$default = 'topicshow';
$choices = array('topicshow'=>'Yes', 'topicnoshow'=>'No');
$choices = array('topicshow' => $yesstr, 'topicnoshow' => $nostr);
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
$name = 'theme_mymobile/mimgs';
$title = get_string('mimgs','theme_mymobile');
$description = get_string('mimgs_desc', 'theme_mymobile');
$name = 'theme_mymobile/showfullsizeimages';
$title = get_string('showfullsizeimages','theme_mymobile');
$description = get_string('showfullsizeimages_desc', 'theme_mymobile');
$default = 'ithumb';
$choices = array('ithumb'=>'No', 'ithumbno'=>'Yes');
$choices = array('ithumb' => $nostr, 'ithumbno' => $yesstr);
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
$name = 'theme_mymobile/mtab';
$title = get_string('mtab','theme_mymobile');
$description = get_string('mtab_desc', 'theme_mymobile');
$name = 'theme_mymobile/usetableview';
$title = get_string('usetableview','theme_mymobile');
$description = get_string('usetableview_desc', 'theme_mymobile');
$default = 'tabshow';
$choices = array('tabshow'=>'Yes', 'tabnoshow'=>'No');
$choices = array('tabshow' => $yesstr, 'tabnoshow' => $nostr);
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$settings->add($setting);
}
$settings->add($setting);
unset($yesstr);
unset($nostr);
}

File diff suppressed because it is too large Load Diff

View File

@ -11,12 +11,9 @@
* Copyright (c) jQuery Project
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
*/
/* Swatches */
/* A
-----------------------------------------------------------------------------------------------------------*/
.ui-bar-a {
border: 1px solid #2A2A2A /*{a-bar-border}*/;
background: #111111 /*{a-bar-background-color}*/;
@ -30,30 +27,26 @@
background-image: -o-linear-gradient(top, #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Opera 11.10+ */
background-image: linear-gradient(top, #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/);
}
.ui-bar-a,
.ui-bar-a input,
.ui-bar-a select,
.ui-bar-a textarea,
.ui-bar-a,
.ui-bar-a input,
.ui-bar-a select,
.ui-bar-a textarea,
.ui-bar-a button {
font-family: Helvetica, Arial, sans-serif /*{a-bar-font}*/;
}
.ui-bar-a .ui-link-inherit {
color: #fff /*{a-bar-color}*/;
}
.ui-bar-a .ui-link {
color: #7cc4e7 /*{a-bar-link-color}*/;
font-weight: bold;
}
.ui-bar-a .ui-link:hover {
color: #2489CE /*{a-bar-link-hover}*/;
}
.ui-bar-a .ui-link:active {
color: #2489CE /*{a-bar-link-active}*/;
}
.ui-bar-a .ui-link:visited {
color: #2489CE /*{a-bar-link-visited}*/;
}
@ -80,24 +73,19 @@
.ui-body-a .ui-link-inherit {
color: #fff /*{a-body-color}*/;
}
.ui-body-a .ui-link {
color: #2489CE /*{a-body-link-color}*/;
font-weight: bold;
}
.ui-body-a .ui-link:hover {
color: #2489CE /*{a-body-link-hover}*/;
}
.ui-body-a .ui-link:active {
color: #2489CE /*{a-body-link-active}*/;
}
.ui-body-a .ui-link:visited {
color: #2489CE /*{a-body-link-visited}*/;
}
.ui-br {
border-bottom: rgb(130,130,130);
border-bottom: rgba(130,130,130,.3);
@ -158,11 +146,8 @@
font-family: Helvetica, Arial, sans-serif /*{a-button-font}*/;
text-decoration: none;
}
/* B
-----------------------------------------------------------------------------------------------------------*/
.ui-bar-b {
border: 1px solid #456f9a /*{b-bar-border}*/;
background: #5e87b0 /*{b-bar-background-color}*/;
@ -190,15 +175,12 @@
color: #ddf0f8 /*{b-bar-link-color}*/;
font-weight: bold;
}
.ui-bar-b .ui-link:hover {
color: #ddf0f8 /*{b-bar-link-hover}*/;
}
.ui-bar-b .ui-link:active {
color: #ddf0f8 /*{b-bar-link-active}*/;
}
.ui-bar-b .ui-link:visited {
color: #ddf0f8 /*{b-bar-link-visited}*/;
}
@ -225,24 +207,19 @@
.ui-body-b .ui-link-inherit {
color: #333333 /*{b-body-color}*/;
}
.ui-body-b .ui-link {
color: #2489CE /*{b-body-link-color}*/;
font-weight: bold;
}
.ui-body-b .ui-link:hover {
color: #2489CE /*{b-body-link-hover}*/;
}
.ui-body-b .ui-link:active {
color: #2489CE /*{b-body-link-active}*/;
}
.ui-body-b .ui-link:visited {
color: #2489CE /*{b-body-link-visited}*/;
}
.ui-btn-up-b {
border: 1px solid #145072 /*{b-bup-border}*/;
background: #2567ab /*{b-bup-background-color}*/;
@ -297,11 +274,8 @@
font-family: Helvetica, Arial, sans-serif /*{b-button-font}*/;
text-decoration: none;
}
/* C
-----------------------------------------------------------------------------------------------------------*/
.ui-bar-c {
border: 1px solid #B3B3B3 /*{c-bar-border}*/;
background: #e9eaeb /*{c-bar-background-color}*/;
@ -315,7 +289,6 @@
background-image: -o-linear-gradient(top, #f0f0f0 /*{c-bar-background-start}*/, #e9eaeb /*{c-bar-background-end}*/); /* Opera 11.10+ */
background-image: linear-gradient(top, #f0f0f0 /*{c-bar-background-start}*/, #e9eaeb /*{c-bar-background-end}*/);
}
.ui-bar-c .ui-link-inherit {
color: #3E3E3E /*{c-bar-color}*/;
}
@ -323,19 +296,15 @@
color: #7cc4e7 /*{c-bar-link-color}*/;
font-weight: bold;
}
.ui-bar-c .ui-link:hover {
color: #2489CE /*{c-bar-link-hover}*/;
}
.ui-bar-c .ui-link:active {
color: #2489CE /*{c-bar-link-active}*/;
}
.ui-bar-c .ui-link:visited {
color: #2489CE /*{c-bar-link-visited}*/;
}
.ui-bar-c,
.ui-bar-c input,
.ui-bar-c select,
@ -362,28 +331,22 @@
.ui-body-c button {
font-family: Helvetica, Arial, sans-serif /*{c-body-font}*/;
}
.ui-body-c .ui-link-inherit {
color: #333333 /*{c-body-color}*/;
}
.ui-body-c .ui-link {
color: #2489CE /*{c-body-link-color}*/;
font-weight: bold;
}
.ui-body-c .ui-link:hover {
color: #2489CE /*{c-body-link-hover}*/;
}
.ui-body-c .ui-link:active {
color: #2489CE /*{c-body-link-active}*/;
}
.ui-body-c .ui-link:visited {
color: #2489CE /*{c-body-link-visited}*/;
}
.ui-btn-up-c {
border: 1px solid #ccc /*{c-bup-border}*/;
background: #eee /*{c-bup-background-color}*/;
@ -400,7 +363,6 @@
.ui-btn-up-c a.ui-link-inherit {
color: #2F3E46 /*{c-bup-color}*/;
}
.ui-btn-hover-c {
border: 1px solid #bbbbbb /*{c-bhover-border}*/;
background: #dadada /*{c-bhover-background-color}*/;
@ -439,11 +401,8 @@
font-family: Helvetica, Arial, sans-serif /*{c-button-font}*/;
text-decoration: none;
}
/* D
-----------------------------------------------------------------------------------------------------------*/
.ui-bar-d {
border: 1px solid #ccc /*{d-bar-border}*/;
background: #bbb /*{d-bar-background-color}*/;
@ -463,7 +422,6 @@
.ui-bar-d button {
font-family: Helvetica, Arial, sans-serif /*{d-bar-font}*/;
}
.ui-bar-d .ui-link-inherit {
color: #333333 /*{d-bar-color}*/;
}
@ -471,19 +429,15 @@
color: #2489CE /*{d-bar-link-color}*/;
font-weight: bold;
}
.ui-bar-d .ui-link:hover {
color: #2489CE /*{d-bar-link-hover}*/;
}
.ui-bar-d .ui-link:active {
color: #2489CE /*{d-bar-link-active}*/;
}
.ui-bar-d .ui-link:visited {
color: #2489CE /*{d-bar-link-visited}*/;
}
.ui-body-d {
border: 1px solid #ccc /*{d-body-border}*/;
color: #333333 /*{d-body-color}*/;
@ -503,28 +457,22 @@
.ui-body-d button {
font-family: Helvetica, Arial, sans-serif /*{d-body-font}*/;
}
.ui-body-d .ui-link-inherit {
color: #333333 /*{d-body-color}*/;
}
.ui-body-d .ui-link {
color: #2489CE /*{d-body-link-color}*/;
font-weight: bold;
}
.ui-body-d .ui-link:hover {
color: #2489CE /*{d-body-link-hover}*/;
}
.ui-body-d .ui-link:active {
color: #2489CE /*{d-body-link-active}*/;
}
.ui-body-d .ui-link:visited {
color: #2489CE /*{d-body-link-visited}*/;
}
.ui-btn-up-d {
border: 1px solid #ccc /*{d-bup-border}*/;
background: #fff /*{d-bup-background-color}*/;
@ -580,11 +528,8 @@
font-family: Helvetica, Arial, sans-serif /*{d-button-font}*/;
text-decoration: none;
}
/* E
-----------------------------------------------------------------------------------------------------------*/
.ui-bar-e {
border: 1px solid #F7C942 /*{e-bar-border}*/;
background: #fadb4e /*{e-bar-background-color}*/;
@ -611,19 +556,15 @@
color: #2489CE /*{e-bar-link-color}*/;
font-weight: bold;
}
.ui-bar-e .ui-link:hover {
color: #2489CE /*{e-bar-link-hover}*/;
}
.ui-bar-e .ui-link:active {
color: #2489CE /*{e-bar-link-active}*/;
}
.ui-bar-e .ui-link:visited {
color: #2489CE /*{e-bar-link-visited}*/;
}
.ui-body-e {
border: 1px solid #F7C942 /*{e-body-border}*/;
color: #333333 /*{e-body-color}*/;
@ -646,24 +587,19 @@
.ui-body-e .ui-link-inherit {
color: #333333 /*{e-body-color}*/;
}
.ui-body-e .ui-link {
color: #2489CE /*{e-body-link-color}*/;
font-weight: bold;
}
.ui-body-e .ui-link:hover {
color: #2489CE /*{e-body-link-hover}*/;
}
.ui-body-e .ui-link:active {
color: #2489CE /*{e-body-link-active}*/;
}
.ui-body-e .ui-link:visited {
color: #2489CE /*{e-body-link-visited}*/;
}
.ui-btn-up-e {
border: 1px solid #F7C942 /*{e-bup-border}*/;
background: #fadb4e /*{e-bup-background-color}*/;
@ -693,7 +629,6 @@
background-image: -o-linear-gradient(top, #fcf0b5 /*{e-bhover-background-start}*/, #fbe26f /*{e-bhover-background-end}*/); /* Opera 11.10+ */
background-image: linear-gradient(top, #fcf0b5 /*{e-bhover-background-start}*/, #fbe26f /*{e-bhover-background-end}*/);
}
.ui-btn-hover-e a.ui-link-inherit {
color: #333 /*{e-bhover-color}*/;
}
@ -719,20 +654,14 @@
font-family: Helvetica, Arial, sans-serif /*{e-button-font}*/;
text-decoration: none;
}
/* Structure */
/* links within "buttons"
/* links within "buttons"
-----------------------------------------------------------------------------------------------------------*/
a.ui-link-inherit {
text-decoration: none !important;
}
/* Active class used as the "on" state across all themes
-----------------------------------------------------------------------------------------------------------*/
.ui-btn-active {
border: 1px solid #155678 /*{global-active-border}*/;
background: #4596ce /*{global-active-background-color}*/;
@ -752,20 +681,14 @@ a.ui-link-inherit {
.ui-btn-active a.ui-link-inherit {
color: #fff /*{global-active-color}*/;
}
/* button inner top highlight
-----------------------------------------------------------------------------------------------------------*/
.ui-btn-inner {
border-top: 1px solid #fff;
border-color: rgba(255,255,255,.3);
}
/* corner rounding classes
-----------------------------------------------------------------------------------------------------------*/
.ui-corner-tl {
-moz-border-radius-topleft: .6em /*{global-radii-blocks}*/;
-webkit-border-top-left-radius: .6em /*{global-radii-blocks}*/;
@ -828,7 +751,6 @@ a.ui-link-inherit {
-webkit-border-radius: 0;
border-radius: 0;
}
/* Interaction cues
-----------------------------------------------------------------------------------------------------------*/
.ui-disabled {
@ -839,10 +761,8 @@ a.ui-link-inherit {
pointer-events: none;
cursor: default;
}
/* Icons
-----------------------------------------------------------------------------------------------------------*/
.ui-icon,
.ui-icon-searchfield:after {
background: #666 /*{global-icon-color}*/;
@ -853,21 +773,16 @@ a.ui-link-inherit {
-webkit-border-radius: 9px;
border-radius: 9px;
}
/* Alt icon color
-----------------------------------------------------------------------------------------------------------*/
.ui-icon-alt {
background: #fff;
background: rgba(255,255,255,.3);
background-image: url([[pix:theme|icons-18-black]]);
background-repeat: no-repeat;
}
/* HD/"retina" sprite
-----------------------------------------------------------------------------------------------------------*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (min-resolution: 240dpi) {
@ -875,7 +790,7 @@ a.ui-link-inherit {
.ui-icon-plus, .ui-icon-minus, .ui-icon-delete, .ui-icon-arrow-r,
.ui-icon-arrow-l, .ui-icon-arrow-u, .ui-icon-arrow-d, .ui-icon-check,
.ui-icon-gear, .ui-icon-refresh, .ui-icon-forward, .ui-icon-back,
.ui-icon-grid, .ui-icon-star, .ui-icon-alert, .ui-icon-info, .ui-icon-home, .ui-icon-search, .ui-icon-searchfield:after,
.ui-icon-grid, .ui-icon-star, .ui-icon-alert, .ui-icon-info, .ui-icon-home, .ui-icon-search, .ui-icon-searchfield:after,
.ui-icon-checkbox-off, .ui-icon-checkbox-on, .ui-icon-radio-off, .ui-icon-radio-on {
background-image: url([[pix:theme|icons-36-white]]);
-moz-background-size: 776px 18px;
@ -887,7 +802,6 @@ a.ui-link-inherit {
background-image: url([[pix:theme|icons-36-black]]);
}
}
/* plus minus */
.ui-icon-plus {
background-position: -0 50%;
@ -895,12 +809,10 @@ a.ui-link-inherit {
.ui-icon-minus {
background-position: -36px 50%;
}
/* delete/close */
.ui-icon-delete {
background-position: -72px 50%;
}
/* arrows */
.ui-icon-arrow-r {
background-position: -108px 50%;
@ -914,7 +826,6 @@ a.ui-link-inherit {
.ui-icon-arrow-d {
background-position: -216px 50%;
}
/* misc */
.ui-icon-check {
background-position: -252px 50%;
@ -962,8 +873,6 @@ a.ui-link-inherit {
.ui-icon-radio-on {
background-position: -720px 50%;
}
/* checks,radios */
.ui-checkbox .ui-icon {
-moz-border-radius: 3px;
@ -978,7 +887,6 @@ a.ui-link-inherit {
.ui-radio-on .ui-icon {
background-color: #4596ce /*{global-active-background-color}*/; /* NOTE: this hex should match the active state color. It's repeated here for cascade */
}
/* loading icon */
.ui-icon-loading {
background-image: url([[pix:theme|ajax-loader]]);
@ -989,11 +897,8 @@ a.ui-link-inherit {
border-radius: 20px;
background-size: 35px 35px;
}
/* Button corner classes
-----------------------------------------------------------------------------------------------------------*/
.ui-btn-corner-tl {
-moz-border-radius-topleft: 1em /*{global-radii-buttons}*/;
-webkit-border-top-left-radius: 1em /*{global-radii-buttons}*/;
@ -1051,23 +956,22 @@ a.ui-link-inherit {
-webkit-border-radius: 1em /*{global-radii-buttons}*/;
border-radius: 1em /*{global-radii-buttons}*/;
}
/* radius clip workaround for cleaning up corner trapping */
.ui-corner-tl,
.ui-corner-tr,
.ui-corner-bl,
.ui-corner-bl,
.ui-corner-br,
.ui-corner-top,
.ui-corner-bottom,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-left,
.ui-corner-all,
.ui-btn-corner-tl,
.ui-btn-corner-tr,
.ui-btn-corner-bl,
.ui-btn-corner-bl,
.ui-btn-corner-br,
.ui-btn-corner-top,
.ui-btn-corner-bottom,
.ui-btn-corner-bottom,
.ui-btn-corner-right,
.ui-btn-corner-left,
.ui-btn-corner-all {
@ -1075,10 +979,8 @@ a.ui-link-inherit {
-moz-background-clip: padding;
background-clip: padding-box;
}
/* Overlay / modal
-----------------------------------------------------------------------------------------------------------*/
.ui-overlay {
background: #666;
opacity: .5;
@ -1114,25 +1016,20 @@ a.ui-link-inherit {
-webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.4);
box-shadow: 0px 1px 0 rgba(255,255,255,.4);
}
/* Focus state - set here for specificity
-----------------------------------------------------------------------------------------------------------*/
.ui-focus {
-moz-box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/;
-webkit-box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/;
box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/;
}
/* unset box shadow in browsers that don't do it right
-----------------------------------------------------------------------------------------------------------*/
.ui-mobile-nosupport-boxshadow * {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
/* ...and bring back focus */
.ui-mobile-nosupport-boxshadow .ui-focus {
outline-width: 2px;
@ -1141,22 +1038,17 @@ a.ui-link-inherit {
* Copyright (c) jQuery Project
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
*/
/* some unsets - more probably needed */
.ui-mobile, .ui-mobile body { height: 100%; }
.ui-mobile fieldset, .ui-page { padding: 0; margin: 0; }
.ui-mobile a img, .ui-mobile fieldset { border: 0; }
/* responsive page widths */
.ui-mobile-viewport { margin: 0; overflow-x: hidden; -webkit-text-size-adjust: none; -ms-text-size-adjust:none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
/* "page" containers - full-screen views, one should always be in view post-pageload */
.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { top: 0; left: 0; width: 100%; min-height: 100%; position: absolute; display: none; border: 0; }
.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { top: 0; left: 0; width: 100%; min-height: 100%; position: absolute; display: none; border: 0; }
.ui-mobile .ui-page-active { display: block; overflow: visible; }
/* on ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */
.ui-page { outline: none; }
/*orientations from js are available */
@media screen and (orientation: portrait){
.ui-mobile, .ui-mobile .ui-page { min-height: 420px; }
@ -1164,7 +1056,6 @@ a.ui-link-inherit {
@media screen and (orientation: landscape){
.ui-mobile, .ui-mobile .ui-page { min-height: 300px; }
}
/* native overflow scrolling */
.ui-page.ui-mobile-touch-overflow,
.ui-mobile-touch-overflow.ui-native-fixed .ui-content {
@ -1184,7 +1075,6 @@ a.ui-link-inherit {
.ui-page.ui-mobile-pre-transition {
display: block;
}
/* loading screen */
.ui-loading .ui-mobile-viewport { overflow: hidden !important; }
.ui-loading .ui-loader { display: block; }
@ -1192,26 +1082,21 @@ a.ui-link-inherit {
.ui-loader { display: none; position: absolute; opacity: .85; z-index: 100; left: 50%; width: 200px; margin-left: -130px; margin-top: -35px; padding: 10px 30px; }
.ui-loader h1 { font-size: 15px; text-align: center; }
.ui-loader .ui-icon { position: static; display: block; opacity: .9; margin: 0 auto; width: 35px; height: 35px; background-color: transparent; }
/*fouc*/
.ui-mobile-rendering > * { visibility: hidden; }
/*headers, content panels*/
.ui-bar, .ui-body { position: relative; padding: .4em 15px; overflow: hidden; display: block; clear:both; }
.ui-bar { font-size: 16px; margin: 0; }
.ui-bar h1, .ui-bar h2, .ui-bar h3, .ui-bar h4, .ui-bar h5, .ui-bar h6 { margin: 0; padding: 0; font-size: 16px; display: inline-block; }
.ui-header, .ui-footer { display: block; }
.ui-page .ui-header, .ui-page .ui-footer { position: relative; }
.ui-header .ui-btn-left { position: absolute; left: 10px; top: .4em; }
.ui-header .ui-btn-right { position: absolute; right: 10px; top: .4em; }
.ui-header .ui-title, .ui-footer .ui-title { min-height: 1.1em; text-align: center; font-size: 16px; display: block; margin: .6em 90px .8em; padding: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; outline: 0 !important; }
.ui-footer .ui-title { margin: .6em 15px .8em; }
/*content area*/
.ui-content { border-width: 0; overflow: visible; overflow-x: hidden; padding: 15px; }
.ui-page-fullscreen .ui-content { padding:0; }
/* native fixed headers and footers */
.ui-mobile-touch-overflow.ui-page.ui-native-fixed,
.ui-mobile-touch-overflow.ui-page.ui-native-fullscreen {
@ -1248,17 +1133,13 @@ a.ui-link-inherit {
.ui-native-bars-hidden {
display: none;
}
/* icons sizing */
.ui-icon { width: 18px; height: 18px; }
/* fullscreen class on ui-content div */
.ui-fullscreen { }
.ui-fullscreen img { max-width: 100%; }
/* non-js content hiding */
.ui-nojs { position: absolute; left: -9999px; }
/* accessible content hiding */
.ui-hide-label label,
.ui-hidden-accessible { position: absolute !important; left: -9999px; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
@ -1278,7 +1159,6 @@ a.ui-link-inherit {
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(360deg);}
}
/* Transitions from jQtouch (with small modifications): http://www.jqtouch.com/
Built by David Kaneda and maintained by Jonathan Stark.
*/
@ -1286,107 +1166,86 @@ Built by David Kaneda and maintained by Jonathan Stark.
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-duration: 350ms;
}
.slide.out {
-webkit-transform: translateX(-100%);
-webkit-animation-name: slideouttoleft;
}
.slide.in {
-webkit-transform: translateX(0);
-webkit-animation-name: slideinfromright;
}
.slide.out.reverse {
-webkit-transform: translateX(100%);
-webkit-animation-name: slideouttoright;
}
.slide.in.reverse {
-webkit-transform: translateX(0);
-webkit-animation-name: slideinfromleft;
}
.slideup.out {
-webkit-animation-name: dontmove;
z-index: 0;
}
.slideup.in {
-webkit-transform: translateY(0);
-webkit-animation-name: slideinfrombottom;
z-index: 10;
}
.slideup.in.reverse {
z-index: 0;
-webkit-animation-name: dontmove;
}
.slideup.out.reverse {
-webkit-transform: translateY(100%);
z-index: 10;
-webkit-animation-name: slideouttobottom;
}
.slidedown.out {
-webkit-animation-name: dontmove;
z-index: 0;
}
.slidedown.in {
-webkit-transform: translateY(0);
-webkit-animation-name: slideinfromtop;
z-index: 10;
}
.slidedown.in.reverse {
z-index: 0;
-webkit-animation-name: dontmove;
}
.slidedown.out.reverse {
-webkit-transform: translateY(-100%);
z-index: 10;
-webkit-animation-name: slideouttotop;
}
@-webkit-keyframes slideinfromright {
from { -webkit-transform: translateX(100%); }
to { -webkit-transform: translateX(0); }
}
@-webkit-keyframes slideinfromleft {
from { -webkit-transform: translateX(-100%); }
to { -webkit-transform: translateX(0); }
}
@-webkit-keyframes slideouttoleft {
from { -webkit-transform: translateX(0); }
to { -webkit-transform: translateX(-100%); }
}
@-webkit-keyframes slideouttoright {
from { -webkit-transform: translateX(0); }
to { -webkit-transform: translateX(100%); }
}
@-webkit-keyframes slideinfromtop {
from { -webkit-transform: translateY(-100%); }
to { -webkit-transform: translateY(0); }
}
@-webkit-keyframes slideinfrombottom {
from { -webkit-transform: translateY(100%); }
to { -webkit-transform: translateY(0); }
}
@-webkit-keyframes slideouttobottom {
from { -webkit-transform: translateY(0); }
to { -webkit-transform: translateY(100%); }
}
@-webkit-keyframes slideouttotop {
from { -webkit-transform: translateY(0); }
to { -webkit-transform: translateY(-100%); }
@ -1395,23 +1254,19 @@ Built by David Kaneda and maintained by Jonathan Stark.
from { opacity: 0; }
to { opacity: 1; }
}
@-webkit-keyframes fadeout {
from { opacity: 1; }
to { opacity: 0; }
}
.fade.out {
z-index: 0;
-webkit-animation-name: fadeout;
}
.fade.in {
opacity: 1;
z-index: 10;
-webkit-animation-name: fadein;
}
/* The properties in this rule are only necessary for the 'flip' transition.
* We need specify the perspective to create a projection matrix. This will add
* some depth as the element flips. The depth number represents the distance of
@ -1422,93 +1277,74 @@ Built by David Kaneda and maintained by Jonathan Stark.
-webkit-perspective: 1000;
position: absolute;
}
.ui-mobile-viewport-transitioning,
.ui-mobile-viewport-transitioning .ui-page {
width: 100%;
height: 100%;
overflow: hidden;
}
.flip {
-webkit-animation-duration: .65s;
-webkit-backface-visibility:hidden;
-webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */
}
.flip.out {
-webkit-transform: rotateY(-180deg) scale(.8);
-webkit-animation-name: flipouttoleft;
}
.flip.in {
-webkit-transform: rotateY(0) scale(1);
-webkit-animation-name: flipinfromleft;
}
/* Shake it all about */
.flip.out.reverse {
-webkit-transform: rotateY(180deg) scale(.8);
-webkit-animation-name: flipouttoright;
}
.flip.in.reverse {
-webkit-transform: rotateY(0) scale(1);
-webkit-animation-name: flipinfromright;
}
@-webkit-keyframes flipinfromright {
from { -webkit-transform: rotateY(-180deg) scale(.8); }
to { -webkit-transform: rotateY(0) scale(1); }
}
@-webkit-keyframes flipinfromleft {
from { -webkit-transform: rotateY(180deg) scale(.8); }
to { -webkit-transform: rotateY(0) scale(1); }
}
@-webkit-keyframes flipouttoleft {
from { -webkit-transform: rotateY(0) scale(1); }
to { -webkit-transform: rotateY(-180deg) scale(.8); }
}
@-webkit-keyframes flipouttoright {
from { -webkit-transform: rotateY(0) scale(1); }
to { -webkit-transform: rotateY(180deg) scale(.8); }
}
/* Hackish, but reliable. */
@-webkit-keyframes dontmove {
from { opacity: 1; }
to { opacity: 1; }
}
.pop {
-webkit-transform-origin: 50% 50%;
}
.pop.in {
-webkit-transform: scale(1);
opacity: 1;
-webkit-animation-name: popin;
z-index: 10;
}
.pop.in.reverse {
z-index: 0;
-webkit-animation-name: dontmove;
}
.pop.out.reverse {
-webkit-transform: scale(.2);
opacity: 0;
-webkit-animation-name: popout;
z-index: 10;
}
@-webkit-keyframes popin {
from {
-webkit-transform: scale(.2);
@ -1519,7 +1355,6 @@ Built by David Kaneda and maintained by Jonathan Stark.
opacity: 1;
}
}
@-webkit-keyframes popout {
from {
-webkit-transform: scale(1);
@ -1534,26 +1369,20 @@ Built by David Kaneda and maintained by Jonathan Stark.
* Copyright (c) jQuery Project
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
*/
/* content configurations. */
.ui-grid-a, .ui-grid-b, .ui-grid-c, .ui-grid-d { overflow: hidden; }
.ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d, .ui-block-e { margin: 0; padding: 0; border: 0; float: left; min-height:1px;}
/* grid solo: 100 - single item fallback */
.ui-grid-solo .ui-block-a { width: 100%; float: none; }
/* grid a: 50/50 */
.ui-grid-a .ui-block-a, .ui-grid-a .ui-block-b { width: 50%; }
.ui-grid-a .ui-block-a { clear: left; }
/* grid b: 33/33/33 */
.ui-grid-b .ui-block-a, .ui-grid-b .ui-block-b, .ui-grid-b .ui-block-c { width: 33.333%; }
.ui-grid-b .ui-block-a { clear: left; }
/* grid c: 25/25/25/25 */
.ui-grid-c .ui-block-a, .ui-grid-c .ui-block-b, .ui-grid-c .ui-block-c, .ui-grid-c .ui-block-d { width: 25%; }
.ui-grid-c .ui-block-a { clear: left; }
/* grid d: 20/20/20/20/20 */
.ui-grid-d .ui-block-a, .ui-grid-d .ui-block-b, .ui-grid-d .ui-block-c, .ui-grid-d .ui-block-d, .ui-grid-d .ui-block-e { width: 20%; }
.ui-grid-d .ui-block-a { clear: left; }
@ -1627,7 +1456,6 @@ Built by David Kaneda and maintained by Jonathan Stark.
.ui-header .ui-btn-icon-bottom .ui-btn-inner,
.ui-footer .ui-btn-icon-bottom .ui-btn-inner,
.ui-bar .ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 27px; }
/*btn icon positioning*/
.ui-btn-icon-notext .ui-icon { display: block; z-index: 0;}
.ui-btn-icon-left .ui-icon, .ui-btn-icon-right .ui-icon { position: absolute; top: 50%; margin-top: -9px; }
@ -1648,7 +1476,6 @@ Built by David Kaneda and maintained by Jonathan Stark.
.ui-header .ui-btn-icon-bottom .ui-icon,
.ui-footer .ui-btn-icon-bottom .ui-icon,
.ui-bar .ui-btn-icon-bottom .ui-icon { bottom: 4px; }
/*hiding native button,inputs */
.ui-btn-hidden { position: absolute; top: 0; left: 0; width: 100%; height: 100%; -webkit-appearance: button; opacity: .1; cursor: pointer; background: transparent; font-size: 1px; border: none; line-height: 999px; }
/*
@ -1673,7 +1500,6 @@ Built by David Kaneda and maintained by Jonathan Stark.
font-weight: normal; /* Overrides ui-btn-up-* */
}
.ui-collapsible-content-collapsed { display: none; }
.ui-collapsible-set { margin: .5em 0; }
.ui-collapsible-set .ui-collapsible { margin: -1px 0 0; }
/*
@ -1689,7 +1515,6 @@ Built by David Kaneda and maintained by Jonathan Stark.
.ui-controlgroup-vertical .ui-btn,
.ui-controlgroup-vertical .ui-checkbox, .ui-controlgroup-vertical .ui-radio { margin: 0; border-bottom-width: 0; }
.ui-controlgroup-controls label.ui-select { position: absolute; left: -9999px; }
.ui-controlgroup-vertical .ui-controlgroup-last { border-bottom-width: 1px; }
.ui-controlgroup-horizontal { padding: 0; }
.ui-controlgroup-horizontal .ui-btn, .ui-controlgroup-horizontal .ui-select { display: inline-block; margin: 0 -5px 0 0; }
@ -1702,11 +1527,10 @@ Built by David Kaneda and maintained by Jonathan Stark.
.ui-controlgroup .ui-btn-icon-notext { width: 30px; height: 30px; text-indent: -9999px; }
.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner { padding: 5px 6px 5px 5px; }
*/
@media all and (min-width: 450px){
.ui-field-contain .ui-controlgroup-label { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; }
.ui-field-contain .ui-controlgroup-controls { width: 60%; display: inline-block; }
.ui-field-contain .ui-controlgroup .ui-select { width: 100%; }
.ui-field-contain .ui-controlgroup .ui-select { width: 100%; }
.ui-field-contain .ui-controlgroup-horizontal .ui-select { width: auto; }
} /*
* jQuery Mobile Framework
@ -1751,17 +1575,13 @@ Built by David Kaneda and maintained by Jonathan Stark.
.ui-select .ui-btn select { cursor: pointer; -webkit-appearance: button; left: 0; top:0; width: 100%; min-height: 1.5em; min-height: 100%; height: 3em; max-height: 100%; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); z-index: 2; }
@-moz-document url-prefix() {.ui-select .ui-btn select { opacity: 0.0001; }}
.ui-select .ui-btn select.ui-select-nativeonly { opacity: 1; text-indent: 0; }
.ui-select .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; }
.ui-select .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; }
.ui-select .ui-btn-icon-right .ui-icon { right: 15px; }
/* labels */
label.ui-select { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; display: block; }
/*listbox*/
.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: block; min-height: 1em; overflow: hidden; }
.ui-select .ui-btn-text { text-overflow: ellipsis; }
.ui-selectmenu { position: absolute; padding: 0; z-index: 100 !important; width: 80%; max-width: 350px; padding: 6px; }
.ui-selectmenu .ui-listview { margin: 0; }
.ui-selectmenu .ui-btn.ui-li-divider { cursor: default; }
@ -1771,12 +1591,10 @@ label.ui-select { font-size: 16px; line-height: 1.4; font-weight: normal; margi
.ui-selectmenu-list .ui-li .ui-icon { display: block; }
.ui-li.ui-selectmenu-placeholder { display: none; }
.ui-selectmenu .ui-header .ui-title { margin: 0.6em 46px 0.8em; }
@media all and (min-width: 450px){
.ui-field-contain label.ui-select { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; }
.ui-field-contain .ui-select { width: 60%; display: inline-block; }
}
}
/* when no placeholder is defined in a multiple select, the header height doesn't even extend past the close button. this shim's content in there */
.ui-selectmenu .ui-header h1:after { content: '.'; visibility: hidden; }/*
* jQuery Mobile Framework
@ -1792,17 +1610,16 @@ textarea.ui-input-text { height: 50px; -webkit-transition: height 200ms linear;
.ui-input-search input.ui-input-text { border: none; width: 98%; padding: .4em 0; margin: 0; display: block; background: transparent none; outline: 0 !important; }
.ui-input-search .ui-input-clear { position: absolute; right: 0; top: 50%; margin-top: -13px; }
.ui-input-search .ui-input-clear-hidden { display: none; }
/* orientation adjustments - incomplete!*/
@media all and (min-width: 450px){
.ui-field-contain label.ui-input-text { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0 }
.ui-field-contain input.ui-input-text,
.ui-field-contain textarea.ui-input-text,
.ui-field-contain .ui-input-search { width: 60%; display: inline-block; }
.ui-field-contain input.ui-input-text,
.ui-field-contain textarea.ui-input-text,
.ui-field-contain .ui-input-search { width: 60%; display: inline-block; }
.ui-field-contain .ui-input-search { width: 50%; }
.ui-hide-label input.ui-input-text,
.ui-hide-label textarea.ui-input-text,
.ui-hide-label .ui-input-search { padding: .4em 1.5%; width: 97%; }
.ui-hide-label input.ui-input-text,
.ui-hide-label textarea.ui-input-text,
.ui-hide-label .ui-input-search { padding: .4em 1.5%; width: 97%; }
.ui-input-search input.ui-input-text { width: 98%; /*echos rule from above*/ }
}/*
* jQuery Mobile Framework
@ -1834,11 +1651,10 @@ ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid
.ui-li-thumb, .ui-li-icon { position: absolute; left: 1px; top: 0; max-height: 80px; max-width: 80px; }
.ui-li-icon { max-height: 40px; max-width: 40px; left: 10px; top: .9em; }
.ui-li-thumb, .ui-li-icon, .ui-li-content { float: left; margin-right: 10px; }
.ui-li-aside { float: right; width: 50%; text-align: right; margin: .3em 0; }
@media all and (min-width: 480px){
.ui-li-aside { width: 45%; }
}
}
.ui-li-divider { cursor: default; }
.ui-li-has-alt .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-alt { padding-right: 95px; }
.ui-li-has-count .ui-li-count { position: absolute; font-size: 11px; font-weight: bold; padding: .2em .5em; top: 50%; margin-top: -.9em; right: 38px; }
@ -1848,12 +1664,9 @@ ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid
.ui-li-link-alt .ui-btn { overflow: hidden; position: absolute; right: 8px; top: 50%; margin: -11px 0 0 0; border-bottom-width: 1px; z-index: -1;}
.ui-li-link-alt .ui-btn-inner { padding: 0; height: 100%; position: absolute; width: 100%; top: 0; left: 0;}
.ui-li-link-alt .ui-btn .ui-icon { right: 50%; margin-right: -9px; }
.ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner { border-top: 0px; }
.ui-listview-filter { border-width: 0; overflow: hidden; margin: -15px -15px 15px -15px }
.ui-listview-filter .ui-input-search { margin: 5px; width: auto; display: block; }
.ui-listview-filter-inset { margin: -15px -5px -15px -5px; background: transparent; }
.ui-li.ui-screen-hidden{display:none;}
/* Odd iPad positioning issue. */
@ -1875,8 +1688,7 @@ a.ui-slider-handle .ui-btn-inner { padding-left: 0; padding-right: 0; }
@media all and (min-width: 480px){
.ui-field-contain label.ui-slider { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; }
.ui-field-contain div.ui-slider { width: 43%; }
}
}
div.ui-slider-switch { height: 32px; overflow: hidden; margin-left: 0; }
div.ui-slider-inneroffset { margin-left: 50%; position: absolute; top: 1px; height: 100%; width: 50%; }
a.ui-slider-handle-snapping { -webkit-transition: left 100ms linear; }
@ -1885,7 +1697,6 @@ div.ui-slider-switch div.ui-slider-labelbg-a { width: 60%; height: 100%; left: 0
div.ui-slider-switch div.ui-slider-labelbg-b { width: 60%; height: 100%; right: 0; }
.ui-slider-switch-a div.ui-slider-labelbg-a, .ui-slider-switch-b div.ui-slider-labelbg-b { z-index: -1; }
.ui-slider-switch-a div.ui-slider-labelbg-b, .ui-slider-switch-b div.ui-slider-labelbg-a { z-index: 0; }
div.ui-slider-switch a.ui-slider-handle { z-index: 20; width: 101%; height: 32px; margin-top: -18px; margin-left: -101%; }
span.ui-slider-label { width: 100%; position: absolute;height: 32px; font-size: 16px; text-align: center; line-height: 2; background: none; border-color: transparent; }
span.ui-slider-label-a { left: -100%; margin-right: -1px }

View File

@ -4,67 +4,52 @@
.ui-content {
min-height: 253px;
}
.forumpost div.commands a {
font-size: 80%;
}
.forumpost div.commands a .ui-btn-inner {
padding: 0.6em 20px;
}
table.quizattemptsummary td, table.quizattemptsummary th.header {
font-size: 90%;
}
table.user-grade {
font-size:90%;
overflow: auto;
}
}
#message_contacts td.link {
width: 85%;
text-align: left;
}
#message_contacts .contact {
width: 10%;
font-size: 10px;
}
#message_contacts td.pix {
width: 10%;
}
td.today.cell li a {
font-size: 80%;
font-weight: normal;
}
div.gradeparent {
max-height: 200px;
}
.resourcecontent {
max-height: 250px;
}
.path-mod-forum div.subject {
font-size: 100%;
}
}
@media all and (max-width: 650px){
.forumpost div.commands a {
font-size: 80%;
}
.forumpost div.commands a .ui-btn-inner {
padding: 0.6em 20px;
}
}
/* iPad [portrait */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.ui-content {
@ -89,7 +74,6 @@
max-height: 300px;
}
}
/* browser */
@media only screen and (min-device-width: 1025px) {
.ui-content {
@ -99,11 +83,8 @@
min-height: 200px;
}
}
.portrait .mspacer {
height: 90px;
border: 0px solid #333;
}
/*end 100% height */

View File

@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2011101801; // The current module version (Date: YYYYMMDDXX)
$plugin->version = 2011101801; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2011070101; // Requires this Moodle version
$plugin->component = 'theme_mymobile';
$plugin->requires = 2011070101; // Requires this Moodle version
$plugin->maturity = MATURITY_STABLE;
$plugin->maturity = MATURITY_STABLE;