|
From: <txm...@us...> - 2014-03-30 00:35:40
|
Revision: 12418
http://sourceforge.net/p/xoops/svn/12418
Author: txmodxoops
Date: 2014-03-30 00:35:36 +0000 (Sun, 30 Mar 2014)
Log Message:
-----------
Updated toggle table tr with image
Icons from Frameworks for Toggle Change Display
Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/drag.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/submenu.png
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/green.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/off.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/on.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/red.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/yellow.png
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-29 23:12:29 UTC (rev 12417)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-03-30 00:35:36 UTC (rev 12418)
@@ -71,7 +71,8 @@
$table['submenu'] = $tables_arr[$t]->getVar('table_submenu');
$table['search'] = $tables_arr[$t]->getVar('table_search');
$table['comments'] = $tables_arr[$t]->getVar('table_comments');
- $table['notifications'] = $tables_arr[$t]->getVar('table_notifications');
+ $table['notifications'] = $tables_arr[$t]->getVar('table_notifications');
+ $table['permissions'] = $tables_arr[$t]->getVar('table_permissions');
$GLOBALS['xoopsTpl']->append('tables_list', $table);
unset($mod);
}
@@ -152,43 +153,48 @@
case 'toggle':
if (isset($_GET['table_id'])) {
- if (isset($_GET['table_blocks'])) {
+ if (isset($_GET['table_blocks'])) {
$table_blocks = intval($_GET['table_blocks']);
$table_blocks = ($table_blocks == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($table_id);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_blocks', $table_blocks);
} elseif (isset($_GET['table_admin'])) {
$table_admin = intval($_GET['table_admin']);
$table_admin = ($table_admin == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($table_id);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_admin', $table_admin);
} elseif (isset($_GET['table_user'])) {
$table_user = intval($_GET['table_user']);
$table_user = ($table_user == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($table_id);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_user', $table_user);
} elseif (isset($_GET['table_submenu'])) {
$table_submenu = intval($_GET['table_submenu']);
$table_submenu = ($table_submenu == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($table_id);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_submenu', $table_submenu);
} elseif (isset($_GET['table_search'])) {
$table_search = intval($_GET['table_search']);
$table_search = ($table_search == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($table_id);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_search', $table_search);
} elseif (isset($_GET['table_comments'])) {
$table_comments = intval($_GET['table_comments']);
$table_comments = ($table_comments == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($table_id);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_comments', $table_comments);
} elseif (isset($_GET['table_notifications'])) {
$table_notifications = intval($_GET['table_notifications']);
$table_notifications = ($table_notifications == 1) ? 0 : 1;
- $obj =& $modulesHandler->get($table_id);
+ $obj =& $tablesHandler->get($table_id);
$obj->setVar('table_notifications', $table_notifications);
+ } elseif (isset($_GET['table_permissions'])) {
+ $table_permissions = intval($_GET['table_permissions']);
+ $table_permissions = ($table_permissions == 1) ? 0 : 1;
+ $obj =& $tablesHandler->get($table_id);
+ $obj->setVar('table_permissions', $table_permissions);
}
- if ($modulesHandler->insert($obj, true)) {
+ if ($tablesHandler->insert($obj, true)) {
redirect_header('fields.php', 1, _AM_TDMCREATE_TOGGLE_SUCCESS);
} else {
redirect_header('fields.php', 1, _AM_TDMCREATE_TOGGLE_FAILED);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-29 23:12:29 UTC (rev 12417)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-03-30 00:35:36 UTC (rev 12418)
@@ -219,7 +219,7 @@
case 'toggle':
if (isset($_GET['table_id'])) {
- if (isset($_GET['table_blocks'])) {
+ if (isset($_GET['table_blocks'])) {
$table_blocks = intval($_GET['table_blocks']);
$table_blocks = ($table_blocks == 1) ? 0 : 1;
$obj =& $tablesHandler->get($table_id);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-03-29 23:12:29 UTC (rev 12417)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-03-30 00:35:36 UTC (rev 12418)
@@ -50,7 +50,7 @@
$this->initVar('table_submenu',XOBJ_DTYPE_INT);
/*$this->initVar('table_status',XOBJ_DTYPE_INT);
$this->initVar('table_waiting',XOBJ_DTYPE_INT);
- $this->initVar('table_online',XOBJ_DTYPE_INT); */
+ $this->initVar('table_online',XOBJ_DTYPE_INT);*/
$this->initVar('table_search',XOBJ_DTYPE_INT);
$this->initVar('table_comments',XOBJ_DTYPE_INT);
$this->initVar('table_notifications',XOBJ_DTYPE_INT);
@@ -115,7 +115,8 @@
$table_nbfield->setDescription(_AM_TDMCREATE_TABLE_NBFIELDS_DESC);
$form->addElement($table_nbfield, true);
- $table_image = $this->getVar('table_image') ? $this->getVar('table_image') : 'blank.gif';
+ $table_image = $this->getVar('table_image');
+ $table_image = $table_image ? $table_image : 'blank.gif';
$uploadir = '/Frameworks/moduleclasses/icons/32';
$uploads_dir = '/uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/tables';
if(is_dir(XOOPS_ROOT_PATH . $uploadir)){
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/drag.png
===================================================================
(Binary files differ)
Index: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/drag.png
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/drag.png 2014-03-29 23:12:29 UTC (rev 12417)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/drag.png 2014-03-30 00:35:36 UTC (rev 12418)
Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/drag.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/green.png
===================================================================
(Binary files differ)
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/off.png
===================================================================
(Binary files differ)
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/on.png
===================================================================
(Binary files differ)
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/red.png
===================================================================
(Binary files differ)
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/submenu.png
===================================================================
(Binary files differ)
Index: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/submenu.png
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/submenu.png 2014-03-29 23:12:29 UTC (rev 12417)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/submenu.png 2014-03-30 00:35:36 UTC (rev 12418)
Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/submenu.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Deleted: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/yellow.png
===================================================================
(Binary files differ)
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js 2014-03-29 23:12:29 UTC (rev 12417)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js 2014-03-30 00:35:36 UTC (rev 12418)
@@ -68,10 +68,10 @@
$(this).toggle();
});
});
-});*/
+});
$(document).ready( function() {
$('tr.toggleChild').hide();
- $('tr.toggleMain').click( function(e) {
+ $('tr.toggleMain').on('click', 'a img > imageToggle', function(e) {
e.preventDefault();
$(this).nextAll().each( function() {
if ($(this).filter('tr.toggleMain').length) {
@@ -80,4 +80,10 @@
$(this).filter('tr.toggleChild').toggle();
});
});
+});*/
+$(document).ready(function() {
+ $('tr.toggleMain').find('a').on('click', 'img.imageToggle', function(e){
+ e.preventDefault();
+ $('table#show_rows tr.toggleChild').toggle();
+ });
});
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html 2014-03-29 23:12:29 UTC (rev 12417)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html 2014-03-30 00:35:36 UTC (rev 12418)
@@ -2,7 +2,7 @@
<{includeq file="db:tdmcreate_header.html"}>
<!-- Display tables list -->
<{if $tables_list}>
- <table width='100%' cellspacing='1' class='outer'>
+ <table id='show_rows' width='100%' cellspacing='1' class='outer'>
<thead>
<tr>
<th class='center'><{$smarty.const._AM_TDMCREATE_TABLE_ID}></th>
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html 2014-03-29 23:12:29 UTC (rev 12417)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html 2014-03-30 00:35:36 UTC (rev 12418)
@@ -2,7 +2,7 @@
<{includeq file="db:tdmcreate_header.html"}>
<!-- Display modules list -->
<{if $modules_list}>
- <table id="showhide" width='100%' cellspacing='1' class='outer'>
+ <table id='show_rows' width='100%' cellspacing='1' class='outer'>
<thead>
<tr>
<th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ID}></th>
@@ -24,7 +24,7 @@
<{foreach item=module from=$modules_list}>
<tr class="head toggleMain">
<td class='center'><{$module.id}><br />
- <img class="imageToggle" src="<{$tdmc_url}>/images/icons/16/toggle.png" alt="Toggle" title="Toggle" />
+ <a href="#" title="Toggle"><img class="imageToggle" src="<{$tdmc_url}>/images/icons/16/toggle.png" alt="Toggle" /></a>
</td>
<td class='center'><{$module.name}></td>
<td class='center'><img src="<{$tdmc_upload_imgmod_url}>/<{$module.image}>" height="32" /></td>
|