Skip to content

Commit

Permalink
Fixed menu/page structure (page_below missing). Corrected 'bouncing' …
Browse files Browse the repository at this point in the history
…menu layout. Fixed included sitegallery boxes showing title.
  • Loading branch information
Semias committed Jan 13, 2012
1 parent 1db2d82 commit 9ef69da
Show file tree
Hide file tree
Showing 18 changed files with 255 additions and 53 deletions.
142 changes: 142 additions & 0 deletions error_log

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions inc/app/scheduler/tasks/sitesearch/index.php 100644 → 100755
Expand Up @@ -71,9 +71,11 @@
if (! isset ($rex->body)) {
$rex->body = 'body';
}

if (! isset ($item->{$rex->body})) {
$item->{$rex->body} = '';
}

if ($collection != 'sitellite_filesystem') {
$item->{$rex->body} = extractor_run ($item->{$rex->body}, 'HTML');
}
Expand Down
6 changes: 1 addition & 5 deletions inc/app/sitegallery/boxes/gallery/index.php
Expand Up @@ -13,12 +13,8 @@
$parameters['path']
);

if ($parameters['title']) {
if ($box['context'] == 'action') {
if ($parameters['title'] && $box['context'] == 'action') {
page_title ($parameters['title']);
} else {
echo '<h2>' . $parameters['title'] . '</h2>';
}
}

$valid = appconf ('valid');
Expand Down
4 changes: 1 addition & 3 deletions inc/app/sitegallery/boxes/pixgallery/index.php
Expand Up @@ -23,11 +23,9 @@
$res[] = (object) $info;
}

if ($parameters['title']) {
if (!empty($parameters['title'])) {
if ($box['context'] == 'action') {
page_title ($parameters['title']);
} else {
echo '<h2>' . $parameters['title'] . '</h2>';
}
if (appconf ('page_alias')) {
page_id ('sitegallery-pixgallery-action');
Expand Down
6 changes: 1 addition & 5 deletions inc/app/sitegallery/boxes/pixslideeffect/index.php
Expand Up @@ -44,12 +44,8 @@
}
}

if ($parameters['title']) {
if ($box['context'] == 'action') {
if ($parameters['title'] && $box['context'] == 'action') {
page_title ($parameters['title']);
} else {
echo '<h2>' . $parameters['title'] . '</h2>';
}
}

// atleast 2 images need to be present in the directory
Expand Down
6 changes: 1 addition & 5 deletions inc/app/sitegallery/boxes/pixslideshow/index.php
Expand Up @@ -38,12 +38,8 @@
}
}

if ($parameters['title']) {
if ($box['context'] == 'action') {
if ($parameters['title'] && $box['context'] == 'action') {
page_title ($parameters['title']);
} else {
echo '<h2>' . $parameters['title'] . '</h2>';
}
}

page_add_script (site_prefix () . '/js/rollover.js');
Expand Down
6 changes: 1 addition & 5 deletions inc/app/sitegallery/boxes/slideshow/index.php
Expand Up @@ -19,12 +19,8 @@
}
}

if ($parameters['title']) {
if ($box['context'] == 'action') {
if ($parameters['title'] && $box['context'] == 'action') {
page_title ($parameters['title']);
} else {
echo '<h2>' . $parameters['title'] . '</h2>';
}
}

page_add_script (site_prefix () . '/js/rollover.js');
Expand Down
2 changes: 1 addition & 1 deletion inc/app/sitellite/html/nav/dropdown/menu.css
Expand Up @@ -72,7 +72,7 @@ div#menu span {
}
div#menu ul ul a.parent span {
background-position:95% 8px;
background-image: url(images/item-pointer.gif);
background-image: url(../../../pix/nav/dropdown/item-pointer.gif);
}
div#menu ul ul a.parent:hover span {
background-image: url(../../../pix/nav/dropdown/item-pointer-mover.gif);
Expand Down
4 changes: 2 additions & 2 deletions inc/app/sitellite/lib/nav/Dropdown.php
Expand Up @@ -41,7 +41,7 @@ function create_menu_item($item, $page) {
);

// check if active
if ($page->id == $item->id || $item->id == page_get_section ()) {
if ($page->id == $item->id || $item->id == page_get_section () || $item->id == $page->below_page) {
$menu['active'] = 1;
}

Expand Down Expand Up @@ -75,7 +75,7 @@ function create_menu_item_nosubitems($item, $page) {
);

// check if active
if ($page->id == $item->id || $item->id == page_get_section ()) {
if ($page->id == $item->id || $item->id == page_get_section () || $item->id == $page->below_page) {
$menu['active'] = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion inc/app/sitemember/conf/properties.php
Expand Up @@ -17,7 +17,7 @@
// +----------------------------------------------------------------------+
//
// resolved tickets:
// #179 Digger integrated into sitemember
// #179 Digger integrated into sitemember
//


Expand Down
2 changes: 2 additions & 0 deletions inc/app/sitesearch/boxes/sidebar/access.php
@@ -1,3 +1,5 @@
sitellite_access = public
sitellite_status = approved
sitellite_action = on
sitellite_inline = on
sitellite_sidebar = on
8 changes: 8 additions & 0 deletions inc/app/sitesearch/boxes/sidebar/settings.php
@@ -0,0 +1,8 @@
; <?php /*
[Meta]
name = Sidebar Search Form
description = Sidebar Search Form
; */ ?>
2 changes: 1 addition & 1 deletion inc/app/xed/js/xed.js
Expand Up @@ -1570,7 +1570,7 @@ function xed_charmap (ifname) {

function xed_insert_character (ifname, n) {
xed_historian (ifname);
xed_insert_html_at_selection (ifname, '&#' + n + ';');
xed_insert_html_at_selection (ifname, '&#' + n + ';');
document.getElementById (ifname).contentWindow.focus ();
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions inc/lang/languages.php
Expand Up @@ -18,9 +18,9 @@
charset = UTF-8
fallback = no
fallback = Off
default = yes
default = no
[fr]
Expand Down Expand Up @@ -48,7 +48,7 @@
fallback = en
default = no
default = yes
[de]
Expand Down
64 changes: 44 additions & 20 deletions js/jquery.menu.js
Expand Up @@ -258,41 +258,65 @@ jQuery(function() {
};

// base rules
$('ul ul', '#menu').css({display: 'none', left: -2});
$('li', '#menu').hover(
var ie6 = ($.browser.msie && $.browser.version.substr(0, 1) == '6');
if (ie6) $('#menu').addClass('ie6');
$('ul ul', '#menu').css({display: 'none', left: 0, top: 38});
$('.menu>li', '#menu').hover(
function(){
var ul = $('ul:first', this);
if (ul.length){
if (!ul[0].hei) ul[0].hei = ul.height();
ul.css({height: 30, overflow: 'hidden'}).retarder(400, function(i){
$('a:first', ul[0].parentNode).css({});
i.css('display', 'block').animate({height: ul[0].hei}, {duration: 300, complete : function(){ ul.css('overflow', 'visible'); }});
});
}
},
function(){
var ul = $('ul:first', this);
if (ul.length){
var css = {display: 'none', height: ul[0].hei};
var a = $('a:first', this).css({borderColor: 'transparent'});
if (ie6) a.css({borderColor: '#171717', filter: 'chroma(color=#171717)'});
ul.stop().retarder(1, function(i){ i.css(css); });

}
}
);
$('ul ul li', '#menu').hover(
function(){
var ul = $('ul:first', this);
$('span', ul).css('color', 'rgb(169,169,169)');
if (ul.length){
if (!ul[0].wid){
ul[0].wid = ul.width();
ul[0].hei = ul.height();
}
ul.css({width: 0, height: 0, overflow: 'hidden', display: 'block'}).retarder(100, function(i){
i.animate({width: ul[0].wid, height: ul[0].hei}, {duration: 300, complete : function(){ ul.css('overflow', 'visible'); }});
if (!ul[0].wid) ul[0].wid = ul.width();
ul.css({width: 0, overflow: 'hidden'}).retarder(100, function(i){
i.css('display', 'block').animate({width: ul[0].wid}, {duration: 300, complete : function(){ ul.css('overflow', 'visible'); }});
});
}
},
function(){
var ul = $('ul:first', this);
if (ul.length){
var css = {display: 'none', width: ul[0].wid, height: ul[0].hei};
ul.stop().css('overflow', 'hidden').retarder(50, function(i){
i.animate({width: 0, height: 0}, {duration: 100, complete : function(){ $(this).css(css); }});
var css = {display: 'none', width: ul[0].wid};
ul.retarder(50, function(i){
i.animate({width: 0}, {duration: 100, complete : function(){ $(this).css(css); }});
});
}
}
);
// lava lamp
$('#menu ul.menu').lavaLamp({
fx: 'backout',
speed: 800
});
$('#menu ul.menu').lavaLamp({ speed: 400 });
var links = $('.menu>li>a', '#menu').css({borderBottom: 'none'});
// color animation
if (!($.browser.msie && $.browser.version.substr(0, 1) == '6')){
$('ul ul a span', '#menu').css('color', 'rgb(169,169,169)').hover(
function(){ $(this).animate({color: 'rgb(255,255,255)'}, 500); },
function(){ $(this).animate({color: 'rgb(169,169,169)'}, 200); }
if (ie6) links.css({borderColor: '#171717', filter: 'chroma(color=#171717)'});
else{
// first level
links.css('borderColor', 'transparent').hover(
function(){ $(this).animate({color: 'rgb(25,25,25)'}, 200); },
function(){ $(this).animate({color: 'rgb(25,25,25)'}, 100); }
);
$('.menu>li>a', '#menu').css('color', 'rgb(25,25,25)').hover(
function(){ $(this).animate({color: 'rgb(255,255,255)'}, 200); },
function(){ $(this).animate({color: 'rgb(25,25,25)'}, 100); }
);
}
});
42 changes: 42 additions & 0 deletions saf/lib/GUI/Menu.php
Expand Up @@ -402,6 +402,16 @@ function initTree ($tree) {

foreach ($tree as $k => $v) {
if ($v->{$this->listcolumn} == 'no') {

// Set menu parent
$this->addParent (
$v->{$this->idcolumn},
$v->{$this->showcolumn},
$v->{$this->refcolumn},
$v->{$this->sectioncolumn},
$v->{$this->templatecolumn}
);

continue;
} elseif (in_array ($v->{$this->refcolumn}, array_keys ($parents))) {
while (in_array ($v->{$this->refcolumn}, array_keys ($parents))) {
Expand Down Expand Up @@ -462,6 +472,38 @@ function findParent ($ref) {
$ref = db_shift ('select below_page from sitellite_page where id = ?', $ref);
return $this->findParent ($ref);
}

/**
* Adds an item to the tree. $ref is the id of the parent item.
*
* @access public
* @param string $id
* @param string $title
* @param string $ref
* @return object reference
*
13-1-2012
*/
function &addParent ($id, $title, $ref = '', $sect = '', $template = '') {
$this->{'items_' . $id} =& new MenuItem ($id, $title);


if (empty ($ref)) {
$this->tree[] =& $this->{'items_' . $id};
} else {
//$this->{'items_' . $ref}->children[] =& $this->{'items_' . $id};
$this->{'items_' . $id}->parent =& $this->{'items_' . $ref};
}

$this->{'items_' . $id}->colours = $this->colours;
$this->{'items_' . $id}->is_section = ($sect == 'yes') ? true : false;
if (! empty ($template)) {
$this->{'items_' . $id}->template = $template;
}

return $this->{'items_' . $id};
}

/**
* Adds an item to the tree. $ref is the id of the parent item.
Expand Down
2 changes: 1 addition & 1 deletion saf/lib/MailForm/MailForm.php
Expand Up @@ -946,7 +946,7 @@ function show ($template = '') {
$align = empty ($this->align) ? 'center' : $this->align;

//$data .= '<table border="0" cellspacing="0" cellpadding="0" align="' . $align . '">' . "\n";
$data .= '<table border="0" cellspacing="0" cellpadding="0">' . "\n";
$data .= '<table border="0" cellspacing="1" cellpadding="3" align="' . $align . '">' . "\n";
$data .= $_widgets;
return $data . '</table>' . "\n" . '</form>';
}
Expand Down
2 changes: 1 addition & 1 deletion saf/lib/MailForm/Rule.php
Expand Up @@ -91,7 +91,7 @@
*
* ? >
* </code>
*
*
* @package MailForm
* @author John Luxford <john.luxford@gmail.com>
* @license http://www.sitellite.org/index/license GNU GPL License
Expand Down

0 comments on commit 9ef69da

Please sign in to comment.