diff --git a/theme/mymobile/config.php b/theme/mymobile/config.php index c9c8b6dbbcb..b0f838ff051 100644 --- a/theme/mymobile/config.php +++ b/theme/mymobile/config.php @@ -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'; \ No newline at end of file +// Sets a custom render factory to use with the theme, used when working with custom renderers. +$THEME->rendererfactory = 'theme_overridden_renderer_factory'; \ No newline at end of file diff --git a/theme/mymobile/javascript/custom.js b/theme/mymobile/javascript/custom.js index 4cd67fb040a..a497ffc20b3 100644 --- a/theme/mymobile/javascript/custom.js +++ b/theme/mymobile/javascript/custom.js @@ -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(' ' + ggg + ''); - }); -}); + //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('' + ggb + ''); - } - }); -}); + //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(''); - }); -}); - -//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('
'); - $('.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('
','').replace(')',''); - $(this).prev('td').find('a').append('' + cpsc + ''); - }); - $('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(' ' + ggg + ''); + }); + }); + //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('' + ggb + ''); + } + }); + }); + + //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(''); + }); + }); + + //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('
'); + $('.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('
','').replace(')',''); + $(this).prev('td').find('a').append('' + cpsc + ''); + }); + $('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); + }); + }); +}); \ No newline at end of file diff --git a/theme/mymobile/lang/en/theme_mymobile.php b/theme/mymobile/lang/en/theme_mymobile.php index e0deb781abb..9b3d0cd85af 100644 --- a/theme/mymobile/lang/en/theme_mymobile.php +++ b/theme/mymobile/lang/en/theme_mymobile.php @@ -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'] = '

MyMobile

About

MyMobile is a mobile theme for Moodle 2.x. More information on modifying themes can be found in the MoodleDocs.

'; - -$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'; \ No newline at end of file +$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'; \ No newline at end of file diff --git a/theme/mymobile/layout/embedded.php b/theme/mymobile/layout/embedded.php index d6756452717..e7fe4f0bdd3 100644 --- a/theme/mymobile/layout/embedded.php +++ b/theme/mymobile/layout/embedded.php @@ -1,63 +1,74 @@ 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 . + +/** + * 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; -?> -doctype() ?> -page->pagetype; ?> +echo $OUTPUT->doctype() ?> htmlattributes() ?>> - <?php echo $SITE->shortname ?> + <?php echo $PAGE->title ?> - - + + standard_head_html() ?> - -standard_top_of_body_html() ?> - - - - - -
- - -
- -
> -
>

heading ?> 

- - - -
-
> + standard_top_of_body_html() ?> + + +
+
+ +
+
+

heading ?> 

+ + + +
+
+ +
- - - - - -standard_end_of_body_html() ?> + + + standard_end_of_body_html() ?> \ No newline at end of file diff --git a/theme/mymobile/layout/general.php b/theme/mymobile/layout/general.php index 898a671e64f..8d5383033e1 100644 --- a/theme/mymobile/layout/general.php +++ b/theme/mymobile/layout/general.php @@ -1,292 +1,275 @@ . + +/** + * 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() ?> htmlattributes() ?>> - <?php echo $SITE->shortname ?> + <?php echo $PAGE->title ?> - + standard_head_html() ?> - - -standard_top_of_body_html() ?> + standard_top_of_body_html() ?> +
+ +
class="mymobileheader"> +

heading ?>

+ + + login_info(); + } ?> + +
+
    + +
  • + + +
  • + + +
  • + + +
  • navbar(); ?>
  • + +
+
+ +
+ + -
" data-title="shortname) ?>"> - -
class="mymobileheader"> -

heading ?>

- - - login_info(); - } - ?> - - -
-
    - - -
  • - - - -
  • - - - -
  • - - - -
  • - - -
-
- -
- - - -
> - -

- -

+ +
> + +

lang_menu(); - $mobileblocks = new mymobile_mobileblocks_renderer($this->page, null); - ?> -
    - settings_tree($this->page->settingsnav); + echo $OUTPUT->lang_menu(); ?> +
      + settings_tree($PAGE->settingsnav); ?>
    login_info(); ?> - - - -
    -
    - - - - theme->settings->mtext; ?> - - - -
    -
    + +
    +
    + + + theme->settings->showmobileintro; ?> + + main_content(); ?> + +
    +
    - -
    -
    -

    heading ?>

    - page->course->summary; ?> -
    - - - -
    - blocks_for_region('myblocks') ?> -
    - - - - -
    data-content-theme="" id="profcol"> -

    firstname.' '.$USER->lastname.''); ?>

    - -
    -
    - user_picture($USER, array('size'=>80)), array('class'=>'userimg')); - ?> + +
    +
    +

    heading ?>

    + course->summary; ?> +
    + + +
    + blocks_for_region('myblocks') ?> +
    + + + + +
    data-content-theme="" id="profcol"> +

    firstname.' '.$USER->lastname.''); ?>

    +
    +
    + user_picture($USER, array('size'=>80)), array('class'=>'userimg'));?> +
    +
    + + + +
    +
    +
    + +
    + + +
    + + + href="wwwroot) ?>/login/index.php"> + +
    + + + +
    blocks_for_region('myblocks') ?>
    -
    - - - + + + +
    > +
    +
      +
    • + messaging)) { ?> +
    • + + +
    • + +
    +
    + + +
    + login_info_footer(); + echo '
    '; + echo $OUTPUT->standard_footer_html(); + echo '
    '; + ?>
    -
    - -
    - - -
    - - - - - - href="wwwroot) ?>/login/index.php"> - - - -
    - +
    - - -
    - blocks_for_region('myblocks') ?> -
    - - + +
    +
    +
    +
    + + - -
    - - - -
    > -
    -
      - -
    • - - messaging)) { ?> -
    • - - - -
    • - -
    - -
    -
    - - -
    - login_infoB(); - echo '
    '; - echo $OUTPUT->standard_footer_html(); - echo '
    '; - ?> -
    - - -
- - -
-
-
-
- - - - -standard_end_of_body_html() ?> + standard_end_of_body_html() ?> \ No newline at end of file diff --git a/theme/mymobile/lib.php b/theme/mymobile/lib.php index 45a31a86769..cefa013ab36 100644 --- a/theme/mymobile/lib.php +++ b/theme/mymobile/lib.php @@ -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); } \ No newline at end of file diff --git a/theme/mymobile/renderers.php b/theme/mymobile/renderers.php index 2448addd00c..9edd7cc44ce 100644 --- a/theme/mymobile/renderers.php +++ b/theme/mymobile/renderers.php @@ -1,5 +1,5 @@ . /** - * renderers file for mymobile theme + * Renderers for the mymobile theme + * + * @package theme + * @subpackage mymobile + * @copyright John Stabinger + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/** + * A custom renderer for the mymobile theme to produce snippets of content. + * + * @package theme + * @subpackage mymobile + * @copyright John Stabinger + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class theme_mymobile_renderer extends plugin_renderer_base { + + /** + * Produces the settings tree + * + * @param settings_navigation $navigation + * @return string + */ + public function settings_tree(settings_navigation $navigation) { + $content = $this->navigation_node($navigation, array('class' => 'settings')); + if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) { + // TODO: Work out whether something is missing from here. + } + return $content; + } + + /** + * Produces the navigation tree + * + * @param global_navigation $navigation + * @return string + */ + public function navigation_tree(global_navigation $navigation) { + return $this->navigation_node($navigation, array()); + } + + /** + * Protected method to render a navigaiton node + * + * @param navigation_node $node + * @param array $attrs + * @return type + */ + 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); + $item->hideicon = true; + + $content = $this->output->render($item); + $content .= $this->navigation_node($item); + + if ($isbranch && !(is_string($item->action) || empty($item->action))) { + $content = html_writer::tag('li', $content, array('data-role' => 'list-divider', 'class' => (string)$item->key)); + } else if($isbranch) { + $content = html_writer::tag('li', $content, array('data-role' => 'list-divider')); + } else { + $content = html_writer::tag('li', $content, array('class' => (string)$item->text)); + } + $lis[] = $content; + } + if (!count($lis)) { + return ''; + } + return implode("\n", $lis); + } +} + +/** + * Overridden core renderer for the mymobile theme * * @package theme * @subpackage mymobile @@ -23,91 +110,63 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class theme_mymobile_core_renderer extends core_renderer { - - public function themeswatch() { - if (!empty($this->page->theme->settings->mswatch)) { - $showswatch = $this->page->theme->settings->mswatch; - } else { - $showswatch = 'light'; - } - if ($showswatch == 'light') { - $dtheme = 'b'; - } - else { - $dtheme = 'd'; - } - return $dtheme; - } - - public function heading($text, $level = 2, $classes = 'main', $id = null) { - - if (!empty($this->page->theme->settings->mswatch)) { - $showswatch = $this->page->theme->settings->mswatch; - } else { - $showswatch = 'light'; - } - if ($showswatch == 'light') { - $dtheme = 'b'; - } - else { - $dtheme = 'd'; - } - if ($classes == 'helpheading') { - //keeps wrap from help headings in dialog - $content = parent::heading($text, $level, $classes, $id); - } else { - $content = html_writer::start_tag('div', array('class'=>'headingwrap ui-bar-'.$dtheme .' ui-footer')); - $classes .= ' ui-title'; - $content .= parent::heading($text, $level, $classes, $id); - $content .= html_writer::end_tag('div'); - } - return $content; -} - - public function box2($contents, $classes = 'generalbox2', $id = null) { - if (!empty($this->page->theme->settings->mswatch)) { - $showswatch = $this->page->theme->settings->mswatch; - } else { - $showswatch = 'light'; - } - if ($showswatch == 'light') { - $dtheme = 'b'; - } - else { - $dtheme = 'd'; - } - $content = html_writer::start_tag('ul', array('data-role'=>'listview', 'data-inset'=>'true', 'data-dividertheme'=>''.$dtheme .'')); - $content .= $contents; - $content .= html_writer::end_tag('ul'); + /** + * Returns the dtheme to use for the selected swatch + * + * @return string + */ + protected function theme_swatch() { + $showswatch = 'light'; + if (!empty($this->page->theme->settings->colourswatch)) { + $showswatch = $this->page->theme->settings->colourswatch; + } + if ($showswatch == 'light') { + $dtheme = 'b'; + } else { + $dtheme = 'd'; + } + return $dtheme; + } + + /** + * Produces a heading + * + * @param string $text + * @param int $level + * @param string $classes + * @param string $id + * @return string + */ + public function heading($text, $level = 2, $classes = 'main', $id = null) { + if ($classes == 'helpheading') { + // Keeps wrap from help headings in dialog. + $content = parent::heading($text, $level, $classes, $id); + } else { + $content = html_writer::start_tag('div', array('class' => 'headingwrap ui-bar-'.$this->theme_swatch() .' ui-footer')); + $content .= parent::heading($text, $level, $classes.' ui-title', $id); + $content .= html_writer::end_tag('div'); + } return $content; } - - function block(block_contents $bc, $region) { - if (!empty($this->page->theme->settings->mswatch)) { - $showswatch = $this->page->theme->settings->mswatch; - } else { - $showswatch = ''; - } - if ($showswatch == 'light') { - $dtheme = 'd'; - } - else { - $dtheme = 'c'; - } + /** + * Renders a block + * + * @param block_contents $bc + * @param string $region + * @return string + */ + public function block(block_contents $bc, $region) { + // Avoid messing up the object passed in. + $bc = clone($bc); + // The mymobile theme does not support collapsible blocks. + $bc->collapsible = block_contents::NOT_HIDEABLE; + // There are no controls that are usable within the + $bc->controls = array(); - $bc = clone($bc); // Avoid messing up the object passed in. - if (empty($bc->blockinstanceid) || !strip_tags($bc->title)) { - $bc->collapsible = block_contents::NOT_HIDEABLE; - } - if ($bc->collapsible == block_contents::HIDDEN) { - - } - if (!empty($bc->controls)) { - - } - + // TODO: Do we still need to support accessibility here? Surely screen + // readers don't present themselves as mobile devices too often. $skiptitle = strip_tags($bc->title); if (empty($skiptitle)) { $output = ''; @@ -117,30 +176,29 @@ class theme_mymobile_core_renderer extends core_renderer { $skipdest = html_writer::tag('span', '', array('id' => 'sb-' . $bc->skipid, 'class' => 'skip-block-to')); } $testb = $bc->attributes['class']; - + + // TODO: Find a better solution to this hardcoded block checks if ($testb == "block_calendar_month2 block") { - $output = html_writer::start_tag('span'); + $output = html_writer::start_tag('span'); + } else if ($testb == "block_course_overview block") { + $output = html_writer::start_tag('div'); + } else { + if (!empty($this->page->theme->settings->colourswatch)) { + $showswatch = $this->page->theme->settings->colourswatch; + } else { + $showswatch = ''; + } + if ($showswatch == 'light') { + $dtheme = 'd'; + } else { + $dtheme = 'c'; + } + $output = html_writer::start_tag('div', array('data-role' => 'collapsible', 'data-collapsed' => 'true', 'data-content-theme' => $dtheme)); } - - else if ($testb == "block_course_overview block") { - $output = html_writer::start_tag('div'); - } - - else { - $output = html_writer::start_tag('div', array('data-role'=>'collapsible','data-collapsed'=>'true','data-content-theme'=>$dtheme)); - } - - $colheader = $this->block_header($bc); - if ($colheader == "") { - $colheader = " "; - } - - $output .= html_writer::start_tag('h1'); - $output .= $colheader; - $output .= html_writer::end_tag('h1'); + + $output .= html_writer::tag('h1', $this->block_header($bc)); $output .= html_writer::start_tag('div', $bc->attributes); $output .= $this->block_content($bc); - $output .= html_writer::end_tag('div'); $output .= html_writer::end_tag('div'); @@ -151,131 +209,93 @@ class theme_mymobile_core_renderer extends core_renderer { return $output; } - - + /** + * Produces a blocks header + * + * @param block_contents $bc + * @return string + */ protected function block_header(block_contents $bc) { - $title = ''; - if ($bc->title) { - $title = $bc->title; - } - - $controlshtml = ""; - $output = ''; - if ($title || $controlshtml) { - $output .= html_writer::tag('div', html_writer::tag('div', html_writer::tag('div', '', array('class'=>'block_action')). $title . $controlshtml, array('class' => 'title')), array('class' => 'header')); - + if (!$bc->title) { + return ' '; } + $output = html_writer::start_tag('div', array('class' => 'header')); + $output .= html_writer::tag('div', html_writer::tag('div', '', array('class'=>'block_action')). $bc->title, array('class' => 'title')); + $output .= html_writer::end_tag('div'); return $output; } - protected function init_block_hider_js(block_contents $bc) { - if (!empty($bc->attributes['id']) and $bc->collapsible != block_contents::NOT_HIDEABLE) { - $config = new stdClass; - $config->id = $bc->attributes['id']; - $config->title = strip_tags($bc->title); - $config->preference = 'block' . $bc->blockinstanceid . 'hidden'; - $config->tooltipVisible = get_string('hideblocka', 'access', $config->title); - $config->tooltipHidden = get_string('showblocka', 'access', $config->title); - - } + /** + * An evil function we don't want to execute + * + * @param block_contents $bc + */ + protected function init_block_hider_js(block_contents $bc) { + // The mymobile theme in no shape or form supports the hiding of blocks + // this function has been defined and left empty intentionally so that + // the block hider JS is not even included. } - - public function navbar() { - $items = $this->page->navbar->get_items(); - $count = 0; + /** + * Produces the navigation bar for the mymobile theme + * + * @return string + */ + public function navbar() { + $items = $this->page->navbar->get_items(); - $htmlblocks = array(); + $htmlblocks = array(html_writer::tag('option', get_string('navigation'), array('data-placeholder' => 'true', 'value' => '-1'))); // Iterate the navarray and display each node $itemcount = count($items); $separator = ""; - - for ($i=0;$i < $itemcount;$i++) { + + for ($i = 0; $i < $itemcount; $i++) { $item = $items[$i]; $item->hideicon = true; - - if ($i===0) { - - $testg = $item->action; - $content = html_writer::tag('option', $this->render($item), array('value' => ''.$testg.'')); - + if ($i === 0) { + $content = html_writer::tag('option', $this->render($item), array('value' => (string)$item->action)); + } else if (!empty($item->action)) { + $content = html_writer::tag('option', $this->render($item), array('value' => (string)$item->action)); } else { - //by john to check for action type and list div - if (empty($item->action)) { - $content = ""; - } else { - $testg = $item->action; - $content = html_writer::tag('option', $this->render($item), array('value' => ''.$testg.'')); - } + $content = ''; } $htmlblocks[] = $content; } - - if (!empty($this->page->theme->settings->mswatch)) { - $showswatch = $this->page->theme->settings->mswatch; - } else { - $showswatch = ""; - } - if ($showswatch == "light") { - $dtheme = "b"; - } - else { - $dtheme = "d"; - } - - $navbarcontent = join('', $htmlblocks); + $navbarcontent = html_writer::start_tag('form', array('id' => 'navselectform')); + $navbarcontent .= html_writer::start_tag('select', array('id' => 'navselect', 'data-theme' => 'c', 'data-inline' => 'false', 'data-icon' => 'false')); + $navbarcontent .= join('', $htmlblocks); + $navbarcontent .= html_writer::end_tag('select'); + $navbarcontent .= html_writer::end_tag('form'); // XHTML return $navbarcontent; - } - - - protected function render_navigation_node(navigation_node $item) { - $content = $item->get_content(); - $title = $item->get_title(); - if ($item->icon instanceof renderable && !$item->hideicon) { - $icon = $this->render($item->icon); - $content = $icon.$content; // use CSS for spacing of icons - } - if ($item->helpbutton !== null) { - $content = trim($item->helpbutton).html_writer::tag('span', $content, array('class'=>'clearhelpbutton')); - } - if ($content === '') { - return ''; - } - if ($item->action instanceof action_link) { - //TODO: to be replaced with something else - $link = $item->action; - if ($item->hidden) { - $link->add_class('dimmed'); - } - $content = $this->render($link); - } else if ($item->action instanceof moodle_url) { - $attributes = array(); - if ($title !== '') { - $attributes['title'] = $title; - } - if ($item->hidden) { - $attributes['class'] = 'dimmed_text'; - } - $content = html_writer::link($item->action, $content, $attributes); + } - } else if (is_string($item->action) || empty($item->action)) { - $attributes = array(); - if ($title !== '') { - $attributes['title'] = $title; - } - if ($item->hidden) { - $attributes['class'] = 'dimmed_text'; - } - $content = html_writer::tag('span', $content, $attributes); - } + /** + * Renders a navigation node + * + * This function has been overridden to remove tabindexs + * + * @param navigation_node $item + * @return string + */ + protected function render_navigation_node(navigation_node $item) { + // Generate the content normally + $content = parent::render_navigation_node($item); + // Strip out any tabindex's + $content = str_replace(' tabindex="0"', '', $content); + $content = str_replace(' tabindex=\'0\'', '', $content); + // Return the cleaned content return $content; } - - public function login_info() { + /** + * Displays login info + * + * @return string + */ + public function login_info() { global $USER, $CFG, $DB, $SESSION; if (during_initial_install()) { @@ -287,7 +307,6 @@ class theme_mymobile_core_renderer extends core_renderer { if (session_is_loggedinas()) { $realuser = session_get_realuser(); $fullname = fullname($realuser, true); - $realuserinfo = " [wwwroot/course/loginas.php?id=$course->id&sesskey=".sesskey()."\">$fullname] "; } else { $realuserinfo = ''; @@ -300,34 +319,32 @@ class theme_mymobile_core_renderer extends core_renderer { return ''; } else if (isloggedin()) { $context = get_context_instance(CONTEXT_COURSE, $course->id); - $fullname = fullname($USER, true); - + // Since Moodle 2.0 this link always goes to the public profile page (not the course profile page) - $username = ""; + // TODO: Test what happens when someone is using this via mnet [for this as well as login_info_footer] + // TODO: Test what happens when you use the loginas feature [for this as well as login_info_footer] + $username = ""; if (is_mnet_remote_user($USER) and $idprovider = $DB->get_record('mnet_host', array('id'=>$USER->mnethostid))) { $username .= " from wwwroot}\">{$idprovider->name}"; } if (isguestuser()) { - $loggedinas = $realuserinfo.get_string('loggedinasguest'). - " (".get_string('login').')'; + $loggedinas = $realuserinfo.get_string('loggedinasguest')." (".get_string('login').')'; } else if (is_role_switched($course->id)) { // Has switched roles $rolename = ''; if ($role = $DB->get_record('role', array('id'=>$USER->access['rsw'][$context->path]))) { $rolename = ': '.format_string($role->name); } - - } else { - $loggedinas = $realuserinfo.$username.' '. - ''.get_string('logout').''; + $loggedinas = $realuserinfo.$username.' '.get_string('logout').''; } } else { - $loggedinas = ''.get_string('login').''; + $loggedinas = ''.get_string('login').''; } - $loggedinas = $loggedinas; - + // TODO: Enable $CFG->displayloginfailures and test as admin what happens after you succesfully + // log in after a failed log in attempt. [for this as well as login_info_footer] + // This is probably totally unneeded if (isset($SESSION->justloggedin)) { unset($SESSION->justloggedin); if (!empty($CFG->displayloginfailures)) { @@ -340,8 +357,7 @@ class theme_mymobile_core_renderer extends core_renderer { $loggedinas .= get_string('failedloginattemptsall', '', $count); } if (has_capability('coursereport/log:view', get_context_instance(CONTEXT_SYSTEM))) { - $loggedinas .= ' ('.get_string('logs').')'; + $loggedinas .= ' ('.get_string('logs').')'; } $loggedinas .= '
'; } @@ -352,8 +368,12 @@ class theme_mymobile_core_renderer extends core_renderer { return $loggedinas; } - - public function login_infoB() { + /** + * Displays login info in the footer + * + * @return string + */ + public function login_info_footer() { global $USER, $CFG, $DB, $SESSION; if (during_initial_install()) { @@ -395,11 +415,9 @@ class theme_mymobile_core_renderer extends core_renderer { if ($role = $DB->get_record('role', array('id'=>$USER->access['rsw'][$context->path]))) { $rolename = ': '.format_string($role->name); } - $loggedinas = get_string('loggedinas', 'moodle', $username).$rolename. - " (wwwroot/course/view.php?id=$course->id&switchrole=0&sesskey=".sesskey()."\">".get_string('switchrolereturn').')'; + $loggedinas = get_string('loggedinas', 'moodle', $username).$rolename." (wwwroot/course/view.php?id=$course->id&switchrole=0&sesskey=".sesskey()."\">".get_string('switchrolereturn').')'; } else { - $loggedinas = $realuserinfo.get_string('loggedinas', 'moodle', $username).' '. - " (wwwroot/login/logout.php?sesskey=".sesskey()."\" data-ajax=\"false\">".get_string('logout').')'; + $loggedinas = $realuserinfo.get_string('loggedinas', 'moodle', $username).' '." (wwwroot/login/logout.php?sesskey=".sesskey()."\" data-ajax=\"false\">".get_string('logout').')'; } } else { $loggedinas = get_string('loggedinnot', 'moodle'); @@ -422,8 +440,7 @@ class theme_mymobile_core_renderer extends core_renderer { $loggedinas .= get_string('failedloginattemptsall', '', $count); } if (has_capability('coursereport/log:view', get_context_instance(CONTEXT_SYSTEM))) { - $loggedinas .= ' ('.get_string('logs').')'; + $loggedinas .= ' ('.get_string('logs').')'; } $loggedinas .= '
'; } @@ -434,23 +451,29 @@ class theme_mymobile_core_renderer extends core_renderer { return $loggedinas; } - - public function redirect_message($encodedurl, $message, $delay, $debugdisableredirect) { + /** + * Prints a message and redirects + * + * @param string $encodedurl + * @param string $message + * @param int $delay + * @param true $debugdisableredirect + * @return type + */ + public function redirect_message($encodedurl, $message, $delay, $debugdisableredirect) { global $CFG; $url = str_replace('&', '&', $encodedurl); - //the below to fix redirect issues with ajax... John + // TODO: Find a much better solution for this... looks like it is just removing + // the anchor from the link. + // The below to fix redirect issues with ajax... John $encodedurl = str_replace('#', '&', $encodedurl); - - $urlcheck = substr($encodedurl, 0, 4); - - + switch ($this->page->state) { case moodle_page::STATE_BEFORE_HEADER : // No output yet it is safe to delivery the full arsenal of redirect methods if (!$debugdisableredirect) { // Don't use exactly the same time here, it can cause problems when both redirects fire at the same time. $this->metarefreshtag = ''."\n"; - } $output = $this->header(); break; @@ -471,25 +494,23 @@ class theme_mymobile_core_renderer extends core_renderer { throw new coding_exception('You cannot redirect after the entire page has been generated'); break; } + $output .= $this->notification($message, 'redirectmessage'); - if ($urlcheck != "http") { - //if it is not a full http request, do local ajax load. - $output .= ''; - } - else { $output .= ''; - } if ($debugdisableredirect) { $output .= '

Error output, so disabling automatic redirect.

'; } $output .= $this->footer(); return $output; } - - - - protected function render_help_icon(help_icon $helpicon) { + /** + * Renders a help icon + * + * @param help_icon $helpicon + * @return string + */ + protected function render_help_icon(help_icon $helpicon) { global $CFG; // first get the help image icon @@ -513,6 +534,7 @@ class theme_mymobile_core_renderer extends core_renderer { } // now create the link around it + // TODO: Do we need to specify the theme in the help.php link? $url = new moodle_url('/help.php', array('component' => $helpicon->component, 'identifier' => $helpicon->identifier, 'lang'=>current_language(), 'theme'=>'mymobile')); // note: this title is displayed only if JS is disabled, otherwise the link will have the new ajax tooltip @@ -529,15 +551,20 @@ class theme_mymobile_core_renderer extends core_renderer { // and finally span return html_writer::tag('span', $output, array('class' => 'helplink2')); } - - - - protected function render_single_button(single_button $button) { - $attributes = array('type' => 'submit', - 'value' => $button->label, - 'disabled' => $button->disabled ? 'disabled' : null, - 'title' => $button->tooltip); + /** + * Renders a single button + * + * @param single_button $button + * @return string + */ + protected function render_single_button(single_button $button) { + $attributes = array( + 'type' => 'submit', + 'value' => $button->label, + 'disabled' => $button->disabled ? 'disabled' : null, + 'title' => $button->tooltip + ); if ($button->actions) { $id = html_writer::random_id('single_button'); @@ -560,58 +587,74 @@ class theme_mymobile_core_renderer extends core_renderer { } // then div wrapper for xhtml strictness - $output = html_writer::tag('div', $output, array('rel' => ''.$button->url->out_omit_querystring().'')); - + $output = html_writer::tag('div', $output, array('rel' => $button->url->out_omit_querystring())); + + // TODO: Test a single_button that has an anchor and is set to use post // now the form itself around it $url = $button->url->out_omit_querystring(); // url without params - - $urlcheck = substr($url, 0, 4); - if ($url === '') { + + if ($url === '') { $url = '#'; // there has to be always some action } - - //if the url has http, cool, if not we need to add it, JOHN - if ($urlcheck != 'http') { - $url = $this->page->url->out_omit_querystring(); - } - - - - $attributes = array('method' => $button->method, - 'action' => $url, - 'id' => $button->formid); + + // TODO: This is surely a bug that needs fixing.. all of a sudden we've switched + // to the pages URL. + // Test an single button with an external URL as its url + // If the url has http, cool, if not we need to add it, JOHN + $urlcheck = substr($url, 0, 4); + if ($urlcheck != 'http') { + $url = $this->page->url->out_omit_querystring(); + } + + $attributes = array( + 'method' => $button->method, + 'action' => $url, + 'id' => $button->formid + ); $output = html_writer::tag('form', $output, $attributes); // and finally one more wrapper with class return html_writer::tag('div', $output, array('class' => $button->class)); } - - - - public function header() { + + /** + * Renders the header for the page + * + * @return string + */ + public function header() { global $USER, $CFG; if (session_is_loggedinas()) { $this->page->add_body_class('userloggedinas'); } - + $this->page->set_state(moodle_page::STATE_PRINTING_HEADER); // Find the appropriate page layout file, based on $this->page->pagelayout. - $layoutfile = $this->page->theme->layout_file($this->page->pagelayout); // Render the layout using the layout file. $rendered = $this->render_page_layout($layoutfile); // Slice the rendered output into header and footer. - $cutpos = strpos($rendered, self::MAIN_CONTENT_TOKEN); + $cutpos = strpos($rendered, $this->unique_main_content_token); if ($cutpos === false) { - //turned off error by john for ajax load of blocks without main content. - // throw new coding_exception('page layout file ' . $layoutfile . + $cutpos = strpos($rendered, self::MAIN_CONTENT_TOKEN); + $token = self::MAIN_CONTENT_TOKEN; + } else { + $token = $this->unique_main_content_token; + } + + if ($cutpos === false) { + // TODO: Search for a better solution to this... check this is even needed? + // The following code will lead to header containing nothing, and + // footer containing all of the content for the template. + // turned off error by john for ajax load of blocks without main content. + // throw new coding_exception('page layout file ' . $layoutfile . // ' does not contain the string "' . self::MAIN_CONTENT_TOKEN . '".'); } $header = substr($rendered, 0, $cutpos); - $footer = substr($rendered, $cutpos + strlen(self::MAIN_CONTENT_TOKEN)); + $footer = substr($rendered, $cutpos + strlen($token)); if (empty($this->contenttype)) { debugging('The page layout file did not call $OUTPUT->doctype()'); @@ -626,17 +669,31 @@ class theme_mymobile_core_renderer extends core_renderer { return $header . $this->skip_link_target('maincontent'); } - public function notification($message, $classes = 'notifyproblem') { + /** + * Renders a notification + * + * @param string $message + * @param string $classes + * @return string + */ + public function notification($message, $classes = 'notifyproblem') { return html_writer::tag('div', clean_text($message), array('data-role'=>'none', 'data-icon'=>'alert', 'data-theme'=>'d', 'class' => renderer_base::prepare_classes($classes))); } - - public function blocks_for_region($region) { + + /** + * Renders the blocks for a block region in the page + * + * @param type $region + * @return string + */ + public function blocks_for_region($region) { $blockcontents = $this->page->blocks->get_content_for_region($region, $this); + $output = ''; foreach ($blockcontents as $bc) { if ($bc instanceof block_contents) { - if (!($bc->attributes['class'] == 'block_settings block') - && !($bc->attributes['class'] == 'block_navigation block')) { + // We don't want to print navigation and settings blocks here. + if ($bc->attributes['class'] != 'block_settings block' && $bc->attributes['class'] != 'block_navigation block') { $output .= $this->block($bc, $region); } } else if ($bc instanceof block_move_target) { @@ -645,17 +702,17 @@ class theme_mymobile_core_renderer extends core_renderer { throw new coding_exception('Unexpected type of thing (' . get_class($bc) . ') found in list of block contents.'); } } - //by john for no blocks - if ($output =="") { - //$output = "

No blocks found.

"; - } - + return $output; } - - - protected function render_single_select(single_select $select) { + /** + * Renders a single select instance + * + * @param single_select $select + * @return string + */ + protected function render_single_select(single_select $select) { $select = clone($select); if (empty($select->formid)) { $select->formid = html_writer::random_id('single_select_f'); @@ -672,8 +729,8 @@ class theme_mymobile_core_renderer extends core_renderer { if (empty($select->attributes['id'])) { $select->attributes['id'] = html_writer::random_id('single_select'); - //$select->attributes['data-native-menu'] = 'false'; - //above by john for select elements to use native style and help performance? + //$select->attributes['data-native-menu'] = 'false'; + //above by john for select elements to use native style and help performance? } if ($select->disabled) { @@ -695,11 +752,11 @@ class theme_mymobile_core_renderer extends core_renderer { } $output .= html_writer::select($select->options, $select->name, $select->selected, $select->nothing, $select->attributes); - + //by john show go button to fix selects $go = ''; - $output .= html_writer::empty_tag('input data-inline="true"', array('type'=>'submit', 'value'=>get_string('go'))); - $output .= html_writer::tag('noscript', html_writer::tag('div', $go), array('style'=>'inline')); + $output .= html_writer::empty_tag('input data-inline="true"', array('type' => 'submit', 'value' => get_string('go'))); + $output .= html_writer::tag('noscript', html_writer::tag('div', $go), array('style' => 'inline')); $nothing = empty($select->nothing) ? false : key($select->nothing); $this->page->requires->js_init_call('M.util.init_select_autosubmit', array($select->formid, $select->attributes['id'], $nothing)); @@ -708,19 +765,26 @@ class theme_mymobile_core_renderer extends core_renderer { $output = html_writer::tag('div', $output); // now the form itself around it - $formattributes = array('method' => $select->method, - 'action' => $select->url->out_omit_querystring(), - 'id' => $select->formid); + $formattributes = array( + 'method' => $select->method, + 'action' => $select->url->out_omit_querystring(), + 'id' => $select->formid + ); $output = html_writer::tag('form', $output, $formattributes); // and finally one more wrapper with class return html_writer::tag('div', $output, array('class' => $select->class)); } - } - - +/** + * Overridden choie module renderer for the mymobile theme + * + * @package theme + * @subpackage mymobile + * @copyright John Stabinger + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class theme_mymobile_mod_choice_renderer extends plugin_renderer_base { /** @@ -741,14 +805,13 @@ class theme_mymobile_mod_choice_renderer extends plugin_renderer_base { $html = html_writer::start_tag('form', $attributes); $html .= html_writer::start_tag('ul', array('class'=>'choices', 'data-role'=>'controlgroup' )); - + $availableoption = count($options['options']); foreach ($options['options'] as $option) { - $html .= html_writer::start_tag('li', array('class'=>'option')); - $rande = rand(); + $html .= html_writer::start_tag('li', array('class'=>'option')); $option->attributes->name = 'answer'; $option->attributes->type = 'radio'; - $option->attributes->id = "answer$rande"; + $option->attributes->id = 'answer'.html_writer::random_id(); $labeltext = $option->text; if (!empty($option->attributes->disabled)) { @@ -789,29 +852,11 @@ class theme_mymobile_mod_choice_renderer extends plugin_renderer_base { /** * Returns HTML to display choices result - * @param object $choices - * @param bool $forcepublish - * @return string - */ - public function display_result($choices, $forcepublish = false) { - if (empty($forcepublish)) { //allow the publish setting to be overridden - $forcepublish = $choices->publish; - } - - $displaylayout = $choices->display; - - if ($forcepublish) { //CHOICE_PUBLISH_NAMES - return $this->display_publish_name_vertical($choices); - } else { //CHOICE_PUBLISH_ANONYMOUS'; - if ($displaylayout == DISPLAY_HORIZONTAL_LAYOUT) { - return $this->display_publish_anonymous_horizontal($choices); - } - return $this->display_publish_anonymous_vertical($choices); - } - } - - /** - * Returns HTML to display choices result + * + * TODO: There are differences between this method and the mod choice renderers function. + * This needs to be checked VERY careful as the minor changes look like they + * may lead to regressions. + * * @param object $choices * @param bool $forcepublish * @return string @@ -925,163 +970,4 @@ class theme_mymobile_mod_choice_renderer extends plugin_renderer_base { return $html; } - - - /** - * Returns HTML to display choices result - * @param object $choices - * @return string - */ - public function display_publish_anonymous_vertical($choices) { - global $CHOICE_COLUMN_HEIGHT; - - $html = ''; - $table = new html_table(); - $table->cellpadding = 5; - $table->cellspacing = 0; - $table->attributes['class'] = 'results anonymous '; - $table->data = array(); - $count = 0; - ksort($choices->options); - $columns = array(); - $rows = array(); - - foreach ($choices->options as $optionid => $options) { - $numberofuser = 0; - if (!empty($options->user)) { - $numberofuser = count($options->user); - } - $height = 0; - $percentageamount = 0; - if($choices->numberofuser > 0) { - $height = ($CHOICE_COLUMN_HEIGHT * ((float)$numberofuser / (float)$choices->numberofuser)); - $percentageamount = ((float)$numberofuser/(float)$choices->numberofuser)*100.0; - } - - $displaydiagram = html_writer::tag('img','', array('style'=>'height:'.$height.'px;width:49px;', 'alt'=>'', 'src'=>$this->output->pix_url('column', 'choice'))); - - $cell = new html_table_cell(); - $cell->text = $displaydiagram; - $cell->attributes = array('class'=>'graph vertical data'); - $columns[] = $cell; - } - $rowgraph = new html_table_row(); - $rowgraph->cells = $columns; - $rows[] = $rowgraph; - - $columns = array(); - $printskiplink = true; - foreach ($choices->options as $optionid => $options) { - $columndata = ''; - $numberofuser = 0; - if (!empty($options->user)) { - $numberofuser = count($options->user); - } - - if ($printskiplink) { - $columndata .= html_writer::tag('div', '', array('class'=>'skip-block-to', 'id'=>'skipresultgraph')); - $printskiplink = false; - } - - if ($choices->showunanswered && $optionid == 0) { - $columndata .= html_writer::tag('div', format_string(get_string('notanswered', 'choice')), array('class'=>'option')); - } else if ($optionid > 0) { - $columndata .= html_writer::tag('div', format_string($choices->options[$optionid]->text), array('class'=>'option')); - } - $columndata .= html_writer::tag('div', ' ('.$numberofuser.')', array('class'=>'numberofuser', 'title'=> get_string('numberofuser', 'choice'))); - - if($choices->numberofuser > 0) { - $percentageamount = ((float)$numberofuser/(float)$choices->numberofuser)*100.0; - } - $columndata .= html_writer::tag('div', format_float($percentageamount,1). '%', array('class'=>'percentage')); - - $cell = new html_table_cell(); - $cell->text = $columndata; - $cell->attributes = array('class'=>'data header'); - $columns[] = $cell; - } - $rowdata = new html_table_row(); - $rowdata->cells = $columns; - $rows[] = $rowdata; - - $table->data = $rows; - - $header = html_writer::tag('h2',format_string(get_string("responses", "choice"))); - $html .= html_writer::tag('div', $header, array('class'=>'responseheader')); - $html .= html_writer::tag('a', get_string('skipresultgraph', 'choice'), array('href'=>'#skipresultgraph', 'class'=>'skip-block')); - $html .= html_writer::tag('div', html_writer::table($table), array('class'=>'response')); - - return $html; - } - - /** - * Returns HTML to display choices result - * @param object $choices - * @return string - */ - public function display_publish_anonymous_horizontal($choices) { - global $CHOICE_COLUMN_WIDTH; - - $table = new html_table(); - $table->cellpadding = 5; - $table->cellspacing = 0; - $table->attributes['class'] = 'results anonymous '; - $table->data = array(); - - $count = 0; - ksort($choices->options); - - $rows = array(); - foreach ($choices->options as $optionid => $options) { - $numberofuser = 0; - $graphcell = new html_table_cell(); - if (!empty($options->user)) { - $numberofuser = count($options->user); - } - - $width = 0; - $percentageamount = 0; - $columndata = ''; - if($choices->numberofuser > 0) { - $width = ($CHOICE_COLUMN_WIDTH * ((float)$numberofuser / (float)$choices->numberofuser)); - $percentageamount = ((float)$numberofuser/(float)$choices->numberofuser)*100.0; - } - $displaydiagram = html_writer::tag('img','', array('style'=>'height:50px; width:'.$width.'px', 'alt'=>'', 'src'=>$this->output->pix_url('row', 'choice'))); - - $skiplink = html_writer::tag('a', get_string('skipresultgraph', 'choice'), array('href'=>'#skipresultgraph'. $optionid, 'class'=>'skip-block')); - $skiphandler = html_writer::tag('span', '', array('class'=>'skip-block-to', 'id'=>'skipresultgraph'.$optionid)); - - $graphcell->text = $skiplink . $displaydiagram . $skiphandler; - $graphcell->attributes = array('class'=>'graph horizontal'); - - $datacell = new html_table_cell(); - if ($choices->showunanswered && $optionid == 0) { - $columndata .= html_writer::tag('div', format_string(get_string('notanswered', 'choice')), array('class'=>'option')); - } else if ($optionid > 0) { - $columndata .= html_writer::tag('div', format_string($choices->options[$optionid]->text), array('class'=>'option')); - } - $columndata .= html_writer::tag('div', ' ('.$numberofuser.')', array('title'=> get_string('numberofuser', 'choice'), 'class'=>'numberofuser')); - - if($choices->numberofuser > 0) { - $percentageamount = ((float)$numberofuser/(float)$choices->numberofuser)*100.0; - } - $columndata .= html_writer::tag('div', format_float($percentageamount,1). '%', array('class'=>'percentage')); - - $datacell->text = $columndata; - $datacell->attributes = array('class'=>'header'); - - $row = new html_table_row(); - $row->cells = array($datacell, $graphcell); - $rows[] = $row; - } - - $table->data = $rows; - - $html = ''; - $header = html_writer::tag('h2',format_string(get_string("responses", "choice"))); - $html .= html_writer::tag('div', $header, array('class'=>'responseheader')); - $html .= html_writer::table($table); - - return $html; - } } \ No newline at end of file diff --git a/theme/mymobile/settings.php b/theme/mymobile/settings.php index 035bbe1d17c..10e49147369 100644 --- a/theme/mymobile/settings.php +++ b/theme/mymobile/settings.php @@ -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); +} \ No newline at end of file diff --git a/theme/mymobile/style/core.css b/theme/mymobile/style/core.css index fa96d5ce249..ada1a8ee428 100644 --- a/theme/mymobile/style/core.css +++ b/theme/mymobile/style/core.css @@ -1,160 +1,128 @@ body { line-height: inherit; - background: #dddddd; + background: #dddddd; } - html { height: 100%; } - body { margin: 0; padding: 0; height: 100%; } - p { margin: 0 0 0.5em; } - h3, h1, h2 { line-height: inherit; } - ul { margin: 0; } - /* a few ui overrides */ .ui-body-a legend.ftoggler { color: #fff; border-bottom: none; } - #page-site-indexPAGE .ui-content .ui-controlgroup { margin: 0.5em 0; padding: 0; } - .headingblock { border-bottom:0px solid #DDDDDD; color:inherit; font-size:inherit; } - h1.helpheading { font-size: 1.6em; } - /*extra line abve labels and remove padding right for no icon */ .label .ui-btn-inner { border-top: none !important; padding-right: 15px; } - .ui-header .ui-btn-left.ibrand { top: 0.35em !important; } - .ui-header .ui-btn-right.twor { right: 3.3em; } - li.modtype_label { border-bottom: none; } - -.ui-li-count { - position: absolute; - font-size: 11px; - font-weight: bold; - padding: .2em .5em; - top: 50%; - margin-top: -.9em; - right: 38px; +.ui-li-count { + position: absolute; + font-size: 11px; + font-weight: bold; + padding: .2em .5em; + top: 50%; + margin-top: -.9em; + right: 38px; } - /*fix for weird UI footer only small button */ .ui-footer-fixed .ui-grid-null { display: none; } - /* over ride for section name titles allowing more space */ .ui-header .sectionname.ui-title, .ui-footer .sectionname.ui-title { margin-left: 40px; margin-right: 40px; } - /*hide turn editing on button */ .settingsul li.Turn.editing.on { display: none !important; } - /*media plugin style overrides */ span.mediaplugin { clear: both; display: block; } - object.mediaplugin.mediaplugin_youtube, .mediaplugin object { max-width: 100% !important; } - /*front page spacing issue */ .ui-bar.mymobilebar { padding-bottom: 0; padding-left: 10px; } - #page-site-indexPAGE2 .ui-bar.mymobilebar { padding-top: 0px; margin-top: 0px; } - .topic .ui-btn-inner, .answer .ui-btn-inner, #userselector_options_inner .ui-btn-inner, .contact .ui-btn-inner, .ui-checkbox .ui-btn-inner, fieldset div.ui-select .ui-btn-inner, #page-mod-lesson-viewPAGE .ui-btn-inner, .label .ui-btn-inner, .label.ui-li .ui-btn-text, .option .ui-btn-inner { white-space: normal; overflow: inherit; } - .langmenu .ui-select { float: left; } - .que .control { width: auto; } - .generalbox, .box { border: none; } - .sitetopic { margin-bottom: .50em; } .generalfooter .smallicon.navicon { display: none; } - .mobile_blocksonly { display: none; } - .block.hidden .content { display: block; } - .ui-navbar .arrow.sep { display: none; } - .ui-navbar li, #page-user-filesPAGE li, #page-user-filesPAGE ul, .box.files ul, .box.files li { list-style-type: none; } - div.notifyproblem { cursor:default !important; } - /*under footer */ #underfooter .logininfo { text-align: center; @@ -163,85 +131,63 @@ div.notifyproblem { font-size: .8em; font-weight: 400; } - #underfooter div { text-align: center; font-size: .8em; } - #underfooter .noajax { padding-bottom: .2em; } - /* content for page redirect */ .pagelayout-redirect #content2 { text-align: center; } - /* front page styles*/ - .coursebox h3 { margin-bottom: 0; line-height:inherit !important; } - .coursebox h3 a, .categorylist .category a { text-align: left; } - .coursebox h3 a .ui-btn-inner, .category a .ui-btn-inner { padding-left: .8em; } - - ul.section li.activity .mod-indent { display: inline; } - .category a .ui-li-count { right: 1em; } - .coursebox .name { font-size: 1.2em; } - .coursebox div.summary { display: none; } - .coursebox div.info { width: 100%; } - .block_course_overview .coursebox .info { float: none; } - .coursebox ul.teachers { display: none; } - .coursebox, div.categorylist div.category { margin-bottom: 0px; border: none; - } - div.categorylist div.category { padding: 0px; } - - .category span.numberofcourse { display: none; } - .categorylist .category .indentation { float: none; padding-left: 0px; } - .block { border: 0px; margin-top: 0px !important; @@ -249,39 +195,29 @@ div.categorylist div.category { margin-bottom: 0px !important; padding-bottom: 0px !important; } - #page-site-indexPAGE td { padding: inherit; } - #page-site-indexPAGE td .singlebutton form { - display: none; + display: none; } - /* frontpage logged in but no courses assigned fixes */ #page-site-indexPAGE .categorylist .indentation { padding-left: 0px; } - #page-site-indexPAGE .categorylist .indentation div, #page-site-indexPAGE .categorylist .category .image, #page-site-indexPAGE .categorylist .category .name .ui-li-count { display: none; } - #page-site-indexPAGE .categorylist .category .name { float: none !important; } - - /* all course list */ #page-course-indexPAGE .ui-li-count, #page-course-indexPAGE .category .image { display: none; } - #page-course-indexPAGE .category .name { float: none; } - - /* course stuff */ /*coursebox summary has an empy   in it, which chops things up. need a fix... hidesummary does this and is added via js... not anymore...*/ .section div.summary { @@ -291,12 +227,10 @@ div.categorylist div.category { padding-right: .4em; line-height: 0px; } - .section div.summary .no-overflow { line-height: normal; padding-bottom: .4em; } - /* mod-indent change 11/25/10 to fix ... after activity names */ #completionprogressid.completionprogress { display: none; @@ -304,30 +238,24 @@ div.categorylist div.category { position: absolute; right: 1em; z-index: 2; - text-align: center; white-space: normal; width: 30px; } - #completionprogressid .helplink2 { float: right; } - #completionprogressid.completionprogress img.iconhelp { vertical-align: middle; } - .mod-indent { display: inline; -} - +} #completion_dynamic_change { display: none; width: 0px; height: 0px; } - input[type="hidden"] { height: 0px !important; width: 0px !important; @@ -337,41 +265,33 @@ input[type="hidden"] { border: none !important; background-color: transparent !important; } - .mod-indent-1, .mod-indent { margin-left:0; } - li a.dimmed span { color: #aaa !important; } - .course-content .current { background: none; } - .path-course-view .section .content .weekdates { color:inherit; font-size:inherit; font-weight:700; } - .course-content ul.weeks li.section { margin-bottom: .6em; } - .course-content ul.topics li.section .content { margin: 0 0px; } - .course-content ul.topics li.section .left { width: auto !important; float: none; clear: both !important; margin-bottom: 5px; } - -/* push left on course items in course view +/* push left on course items in course view .course-content li.activity.ui-btn .ui-btn-text a { padding-left: 10px; } @@ -380,59 +300,45 @@ li a.dimmed span { padding-left: 35px; padding-right: 60px; } - .topics #section-0 div.left.side { display: none; } - .topics div.right.side { display: none; } - .topics li.activity { - } .topics li.activity span.accesshide, .weeks li.activity span.accesshide, .ui-navbar span.accesshide { display: none; } - - .topics li.activity span.autocompletion, .weeks li.activity span.autocompletion { display: block; right: 70px; top: -5px; } - .course-content .section .activity img.activityicon { margin-top: -.2em; } - li.activity.ui-li-static span, li.activity div.availabilityinfo { white-space: normal; } - .topics img.spacer, .weeks img.spacer { display: none; } - form.togglecompletion a { display: none !important; } - form.togglecompletion { right: auto !important; position: inherit !important; display: inline; - } form.togglecompletion div { display: inline; } - form.togglecompletion input { visibility: hidden; } - .togglecompletion input[type="image"] { display: block !important; position: absolute !important; @@ -443,32 +349,26 @@ form.togglecompletion input { width: 26px; height: 23px; } - li.activity.ui-li-static span, li.activity div.availabilityinfo{ margin-left: 1.3em; } - .topics .content, .weeks .content { padding-left: 0px !important; padding-right: 0px !important; margin: 0; } - .course ul.section { margin: 0px; } - .resourceworkaround, .urlworkaround, .modified { font-size: inherit; } - /* image thumb replacement for main course overview uses a settings tag to decide whether this happens or not */ - .ithumb .course-content .summary img, .ithumb .course-content .activity.label img, .ithumb .sitetopic .no-overflow img { background: url([[pix:theme|photos]]) no-repeat 50% 50%; height:0; overflow:hidden; - padding-top: 40px; + padding-top: 40px; width: 40px; background-size: 40px 40px; -webkit-background-size: 40px 40px; @@ -476,67 +376,51 @@ li.activity.ui-li-static span, li.activity div.availabilityinfo{ margin-right: auto !important; position: inherit !important; left:auto !important; -} - - - +} ul.weeks .left.side, ul.weeks .right.side { display: none; } - .course-content ul.weeks li.section .content { margin:0 0px; } - .course-content ul.topics li.section { margin-bottom: .6em; } - .section .left.side { font-weight: 700; } - .section .content .headingwrap { margin-bottom: .25em; } - .weeks .section .content .headingwrap { margin-bottom: .4em; } - .weeks h3.weekdates { display: block; float: none; padding-top: 0px; padding-bottom: 0px; } - li.activity.label { padding: .6em !important; cursor:default; } - li.label .no-overflow ul, li.label .no-overflow ul li { list-style-position: inside; } - span.instancename { font-size: 110%; } - .path-course-view .section .content { padding:0; margin: 0px; } - .section.hidden, .section.hidden a { color: #aaaaaa !important; } - .label div.no-overflow { overflow:inherit !important; } - /*forms */ .buttons .singlebutton, .buttons .singlebutton form, .buttons .singlebutton div, .mform .fitem fieldset.fgroup label, .mform .fradio label, .mform .fcheckbox label, .mform fieldset.fdate_selector label { display: inherit; @@ -548,54 +432,42 @@ span.instancename { width: 100% !important; font-size: 16px; } - .mform .felement.fstatic { font-weight: 800; font-size: 16px; } - .mform .fitemtitle img.req { display: inline; } - .mform .fitem .felement { margin-left: 0px; width: 100%; } - .mform .fitem .felement input[type="text"], .mform .fitem .felement textarea, .message .messagearea .messagesend .messagesendbox { width: 92%; } - .mform fieldset legend { margin-left: 0em; } - legend { color: inherit; } - .landscape .mform .fitem .ui-select { width: 95%; } - .mform .fitem .ui-checkbox { display: block !important; max-width: 95%; } - input[name="mailnow"] { display: none; } - .mform .required { color:inherit; } - .loginbox .loginform .form-input #username, .loginbox .loginform .form-input #password { margin: 0 0 .4em; } - .loginbox .loginform .form-input #username, .loginbox .loginform .form-input #password { border: 1px solid #ccc !important; color: inherit !important; @@ -605,32 +477,25 @@ input[name="mailnow"] { padding: .4em !important; width: 98% !important; } - .form-input #password { margin-bottom: 1.2em !important; } - .loginbox #loginbtn { width: 100% !important; } - .mform fieldset div { margin:0; } - .mform fieldset div div { margin: .5em; } - /*admin forms and profile type forms */ .portrait2 #page-user-editPAGE select, .portrait2 .pagelayout-admin select, .path-course-report2 select { max-width: 200px; } - .landscape2 #page-user-editPAGE select, .landscape2 .pagelayout-admin select, .path-course-report2 select { max-width: 450px; } - /*forums */ .forumheaderlist { border: 0px !important; @@ -640,173 +505,136 @@ margin:0; .forumheaderlist th { text-align: left; } - .forumheaderlist thead .ui-btn-inner, .topic .ui-btn { text-align: left !important; } - .forumheaderlist .ui-btn-icon-right .ui-btn-inner { padding-right: 55px; } - .forumheaderlist thead .ui-btn { cursor: default; } - .forumheaderlist, .forumheaderlist th, .forumheaderlist td{ background: none; border: none ; border: 0px !important; border-collapse: collapse; } - .forumheaderlist td.author, .forumheaderlist td.picture, .forumheaderlist th.author, .forumheaderlist th.replies, .forumheaderlist th.lastpost, .forumheaderlist td.replies, .forumheaderlist td.lastpost, #page-mod-quiz-reportPAGE .headingwrap { display: none; } - .forumheaderlist td, .forumheaderlist tr { padding: 0px !important; } - table.forumheaderlist2 td.topic a { padding: 10px; padding-right: 17px; border-top: 1px solid #666; } - .forumheaderlist th, .forumheaderlist td { padding: 0px; } .forumpost .row.header.ui-li-divider { padding-top: .2em; -} - +} .forumpost .picture img { margin-left:0; margin-top: .5em; } - .forumpost .row.side .left { display: none; } - .forumpost .options .forum-post-rating { float:none; } - .forumpost { margin-top: .4em; } - .forumpost .row .topic, .forumpost .row .content-mask, .forumpost .row .options { margin-left:0px; margin-top: .4em; } - .forumpost .row.maincontent .left { display: none; } - .forumpost .content { padding-top: .5em; padding-left: .5em; padding-right: .5em; } - .forumpost .row { width: auto; } - div.discussioncontrols { display: none; } - .path-mod-forum .indent { margin-left: 0px; } - .path-mod-forum div.subject { font-size: 120%; } - .forumpost td.picture.left, .forumpost td.left.side { display: none; } - .topic img.userpicture { float: left; margin-right: .3em; } - .forumpost .topic { border-bottom: none; cursor: default; } - #id_subscribe-button .ui-btn-text { - display: none; + display: none; } - .forumpost span.edited { font-size: 80%; -} - +} .forumpost .author .ui-btn, .forumpost .author .ui-btn-inner { padding: 0px; background: none; border: none; -moz-box-shadow: none; -webkit-box-shadow: none; - box-shadow: none; + box-shadow: none; } - -/*profile */ - +/*profile */ .userprofilebox .profilepicture { float: none !important; text-align: center !important; } - .userprofilebox .profilepicture img { text-align: center; } - .userprofilebox div.descriptionbox { margin: 0; padding: 0 0 0 0; border: 0px; } - #page-user-editPAGE .ui-btn-inner, #page-mod-lesson-viewPAGE .ui-btn-inner { white-space:normal; } - .path-user .description { border-bottom: none; - } - + } .path-user img.userpicture { margin: .25em; -} - +} .block_private_files ul li, .block_private_files ul { list-style-type: none; } - /*login */ .loginbox.onecolumn { margin: 0px; } - .loginbox .guestsub { border-top:0px solid #DDDDDD; margin: 0px; } - .loginbox .loginform { width: 100%; } - .loginbox.twocolumns { width: 100%; margin: 0; @@ -819,7 +647,6 @@ div.discussioncontrols { margin-bottom: 0px !important; padding-bottom: 0px !important; } - .loginbox.twocolumns .signuppanel { float: none; width: 100%; @@ -827,64 +654,52 @@ div.discussioncontrols { margin-bottom: 0px !important; padding-bottom: 0px !important; } - #intro { margin: 0px 0px; border: none !important; } - -/*signup forms*/ +/*signup forms*/ #page-login-signup .mform .fitem .felement { margin-left: auto; } - #page-login-signup .mform { margin: 0 auto; width: 98%; } - .loginbox .subcontent { margin: 0px; padding: 0px; } - .loginbox .subcontent.loginsub { margin: 0px; padding: 8px; } - .loginbox h2 { padding-left: 0px; padding-right: 0px; margin-left: 0px; margin-right: 0px; } - #id_passwordunmaskdiv { display: none; } - /* quiz */ #page-mod-quiz-reportPAGE label.ui-btn{ display: inherit; width: 95%; -} - +} #page-mod-quiz-reportPAGE #preferencesuser, #page-mod-quiz-reportPAGE .graph { display: none; } - /* display quiz timer only on quiz pages if necessary */ #quiz-timer { display: none; } - .path-mod-quiz #quiz-timer { display: inherit; text-align: center; margin-top: 0em; } - .que { border: none; } @@ -893,45 +708,36 @@ div.discussioncontrols { } .que .prompt, .que .answer { float: none; - clear: both; + clear: both; } - .que .prompt { width: auto !important; } - .que .answer { width: 100%; } - .que .control { width:95%; } - .que .answer textarea { min-width: 100%; } - .que .feedback { border: none; } - .que .info { - float: none; + float: none; width: auto !important; padding-top: .4em; } - .que .info div { display: inline; margin-top: .5em !important; margin-left: .2em; } - .que .content { margin: 0 0 0 0em; } - .que .formulation, .que .outcome, .que .comment, .que .history { margin: 0 0 0em; padding: 0em; @@ -939,38 +745,31 @@ div.discussioncontrols { float: none; background: none; } - .que .info h2, .que .info .grade, .que .info .questionflag { display: inline; } - input.questionflagimage { - vertical-align: middle; + vertical-align: middle; padding: .2em; height: 30px; width: 30px; } - .questionflagimage.ui-btn-hidden { display: inline !important; height: 30px; width: 30px; border: 1px solid #ccc; } - /*hides extra checkbox */ .questionflag input { visibility: hidden !important; } - .questionflag input.questionflagimage { visibility: visible !important; } - .questionflag .ui-btn.ui-btn-corner-all.ui-shadow { display: none !important; } - .truefalse2 .answer span { float: none; width: inherit; @@ -978,7 +777,6 @@ input.questionflagimage { padding-top: .4em; padding-bottom: .4em; } - .truefalse .answer span.r0, .truefalse .answer span.r1 { float: none; width: inherit; @@ -992,32 +790,25 @@ input.questionflagimage { padding: inherit; width: inherit; } - .truefalse2 .answer span .ui-icon { padding: 0 10px; } - .truefalse .answer span .ui-btn-inner { padding-top: .5em; padding-bottom: .5em; } - table.quizattemptsummary .bestrow, table.quizattemptsummary .bestrow td { background-color:inherit !important; } - .questionflag div.ui-checkbox { display: inline; } - .answer .control label.ui-btn-up-a .ui-btn-text span { color: #fff !important; } - .answer .control label.ui-btn-up-a.ui-btn-active .ui-btn-text span { color: #000 !important; } - /* other modules */ div#page-mod-data-viewPAGE img.iconsmall, #page-mod-glossary-viewPAGE img.iconsmall, #page-mod-data-view .approve img.icon { height: 22px; @@ -1025,17 +816,14 @@ div#page-mod-data-viewPAGE img.iconsmall, #page-mod-glossary-viewPAGE img.iconsm padding-left: .5em; padding-right: .5em; } - .path-mod-glossary .glossarypost .commands { white-space: normal; width: auto; } - /*tables */ .pagelayout-report .no-overflow { overflow: auto; } - table.generaltable { min-width: 98%; margin-left: auto; @@ -1044,115 +832,89 @@ table.generaltable { overflow: auto; border-collapse: collapse; } - /*odd row highlight */ .generaltable tbody tr.r0, .flexible tbody tr.r0 { background: #eee; color: #333; } - .glossarycategoryheader { width: 100%; } - /*surveys activities */ .surveytable { width: 100%; max-height: 200px; overflow: auto !important; display: block; - } - th.optioncell label.ui-input-text { width: 100%; } - /*graphs and summarys that also get scrollview */ div.resultgraph, div.reportsummary { max-height: 300px; } - .surveytable .ui-radio .ui-btn .ui-btn-inner .ui-btn-text { display: block; padding: .8em; padding-bottom: .3em; } - table.generaltable thead, table.generaltable th.header { background: none; } - table.quizreviewsummary td.cell, table.quizreviewsummary th.cell { background: none; } - - /*blocks */ .block_messages .info, .block_online_users .info, .block_recent_activity .activitydate { color: inherit !important; -} - +} .block .minicalendar { width: 95%; margin-left: auto; margin-right: auto; } - .minicalendar { border-collapse:collapse; } - .minicalendar td, .minicalendar th { border-color:#FFFFFF; border-width:1px 0; } - .block .minicalendar td { border-color: transparent; } - /*grades */ table.user-grade { font-size:110%; border:0px solid black; } - table#user-grades { border-width: 0px; font-size: inherit; } - table.user-grade td.oddd1.b1t.b2b.b1l{ width: 0px; } - .user-grade td.item { border-left: 0px solid gray; border-right: 1px solid #eee; } - .user-grade thead { border-bottom: 2px solid #666; } - table#user-grades th.category { border-width:0px 0px 0; } - table.user-grade td.oddd1 { background-color:inherit !important; border: none; } - table.user-grade td.b1b, table.user-grade td.b2b { border-bottom:1px solid black; padding-top: 5px; padding-bottom: 5px; } - - - table.user-grade td.b1b, table.user-grade td.b2b { border-bottom:0px solid black; } @@ -1160,44 +922,35 @@ table.user-grade td.b1b, table.user-grade td.b2b { div.ui-radio label.afirst, div.ui-checkbox label.afirst { display: none; } - #page-mod-lesson-viewPAGE input[type="radio"], .path-mod-lesson input[type="radio"], .fitem input[type="checkbox"], .path-calendar input[type="radio"], #page-mod-wiki-createPAGE input[type="radio"] { width: 0px; height: 0px; position: absolute; left: -1000px; } - .path-mod-lesson .ongoing { color:inherit; border-bottom: 2px dashed #0000FF; font-style: italic; margin:0 0 1em; } - .path-mod-lesson .branchbuttoncontainer.horizontal div, .path-mod-lesson .branchbuttoncontainer.horizontal form { display: inherit; } - /*tabs */ .tabtree li.selected a { cursor: default; } - .tabtree ul li.here ul { position: inherit; top: inherit; width: inherit; } - - /*messages and message areas */ - .message .contactselector { float:none; width: 100%; } - .message .messagearea { border-left:0px solid #eee; float:right; @@ -1205,25 +958,20 @@ div.ui-radio label.afirst, div.ui-checkbox label.afirst { padding-left:1%; width:100%; } - /*calendar and event stuff */ .calendar_event_user { background: none; } - .calendartable .events-new ul, .calendartable .events-new li, .foldertree ul, .foldertree li { list-style-type: none; margin-left: 0px; -} - +} #page-calendar-view .eventlist .event .topic { background:none; } - .calendar-controls { text-align: center; } - .calendar-controls h1 { text-align: center; float:left !important; @@ -1231,45 +979,38 @@ div.ui-radio label.afirst, div.ui-checkbox label.afirst { width: auto !important; text-align: center; } - .calendar-controls .arrow_text { display: none; } - .calendar-controls .arrow_link.next { float: right; } - .calendar_event_course { background-color:inherit; border: 2px solid #FFD3BD; } - .calendar_event_group { background-color:inherit; border: 2px solid #FEE7AE; } - .calendar_event_global { background-color:inherit; border: 2px solid #D6F8CD; } - .calendartable td.today.cell, .calendartable td.nottoday.cell { border: 1px solid #ccc; background: #eee; font-weight: bold; color: #444; text-shadow: 0 1px 1px #f6f6f6; - background-image: -moz-linear-gradient(top, - #fefefe, + background-image: -moz-linear-gradient(top, + #fefefe, #eeeeee); background-image: -webkit-gradient(linear,left top,left bottom, color-stop(0, #fdfdfd), color-stop(1, #eeeeee)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fdfdfd', EndColorStr='#eeeeee')"; } - .calendartable td.weekend.cell { border: 1px solid #ccc; background: #fff; @@ -1277,133 +1018,102 @@ div.ui-radio label.afirst, div.ui-checkbox label.afirst { color: #444; text-shadow: 0 1px 1px #fff; } - .path-calendar .maincalendar .header .buttons { float:none; } - table.event { width: 95%; } - .event .picture.cell { width: 40px; } - .maincalendar .bottom { margin-top: 1em; text-align: center; } - .maincalendar .bottom img { background: #fff; padding: .5em; border: .2em solid #ccc; } - /*hide calendar add event for now because of hash error on redirect of new event */ .maincalendar .header .buttons form { display: none; } - .ui-icon.ui-icon-custom { -moz-border-radius:0px; background-color: inherit !important; height: 26px; width: 26px; } - /*mymoodle */ #page-my-indexPAGE .headingwrap h3.main a { color: inherit !important; } - #page-my-indexPAGE .box.coursebox { padding: 0px; margin-bottom: .4em; width: 99%; } - #page-my-indexPAGE h1 .header .title { font-size: 75%; text-align: center; } - #page-my-indexPAGE .headingwrap { margin-bottom: .4em; } - #page-my-indexPAGE .coursebox .overview .name { margin-left: 0px; } - #page-my-indexPAGE .coursebox .overview .info { margin-left: 5px; } - #page-my-indexPAGE .block h3.main { text-align: left; margin-left: 15px; } - #page-mod-folder-viewPAGE .foldertree { width: auto; padding-top: .5em; } - .ui-icon-mynav {background-image: url([[pix:theme|navs]]); background-position: 50% 50%; background-repeat: no-repeat; background-size: 16px 16px; -webkit-background-size: 16px 16px; } - #myuser .ui-icon {background-image: url([[pix:theme|iuser]]); background-position: 50% 51%; background-repeat: no-repeat; background-size: 14px 14px; -webkit-background-size: 14px 14px; } - #mycal .ui-icon {background-image: url([[pix:theme|icalendar]]); background-position: 50% 50%; background-repeat: no-repeat; background-size: 14px 14px; -webkit-background-size: 14px 14px; } - #mymess .ui-icon {background-image: url([[pix:theme|imessage]]); background-position: 50% 50%; background-repeat: no-repeat; background-size: 14px 14px; -webkit-background-size: 14px 14px; } - #mypower .ui-icon {background-image: url([[pix:theme|power]]); background-position: 50% 50%; background-repeat: no-repeat; background-size: 16px 16px; } - .ui2-icon-mypower { background-image: url([[pix:theme|power]]) !important; background-repeat: no-repeat; background-position: 50% 50%; } - /*iphone4 retina display icons */ @media all and (-webkit-min-device-pixel-ratio:2) { .ui-icon-mynav { background-image: url([[pix:theme|navsI4]]); } - #myuser .ui-icon { background-image: url([[pix:theme|iuserI4]]); } - #mycal .ui-icon { background-image: url([[pix:theme|icalendarI4]]); } - #mymess .ui-icon { background-image: url([[pix:theme|imessageI4]]); } } - - - .jsets { text-align: center; margin-top: .4em; } - .label .ui-li-desc { margin:0em 0 0.6em; white-space:normal; } - .redirectmessage .ui-btn-inner, #page-mid-quiz-reportPAGE .ui-btn-inner.ui-btn-corner-all { white-space:normal !important; } - /*grades and tables */ div.gradeparent, #attemptsform .no-overflow, .usersubmissions .no-overflow { width: 95%; @@ -1411,67 +1121,53 @@ div.gradeparent, #attemptsform .no-overflow, .usersubmissions .no-overflow { overflow: auto; padding-bottom: 3em; } - #attemptsform .no-overflow, .usersubmissions .no-overflow { max-height: 200px; } - .userenrolment .col_enrol .enrolment, #page-admin-course-category .generalbox th, .editcourse .header, .results .header, #attempts .header, .generaltable .header, .plugincompattable th, .environmenttable th, .forumheaderlist th, .path-mod-assignment #dates .c0, .userenrolment tr.r1, .userenrolment tr.r0, table#user-grades .catlevel1, table#user-grades .r1, .path-grade-report-grader table tr.even td.cell, .path-grade-report-grader table tr.even th, .gradestable .lastrow td.cell, .gradestable .lastrow th.header, table#user-grades tr.avg td.cell, table#fixed_column tr.odd th, table#user-grades tr.odd th, table#user-grades tr.odd td.cell, table#user-grades td.topleft, table#user-grades .catlevel1, table#user-grades .r1, .path-grade-report-grader table tr.even td.cell, .path-grade-report-grader table tr.even th { background-color:inherit !important; background: inherit !important; } - table#user-grades tr.avg td.cell { color:inherit; text-decoration: underline; font-weight:800; } - #outlinetable { width: 98% !important; } - #graded_users_selector { float: none; text-align: inherit; } - /*wiki */ #page-mod-wiki-editPAGE .hidden.ui-field-contain.ui-body.ui-br a.ui-btn, #page-mod-quiz-reportPAGE #commands .ui-btn { display: none; } - .path-mod-wiki .ui-radio .ui-btn-inner { padding: 1.1em 35px 1.1em 1.1em; } - .path-mod-wiki .mform .fitem { width: auto; margin: 0px 0px; overflow: visible; } - /*questionarre */ body#page-mod-questionnaire-view .notice .buttons div, body#page-mod-questionnaire-view .notice .buttons form { display: block; } - body#page-mod-questionnaire-view td.qnInner, body#page-mod-questionnaire-preview td.qnInner, body#page-mod-questionnaire-report td.qnInner, body#page-mod-questionnaire-myreport td.qnInner, .reportQuestionTitle, td.qnInner { background-color: transparent; border: none; display: inline; } - .qnInnerTd, .reportQuestionNumber { display: inline; } - body#page-mod-questionnaire-view td.qnType, body#page-mod-questionnaire-preview td.qnType, body#page-mod-questionnaire-report td.qnType, body#page-mod-questionnaire-myreport td.qnType { - border-color: transparent; border: none; -} - +} /*messages and overlays */ #newmessageoverlay { font-weight: normal; @@ -1479,22 +1175,19 @@ body#page-mod-questionnaire-view td.qnType, body#page-mod-questionnaire-preview background: #444; color: #ddd; text-shadow: 0 -1px 0px #000; - background-image: -moz-linear-gradient(top, + background-image: -moz-linear-gradient(top, #333 0%, #333 5%, - #444 15%, - #444 60%, + #444 15%, + #444 60%, #222 100%); - background-image: -webkit-gradient(linear, center top, center bottom, - color-stop(0, #333), - color-stop(5%, #333), - color-stop(15%, #444), - color-stop(60%, #444), + background-image: -webkit-gradient(linear, center top, center bottom, + color-stop(0, #333), + color-stop(5%, #333), + color-stop(15%, #444), + color-stop(60%, #444), color-stop(1, #222)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#333333', EndColorStr='#222222')"; - - - padding:20px; padding-left: 0px; padding-right: 10px; @@ -1505,131 +1198,104 @@ body#page-mod-questionnaire-view td.qnType, body#page-mod-questionnaire-preview margin-right: auto; height: 100%; } - #newmessageoverlay a { - color: #e98a15; + color: #e98a15; font-weight: bold; } - .resourcecontent.resourcepdf object { overflow: auto; } - .resourcepdf #resourceobject { min-height: 400px; margin-bottom: 20px; } - .mobileresource { border: 1px solid #666; z-index: 99999; position: absolute; top: 45px; right: 10px; - width: 40px; height: 40px; background: #000 url([[pix:theme|clip]]) no-repeat 50% 50%; } /*end scrollview changes */ - #dock { display: none; } - /* reports and logs */ .groupmanagementtable td{ - } - .boxwidthnormal, .boxwidthwide, .capabilitysearchui { width: auto; } - /*choice */ ul.choices { margin-left: 0em; } - ul.choices, ul.choices li { list-style-type: none; } - .path-mod-choice .horizontal .choices .option { display: inherit; padding-right: 0px; } - li.reportoption, #page-mod-choice-report .downloadreport ul li { display: block; float: none; list-style: none outside none; padding: 0; } - #page-mod-scorm-player #tocbox { font-size:0.8em; left:0; position:relative; width:100% !important; } - .path-mod-choice .anonymous, .path-mod-choice .names { margin-left:auto; margin-right:auto; width:100%; overflow: auto; } - .path-mod-choice .ui-scrollview-clip .names { max-width: 1500px; min-width: 480px; } - .path-mod-choice .horizontal, .path-mod-choice .vertical { margin-left:1%; margin-right:1%; } - table.results.anonymous { display: block; max-height: 300px; } - /*chat */ .path-mod-chat-gui_ajax .ui-page { background: none !important; } - .landscape #chatpage.ui-page, .portrait #chatpage.ui-page { min-height:0; } - #page-mod-chat-gui_ajax-index #input-message { width: 70% !important; display: inline !important; - } - #chat-input-area { padding-bottom: 5px; } - #chat-input-area div.ui-btn { float: right !important; max-width: 40%; margin-top: 0px !important; } - #chat-input-area #choosetheme { display: none; } - .path-mod-chat .userpicture { width: 20px; height: 20px; } - #chatback { position: absolute; top: .5em; @@ -1638,92 +1304,72 @@ table.results.anonymous { #page-mod-chat-gui_ajax-index #layout-doc { width: 100% !important; } - #page-mod-chat-gui_ajax-index #yui-gen5 { width: 100% !important; } - #page-mod-chat-gui_ajax-index #yui-gen0, #page-mod-chat-gui_ajax-index yui-gen1, #page-mod-chat-gui_ajax-index #yui-gen0 .yui-layout-bd.yui-layout-bd-nohd.yui-layout-bd-noft { width: 25% !important; display: none; } - #page-mod-chat-gui_ajax-index #yui-gen2 { display: none !important; } - #page-mod-chat-gui_ajax-index #yui-gen6, #page-mod-chat-gui_ajax-index #yui-gen6 .yui-layout-bd.yui-layout-bd-nohd.yui-layout-bd-noft { width: 99% !important; } - /*show nonjs comments only */ a.showcommentsnonjs { display: block !important; } - a.comment-link, .block_comments a.showcommentsnonjs, .block_comments .comment-area { display: none !important; } - .block_comments .comment-ctrl { display: block; } - /*collapsed topic format*/ #thetopics { table-layout: inherit !important; width: 100%; display: block !important; - } - #page-course-view-topcollPAGE .section td.content, col.content { text-align: left; width: 100% !important; overflow: hidden; } - #page-course-view-topcollPAGE .section td.content { padding: .5em; } - #page-course-view-topcollPAGE td.left.side, #page-course-view-topcollPAGE td.right.side { display: none; } - #page-course-view-topcollPAGE tr.cps td a { background: none !important; color: inherit !important; padding: 7px 0 7px 0px !important; } - tr.cps td span { font-style: inherit !important; font-size: 1.12em !important; } - #page-course-view-topcollPAGE .section.separator, td.cps_centre { display: none; } - tr.cps { background-color: inherit !important; color: inherit !important; } - .opencps .ui-btn-inner .ui-icon-arrow-r { background-position: -216px 50%; } - tr.cps td span.ui-li-count { font-size: .6em !important; right: 12px; } - #page-course-view-topcollPAGE .cps .ui-btn-inner { white-space: normal; } - /*filemanager fixes and other button fixes and adds */ #page-mod-quiz-reportPAGE #commands input[type="submit"], #newmessagelinks a, .que input.submit { display: block !important; @@ -1740,8 +1386,8 @@ tr.cps td span.ui-li-count { cursor: pointer; text-shadow: 0 1px 1px #f6f6f6; text-decoration: none; - background-image: -moz-linear-gradient(top, - #fefefe, + background-image: -moz-linear-gradient(top, + #fefefe, #eeeeee); background-image: -webkit-gradient(linear,left top,left bottom, color-stop(0, #fdfdfd), @@ -1749,96 +1395,72 @@ tr.cps td span.ui-li-count { -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fdfdfd', EndColorStr='#eeeeee')"; -moz-border-radius: 1em; -webkit-border-radius: 1em; border-radius: 1em; } - #newmessagelinks a { line-height: 3em; } - - .filemanager-toolbar a.ui-btn { display: none; } - .yui-panel-container.show-scrollbars { position: absolute !important; top: 0px !important; left: 0px !important; width: 100% !important; - } - .yui-panel-container.show-scrollbars .yui-layout, .yui-panel-container.show-scrollbars .yui-layout-unit-center, .yui-panel-container.show-scrollbars .yui-layout-doc, .yui-panel-container.show-scrollbars .yui-layout-bd, .yui-panel-container.show-scrollbars .yui-layout-wrap { width: 100% !important; } - .yui-panel-container.show-scrollbars, .yui-tt.show-scrollbars { overflow:auto !important; } - /*hide skip link br tags on front page only, hope this is fixed by moodle sometime soon */ - #page-site-indexPAGE br, .section .content br { display: none; } - /*settings to hide certain thins */ .topicnoshow .sitetopic { display: none !important; } - /*hide category tree controls because they don't work with touch events. */ .course_category_tree .controls { display: none; } - - /*scrollview */ - .ui-scrollview-clip { } - .ui-scrollview-view { } - .ui-scrolllistview .ui-li-divider { z-index: 10; } - .ui-scrollbar { position: absolute; overflow: hidden; - - -webkit-transition: opacity 500ms; -moz-transition: opacity 500ms; transition: opacity 500ms; opacity: .3; } - .ui-scrollbar-visible { opacity: 1; } - .ui-scrollbar-y { top: 2px; right: 2px; bottom: 8px; width: 5px; } - .ui-scrollbar-x { right: 8px; bottom: 2px; left: 2px; height: 5px; } - .ui-scrollbar-track { position: relative; width: 100%; height: 100%; } - .ui-scrollbar-thumb { position: absolute; top: 0; @@ -1848,17 +1470,14 @@ overflow:auto !important; -webkit-border-radius: 2px; border-radius: 2px; } - .ui-scrollbar-y .ui-scrollbar-thumb { width: 5px; height: 100%; } - .ui-scrollbar-x .ui-scrollbar-thumb { width: 100%; height: 5px; } - /*some loader overrides to hide the loading message */ body .ui-loader { background: none; @@ -1882,23 +1501,18 @@ body .ui-loader { width: 35px; margin-left: -35px; } - body .ui-loader.ui-body-e { width: inherit; color: #fff; padding: 2em; } - body .ui-loader h1 { display: none; } - body .ui-loader.ui-body-e h1 { display: inherit; } - .ui-loader .ui-icon { opacity: 1; } - /*current highlight */ .weeks .current .headingwrap, .topics .current div.headingwrap, .current .ui-bar-b, .current .left.side, .tabtree ul.tabrow0 li.selected a, .ui-btn-active, #page-course-view-topcollPAGE .current { border: 1px solid #F7C942; @@ -1912,107 +1526,85 @@ body .ui-loader.ui-body-e h1 { background-image: -o-linear-gradient(top, #fceda7, #fadb4e); /* Opera 11.10+ */ background-image: linear-gradient(top, #fceda7, #fadb4e); } - .ui-btn-active a.ui-link-inherit { color: #333; } - /*changes to nav bar at top and header */ - /*necessary to set the navbar the same as the buttons because floats are not perfect ... */ .ui-header .ui-navbar { background: #eee; - - background-image: -moz-linear-gradient(top, - #fefefe, + background-image: -moz-linear-gradient(top, + #fefefe, #e7e7e7); background-image: -webkit-gradient(linear,left top,left bottom, color-stop(0, #fdfdfd), color-stop(1, #e7e7e7)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fdfdfd', EndColorStr='#eeeeee')"; - border-top: 1px solid #666; -webkit-box-shadow: inset 0px 1px 1px #fff; - -moz-box-shadow: inset 0px 1px 1px #fff; + -moz-box-shadow: inset 0px 1px 1px #fff; box-shadow: inset 0px 1px 1px #fff; } - .ui-bar-a.ui-header, .ui-bar-b.ui-header { border-bottom: 1px solid #ccc; } - .ui-navbar .ui-select { width: 100% !important; display: block !important; } - .ui-navbar .ui-select2 .ui-btn-corner-all, .ui-navbar .ui-select .ui-btn-inner { border-radius: 0em 0em 0em 0em; } - .ui-navbar .ui-select .ui-btn-icon-right .ui-btn-inner { padding-right: 5px; } - - .ui-header .ui-navbar li .ui-btn { -webkit-border-radius: .4em /*{global-radii-blocks}*/; -webkit-border-radius: .4em .4em .4em .4em; -moz-border-radius: .4em .4em .4em .4em; border-radius: .4em .4em .4em .4em; - border: 1px solid #ccc !important; border-top: 1px solid #aaa !important; margin: .4em; margin-left: .4em; margin-right: 0em; -webkit-box-shadow: 1px 1px 1px #fff, inset 1px 1px 1px #eee; - -moz-box-shadow: 1px 1px 1px #fff, inset 1px 1px 1px #eee; + -moz-box-shadow: 1px 1px 1px #fff, inset 1px 1px 1px #eee; box-shadow: 1px 1px 1px #fff, inset 1px 1px 1px #eee; - text-shadow: 0 1px 1px #FFFFFF; } - .ui-header .ui-navbar li:last-child .ui-btn { margin-right: .4em; } - .ui-header .ui-navbar li .ui-btn .ui-btn-inner { padding-bottom: 0.6em; padding-top: 0.5em; } - - /*header bar gradient corrections */ .mymobileheader.ui-bar-b { - background-image: -moz-linear-gradient(top, - #81a8ce 10%, + background-image: -moz-linear-gradient(top, + #81a8ce 10%, #5e87b0 75%); background-image: -webkit-gradient(linear,left top,left bottom, color-stop(0.05, #81a8ce), color-stop(0.55, #5e87b0)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#81a8ce', EndColorStr='#5e87b0')"; } - .mymobileheader.ui-bar-a { - background-image: -moz-linear-gradient(top, - #3c3c3c, + background-image: -moz-linear-gradient(top, + #3c3c3c, #111111); background-image: -webkit-gradient(linear,left top,left bottom, color-stop(0.05, #3c3c3c), color-stop(.55, #111111)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#3c3c3c', EndColorStr='#111111')"; } - - /*split page stuff for tablets */ div.tablets, #sliderdiv, .has-myblocks .jsetsbar { display: none; } - @media all and (min-width: 650px){ .has-myblocks div.tablets, .content-secondary, #sliderdiv { display: block; } - .type-home .ui-content, .type-interior .ui-content { padding: 0; @@ -2039,7 +1631,6 @@ body .ui-loader.ui-body-e h1 { .type-index .content-secondary .ui-listview { margin: 0; } - .has-myblocks .content-primary { width: 45%; float: right; @@ -2066,22 +1657,17 @@ body .ui-loader.ui-body-e h1 { margin: 0; padding: 0; } - } @media all and (min-width: 750px){ - .has-myblocks .content-secondary { width: 34%; } .has-myblocks .content-primary { width: 56%; padding-right: 1%; - } - + } } - @media all and (min-width: 1200px){ - .has-myblocks .content-secondary { width: 30%; padding-right:6%; @@ -2100,32 +1686,26 @@ body .ui-loader.ui-body-e h1 { width: 60%; } } - .tablets { text-align: center; padding-bottom: 1em; } - .tablets span { font-weight: bold; line-height: 1.3; } - .tablets h1 { text-align: center; margin-top: 0px; padding-bottom: .5em; background: url([[pix:theme|linevert]]) repeat-x 0 100%; } - .has-myblocks .content-secondary .ui-collapsible-set { padding-bottom: 1em; } - .has-myblocks .content-secondary div.ui-slider { width: 100%; } - #profcol .userimg a img { display: block; margin: 0 auto; diff --git a/theme/mymobile/style/jmobilerc2.css b/theme/mymobile/style/jmobilerc2.css index b0f805b9934..cfd94b10176 100644 --- a/theme/mymobile/style/jmobilerc2.css +++ b/theme/mymobile/style/jmobilerc2.css @@ -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 } diff --git a/theme/mymobile/style/media.css b/theme/mymobile/style/media.css index f8727e6b11b..151b1005c0b 100644 --- a/theme/mymobile/style/media.css +++ b/theme/mymobile/style/media.css @@ -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 */ \ No newline at end of file diff --git a/theme/mymobile/version.php b/theme/mymobile/version.php index 4b10c1575e7..362ea37a97c 100644 --- a/theme/mymobile/version.php +++ b/theme/mymobile/version.php @@ -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; \ No newline at end of file +$plugin->maturity = MATURITY_STABLE; \ No newline at end of file