|
From: <txm...@us...> - 2014-05-08 12:08:58
|
Revision: 12521
http://sourceforge.net/p/xoops/svn/12521
Author: txmodxoops
Date: 2014-05-08 12:08:54 +0000 (Thu, 08 May 2014)
Log Message:
-----------
Updated - Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/fields.js
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/fields.tpl
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/modules.tpl
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tables.tpl
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/html/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/html/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/html/simplelabel.php
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/simplelabel.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -20,18 +20,14 @@
*/
include 'header.php';
// Recovered value of arguments op in the URL $
-//$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
-//$tdmcreate = TDMCreate::getInstance();
$op = TDMCreateRequest::getString('op', 'list');
// Get table Variables
$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id');
$table_mid = TDMCreate_CleanVars($_REQUEST, 'table_mid');
$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'table_nbfields');
-$table_fieldname = TDMCreate_CleanVars($_REQUEST, 'table_fieldname', '', 'string');
/*$table_id = TDMCreateRequest::getInt('table_id');
$table_mid = TDMCreateRequest::getInt('table_mid');
-$table_nbfields = TDMCreateRequest::getInt('table_nbfields');
-$table_fieldname = TDMCreateRequest::getString('table_fieldname', '');*/
+$table_nbfields = TDMCreateRequest::getInt('table_nbfields');*/
// Get field Variables
$field_id = TDMCreate_CleanVars($_REQUEST, 'field_id');
$field_mid = TDMCreate_CleanVars($_REQUEST, 'field_mid');
@@ -48,21 +44,20 @@
{
case 'list':
default:
- //$limit = $GLOBALS['xoopsModuleConfig']['fields_adminpager'];
- //$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
$start = TDMCreateRequest::getInt('start', 0);
$limit = TDMCreateRequest::getInt('limit', $tdmcreate->getConfig('fields_adminpager'));
// Define main template
$template_main = 'fields.tpl';
$GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/css/admin/style.css' );
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
+ $GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/fields.js');
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
$GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_icons_url', TDMC_ICONS_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_upload_url', TDMC_UPLOAD_URL);
- $GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32);
+ $GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
// Redirect if there aren't modules
$nb_modules = $modulesHandler->getCount();
if ( $nb_modules == 0 ) {
@@ -170,8 +165,7 @@
}
//
if ($field_numb > 0) {
- for( $i = 1; $i <= $field_numb; $i++ ) {
-
+ for( $i = 1; $i <= $field_numb; $i++ ) {
$obj->setVar( 'field_mid', $field_mid );
$obj->setVar( 'field_tid', $field_tid );
$obj->setVar( 'field_numb', $field_numb );
@@ -183,6 +177,7 @@
$obj->setVar( 'field_default', (isset($_POST['field_default'][$i]) ? $_POST['field_default'][$i] : '') );
$obj->setVar( 'field_key', (isset($_POST['field_key'][$i]) ? $_POST['field_key'][$i] : '') );
$obj->setVar( 'field_element', (isset($_POST['field_element'][$i]) ? $_POST['field_element'][$i] : '') );
+ $obj->setVar( 'field_parent', (($i == isset($_REQUEST['field_parent'])) ? '1' : '0') );
$obj->setVar( 'field_inlist', ((isset($_REQUEST['field_inlist'][$i]) == 1) ? '1' : '0') );
$obj->setVar( 'field_inform', ((isset($_REQUEST['field_inform'][$i]) == 1) ? '1' : '0') );
$obj->setVar( 'field_admin', ((isset($_REQUEST['field_admin'][$i]) == 1) ? '1' : '0') );
@@ -191,7 +186,7 @@
$obj->setVar( 'field_main', (($i == isset($_REQUEST['field_main'])) ? '1' : '0') );
$obj->setVar( 'field_search', ((isset($_REQUEST['field_search'][$i]) == 1) ? '1' : '0') );
$obj->setVar( 'field_required', ((isset($_REQUEST['field_required'][$i]) == 1) ? '1' : '0') );
-
+ // Insert Data
$fieldsHandler->insert($obj);
}
}
@@ -209,17 +204,46 @@
case 'edit':
// Define main template
- $template_main = 'tables.tpl';
+ $template_main = 'fields.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
$adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list');
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- $obj = $fieldsHandler->get($field_tid);
+ $obj = $fieldsHandler->get( $field_id );
$form = $obj->getForm($field_mid, $field_tid, $field_numb);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
- break;
+ break;
+
+ case 'drag':
+ $side = TDMCreate_CleanVars( $_POST, 'field_id', 0, 'int' );
+ if ( $block_id > 0 ) {
+ $fieldsObj = $fieldsHandler->get( $field_id );
+ $fieldsObj->setVar('field_id', $side);
+ if (!$fieldsHandler->insert( $fieldsObj )) {
+ redirect_header('fields.php', 5, _AM_TDMCREATE_FIELD_SIDE_ERROR);
+ }
+ }
+ break;
+
+ case 'order':
+ if ( isset($_POST['field_id'] ) ) {
+ $i = 0;
+ foreach($_POST['field_id'] as $order) {
+ if( $order > 0 ) {
+ $fieldsObj = $fieldsHandler->get( $order );
+ $fieldsObj->setVar('field_id', $i);
+ if (!$fieldsHandler->insert( $fieldsObj )) {
+ redirect_header('fields.php', 5, _AM_TDMCREATE_FIELD_ORDER_ERROR);
+ }
+ $i++;
+ }
+ }
+ unset($i);
+ }
+ exit;
+ break;
case 'toggle':
if (isset($_GET['field_tid'])) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -24,13 +24,15 @@
//include_once 'includes.php';
//
$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
-//
-$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
-$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
+// Link System Icons
+$sysPathIcon16 = '../' . $xoopsModule->getInfo('sysicons16');
+$sysPathIcon32 = '../' . $xoopsModule->getInfo('sysicons32');
+// Link Local Icons
+$modPathIcon16 = $xoopsModule->getInfo('modicons16');
+$modPathIcon32 = $xoopsModule->getInfo('modicons32');
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-
+// TDMCreate Instance
$tdmcreate = TDMCreate::getInstance();
-
// Get class handler
$modulesHandler =& $tdmcreate->getHandler('modules');
$tablesHandler =& $tdmcreate->getHandler('tables');
@@ -46,10 +48,13 @@
include_once(XOOPS_ROOT_PATH."/class/template.php");
$xoopsTpl = new XoopsTpl();
}
-//
-$GLOBALS['xoopsTpl']->assign('pathIcon16', $pathIcon16);
-$GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32);
-//Load languages
+// System Icons
+$GLOBALS['xoopsTpl']->assign('sysPathIcon16', $sysPathIcon16);
+$GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32);
+// Local Icons
+$GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
+$GLOBALS['xoopsTpl']->assign('modPathIcon32', $modPathIcon32);
+// Load languages
xoops_loadLanguage('admin', $thisDirname);
xoops_loadLanguage('modinfo', $thisDirname);
xoops_loadLanguage('main', $thisDirname);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -21,12 +21,12 @@
$module_handler =& xoops_gethandler('module');
$xoopsModule =& XoopsModule::getByDirname('TDMCreate');
$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
-$pathIcon32 = $moduleInfo->getInfo('icons32');
+$sysPathIcon32 = $moduleInfo->getInfo('sysicons32');
$adminmenu = array();
$i = 1;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU1;
$adminmenu[$i]['link'] = 'admin/index.php';
-$adminmenu[$i]['icon'] = $pathIcon32.'/home.png';
+$adminmenu[$i]['icon'] = $sysPathIcon32.'/home.png';
$i++;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU2;
$adminmenu[$i]['link'] = 'admin/modules.php';
@@ -46,5 +46,5 @@
$i++;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU6;
$adminmenu[$i]['link'] = 'admin/about.php';
-$adminmenu[$i]['icon'] = $pathIcon32.'/about.png';
+$adminmenu[$i]['icon'] = $sysPathIcon32.'/about.png';
unset($i);
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -20,9 +20,6 @@
*/
include 'header.php';
// Recovered value of argument op in the URL $
-//$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
-//$mod_id = TDMCreate_CleanVars($_REQUEST, 'mod_id');
-$tdmcreate = TDMCreate::getInstance();
$op = TDMCreateRequest::getString('op', 'list');
//
$mod_id = TDMCreateRequest::getInt('mod_id');
@@ -30,9 +27,7 @@
switch ($op)
{
case 'list':
- default:
- //$limit = $GLOBALS['xoopsModuleConfig']['modules_adminpager'];
- //$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
+ default:
$start = TDMCreateRequest::getInt('start', 0);
$limit = TDMCreateRequest::getInt('limit', $tdmcreate->getConfig('modules_adminpager'));
// Define main template
@@ -46,7 +41,7 @@
$criteria = new CriteriaCompo();
$criteria->setSort('mod_id ASC, mod_name');
$criteria->setOrder('ASC');
- $nb_modules = $modulesHandler->getCount();
+ $nb_modules = $modulesHandler->getCount( $criteria );
$mods_arr = $modulesHandler->getAll( $criteria );
unset($criteria);
// Redirect if there aren't modules
@@ -54,10 +49,8 @@
redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES );
}
// Display modules list
- if ($nb_modules > 0)
- {
- foreach (array_keys($mods_arr) as $i)
- {
+ if ( $nb_modules > 0 ) {
+ foreach (array_keys($mods_arr) as $i) {
$mod['id'] = $i;
$mod['name'] = $mods_arr[$i]->getVar('mod_name');
$mod['version'] = $mods_arr[$i]->getVar('mod_version');
@@ -130,7 +123,7 @@
$tdmcreate->getConfig('maxsize'), null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile']['name']);
- $name_img = $_GET['mod_name'].'_slogo.'.$extension;
+ $name_img = strtolower($_POST['mod_name']).'_slogo.'.$extension;
$uploader->setPrefix($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
@@ -152,8 +145,7 @@
'mod_release' => $_POST['mod_release'],
'mod_status' => $_POST['mod_status'],
'mod_admin' => (($_REQUEST['mod_admin'] == 1) ? '1' : '0'),
- 'mod_user' => (($_REQUEST['mod_user'] == 1) ? '1' : '0'),
- 'mod_submenu' => (($_REQUEST['mod_submenu'] == 1) ? '1' : '0'),
+ 'mod_user' => (($_REQUEST['mod_user'] == 1) ? '1' : '0'),
'mod_search' => (($_REQUEST['mod_search'] == 1) ? '1' : '0'),
'mod_comments' => (($_REQUEST['mod_comments'] == 1) ? '1' : '0'),
'mod_notifications' => (($_REQUEST['mod_notifications'] == 1) ? '1' : '0'),
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -20,16 +20,8 @@
*/
include 'header.php';
// Recovered value of arguments op in the URL $
-//$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
-//$tdmcreate = TDMCreate::getInstance();
$op = TDMCreateRequest::getString('op', 'list');
//
-/*$mod_id = TDMCreate_CleanVars($_REQUEST, 'mod_id');
-$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id');
-$table_mid = TDMCreate_CleanVars($_REQUEST, 'table_mid');
-$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'table_nbfields');
-$table_fieldname = TDMCreate_CleanVars($_REQUEST, 'table_fieldname', '', 'string');*/
-//
$mod_id = TDMCreateRequest::getInt('mod_id');
//
$table_id = TDMCreateRequest::getInt('table_id');
@@ -41,8 +33,6 @@
{
case 'list':
default:
- //$limit = $GLOBALS['xoopsModuleConfig']['tables_adminpager'];
- //$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
$start = TDMCreateRequest::getInt('start', 0);
$limit = TDMCreateRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
// Define main template
@@ -56,7 +46,8 @@
$GLOBALS['xoopsTpl']->assign('tdmc_icons_url', TDMC_ICONS_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL);
//$GLOBALS['xoopsTpl']->assign('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL);
- $GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32);
+ $GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
+ $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32);
// Get the list of modules
$criteria = new CriteriaCompo();
$criteria->setSort('mod_id ASC, mod_name');
@@ -69,6 +60,7 @@
$mods_arr = $modulesHandler->getAll($criteria);
unset($criteria);
$nb_tables = $tablesHandler->getObjects(null);
+ // Redirect if there aren't tables
if ($nb_tables == 0) {
redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES );
}
@@ -163,7 +155,7 @@
{
if( ($table_name_search[$t]->getVar('table_name') === $_POST['table_name']) &&
($table_name_search[$t]->getVar('table_mid') === $table_mid)) {
- redirect_header('tables.php?op=new', 8, sprintf(_AM_TDMCREATE_ERROR_TABLE_NAME_EXIST, $_POST['table_name']));
+ redirect_header('tables.php?op=new', 10, sprintf(_AM_TDMCREATE_ERROR_TABLE_NAME_EXIST, $_POST['table_name']));
}
}
// Form save tables
@@ -174,11 +166,7 @@
'table_fieldname' => $table_fieldname));
//Form table_image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
- if(is_dir($pathIcon32)){
- $uploaddir = $pathIcon32;
- }else{
- $uploaddir = TDMC_UPLOAD_PATH.'/images/tables';
- }
+ $uploaddir = is_dir($sysPathIcon32) ? $sysPathIcon32 : TDMC_UPLOAD_IMGTAB_PATH;
$uploader = new XoopsMediaUploader($uploaddir, $tdmcreate->getConfig('mimetypes'),
$tdmcreate->getConfig('maxsize'), null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -19,7 +19,7 @@
* @version $Id: 1.91 fields.php 12258 2014-01-02 09:33:29Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
-require_once 'simplelabel.php';
+require_once 'html/simplelabel.php';
require_once 'form/themeform.php';
/*
* @Class TDMCreateFields
@@ -117,7 +117,7 @@
$form->setExtra('enctype="multipart/form-data"');
$tablesHandler = $this->tdmcreate->getHandler('tables');
- //$fieldsHandler = $this->tdmcreate->getHandler('fields');
+ $fieldsHandler = $this->tdmcreate->getHandler('fields');
$fieldelementsHandler =& $this->tdmcreate->getHandler('fieldelements');
$fieldtypeHandler =& $this->tdmcreate->getHandler('fieldtype');
$fieldattrsHandler =& $this->tdmcreate->getHandler('fieldattributes');
@@ -140,11 +140,11 @@
$form->addElement(new TDMCreateFormLabel('</tr></thead>'));
$form->addElement(new TDMCreateFormLabel('<tbody>'));
- //$fields = $fieldsHandler->getObjects(null);
+ $obj = $fieldsHandler->getObjects(null);
$class = '';
for($i = 1; $i <= $field_numb; $i++)
- {
+ {
$class = ($class == 'even') ? 'odd' : 'even';
$form->addElement(new TDMCreateFormLabel('<tr class="'.$class.'">'));
// Index ID
@@ -200,59 +200,58 @@
}
$parameters_tray->addElement($field_elements_select);
- $field_parent = $this->isNew() ? ( $i == 1 ) : $this->getVar('field_parent');
- $check_field_parent = new XoopsFormCheckBox(' ', 'field_parent', $field_parent);
- $check_field_parent->addOption(1, _AM_TDMCREATE_FIELD_PARENT );
+ $field_parent = $isNew ? ( $i == 1 ) : $this->getVar('field_parent');
+ $check_field_parent = new XoopsFormRadio(' ', 'field_parent', $field_parent);
+ $check_field_parent->addOption('', _AM_TDMCREATE_FIELD_PARENT );
$parameters_tray->addElement($check_field_parent);
- $field_inlist = $this->isNew() ? 0 : $this->getVar('field_inlist');
+ $field_inlist = $isNew ? 0 : $this->getVar('field_inlist');
$check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$i.']', $field_inlist);
$check_field_inlist->addOption(1, _AM_TDMCREATE_FIELD_INLIST);
$parameters_tray->addElement($check_field_inlist);
- $field_inform = $this->isNew() ? 0 : $this->getVar('field_inform');
+ $field_inform = $isNew ? 0 : $this->getVar('field_inform');
$check_field_inform = new XoopsFormCheckBox(' ', 'field_inform['.$i.']', $field_inform);
$check_field_inform->addOption(1, _AM_TDMCREATE_FIELD_INFORM);
$parameters_tray->addElement($check_field_inform);
- $field_admin = $this->isNew() ? 0 : $this->getVar('field_admin');
+ $field_admin = $isNew ? 0 : $this->getVar('field_admin');
$check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$i.']', $field_admin);
$check_field_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
$parameters_tray->addElement($check_field_admin);
- $field_user = $this->isNew() ? 0 : $this->getVar('field_user');
+ $field_user = $isNew ? 0 : $this->getVar('field_user');
$check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$i.']', $field_user);
$check_field_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
$parameters_tray->addElement($check_field_user);
- $field_block = $this->isNew() ? 0 : $this->getVar('field_block');
+ $field_block = $isNew ? 0 : $this->getVar('field_block');
$check_field_block = new XoopsFormCheckBox('', 'field_block['.$i.']', $field_block);
$check_field_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
$parameters_tray->addElement($check_field_block);
- $field_main = $this->isNew() ? ( $i == 1 ) : $this->getVar('field_main');
+ $field_main = $isNew ? ( $i == 1 ) : $this->getVar('field_main');
$check_field_main = new XoopsFormRadio('', 'field_main', $field_main);
$check_field_main->addOption('', _AM_TDMCREATE_FIELD_MAINFIELD );
$parameters_tray->addElement($check_field_main);
- $field_search = $this->isNew() ? 0 : $this->getVar('field_search');
+ $field_search = $isNew ? 0 : $this->getVar('field_search');
$check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$i.']', $field_search);
$check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
$parameters_tray->addElement($check_field_search);
- $field_required = $this->isNew() ? 0 : $this->getVar('field_required');
+ $field_required = $isNew ? 0 : $this->getVar('field_required');
$check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$i.']', $field_required);
$check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
$parameters_tray->addElement($check_field_required);
$form->addElement(new TDMCreateFormLabel('<td>'.$parameters_tray->render().'</td></tr>'));
}
- $form->addElement(new XoopsFormHidden('field_id['.$i.']', $i));
- }
+ $form->addElement(new XoopsFormHidden('field_id['.$i.']', $i));
+ $form->addElement(new XoopsFormHidden('field_mid', $field_mid));
+ $form->addElement(new XoopsFormHidden('field_tid', $field_tid));
+ }
- $form->addElement(new XoopsFormHidden('field_mid', $field_mid));
- $form->addElement(new XoopsFormHidden('field_tid', $field_tid));
- $form->addElement(new XoopsFormHidden('field_numb', $field_numb));
$form->addElement(new TDMCreateFormLabel('</tbody>'));
$form->addElement(new TDMCreateFormLabel('<tfoot><tr>'));
$form_hidden = new XoopsFormHidden('op', 'save');
@@ -317,22 +316,15 @@
/**
* retrieve a field
*
- * @param int $id tid
+ * @param int $id field id
*
* @return mixed reference to the {@link TDMCreateFields} object
*/
public function &get($id)
{
- $criteria = new Criteria('field_id', $id );
- if ($this->getCount($criteria) > 0) {
- $obj = $this->getObjects($criteria, false, false );
- return $obj[0]['field_id'];
- } else {
- return parent::get($tid);
- }
- return false;
- }
-
+ return parent::get($id);
+ }
+
/**
* insert a new field in the database
*
@@ -347,84 +339,8 @@
return false;
}
return true;
- }
-
- /**
- * delete fields matching a set of conditions
- *
- * @param object $criteria {@link CriteriaElement}
- *
- * @return bool FALSE if deletion failed
- */
- public function deleteAll($criteria = null)
- {
- //todo resource consuming, use get list instead?
- $fields = $this->getObjects($criteria);
- foreach ($fields as $field) {
- $this->delete($field);
- }
- return true;
- }
-
- /**
- * @param $field_tid
- *
- * @return bool
- */
- public function updateAll($field_tid)
- {
- $criteria = new Criteria('field_tid', $field_tid);
- if ($this->updateAll($criteria)) {
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * get all the fields that match the supplied parameters
- *
- * @param $side
- * @param $tableid tableid (can be an array)
- * @param $orderby order of the fields
- * @returns array of field objects
- */
- public function getAllFieldsByTable($table_mid, $asobject = true, $side = null, $orderby = "f.field_mid, f.field_tid")
- {
- $ret = array();
- if (!$asobject) {
- $sql = 'SELECT f.field_mid, f.field_tid ';
- } else {
- $sql = 'SELECT f.* ';
- }
- $sql .= "FROM " . $this->db->prefix("mod_tdmcreaterate_fields") . " f LEFT JOIN " . $this->db->prefix("mod_tdmcreaterate_tables") . " t ON f.field_tid=t.table_id WHERE table_mid = ".$table_mid;
- if (is_array($tableid)) {
- $sql .= " AND (t.table_id=" . $tableid[0] . "";
- $sql .= ")";
- } else {
- $sql .= " AND t.table_id=" . $tableid . "";
- }
- if (isset($side)) {
- // get both sides in sidebox? (some themes need this)
- $side = "f.field_side=" . $side;
- $sql .= " AND " . $side;
- }
- $sql .= " ORDER BY $orderby";
- $result = $this->db->query($sql);
- $added = array();
- while ($myrow = $this->db->fetchArray($result)) {
- if (!in_array($myrow['field_id'], $added)) {
- if (!$asobject) {
- $ret[] = $myrow['field_id'];
- } else {
- $ret[] = new TDMCreateFields($myrow);
- }
- array_push($added, $myrow['field_id']);
- }
- }
- return $ret;
- }
-
+ }
+
/*
* @public function getFieldModuleId
* @param integer $field_id
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/html/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/html/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/html/index.html 2014-05-08 12:08:54 UTC (rev 12521)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/html/simplelabel.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/html/simplelabel.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/html/simplelabel.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -0,0 +1,47 @@
+<?php
+/**
+ * XOOPS form element
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package kernel
+ * @subpackage form
+ * @since 2.0.0
+ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/
+ * @version $Id: simplelabel.php 12562 2014-04-03 10:57:12Z timgno $
+ */
+
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+/**
+ * A text label
+ */
+class TDMCreateFormLabel extends XoopsFormElement
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ */
+ function TDMCreateFormLabel($caption = '')
+ {
+ $this->setCaption($caption);
+ }
+
+ /**
+ * Prepare HTML for output
+ *
+ * @return string
+ */
+ function render()
+ {
+ return $this->getCaption();
+ }
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -116,7 +116,8 @@
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
- $title = $this->isNew() ? sprintf(_AM_TDMCREATE_MODULE_ADD) : sprintf(_AM_TDMCREATE_MODULE_EDIT);
+ $isNew = $this->isNew();
+ $title = $isNew ? sprintf(_AM_TDMCREATE_MODULE_ADD) : sprintf(_AM_TDMCREATE_MODULE_EDIT);
include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
@@ -144,25 +145,26 @@
// Author
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_AUTHOR, 'mod_author', 50, 255, $this->getVar('mod_author')), true);
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_LICENSE, 'mod_license', 50, 255, $this->getVar('mod_license')), true);
- $mod_admin = $this->isNew() ? $this->tdmcreate->getConfig('display_admin') : $this->getVar('mod_admin');
+ $mod_admin = $isNew ? $this->tdmcreate->getConfig('display_admin') : $this->getVar('mod_admin');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_ADMIN, 'mod_admin', $mod_admin, _YES, _NO));
- $mod_user = $this->isNew() ? $this->tdmcreate->getConfig('display_user') : $this->getVar('mod_user');
+ $mod_user = $isNew ? $this->tdmcreate->getConfig('display_user') : $this->getVar('mod_user');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_USER, 'mod_user', $mod_user, _YES, _NO));
- $mod_search = $this->isNew() ? $this->tdmcreate->getConfig('active_search') : $this->getVar('mod_search');
+ $mod_search = $isNew ? $this->tdmcreate->getConfig('active_search') : $this->getVar('mod_search');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_SEARCH, 'mod_search', $mod_search, _YES, _NO));
- $mod_comments = $this->isNew() ? $this->tdmcreate->getConfig('active_comments') : $this->getVar('mod_comments');
+ $mod_comments = $isNew ? $this->tdmcreate->getConfig('active_comments') : $this->getVar('mod_comments');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_COMMENTS, 'mod_comments', $mod_comments, _YES, _NO));
- $mod_notifications = $this->isNew() ? $this->tdmcreate->getConfig('active_notifications') : $this->getVar('mod_notifications');
+ $mod_notifications = $isNew ? $this->tdmcreate->getConfig('active_notifications') : $this->getVar('mod_notifications');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_NOTIFICATIONS, 'mod_notifications', $mod_notifications, _YES, _NO));
- $mod_permissions = $this->isNew() ? $this->tdmcreate->getConfig('active_permissions') : $this->getVar('mod_permissions');
+ $mod_permissions = $isNew ? $this->tdmcreate->getConfig('active_permissions') : $this->getVar('mod_permissions');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_PERMISSIONS, 'mod_permissions', $mod_permissions, _YES, _NO));
- $mod_inroot_copy = $this->isNew() ? $this->tdmcreate->getConfig('inroot_copy') : $this->getVar('mod_inroot_copy');
+ $mod_inroot_copy = $isNew ? $this->tdmcreate->getConfig('inroot_copy') : $this->getVar('mod_inroot_copy');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULE_INROOT_MODULES_COPY, 'mod_inroot_copy', $mod_inroot_copy, _YES, _NO));
- $mod_image = $this->getVar('mod_image') ? $this->getVar('mod_image') : 'empty.png';
+ $this_image = $this->getVar('mod_image');
+ $mod_image = $this_image ? $this_image : 'empty.png';
$uploadirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/modules';
$imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULE_IMAGE, '<br />');
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/simplelabel.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/simplelabel.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/simplelabel.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -1,47 +0,0 @@
-<?php
-/**
- * XOOPS form element
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package kernel
- * @subpackage form
- * @since 2.0.0
- * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/
- * @version $Id: simplelabel.php 12562 2014-04-03 10:57:12Z timgno $
- */
-
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-/**
- * A text label
- */
-class TDMCreateFormLabel extends XoopsFormElement
-{
- /**
- * Constructor
- *
- * @param string $caption
- */
- function TDMCreateFormLabel($caption = '')
- {
- $this->setCaption($caption);
- }
-
- /**
- * Prepare HTML for output
- *
- * @return string
- */
- function render()
- {
- return $this->getCaption();
- }
-}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin/style.css 2014-05-08 12:08:54 UTC (rev 12521)
@@ -19,6 +19,8 @@
* @version $Id: style.css 12258 2014-01-02 09:33:29Z timgno $
*/
+table { margin: 0; padding: 0; }
+
tr.modules td {
margin: 0;
padding: 5px;
@@ -45,6 +47,9 @@
vertical-align: middle;
}
+/*#show_rows { margin: 0; padding: 0; width: 60%; }*/
+#sortable tr { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.1em; height: 16px; }
+
.toggleChild {
display: none;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -38,7 +38,7 @@
define('TDMC_UPLOAD_IMGMOD_URL', TDMC_UPLOAD_URL . '/images/modules' );
define('TDMC_UPLOAD_IMGTAB_PATH', TDMC_UPLOAD_PATH . '/images/tables' );
define('TDMC_UPLOAD_IMGTAB_URL', TDMC_UPLOAD_URL . '/images/tables' );
-
+//
include_once TDMC_PATH . '/class/helper.php';
include_once TDMC_PATH . '/class/request.php';
include_once TDMC_PATH . '/class/session.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/fields.js
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/fields.js 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/fields.js 2014-05-08 12:08:54 UTC (rev 12521)
@@ -1,51 +1,18 @@
// Jquery function for side fields
-$(document).ready(
- function(){
+$(document).ready( function() {
// Controls Drag & Drop
- $('.tdmc-fieldsection').sortable({
- accept: 'tdmc-field',
- cancel: '.tdmc-fieldname',
- items: '.tdmc-field',
- connectWith: '.tdmc-fieldsection',
+ $('#sortable tbody tr.sort').sortable({
update: function(event, ui) {
var list = $(this).sortable( 'serialize');
$.post( 'fields.php?op=order', list );
},
- receive: function(event, ui) {
- var side = $(this).attr('side');
+ receive: function(event, ui) {
var field_id = $(ui.item).attr('field_id');
- var list = $(this).sortable( 'serialize');
-
- $.post( 'fields.php', { op: 'drag', field_id: field_id, side: side } );
-
- $.post( 'fields.php?op=order', list );
-
+ var list = $(this).sortable( 'serialize');
+ $.post( 'fields.php', { op: 'drag', field_id: field_id } );
+ $.post( 'fields.php?op=order', list );
}
}
- );
- $(".tdmc-fieldsection").disableSelection();
-
- $('.tdmc-fieldhide').sortable({
- accept: 'tdmc-field',
- cancel: '.tdmc-fieldname',
- items: '.tdmc-field',
- connectWith: '.tdmc-fieldsection'/*,
- update: function(event, ui) {
- var list = $(this).sortable( 'serialize');
- $.post( 'fields.php?op=order', list );
- },
- receive: function(event, ui) {
- var side = $(this).attr('side');
- var field_id = $(ui.item).attr('field_id');
- var list = $(this).sortable( 'serialize');
-
- $.post( 'fields.php', { op: 'drag', field_id: field_id, side: side } );
-
- $.post( 'fields.php?op=order', list );
-
- }*/
- }
- );
- $(".tdmc-fieldhide").disableSelection();
- }
+ ).disableSelection();
+ }
);
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js 2014-05-08 12:08:54 UTC (rev 12521)
@@ -87,4 +87,25 @@
$('tr.toggleMain td:nth-child(1) img').click(function () {
$(this).closest('tr.toggleMain').nextUntil('tr.toggleMain').toggle();
});
-});
\ No newline at end of file
+});
+
+function tdmcreate_setStatus( data, img, file ) {
+ // Post request
+ $.post( file, data ,
+ function(reponse, textStatus) {
+ if (textStatus=='success') {
+ $('img#'+img).hide();
+ $('#loading_'+img).show();
+ setTimeout(function(){
+ $('#loading_'+img).hide();
+ $('img#'+img).fadeIn('fast');
+ }, 500);
+ // Change image src
+ if ($('img#'+img).attr("src") == IMG_ON) {
+ $('img#'+img).attr("src",IMG_OFF);
+ } else {
+ $('img#'+img).attr("src",IMG_ON);
+ }
+ }
+ });
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -233,7 +233,7 @@
define('_AM_TDMCREATE_MODULES_ACTIVE_COMMENTS', "Enable comments");
define('_AM_TDMCREATE_MODULES_ACTIVE_NOTIFICATIONS', "Enable notifications");
define('_AM_TDMCREATE_MODULES_ACTIVE_PERMISSIONS', "Enable Permissions");
-define('_AM_TDMCREATE_MODULES_INROOT_INSTALL', "Install this module directly in root/modules?");
+define('_AM_TDMCREATE_MODULE_INROOT_MODULES_COPY', "Copy of this module directly in root/modules?");
define('_AM_TDMCREATE_MODULES_PAYPAL_BUTTON', "Paypal Button");
define('_AM_TDMCREATE_MODULES_SUBVERSION', "Subversion");
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql 2014-05-08 12:08:54 UTC (rev 12521)
@@ -33,7 +33,7 @@
`mod_comments` tinyint(1) unsigned NOT NULL default '0',
`mod_notifications` tinyint(1) unsigned NOT NULL default '0',
`mod_permissions` tinyint(1) unsigned NOT NULL default '0',
- `mod_install` tinyint(1) unsigned NOT NULL default '0',
+ `mod_inroot_copy` tinyint(1) unsigned NOT NULL default '0',
`mod_donations` varchar(50) NOT NULL default '',
`mod_subversion` varchar(10) NOT NULL default '',
PRIMARY KEY (`mod_id`),
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/fields.tpl
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/fields.tpl 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/fields.tpl 2014-05-08 12:08:54 UTC (rev 12521)
@@ -2,7 +2,7 @@
<{includeq file="db:header.tpl"}>
<!-- Display tables list -->
<{if $tables_list}>
- <table id='show_rows' width='100%' cellspacing='1' class='outer'>
+ <table id='sortable' class='outer width100'>
<thead>
<tr>
<th class='center'><{$smarty.const._AM_TDMCREATE_ID_LIST}></th>
@@ -24,21 +24,21 @@
<tbody>
<{foreach item=table from=$tables_list}>
<tr id="table<{$table.id}>" class="fields toggleMain">
- <td class='center bold width5'>(<{$table.id}>)
- <a href="#" title="Toggle"><img class="imageToggle" src="<{$tdmc_icons_url}>/16/toggle.png" alt="Toggle" /></a>
+ <td class='center bold width5'>(<{$table.id}>)
+ <a href="#" title="Toggle"><img class="imageToggle" src="<{$modPathIcon16}>/toggle.png" alt="Toggle" /></a>
</td>
<td class='center'><u class='bold'><{$table.name}></u></td>
- <td class='center'><img src="<{$pathIcon32}>/<{$table.image}>" alt="<{$table.name}>" height="30" /></td>
+ <td class='center'><img src="<{xoModuleIcons32}><{$table.image}>" alt="<{$table.name}>" height="30" /></td>
<td class='center bold'><{$table.nbfields}></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" /></td>
<td class='xo-actions txtcenter width6'>
<a href="tables.php?op=edit&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>">
<img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>" />
@@ -52,11 +52,11 @@
</td>
</tr>
<{foreach item=field from=$table.fields}>
- <tr class="<{cycle values='even,odd'}> toggleChild">
- <td class='center'><{$field.lid}> <img class="move" src="<{$tdmc_icons_url}>/16/drag.png" alt="<{$field.name}>" /></td>
+ <tr class="<{cycle values='even,odd'}> sort toggleChild">
+ <td class='center'>[<{$field.lid}>] <img class="move" src="<{$modPathIcon16}>/drag.png" alt="<{$field.name}>" /></td>
<td class='center'><{$field.name}></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/tables.png" alt="Empty" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/tables.png" alt="Empty" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/tables.png" alt="Empty" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/tables.png" alt="Empty" /></td>
<td class='center'>
<a href="fields.php?op=toggle&field_parent=<{$field.parent}>&field_id=<{$field.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
<img src="<{xoModuleIcons16}><{$field.parent}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
@@ -102,7 +102,7 @@
<img src="<{xoModuleIcons16}><{$field.required}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
</a>
</td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/left_right.png" alt="Empty" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/left_right.png" alt="Empty" /></td>
</tr>
<{/foreach}>
<{/foreach}>
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/modules.tpl
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/modules.tpl 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/modules.tpl 2014-05-08 12:08:54 UTC (rev 12521)
@@ -2,7 +2,7 @@
<{includeq file="db:header.tpl"}>
<!-- Display modules list -->
<{if $modules_list}>
- <table width='100%' cellspacing='1' class='outer'>
+ <table class='outer width100'>
<tr>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ID}></th>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NAME}></th>
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tables.tpl
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tables.tpl 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tables.tpl 2014-05-08 12:08:54 UTC (rev 12521)
@@ -2,7 +2,7 @@
<{includeq file="db:header.tpl"}>
<!-- Display modules list -->
<{if $modules_list}>
- <table id='show_rows' width='100%' cellspacing='1' class='outer'>
+ <table class='outer width100'>
<thead>
<tr>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ID}></th>
@@ -23,13 +23,13 @@
<tbody>
<{foreach item=module from=$modules_list}>
<tr id="module<{$module.id}>" class="tables toggleMain">
- <td class='center bold width5'>(<{$module.id}>)
- <a href="#" title="Toggle"><img class="imageToggle" src="<{$tdmc_icons_url}>/16/toggle.png" alt="Toggle" /></a>
+ <td class='center bold width5'>(<{$module.id}>)
+ <a href="#" title="Toggle"><img class="imageToggle" src="<{$modPathIcon16}>/toggle.png" alt="Toggle" /></a>
</td>
<td class='center bold green'><{$module.name}></td>
- <td class='center'><img src="<{$tdmc_upload_imgmod_url}>/<{$module.image}>" height="35" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/nb_fields.png" height="16" /></td>
- <td class='center'><img src="<{$tdmc_icons_url}>/16/blocks.png" height="16" /></td>
+ <td class='center'><img src="<{$tdmc_upload_imgmod_url}>/<{$module.image}>" alt="" height="35" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/nb_fields.png" alt="16" /></td>
+ <td class='center'><img src="<{$modPathIcon16}>/blocks.png" alt="16" /></td>
<td class='center'>
<a href="modules.php?op=toggle&mod_admin=<{$module.admin}>&mod_id=<{$module.id}>" title="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>">
<img src="<{xoModuleIcons16}><{$module.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_TOGGLE_CHANGE_DISPLAY}>" />
@@ -72,7 +72,7 @@
</tr>
<{foreach item=table from=$module.tables}>
<tr id="table<{$table.id}>" class="<{cycle values='even,odd'}> toggleChild">
- <td class='center'><{$table.lid}></td>
+ <td class='center'>[<{$table.lid}>]</td>
<td class='center'><{$table.name}></td>
<td class='center'><img src="<{xoModuleIcons32}><{$table.image}>" alt="<{$table.name}>" height="30" /></td>
<td class='center'><{$table.nbfields}></td>
@@ -121,7 +121,7 @@
<img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>" />
</a>
<a href="fields.php?op=edit&field_mid=<{$table.mid}>&field_tid=<{$table.id}>&field_numb=<{$table.nbfields}>" title="<{$smarty.const._EDIT}>">
- <img src="<{$tdmc_url}>/images/icons/16/editfields.png" alt="<{$smarty.const._EDIT}>" />
+ <img src="<{$modPathIcon16}>/editfields.png" alt="<{$smarty.const._EDIT}>" />
</a>
<a href="tables.php?op=delete&table_id=<{$table.id}>" title="<{$smarty.const._DELETE}>">
<img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" />
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-05-05 12:45:22 UTC (rev 12520)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php 2014-05-08 12:08:54 UTC (rev 12521)
@@ -39,8 +39,11 @@
$modversion['dirname'] = "{$dirname}";
$modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin';
-$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16';
-$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
+$modversion['sysicons16'] = '../../Frameworks/moduleclasses/icons/16';
+$modversion['sysicons32'] = '../../Frameworks/moduleclasses/icons/32';
+// Local icons
+$modversion['modicons16'] = XOOPS_URL . '/modules/'.$dirname.'/images/icons/16';
+$modversion['modicons32'] = XOOPS_URL . '/modules/'.$dirname.'/images/icons/32';
$modversion['targetdir'] = XOOPS_ROOT_PATH . "/modules/{$dirname}/modules/";
@@ -410,5 +413,5 @@
$modversion['config'][$i]['description'] = "";
$modversion['config'][$i]['formtype'] = "textbox";
$modversion['config'][$i]['valuetype'] = "text";
-$modversion['config'][$i]['default'] = '12512';
+$modversion['config'][$i]['default'] = '12520';
unset($i);
\ No newline at end of file
|