Permalink
Browse files

Normalises files format, indents more nicely the code and makes the Q…

…uickItemList input, ready to be parsed by Doxygen.
  • Loading branch information...
JB Lebrun
JB Lebrun committed Jul 27, 2018
1 parent 2ea316e commit 8825d543b804daad531dc329d4bf9803e07a2bb4
@@ -1,115 +1,146 @@
<?php
/*
* CaMykS Engine
* Developed by : camyks.net
* Author : CaMykS Team <camyks.contact@gmail.com>
* CaMykS Version : 1.0a
* Object Version : 1.0
* Object Type : Plugin / Input Engine
* Creation Date : Mar 2007
* Last Modif Date : Mar 2007
* History :
* * 07-03-xx : Initial Files
*
* QuickItemList input : Dynamic list editor
*/
class QuickItemList extends Input {
/* variables */
var $objectName;
var $fullListName;
var $fullListItems;
var $editListName;
var $editListItems;
var $form;
var $formItemName;
var $formItemSep;
/*
* constructor
* @param string $path_list
*/
function QuickItemList ( $path_type ) {
parent::Input('QuickItemList', $path_type);
/* set plugin version */
$this->version = '1.0';
/* set plugin package */
$this->plugin_package = 'Default';
/* set plugin author */
$this->author_name = 'CaMykS Team';
$this->author_mail = 'camyks.contact@gmail.com';
$this->author_group = 'camyks.net';
}
/* overwrite input methods */
/*
* initialise input
* @param string $n the object name
* @param string $fln the full list name
* @param array $fli the full list items
* @param string $eln the edited list name
* @param array $eli the edited list items
* @param string $f the form name
* @param string $fin the form item
* @param string $fis the form item separator value
* @return void
* @access public
*/
function initialise ( $n='', $fln='', $fli=array(), $eln='', $eli=array(), &$f=null, $fin=null, $fis=',' ) {
global $camyks;
/* set name value */
$this->objectName = $n;
/* set full list values */
$this->fullListName = $fln;
$this->fullListItems = $fli;
/* set edit list values */
$this->editListName = $eln;
$this->editListItems = $eli;
/* set form values */
$this->formName = $f;
$this->formItemName = $fin;
$this->formItemSep = $fis;
/* set javascript file */
$this->add_JSEngineFile ( 'tool/array.js' );
$this->add_JSFile ( 'quickitemlist.js' );
/* set javascript object */
$this->add_JSScript ( $this->objectName.' = new QuickItemList("'.$this->objectName.'");' );
/* set javascript object values */
foreach ( $this->fullListItems as $i ) {
$this->add_JSScript ( $this->objectName.'.add_fullListItem("'.$i->login.'");' );
}
foreach ( $this->editListItems as $i ) {
$this->add_JSScript ( $this->objectName.'.add_editListItem("'.$i.'");' );
}
$this->add_JSScript ( $this->objectName.'.add_formValue("'.$this->formName.'","'.$fin.'");' );
$this->add_JSScript ( $this->objectName.'.add_separatorValue("'.$fis.'");' );
/* send icons */
$this->add_JSScript($this->objectName.'.set_iconURL("plus", "'.$camyks->theme->get_pictURL('plus', 12, 'std').'");');
$this->add_JSScript($this->objectName.'.set_iconURL("plus_over", "'.$camyks->theme->get_pictURL('plus', 12, 'ovr').'");');
$this->add_JSScript($this->objectName.'.set_iconURL("minus", "'.$camyks->theme->get_pictURL('minus', 12, 'std').'");');
$this->add_JSScript($this->objectName.'.set_iconURL("minus_over", "'.$camyks->theme->get_pictURL('minus', 12, 'ovr').'");');
/* set object initialization on page load */
$this->add_JSLoadScript ( $this->objectName.'.initialise();' );
/* Input generic initialization */
parent::initialise();
}
/*
* display input
* @return void
* @access public
*/
function display ( ) {
/* Input generic display */
parent::display();
}
}
?>
<?php
/**
* @brief QuickItemList Input
* <br /> Allows multi selection in a list.
* @details Plugin / Input Engine
* @file plugin/input/QuickItemList/QuickItemList.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0
* @date Creation: Mar 2007
* @date Modification: Jul 2018
* @copyright 2007 - 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* QuickItemList Input class.
* @author CaMykS Team <camyks.contact@gmail.com>
*/
final class QuickItemList extends Input {
/**
* var string $objectName
* @brief HTML object main name.
*/
protected $objectName;
/**
* var string $fullListName
* @brief HTML object full list name.
*/
protected $fullListName;
/**
* var array $fullListItems
* @brief HTML object full list items.
*/
protected $fullListItems;
/**
* var string $editListName
* @brief HTML object edit list name.
*/
protected $editListName;
/**
* var string $editListItems
* @brief HTML object edit list items.
*/
protected $editListItems;
/**
* var string $form
* @brief HTML form name.
*/
protected $form;
/**
* var string $formItemName
* @brief HTML form item name.
*/
protected $formItemName;
/**
* var string $formItemSep
* @brief HTML form item separator.
*/
protected $formItemSep;
/**
* Class constructor.
* @param string $path_type
* @return void
*/
public function __construct($path_type) {
parent::__construct('QuickItemList', $path_type);
/* overwrite Plugin information */
$this->version = '1.0';
$this->plugin_package = 'Default';
/* author information */
$this->author_name = 'CaMykS Team';
$this->author_mail = 'camyks.contact@gmail.com';
$this->author_group = 'camyks.net';
}
/* overwrite Input methods */
/**
* Initialise input.
* @param string $n the object name
* @param string $fln the full list name
* @param array $fli the full list items
* @param string $eln the edited list name
* @param array $eli the edited list items
* @param string $f the form name
* @param string $fin the form item
* @param string $fis the form item separator value
* @return void
*/
public function initialise ($n='', $fln='', $fli=array(), $eln='', $eli=array(), &$f=null, $fin=null, $fis=',') {
global $camyks;
/* set name value */
$this->objectName = $n;
/* set full list values */
$this->fullListName = $fln;
$this->fullListItems = $fli;
/* set edit list values */
$this->editListName = $eln;
$this->editListItems = $eli;
/* set form values */
$this->formName = $f;
$this->formItemName = $fin;
$this->formItemSep = $fis;
/* set javascript file */
$this->add_JSEngineFile ('tool/array.js');
$this->add_JSFile ('quickitemlist.js');
/* set javascript object */
$this->add_JSScript ($this->objectName.' = new QuickItemList("'.$this->objectName.'");');
/* set javascript object values */
foreach ($this->fullListItems as $i) {
$this->add_JSScript($this->objectName.'.add_fullListItem("'.$i->login.'");');
}
foreach ($this->editListItems as $i) {
$this->add_JSScript($this->objectName.'.add_editListItem("'.$i.'");');
}
$this->add_JSScript($this->objectName.'.add_formValue("'.$this->formName.'","'.$fin.'");');
$this->add_JSScript($this->objectName.'.add_separatorValue("'.$fis.'");');
/* send icons */
$this->add_JSScript($this->objectName.'.set_iconURL("plus", "'.$camyks->theme->get_pictURL('plus', 12, 'std').'");');
$this->add_JSScript($this->objectName.'.set_iconURL("plus_over", "'.$camyks->theme->get_pictURL('plus', 12, 'ovr').'");');
$this->add_JSScript($this->objectName.'.set_iconURL("minus", "'.$camyks->theme->get_pictURL('minus', 12, 'std').'");');
$this->add_JSScript($this->objectName.'.set_iconURL("minus_over", "'.$camyks->theme->get_pictURL('minus', 12, 'ovr').'");');
/* set object initialization on page load */
$this->add_JSLoadScript($this->objectName.'.initialise();');
/* Input generic initialization */
parent::initialise();
}
}
?>
@@ -1,32 +1,38 @@
<?php
/*
* CaMykS Engine
* Developed by : camyks.net
* Author : CaMykS Team <camyks.contact@gmail.com>
* CaMykS Version : 1.0a2
* Object Version : 1.0
* Object Type : Plugin / Input Layout
* Creation Date : Mar 2007
* Last Modif Date : Mar 2009
*
* QuickItemList input layout
/**
* @brief QuickItemList Input layout
* @details Plugin / Input layout
* @file plugin/input/QuickItemList/html/input.html.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0
* @date Creation: Mar 2007
* @date Modification: Jul 2018
* @copyright 2007 - 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* @cond Exclude
*/
?>
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
<tr>
<td class="eTableHeader" style="width:50%;">
<?= $this->fullListName ?>
</td>
<td class="eTableHeader" style="width:50%;">
<?= $this->editListName ?>
</td>
</tr>
<tr>
<td id="<?=$this->objectName?>_fullListBox" style="vertical-align:top; padding:2px 10px 2px 4px;">
<tr>
<td class="eTableHeader" style="width:50%;">
<?= $this->fullListName ?>
</td>
<td class="eTableHeader" style="width:50%;">
<?= $this->editListName ?>
</td>
</tr>
<tr>
<td id="<?=$this->objectName?>_fullListBox" style="vertical-align:top; padding:2px 10px 2px 4px;">

</td>
<td id="<?=$this->objectName?>_editListBox" style="vertical-align:top; padding:2px 10px 2px 4px;">
</td>
<td id="<?=$this->objectName?>_editListBox" style="vertical-align:top; padding:2px 10px 2px 4px;">

</td>
</tr>
</td>
</tr>
</table>
<?php
/**
* @endcond Exclude
*/
?>
Oops, something went wrong.

0 comments on commit 8825d54

Please sign in to comment.