Skip to content

Commit

Permalink
Merge pull request #41 from dmuneras/refactoring-archaiusjs
Browse files Browse the repository at this point in the history
split big js objects into modules, adding new options and new login page
  • Loading branch information
dmuneras committed Oct 26, 2015
2 parents 6acf70b + 484918a commit d0018db
Show file tree
Hide file tree
Showing 25 changed files with 1,643 additions and 847 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Archaius uses jQuery as a javascript framework and several jQuery plugins as wel
* A modified version of [responsiveslides](https://github.com/dmuneras/ResponsiveSlides.js)
* VelocityJS
* Waypoints
* Modernizr
* Modernizr

I have been using [LESS](http://lesscss.org/) to create CSS stylesheets.

Expand Down Expand Up @@ -63,6 +63,14 @@ take a look to this: [YUI shifter docs in Moodle](https://docs.moodle.org/dev/YU
Improvements history:
---------------------

25.10.2015
----------

* Add opacity to topic tab when admin mark the topic as hidden, for student is doesn't appear
* Highlighting topic working again. Highlighted topic will be automatically open.
* Adding option to add background image to login page
* Adding social icons options

19.01.2015
----------

Expand Down Expand Up @@ -107,7 +115,7 @@ decision).
* Preview settings page is now working too.
* Upload logo is possible in setting page
* New setting : mobile logo
* Velocity added to custom_blocks effect
* Velocity added to custom_blocks effect

06.07.2014
----------
Expand Down
45 changes: 24 additions & 21 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

$THEME->name = 'archaius';

$allRegions =
$allRegions =
array(
'side-pre',
'side-post',
Expand All @@ -49,7 +49,7 @@
);

$THEME->doctype = 'html5';
$THEME->parents = array('base');
$THEME->parents = array('base');
$THEME->parents_exclude_sheets = array(
'base'=>array(
'dock'
Expand All @@ -59,7 +59,7 @@
$THEME->editor_sheets = array('editor');

$THEME->layouts = array(
// Most pages - if we encounter an unknown or
// Most pages - if we encounter an unknown or
//a missing page type, this one is used.
'base' => array(
'file' => 'general.php',
Expand All @@ -69,7 +69,7 @@
'standard' => array(
'file' => 'general.php',
'regions' => array(
'side-pre',
'side-pre',
'side-post'
),
'defaultregion' => 'side-post',
Expand All @@ -79,9 +79,9 @@
'course' => array(
'file' => 'general.php',
'regions' => $allRegions,
'defaultregion' => 'side-pre',
'defaultregion' => 'side-pre',
'options' => array(
'langmenu' => true,
'langmenu' => true,
'nonavbar' => false
)
),
Expand All @@ -103,8 +103,8 @@
'regions' => $allRegions,
'defaultregion' => 'side-pre',
'options' => array(
'langmenu' => false,
'nonavbar' => true,
'langmenu' => false,
'nonavbar' => true,
'nosubtitle' => true
)
),
Expand All @@ -127,16 +127,16 @@
'options' => array('langmenu' => true)
),
'login' => array(
'file' => 'general.php',
'file' => 'login_layout.php',
'regions' => array()
),
// Pages that appear in pop-up windows - no navigation, no blocks, no header.
'popup' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array(
'nofooter'=>true,
'nonavbar'=>true,
'nofooter'=>true,
'nonavbar'=>true,
'noblocks'=>true
),
),
Expand All @@ -151,23 +151,23 @@
'file' => 'general.php',
'regions' => array(),
'options' => array(
'nofooter'=>true,
'nonavbar'=>true,
'nofooter'=>true,
'nonavbar'=>true,
'noblocks'=>true
),
),
// Used during upgrade and install, and for the 'This site is undergoing

// Used during upgrade and install, and for the 'This site is undergoing
//maintenance' message.
// This must not have any blocks, and it is good idea if it does not
//have links to other places - for example there should not be a home
// This must not have any blocks, and it is good idea if it does not
//have links to other places - for example there should not be a home
//link in the footer...
'maintenance' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array(
'nofooter'=>true,
'nonavbar'=>true,
'nofooter'=>true,
'nonavbar'=>true,
'noblocks'=>true
),
),
Expand All @@ -176,8 +176,8 @@
'file' => 'general.php',
'regions' => array(),
'options' => array(
'nofooter'=>true,
'nonavbar'=>false,
'nofooter'=>true,
'nonavbar'=>false,
'noblocks'=>true
),
),
Expand All @@ -193,6 +193,9 @@

$THEME->javascripts_footer = array(
'modernizr-2.7.1',
'archaius_course',
'archaius_blocks',
'archaius_slideshow',
'archaius'
);

Expand Down
38 changes: 38 additions & 0 deletions helpers/ArchaiusViewHelper.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/*
This program 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.
This program 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.
This plugin is part of Archaius theme.
*/

/**
* Functions needed by the archaius theme should be put here.
* Any functions that get created here should ALWAYS contain the theme name
* to reduce complications for other theme designers who may be copying this
*theme.
* @package theme_archaius
* @copyright 2012 onwards Daniel Munera Sanchez {@link http://dmuneras.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*
*/

/* ARCHAIUS VIEW HELPER
-----------------------------------------------------------------------------*/

class ArchaiusViewHelper {
public static function add_protocole_to_url($url){
$pattern = '/^(http|https):\/\//';
if(!preg_match($pattern, $url)){
return "http://" . $url;
}
return $url;
}
}
Loading

0 comments on commit d0018db

Please sign in to comment.