mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
Renormalized all text file line endings
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
if (!defined('e107_INIT')){ exit; }
|
||||
|
||||
if(USER_AREA)
|
||||
{
|
||||
e107::css('featurebox', 'featurebox.css');
|
||||
}
|
||||
<?php
|
||||
|
||||
|
||||
if (!defined('e107_INIT')){ exit; }
|
||||
|
||||
if(USER_AREA)
|
||||
{
|
||||
e107::css('featurebox', 'featurebox.css');
|
||||
}
|
||||
|
@@ -1,128 +1,128 @@
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Featurebox Javascript Class
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/featurebox.js,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
// Temporary solution, will be moved to e107Widgets
|
||||
var Featurebox = Class.create({
|
||||
|
||||
initialize: function(container, options) {
|
||||
this._container = $(container);
|
||||
if(!this._container) return;
|
||||
|
||||
this.options = Object.extend({
|
||||
'ajax_container': null,
|
||||
'ajax_navbar': null,
|
||||
'ajax_nav_selector': 'a.featurebox-nav-link',
|
||||
'ajax_loader': null,
|
||||
'ajax_hide_onload': false,
|
||||
'continuous': false,
|
||||
'ajax_url': '#{e_JS}'.parsePath() + 'e_ajax.php'
|
||||
}, options || {});
|
||||
|
||||
this._ajax_container = this.options.ajax_container && $(this.options.ajax_container) ? $(this.options.ajax_container) : this._container.down('.body');
|
||||
this._ajax_navbar = this.options.ajax_navbar && $(this.options.ajax_navbar) ? $(this.options.ajax_navbar) : this._container.down('.featurebox-nav');
|
||||
this._ajax_loader = this.options.ajax_loader && $(this.options.ajax_loader) ? $(this.options.ajax_loader) : this._container.down('.featurebox-loader');
|
||||
this._current = $A();
|
||||
|
||||
if(!this._ajax_container || !this._ajax_navbar) return;
|
||||
this._ajax_nav = this._ajax_navbar.select(this.options.ajax_nav_selector);
|
||||
|
||||
this.clickObserverHandler = this.clickObserver.bindAsEventListener(this);
|
||||
this.nextObserverHandler = this.nextObserver.bindAsEventListener(this);
|
||||
this.prevObserverHandler = this.prevObserver.bindAsEventListener(this);
|
||||
|
||||
this.startObserve();
|
||||
},
|
||||
|
||||
clickObserver: function(event) {
|
||||
var element = event.element('a');
|
||||
event.stop();
|
||||
this.run(element);
|
||||
},
|
||||
|
||||
nextObserver: function(event) {
|
||||
event.stop();
|
||||
var current = this._current[1] ? parseInt(this._current[1]) : 1,
|
||||
next = current >= this._ajax_nav.length ? 0 : current;
|
||||
if(!this.options.continuous && next == 0) return;
|
||||
this.run(this._ajax_nav[next]);
|
||||
},
|
||||
|
||||
prevObserver: function(event) {
|
||||
event.stop();
|
||||
var current = this._current[1] ? parseInt(this._current[1]) : 1,
|
||||
prev = (current - 2) < 0 ? this._ajax_nav.length - 1 : current - 2;
|
||||
if(!this.options.continuous && prev == this._ajax_nav.length - 1) return;
|
||||
this.run(this._ajax_nav[prev]);
|
||||
},
|
||||
|
||||
run: function(element) {
|
||||
var options = element.href.split('#',2)[1].split('.'), that;
|
||||
this._current = options;
|
||||
|
||||
if(element.hasClassName('active')) return;
|
||||
|
||||
this._ajax_navbar.select('.active').invoke('removeClassName', 'active');
|
||||
element.addClassName('active');
|
||||
if(element.up('li')) {
|
||||
element.up('li').addClassName('active'); // only li support at this time
|
||||
}
|
||||
|
||||
this.showLoader();
|
||||
that = this;
|
||||
new e107Ajax.Request(this.options.ajax_url, {
|
||||
parameters: {
|
||||
'ajax_sc': 'featurebox_items|' + varset(options[0], '') + '=from=' + varset(options[1], 0) + '&cols=' + varset(options[2], 0) + '&no_fill_empty=' + varset(options[3], 0)
|
||||
},
|
||||
method: 'post',
|
||||
onComplete: function(transport) {
|
||||
that.hideLoader(transport.responseText);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
startObserve: function() {
|
||||
this._ajax_navbar.select('a.featurebox-nav-link').invoke('observe', 'click', this.clickObserverHandler);
|
||||
this._ajax_navbar.select('a.featurebox-nav-next').invoke('observe', 'click', this.nextObserverHandler);
|
||||
this._ajax_navbar.select('a.featurebox-nav-prev').invoke('observe', 'click', this.prevObserverHandler);
|
||||
},
|
||||
|
||||
stopObserve: function() {
|
||||
this._ajax_navbar.select('a.featurebox-nav-link').invoke('stopObserving', 'click', this.clickObserverHandler);
|
||||
this._ajax_navbar.select('a.featurebox-nav-next').invoke('stopObserving', 'click', this.nextObserverHandler);
|
||||
this._ajax_navbar.select('a.featurebox-nav-prev').invoke('stopObserving', 'click', this.prevObserverHandler);
|
||||
},
|
||||
|
||||
showLoader: function() {
|
||||
if(this._ajax_loader) {
|
||||
if(this.options.ajax_hide_onload) {
|
||||
this._ajax_container.hide();
|
||||
}
|
||||
this._ajax_loader.show();
|
||||
}
|
||||
this.stopObserve();
|
||||
},
|
||||
|
||||
hideLoader: function(text) {
|
||||
if(this._ajax_loader) {
|
||||
this._ajax_loader.hide();
|
||||
if(this.options.ajax_hide_onload) {
|
||||
this._ajax_container.show();
|
||||
}
|
||||
}
|
||||
this._ajax_container.update(text);
|
||||
this.startObserve();
|
||||
}
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Featurebox Javascript Class
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/featurebox.js,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*
|
||||
*/
|
||||
|
||||
// Temporary solution, will be moved to e107Widgets
|
||||
var Featurebox = Class.create({
|
||||
|
||||
initialize: function(container, options) {
|
||||
this._container = $(container);
|
||||
if(!this._container) return;
|
||||
|
||||
this.options = Object.extend({
|
||||
'ajax_container': null,
|
||||
'ajax_navbar': null,
|
||||
'ajax_nav_selector': 'a.featurebox-nav-link',
|
||||
'ajax_loader': null,
|
||||
'ajax_hide_onload': false,
|
||||
'continuous': false,
|
||||
'ajax_url': '#{e_JS}'.parsePath() + 'e_ajax.php'
|
||||
}, options || {});
|
||||
|
||||
this._ajax_container = this.options.ajax_container && $(this.options.ajax_container) ? $(this.options.ajax_container) : this._container.down('.body');
|
||||
this._ajax_navbar = this.options.ajax_navbar && $(this.options.ajax_navbar) ? $(this.options.ajax_navbar) : this._container.down('.featurebox-nav');
|
||||
this._ajax_loader = this.options.ajax_loader && $(this.options.ajax_loader) ? $(this.options.ajax_loader) : this._container.down('.featurebox-loader');
|
||||
this._current = $A();
|
||||
|
||||
if(!this._ajax_container || !this._ajax_navbar) return;
|
||||
this._ajax_nav = this._ajax_navbar.select(this.options.ajax_nav_selector);
|
||||
|
||||
this.clickObserverHandler = this.clickObserver.bindAsEventListener(this);
|
||||
this.nextObserverHandler = this.nextObserver.bindAsEventListener(this);
|
||||
this.prevObserverHandler = this.prevObserver.bindAsEventListener(this);
|
||||
|
||||
this.startObserve();
|
||||
},
|
||||
|
||||
clickObserver: function(event) {
|
||||
var element = event.element('a');
|
||||
event.stop();
|
||||
this.run(element);
|
||||
},
|
||||
|
||||
nextObserver: function(event) {
|
||||
event.stop();
|
||||
var current = this._current[1] ? parseInt(this._current[1]) : 1,
|
||||
next = current >= this._ajax_nav.length ? 0 : current;
|
||||
if(!this.options.continuous && next == 0) return;
|
||||
this.run(this._ajax_nav[next]);
|
||||
},
|
||||
|
||||
prevObserver: function(event) {
|
||||
event.stop();
|
||||
var current = this._current[1] ? parseInt(this._current[1]) : 1,
|
||||
prev = (current - 2) < 0 ? this._ajax_nav.length - 1 : current - 2;
|
||||
if(!this.options.continuous && prev == this._ajax_nav.length - 1) return;
|
||||
this.run(this._ajax_nav[prev]);
|
||||
},
|
||||
|
||||
run: function(element) {
|
||||
var options = element.href.split('#',2)[1].split('.'), that;
|
||||
this._current = options;
|
||||
|
||||
if(element.hasClassName('active')) return;
|
||||
|
||||
this._ajax_navbar.select('.active').invoke('removeClassName', 'active');
|
||||
element.addClassName('active');
|
||||
if(element.up('li')) {
|
||||
element.up('li').addClassName('active'); // only li support at this time
|
||||
}
|
||||
|
||||
this.showLoader();
|
||||
that = this;
|
||||
new e107Ajax.Request(this.options.ajax_url, {
|
||||
parameters: {
|
||||
'ajax_sc': 'featurebox_items|' + varset(options[0], '') + '=from=' + varset(options[1], 0) + '&cols=' + varset(options[2], 0) + '&no_fill_empty=' + varset(options[3], 0)
|
||||
},
|
||||
method: 'post',
|
||||
onComplete: function(transport) {
|
||||
that.hideLoader(transport.responseText);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
startObserve: function() {
|
||||
this._ajax_navbar.select('a.featurebox-nav-link').invoke('observe', 'click', this.clickObserverHandler);
|
||||
this._ajax_navbar.select('a.featurebox-nav-next').invoke('observe', 'click', this.nextObserverHandler);
|
||||
this._ajax_navbar.select('a.featurebox-nav-prev').invoke('observe', 'click', this.prevObserverHandler);
|
||||
},
|
||||
|
||||
stopObserve: function() {
|
||||
this._ajax_navbar.select('a.featurebox-nav-link').invoke('stopObserving', 'click', this.clickObserverHandler);
|
||||
this._ajax_navbar.select('a.featurebox-nav-next').invoke('stopObserving', 'click', this.nextObserverHandler);
|
||||
this._ajax_navbar.select('a.featurebox-nav-prev').invoke('stopObserving', 'click', this.prevObserverHandler);
|
||||
},
|
||||
|
||||
showLoader: function() {
|
||||
if(this._ajax_loader) {
|
||||
if(this.options.ajax_hide_onload) {
|
||||
this._ajax_container.hide();
|
||||
}
|
||||
this._ajax_loader.show();
|
||||
}
|
||||
this.stopObserve();
|
||||
},
|
||||
|
||||
hideLoader: function(text) {
|
||||
if(this._ajax_loader) {
|
||||
this._ajax_loader.hide();
|
||||
if(this.options.ajax_hide_onload) {
|
||||
this._ajax_container.show();
|
||||
}
|
||||
}
|
||||
this._ajax_container.update(text);
|
||||
this.startObserve();
|
||||
}
|
||||
});
|
@@ -1,29 +1,29 @@
|
||||
<?php exit; ?>
|
||||
CREATE TABLE featurebox (
|
||||
`fb_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`fb_title` varchar(200) NOT NULL DEFAULT '',
|
||||
`fb_text` text NOT NULL,
|
||||
`fb_mode` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`fb_class` smallint(5) NOT NULL DEFAULT '0',
|
||||
`fb_rendertype` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
`fb_template` varchar(50) NOT NULL DEFAULT '',
|
||||
`fb_order` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`fb_image` varchar(255) NOT NULL DEFAULT '',
|
||||
`fb_imageurl` text NOT NULL,
|
||||
`fb_category` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`fb_id`),
|
||||
KEY `fb_category` (`fb_category`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE featurebox_category (
|
||||
`fb_category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`fb_category_title` varchar(200) NOT NULL DEFAULT '',
|
||||
`fb_category_icon` varchar(255) NOT NULL DEFAULT '',
|
||||
`fb_category_template` varchar(50) NOT NULL DEFAULT 'default',
|
||||
`fb_category_random` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
`fb_category_class` smallint(5) NOT NULL DEFAULT '0',
|
||||
`fb_category_limit` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
`fb_category_parms` text NOT NULL,
|
||||
PRIMARY KEY (`fb_category_id`),
|
||||
UNIQUE KEY `fb_category_template` (`fb_category_template`)
|
||||
<?php exit; ?>
|
||||
CREATE TABLE featurebox (
|
||||
`fb_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`fb_title` varchar(200) NOT NULL DEFAULT '',
|
||||
`fb_text` text NOT NULL,
|
||||
`fb_mode` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`fb_class` smallint(5) NOT NULL DEFAULT '0',
|
||||
`fb_rendertype` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
`fb_template` varchar(50) NOT NULL DEFAULT '',
|
||||
`fb_order` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`fb_image` varchar(255) NOT NULL DEFAULT '',
|
||||
`fb_imageurl` text NOT NULL,
|
||||
`fb_category` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`fb_id`),
|
||||
KEY `fb_category` (`fb_category`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE featurebox_category (
|
||||
`fb_category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`fb_category_title` varchar(200) NOT NULL DEFAULT '',
|
||||
`fb_category_icon` varchar(255) NOT NULL DEFAULT '',
|
||||
`fb_category_template` varchar(50) NOT NULL DEFAULT 'default',
|
||||
`fb_category_random` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
`fb_category_class` smallint(5) NOT NULL DEFAULT '0',
|
||||
`fb_category_limit` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
`fb_category_parms` text NOT NULL,
|
||||
PRIMARY KEY (`fb_category_id`),
|
||||
UNIQUE KEY `fb_category_template` (`fb_category_template`)
|
||||
) ENGINE=MyISAM;
|
Reference in New Issue
Block a user