Permalink
Browse files

4.7.3 Version

4.7.3 Version
  • Loading branch information...
Theophilix committed Nov 1, 2018
1 parent 2ee796a commit fa4dfc35bebf2a8dd3a82c6236462a93e19fa2c2
@@ -92,6 +92,12 @@ COM_EVENTTABLEEDIT_FIELD_ROW="Zeilen"
COM_EVENTTABLEEDIT_FIELD_ROW_DESC="Zeilen für die leere Tabelle"
COM_EVENTTABLEEDIT_FIELD_COL="Spalten"
COM_EVENTTABLEEDIT_FIELD_COL_DESC="Spalten für die leere Tabelle (max.12)"
COM_EVENTTABLEEDIT_EDIT_ENABLE_AUTOMATIC_SORTING_LABEL="Aktiviere automatische Sortierung"
COM_EVENTTABLEEDIT_EDIT_ENABLE_AUTOMATIC_SORTING_DESC="Automatische Sortierung aktivieren"
COM_EVENTTABLEEDIT_CHOOSE_COLUMN_LABEL="Spalte für Sortierung wählen"
COM_EVENTTABLEEDIT_CHOOSE_COLUMN_DESC="Spalte für Sortierung aus der Liste wählen"
COM_EVENTTABLEEDIT_SHOW_SHOWUSERNAMETOADMIN="Zeige dem ADMIN alle Nutzernamen an"
COM_EVENTTABLEEDIT_SHOW_SHOWUSERNAMETOUSER="Zeige dem NUTZER alle Nutzernamen an"
;Appointment table
COM_EVENTTABLEEDIT_FIELD_LOCATION_LABEL="Ort der ICS-Kalenderdatei"
@@ -223,7 +229,10 @@ COM_EVENTTABLEEDIT_UPLOAD_XMLFILE_VALID="Passende Event Table Edit XML-Datei aus
COM_EVENTTABLEEDIT_SUCCESSFULLY_TABLES_AND_DATA_CREATED="Die Tabellen und ihre festgelegten Einstellungen wurden erfolgreich importiert."
COM_EVENTTABLEEDIT_UPLOAD_XMLFILE="Event Table Edit - Tabelle inkl. aller Einstellungen importieren"
COM_EVENTTABLEEDIT_XMLFILE="Event Table Edit XML-Datei auswählen"
COM_EVENTTABLEEDIT_FILE_IS_NOT_CORRECT="Die Datei ist keine korrekte Event Table Edit – Datei. Bitte eine korrekte Datei mit den XML-tags <Event_Table_Edit_XML_file> und <ETE_version> hochladen."
COM_EVENTTABLEEDIT_FILE_IMPORTED_BUT_ETE_VERSION_NOT_MATCH="Import durchgeführt, aber die Event Table Edit Version der Datei unterscheidet sich von der des Systems. Ungleiche Optionen/Einstellungen wurden deaktiviert oder auf den Standardwert der Systemversion gesetzt."
COM_EVENTTABLEEDIT_UPLOAD_XMLFILE_VALID="Passende Event Table Edit XML-Datei auswählen"
COM_EVENTTABLEEDIT_FILE_IMPORTED_WARNING="Warnung"
;XML Export
COM_EVENTTABLEEDIT_MENUXML_EXPORT="XML Export"
@@ -260,9 +269,5 @@ COM_EVENTTABLEEDIT_DATATYPE_LINK="Link"
COM_EVENTTABLEEDIT_DATATYPE_MAIL="Mail"
COM_EVENTTABLEEDIT_DATATYPE_FOUR_STATE="Four State"
COM_EVENTTABLEEDIT_FILE_IS_NOT_CORRECT="Die Datei ist keine korrekte Event Table Edit – Datei. Bitte eine korrekte Datei mit den XML-tags <Event_Table_Edit_XML_file> und <ETE_version> hochladen."
COM_EVENTTABLEEDIT_FILE_IMPORTED_BUT_ETE_VERSION_NOT_MATCH="Import durchgeführt, aber die Event Table Edit Version der Datei unterscheidet sich von der des Systems. Ungleiche Optionen/Einstellungen wurden deaktiviert oder auf den Standardwert der Systemversion gesetzt."
COM_EVENTTABLEEDIT_UPLOAD_XMLFILE_VALID="Passende Event Table Edit XML-Datei auswählen"
COM_EVENTTABLEEDIT_FILE_IMPORTED_WARNING="Warnung"
COM_EVENTTABLEEDIT_SHOW_SHOWUSERNAMETOADMIN="Zeige dem ADMIN alle Nutzernamen an"
COM_EVENTTABLEEDIT_SHOW_SHOWUSERNAMETOUSER="Zeige dem NUTZER alle Nutzernamen an"
@@ -96,6 +96,14 @@ COM_EVENTTABLEEDIT_LINK_TARGET_SELF="Same Window"
COM_EVENTTABLEEDIT_FIELD_LANGUAGE_DESC="The language of the table."
COM_EVENTTABLEEDIT_EDIT_OWN_ROWS_LABEL="Edit own Rows"
COM_EVENTTABLEEDIT_EDIT_OWN_ROWS_DESC="Allow users to edit rows that they created themselves. This overrides other user access levels!"
COM_EVENTTABLEEDIT_SHOW_SHOWUSERNAMETOADMIN="Show username to ADMIN"
COM_EVENTTABLEEDIT_SHOW_SHOWUSERNAMETOUSER="Show username to USER"
COM_EVENTTABLEEDIT_EDIT_ENABLE_AUTOMATIC_SORTING_LABEL="Enable automatic sorting"
COM_EVENTTABLEEDIT_EDIT_ENABLE_AUTOMATIC_SORTING_DESC="Enable automatic sorting by default"
COM_EVENTTABLEEDIT_CHOOSE_COLUMN_LABEL="Choose column for sorting"
COM_EVENTTABLEEDIT_CHOOSE_COLUMN_DESC="Choose a column from the list"
; settings for appointment-table
COM_EVENTTABLEEDIT_FIELD_LOCATION_LABEL="Location"
@@ -216,7 +224,10 @@ COM_EVENTTABLEEDIT_UPLOAD_XMLFILE_VALID="Please upload a valid Event Table Edit
COM_EVENTTABLEEDIT_SUCCESSFULLY_TABLES_AND_DATA_CREATED="The tables and their settings were imported successfully."
COM_EVENTTABLEEDIT_UPLOAD_XMLFILE="Event Table Edit XML table file import"
COM_EVENTTABLEEDIT_XMLFILE="Upload Event Table Edit XML file"
COM_EVENTTABLEEDIT_FILE_IS_NOT_CORRECT="File is not a correct Event Table Edit XML file. Please upload a correct file with xml tags <Event_Table_Edit_XML_file> and <ETE_version>."
COM_EVENTTABLEEDIT_FILE_IMPORTED_BUT_ETE_VERSION_NOT_MATCH="File imported, but the Event Table Edit version in the file differs from system version. Differing options/settings were deactivated or changed to system version standards."
COM_EVENTTABLEEDIT_UPLOAD_XMLFILE_VALID="Please upload a valid Event Table Edit xml-file"
COM_EVENTTABLEEDIT_FILE_IMPORTED_WARNING="Warning"
; XML Export
COM_EVENTTABLEEDIT_MANAGER_XMLEXPORT="XML Export"
COM_EVENTTABLEEDIT_DOWNLOAD_FILE="Download"
@@ -248,10 +259,3 @@ COM_EVENTTABLEEDIT_DATATYPE_BOOLEAN="Yes or No"
COM_EVENTTABLEEDIT_DATATYPE_LINK="Link"
COM_EVENTTABLEEDIT_DATATYPE_MAIL="Mail"
COM_EVENTTABLEEDIT_DATATYPE_FOUR_STATE="Four State"
COM_EVENTTABLEEDIT_FILE_IS_NOT_CORRECT="File is not a correct Event Table Edit XML file. Please upload a correct file with xml tags <Event_Table_Edit_XML_file> and <ETE_version>."
COM_EVENTTABLEEDIT_FILE_IMPORTED_BUT_ETE_VERSION_NOT_MATCH="File imported, but the Event Table Edit version in the file differs from system version. Differing options/settings were deactivated or changed to system version standards."
COM_EVENTTABLEEDIT_UPLOAD_XMLFILE_VALID="Please upload a valid Event Table Edit xml-file"
COM_EVENTTABLEEDIT_FILE_IMPORTED_WARNING="Warning"
COM_EVENTTABLEEDIT_SHOW_SHOWUSERNAMETOADMIN="Show username to ADMIN"
COM_EVENTTABLEEDIT_SHOW_SHOWUSERNAMETOUSER="Show username to USER"
View
@@ -610,4 +610,16 @@ protected function _batchAccess($value, $pks)
return true;
}
function getFields(){
$jinput = JFactory::getApplication()->input;
$id = $jinput->get('id');
if(!$id){
return array();
}else{
$db = JFactory::getDBO();
$query = $db->setQuery("select * from #__eventtableedit_heads where table_id = $id");
return $db->loadObjectList();
}
}
}
@@ -369,6 +369,19 @@
component="com_eventtableedit"
section="etetable"
/>
<field name="automate_sort"
type="radio"
default="0"
label="COM_EVENTTABLEEDIT_EDIT_ENABLE_AUTOMATIC_SORTING_LABEL"
description="COM_EVENTTABLEEDIT_EDIT_ENABLE_AUTOMATIC_SORTING_DESC">
<option
value="1">JYES</option>
<option
value="0">JNO</option>
</field>
<field name="automate_sort_column" type="text" ></field>
</fieldset>
<fieldset name="style"
@@ -58,6 +58,11 @@ CREATE TABLE IF NOT EXISTS `#__eventtableedit_details` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `#__eventtableedit_details`
ADD `automate_sort` tinyint(4) NOT NULL,
ADD `automate_sort_column` varchar(255) NOT NULL AFTER `automate_sort`,
COMMENT='';
DROP TABLE IF EXISTS `#__eventtableedit_heads`;
CREATE TABLE `#__eventtableedit_heads` (
`id` int(11) NOT NULL auto_increment,
@@ -10,6 +10,7 @@
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
//echo $this->form->getValue('automate_sort_column');die;
?>
<script type="text/javascript">
@@ -180,6 +181,54 @@ function checkics(val){
<li class="normalshows"><?php echo $this->form->getLabel('sorting'); ?>
<?php echo $this->form->getInput('sorting'); ?></li>
<?php if($this->id){ ?>
<!--<li class="automate_sort"><?php echo $this->form->getLabel('automate_sort'); ?>
<?php echo $this->form->getInput('automate_sort'); ?></li>-->
<li class="automate_sort"><label id="jform_automate_sort-lbl" for="jform_automate_sort" class="hasPopover" title="" data-content="Enable automatic sorting by default" data-original-title="Enable automatic sorting">Enable automatic sorting</label>
<fieldset id="jform_automate_sort" class="radio">
<input type="radio" id="jform_automate_sort0" name="jform[automate_sort]" value="1" <?php if($this->item->automate_sort == 1){?> checked="checked" <?php } ?> aria-invalid="false">
<label for="jform_automate_sort0">Yes</label>
<li class="automate_sort_column" style="<?php if(!$this->form->getValue('automate_sort') || !$this->id){?>display:none;<?php } ?> list-style:none;">
<label id="jform_automate_sort_column-lbl" for="jform_automate_sort_column" class="hasTooltip" title="" data-content="<?php echo JText::_('COM_EVENTTABLEEDIT_CHOOSE_COLUMN_DESC'); ?>" data-original-title="<?php echo JText::_('COM_EVENTTABLEEDIT_CHOOSE_COLUMN_LABEL'); ?>"><?php echo JText::_('COM_EVENTTABLEEDIT_CHOOSE_COLUMN_LABEL'); ?></label>
<fieldset id="" class="select">
<?php
if(!empty($this->fields)){
?>
<select id="jform_automate_sort_column" name="jform[automate_sort_column]">
<?php
$updown = array("asc","desc");
$updown_html = array("asc"=>"&uarr;","desc"=>"&darr;");
foreach($this->fields as $re){
foreach($updown as $ud){
?>
<option value="head_<?php echo $re->id?>,<?php echo $ud?>" <?php if($this->form->getValue('automate_sort_column') == 'head_'.$re->id.','.$ud){ echo "selected=selected";}?>><?php echo $re->name?> <?php echo $updown_html[$ud];?></option>
<?php
}
}
?>
<option <?php if($this->form->getValue('automate_sort_column') == 'timestamp,asc'){ echo "selected=selected";}?> value="timestamp,asc">Timestamp &uarr;</option>
<option <?php if($this->form->getValue('automate_sort_column') == 'timestamp,desc'){ echo "selected=selected";}?> value="timestamp,desc">Timestamp &darr;</option>
</select>
<?php } ?>
</fieldset>
</li>
<input type="radio" id="jform_automate_sort1" name="jform[automate_sort]" value="0" <?php if($this->item->automate_sort == 0){?> checked="checked" <?php } ?> aria-invalid="false">
<label for="jform_automate_sort1">No</label>
</fieldset>
</li>
<?php } ?>
<li class="normalshows"><?php echo $this->form->getLabel('switcher'); ?>
<?php echo $this->form->getInput('switcher'); ?></li>
@@ -325,6 +374,7 @@ function checkics(val){
<li><?php echo $this->form->getLabel('id'); ?>
<?php echo $this->form->getInput('id'); ?></li>
<li>
<?php echo $this->form->getLabel('pretext'); ?>
@@ -411,7 +461,16 @@ function checkics(val){
checkics(0);
</script>
<?php
}
?>
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("input[name='jform[automate_sort]']").change(function(){
if(jQuery(this).val()==1){
jQuery("li.automate_sort_column").show();
}else{
jQuery("li.automate_sort_column").hide();
}
});
});
</script>
@@ -19,6 +19,9 @@ public function display($tpl = null) {
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->state = $this->get('State');
$this->fields = $this->get('Fields');
$jinput = JFactory::getApplication()->input;
$this->id = $jinput->get('id');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
View
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="component" version="4.7.2" method="upgrade">
<extension type="component" version="4.7.3" method="upgrade">
<name>com_eventtableedit</name>
<creationDate>10-10-2018</creationDate>
<creationDate>01-11-2018</creationDate>
<author>Manuel Kaspar and Theophilix</author>
<license>GNU/GPL</license>
<copyright>2007 - 2018 Manuel Kaspar and Theophilix</copyright>
<authorEmail>webmaster@eventtableedit.com</authorEmail>
<authorUrl>http://www.eventtableedit.com</authorUrl>
<version>4.7.2</version>
<version>4.7.3</version>
<description>COM_EVENTTABLEEDIT_DESCRIPTION</description>
<scriptfile>script.php</scriptfile>
View
@@ -149,32 +149,30 @@ function addActionRow2(row, singleOrdering) {
showLoad();
// Add table head for action row if it's the first time
var ordering = new Array();
if (singleOrdering == null) {
ordering = addActionDeleteRowFirstTime();
}
// If there's a new row to be added
else {
ordering[row] = singleOrdering;
}
// Add the column
var tempTable = tableProperties.myTable.tBodies[0];
for(var a = row; a < tempTable.rows.length; a++ ) {
var cell = new Element('td', {
'id': 'etetable-action-delete',
'class':"editable tablesaw-priority-50",
'data-tablesaw-priority':"10",
'data-tablesaw-sortable-col':"col"
});
var elem = tempTable.rows[a].appendChild(cell);
addDeleteButton(a);
//addOrdering(a, elem, ordering[a]);
}
//if(access.deleteRow){
var ordering = new Array();
if (singleOrdering == null) {
ordering = addActionDeleteRowFirstTime();
}
// If there's a new row to be added
else {
ordering[row] = singleOrdering;
}
// Add the column
var tempTable = tableProperties.myTable.tBodies[0];
for(var a = row; a < tempTable.rows.length; a++ ) {
var cell = new Element('td', {
'id': 'etetable-action-delete',
'class':"editable tablesaw-priority-50",
'data-tablesaw-priority':"10",
'data-tablesaw-sortable-col':"col"
});
var elem = tempTable.rows[a].appendChild(cell);
addDeleteButton(a);
//addOrdering(a, elem, ordering[a]);
}
//}
removeLoad();
}
/**
View
@@ -385,16 +385,23 @@ protected function getRowsQuery() {
//$orderCol = $this->defaultSorting;
//$orderDirn = 'ASC';
}
if ($this->_item->automate_sort) {
$order_dir = explode(",",$this->_item->automate_sort_column);
$orderCol = $order_dir[0]; $orderDirn = $order_dir[1];
}
$query->order($orderCol.' '.$orderDirn);
// Filter
$filter = $this->filterRows();
if ($filter != false) {
$ex = explode('~', $filter);
$query->where($ex[0]);
$query->where($ex[1]);
}
return $query;
}
@@ -451,7 +458,7 @@ private function filterRows() {
}
$query2 = $query.'~'.$query1;
return $query2;
return $query2;
}
/**

0 comments on commit fa4dfc3

Please sign in to comment.