feat(deployed): add mod_jux_timeline 1.0.1 (no-source, vetted live)
JUX Timeline module (JoomlaUX); registration-gated vendor -> deployed files. Signed-off-by: LÁZÁR Imre <imre@illusion.hu> Assisted-by: claude-code@claude-opus-4-8
This commit is contained in:
parent
37c4e00e1b
commit
32592feea0
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,219 @@
|
||||
/**
|
||||
* @version $Id$
|
||||
* @author JoomlaUX
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_jux_timeline
|
||||
* @copyright Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
* @license License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
*/
|
||||
|
||||
@charset "UTF-8";
|
||||
|
||||
|
||||
.clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
line-height: 0;
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.jux-tl {
|
||||
}
|
||||
.jux-tl-wrap {
|
||||
position: relative;
|
||||
background: url("../images/line.png") repeat-y scroll center center transparent;
|
||||
}
|
||||
.jux-tl-line {
|
||||
background: url("../images/line.png") repeat-y scroll 0 0 transparent;
|
||||
height: 100%;
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
transform: translate(-50%);
|
||||
width:3px;
|
||||
}
|
||||
.jux-tl-item {
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
width: 50%;
|
||||
}
|
||||
.jux-tl-item.right{
|
||||
float: right;
|
||||
}
|
||||
.jux-tl-item.left {
|
||||
float: left;
|
||||
}
|
||||
.jux-tl-control{
|
||||
background: url("../images/plus.png") no-repeat scroll 0 0 transparent;
|
||||
display: block;
|
||||
height: 23px;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
width: 23px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.jux-tl-item.right .jux-tl-control{
|
||||
left: -12px;
|
||||
}
|
||||
.jux-tl-item.left .jux-tl-control{
|
||||
right: -12px;
|
||||
}
|
||||
.jux-tl-item.selected .jux-tl-control{
|
||||
background: url("../images/minus.png") no-repeat scroll 0 0 transparent;
|
||||
}
|
||||
|
||||
.jux-tl-item .jux-tl-time {
|
||||
color: #797979;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
min-height: 23px;
|
||||
min-width: 230px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.jux-tl-item.right .jux-tl-time {
|
||||
margin: 0 30px 0 0;
|
||||
right: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
.jux-tl-item.left .jux-tl-time {
|
||||
left: 100%;
|
||||
margin-left: 30px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.jux-tl-info {
|
||||
background: none repeat scroll 0 0 #5C5C5C;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
padding: 25px 40px;
|
||||
position: relative;
|
||||
}
|
||||
.jux-tl-item.left .jux-tl-info{
|
||||
margin-right: 30px;
|
||||
}
|
||||
.jux-tl-item.right .jux-tl-info{
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.jux-tl-info .arrow,
|
||||
.jux-tl-info .arrow:after {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
.jux-tl-info .arrow:after {
|
||||
content: "";
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.jux-tl-item.right .arrow {
|
||||
top: 30px;
|
||||
left: -10px;
|
||||
margin-top: -10px;
|
||||
border-width: 10px 10px 10px 0;
|
||||
border-right-color: #5C5C5C;
|
||||
}
|
||||
.jux-tl-item.right .arrow:after {
|
||||
border-width: 11px 11px 11px 0;
|
||||
border-right-color: rgba(0, 0, 0, 0.25);
|
||||
bottom: -11px;
|
||||
left: -1px;
|
||||
}
|
||||
|
||||
.jux-tl-item.left .arrow {
|
||||
top:30px;
|
||||
right: -10px;
|
||||
margin-top: -10px;
|
||||
border-width: 10px 0 10px 10px;
|
||||
border-left-color: #5C5C5C;
|
||||
}
|
||||
.jux-tl-item.left .arrow:after {
|
||||
border-width: 11px 0 11px 11px;
|
||||
border-left-color: rgba(0, 0, 0, 0.25);
|
||||
bottom: -11px;
|
||||
right: -1px;
|
||||
}
|
||||
|
||||
.jux-tl-item h2 a {
|
||||
margin: 0;
|
||||
color: #bfbfbf;
|
||||
text-decoration: none;
|
||||
transition: all 0.2s ease-in-out 0s;
|
||||
-ms-transition: all 0.2s ease-in-out 0s;
|
||||
-moz-transition: all 0.2s ease-in-out 0s;
|
||||
-o-transition: all 0.2s ease-in-out 0s;
|
||||
-webkit-transition: all 0.2s ease-in-out 0s;
|
||||
|
||||
}
|
||||
.jux-tl-item h2 a:hover{
|
||||
text-decoration: none;
|
||||
color: #EDEAEA;
|
||||
}
|
||||
.jux-tl-item .jux-tl-desc {
|
||||
display:none;
|
||||
overflow: hidden;
|
||||
color:#9b9b9b;
|
||||
}
|
||||
.jux-tl-item.selected .jux-tl-desc{
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 767px){
|
||||
.jux-tl-item {
|
||||
width: 100%;
|
||||
}
|
||||
.jux-tl-item.right,
|
||||
.jux-tl-item.left{
|
||||
float: left;
|
||||
}
|
||||
.jux-tl-control{
|
||||
top: 0px
|
||||
}
|
||||
.jux-tl-item.left .jux-tl-control{
|
||||
right: 50%;
|
||||
margin-right: -12px;
|
||||
}
|
||||
.jux-tl-item.right .jux-tl-control{
|
||||
left: 50%;
|
||||
margin-left: -12px;
|
||||
}
|
||||
|
||||
.jux-tl-item.right .jux-tl-info,
|
||||
.jux-tl-item.left .jux-tl-info{
|
||||
margin:40px 0 0 0;
|
||||
}
|
||||
|
||||
.jux-tl-item.left .arrow,
|
||||
.jux-tl-item.right .arrow
|
||||
{
|
||||
border-bottom-color: #5C5C5C;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-width: 0 10px 10px;
|
||||
left: 50%;
|
||||
margin-left: -10px;
|
||||
margin-top: 0;
|
||||
top: -10px;
|
||||
}
|
||||
.jux-tl-item.right .arrow:after,
|
||||
.jux-tl-item.left .arrow:after{
|
||||
border-width: 0 11px 11px;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.25);
|
||||
top: -1px;
|
||||
left: -11px;
|
||||
}
|
||||
.jux-tl-item .jux-tl-time{
|
||||
top:0
|
||||
}
|
||||
.jux-tl-item.left .jux-tl-time{
|
||||
left: 50%;
|
||||
}
|
||||
.jux-tl-item.right .jux-tl-time{
|
||||
right: 50%;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 147 B |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 156 B |
Binary file not shown.
|
After Width: | Height: | Size: 432 B |
Binary file not shown.
|
After Width: | Height: | Size: 454 B |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @version $Id$
|
||||
* @author JoomlaUX
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_jux_timeline
|
||||
* @copyright Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
* @license License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
*/
|
||||
!function($){
|
||||
"use strict";
|
||||
$.fn.juxtimeline = function(options){
|
||||
return this.each(function(){
|
||||
var $this = $(this),
|
||||
controls = $this.find(".jux-tl-control,.jux-tl-time,.jux-tl-title");
|
||||
controls.click(function(){
|
||||
var that = $(this),
|
||||
parent = that.closest(".jux-tl-item");
|
||||
if(parent.hasClass("selected")){
|
||||
parent.removeClass("selected").find(".jux-tl-desc").hide(400);
|
||||
}else{
|
||||
var selected = $this.find(".selected");
|
||||
if(selected){
|
||||
selected.removeClass("selected").find(".jux-tl-desc").hide(400);
|
||||
}
|
||||
parent.addClass("selected").find(".jux-tl-desc").show(400);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
}(window.jQuery);
|
||||
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @version $Id$
|
||||
* @author JoomlaUX
|
||||
* @package Joomla.Site
|
||||
*
|
||||
* @copyright Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
* @license License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
*/
|
||||
.ntm-item{
|
||||
cursor: move;
|
||||
position: relative;
|
||||
}
|
||||
#juxtimeline_remove{
|
||||
float: right;
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,186 @@
|
||||
/**
|
||||
* @version $Id$
|
||||
* @author JoomlaUX
|
||||
* @package Joomla.Site
|
||||
*
|
||||
* @copyright Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
* @license License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
*/
|
||||
!function ($) {
|
||||
"use strict";
|
||||
$.fn.juxtimeline = function(options){
|
||||
return this.each(function(){
|
||||
var $this = $(this),
|
||||
container = null,
|
||||
btn_add = null;
|
||||
container = $('<div class="ntm-container"></div>').insertAfter($this);
|
||||
container.append('<div style="margin:0 0 10px 0"><button class="btn btn-small btn-success" id="juxtimeline_add" type="button"><i class="icon-plus icon-white" title="New"></i>New</button></div>');
|
||||
container.append('<div class="ntm-items"></div>');
|
||||
var main_wap = $(".ntm-items");
|
||||
btn_add = $("#juxtimeline_add");
|
||||
if($this.val() != ""){
|
||||
var items = $.parseJSON(htmlspecialchars_decode($this.val()));
|
||||
$.each(items,function(key,item){
|
||||
main_wap.append(createTimeline(item.frame,item.title,item.description));
|
||||
$(".ntm-items").sortable();
|
||||
});
|
||||
}
|
||||
btn_add.click(function(){
|
||||
main_wap.prepend(createTimeline());
|
||||
$(".ntm-items").sortable();
|
||||
});
|
||||
var form = document.adminForm;
|
||||
if(!form){
|
||||
return false;
|
||||
}
|
||||
var onsubmit = form.onsubmit;
|
||||
form.onsubmit = function(e){
|
||||
juxtimelineUpdate();
|
||||
if(jQuery.isFunction(onsubmit)){
|
||||
onsubmit();
|
||||
}
|
||||
};
|
||||
|
||||
function htmlspecialchars (string, quote_style, charset, double_encode) {
|
||||
var optTemp = 0,
|
||||
i = 0,
|
||||
noquotes = false;
|
||||
if (typeof quote_style === 'undefined' || quote_style === null) {
|
||||
quote_style = 2;
|
||||
}
|
||||
string = string.toString();
|
||||
if (double_encode !== false) { // Put this first to avoid double-encoding
|
||||
string = string.replace(/&/g, '&');
|
||||
}
|
||||
string = string.replace(/</g, '<').replace(/>/g, '>');
|
||||
|
||||
var OPTS = {
|
||||
'ENT_NOQUOTES': 0,
|
||||
'ENT_HTML_QUOTE_SINGLE': 1,
|
||||
'ENT_HTML_QUOTE_DOUBLE': 2,
|
||||
'ENT_COMPAT': 2,
|
||||
'ENT_QUOTES': 3,
|
||||
'ENT_IGNORE': 4
|
||||
};
|
||||
if (quote_style === 0) {
|
||||
noquotes = true;
|
||||
}
|
||||
if (typeof quote_style !== 'number') { // Allow for a single string or an array of string flags
|
||||
quote_style = [].concat(quote_style);
|
||||
for (i = 0; i < quote_style.length; i++) {
|
||||
// Resolve string input to bitwise e.g. 'ENT_IGNORE' becomes 4
|
||||
if (OPTS[quote_style[i]] === 0) {
|
||||
noquotes = true;
|
||||
}
|
||||
else if (OPTS[quote_style[i]]) {
|
||||
optTemp = optTemp | OPTS[quote_style[i]];
|
||||
}
|
||||
}
|
||||
quote_style = optTemp;
|
||||
}
|
||||
if (quote_style & OPTS.ENT_HTML_QUOTE_SINGLE) {
|
||||
string = string.replace(/'/g, ''');
|
||||
}
|
||||
if (!noquotes) {
|
||||
string = string.replace(/"/g, '"');
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
function htmlspecialchars_decode (string, quote_style) {
|
||||
var optTemp = 0,
|
||||
i = 0,
|
||||
noquotes = false;
|
||||
if (typeof quote_style === 'undefined') {
|
||||
quote_style = 2;
|
||||
}
|
||||
string = string.toString().replace(/</g, '<').replace(/>/g, '>');
|
||||
var OPTS = {
|
||||
'ENT_NOQUOTES': 0,
|
||||
'ENT_HTML_QUOTE_SINGLE': 1,
|
||||
'ENT_HTML_QUOTE_DOUBLE': 2,
|
||||
'ENT_COMPAT': 2,
|
||||
'ENT_QUOTES': 3,
|
||||
'ENT_IGNORE': 4
|
||||
};
|
||||
if (quote_style === 0) {
|
||||
noquotes = true;
|
||||
}
|
||||
if (typeof quote_style !== 'number') { // Allow for a single string or an array of string flags
|
||||
quote_style = [].concat(quote_style);
|
||||
for (i = 0; i < quote_style.length; i++) {
|
||||
// Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4
|
||||
if (OPTS[quote_style[i]] === 0) {
|
||||
noquotes = true;
|
||||
} else if (OPTS[quote_style[i]]) {
|
||||
optTemp = optTemp | OPTS[quote_style[i]];
|
||||
}
|
||||
}
|
||||
quote_style = optTemp;
|
||||
}
|
||||
if (quote_style & OPTS.ENT_HTML_QUOTE_SINGLE) {
|
||||
string = string.replace(/�*39;/g, "'"); // PHP doesn't currently escape if more than one 0, but it should
|
||||
// string = string.replace(/'|�*27;/g, "'"); // This would also be useful here, but not a part of PHP
|
||||
}
|
||||
if (!noquotes) {
|
||||
string = string.replace(/"/g, '"');
|
||||
}
|
||||
// Put this in last place to avoid escape being double-decoded
|
||||
string = string.replace(/&/g, '&');
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
function juxtimelineUpdate(){
|
||||
var items = container.find(".ntm-item"),
|
||||
config = {};
|
||||
items.each(function(index,element){
|
||||
var that = $(this),
|
||||
item = {'frame':that.find("#timeline_frame").val(),'title':that.find("#timeline_title").val(),'description':that.find("#timeline_description").val()};
|
||||
if (Object.keys(item).length) config[index] = item;
|
||||
});
|
||||
$this.val(htmlspecialchars(JSON.stringify(config)));
|
||||
};
|
||||
|
||||
function createTimeline(frame,title,description){
|
||||
frame = typeof(frame) == 'undefined' ? '' : frame;
|
||||
title = typeof(title) == 'undefined' ? '' : title;
|
||||
description = typeof(description) == 'undefined' ? '' : description;
|
||||
var html = '<div class="well well-small ntm-item"><button onclick="juxtimelineRemove(this);" class="btn btn-small" id="juxtimeline_remove" type="button"><i class="icon-remove icon-white" title="Remove"></i>Remove</button>'
|
||||
+'<div class="control-group">'
|
||||
+'<div class="control-label">'
|
||||
+'<label for="timeline_frame">Time Frame</label>'
|
||||
+'</div>'
|
||||
+'<div class="controls">'
|
||||
+'<input type="text" id="timeline_frame" name="timeline_frame" value="'+frame+'">'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
+'<div class="control-group">'
|
||||
+'<div class="control-label">'
|
||||
+'<label for="timeline_title">Title</label>'
|
||||
+'</div>'
|
||||
+'<div class="controls">'
|
||||
+'<input type="text" id="timeline_title" name="timeline_title" value="'+title+'">'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
+'<div class="control-group">'
|
||||
+'<div class="control-label">'
|
||||
+'<label for="timeline_description">Time Description</label>'
|
||||
+'</div>'
|
||||
+'<div class="controls">'
|
||||
+'<textarea id="timeline_description" name="timeline_description" style="height:50px;width:500px;">'+description+'</textarea>'
|
||||
+'</div>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
return html;
|
||||
}
|
||||
});
|
||||
}
|
||||
}(window.jQuery);
|
||||
|
||||
function juxtimelineRemove(element){
|
||||
jQuery(element).closest(".ntm-item").remove();
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version $Id$
|
||||
* @author JoomlaUX
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_jux_timeline
|
||||
* @copyright Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
* @license License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class JFormFieldJUXTimeLine extends JFormField {
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'juxtimeline';
|
||||
|
||||
public function __construct($form = null){
|
||||
parent::__construct($form);
|
||||
JHtml::_('jquery.ui', array('core','sortable'));
|
||||
}
|
||||
|
||||
protected function getInput(){
|
||||
$document = JFactory::getDocument();
|
||||
$uri = str_replace("\\","/", str_replace(JPATH_SITE, JURI::root(true), dirname(__FILE__) ));
|
||||
$document->addScript($uri.'/assets/js/juxtimeline.js');
|
||||
$document->addStyleSheet($uri.'/assets/css/juxtimeline.css');
|
||||
$document->addScriptDeclaration('
|
||||
jQuery(document).ready(function($){
|
||||
$("#'.$this->id.'").juxtimeline();
|
||||
});
|
||||
');
|
||||
// Initialize some field attributes.
|
||||
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
|
||||
$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
|
||||
|
||||
// Initialize JavaScript field attributes.
|
||||
$onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
|
||||
|
||||
return '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '" value="'
|
||||
. htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $class . $disabled . $onchange . ' />';
|
||||
}
|
||||
|
||||
protected function getLabel(){
|
||||
return parent::getLabel();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id$
|
||||
* @author JoomlaUX!
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_jux_news_wall
|
||||
* @copyright Copyright (C) 2012 - 2013 by JoomlaUX. All rights reserved.
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
JFormHelper::loadFieldClass('note');
|
||||
require_once(JPATH_ROOT.'/libraries/joomla/form/fields/note.php');
|
||||
|
||||
class JFormFieldJUXUpdate extends JFormFieldNote {
|
||||
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'JUXUpdate';
|
||||
|
||||
|
||||
/** @var int The extension_id of this component */
|
||||
protected $extension_id = 0;
|
||||
|
||||
/**
|
||||
* Active sub-fields.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected function getLabel()
|
||||
{
|
||||
|
||||
$heading = $this->element['heading'] ? (string) $this->element['heading'] : 'h4';
|
||||
$class = !empty($this->class) ? ' class="' . $this->class . '"' : '';
|
||||
$close = (string) $this->element['close'];
|
||||
$download_url = (string) $this->element['download_url'];
|
||||
$html = array();
|
||||
|
||||
if ($close)
|
||||
{
|
||||
$close = $close == 'true' ? 'alert' : $close;
|
||||
$html[] = '<button type="button" class="close" data-dismiss="' . $close . '">×</button>';
|
||||
}
|
||||
$this->extension_id = $this->getExtensionID();
|
||||
$updateInfo = $this->getUpdates();
|
||||
if ($updateInfo['hasUpdate']) {
|
||||
$html[] = '<h3><i class="icon-download" style="margin-right: 5px; padding-right: 5px;"></i>An updated version of '.$updateInfo['name'].' (<b>'.$updateInfo['version'].'</b>) is available for download.
|
||||
|
||||
</h3>
|
||||
<p>Before updating ensure that the update is compatible with your current version</p>
|
||||
<p>
|
||||
<a href="'.$download_url.'" target="_blank" class="btn btn-primary">
|
||||
Get this version
|
||||
</a>
|
||||
<a href="'.$updateInfo['infoURL'].'" target="_blank" class="btn btn-small btn-info">
|
||||
More information
|
||||
</a>
|
||||
</p>';
|
||||
return '</div><div ' . $class . '>' . implode('', $html);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the field input markup.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function getExtensionID() {
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('extension_id')
|
||||
->from('#__extensions')
|
||||
->where($db->qn('element') . ' = ' . $db->q('mod_jux_timeline'));
|
||||
$db->setQuery($query);
|
||||
try {
|
||||
$ids = $db->loadColumn();
|
||||
} catch (Exception $exc) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($ids)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $extension_id = array_shift($ids);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the update site Ids for our extension.
|
||||
*
|
||||
* @return mixed An array of Ids or null if the query failed.
|
||||
*/
|
||||
public function getUpdateSiteIds()
|
||||
{
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select($db->qn('update_site_id'))
|
||||
->from($db->qn('#__update_sites_extensions'))
|
||||
->where($db->qn('extension_id') . ' = ' . $db->q($this->extension_id));
|
||||
$db->setQuery($query);
|
||||
$updateSiteIds = $db->loadColumn(0);
|
||||
|
||||
return $updateSiteIds;
|
||||
}
|
||||
|
||||
public function getUpdates($force = false)
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
|
||||
// Default response (no update)
|
||||
$updateResponse = array(
|
||||
'hasUpdate' => false,
|
||||
'version' => '',
|
||||
'infoURL' => '',
|
||||
'name' => ''
|
||||
);
|
||||
|
||||
if (empty($this->extension_id))
|
||||
{
|
||||
return $updateResponse;
|
||||
}
|
||||
|
||||
// If we are forcing the reload, set the last_check_timestamp to 0
|
||||
// and remove cached component update info in order to force a reload
|
||||
if ($force)
|
||||
{
|
||||
// Find the update site IDs
|
||||
$updateSiteIds = $this->getUpdateSiteIds();
|
||||
|
||||
if (empty($updateSiteIds))
|
||||
{
|
||||
return $updateResponse;
|
||||
}
|
||||
|
||||
// Set the last_check_timestamp to 0
|
||||
$query = $db->getQuery(true)
|
||||
->update($db->qn('#__update_sites'))
|
||||
->set($db->qn('last_check_timestamp') . ' = ' . $db->q('0'))
|
||||
->where($db->qn('update_site_id') .' IN ('.implode(', ', $updateSiteIds).')');
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
// Remove cached component update info from #__updates
|
||||
$query = $db->getQuery(true)
|
||||
->delete($db->qn('#__updates'))
|
||||
->where($db->qn('update_site_id') .' IN ('.implode(', ', $updateSiteIds).')');
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
}
|
||||
|
||||
// Use the update cache timeout specified in com_installer
|
||||
$comInstallerParams = JComponentHelper::getParams('com_installer', false);
|
||||
$timeout = 3600 * $comInstallerParams->get('cachetimeout', '6');
|
||||
// Load any updates from the network into the #__updates table
|
||||
|
||||
// Get the update record from the database
|
||||
$query = $db->getQuery(true)
|
||||
->select('*')
|
||||
->from($db->qn('#__updates'))
|
||||
->where($db->qn('extension_id') . ' = ' . $db->q($this->extension_id));
|
||||
$db->setQuery($query);
|
||||
$updateRecord = $db->loadObject();
|
||||
|
||||
// If we have an update record in the database return the information found there
|
||||
if (is_object($updateRecord))
|
||||
{
|
||||
$updateResponse = array(
|
||||
'hasUpdate' => true,
|
||||
'version' => $updateRecord->version,
|
||||
'infoURL' => $updateRecord->infourl,
|
||||
'name' => $updateRecord->name
|
||||
);
|
||||
}
|
||||
return $updateResponse;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id$
|
||||
* @author JoomlaUX
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_jux_timeline
|
||||
* @copyright Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
* @license License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
*/
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
abstract class modJUXTimeLineHelper {
|
||||
|
||||
public static function getTimeLine(&$params){
|
||||
$timeline = $params->get('timeline');
|
||||
$timeline = json_decode(htmlspecialchars_decode($timeline),true);
|
||||
return $timeline;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,14 @@
|
||||
; Joomla! Project
|
||||
; Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
|
||||
|
||||
MOD_JUX_TIMELINE="JUX TimeLine"
|
||||
MOD_JUX_TIMELINE_DISPLAY="Display"
|
||||
MOD_JUX_TIMELINE_DISPLAY_DESC="The display type of the timeline module show when first load, Set 'Default' to expand the top timeline, set 'Expand' to expand all timeline information or 'Collapse' to collapse all."
|
||||
JUX_TIMELINE_DEFAULT="Default"
|
||||
JUX_TIMELINE_EXPAND="Expand"
|
||||
JUX_TIMELINE_COLLAPSE="Collapse"
|
||||
MOD_JUX_TIMELINE_ADD_LABEL="Time Line Data"
|
||||
MOD_JUX_TIMELINE_ADD_DESC="Please use the 'New' button to add new timeline data, use 'Remove' button to delete a timeline. Drag/Drop the box to re-order the timeline. Each timeline has a Time Frame, Timeline Title and Timeline details information."
|
||||
@ -0,0 +1,7 @@
|
||||
; Joomla! Project
|
||||
; Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
|
||||
|
||||
MOD_JUX_TIMELINE="JUX TimeLine"
|
||||
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version $Id$
|
||||
* @author JoomlaUX
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_jux_timeline
|
||||
* @copyright Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
* @license License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
require_once __DIR__ . '/helper.php';
|
||||
$document = JFactory::getDocument();
|
||||
//include css
|
||||
|
||||
$document->addStyleSheet('modules/' . $module->module . '/assets/css/style.css');
|
||||
//Include js
|
||||
$document->addScript('modules/' . $module->module . '/assets/js/script.js');
|
||||
$document->addScriptDeclaration('
|
||||
jQuery(document).ready(function($){
|
||||
$("#jux_tl'.$module->id.'").juxtimeline();
|
||||
});
|
||||
');
|
||||
|
||||
$lists = modJUXTimeLineHelper::getTimeLine($params);
|
||||
|
||||
require (JModuleHelper::getLayoutPath('mod_jux_timeline',$params->get('layout', 'default')));
|
||||
@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<extension type="module" version="3.0" client="site" method="upgrade">
|
||||
<name>JUX Timeline</name>
|
||||
<author>JoomlaUX</author>
|
||||
<creationDate>December 2014</creationDate>
|
||||
<copyright>Copyright (C) 2014 JoomlaUX. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<authorEmail>admin@joomlaux.com</authorEmail>
|
||||
<authorUrl>www.joomlaux.com</authorUrl>
|
||||
<version>1.0.1</version>
|
||||
<description>
|
||||
<![CDATA[
|
||||
<div class='js_desc'>
|
||||
<h3 style="color: #008000;">JUX Timeline</h3>
|
||||
<img alt='JUX Timeline' src='http://www.joomlaux.com/images/digitalstore/preview/jux-timeline.png' width='40%' style='margin-bottom:30px'/>
|
||||
<p style='text-align:justify;'>JUX Timeline is a joomla module which was built to help business, organizations showing their timeline of development and impress new customers. From the timeline, customers can easily have an overview about the company activities and evolution.
|
||||
</p>
|
||||
<p style='text-align:justify;'>
|
||||
<p style='clear:both'><span style='color: #ff6600;'><strong><strong>Most completed Timeline</strong></strong></p>
|
||||
<ul class='list-style'>
|
||||
<li>JUX Timeline will Display in vertical line</li>
|
||||
<li>Help you can Detail information</li>
|
||||
<li><strong>Mobile & Tablets compatible!</strong></li>
|
||||
<li>Backend fully control</li>
|
||||
<li><span>Available for Joomla™ 3.x</span></li>
|
||||
|
||||
</ul>
|
||||
<p><strong><span style='color: #ff0000;'>Easy to use</span><br /></strong></p>
|
||||
<ul class='list-style'>
|
||||
<li>Works out of the box with most Joomla Templates</li>
|
||||
<li><strong>No coding required!</strong></li>
|
||||
</ul>
|
||||
<p><span style='color: #008000;'><strong>Userful Links</strong></span></p>
|
||||
<ul class='list-style'>
|
||||
<li><a target='_blank' href='http://www.joomlaux.com/document/jux_timeline/'>Userguide</a></li>
|
||||
<li><a target='_blank' href='http://joomlaux.com/forum'>Forums</a></li>
|
||||
<li><a target='_blank' href='http://www.joomlaux.com/support/contact-us.html'>Submit Ticket</a></li>
|
||||
</ul>
|
||||
<p>Copyright 2013 - 2014 <a href='http://www.joomlaux.com/' title='Visit JoomlaUX.com'>JoomlaUX.com</a>.</p>
|
||||
|
||||
|
||||
<style type='text/css'>
|
||||
.js_desc{
|
||||
text-align: left;
|
||||
}
|
||||
.js_desc h3{
|
||||
margin: 20px 0px 10px 0px;
|
||||
}
|
||||
.js_desc img{
|
||||
width:40%;
|
||||
margin:5px 5px 5px 0px;
|
||||
}
|
||||
.js_desc p,.js_desc li{
|
||||
list-style: none outside none;
|
||||
padding: 5px 5px 5px 0px;
|
||||
}
|
||||
|
||||
.js_desc ul.list-style li{
|
||||
background:url(http://www.joomlaux.com/images/icons/tick.png) 0px 6px no-repeat;
|
||||
padding-left:30px;
|
||||
line-height:15px;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
]]>
|
||||
</description>
|
||||
<files>
|
||||
<filename module="mod_jux_timeline">mod_jux_timeline.php</filename>
|
||||
<folder>tmpl</folder>
|
||||
<folder>assets</folder>
|
||||
<folder>elements</folder>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<filename>mod_jux_timeline.xml</filename>
|
||||
<folder>language</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">language/en-GB.mod_jux_timeline.ini</language>
|
||||
<language tag="en-GB">language/en-GB.mod_jux_timeline.sys.ini</language>
|
||||
</languages>
|
||||
<updateservers>
|
||||
<server type="extension" priority="1" name="JUX Timeline">http://www.joomlaux.com/updates/extensions/mod_jux_timeline_update.xml</server>
|
||||
</updateservers>
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic" addfieldpath="/modules/mod_jux_timeline/elements">
|
||||
<field name="update_infor"
|
||||
type="juxupdate"
|
||||
class="alert alert-warning"
|
||||
close="true"
|
||||
download_url="http://www.joomlaux.com/download.html"
|
||||
>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="display"
|
||||
type="list"
|
||||
default="0"
|
||||
label="MOD_JUX_TIMELINE_DISPLAY"
|
||||
description="MOD_JUX_TIMELINE_DISPLAY_DESC">
|
||||
<option value="">JUX_TIMELINE_DEFAULT</option>
|
||||
<option
|
||||
value="1">JUX_TIMELINE_EXPAND</option>
|
||||
<option
|
||||
value="2">JUX_TIMELINE_COLLAPSE</option>
|
||||
</field>
|
||||
<field
|
||||
name="timeline"
|
||||
type="juxtimeline"
|
||||
label="MOD_JUX_TIMELINE_ADD_LABEL"
|
||||
description="MOD_JUX_TIMELINE_ADD_DESC"
|
||||
filter="raw"
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="advanced">
|
||||
<field
|
||||
name="moduleclass_sfx"
|
||||
type="text"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
|
||||
<field
|
||||
name="layout"
|
||||
type="modulelayout"
|
||||
label="JFIELD_ALT_LAYOUT_LABEL"
|
||||
description="JFIELD_ALT_MODULE_LAYOUT_DESC" />
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
default="1"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC">
|
||||
<option
|
||||
value="1">JGLOBAL_USE_GLOBAL</option>
|
||||
<option
|
||||
value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="cache_time"
|
||||
type="text"
|
||||
default="900"
|
||||
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHE_TIME_DESC" />
|
||||
|
||||
<field
|
||||
name="cachemode"
|
||||
type="hidden"
|
||||
default="static">
|
||||
<option
|
||||
value="static"></option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
||||
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id$
|
||||
* @author JoomlaUX
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_jux_timeline
|
||||
* @copyright Copyright (C) 2013 JoomlaUX. All rights reserved.
|
||||
* @license License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
*/
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
$display = $params->get('display');
|
||||
?>
|
||||
<div id="jux_tl<?php echo $module->id ?>" class="jux-tl<?php echo $params->get('moduleclass_sfx');?>">
|
||||
<div class="jux-tl-wrap clearfix">
|
||||
<?php $i = 0;?>
|
||||
<?php foreach ($lists as $list){?>
|
||||
<div class="jux-tl-item <?php if ((!$display && $i==0 ) || ($display == 1)){?> selected<?php }?><?php if ($i++ % 2 == 0 ){?> right<?php }else{?> left<?php }?>">
|
||||
<div class="jux-tl-control"></div>
|
||||
<div class="jux-tl-time"><?php echo $list['frame']?></div>
|
||||
<div class="jux-tl-info">
|
||||
<div class="arrow"></div>
|
||||
<h2 class="jux-tl-title"><a href="#" title="<?php echo $list['title']?>"><?php echo $list['title']?></a></h2>
|
||||
<div class="jux-tl-desc" <?php if ((!$display && $i==1 ) || ($display == 1)){?> style="display:block"<?php }?>><?php echo $list['description']?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
Loading…
Reference in New Issue
Block a user