From: <txm...@us...> - 2015-04-19 20:33:41
|
Revision: 13039 http://sourceforge.net/p/xoops/svn/13039 Author: txmodxoops Date: 2015-04-19 20:33:25 +0000 (Sun, 19 Apr 2015) Log Message: ----------- Updated Fixed bugs Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/about.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/footer.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/header.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/index.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/menu.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/modules.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/admin/style.css XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/style.css XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logo.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/fields.js XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/TDMCreateAutoload.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/TDMCreateSession.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/building.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fieldattributes.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fieldelements.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fieldkey.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fieldnull.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields_copy.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fieldtype.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateAbstract.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateFile.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateHtmlSmartyCodes.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateStructure.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateTableFields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminAbout.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminFooter.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminHeader.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminIndex.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminMenu.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminObjects.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPermissions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/blocks/BlocksFiles.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFiles.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFormElements.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassHelper.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/css/CssStyles.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/docs/DocsChangelog.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/docs/DocsFiles.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/IncludeCommentFunctions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/IncludeComments.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/IncludeCommon.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/IncludeFunctions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/IncludeInstall.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/IncludeJquery.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/IncludeNotifications.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/IncludeSearch.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/IncludeUpdate.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageAdmin.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageBlocks.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageDefines.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageHelp.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageMailTpl.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageMain.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageModinfo.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/sql/SqlFile.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminAbout.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminFooter.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminHeader.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminIndex.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminPermissions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/blocks/TemplatesBlocks.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/TemplatesUserFooter.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/TemplatesUserHeader.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/TemplatesUserIndex.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/TemplatesUserPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserFooter.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserHeader.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserIndex.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserNotificationUpdate.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserObjects.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPrint.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserRss.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserSubmit.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserXoopsVersion.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateThemeForm.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/html/TDMCreateFormLabel.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/modules.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/request.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/tables.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/docs/changelog.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/docs/credits.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/docs/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/docs/install.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/docs/lang_diff.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/docs/license.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/docs/readme.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/common.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/functions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/install.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/update.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/admin.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/help/help.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/help/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/modinfo.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/update language 1.0 to 1.1.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/update language 1.1 to 1.15.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/update language 1.1 to 1.37.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/update language 1.15 to 1.37.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/update language 1.37 to 1.38.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/update language 1.38 to 1.39.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_about.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_building.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_footer.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_header.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_index.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_modules.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/xoops_version.php Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/includes.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/repository.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/arrow.gif XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/blocks.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/drag.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/editfields.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/fields.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/left_right.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/nb_fields.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/spinner.gif XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/submenu.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/tables.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/16/toggle.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/addmodule.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/addtable.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/brokenlink.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/builder.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/category.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/dashboard.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/download.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/edittable.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/fields.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/plugin.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/stats.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/blank.gif XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/loading.gif XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/txmodxoops_logo.gif XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/txmodxoops_logo.gif XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/xoopsdevelopmentteam_logo.gif XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/TDMCreateHelper.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/autoloader.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields_class.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields_database.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/abstract.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/abstractfiles.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/about.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/footer.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/header.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/index.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/menu.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/objects.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/pages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/permissions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/templates.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/architecture.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/blocks/blocks.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/blocks/templates.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/class/classes.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/class/formelements.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/class/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/classes.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/formelements.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/helper.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/css/styles.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/docs/changelog.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/docs/docs.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/file.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/form_elements.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/htmlsmartycodes.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/comment_functions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/comments.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/common.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/functions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/install.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/jquery.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/notifications.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/search.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/include/update.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/admin.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/blocks.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/defines.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/help.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/mail.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/main.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/modinfo.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/sql/mysql.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/sql_file.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/structure.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/tablefields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/tables_fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/TDMCreateHtmlSmartyCodes.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/about.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/footer.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/header.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/index.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/pages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/permissions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/blocks/blocks.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/blocks/templates.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/footer.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/header.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/index.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/pages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/footer.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/header.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/index.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/pages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/templates.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/footer.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/header.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/index.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/notification_update.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/objects.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/pages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/print.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/rss.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/submit.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/templates.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/xoopsversion.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadio.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadioCopia.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/simpleform.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/themeform.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/helper.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/html/html.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/html/htmlform.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/html/htmltable.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/html/htmltag.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/html/simplelabel.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/session.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/simplelabel.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/about.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/building.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/fields.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/footer.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/header.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/index.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/modules.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/repository.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tables.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/about.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/about.php 2015-04-18 20:46:15 UTC (rev 13038) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/about.php 2015-04-19 20:33:25 UTC (rev 13039) @@ -1,25 +1,25 @@ -<?php -/* - 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. - */ -/** - * tdmcreate module - * - * @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 tdmcreate - * @since 2.5.0 - * @author Txmod Xoops http://www.txmodxoops.org - * @version $Id: about.php 11084 2013-02-23 15:44:20Z timgno $ - */ -include 'header.php'; -$template_main = 'tdmcreate_about.tpl'; -$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('about.php')); -$GLOBALS['xoopsTpl']->assign('about', $adminMenu->renderAbout('6KJ7RW5DR3VTJ', false)); +<?php +/* + 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. + */ +/** + * tdmcreate module + * + * @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 tdmcreate + * @since 2.5.0 + * @author Txmod Xoops http://www.txmodxoops.org + * @version $Id: about.php 11084 2013-02-23 15:44:20Z timgno $ + */ +include 'header.php'; +$template_main = 'tdmcreate_about.tpl'; +$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('about.php')); +$GLOBALS['xoopsTpl']->assign('about', $adminMenu->renderAbout('6KJ7RW5DR3VTJ', false)); include 'footer.php'; \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/building.php 2015-04-18 20:46:15 UTC (rev 13038) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/building.php 2015-04-19 20:33:25 UTC (rev 13039) @@ -1,97 +1,97 @@ -<?php -/* - 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. - */ -/** - * tdmcreate module - * - * @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 tdmcreate - * @since 2.5.0 - * @author Txmod Xoops http://www.txmodxoops.org - * @version $Id: building.php 12258 2014-01-02 09:33:29Z timgno $ - */ -include 'header.php'; -$op = XoopsRequest::getString('op', 'default'); -$mid = XoopsRequest::getInt('mod_id'); -$moduleObj = $tdmcreate->getHandler('modules')->get( $mid ); -// Switch option -switch ($op) { - case 'build': - $template_main = 'tdmcreate_building.tpl'; - $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('building.php')); - // Get var module dirname - $moduleDirname = $moduleObj->getVar('mod_dirname'); - // Directories for copy from to - $fromDir = TDMC_UPLOAD_REPOSITORY_PATH.'/'.strtolower($moduleDirname); - $toDir = XOOPS_ROOT_PATH.'/modules/'.strtolower($moduleDirname); - if(isset($moduleDirname)) { - // Clear this module if it's in repository - if(is_dir($fromDir)) { - TDMCreate_clearDir($fromDir); - } - // Clear this module if it's in root/modules - if(is_dir($toDir)) { - TDMCreate_clearDir($toDir); - } - } - // Structure - include_once TDMC_PATH . '/class/files/TDMCreateArchitecture.php'; - $handler = TDMCreateArchitecture::getInstance(); - $handler->getPath( TDMC_PATH ); - $handler->getUploadPath( TDMC_UPLOAD_PATH ); - // Creation of the structure of folders and files - $base_architecture = $handler->createBaseFoldersFiles( $moduleObj ); - if($base_architecture !== false) { - $GLOBALS['xoopsTpl']->assign('base_architecture', true); - } else { - $GLOBALS['xoopsTpl']->assign('base_architecture', false); - } - // Get files - $build = array(); - $files = $handler->createFilesToBuilding( $moduleObj ); - foreach($files as $file) { - if($file) { - $build['list'] = $file; - } - $GLOBALS['xoopsTpl']->append('builds', $build); - } - unset($build); - // Directory to saved all files - $GLOBALS['xoopsTpl']->assign('building_directory', sprintf(_AM_TDMCREATE_BUILDING_DIRECTORY, $moduleDirname)); - // Copy this module in root modules - if( $moduleObj->getVar('mod_inroot_copy') == 1 ) { - TDMCreate_copyr($fromDir, $toDir); - } - break; - - case 'default': - default: - $template_main = 'tdmcreate_building.tpl'; - $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('building.php')); - // Redirect if there aren't modules - $nbModules = $tdmcreate->getHandler('modules')->getCount(); - if( $nbModules == 0 ) { - redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES ); - } - unset($nbModules); - // Redirect if there aren't tables - /*$nbTables = $tdmcreate->getHandler('tables')->getCount(); - if($nbTables == 0) { - redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES ); - } - unset($nbTables);*/ - include_once TDMC_PATH . '/class/building.php'; - $handler = TDMCreateBuilding::getInstance(); - $form = $handler->getForm(); - $GLOBALS['xoopsTpl']->assign('form', $form->render()); - break; -} -include 'footer.php'; \ No newline at end of file +<?php +/* + 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. + */ +/** + * tdmcreate module + * + * @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 tdmcreate + * @since 2.5.0 + * @author Txmod Xoops http://www.txmodxoops.org + * @version $Id: building.php 12258 2014-01-02 09:33:29Z timgno $ + */ +include __DIR__ . DIRECTORY_SEPARATOR . 'header.php'; +$op = XoopsRequest::getString('op', 'default'); +$mid = XoopsRequest::getInt('mod_id'); +$moduleObj = $tdmcreate->getHandler('modules')->get( $mid ); +// Switch option +switch ($op) { + case 'build': + $template_main = 'tdmcreate_building.tpl'; + $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('building.php')); + // Get var module dirname + $moduleDirname = $moduleObj->getVar('mod_dirname'); + // Directories for copy from to + $fromDir = TDMC_UPLOAD_REPOSITORY_PATH.'/'.strtolower($moduleDirname); + $toDir = XOOPS_ROOT_PATH.'/modules/'.strtolower($moduleDirname); + if(isset($moduleDirname)) { + // Clear this module if it's in repository + if(is_dir($fromDir)) { + TDMCreate_clearDir($fromDir); + } + // Clear this module if it's in root/modules + if(is_dir($toDir)) { + TDMCreate_clearDir($toDir); + } + } + // Structure + include_once TDMC_PATH . '/class/files/TDMCreateArchitecture.php'; + $handler = TDMCreateArchitecture::getInstance(); + $handler->createPath(TDMC_PATH); + $handler->createUploadPath(TDMC_UPLOAD_PATH); + // Creation of the structure of folders and files + $base_architecture = $handler->createBaseFoldersFiles( $moduleObj ); + if(false !== $base_architecture) { + $GLOBALS['xoopsTpl']->assign('base_architecture', true); + } else { + $GLOBALS['xoopsTpl']->assign('base_architecture', false); + } + // Get files + $build = array(); + $files = $handler->createFilesToBuilding( $moduleObj ); + foreach($files as $file) { + if($file) { + $build['list'] = $file; + } + $GLOBALS['xoopsTpl']->append('builds', $build); + } + unset($build); + // Directory to saved all files + $GLOBALS['xoopsTpl']->assign('building_directory', sprintf(_AM_TDMCREATE_BUILDING_DIRECTORY, $moduleDirname)); + // Copy this module in root modules + if( $moduleObj->getVar('mod_inroot_copy') == 1 ) { + TDMCreate_copyr($fromDir, $toDir); + } + break; + + case 'default': + default: + $template_main = 'tdmcreate_building.tpl'; + $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('building.php')); + // Redirect if there aren't modules + $nbModules = $tdmcreate->getHandler('modules')->getCount(); + if( $nbModules == 0 ) { + redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES ); + } + unset($nbModules); + // Redirect if there aren't tables + /*$nbTables = $tdmcreate->getHandler('tables')->getCount(); + if($nbTables == 0) { + redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES ); + } + unset($nbTables);*/ + include_once TDMC_PATH . '/class/building.php'; + $handler = TDMCreateBuilding::getInstance(); + $form = $handler->getForm(); + $GLOBALS['xoopsTpl']->assign('form', $form->render()); + break; +} +include __DIR__ . DIRECTORY_SEPARATOR . 'footer.php'; \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-18 20:46:15 UTC (rev 13038) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-19 20:33:25 UTC (rev 13039) @@ -1,320 +1,288 @@ -<?php -/* - 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. - */ -/** - * tdmcreate module - * - * @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 tdmcreate - * @since 2.5.0 - * @author Txmod Xoops http://www.txmodxoops.org - * @version $Id: 1.91 fields.php 12258 2014-01-02 09:33:29Z timgno $ - */ -include 'header.php'; -// Recovered value of arguments op in the URL $ -$op = XoopsRequest::getString('op', 'list'); -// Get fields Variables -/*$fieldMid = TDMCreate_CleanVars($_REQUEST, 'field_mid'); -$fieldTid = TDMCreate_CleanVars($_REQUEST, 'field_tid'); -$fieldNumb = TDMCreate_CleanVars($_REQUEST, 'field_numb'); -$fieldName = TDMCreate_CleanVars($_REQUEST, 'field_name', '', 'string');*/ -$fieldMid = XoopsRequest::getInt('field_mid'); -$fieldTid = XoopsRequest::getInt('field_tid'); -$fieldNumb = XoopsRequest::getInt('field_numb'); -$fieldName = XoopsRequest::getString('field_name'); /**/ -// -switch ($op) -{ - case 'list': - default: - $start = XoopsRequest::getInt('start', 0); - $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager')); - // Define main template - $template_main = 'tdmcreate_fields.tpl'; - $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/assets/css/admin/style.css' ); - $GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/functions.js'); - $GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/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('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL); - $GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16); - $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32); - //var_dump($sysPathIcon32); - // Redirect if there aren't modules - $countModules = $tdmcreate->getHandler('modules')->getCount(); - if ( $countModules == 0 ) { - redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES ); - } - unset($countModules); - // Redirect if there aren't tables - $countTables = $tdmcreate->getHandler('tables')->getCount(); - if ($countTables == 0) { - redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES ); - } - unset($countTables); - // Get the list of tables - $criteria = new CriteriaCompo(); - $criteria->setSort('table_id ASC, table_name'); - $criteria->setOrder('ASC'); - $countTables = $tdmcreate->getHandler('tables')->getCount($criteria); - $tablesAll = $tdmcreate->getHandler('tables')->getAll($criteria); - unset($criteria); - if ($countTables > 0) - { - foreach (array_keys($tablesAll) as $tid) - { - // Display tables list - $table['id'] = $tid; - $table['mid'] = $tablesAll[$tid]->getVar('table_mid'); - $table['name'] = ucfirst($tablesAll[$tid]->getVar('table_name')); - $table['image'] = $tablesAll[$tid]->getVar('table_image'); - $table['nbfields'] = $tablesAll[$tid]->getVar('table_nbfields'); - $table['autoincrement'] = $tablesAll[$tid]->getVar('table_autoincrement'); - $table['blocks'] = $tablesAll[$tid]->getVar('table_blocks'); - $table['admin'] = $tablesAll[$tid]->getVar('table_admin'); - $table['user'] = $tablesAll[$tid]->getVar('table_user'); - $table['search'] = $tablesAll[$tid]->getVar('table_search'); - // Get the list of fields - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('field_mid', $table['mid'])); - $criteria->add(new Criteria('field_tid', $tid)); - $criteria->setSort('field_id ASC, field_name'); - $criteria->setOrder('ASC'); - $countFields = $tdmcreate->getHandler('fields')->getCount($criteria); - $fieldsAll = $tdmcreate->getHandler('fields')->getObjects($criteria); - unset($criteria); - // Display fields list - $fields = array(); - $lid = 1; - if ( $countFields > 0 ) - { - foreach (array_keys($fieldsAll) as $fid) - { - $field['id'] = $fid; - $field['lid'] = $lid; - $field['name'] = str_replace('_', ' ', ucfirst($fieldsAll[$fid]->getVar('field_name'))); - $field['parent'] = $fieldsAll[$fid]->getVar('field_parent'); - $field['inlist'] = $fieldsAll[$fid]->getVar('field_inlist'); - $field['inform'] = $fieldsAll[$fid]->getVar('field_inform'); - $field['admin'] = $fieldsAll[$fid]->getVar('field_admin'); - $field['user'] = $fieldsAll[$fid]->getVar('field_user'); - $field['block'] = $fieldsAll[$fid]->getVar('field_block'); - $field['main'] = $fieldsAll[$fid]->getVar('field_main'); - $field['search'] = $fieldsAll[$fid]->getVar('field_search'); - $field['required'] = $fieldsAll[$fid]->getVar('field_required'); - $fields[] = $field; - unset($field); - $lid++; - } - } - unset($lid); - $table['fields'] = $fields; - $GLOBALS['xoopsTpl']->append('tables_list', $table); - unset($table); - } - if ( $countTables > $limit ) { - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - $pagenav = new XoopsPageNav($countTables, $limit, $start, 'start', 'op=list&limit=' . $limit); - $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); - } - } else { - $GLOBALS['xoopsTpl']->assign('error', _AM_TDMCREATE_THEREARENT_FIELDS); - } - var_dump($fieldMid); - var_dump($fieldTid); - var_dump($fieldNumb); - var_dump($fieldName); - break; - - case 'new': - // Define main template - $template_main = 'tdmcreate_fields.tpl'; - $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/assets/css/admin/style.css' ); - $GLOBALS['xoTheme']->addScript('modules/TDMCreate/assets/js/fields.js'); - $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php')); - $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list'); - $adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list'); - $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton()); - // Form Add - $fieldsObj =& $tdmcreate->getHandler('fields')->create(); - $form = $fieldsObj->getFormNew($fieldMid, $fieldTid, $fieldNumb, $fieldName); - $GLOBALS['xoopsTpl']->assign('form', $form->render()); - // Test -> Will be removed - var_dump($fieldMid); - var_dump($fieldTid); - var_dump($fieldNumb); - var_dump($fieldName); - break; - - case 'save': - // - if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - $fieldId = XoopsRequest::getInt('field_id'); - // Fields Handler - $fields = $tdmcreate->getHandler('fields'); - // Set Variables - foreach($_POST['field_id'] as $key => $value) - { - switch($value){ - case 'new': - $fieldsObj =& $fields->create(); - break; - default: - $fieldsObj =& $fields->get($value); - break; - } - if (isset($fieldMid) && isset($fieldTid) && !empty($_POST['field_name'][$key])) { - // Set Data - $fieldsObj->setVar( 'field_mid', $fieldMid ); - $fieldsObj->setVar( 'field_tid', $fieldTid ); - $fieldsObj->setVar( 'field_numb', $fieldNumb ); - $fieldsObj->setVar( 'field_name', (isset($_POST['field_name'][$key]) ? $_POST['field_name'][$key] : '') ); - $fieldsObj->setVar( 'field_type', (isset($_POST['field_type'][$key]) ? $_POST['field_type'][$key] : '') ); - $fieldsObj->setVar( 'field_value', (isset($_POST['field_value'][$key]) ? $_POST['field_value'][$key] : '') ); - $fieldsObj->setVar( 'field_attribute', (isset($_POST['field_attribute'][$key]) ? $_POST['field_attribute'][$key] : '') ); - $fieldsObj->setVar( 'field_null', (isset($_POST['field_null'][$key]) ? $_POST['field_null'][$key] : '') ); - $fieldsObj->setVar( 'field_default', (isset($_POST['field_default'][$key]) ? $_POST['field_default'][$key] : '') ); - $fieldsObj->setVar( 'field_key', (isset($_POST['field_key'][$key]) ? $_POST['field_key'][$key] : '') ); - $fieldsObj->setVar( 'field_element', (isset($_POST['field_element'][$key]) ? $_POST['field_element'][$key] : '') ); - $fieldsObj->setVar( 'field_parent', ((isset($_REQUEST['field_parent'][$key]) == 1) ? 1 : 0) ); - $fieldsObj->setVar( 'field_inlist', ((isset($_REQUEST['field_inlist'][$key]) == 1) ? 1 : 0) ); - $fieldsObj->setVar( 'field_inform', ((isset($_REQUEST['field_inform'][$key]) == 1) ? 1 : 0) ); - $fieldsObj->setVar( 'field_admin', ((isset($_REQUEST['field_admin'][$key]) == 1) ? 1 : 0) ); - $fieldsObj->setVar( 'field_user', ((isset($_REQUEST['field_user'][$key]) == 1) ? 1 : 0) ); - $fieldsObj->setVar( 'field_block', ((isset($_REQUEST['field_block'][$key]) == 1) ? 1 : 0) ); - $fieldsObj->setVar( 'field_main', (($key == isset($_REQUEST['field_main'][$key])) ? 1 : 0) ); - $fieldsObj->setVar( 'field_search', ((isset($_REQUEST['field_search'][$key]) == 1) ? 1 : 0) ); - $fieldsObj->setVar( 'field_required', ((isset($_REQUEST['field_required'][$key]) == 1) ? 1 : 0) ); - // Insert Data - $tdmcreate->getHandler('fields')->insert($fieldsObj); - } - } - // Get table name from field table id - $tables =& $tdmcreate->getHandler('tables')->get($fieldTid); - $table_name = $tables->getVar('table_name'); - // Set field elements - if ($fieldsObj->isNew()) { - // Fields Elements Handler - $fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create(); - $fieldelementObj->setVar( 'fieldelement_mid', $fieldMid ); - $fieldelementObj->setVar( 'fieldelement_tid', $fieldTid ); - $fieldelementObj->setVar( 'fieldelement_name', 'Table : '.ucfirst($table_name) ); - $fieldelementObj->setVar( 'fieldelement_value', 'XoopsFormTables-'.ucfirst($table_name) ); - // Insert new field element id for table name - if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) { - $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element'); - } - redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELDS_FORM_SAVED_OK, $table_name)); - } else { - redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELDS_FORM_UPDATED_OK, $table_name)); - } - // - $GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors()); - $form = $fieldsObj->getForm(null, $fieldTid); - $GLOBALS['xoopsTpl']->assign('form', $form->render()); - break; - - case 'edit': - // Define main template - $template_main = 'tdmcreate_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()); - // Form Edit - $fieldId = XoopsRequest::getInt('field_id'); - $fieldsObj = $tdmcreate->getHandler('fields')->get( $fieldId ); - $form = $fieldsObj->getFormEdit($fieldMid, $fieldTid); - $GLOBALS['xoopsTpl']->assign('form', $form->render()); - // Test -> Will be removed - var_dump($fieldTid); - break; - - case 'drag': - $side = TDMCreate_CleanVars( $_POST, 'field_id', 0, 'int' ); - $fieldId = XoopsRequest::getInt('field_id'); - if ( $fieldId > 0 ) { - $fieldsObj = $tdmcreate->getHandler('fields')->get( $fieldId ); - $fieldsObj->setVar('field_id', $side); - if (!$tdmcreate->getHandler('fields')->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 = $tdmcreate->getHandler('fields')->get( $order ); - $fieldsObj->setVar('field_id', $i); - if (!$tdmcreate->getHandler('fields')->insert( $fieldsObj )) { - redirect_header('fields.php', 5, _AM_TDMCREATE_FIELD_ORDER_ERROR); - } - $i++; - } - } - unset($i); - } - exit; - break; - - case 'display': - // - $fields = $tdmcreate->getHandler('fields'); - // Fields Handler - foreach($_REQUEST['field_id'] as $key => $value) - { - /*$fieldId = XoopsRequest::getInt('field_id'); - $fieldParent = XoopsRequest::getInt('field_parent'); - $fieldInlist = XoopsRequest::getInt('field_inlist'); - $fieldInform = XoopsRequest::getInt('field_inform'); - $fieldAdmin = XoopsRequest::getInt('field_admin'); - $fieldUser = XoopsRequest::getInt('field_user'); - $fieldBlock = XoopsRequest::getInt('field_block'); - $fieldMain = XoopsRequest::getInt('field_main'); - $fieldSearch = XoopsRequest::getInt('field_search'); - $fieldRequired = XoopsRequest::getInt('field_required');*/ - - $fieldsObj =& $fields->get($value); - /*$fieldsObj->setVar('field_parent', $fieldParent); - $fieldsObj->setVar('field_inlist', $fieldInlist); - $fieldsObj->setVar('field_inform', $fieldInform); - $fieldsObj->setVar('field_admin', $fieldAdmin); - $fieldsObj->setVar('field_user', $fieldUser); - $fieldsObj->setVar('field_block', $fieldBlock); - $fieldsObj->setVar('field_main', $fieldMain); - $fieldsObj->setVar('field_search', $fieldSearch); - $fieldsObj->setVar('field_required', $fieldRequired);*/ - $fieldsObj->setVar( 'field_parent', $_POST['field_parent'][$key]); - $fieldsObj->setVar( 'field_inlist', $_POST['field_inlist'][$key]); - $fieldsObj->setVar( 'field_inform', $_POST['field_inform'][$key]); - $fieldsObj->setVar( 'field_admin', $_POST['field_admin'][$key]); - $fieldsObj->setVar( 'field_user', $_POST['field_user'][$key]); - $fieldsObj->setVar( 'field_block', $_POST['field_block'][$key]); - $fieldsObj->setVar( 'field_main', $_POST['field_main'][$key]); - $fieldsObj->setVar( 'field_search', $_POST['field_search'][$key]); - $fieldsObj->setVar( 'field_required', $_POST['field_required'][$key]); - // - $fields->insert($fieldsObj, true); - } - redirect_header('fields.php', 3, _AM_TDMCREATE_TOGGLE_SUCCESS); - break; -} -include 'footer.php'; \ No newline at end of file +<?php +/* + 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. + */ +/** + * tdmcreate module + * + * @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 tdmcreate + * @since 2.5.0 + * @author Txmod Xoops http://www.txmodxoops.org + * @version $Id: 1.91 fields.php 12258 2014-01-02 09:33:29Z timgno $ + */ +include __DIR__ . DIRECTORY_SEPARATOR . 'header.php'; +// Recovered value of arguments op in the URL $ +$op = XoopsRequest::getString('op', 'list'); +// Get fields Variables +$fieldMid = XoopsRequest::getInt('field_mid'); +$fieldTid = XoopsRequest::getInt('field_tid'); +$fieldNumb = XoopsRequest::getInt('field_numb'); +$fieldName = XoopsRequest::getString('field_name', ''); +// switch op +switch ($op) +{ + case 'list': + default: + $start = XoopsRequest::getInt('start', 0); + $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager')); + // Define main template + $template_main = 'tdmcreate_fields.tpl'; + $GLOBALS['xoTheme']->addStylesheet( 'modules/tdmcreate/assets/css/admin/style.css' ); + $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js'); + $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/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('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL); + $GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16); + $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32); + // Redirect if there aren't modules + $countModules = $tdmcreate->getHandler('modules')->getCount(); + if ( $countModules == 0 ) { + redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES ); + } + unset($countModules); + // Redirect if there aren't tables + $countTables = $tdmcreate->getHandler('tables')->getCount(); + if ($countTables == 0) { + redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES ); + } + unset($countTables); + // Get the list of tables + $criteria = new CriteriaCompo(); + $criteria->setSort('table_id ASC, table_name'); + $criteria->setOrder('ASC'); + $countTables = $tdmcreate->getHandler('tables')->getCount($criteria); + $tablesAll = $tdmcreate->getHandler('tables')->getAll($criteria); + unset($criteria); + if ($countTables > 0) + { + foreach (array_keys($tablesAll) as $tid) + { + // Display tables list + $table['id'] = $tid; + $table['mid'] = $tablesAll[$tid]->getVar('table_mid'); + $table['name'] = ucfirst($tablesAll[$tid]->getVar('table_name')); + $table['image'] = $tablesAll[$tid]->getVar('table_image'); + $table['nbfields'] = $tablesAll[$tid]->getVar('table_nbfields'); + $table['autoincrement'] = $tablesAll[$tid]->getVar('table_autoincrement'); + $table['blocks'] = $tablesAll[$tid]->getVar('table_blocks'); + $table['admin'] = $tablesAll[$tid]->getVar('table_admin'); + $table['user'] = $tablesAll[$tid]->getVar('table_user'); + $table['search'] = $tablesAll[$tid]->getVar('table_search'); + // Get the list of fields + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('field_mid', $table['mid'])); + $criteria->add(new Criteria('field_tid', $tid)); + $criteria->setSort('field_id ASC, field_name'); + $criteria->setOrder('ASC'); + $countFields = $tdmcreate->getHandler('fields')->getCount($criteria); + $fieldsAll = $tdmcreate->getHandler('fields')->getObjects($criteria); + unset($criteria); + // Display fields list + $fields = array(); + $lid = 1; + if ( $countFields > 0 ) + { + foreach (array_keys($fieldsAll) as $fid) + { + $field['id'] = $fid; + $field['lid'] = $lid; + $field['order'] = $fieldsAll[$fid]->getVar('field_order'); + $field['name'] = str_replace('_', ' ', ucfirst($fieldsAll[$fid]->getVar('field_name'))); + $field['parent'] = $fieldsAll[$fid]->getVar('field_parent'); + $field['inlist'] = $fieldsAll[$fid]->getVar('field_inlist'); + $field['inform'] = $fieldsAll[$fid]->getVar('field_inform'); + $field['admin'] = $fieldsAll[$fid]->getVar('field_admin'); + $field['user'] = $fieldsAll[$fid]->getVar('field_user'); + $field['block'] = $fieldsAll[$fid]->getVar('field_block'); + $field['main'] = $fieldsAll[$fid]->getVar('field_main'); + $field['search'] = $fieldsAll[$fid]->getVar('field_search'); + $field['required'] = $fieldsAll[$fid]->getVar('field_required'); + $fields[] = $field; + unset($field); + $lid++; + } + } + unset($lid); + $table['fields'] = $fields; + $GLOBALS['xoopsTpl']->append('tables_list', $table); + unset($table); + } + unset($fields); + if ( $countTables > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($countTables, $limit, $start, 'start', 'op=list&limit=' . $limit); + $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); + } + } else { + $GLOBALS['xoopsTpl']->assign('error', _AM_TDMCREATE_THEREARENT_FIELDS); + } + break; + + case 'new': + // Define main template + $template_main = 'tdmcreate_fields.tpl'; + $GLOBALS['xoTheme']->addStylesheet( 'modules/tdmcreate/assets/css/admin/style.css' ); + $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/fields.js'); + $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php')); + $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list'); + $adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list'); + $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton()); + // Form Add + $fieldsObj =& $tdmcreate->getHandler('fields')->create(); + $form = $fieldsObj->getFormNew($fieldMid, $fieldTid, $fieldNumb, $fieldName); + $GLOBALS['xoopsTpl']->assign('form', $form->render()); + break; + + case 'save': + // + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + $fieldId = XoopsRequest::getInt('field_id'); + // Fields Handler + $fields = $tdmcreate->getHandler('fields'); + $orderId = 1; + // Set Variables + foreach($_POST['field_id'] as $key => $value) + { + if(isset($value)){ + $fieldsObj =& $fields->get($value); + } else { + $fieldsObj =& $fields->create(); + } + if (isset($fieldMid) && isset($fieldTid) && !empty($_POST['field_name'][$key])) { + // Set Data + $fieldsObj->setVar( 'field_mid', $fieldMid ); + $fieldsObj->setVar( 'field_tid', $fieldTid ); + $fieldsObj->setVar( 'field_numb', $fieldNumb ); + $fieldsObj->setVar( 'field_order', (isset($_POST['field_order'][$key]) ? $_POST['field_order'][$key] : $orderId) ); + $fieldsObj->setVar( 'field_name', (isset($_POST['field_name'][$key]) ? $_POST['field_name'][$key] : '') ); + $fieldsObj->setVar( 'field_type', (isset($_POST['field_type'][$key]) ? $_POST['field_type'][$key] : '') ); + $fieldsObj->setVar( 'field_value', (isset($_POST['field_value'][$key]) ? $_POST['field_value'][$key] : '') ); + $fieldsObj->setVar( 'field_attribute', (isset($_POST['field_attribute'][$key]) ? $_POST['field_attribute'][$key] : '') ); + $fieldsObj->setVar( 'field_null', (isset($_POST['field_null'][$key]) ? $_POST['field_null'][$key] : '') ); + $fieldsObj->setVar( 'field_default', (isset($_POST['field_default'][$key]) ? $_POST['field_default'][$key] : '') ); + $fieldsObj->setVar( 'field_key', (isset($_POST['field_key'][$key]) ? $_POST['field_key'][$key] : '') ); + $fieldsObj->setVar( 'field_element', (isset($_POST['field_element'][$key]) ? $_POST['field_element'][$key] : '') ); + $fieldsObj->setVar( 'field_parent', ((isset($_REQUEST['field_parent'][$key]) == 1) ? 1 : 0) ); + $fieldsObj->setVar( 'field_inlist', ((isset($_REQUEST['field_inlist'][$key]) == 1) ? 1 : 0) ); + $fieldsObj->setVar( 'field_inform', ((isset($_REQUEST['field_inform'][$key]) == 1) ? 1 : 0) ); + $fieldsObj->setVar( 'field_admin', ((isset($_REQUEST['field_admin'][$key]) == 1) ? 1 : 0) ); + $fieldsObj->setVar( 'field_user', ((isset($_REQUEST['field_user'][$key]) == 1) ? 1 : 0) ); + $fieldsObj->setVar( 'field_block', ((isset($_REQUEST['field_block'][$key]) == 1) ? 1 : 0) ); + $fieldsObj->setVar( 'field_main', (($key == $_REQUEST['field_main']) ? 1 : 0) ); + $fieldsObj->setVar( 'field_search', ((isset($_REQUEST['field_search'][$key]) == 1) ? 1 : 0) ); + $fieldsObj->setVar( 'field_required', ((isset($_REQUEST['field_required'][$key]) == 1) ? 1 : 0) ); + // Insert Data + $tdmcreate->getHandler('fields')->insert($fieldsObj); + } + $orderId++; + ... [truncated message content] |
From: <txm...@us...> - 2015-04-21 17:28:10
|
Revision: 13040 http://sourceforge.net/p/xoops/svn/13040 Author: txmodxoops Date: 2015-04-21 17:27:59 +0000 (Tue, 21 Apr 2015) Log Message: ----------- Updated Fixed bugs for field main Work in progress Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateStructure.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFormElements.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadio.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/mail_template/ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/mail_template/index.html Removed Paths: ------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/icons/ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadioCopia.php Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-21 17:27:59 UTC (rev 13040) @@ -253,8 +253,8 @@ $check_field_block->addOption(1, _AM_TDMCREATE_FIELD_BLOCK); $parameters_tray->addElement($check_field_block); - $main = ($table_autoincrement == 1) ? 2 : 1; - $check_field_main = new TDMCreateFormRadio('', 'field_main', $i, $main);//['.$i.'] + $field_main = ($table_autoincrement == 1) ? 2 : 1; + $check_field_main = new TDMCreateFormRadio('', 'field_main', $field_main); $check_field_main->addOption($i, _AM_TDMCREATE_FIELD_MAINFIELD ); $parameters_tray->addElement($check_field_main); @@ -294,8 +294,7 @@ // Get the list of fields $criteria = new CriteriaCompo(); $criteria->add(new Criteria('field_mid', $field_mid)); - $criteria->add(new Criteria('field_tid', $field_tid)); - //$criteria->add(new Criteria('field_numb', $field_numb)); + $criteria->add(new Criteria('field_tid', $field_tid)); $criteria->setSort('field_id'); //added by goffy $fields = $this->tdmcreate->getHandler('fields')->getObjects($criteria); unset($criteria); @@ -383,7 +382,7 @@ $parameters_tray->addElement($check_field_block); $field_main = ($field->getVar('field_main') == 1) ? $id : 1; - $check_field_main = new TDMCreateFormRadio('', 'field_main', $id, $field_main); + $check_field_main = new TDMCreateFormRadio('', 'field_main', $field_main); $check_field_main->addOption($id, _AM_TDMCREATE_FIELD_MAINFIELD ); $parameters_tray->addElement($check_field_main); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php 2015-04-21 17:27:59 UTC (rev 13040) @@ -197,7 +197,6 @@ } } } - var_dump($indexFile); } /* Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateStructure.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateStructure.php 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateStructure.php 2015-04-21 17:27:59 UTC (rev 13040) @@ -170,7 +170,7 @@ } /* * @public function copy file - * @param string $foldername + * @param string $folderName * @param string $fromFile * @param string $toFile */ Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php 2015-04-21 17:27:59 UTC (rev 13040) @@ -133,10 +133,10 @@ case 8: $ret .= $this->adminobjects->getSelectUserGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); break; - case 11: + case 12: $ret .= $this->adminobjects->getUploadImageGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); break; - case 13: + case 14: $ret .= $this->adminobjects->getTextDateSelectGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); break; default: @@ -145,22 +145,22 @@ $fieldElements = $this->tdmcreate->getHandler('fieldelements')->get($fieldElement); $fieldElementTid = $fieldElements->getVar('fieldelement_tid'); $fieldElementName = $fieldElements->getVar('fieldelement_name'); - $rpFieldElementName = strtolower(str_replace('Table : ', '', $fieldElementName)); - } - // - $fieldNameParent = $fieldName; - // - $criteriaFieldsTopic = new CriteriaCompo(); - $criteriaFieldsTopic->add(new Criteria('field_tid', $fieldElementTid)); - $fieldsTopic = $this->tdmcreate->getHandler('fields')->getObjects($criteriaFieldsTopic); - unset($criteriaFieldsTopic); - foreach(array_keys($fieldsTopic) as $ft) - { - if( $fieldsTopic[$ft]->getVar('field_main') == 1 ) { - $fieldNameTopic = $fieldsTopic[$ft]->getVar('field_name'); + $rpFieldElementName = strtolower(str_replace('Table : ', '', $fieldElementName)); + // + $fieldNameParent = $fieldName; + // + $criteriaFieldsTopic = new CriteriaCompo(); + $criteriaFieldsTopic->add(new Criteria('field_tid', $fieldElementTid)); + $fieldsTopic = $this->tdmcreate->getHandler('fields')->getObjects($criteriaFieldsTopic); + unset($criteriaFieldsTopic); + foreach(array_keys($fieldsTopic) as $ft) + { + if( $fieldsTopic[$ft]->getVar('field_main') == 1 ) { + $fieldNameTopic = $fieldsTopic[$ft]->getVar('field_name'); + } } + $ret .= $this->adminobjects->getTopicGetVar($lpFieldName, $rpFieldName, $tableName, $rpFieldElementName, $fieldNameParent, $fieldNameTopic); } - $ret .= $this->adminobjects->getTopicGetVar($lpFieldName, $rpFieldName, $tableName, $rpFieldElementName, $fieldNameParent, $fieldNameTopic); } else { $ret .= $this->adminobjects->getSimpleGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); } Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFormElements.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFormElements.php 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFormElements.php 2015-04-21 17:27:59 UTC (rev 13040) @@ -167,6 +167,31 @@ return $ret; } /* + * @private function getXoopsFormTextFile + * @param string $language + * @param string $moduleDirname + * @param string $fieldName + * @param string $fieldDefault + * @param string $fieldElement + * @param string $required + */ + private function getXoopsFormTextFile($language, $moduleDirname, $fieldName, $fieldDefault, $fieldElement, $required = 'false') { + if($fieldElement == 11 ) { + $f_text = $fieldName; + $f_default = $fieldDefault; + } + $ret = <<<EOT + // Form Text File + \$formTextFile = new XoopsFormElementTray({$language}FORM_FILE,'<br /><br />'); + \$field_text = \$this->isNew() ? '{$f_default}' : \$this->getVar('{$f_text}'); + \$formText = new XoopsFormText({$language}FORM_TEXT, '{$f_text}', 75, 255, \$field_text); + \$formTextFile->addElement(\$formText{$required} ); + \$formTextFile->addElement(new XoopsFormFile({$language}FORM_UPLOAD , 'attachedfile', \$this->{$moduleDirname}->getConfig('maxsize')){$required}); + \$form->addElement(\$formTextFile);\n +EOT; + return $ret; + } + /* * @private function getXoopsFormUploadImage * @param string $language * @param string $moduleDirname @@ -279,7 +304,7 @@ private function getXoopsFormTable($language, $moduleDirname, $tableName, $fieldName, $fieldElement, $required = 'false') { $ucfTableName = ucfirst($tableName); - if($fieldElement > 13) { + if($fieldElement > 14) { $fElement = $this->tdmcreate->getHandler('fieldelements')->get($fieldElement); $rpFieldelementName = strtolower(str_replace('Table : ', '', $fElement->getVar('fieldelement_name'))); } @@ -347,6 +372,7 @@ foreach(array_keys($fields) as $f) { $fieldName = $fields[$f]->getVar('field_name'); + $fieldDefault = $fields[$f]->getVar('field_default'); $fieldElement = $fields[$f]->getVar('field_element'); $fieldParent = $fields[$f]->getVar('field_parent'); $fieldInForm = $fields[$f]->getVar('field_inform'); @@ -396,12 +422,15 @@ $ret .= $this->getXoopsFormImageList($language_funct, $moduleDirname, $tableName, $fieldName, $required); break; case 11: + $ret .= $this->getXoopsFormTextFile($language, $moduleDirname, $fieldName, $fieldDefault, $fieldElement, $required); + break; + case 12: $ret .= $this->getXoopsFormUploadImage($language_funct, $moduleDirname, $tableName, $required); break; - case 12: + case 13: $ret .= $this->getXoopsFormUploadFile($language, $moduleDirname, $tableName, $fieldName, $required); break; - case 13: + case 14: $ret .= $this->getXoopsFormTextDateSelect($language, $moduleDirname, $fieldName, $required); break; default: @@ -411,7 +440,7 @@ } break; } - if ($fieldElement > 13) { + if ($fieldElement > 14) { if($table->getVar('table_category') == 1) { $ret .= $this->getXoopsFormTopic($language, $moduleDirname, $table, $fields, $required); } else { Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPages.php 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPages.php 2015-04-21 17:27:59 UTC (rev 13040) @@ -125,22 +125,22 @@ $fieldElements = $this->tdmcreate->getHandler('fieldelements')->get($fieldElement); $fieldElementTid = $fieldElements->getVar('fieldelement_tid'); $fieldElementName = $fieldElements->getVar('fieldelement_name'); - $rpFieldElementName = strtolower(str_replace('Table : ', '', $fieldElementName)); - } - // - $fieldNameParent = $fieldName; - // - $criteriaFieldsTopic = new CriteriaCompo(); - $criteriaFieldsTopic->add(new Criteria('field_tid', $fieldElementTid)); - $fieldsTopic = $this->tdmcreate->getHandler('fields')->getObjects($criteriaFieldsTopic); - unset($criteriaFieldsTopic); - foreach(array_keys($fieldsTopic) as $ft) - { - if( $fieldsTopic[$ft]->getVar('field_main') == 1 ) { - $fieldNameTopic = $fieldsTopic[$ft]->getVar('field_name'); + $rpFieldElementName = strtolower(str_replace('Table : ', '', $fieldElementName)); + // + $fieldNameParent = $fieldName; + // + $criteriaFieldsTopic = new CriteriaCompo(); + $criteriaFieldsTopic->add(new Criteria('field_tid', $fieldElementTid)); + $fieldsTopic = $this->tdmcreate->getHandler('fields')->getObjects($criteriaFieldsTopic); + unset($criteriaFieldsTopic); + foreach(array_keys($fieldsTopic) as $ft) + { + if( $fieldsTopic[$ft]->getVar('field_main') == 1 ) { + $fieldNameTopic = $fieldsTopic[$ft]->getVar('field_name'); + } } + $ret .= $this->userobjects->getTopicGetVar($lpFieldName, $rpFieldName, $tableName, $rpFieldElementName, $fieldNameParent, $fieldNameTopic); } - $ret .= $this->userobjects->getTopicGetVar($lpFieldName, $rpFieldName, $tableName, $rpFieldElementName, $fieldNameParent, $fieldNameTopic); } else { $ret .= $this->userobjects->getSimpleGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); } Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadio.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadio.php 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadio.php 2015-04-21 17:27:59 UTC (rev 13040) @@ -28,14 +28,6 @@ var $_options = array(); /** - * Pre-selected id - * - * @var integer - * @access private - */ - var $_id = null; - - /** * Pre-selected value * * @var string @@ -67,11 +59,10 @@ * @param string $value Pre-selected value * @param string $delimeter */ - function TDMCreateFormRadio($caption, $name, $id, $value = null, $delimeter = ' ') + function TDMCreateFormRadio($caption, $name, $value = null, $delimeter = ' ') { $this->setCaption($caption); $this->setName($name); - $this->setId($id); if (isset($value)) { $this->setValue($value); } @@ -98,29 +89,8 @@ { $this->_value = $value; } - - /** - * Get the "_id" attribute - * - * @param null - * @return string - */ - function getId() - { - return $this->_id; - } /** - * Set the pre-selected id - * - * @param $_id string - */ - function setId($_id) - { - $this->_id = $_id; - } - - /** * Add an option * * @param string $value "value" attribute - This gets submitted as form-data. @@ -189,31 +159,29 @@ { $ret = ''; $ele_name = $this->getName(); - $ele_id = $this->getId(); $ele_title = $this->getTitle(); $ele_value = $this->getValue(); $ele_options = $this->getOptions(); $ele_extra = $this->getExtra(); $ele_delimeter = empty($this->columns) ? $this->getDelimeter() : ''; if (! empty($this->columns)) { - $ret .= '<table><tr>'; + $ret .= '<table class="table table-bordered"><tr>'; } $i = 0; - + $id_ele = 0; foreach ($ele_options as $value => $name) { + $id_ele++; if (! empty($this->columns)) { if ($i % $this->columns == 0) { $ret .= '<tr>'; } - $ret .= '<td>'; + $ret .= '<td class="radio">'; } - $ent_title = htmlspecialchars($ele_title, ENT_QUOTES); - $ent_value = htmlspecialchars($value, ENT_QUOTES); - $ret .= "<input type='radio' name='{$ele_name}' id='{$ele_name}[{$ele_id}]' title='{$ent_title}' value='{$ent_value}'"; + $ret .= '<input type="radio" name="' . $ele_name . '" id="' . $ele_name . '[' .$value. ']' . $id_ele. '" title = "' . htmlspecialchars($ele_title, ENT_QUOTES) . '" value="' . htmlspecialchars($value, ENT_QUOTES) . '"'; if (isset($ele_value) && $value == $ele_value) { - $ret .= " checked='checked'"; + $ret .= ' checked="checked"'; } - $ret .= $ele_extra . " />" . "<label name='xolb_{$ele_name}[{$ent_value}]' for='{$ele_name}[{$ele_id}]'>{$name}</label>" . $ele_delimeter ; + $ret .= $ele_extra . ' />' . "<label name='xolb_{$ele_name}' for='" . $ele_name . '[' .$value. ']' . $id_ele. "'><span><span></span></span>" . $name . "</label>" . $ele_delimeter ; if (! empty($this->columns)) { $ret .= '</td>'; if (++ $i % $this->columns == 0) { @@ -227,6 +195,7 @@ } $ret .= '</table>'; } + return $ret; } } \ No newline at end of file Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadioCopia.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadioCopia.php 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/form/TDMCreateFormRadioCopia.php 2015-04-21 17:27:59 UTC (rev 13040) @@ -1,220 +0,0 @@ -<?php -/** - * XOOPS form radio compo - * - * 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://www.xoops.org/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package tdmcreate - * @since 1.91 - * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ - * @author Taiwen Jiang <ph...@us...> - * @version $Id: TDMCreateFormRadio.php 12360 2014-12-06 13:18:22Z timgno $ - */ -class TDMCreateFormRadio extends XoopsFormElement -{ - /** - * Array of Options - * - * @var array - * @access private - */ - private $_options = array(); - - /** - * Pre-selected value - * - * @var integer - * @access private - */ - private $_id = null; - - /** - * Pre-selected value - * - * @var string - * @access private - */ - private $_value = null; - - /** - * Checked for selection - * - * @var boolean - * @access private - */ - private $checked; - - /** - * HTML to seperate the elements - * - * @var string - * @access private - */ - private $_delimeter; - - /** - * Column number for rendering - * - * @var int - * @access public - */ - public $columns; - - /** - * Constructor - * - * @param string $caption Caption - * @param string $name "name" attribute - * @param integer $id "id" attribute - * @param string $value Pre-selected value - * @param string $delimeter - */ - function TDMCreateFormRadio($caption, $name, $value = null, $checked = false, $delimeter = ' ') - { - $this->setCaption($caption); - $this->setName($name); - if (isset($value)) { - $this->setValue($value); - } - $this->checked = $checked; - $this->_delimeter = $delimeter; - } - - /** - * Get the "value" attribute - * - * @param bool $encode To sanitizer the text? - * @return string - */ - function getValue($encode = false) - { - return ($encode && $this->_value !== null) ? htmlspecialchars($this->_value, ENT_QUOTES) : $this->_value; - } - - /** - * Set the pre-selected value - * - * @param $value string - */ - function setValue($value) - { - $this->_value = $value; - } - - /** - * Add an option - * - * @param string $value "value" attribute - This gets submitted as form-data. - * @param string $name "name" attribute - This is displayed. If empty, we use the "value" instead. - */ - function addOption($value, $name = '') - { - if ($name != '') { - $this->_options[$value] = $name; - } else { - $this->_options[$value] = $value; - } - } - - /** - * Adds multiple options - * - * @param array $options Associative array of value->name pairs. - */ - function addOptionArray($options) - { - if (is_array($options)) { - foreach ($options as $k => $v) { - $this->addOption($k, $v); - } - } - } - - /** - * Get an array with all the options - * - * @param bool|int $encode To sanitizer the text? potential values: 0 - skip; 1 - only for value; 2 - for both value and name - * - * @return array Associative array of value->name pairs - */ - function getOptions($encode = false) - { - if (! $encode) { - return $this->_options; - } - $value = array(); - foreach ($this->_options as $val => $name) { - $value[$encode ? htmlspecialchars($val, ENT_QUOTES) : $val] = ($encode > 1) ? htmlspecialchars($name, ENT_QUOTES) : $name; - } - - return $value; - } - - /** - * Get the delimiter of this group - * - * @param bool $encode To sanitizer the text? - * @return string The delimiter - */ - function getDelimeter($encode = false) - { - return $encode ? htmlspecialchars(str_replace(' ', ' ', $this->_delimeter)) : $this->_delimeter; - } - - /** - * Prepare HTML for output - * - * @return string HTML - */ - function render() - { - $ret = ''; - $ele_name = $this->getName(); - $ele_id = $this->getId(); - $ele_value = $this->getValue(); - $ele_options = $this->getOptions(); - $ele_extra = $this->getExtra(); - $ele_delimeter = empty($this->columns) ? $this->getDelimeter() : ''; - if (! empty($this->columns)) { - $ret .= '<table><tr>'; - } - $i = 0; - foreach ($ele_options as $value => $name) { - if (! empty($this->columns)) { - if ($i % $this->columns == 0) { - $ret .= '<tr>'; - } - $ret .= '<td>'; - } - if (isset($ele_value) && $value == $ele_value) { - $check = " checked='checked'"; - } - if ($this->checked) { - $ret .= "<input type='radio' name='{$ele_name}' id='{$ele_id}' value='{$value}'{$check}"; - } else { - $ret .= "<input type='radio' name='{$ele_name}' id='{$ele_id}' value='{$value}'"; - } - $ret .= $ele_extra . " />" . "<label name='xolb_{$ele_name}' for='" . $ele_name . $ele_value. "'>" . $name . "</label>" . $ele_delimeter ; - if (! empty($this->columns)) { - $ret .= '</td>'; - if (++ $i % $this->columns == 0) { - $ret .= '</tr>'; - } - } - } - if (! empty($this->columns)) { - if ($span = $i % $this->columns) { - $ret .= '<td colspan="' . ($this->columns - $span) . '"></td></tr>'; - } - $ret .= '</table>'; - } - return $ret; - } -} \ No newline at end of file Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/mail_template/index.html =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/mail_template/index.html (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/mail_template/index.html 2015-04-21 17:27:59 UTC (rev 13040) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql 2015-04-21 17:27:59 UTC (rev 13040) @@ -1,259 +1,260 @@ -# SQL Dump for tdmcreate module -# PhpMyAdmin Version: 4.0.4 -# http://www.phpmyadmin.net -# -# Host: localhost -# Generated on: Thu Jen 02, 2014 to 19:12 -# Server version: 5.5.24-log -# PHP Version: 5.3.13 - -# -# Table structure for table `tdmcreate_modules` 38 -# - -CREATE TABLE `tdmcreate_modules` ( - `mod_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `mod_name` VARCHAR(255) NOT NULL DEFAULT '', - `mod_dirname` VARCHAR(100) NOT NULL DEFAULT '', - `mod_version` VARCHAR(5) NOT NULL DEFAULT '1.0', - `mod_since` VARCHAR(5) NOT NULL DEFAULT '1.0', - `mod_min_php` VARCHAR(5) NOT NULL DEFAULT '5.3', - `mod_min_xoops` VARCHAR(5) NOT NULL DEFAULT '2.5.7', - `mod_min_admin` VARCHAR(5) NOT NULL DEFAULT '1.1', - `mod_min_mysql` VARCHAR(5) NOT NULL DEFAULT '5.0.7', - `mod_description` TEXT, - `mod_author` VARCHAR(255) NOT NULL DEFAULT 'TDM XOOPS', - `mod_author_mail` VARCHAR(255) NOT NULL DEFAULT 'in...@em...', - `mod_author_website_url` VARCHAR(255) NOT NULL DEFAULT 'http://', - `mod_author_website_name` VARCHAR(255) NOT NULL DEFAULT '', - `mod_credits` VARCHAR(255) NOT NULL DEFAULT 'TDM XOOPS', - `mod_license` VARCHAR(255) NOT NULL DEFAULT 'GNU', - `mod_release_info` VARCHAR(255) NOT NULL DEFAULT '', - `mod_release_file` VARCHAR(255) NOT NULL DEFAULT '', - `mod_manual` VARCHAR(255) NOT NULL DEFAULT '', - `mod_manual_file` VARCHAR(255) NOT NULL DEFAULT '', - `mod_image` VARCHAR(255) NOT NULL DEFAULT '', - `mod_demo_site_url` VARCHAR(255) NOT NULL DEFAULT 'http://', - `mod_demo_site_name` VARCHAR(255) NOT NULL DEFAULT '', - `mod_support_url` VARCHAR(255) NOT NULL DEFAULT 'http://', - `mod_support_name` VARCHAR(255) NOT NULL DEFAULT '', - `mod_website_url` VARCHAR(255) NOT NULL DEFAULT 'http://', - `mod_website_name` VARCHAR(255) NOT NULL DEFAULT '', - `mod_release` VARCHAR(11) NOT NULL DEFAULT '00-00-0000', - `mod_status` VARCHAR(150) NOT NULL DEFAULT 'Beta 1', - `mod_admin` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', - `mod_user` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', - `mod_blocks` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', - `mod_search` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `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_inroot_copy` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', - `mod_donations` VARCHAR(50) NOT NULL DEFAULT '6KJ7RW5DR3VTJ', - `mod_subversion` VARCHAR(10) NOT NULL DEFAULT '12550', - PRIMARY KEY (`mod_id`), - KEY `mod_name` (`mod_name`), - UNIQUE KEY `mod_dirname` (`mod_dirname`) -)ENGINE =MyISAM; - - -CREATE TABLE `tdmcreate_tables` ( - `table_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `table_mid` INT(5) UNSIGNED NOT NULL DEFAULT '0', - `table_category` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_name` VARCHAR(150) NOT NULL DEFAULT '', - `table_fieldname` VARCHAR(150) NOT NULL DEFAULT '', - `table_nbfields` INT(5) UNSIGNED NOT NULL DEFAULT '0', - `table_image` VARCHAR(150) NOT NULL DEFAULT '', - `table_autoincrement` TINYINT(1) NOT NULL DEFAULT '1', - `table_blocks` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_admin` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', - `table_user` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_submenu` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_submit` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_tag` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_broken` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_search` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_comments` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_notifications` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_permissions` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_print` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_pdf` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_rss` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_single` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `table_visit` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`table_id`), - KEY `table_mid` (`table_mid`), - UNIQUE KEY `table_name` (`table_name`) -)ENGINE =MyISAM; - -# -# Table structure for table `tdmcreate_fields` 21 -# - -CREATE TABLE `tdmcreate_fields` ( - `field_id` INT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `field_mid` INT(5) UNSIGNED NOT NULL DEFAULT '0', - `field_tid` INT(5) UNSIGNED NOT NULL DEFAULT '0', - `field_numb` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `field_order` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0', - `field_name` VARCHAR(255) NOT NULL DEFAULT '', - `field_type` VARCHAR(100) NOT NULL DEFAULT '', - `field_value` CHAR(4) NOT NULL DEFAULT '', - `field_attribute` VARCHAR(50) NOT NULL DEFAULT '', - `field_null` CHAR(10) NOT NULL DEFAULT '', - `field_default` VARCHAR(150) NOT NULL DEFAULT '', - `field_key` CHAR(10) NOT NULL DEFAULT '', - `field_element` VARCHAR(150) NOT NULL DEFAULT '', - `field_parent` TINYINT(1) NOT NULL DEFAULT '0', - `field_inlist` TINYINT(1) NOT NULL DEFAULT '0', - `field_inform` TINYINT(1) NOT NULL DEFAULT '0', - `field_admin` TINYINT(1) NOT NULL DEFAULT '0', - `field_user` TINYINT(1) NOT NULL DEFAULT '0', - `field_block` TINYINT(1) NOT NULL DEFAULT '0', - `field_main` TINYINT(1) NOT NULL DEFAULT '0', - `field_search` TINYINT(1) NOT NULL DEFAULT '0', - `field_required` TINYINT(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`field_id`), - KEY `field_mid` (`field_mid`), - KEY `field_tid` (`field_tid`), - KEY `field_name` (`field_name`) -)ENGINE =MyISAM; - -# -# Table structure for table `tdmcreate_languages` 5 -# - -CREATE TABLE `tdmcreate_languages` ( - `lng_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `lng_mid` INT(5) UNSIGNED NOT NULL DEFAULT '0', - `lng_file` VARCHAR(255) NOT NULL DEFAULT '', - `lng_define` VARCHAR(255) NOT NULL DEFAULT '', - `lng_description` VARCHAR(255) NOT NULL DEFAULT '', - PRIMARY KEY (`lng_id`), - KEY `lng_mid` (`lng_mid`) -)ENGINE =MyISAM; - -# -# Table structure for table `tdmcreate_fieldtype` 2 -# - -CREATE TABLE `tdmcreate_fieldtype` ( - `fieldtype_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `fieldtype_name` VARCHAR(100) NOT NULL DEFAULT '', - `fieldtype_value` VARCHAR(100) NOT NULL DEFAULT '', - PRIMARY KEY (`fieldtype_id`), - KEY `fieldtype_name` (`fieldtype_name`) -)ENGINE =MyISAM; - -INSERT INTO `tdmcreate_fieldtype` (`fieldtype_id`, `fieldtype_name`, `fieldtype_value`) VALUES - (1, '...', ''), - (2, 'INT', 'INT'), - (3, 'TINYINT', 'TINYINT'), - (4, 'MEDIUMINT', 'MEDIUMINT'), - (5, 'SMALLINT', 'SMALLINT'), - (6, 'FLOAT', 'FLOAT'), - (7, 'DOUBLE', 'DOUBLE'), - (8, 'DECIMAL', 'DECIMAL'), - (9, 'SET', 'SET'), - (10, 'ENUM', 'ENUM'), - (11, 'EMAIL', 'EMAIL'), - (12, 'URL', 'URL'), - (13, 'CHAR', 'CHAR'), - (14, 'VARCHAR', 'VARCHAR'), - (15, 'TEXT', 'TEXT'), - (16, 'TINYTEXT', 'TINYTEXT'), - (17, 'MEDIUMTEXT', 'MEDIUMTEXT'), - (18, 'LONGTEXT', 'LONGTEXT'), - (19, 'DATE', 'DATE'), - (20, 'DATETIME', 'DATETIME'), - (21, 'TIMESTAMP', 'TIMESTAMP'), - (22, 'TIME', 'TIME'), - (23, 'YEAR', 'YEAR'); - -# -# Table structure for table `tdmcreate_fieldattributes` 3 -# - -CREATE TABLE `tdmcreate_fieldattributes` ( - `fieldattribute_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `fieldattribute_name` VARCHAR(100) NOT NULL DEFAULT '', - `fieldattribute_value` VARCHAR(100) NOT NULL DEFAULT '', - PRIMARY KEY (`fieldattribute_id`), - KEY `fieldattribute_name` (`fieldattribute_name`) -)ENGINE =MyISAM; - -INSERT INTO `tdmcreate_fieldattributes` (`fieldattribute_id`, `fieldattribute_name`, `fieldattribute_value`) VALUES - (1, '...', ''), - (2, 'BINARY', 'BINARY'), - (3, 'UNSIGNED', 'UNSIGNED'), - (4, 'UNSIGNED_ZEROFILL', 'UNSIGNED_ZEROFILL'), - (5, 'CURRENT_TIMESTAMP', 'CURRENT_TIMESTAMP'); - -# -# Table structure for table `tdmcreate_fieldnull` 3 -# - -CREATE TABLE `tdmcreate_fieldnull` ( - `fieldnull_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `fieldnull_name` VARCHAR(100) NOT NULL DEFAULT '', - `fieldnull_value` VARCHAR(100) NOT NULL DEFAULT '', - PRIMARY KEY (`fieldnull_id`), - KEY `fieldnull_name` (`fieldnull_name`) -)ENGINE =MyISAM; - -INSERT INTO `tdmcreate_fieldnull` (`fieldnull_id`, `fieldnull_name`, `fieldnull_value`) VALUES - (1, '...', ''), - (2, 'NOT NULL', 'NOT NULL'), - (3, 'NULL', 'NULL'); - -# -# Table structure for table `tdmcreate_fieldkey` 3 -# - -CREATE TABLE `tdmcreate_fieldkey` ( - `fieldkey_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `fieldkey_name` VARCHAR(100) NOT NULL DEFAULT '', - `fieldkey_value` VARCHAR(100) NOT NULL DEFAULT '', - PRIMARY KEY (`fieldkey_id`), - KEY `fieldkey_name` (`fieldkey_name`) -)ENGINE =MyISAM; - -INSERT INTO `tdmcreate_fieldkey` (`fieldkey_id`, `fieldkey_name`, `fieldkey_value`) VALUES - (1, '...', ''), - (2, 'PRIMARY', 'PRIMARY'), - (3, 'UNIQUE', 'UNIQUE'), - (4, 'KEY', 'KEY'), - (5, 'INDEX', 'INDEX'), - (6, 'FULLTEXT', 'FULLTEXT'); - -# -# Table structure for table `tdmcreate_fieldelements` 5 -# - -CREATE TABLE `tdmcreate_fieldelements` ( - `fieldelement_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `fieldelement_mid` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `fieldelement_tid` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `fieldelement_name` VARCHAR(100) NOT NULL DEFAULT '', - `fieldelement_value` VARCHAR(100) NOT NULL DEFAULT '', - PRIMARY KEY (`fieldelement_id`), - KEY `fieldelement_mid` (`fieldelement_mid`), - KEY `fieldelement_tid` (`fieldelement_tid`) -)ENGINE =MyISAM; - -INSERT INTO `tdmcreate_fieldelements` (`fieldelement_id`, `fieldelement_mid`, `fieldelement_tid`, `fieldelement_name`, `fieldelement_value`) VALUES - (1, 0, 0, '...', ''), - (2, 0, 0, 'Text', 'XoopsFormText'), - (3, 0, 0, 'TextArea', 'XoopsFormTextArea'), - (4, 0, 0, 'DhtmlTextArea', 'XoopsFormDhtmlTextArea'), - (5, 0, 0, 'CheckBox', 'XoopsFormCheckBox'), - (6, 0, 0, 'RadioYN', 'XoopsFormRadioYN'), - (7, 0, 0, 'SelectBox', 'XoopsFormSelect'), - (8, 0, 0, 'SelectUser', 'XoopsFormSelectUser'), - (9, 0, 0, 'ColorPicker', 'XoopsFormColorPicker'), - (10, 0, 0, 'ImageList', 'XoopsFormImageList'), - (11, 0, 0, 'UploadImage', 'XoopsFormUploadImage'), - (12, 0, 0, 'UploadFile', 'XoopsFormUploadFile'), - (13, 0, 0, 'TextDateSelect', 'XoopsFormTextDateSelect'); \ No newline at end of file +# SQL Dump for tdmcreate module +# PhpMyAdmin Version: 4.0.4 +# http://www.phpmyadmin.net +# +# Host: localhost +# Generated on: Thu Jen 02, 2014 to 19:12 +# Server version: 5.5.24-log +# PHP Version: 5.3.13 + +# +# Table structure for table `tdmcreate_modules` 38 +# + +CREATE TABLE `tdmcreate_modules` ( + `mod_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, + `mod_name` VARCHAR(255) NOT NULL DEFAULT '', + `mod_dirname` VARCHAR(100) NOT NULL DEFAULT '', + `mod_version` VARCHAR(5) NOT NULL DEFAULT '1.0', + `mod_since` VARCHAR(5) NOT NULL DEFAULT '1.0', + `mod_min_php` VARCHAR(5) NOT NULL DEFAULT '5.3', + `mod_min_xoops` VARCHAR(5) NOT NULL DEFAULT '2.5.7', + `mod_min_admin` VARCHAR(5) NOT NULL DEFAULT '1.1', + `mod_min_mysql` VARCHAR(5) NOT NULL DEFAULT '5.0.7', + `mod_description` TEXT, + `mod_author` VARCHAR(255) NOT NULL DEFAULT 'TDM XOOPS', + `mod_author_mail` VARCHAR(255) NOT NULL DEFAULT 'in...@em...', + `mod_author_website_url` VARCHAR(255) NOT NULL DEFAULT 'http://', + `mod_author_website_name` VARCHAR(255) NOT NULL DEFAULT '', + `mod_credits` VARCHAR(255) NOT NULL DEFAULT 'TDM XOOPS', + `mod_license` VARCHAR(255) NOT NULL DEFAULT 'GNU', + `mod_release_info` VARCHAR(255) NOT NULL DEFAULT '', + `mod_release_file` VARCHAR(255) NOT NULL DEFAULT '', + `mod_manual` VARCHAR(255) NOT NULL DEFAULT '', + `mod_manual_file` VARCHAR(255) NOT NULL DEFAULT '', + `mod_image` VARCHAR(255) NOT NULL DEFAULT '', + `mod_demo_site_url` VARCHAR(255) NOT NULL DEFAULT 'http://', + `mod_demo_site_name` VARCHAR(255) NOT NULL DEFAULT '', + `mod_support_url` VARCHAR(255) NOT NULL DEFAULT 'http://', + `mod_support_name` VARCHAR(255) NOT NULL DEFAULT '', + `mod_website_url` VARCHAR(255) NOT NULL DEFAULT 'http://', + `mod_website_name` VARCHAR(255) NOT NULL DEFAULT '', + `mod_release` VARCHAR(11) NOT NULL DEFAULT '00-00-0000', + `mod_status` VARCHAR(150) NOT NULL DEFAULT 'Beta 1', + `mod_admin` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', + `mod_user` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', + `mod_blocks` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', + `mod_search` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `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_inroot_copy` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', + `mod_donations` VARCHAR(50) NOT NULL DEFAULT '6KJ7RW5DR3VTJ', + `mod_subversion` VARCHAR(10) NOT NULL DEFAULT '12550', + PRIMARY KEY (`mod_id`), + KEY `mod_name` (`mod_name`), + UNIQUE KEY `mod_dirname` (`mod_dirname`) +)ENGINE =MyISAM; + + +CREATE TABLE `tdmcreate_tables` ( + `table_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, + `table_mid` INT(5) UNSIGNED NOT NULL DEFAULT '0', + `table_category` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_name` VARCHAR(150) NOT NULL DEFAULT '', + `table_fieldname` VARCHAR(150) NOT NULL DEFAULT '', + `table_nbfields` INT(5) UNSIGNED NOT NULL DEFAULT '0', + `table_image` VARCHAR(150) NOT NULL DEFAULT '', + `table_autoincrement` TINYINT(1) NOT NULL DEFAULT '1', + `table_blocks` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_admin` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', + `table_user` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_submenu` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_submit` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_tag` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_broken` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_search` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_comments` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_notifications` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_permissions` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_rate` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_print` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_pdf` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_rss` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_single` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `table_visit` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`table_id`), + KEY `table_mid` (`table_mid`), + UNIQUE KEY `table_name` (`table_name`) +)ENGINE =MyISAM; + +# +# Table structure for table `tdmcreate_fields` 21 +# + +CREATE TABLE `tdmcreate_fields` ( + `field_id` INT(8) UNSIGNED NOT NULL AUTO_INCREMENT, + `field_mid` INT(5) UNSIGNED NOT NULL DEFAULT '0', + `field_tid` INT(5) UNSIGNED NOT NULL DEFAULT '0', + `field_numb` INT(10) UNSIGNED NOT NULL DEFAULT '0', + `field_order` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0', + `field_name` VARCHAR(255) NOT NULL DEFAULT '', + `field_type` VARCHAR(100) NOT NULL DEFAULT '', + `field_value` CHAR(4) NOT NULL DEFAULT '', + `field_attribute` VARCHAR(50) NOT NULL DEFAULT '', + `field_null` CHAR(10) NOT NULL DEFAULT '', + `field_default` VARCHAR(150) NOT NULL DEFAULT '', + `field_key` CHAR(10) NOT NULL DEFAULT '', + `field_element` VARCHAR(150) NOT NULL DEFAULT '', + `field_parent` TINYINT(1) NOT NULL DEFAULT '0', + `field_inlist` TINYINT(1) NOT NULL DEFAULT '0', + `field_inform` TINYINT(1) NOT NULL DEFAULT '0', + `field_admin` TINYINT(1) NOT NULL DEFAULT '0', + `field_user` TINYINT(1) NOT NULL DEFAULT '0', + `field_block` TINYINT(1) NOT NULL DEFAULT '0', + `field_main` TINYINT(1) NOT NULL DEFAULT '0', + `field_search` TINYINT(1) NOT NULL DEFAULT '0', + `field_required` TINYINT(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`field_id`), + KEY `field_mid` (`field_mid`), + KEY `field_tid` (`field_tid`), + KEY `field_name` (`field_name`) +)ENGINE =MyISAM; + +# +# Table structure for table `tdmcreate_languages` 5 +# + +CREATE TABLE `tdmcreate_languages` ( + `lng_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, + `lng_mid` INT(5) UNSIGNED NOT NULL DEFAULT '0', + `lng_file` VARCHAR(255) NOT NULL DEFAULT '', + `lng_define` VARCHAR(255) NOT NULL DEFAULT '', + `lng_description` VARCHAR(255) NOT NULL DEFAULT '', + PRIMARY KEY (`lng_id`), + KEY `lng_mid` (`lng_mid`) +)ENGINE =MyISAM; + +# +# Table structure for table `tdmcreate_fieldtype` 2 +# + +CREATE TABLE `tdmcreate_fieldtype` ( + `fieldtype_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, + `fieldtype_name` VARCHAR(100) NOT NULL DEFAULT '', + `fieldtype_value` VARCHAR(100) NOT NULL DEFAULT '', + PRIMARY KEY (`fieldtype_id`), + KEY `fieldtype_name` (`fieldtype_name`) +)ENGINE =MyISAM; + +INSERT INTO `tdmcreate_fieldtype` (`fieldtype_id`, `fieldtype_name`, `fieldtype_value`) VALUES + (1, '...', ''), + (2, 'INT', 'INT'), + (3, 'TINYINT', 'TINYINT'), + (4, 'MEDIUMINT', 'MEDIUMINT'), + (5, 'SMALLINT', 'SMALLINT'), + (6, 'FLOAT', 'FLOAT'), + (7, 'DOUBLE', 'DOUBLE'), + (8, 'DECIMAL', 'DECIMAL'), + (9, 'SET', 'SET'), + (10, 'ENUM', 'ENUM'), + (11, 'EMAIL', 'EMAIL'), + (12, 'URL', 'URL'), + (13, 'CHAR', 'CHAR'), + (14, 'VARCHAR', 'VARCHAR'), + (15, 'TEXT', 'TEXT'), + (16, 'TINYTEXT', 'TINYTEXT'), + (17, 'MEDIUMTEXT', 'MEDIUMTEXT'), + (18, 'LONGTEXT', 'LONGTEXT'), + (19, 'DATE', 'DATE'), + (20, 'DATETIME', 'DATETIME'), + (21, 'TIMESTAMP', 'TIMESTAMP'), + (22, 'TIME', 'TIME'), + (23, 'YEAR', 'YEAR'); + +# +# Table structure for table `tdmcreate_fieldattributes` 3 +# + +CREATE TABLE `tdmcreate_fieldattributes` ( + `fieldattribute_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, + `fieldattribute_name` VARCHAR(100) NOT NULL DEFAULT '', + `fieldattribute_value` VARCHAR(100) NOT NULL DEFAULT '', + PRIMARY KEY (`fieldattribute_id`), + KEY `fieldattribute_name` (`fieldattribute_name`) +)ENGINE =MyISAM; + +INSERT INTO `tdmcreate_fieldattributes` (`fieldattribute_id`, `fieldattribute_name`, `fieldattribute_value`) VALUES + (1, '...', ''), + (2, 'BINARY', 'BINARY'), + (3, 'UNSIGNED', 'UNSIGNED'), + (4, 'UNSIGNED_ZEROFILL', 'UNSIGNED_ZEROFILL'), + (5, 'CURRENT_TIMESTAMP', 'CURRENT_TIMESTAMP'); + +# +# Table structure for table `tdmcreate_fieldnull` 3 +# + +CREATE TABLE `tdmcreate_fieldnull` ( + `fieldnull_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, + `fieldnull_name` VARCHAR(100) NOT NULL DEFAULT '', + `fieldnull_value` VARCHAR(100) NOT NULL DEFAULT '', + PRIMARY KEY (`fieldnull_id`), + KEY `fieldnull_name` (`fieldnull_name`) +)ENGINE =MyISAM; + +INSERT INTO `tdmcreate_fieldnull` (`fieldnull_id`, `fieldnull_name`, `fieldnull_value`) VALUES + (1, '...', ''), + (2, 'NOT NULL', 'NOT NULL'), + (3, 'NULL', 'NULL'); + +# +# Table structure for table `tdmcreate_fieldkey` 3 +# + +CREATE TABLE `tdmcreate_fieldkey` ( + `fieldkey_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, + `fieldkey_name` VARCHAR(100) NOT NULL DEFAULT '', + `fieldkey_value` VARCHAR(100) NOT NULL DEFAULT '', + PRIMARY KEY (`fieldkey_id`), + KEY `fieldkey_name` (`fieldkey_name`) +)ENGINE =MyISAM; + +INSERT INTO `tdmcreate_fieldkey` (`fieldkey_id`, `fieldkey_name`, `fieldkey_value`) VALUES + (1, '...', ''), + (2, 'PRIMARY', 'PRIMARY'), + (3, 'UNIQUE', 'UNIQUE'), + (4, 'KEY', 'KEY'), + (5, 'INDEX', 'INDEX'), + (6, 'FULLTEXT', 'FULLTEXT'); + +# +# Table structure for table `tdmcreate_fieldelements` 5 +# + +CREATE TABLE `tdmcreate_fieldelements` ( + `fieldelement_id` INT(5) UNSIGNED NOT NULL AUTO_INCREMENT, + `fieldelement_mid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `fieldelement_tid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `fieldelement_name` VARCHAR(100) NOT NULL DEFAULT '', + `fieldelement_value` VARCHAR(100) NOT NULL DEFAULT '', + PRIMARY KEY (`fieldelement_id`), + KEY `fieldelement_mid` (`fieldelement_mid`), + KEY `fieldelement_tid` (`fieldelement_tid`) +)ENGINE =MyISAM; + +INSERT INTO `tdmcreate_fieldelements` (`fieldelement_id`, `fieldelement_mid`, `fieldelement_tid`, `fieldelement_name`, `fieldelement_value`) VALUES + (1, 0, 0, '...', ''), + (2, 0, 0, 'Text', 'XoopsFormText'), + (3, 0, 0, 'TextArea', 'XoopsFormTextArea'), + (4, 0, 0, 'DhtmlTextArea', 'XoopsFormDhtmlTextArea'), + (5, 0, 0, 'CheckBox', 'XoopsFormCheckBox'), + (6, 0, 0, 'RadioYN', 'XoopsFormRadioYN'), + (7, 0, 0, 'SelectBox', 'XoopsFormSelect'), + (8, 0, 0, 'SelectUser', 'XoopsFormSelectUser'), + (9, 0, 0, 'ColorPicker', 'XoopsFormColorPicker'), + (10, 0, 0, 'ImageList', 'XoopsFormImageList'), + (11, 0, 0, 'TextFile', 'XoopsFormTextFile'), + (12, 0, 0, 'UploadImage', 'XoopsFormUploadImage'), + (13, 0, 0, 'UploadFile', 'XoopsFormUploadFile'), + (14, 0, 0, 'TextDateSelect', 'XoopsFormTextDateSelect'); \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl 2015-04-19 20:33:25 UTC (rev 13039) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl 2015-04-21 17:27:59 UTC (rev 13040) @@ -43,7 +43,7 @@ <a href="tables.php?op=edit&table_mid=<{$table.mid}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>"> <img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>" /> </a> - <a href="fields.php?op=edit&field_mid=<{$table.mid}>&field_tid=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>"> + <a href="fields.php?op=edit&field_mid=<{$table.mid}>&field_tid=<{$table.id}>&field_numb=<{$table.nbfields}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>"> <img src="<{xoModuleIcons16 inserttable.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>" /> </a> <a href="fields.php?op=delete&field_tid=<{$table.id}>" title="<{$smarty.const._DELETE}>"> |
From: <txm...@us...> - 2015-04-24 17:26:27
|
Revision: 13041 http://sourceforge.net/p/xoops/svn/13041 Author: txmodxoops Date: 2015-04-24 17:26:17 +0000 (Fri, 24 Apr 2015) Log Message: ----------- Changed elements index, added more elements Work in progress Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/modules.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/category.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/stats.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminMenu.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminObjects.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPermissions.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFiles.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFormElements.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageAdmin.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageModinfo.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/blocks/TemplatesBlocks.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/TemplatesUserPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserHeader.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserSubmit.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserXoopsVersion.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/xoops_version.php Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/tdmcreate_logo.png Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -61,6 +61,8 @@ unset($countTables); // Get the list of tables $criteria = new CriteriaCompo(); + $criteria->setStart($start); + $criteria->setLimit($limit); $criteria->setSort('table_id ASC, table_name'); $criteria->setOrder('ASC'); $countTables = $tdmcreate->getHandler('tables')->getCount($criteria); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/modules.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/modules.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -42,6 +42,8 @@ $GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16); $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32); $criteria = new CriteriaCompo(); + $criteria->setStart($start); + $criteria->setLimit($limit); $criteria->setSort('mod_id ASC, mod_name'); $criteria->setOrder('ASC'); $nb_modules = $tdmcreate->getHandler('modules')->getCount( $criteria ); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -53,6 +53,8 @@ $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32); // Get the list of modules $criteria = new CriteriaCompo(); + $criteria->setStart($start); + $criteria->setLimit($limit); $criteria->setSort('mod_id ASC, mod_name'); $criteria->setOrder('ASC'); $numbModules = $tdmcreate->getHandler('modules')->getCount($criteria); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/category.png =================================================================== (Binary files differ) Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/stats.png =================================================================== (Binary files differ) Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/tdmcreate_logo.png =================================================================== (Binary files differ) Index: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/tdmcreate_logo.png =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/tdmcreate_logo.png 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/tdmcreate_logo.png 2015-04-24 17:26:17 UTC (rev 13041) Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/tdmcreate_logo.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js 2015-04-24 17:26:17 UTC (rev 13041) @@ -1,3 +1,7 @@ +/* + * JQuery javascript functions + * + */ function swapImg(swap) { obj = document.getElementById(swap); obj.src = !(obj.src == img_minus) ? img_minus : img_plus; @@ -12,7 +16,7 @@ if (selectDom.options[selectDom.selectedIndex].value != "") { imgDom.src = xoopsUrl + imgDir + "/" + selectDom.options[selectDom.selectedIndex].value + extra; } else { - imgDom.src = xoopsUrl + "/modules/TDMCreate/assets/images/icons/blank.gif"; + imgDom.src = xoopsUrl + "/modules/tdmcreate/assets/icons/blank.gif"; } } @@ -35,7 +39,7 @@ //alert(data1); logoDom.src = data1.split('\n')[0];//the data returned has too many lines. We need only the link to the image logoDom.load; //refresh the logo - mycheck=caption+'_slogo.png'; //name of the new logo file + mycheck=caption+'_logo.png'; //name of the new logo file //if file is not in the list of logo files, add it to the dropdown menu var fileExist; elems = moduleImageDom.options; Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -226,7 +226,11 @@ $field_parent = 0; $check_field_parent = new XoopsFormCheckBox(' ', 'field_parent['.$i.']'); $check_field_parent->addOption($field_parent, _AM_TDMCREATE_FIELD_PARENT ); - $parameters_tray->addElement($check_field_parent); + $parameters_tray->addElement($check_field_parent); + /*$field_parent = ($table_autoincrement == 1) ? 2 : 1; + $check_field_parent = new TDMCreateFormRadio('', 'field_parent', $field_parent); + $check_field_parent->addOption($i, _AM_TDMCREATE_FIELD_PARENT ); + $parameters_tray->addElement($check_field_parent);*/ $field_inlist = 0; $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$i.']', $field_inlist); @@ -359,7 +363,11 @@ $check_field_parent = new XoopsFormCheckBox(' ', 'field_parent['.$id.']', $field->getVar('field_parent')); $check_field_parent->addOption(1, _AM_TDMCREATE_FIELD_PARENT ); - $parameters_tray->addElement($check_field_parent); + $parameters_tray->addElement($check_field_parent); + /*$field_parent = ($field->getVar('field_parent') == 1) ? $id : 1; + $check_field_parent = new TDMCreateFormRadio('', 'field_parent', $field_parent); + $check_field_parent->addOption($id, _AM_TDMCREATE_FIELD_PARENT ); + $parameters_tray->addElement($check_field_parent);*/ $check_field_inlist = new XoopsFormCheckBox(' ', 'field_inlist['.$id.']', $field->getVar('field_inlist')); $check_field_inlist->addOption(1, _AM_TDMCREATE_FIELD_INLIST); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -347,20 +347,17 @@ $languageBlocks->write($module, $tables, 'blocks.php'); $ret[] = $languageBlocks->render(); } - // Creation of admin files - if ( $table->getVar('table_admin') == 1) { - // Creation of admin permission file - if (( $table->getVar('table_permissions') == 1)) { - // Admin Permissions File - $adminPermissions = AdminPermissions::getInstance(); - $adminPermissions->write($module, $tables, 'permissions.php'); - $ret[] = $adminPermissions->render(); - // Templates Admin Permissions File - $adminTemplatesPermissions = TemplatesAdminPermissions::getInstance(); - $adminTemplatesPermissions->write($module, $moduleDirname.'_admin_permissions.tpl'); - $ret[] = $adminTemplatesPermissions->render(); - } - } + // Creation of admin permission file + if ( $table->getVar('table_permissions') == 1 ) { + // Admin Permissions File + $adminPermissions = AdminPermissions::getInstance(); + $adminPermissions->write($module, $tables, 'permissions.php'); + $ret[] = $adminPermissions->render(); + // Templates Admin Permissions File + $adminTemplatesPermissions = TemplatesAdminPermissions::getInstance(); + $adminTemplatesPermissions->write($module, $moduleDirname.'_admin_permissions.tpl'); + $ret[] = $adminTemplatesPermissions->render(); + } // Creation of notifications files if ( $table->getVar('table_notifications') == 1 ) { // Include Notifications File Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminMenu.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminMenu.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminMenu.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -95,7 +95,7 @@ { $fieldElement = $fields[$f]->getVar('field_element'); switch( $fieldElement ) { - case 11: + case 13: $ret = <<<EOT \$adminmenu[\$i]['icon'] = 'assets/icons/32/{$tables[$t]->getVar('table_image')}';\n EOT; Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminObjects.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminObjects.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminObjects.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -71,6 +71,18 @@ return $ret; } /* + * @public function getUrlFileSetVar + * @param string $tableName + * @param string $fieldName + */ + public function getUrlFileSetVar($tableName, $fieldName) { + $ret = <<<EOT + // Set Var {$fieldName} + \${$tableName}Obj->setVar('{$fieldName}', formtUrl(\$_REQUEST['{$fieldName}']));\n +EOT; + return $ret; + } + /* * @public function getImageListSetVar * @param string $moduleDirname * @param string $tableName @@ -83,9 +95,9 @@ \$uploaddir = XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32'; \$uploader = new XoopsMediaUploader(\$uploaddir, \${$moduleDirname}->getConfig('mimetypes'), \${$moduleDirname}->getConfig('maxsize'), null, null); - if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0])) { + if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][])) { //\$uploader->setPrefix('{$fieldName}_'); - //\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0]); + //\$uploader->fetchMedia(\$_POST['xoops_upload_file'][]); if (!\$uploader->upload()) { \$errors = \$uploader->getErrors(); redirect_header('javascript:history.go(-1)', 3, \$errors); @@ -112,9 +124,9 @@ \$uploaddir = {$stuModuleDirname}_UPLOAD_PATH.'/images/{$tableName}'; \$uploader = new XoopsMediaUploader(\$uploaddir, \${$moduleDirname}->getConfig('mimetypes'), \${$moduleDirname}->getConfig('maxsize'), null, null); - if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0])) { + if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][])) { //\$uploader->setPrefix('{$fieldName}_'); - //\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0]); + //\$uploader->fetchMedia(\$_POST['xoops_upload_file'][]); if (!\$uploader->upload()) { \$errors = \$uploader->getErrors(); redirect_header('javascript:history.go(-1)', 3, \$errors); @@ -141,9 +153,9 @@ \$uploaddir = {$stuModuleDirname}_UPLOAD_PATH.'/files/{$tableName}'; \$uploader = new XoopsMediaUploader(\$uploaddir, \${$moduleDirname}->getConfig('mimetypes'), \${$moduleDirname}->getConfig('maxsize'), null, null); - if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0])) { + if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][])) { //\$uploader->setPrefix('{$fieldName}_') ; - //\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0]); + //\$uploader->fetchMedia(\$_POST['xoops_upload_file'][]); if (!\$uploader->upload()) { \$errors = \$uploader->getErrors(); redirect_header('javascript:history.go(-1)', 3, \$errors); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -86,7 +86,7 @@ * @param string $fpif * @param string $fpmf */ - public function getAdminPagesList($moduleDirname, $table, $tableFieldname, $language, $fields, $fpif, $fpmf) { + public function getAdminPagesList($moduleDirname, $table, $tableFieldname, $language, $fields, $fpif, $fieldInForm, $fpmf) { $stuModuleDirname = strtoupper($moduleDirname); $tableName = $table->getVar('table_name'); $tableAutoincrement = $table->getVar('table_autoincrement'); @@ -98,10 +98,18 @@ \$start = XoopsRequest::getInt('start', 0); \$limit = XoopsRequest::getInt('limit', \${$moduleDirname}->getConfig('adminpager')); \$template_main = '{$moduleDirname}_admin_{$tableName}.tpl'; - \$GLOBALS['xoopsTpl']->assign('navigation', \$adminMenu->addNavigation('{$tableName}.php')); + \$GLOBALS['xoopsTpl']->assign('navigation', \$adminMenu->addNavigation('{$tableName}.php'));\n +EOT; + if ($fieldInForm == 1) { + $ret .= <<<EOT \$adminMenu->addItemButton({$language}ADD_{$stuTableFieldname}, '{$tableName}.php?op=new', 'add'); - \$GLOBALS['xoopsTpl']->assign('buttons', \$adminMenu->renderButton()); + \$GLOBALS['xoopsTpl']->assign('buttons', \$adminMenu->renderButton());\n +EOT; + } + $ret .= <<<EOT \$criteria = new CriteriaCompo(); + \$criteria->setStart(\$start); + \$criteria->setLimit(\$limit); \$criteria->setSort('{$fpif} ASC, {$fpmf}'); \$criteria->setOrder('ASC'); \${$tableName}Count = \${$tableName}Handler->getCount(\$criteria); @@ -134,14 +142,17 @@ $ret .= $this->adminobjects->getSelectUserGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); break; case 12: + $ret .= $this->adminobjects->getUrlFileGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); + break; + case 13: $ret .= $this->adminobjects->getUploadImageGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); break; - case 14: + case 15: $ret .= $this->adminobjects->getTextDateSelectGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); break; default: - if( ($fieldParent == 1) && !$table->getVar('table_category') ) { - if($fieldElement > 13) { + if( ($fieldParent == 1) && $table->getVar('table_category') == 0 ) { + if($fieldElement > 15) { $fieldElements = $this->tdmcreate->getHandler('fieldelements')->get($fieldElement); $fieldElementTid = $fieldElements->getVar('fieldelement_tid'); $fieldElementName = $fieldElements->getVar('fieldelement_name'); @@ -243,16 +254,19 @@ case 6: $ret .= $this->adminobjects->getCheckBoxOrRadioYNSetVar($tableName, $fieldName); break; - case 10: + case 11: $ret .= $this->adminobjects->getImageListSetVar($moduleDirname, $tableName, $fieldName); break; - case 11: + case 12: + $ret .= $this->adminobjects->getUrlFileSetVar($tableName, $fieldName); + break; + case 13: $ret .= $this->adminobjects->getUploadImageSetVar($moduleDirname, $tableName, $fieldName); break; - case 12: + case 14: $ret .= $this->adminobjects->getUploadFileSetVar($moduleDirname, $tableName, $fieldName); break; - case 13: + case 15: $ret .= $this->adminobjects->getTextDateSelectSetVar($tableName, $fieldName); break; default: @@ -387,6 +401,7 @@ foreach(array_keys($fields) as $f) { $fieldName = $fields[$f]->getVar('field_name'); + $fieldInForm = $fields[$f]->getVar('field_inform'); if($f == 0) { $fpif = $fieldName; } @@ -396,10 +411,12 @@ } $content = $this->getHeaderFilesComments($module, $filename); $content .= $this->getAdminPagesHeader($moduleDirname, $tableName, $fpif); - $content .= $this->getAdminPagesList($moduleDirname, $table, $tableFieldname, $language, $fields, $fpif, $fpmf); - $content .= $this->getAdminPagesNew($moduleDirname, $tableName, $language); - $content .= $this->getAdminPagesSave($moduleDirname, $tableName, $language, $fields, $fpif, $fpmf); - $content .= $this->getAdminPagesEdit($moduleDirname, $tableName, $tableFieldname, $language, $fpif); + $content .= $this->getAdminPagesList($moduleDirname, $table, $tableFieldname, $language, $fields, $fpif, $fieldInForm, $fpmf); + if ($fieldInForm == 1) { + $content .= $this->getAdminPagesNew($moduleDirname, $tableName, $language); + $content .= $this->getAdminPagesSave($moduleDirname, $tableName, $language, $fields, $fpif, $fpmf); + $content .= $this->getAdminPagesEdit($moduleDirname, $tableName, $tableFieldname, $language, $fpif); + } $content .= $this->getAdminPagesDelete($tableName, $language, $fpif, $fpmf); $content .= $this->getAdminPagesFooter(); // Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPermissions.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPermissions.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPermissions.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -54,11 +54,11 @@ $this->setFileName($filename); } /* - * @private function getPermissionsCodeHeader + * @private function getPermissionsHeader * @param string $moduleDirname * @param string $language */ - private function getPermissionsCodeHeader($moduleDirname, $language) + private function getPermissionsHeader($moduleDirname, $language) { $ret = <<<PRM \ninclude_once 'header.php'; @@ -94,11 +94,11 @@ } /* - * @private function getPermissionsCodeSwitch + * @private function getPermissionsSwitch * @param string $moduleDirname * @param string $language */ - private function getPermissionsCodeSwitch($moduleDirname, $language) + private function getPermissionsSwitch($moduleDirname, $language) { $ret = <<<PRM \$module_id = \$xoopsModule->getVar('mid'); @@ -133,12 +133,12 @@ } /* - * @private function getPermissionsCodeBody + * @private function getPermissionsBody * @param string $moduleDirname * @param string $tableName * @param string $language */ - private function getPermissionsCodeBody($moduleDirname, $language) + private function getPermissionsBody($moduleDirname, $language) { $tables = $this->getTables(); foreach(array_keys($tables) as $t) @@ -151,11 +151,12 @@ $fields = $this->getTableFields($tableId); foreach(array_keys($fields) as $f) { + $fieldName = $fields[$f]->getVar('field_name'); if($f == 0) { - $fpif = $fields[$f]->getVar('field_name'); + $fpif = $fieldName; } if($fields[$f]->getVar('field_main') == 1) { - $fpmf = $fields[$f]->getVar('field_name'); + $fpmf = $fieldName; } } $ret = <<<PRM @@ -189,10 +190,10 @@ } /* - * @private function getPermissionsCodeFooter + * @private function getPermissionsFooter * @param null */ - private function getPermissionsCodeFooter() { + private function getPermissionsFooter() { $ret = <<<PRM } unset(\$permform); @@ -211,10 +212,10 @@ $moduleDirname = $module->getVar('mod_dirname'); $language = $this->getLanguage($moduleDirname, 'AM'); $content = $this->getHeaderFilesComments($module, $filename); - $content .= $this->getPermissionsCodeHeader($moduleDirname, $language); - $content .= $this->getPermissionsCodeSwitch($moduleDirname, $language); - $content .= $this->getPermissionsCodeBody($moduleDirname, $language); - $content .= $this->getPermissionsCodeFooter(); + $content .= $this->getPermissionsHeader($moduleDirname, $language); + $content .= $this->getPermissionsSwitch($moduleDirname, $language); + $content .= $this->getPermissionsBody($moduleDirname, $language); + $content .= $this->getPermissionsFooter(); // $this->tdmcfile->create($moduleDirname, 'admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); return $this->tdmcfile->renderFile(); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFiles.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFiles.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFiles.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -422,6 +422,7 @@ foreach(array_keys($fields) as $f) { $fieldName = $fields[$f]->getVar('field_name'); + $fieldInForm = $fields[$f]->getVar('field_inform'); if(($f == 0) && ($table->getVar('table_autoincrement') == 1)) { $fpif = $fieldName; // $fpif = fields parameter index field } @@ -431,11 +432,13 @@ } $content = $this->getHeaderFilesComments($module, $filename); $content .= $this->getHeadClass($moduleDirname, $tableName, $fields); - $content .= $this->getHeadInForm($module, $table); - if ($table->getVar('table_permissions') == 1) { - $content .= $this->getPermissionsInForm($moduleDirname, $fpif); + if ($fieldInForm == 1) { + $content .= $this->getHeadInForm($module, $table); + if ($table->getVar('table_permissions') == 1) { + $content .= $this->getPermissionsInForm($moduleDirname, $fpif); + } + $content .= $this->getFootInForm(); } - $content .= $this->getFootInForm(); $content .= $this->getToArray(); $content .= $this->getClassHandler($moduleDirname, $tableName, $tableCategory, $tableFieldname, $fpif, $fpmf); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFormElements.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFormElements.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/classes/ClassFormElements.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -167,6 +167,46 @@ return $ret; } /* + * @private function getXoopsFormSelectFile + * @param string $language + * @param string $moduleDirname + * @param string $fieldName + * @param string $fieldDefault + * @param string $fieldElement + * @param string $required + */ + private function getXoopsFormSelectFile($language, $moduleDirname, $fieldName, $fieldElement, $required = 'false') { + $ret = <<<EOT + // Image Select or Upload + if ( \$this->{$moduleDirname}->getConfig('useshots') ){ + \${$fieldName} = \$this->getVar('{$fieldName}'); + \$uploadirectory = '/uploads/{$moduleDirname}/images/shots'; + \$uploaddir = XOOPS_ROOT_PATH . \$uploadirectory . '/' . \${$fieldName}; + \${$moduleDirname}cat_img = \${$fieldName} ? \${$fieldName} : 'blank.gif'; + if (!is_file(\$uploaddir)){ + \${$moduleDirname}cat_img = 'blank.gif'; + } + \$imgtray = new XoopsFormElementTray({$language}_FORMIMG,'<br />'); + \$imgpath = sprintf({$language}_FORMPATH, \$uploadirectory ); + \$imageselect = new XoopsFormSelect(\$imgpath, 'selected_img',\${$moduleDirname}cat_img); + \${$fieldName}_array = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH . \$uploadirectory ); + foreach( \${$fieldName}_array as \$image ) { + \$imageselect->addOption("\$image", \$image); + } + \$imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"selected_img\", \"" . \$uploadirectory . "\", \"\", \"" . XOOPS_URL . "\")'" ); + \$imgtray->addElement(\$imageselect,false); + \$imgtray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . \$uploadirectory . "/" . \${$moduleDirname}cat_img . "' name='image3' id='image3' alt='' />" ) ); + \$fileseltray= new XoopsFormElementTray('','<br />'); + //if (\$perm_upload == true) { + \$fileseltray->addElement(new XoopsFormFile({$language}_FORMUPLOAD , 'attachedimage', \$this->{$moduleDirname}->getConfig('maxuploadsize')){$required}); + //} + \$imgtray->addElement(\$fileseltray); + \$form->addElement(\$imgtray); + }\n +EOT; + return $ret; + } + /* * @private function getXoopsFormTextFile * @param string $language * @param string $moduleDirname @@ -175,16 +215,12 @@ * @param string $fieldElement * @param string $required */ - private function getXoopsFormTextFile($language, $moduleDirname, $fieldName, $fieldDefault, $fieldElement, $required = 'false') { - if($fieldElement == 11 ) { - $f_text = $fieldName; - $f_default = $fieldDefault; - } + private function getXoopsFormUrlFile($language, $moduleDirname, $fieldName, $fieldDefault, $fieldElement, $required = 'false') { $ret = <<<EOT // Form Text File \$formTextFile = new XoopsFormElementTray({$language}FORM_FILE,'<br /><br />'); - \$field_text = \$this->isNew() ? '{$f_default}' : \$this->getVar('{$f_text}'); - \$formText = new XoopsFormText({$language}FORM_TEXT, '{$f_text}', 75, 255, \$field_text); + \$field_text = \$this->isNew() ? '{$fieldDefault}' : \$this->getVar('{$fieldName}'); + \$formText = new XoopsFormText({$language}FORM_TEXT, '{$fieldName}', 75, 255, \$field_text); \$formTextFile->addElement(\$formText{$required} ); \$formTextFile->addElement(new XoopsFormFile({$language}FORM_UPLOAD , 'attachedfile', \$this->{$moduleDirname}->getConfig('maxsize')){$required}); \$form->addElement(\$formTextFile);\n @@ -237,13 +273,13 @@ return $ret; } /* - * @private function getXoopsFormSelect + * @private function getXoopsFormSelectBox * @param string $language * @param string $tableName * @param string $fieldName * @param string $required */ - private function getXoopsFormSelect($language, $tableName, $fieldName, $required = 'false') { + private function getXoopsFormSelectBox($language, $tableName, $fieldName, $required = 'false') { $ret = <<<EOT // Form Select \${$fieldName}_select = new XoopsFormSelect({$language}, '{$fieldName}', \$this->getVar('{$fieldName}')); @@ -304,7 +340,7 @@ private function getXoopsFormTable($language, $moduleDirname, $tableName, $fieldName, $fieldElement, $required = 'false') { $ucfTableName = ucfirst($tableName); - if($fieldElement > 14) { + if($fieldElement > 15) { $fElement = $this->tdmcreate->getHandler('fieldelements')->get($fieldElement); $rpFieldelementName = strtolower(str_replace('Table : ', '', $fElement->getVar('fieldelement_name'))); } @@ -410,7 +446,7 @@ $ret .= $this->getXoopsFormRadioYN($language, $fieldName, $required); break; case 7: - $ret .= $this->getXoopsFormSelect($language, $tableName, $fieldName, $required); + $ret .= $this->getXoopsFormSelectBox($language, $tableName, $fieldName, $required); break; case 8: $ret .= $this->getXoopsFormSelectUser($language, $fieldName, $required); @@ -422,15 +458,18 @@ $ret .= $this->getXoopsFormImageList($language_funct, $moduleDirname, $tableName, $fieldName, $required); break; case 11: - $ret .= $this->getXoopsFormTextFile($language, $moduleDirname, $fieldName, $fieldDefault, $fieldElement, $required); + $ret .= $this->getXoopsFormSelectFile($language, $moduleDirname, $fieldName, $fieldElement, $required); break; case 12: + $ret .= $this->getXoopsFormUrlFile($language, $moduleDirname, $fieldName, $fieldDefault, $fieldElement, $required); + break; + case 13: $ret .= $this->getXoopsFormUploadImage($language_funct, $moduleDirname, $tableName, $required); break; - case 13: + case 14: $ret .= $this->getXoopsFormUploadFile($language, $moduleDirname, $tableName, $fieldName, $required); break; - case 14: + case 15: $ret .= $this->getXoopsFormTextDateSelect($language, $moduleDirname, $fieldName, $required); break; default: @@ -440,8 +479,8 @@ } break; } - if ($fieldElement > 14) { - if($table->getVar('table_category') == 1) { + if ($fieldElement > 15) { + if(($table->getVar('table_category') == 1) || ($fieldParent == 1)) { $ret .= $this->getXoopsFormTopic($language, $moduleDirname, $table, $fields, $required); } else { $ret .= $this->getXoopsFormTable($language, $moduleDirname, $tableName, $fieldName, $fieldElement, $required); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageAdmin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageAdmin.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageAdmin.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -159,10 +159,10 @@ case 10: $ret .= $this->defines->getDefine($language, "FORM_UPLOAD_IMAGE_LIST_{$stuTableName}", "{$fieldNameDesc} in frameworks images"); break; - case 11: + case 13: $ret .= $this->defines->getDefine($language, "FORM_UPLOAD_IMAGE_{$stuTableName}", "{$fieldNameDesc} in uploads images"); break; - case 12: + case 14: $ret .= $this->defines->getDefine($language, "FORM_UPLOAD_FILE_{$stuTableName}", "{$fieldNameDesc} in uploads files"); break; } Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageModinfo.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageModinfo.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/language/LanguageModinfo.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -184,6 +184,11 @@ $ret .= $this->defines->getDefine($language, "MIMETYPES", "Mime Types"); $ret .= $this->defines->getDefine($language, "MIMETYPES_DESC", "Set the mime types selected"); } + if ( $table->getVar('table_tag') != 0 ) + { + $ret .= $this->defines->getDefine($language, "USE_TAG", "Use TAG"); + $ret .= $this->defines->getDefine($language, "USE_TAG_DESC", "If you use tag module, check this option to yes"); + } } $ret .= $this->defines->getDefine($language, "IDPAYPAL", "Paypal ID"); $ret .= $this->defines->getDefine($language, "IDPAYPAL_DESC", "Insert here your PayPal ID for donactions."); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -121,7 +121,7 @@ <td class="center"><img src="<{xoModuleIcons32}><{\$list.{$rpFieldName}}>" alt="{$tableName}"></td>\n EOT; break; - case 11: + case 13: $ret .= <<<EOT <td class="center"><img src="<{\${$moduleDirname}_upload_url}>/images/{$tableName}/<{\$list.{$rpFieldName}}>" alt="{$tableName}"></td>\n EOT; @@ -184,7 +184,7 @@ <td class="center"><img src="<{xoModuleIcons32}><{\$list.{$fieldName}}>" alt="{$tableName}"></td>\n EOT; break; - case 11: + case 13: $ret .= <<<EOT <td class="center"><img src="<{\${$moduleDirname}_upload_url}>/images/{$tableName}/<{\$list.{$fieldName}}>" alt="{$tableName}"></td>\n EOT; Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/blocks/TemplatesBlocks.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/blocks/TemplatesBlocks.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/blocks/TemplatesBlocks.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -112,7 +112,7 @@ </td>\n EOT; break; - case 11: + case 13: $ret .= <<<EOT <td class="center"> <img src="<{\${$moduleDirname}_upload_url}>/images/{$tableName}/<{\$list.{$rpFieldName}}>" alt="{$tableName}"> @@ -166,7 +166,7 @@ </td>\n EOT; break; - case 11: + case 13: $ret .= <<<EOT <td class="center"> <img src="<{\${$moduleDirname}_upload_url}>/images/{$tableName}/<{\$list.{$fieldName}}>" alt="{$tableName}"> Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/TemplatesUserPages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/TemplatesUserPages.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/templates/user/TemplatesUserPages.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -115,7 +115,7 @@ <td class="center"><img src="<{xoModuleIcons32}><{\$list.{$rpFieldName}}>" alt="{$tableName}"></td>\n EOT; break; - case 11: + case 13: $ret .= <<<EOT <td class="center"><img src="<{\${$moduleDirname}_upload_url}>/images/{$tableName}/<{\$list.{$rpFieldName}}>" alt="{$tableName}"></td>\n EOT; @@ -162,7 +162,7 @@ <td class="center"><span style="background-color: #<{\$list.{$fieldName}}>;"></span></td>\n EOT; break; - case 10: + case 13: $ret .= <<<EOT <td class="center"><img src="<{\${$moduleDirname}_upload_url}>/images/{$tableName}/<{\$list.{$fieldName}}>" alt="{$tableName}"></td>\n EOT; Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserHeader.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserHeader.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserHeader.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -73,19 +73,7 @@ \$pathname = XOOPS_ROOT_PATH. '/modules/'.\$dirname; include_once \$pathname . '/include/common.php'; // Get instance of module -\${$moduleDirname} = {$ucfModuleDirname}Helper::getInstance();\n -EOT; - if (is_object($table)) { - foreach (array_keys($tables) as $t) - { - $tableName = $tables[$t]->getVar('table_name'); - $content .= <<<EOT -// {$tableName} -\${$tableName}Handler =& \${$moduleDirname}->getHandler('{$tableName}');\n -EOT; - } - } - $content .=<<<EOT +\${$moduleDirname} = {$ucfModuleDirname}Helper::getInstance(); // \$myts =& MyTextSanitizer::getInstance(); \$style = {$stuModuleDirname}_URL . '/assets/css/style.css'; Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPages.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserPages.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -72,7 +72,10 @@ $stlTableName = strtolower($tableName); $ucfTableName = ucfirst($tableName); $ret = <<<EOT -\ninclude_once 'header.php'; +\ninclude_once 'header.php'; +// {$tableName} +\${$tableName}Handler =& \${$moduleDirname}->getHandler('{$tableName}'); +// \$GLOBALS['xoopsOption']['template_main'] = '{$moduleDirname}_{$tableName}.tpl'; include_once XOOPS_ROOT_PATH . '/header.php'; \$start = {$moduleDirname}_CleanVars( \$_REQUEST, 'start', 0); @@ -112,16 +115,19 @@ break; case 8: $ret .= $this->userobjects->getSelectUserGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); - break; - case 11: + break; + case 12: + $ret .= $this->adminobjects->getUrlFileGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); + break; + case 13: $ret .= $this->userobjects->getUploadImageGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); break; - case 13: + case 15: $ret .= $this->userobjects->getTextDateSelectGetVar($lpFieldName, $rpFieldName, $tableName, $fieldName); break; default: if( ($fieldParent == 1) && !$table->getVar('table_category') ) { - if($fieldElement > 13) { + if($fieldElement > 15) { $fieldElements = $this->tdmcreate->getHandler('fieldelements')->get($fieldElement); $fieldElementTid = $fieldElements->getVar('fieldelement_tid'); $fieldElementName = $fieldElements->getVar('fieldelement_name'); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserSubmit.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserSubmit.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserSubmit.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -133,13 +133,13 @@ { $fieldName = $fields[$f]->getVar('field_name'); $fieldElement = $fields[$f]->getVar('field_element'); - if(($fieldElement == 4) || ($fieldElement == 5)) { + if(($fieldElement == 5) || ($fieldElement == 6)) { $ret .= $this->adminobjects->getCheckBoxOrRadioYN($tableName, $fieldName); - } elseif($fieldElement == 9) { + } elseif($fieldElement == 13) { $ret .= $this->adminobjects->getUploadImage($moduleDirname, $tableName, $fieldName); - } elseif($fieldElement == 10) { + } elseif($fieldElement == 14) { $ret .= $this->adminobjects->getUploadFile($moduleDirname, $tableName, $fieldName); - } elseif($fieldElement == 11) { + } elseif($fieldElement == 15) { $ret .= $this->adminobjects->getTextDateSelect($tableName, $fieldName); } else { $ret .= $this->adminobjects->getSimpleSetVar($tableName, $fieldName); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserXoopsVersion.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserXoopsVersion.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserXoopsVersion.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -422,11 +422,13 @@ 'default' => "{$moduleDirname}, {$keyword}");\n\n EOT; unset($this->keywords); - if (is_object($table)) { + if (is_object($table)) + { foreach (array_keys($fields) as $f) { $fieldElement = $fields[$f]->getVar('field_element'); - if(( $fieldElement == 9 ) || ( $fieldElement == 10 )) { + if(( $fieldElement == 10 ) || ( $fieldElement == 11 ) || + ( $fieldElement == 12 ) || ( $fieldElement == 13 ) || ( $fieldElement == 14 )) { $ret .= <<<EOT //Uploads : maxsize of image \$modversion['config'][] = array( @@ -449,8 +451,8 @@ "jpeg" => "image/jpeg","jpg" => "image/jpg","jpe" => "image/jpe", "png" => "image/png"));\n\n EOT; + } } - } if ($table->getVar('table_admin') == 1) { $ret .= <<<EOT \$modversion['config'][] = array( @@ -474,6 +476,17 @@ EOT; } } + if ($table->getVar('table_tag') == 1) { + $ret .= <<<EOT +\$modversion['config'][] = array( + 'name' => "usetag", + 'title' => "{$language}USE_TAG", + 'description' => "{$language}USE_TAG_DESC", + 'formtype' => "yesno", + 'valuetype' => "int", + 'default' => 0);\n\n +EOT; + } $ret .= <<<EOT \$modversion['config'][] = array( 'name' => "advertise", Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -53,9 +53,9 @@ $iconFileName = XOOPS_ROOT_PATH . "/Frameworks/moduleclasses/icons/32/".basename($logoIcon); //$dirlogos = TDMC_PATH . "/assets/images/logos"; - $dirlogos = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/logos"; - if (!file_exists($imageBase = $dirlogos . "/xoops2.png") || - !file_exists($font = $dirlogos . "/VeraBd.ttf") || + //$dirlogos = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/logos"; + if (!file_exists($imageBase = TDMC_IMAGE_LOGOS_PATH . "/xoops2.png") || + !file_exists($font = TDMC_IMAGE_LOGOS_PATH . "/VeraBd.ttf") || !file_exists($iconFile = $iconFileName)) { return false; } @@ -70,8 +70,8 @@ imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32); - //$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleDirname . "_slogo.png"; - $targetImage = "/uploads/" . $dirname . "/images/repository/" . $moduleDirname . "_logo.png"; + $targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleDirname . "_logo.png"; + //$targetImage = "/uploads/" . $dirname . "/images/repository/" . $moduleDirname . "_logo.png"; imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage ); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql 2015-04-24 17:26:17 UTC (rev 13041) @@ -254,7 +254,8 @@ (8, 0, 0, 'SelectUser', 'XoopsFormSelectUser'), (9, 0, 0, 'ColorPicker', 'XoopsFormColorPicker'), (10, 0, 0, 'ImageList', 'XoopsFormImageList'), - (11, 0, 0, 'TextFile', 'XoopsFormTextFile'), - (12, 0, 0, 'UploadImage', 'XoopsFormUploadImage'), - (13, 0, 0, 'UploadFile', 'XoopsFormUploadFile'), - (14, 0, 0, 'TextDateSelect', 'XoopsFormTextDateSelect'); \ No newline at end of file + (11, 0, 0, 'SelectFile', 'XoopsFormSelectFile'), + (12, 0, 0, 'UrlFile', 'XoopsFormUrlFile'), + (13, 0, 0, 'UploadImage', 'XoopsFormUploadImage'), + (14, 0, 0, 'UploadFile', 'XoopsFormUploadFile'), + (15, 0, 0, 'TextDateSelect', 'XoopsFormTextDateSelect'); \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/xoops_version.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/xoops_version.php 2015-04-21 17:27:59 UTC (rev 13040) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/xoops_version.php 2015-04-24 17:26:17 UTC (rev 13041) @@ -35,7 +35,7 @@ $modversion['release_file'] = XOOPS_URL."/modules/{$dirname}/docs/readme.txt"; $modversion['manual'] = "MANUAL"; $modversion['manual_file'] = XOOPS_URL."/modules/{$dirname}/docs/manual.txt"; -$modversion['image'] = "assets/images/logo.png"; +$modversion['image'] = "assets/images/{$dirname}_logo.png"; $modversion['dirname'] = "{$dirname}"; $modversion['dirmoduleadmin'] = "/Frameworks/moduleclasses/moduleadmin"; |
From: <txm...@us...> - 2015-04-24 22:03:18
|
Revision: 13042 http://sourceforge.net/p/xoops/svn/13042 Author: txmodxoops Date: 2015-04-24 22:03:15 +0000 (Fri, 24 Apr 2015) Log Message: ----------- Fixed issues to creaction folders & files Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateStructure.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserXoopsVersion.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/common.php Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/building.php 2015-04-24 17:26:17 UTC (rev 13041) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/building.php 2015-04-24 22:03:15 UTC (rev 13042) @@ -45,8 +45,6 @@ // Structure include_once TDMC_PATH . '/class/files/TDMCreateArchitecture.php'; $handler = TDMCreateArchitecture::getInstance(); - $handler->createPath(TDMC_PATH); - $handler->createUploadPath(TDMC_UPLOAD_PATH); // Creation of the structure of folders and files $base_architecture = $handler->createBaseFoldersFiles( $moduleObj ); if(false !== $base_architecture) { Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-24 17:26:17 UTC (rev 13041) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-24 22:03:15 UTC (rev 13042) @@ -171,14 +171,14 @@ $fieldsObj->setVar( 'field_tid', $fieldTid ); $fieldsObj->setVar( 'field_numb', $fieldNumb ); $fieldsObj->setVar( 'field_order', (isset($_POST['field_order'][$key]) ? $_POST['field_order'][$key] : $orderId) ); - $fieldsObj->setVar( 'field_name', (isset($_POST['field_name'][$key]) ? $_POST['field_name'][$key] : '') ); - $fieldsObj->setVar( 'field_type', (isset($_POST['field_type'][$key]) ? $_POST['field_type'][$key] : '') ); - $fieldsObj->setVar( 'field_value', (isset($_POST['field_value'][$key]) ? $_POST['field_value'][$key] : '') ); - $fieldsObj->setVar( 'field_attribute', (isset($_POST['field_attribute'][$key]) ? $_POST['field_attribute'][$key] : '') ); - $fieldsObj->setVar( 'field_null', (isset($_POST['field_null'][$key]) ? $_POST['field_null'][$key] : '') ); - $fieldsObj->setVar( 'field_default', (isset($_POST['field_default'][$key]) ? $_POST['field_default'][$key] : '') ); - $fieldsObj->setVar( 'field_key', (isset($_POST['field_key'][$key]) ? $_POST['field_key'][$key] : '') ); - $fieldsObj->setVar( 'field_element', (isset($_POST['field_element'][$key]) ? $_POST['field_element'][$key] : '') ); + $fieldsObj->setVar( 'field_name', (!empty($_POST['field_name'][$key]) ? $_POST['field_name'][$key] : '') ); + $fieldsObj->setVar( 'field_type', (!empty($_POST['field_type'][$key]) ? $_POST['field_type'][$key] : '') ); + $fieldsObj->setVar( 'field_value', (!empty($_POST['field_value'][$key]) ? $_POST['field_value'][$key] : '') ); + $fieldsObj->setVar( 'field_attribute', (!empty($_POST['field_attribute'][$key]) ? $_POST['field_attribute'][$key] : '') ); + $fieldsObj->setVar( 'field_null', (!empty($_POST['field_null'][$key]) ? $_POST['field_null'][$key] : '') ); + $fieldsObj->setVar( 'field_default', (!empty($_POST['field_default'][$key]) ? $_POST['field_default'][$key] : '') ); + $fieldsObj->setVar( 'field_key', (!empty($_POST['field_key'][$key]) ? $_POST['field_key'][$key] : '') ); + $fieldsObj->setVar( 'field_element', (!empty($_POST['field_element'][$key]) ? $_POST['field_element'][$key] : '') ); $fieldsObj->setVar( 'field_parent', ((isset($_REQUEST['field_parent'][$key]) == 1) ? 1 : 0) ); $fieldsObj->setVar( 'field_inlist', ((isset($_REQUEST['field_inlist'][$key]) == 1) ? 1 : 0) ); $fieldsObj->setVar( 'field_inform', ((isset($_REQUEST['field_inform'][$key]) == 1) ? 1 : 0) ); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-24 17:26:17 UTC (rev 13041) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-24 22:03:15 UTC (rev 13042) @@ -214,7 +214,7 @@ $parameters_tray = new XoopsFormElementTray('', '<br />'); // Field Elements $criteria_element = new CriteriaCompo(); - $criteria_element->add(new Criteria('fieldelement_tid', 0)); + $criteria_element->add(new Criteria('fieldelement_tid', $field_tid)); $criteria_table = new CriteriaCompo(); $criteria_table->add(new Criteria('fieldelement_mid', $field_mid)); $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$i.']'); @@ -352,7 +352,7 @@ $parameters_tray = new XoopsFormElementTray('', '<br />'); // Field Elements $criteria_element = new CriteriaCompo(); - $criteria_element->add(new Criteria('fieldelement_tid', 0)); + $criteria_element->add(new Criteria('fieldelement_tid', $field_tid)); $criteria_table = new CriteriaCompo(); $criteria_table->add(new Criteria('fieldelement_mid', $field_mid)); $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$id.']', $field->getVar('field_element')); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php 2015-04-24 17:26:17 UTC (rev 13041) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php 2015-04-24 22:03:15 UTC (rev 13042) @@ -16,7 +16,7 @@ * @package tdmcreate * @since 2.5.0 * @author Txmod Xoops http://www.txmodxoops.org - * @version $Id: architecture.php 12258 2014-01-02 09:33:29Z timgno $ + * @version $Id: TDMCreateArchitecture.php 12258 2014-01-02 09:33:29Z timgno $ */ defined('XOOPS_ROOT_PATH') or die('Restricted access'); require_once 'TDMCreateStructure.php'; @@ -37,7 +37,9 @@ */ public function __construct() { $this->tdmcreate = TDMCreateHelper::getInstance(); - $this->structure = TDMCreateStructure::getInstance(); + $this->structure = TDMCreateStructure::getInstance(); + $this->structure->setPath(TDMC_PATH); + $this->structure->setUploadPath(TDMC_UPLOAD_REPOSITORY_PATH); } /* * @static function &getInstance @@ -96,9 +98,11 @@ } // $indexFile = XOOPS_UPLOAD_PATH.'/index.html'; - $stlModuleAuthor = str_replace(' ', '', strtolower($module->getVar('mod_author'))); + $stlModuleAuthor = str_replace(' ', '', strtolower($module->getVar('mod_author'))); + $this->structure->setModuleName($module->getVar('mod_dirname')); + $uploadPath = $this->structure->getUploadPath(); // Creation of "module" folder in the Directory repository - $this->structure->makeDir(TDMC_UPLOAD_REPOSITORY_PATH.'/'. $module->getVar('mod_dirname')); + $this->structure->makeDir($uploadPath . '/'. $this->structure->getModuleName()); // Copied of index.html file in "root module" folder $this->structure->copyFile('', $indexFile, 'index.html'); if ( $module->getVar('mod_admin') == 1) { @@ -208,7 +212,7 @@ // Module $modId = $module->getVar('mod_id'); $moduleDirname = $module->getVar('mod_dirname'); - $uploadTablesIcons32 = $this->getUploadPath().'/images/tables'; + $uploadTablesIcons32 = $this->structure->getUploadPath().'/images/tables'; $framePathIcon32 = XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32'; $icon32 = 'assets/icons/32'; // Id of tables Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateStructure.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateStructure.php 2015-04-24 17:26:17 UTC (rev 13041) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateStructure.php 2015-04-24 22:03:15 UTC (rev 13042) @@ -16,7 +16,7 @@ * @package tdmcreate * @since 2.5.0 * @author Txmod Xoops http://www.txmodxoops.org - * @version $Id: structure.php 12258 2014-01-02 09:33:29Z timgno $ + * @version $Id: TDMCreateStructure.php 12258 2014-01-02 09:33:29Z timgno $ */ defined('XOOPS_ROOT_PATH') or die('Restricted access'); xoops_load('XoopsFile'); @@ -33,7 +33,7 @@ /* * @var string */ - protected $folderName = null; + private $folderName = null; /* * @var string */ @@ -45,16 +45,8 @@ /* * @var mixed */ - private $uploadPath = null; + private $uploadPath = null; /* - * @var string - */ - private $fromFile = null; - /* - * @var string - */ - private $toFile = null; - /* * @public function constructor class * @param string $path */ @@ -73,40 +65,82 @@ $instance = new self(); } return $instance; - } + } /* * @public function setPath * @param string $path */ public function setPath($path) { $this->path = $path; - } + } /* - * @public function setUploadPath - * @param string $path - */ - public function setUploadPath($path) { - $this->uploadPath = $path; - } - /* * @public function getPath * @return string $path */ public function getPath() { return $this->path; + } + /* + * @protected function setUploadPath + * @param string $path + */ + protected function setUploadPath($path) { + $this->uploadPath = $path; } /* - * @public function getUploadPath + * @protected function getUploadPath * @return string $path */ - public function getUploadPath() { + protected function getUploadPath() { return $this->uploadPath; } + /* + * @protected function setModuleName + * @param string $moduleName + */ + protected function setModuleName($moduleName) { + $this->moduleName = $moduleName; + } + /* + * @protected function getModuleName + * @return string $moduleName + */ + protected function getModuleName() { + return $this->moduleName; + } + /* + * @private function setFolderName + * @param string $folderName + */ + private function setFolderName($folderName) { + $this->folderName = $folderName; + } + /* + * @private function getFolderName + * @return string $folderName + */ + private function getFolderName() { + return $this->folderName; + } + /* + * @private function setFileName + * @param string $fileName + */ + private function setFileName($fileName) { + $this->fileName = $fileName; + } + /* + * @private function getFileName + * @return string $fileName + */ + private function getFileName() { + return $this->fileName; + } /* - * @public function isDir + * @private function isDir * @param string $dname */ - public function isDir($dname) + private function isDir($dname) { if(!is_dir($dname)) { mkdir($dname, 0755); @@ -116,34 +150,26 @@ } } /* - * @public function makeDir + * @protected function makeDir * @param string $dir */ - public function makeDir($dir) + protected function makeDir($dir) { $this->isDir(strtolower(trim($dir))); - } + } /* - * @public function makeModuleDir - * @param string $dir - */ - public function makeModuleDir($dir) - { - $this->isDir(strtolower(trim($dir))); - } - /* - * @public function folderPath + * @public function addFolderPath * @param string $folderName * @param string $fileName */ - public function folderPath($folderName, $fileName = null) + private function addFolderPath($folderName, $fileName = false) { - $this->folderName = $folderName; - if( $fileName != null ) { - $this->fileName = $fileName; - $ret = $this->path . DIRECTORY_SEPARATOR . $this->moduleName . DIRECTORY_SEPARATOR . $this->folderName . DIRECTORY_SEPARATOR . $this->fileName; + $this->setFolderName($folderName); + if( $fileName ) { + $this->setFileName($fileName); + $ret = $this->getUploadPath() . DS . $this->getModuleName() . DS . $this->getFolderName() . DS . $this->getFileName(); } else { - $ret = $this->path . DIRECTORY_SEPARATOR . $this->moduleName . DIRECTORY_SEPARATOR . $this->folderName; + $ret = $this->getUploadPath() . DS . $this->getModuleName() . DS . $this->getFolderName(); } return $ret; } @@ -153,18 +179,18 @@ */ public function makeDirInModule($dirName) { - $fname = $this->folderPath($dirName); + $fname = $this->addFolderPath($dirName); $this->makeDir($fname); } /* * @public function makeDir & copy file * @param string $folderName - * @param string $toFile - * @param string $file + * @param string $fromFile + * @param string $toFile */ public function makeDirAndCopyFile($folderName, $fromFile, $toFile) { - $dname = $this->folderPath($folderName); + $dname = $this->addFolderPath($folderName); $this->makeDir($dname); $this->copyFile($folderName, $fromFile, $toFile); } @@ -176,25 +202,23 @@ */ public function copyFile($folderName, $fromFile, $toFile) { - $this->fromFile = $fromFile; - $this->toFile = $toFile; - $dname = $this->folderPath($folderName); - $fname = $this->folderPath($folderName) . DIRECTORY_SEPARATOR . $this->toFile; - $this->setCopy($dname, $fname); + $dname = $this->addFolderPath($folderName); + $fname = $this->addFolderPath($folderName, $toFile); + $this->setCopy($dname, $fromFile, $fname); } /* * @public function setCopy * @param string $dname * @param string $fname */ - public function setCopy($dname, $fname) + public function setCopy($dname, $fromFile, $fname) { if(is_dir($dname)) { chmod($dname, 0777); - copy($this->fromFile, $fname); + copy($fromFile, $fname); } else { $this->makeDir($dname); - copy($this->fromFile, $fname); + copy($fromFile, $fname); } } } \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserXoopsVersion.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserXoopsVersion.php 2015-04-24 17:26:17 UTC (rev 13041) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/user/UserXoopsVersion.php 2015-04-24 22:03:15 UTC (rev 13042) @@ -566,9 +566,8 @@ foreach(array_keys($tables) as $t) { $tableName = $tables[$t]->getVar('table_name'); - $count = count($tableName); if($tables[$t]->getVar('table_notifications') == 1) { - if($t < $count) { + if($t < count($tableName)) { $notify_file .= "'".$tableName.".php', "; } else { $notify_file .= "'".$tableName.".php'"; Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php 2015-04-24 17:26:17 UTC (rev 13041) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php 2015-04-24 22:03:15 UTC (rev 13042) @@ -48,36 +48,23 @@ } } } - - $dirname = 'tdmcreate'; - $iconFileName = XOOPS_ROOT_PATH . "/Frameworks/moduleclasses/icons/32/".basename($logoIcon); - - //$dirlogos = TDMC_PATH . "/assets/images/logos"; - //$dirlogos = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/logos"; if (!file_exists($imageBase = TDMC_IMAGE_LOGOS_PATH . "/xoops2.png") || !file_exists($font = TDMC_IMAGE_LOGOS_PATH . "/VeraBd.ttf") || - !file_exists($iconFile = $iconFileName)) { + !file_exists($iconFile = XOOPS_ICONS32_PATH . '/' . basename($logoIcon))) { return false; } - $imageModule = imagecreatefrompng($imageBase); $imageIcon = imagecreatefrompng($iconFile); - // Write text $text_color = imagecolorallocate($imageModule, 0, 0, 0); $space_to_border = (92 - strlen($moduleDirname) * 7.5) / 2; imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $text_color, $font, ucfirst($moduleDirname), array()); - imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32); - $targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleDirname . "_logo.png"; - //$targetImage = "/uploads/" . $dirname . "/images/repository/" . $moduleDirname . "_logo.png"; - imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage ); - imagedestroy($imageModule); imagedestroy($imageIcon); - + return XOOPS_URL.$targetImage; } } \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/common.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/common.php 2015-04-24 17:26:17 UTC (rev 13041) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/common.php 2015-04-24 22:03:15 UTC (rev 13042) @@ -20,6 +20,8 @@ */ defined('XOOPS_ROOT_PATH') or die('Restricted access'); $dirname = $GLOBALS['xoopsModule']->getVar('dirname'); +// Root Frameworks icons 32x32 directory +define('XOOPS_ICONS32_PATH', XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32' ); // Local Directories define('TDMC_PATH', XOOPS_ROOT_PATH . '/modules/' . $dirname ); define('TDMC_URL', XOOPS_URL . '/modules/' . $dirname ); @@ -38,8 +40,8 @@ define('TDMC_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $dirname ); define('TDMC_UPLOAD_REPOSITORY_PATH', TDMC_UPLOAD_PATH . '/repository' ); define('TDMC_UPLOAD_REPOSITORY_URL', TDMC_UPLOAD_URL . '/repository' ); -define('TDMC_UPLOAD_IMGMOD_PATH', TDMC_UPLOAD_PATH . '/images/repository' ); -define('TDMC_UPLOAD_IMGMOD_URL', TDMC_UPLOAD_URL . '/images/repository' ); +define('TDMC_UPLOAD_IMGMOD_PATH', TDMC_UPLOAD_PATH . '/images/modules' ); +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' ); // Xoops Request |
From: <txm...@us...> - 2015-04-26 12:17:59
|
Revision: 13043 http://sourceforge.net/p/xoops/svn/13043 Author: txmodxoops Date: 2015-04-26 12:17:46 +0000 (Sun, 26 Apr 2015) Log Message: ----------- Sortable tables for order menu and icons in admin index.php Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/admin/style.css XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminHeader.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/modules.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/tables.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/common.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/admin.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/xoops_version.php Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/VeraBd.ttf XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/green.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/red.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/xcvLogo.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js Removed Paths: ------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/brokenlink.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/category.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/download.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/plugin.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/stats.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logo.png Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -25,6 +25,7 @@ $fieldMid = XoopsRequest::getInt('field_mid'); $fieldTid = XoopsRequest::getInt('field_tid'); $fieldNumb = XoopsRequest::getInt('field_numb'); +$fieldOrder = XoopsRequest::getInt('field_order'); $fieldName = XoopsRequest::getString('field_name', ''); // switch op switch ($op) @@ -37,7 +38,7 @@ $template_main = 'tdmcreate_fields.tpl'; $GLOBALS['xoTheme']->addStylesheet( 'modules/tdmcreate/assets/css/admin/style.css' ); $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js'); - $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/fields.js'); + $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/sortable.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()); @@ -54,30 +55,35 @@ } unset($countModules); // Redirect if there aren't tables - $countTables = $tdmcreate->getHandler('tables')->getCount(); + $handlerTables = $tdmcreate->getHandler('tables'); + $countTables = $handlerTables->getCount(); if ($countTables == 0) { redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES ); } unset($countTables); // Get the list of tables $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('table_mid', $handlerTables->getVar('table_mid'))); $criteria->setStart($start); $criteria->setLimit($limit); - $criteria->setSort('table_id ASC, table_name'); + $criteria->setSort('table_id ASC, table_order ASC, table_name'); $criteria->setOrder('ASC'); $countTables = $tdmcreate->getHandler('tables')->getCount($criteria); $tablesAll = $tdmcreate->getHandler('tables')->getAll($criteria); unset($criteria); if ($countTables > 0) { + $tlid = 1; foreach (array_keys($tablesAll) as $tid) { // Display tables list - $table['id'] = $tid; + $table['id'] = $tid; + $table['lid'] = $tlid; $table['mid'] = $tablesAll[$tid]->getVar('table_mid'); $table['name'] = ucfirst($tablesAll[$tid]->getVar('table_name')); $table['image'] = $tablesAll[$tid]->getVar('table_image'); $table['nbfields'] = $tablesAll[$tid]->getVar('table_nbfields'); + $table['order'] = $tablesAll[$tid]->getVar('table_order'); $table['autoincrement'] = $tablesAll[$tid]->getVar('table_autoincrement'); $table['blocks'] = $tablesAll[$tid]->getVar('table_blocks'); $table['admin'] = $tablesAll[$tid]->getVar('table_admin'); @@ -87,7 +93,7 @@ $criteria = new CriteriaCompo(); $criteria->add(new Criteria('field_mid', $table['mid'])); $criteria->add(new Criteria('field_tid', $tid)); - $criteria->setSort('field_id ASC, field_name'); + $criteria->setSort('field_order ASC, field_id ASC, field_name'); $criteria->setOrder('ASC'); $countFields = $tdmcreate->getHandler('fields')->getCount($criteria); $fieldsAll = $tdmcreate->getHandler('fields')->getObjects($criteria); @@ -114,14 +120,16 @@ $field['required'] = $fieldsAll[$fid]->getVar('field_required'); $fields[] = $field; unset($field); - $lid++; + $lid++; } } + $tlid++; unset($lid); $table['fields'] = $fields; $GLOBALS['xoopsTpl']->append('tables_list', $table); unset($table); } + unset($tlid); unset($fields); if ( $countTables > $limit ) { include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; @@ -137,7 +145,6 @@ // Define main template $template_main = 'tdmcreate_fields.tpl'; $GLOBALS['xoTheme']->addStylesheet( 'modules/tdmcreate/assets/css/admin/style.css' ); - $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/fields.js'); $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php')); $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list'); $adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list'); @@ -156,7 +163,6 @@ $fieldId = XoopsRequest::getInt('field_id'); // Fields Handler $fields = $tdmcreate->getHandler('fields'); - $orderId = 1; // Set Variables foreach($_POST['field_id'] as $key => $value) { @@ -164,13 +170,14 @@ $fieldsObj =& $fields->get($value); } else { $fieldsObj =& $fields->create(); - } + } + $order = $fieldsObj->isNew() ? $fieldOrder + 1 : $fieldOrder; if (isset($fieldMid) && isset($fieldTid) && !empty($_POST['field_name'][$key])) { // Set Data $fieldsObj->setVar( 'field_mid', $fieldMid ); $fieldsObj->setVar( 'field_tid', $fieldTid ); $fieldsObj->setVar( 'field_numb', $fieldNumb ); - $fieldsObj->setVar( 'field_order', (isset($_POST['field_order'][$key]) ? $_POST['field_order'][$key] : $orderId) ); + $fieldsObj->setVar( 'field_order', (isset($_POST['field_order'][$key]) ? $_POST['field_order'][$key] : $order) ); $fieldsObj->setVar( 'field_name', (!empty($_POST['field_name'][$key]) ? $_POST['field_name'][$key] : '') ); $fieldsObj->setVar( 'field_type', (!empty($_POST['field_type'][$key]) ? $_POST['field_type'][$key] : '') ); $fieldsObj->setVar( 'field_value', (!empty($_POST['field_value'][$key]) ? $_POST['field_value'][$key] : '') ); @@ -236,7 +243,7 @@ break; case 'order': - foreach($_REQUEST['field_id'] as $order => $id) { + foreach($_REQUEST['field_order'] as $order => $id) { if( $order > 0 ) { $fieldsObj = $tdmcreate->getHandler('fields')->get( $id ); $fieldsObj->setVar('field_order', $order); @@ -267,7 +274,7 @@ // $fields = $tdmcreate->getHandler('fields'); // Fields Handler - foreach($_REQUEST['field_id'] as $key => $value) + foreach($_POST['field_id'] as $key => $value) { $fieldsObj =& $fields->get($value); $fieldsObj->setVar( 'field_parent', ((isset($_REQUEST['field_parent'][$key]) == 1) ? 1 : 0) ); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -28,6 +28,7 @@ $tableMid = XoopsRequest::getInt('table_mid'); $tableName = XoopsRequest::getInt('table_name'); $tableNumbFields = XoopsRequest::getInt('table_nbfields'); +$tableOrder = XoopsRequest::getInt('table_order'); $tableFieldname = XoopsRequest::getString('table_fieldname', ''); // switch ($op) @@ -40,6 +41,7 @@ $template_main = 'tdmcreate_tables.tpl'; $GLOBALS['xoTheme']->addStylesheet( 'modules/tdmcreate/assets/css/admin/style.css' ); $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js'); + $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/sortable.js'); $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('tables.php')); $adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add'); $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton()); @@ -88,7 +90,7 @@ // Get the list of tables $criteria = new CriteriaCompo(); $criteria->add(new Criteria('table_mid', $i)); - $criteria->setSort('table_id ASC, table_name'); + $criteria->setSort('table_order ASC, table_id ASC, table_name'); $criteria->setOrder('ASC'); $numbTables = $tdmcreate->getHandler('tables')->getCount($criteria); $tables_arr = $tdmcreate->getHandler('tables')->getAll($criteria); @@ -105,7 +107,8 @@ $table['mid'] = $tables_arr[$t]->getVar('table_mid'); $table['name'] = ucfirst($tables_arr[$t]->getVar('table_name')); $table['image'] = $tables_arr[$t]->getVar('table_image'); - $table['nbfields'] = $tables_arr[$t]->getVar('table_nbfields'); + $table['nbfields'] = $tables_arr[$t]->getVar('table_nbfields'); + $table['order'] = $tables_arr[$t]->getVar('table_order'); $table['blocks'] = $tables_arr[$t]->getVar('table_blocks'); $table['admin'] = $tables_arr[$t]->getVar('table_admin'); $table['user'] = $tables_arr[$t]->getVar('table_user'); @@ -171,12 +174,14 @@ $tablesObj =& $tables->get($tableId); } else { $tablesObj =& $tables->create(); - } + } + $order = $tablesObj->isNew() ? $tableOrder + 1 : $tableOrder; // Form save tables $tablesObj->setVars(array('table_mid' => $tableMid, 'table_name' => $_POST['table_name'], 'table_category' => (($_REQUEST['table_category'] == 1) ? '1' : '0'), - 'table_nbfields' => $tableNumbFields, + 'table_nbfields' => $tableNumbFields, + 'table_order' => $order, 'table_fieldname' => $tableFieldname)); //Form table_image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; @@ -248,6 +253,18 @@ $form = $tablesObj->getForm(); $GLOBALS['xoopsTpl']->assign('form', $form->render()); break; + + case 'order': + foreach($_POST['table_order'] as $order => $id) { + if( $order > 0 ) { + $tablesObj = $tdmcreate->getHandler('tables')->get( $id ); + $tablesObj->setVar('table_order', $order); + if (!$tdmcreate->getHandler('tables')->insert( $tablesObj )) { + redirect_header('tables.php', 5, _AM_TDMCREATE_FIELD_ORDER_ERROR); + } + } + } + break; case 'delete': $tablesObj =& $tdmcreate->getHandler('tables')->get($tableId); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/admin/style.css =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/admin/style.css 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/admin/style.css 2015-04-26 12:17:46 UTC (rev 13043) @@ -28,7 +28,7 @@ table { margin: 0; padding: 0; } -/* Sortable tables */ +/* Sortable tables & fields */ tbody tr.sortable td img.move { cursor: move; } @@ -137,8 +137,81 @@ background-color: #efefef; } -.field-list tr { margin: 0; padding: 0; /*list-style: none;*/ } +.table-list tr { margin: 0; padding: 0; } +.table-list tr td { display: block; } + +.table-list tr td img.move { + margin-right: 20px; + cursor: move; + vertical-align: middle; +} +.table-list tr td strong { + vertical-align: middle; +} + +tbody.table-list tr td { + text-align: center; +} + +tbody.table-list tr td { + text-align: center; +} + +.cell.cell-width1 { + width: 4%; +} + +.cell.cell-width2 { + width: 10%; +} + +.cell.cell-width3 { + width: 8%; +} + +.cell.cell-width4 { + width: 5%; +} + +.cell.cell-width5 { + width: 5%; +} + +.cell.cell-width6 { + width: 4%; +} + +.cell.cell-width7 { + width: 5%; +} + +.cell.cell-width8 { + width: 8%; +} + +.cell.cell-width9 { + width: 6%; +} + +.cell.cell-width10 { + width: 8%; +} + +.cell.cell-width11 { + width: 9%; +} + +.cell.cell-width12 { + width: 9%; +} + +.cell.cell-width13 { + width: 5%; +} + +.field-list tr { margin: 0; padding: 0; } + .field-list tr td { display: block; } .field-list tr td { Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/VeraBd.ttf =================================================================== (Binary files differ) Index: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/VeraBd.ttf =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/VeraBd.ttf 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/VeraBd.ttf 2015-04-26 12:17:46 UTC (rev 13043) Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/VeraBd.ttf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/green.png =================================================================== (Binary files differ) Index: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/green.png =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/green.png 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/green.png 2015-04-26 12:17:46 UTC (rev 13043) Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/green.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/index.html =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/index.html (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/index.html 2015-04-26 12:17:46 UTC (rev 13043) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/red.png =================================================================== (Binary files differ) Index: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/red.png =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/red.png 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/red.png 2015-04-26 12:17:46 UTC (rev 13043) Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/red.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/xcvLogo.txt =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/xcvLogo.txt (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/fonts/xcvLogo.txt 2015-04-26 12:17:46 UTC (rev 13043) @@ -0,0 +1 @@ +display:table-cell; vertical-align:middle; \ No newline at end of file Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/brokenlink.png =================================================================== (Binary files differ) Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/category.png =================================================================== (Binary files differ) Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/download.png =================================================================== (Binary files differ) Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/plugin.png =================================================================== (Binary files differ) Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/icons/32/stats.png =================================================================== (Binary files differ) Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logo.png =================================================================== (Binary files differ) Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js 2015-04-26 12:17:46 UTC (rev 13043) @@ -31,7 +31,7 @@ moduleImageSelected = moduleImageDom.options[moduleImageDom.selectedIndex].value; $.ajax({ type:'GET', - url:xoopsUrl + "/modules/tdmcreate/class/logoGenerator.php?f=phpFunction&iconName=" + iconName + "&caption=" + caption, + url:xoopsUrl + "/class/logoGenerator.php?f=phpFunction&iconName=" + iconName + "&caption=" + caption, // call php function , phpFunction=function Name , x= parameter data:{}, dataType:"html", @@ -48,8 +48,8 @@ fileExist=true;} } if (null == fileExist){ - var opt = document.createElement("option"); - document.getElementById("mod_image").options.add(opt); + var opt = document.createElement('option'); + document.getElementById('mod_image').options.add(opt); opt.text = mycheck; opt.value = mycheck; } Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js 2015-04-26 12:17:46 UTC (rev 13043) @@ -0,0 +1,43 @@ +// Jquery function for order fields +// When the page is loaded define the current order and items to reorder +/* Call the container items to reorder tables */ +$(document).ready(function() { + $('.table-list').sortable({ + opacity: 0.6, + handle : '.move', + cursor: 'move', + update: function() { + var order = $(this).sortable('serialize') + '&op=order'; + $('#info').load('tables.php'); + $.post('tables.php', order, function(response) { + $('#message').html(response); + }); + } + }); +}); +/* Call the container items to reorder fields */ +$(document).ready(function() { + $('.field-list').sortable({ + opacity: 0.6, + handle : '.move', + cursor: 'move', + update: function() { + var order = $(this).sortable('serialize') + '&op=order'; + $('#info').load('fields.php'); + $.post('fields.php', order, function(response) { + $('#message').html(response); + }); + } + }); +}); +/* +$(document).ready(function() { + $('.field-list').sortable({ // definisco il contenitore di elementi da riordinare + handle : '.move', // definisco con la classe .move quali sono gli elementi trascinabili + update : function () { // aggiorno l'ordine ed eseguo una callback + // salvo una variabile che contiene l'array con il nuovo ordine degli elementi + var order = $('.field-list').sortable('serialize') + '&op=order'; + $("#info").load('fields.php'); + } + }); +});*/ \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/TDMCreateArchitecture.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -292,7 +292,7 @@ if( $module->getVar('mod_admin') == 1 ) { // Admin Header File $adminHeader = AdminHeader::getInstance(); - $adminHeader->write($module, $table, $tables, 'header.php'); + $adminHeader->write($module, $table, 'header.php'); $ret[] = $adminHeader->render(); // Admin Index File $adminIndex = AdminIndex::getInstance(); @@ -351,7 +351,7 @@ $languageBlocks->write($module, $tables, 'blocks.php'); $ret[] = $languageBlocks->render(); } - // Creation of admin permission file + // Creation of admin permission files if ( $table->getVar('table_permissions') == 1 ) { // Admin Permissions File $adminPermissions = AdminPermissions::getInstance(); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminHeader.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminHeader.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminHeader.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -48,26 +48,19 @@ * @param array $tables * @param string $filename */ - public function write($module, $table, $tables, $filename) { + public function write($module, $table, $filename) { $this->setModule($module); $this->setTable($table); - $this->setTables($tables); $this->setFileName($filename); } /* - * @public function render - * @param null + * @private function getAdminPagesHeader + * @param string $moduleDirname + * @param string $tableName */ - public function render() { - $module = $this->getModule(); - $table = $this->getTable(); - $tables = $this->getTables(); - $filename = $this->getFileName(); - $moduleDirname = $module->getVar('mod_dirname'); - $ucfModuleDirname = ucfirst($moduleDirname); - $language = $this->getLanguage('AM'); - $content = $this->getHeaderFilesComments($module, $filename); - $content .= <<<EOT + private function getAdminHeader($moduleDirname, $table) { + $ucfModuleDirname = ucfirst($moduleDirname); + $ret = <<<EOT \nrequire_once dirname(dirname(dirname(dirname(__FILE__)))). '/include/cp_header.php'; \$thisPath = dirname(dirname(__FILE__)); include_once \$thisPath.'/include/common.php'; @@ -80,21 +73,13 @@ EOT; if (is_object($table)) { if ( $table->getVar('table_name') != '' ) { - $content .= <<<EOT + $ret .= <<<EOT // Get instance of module \${$moduleDirname} = {$ucfModuleDirname}Helper::getInstance();\n EOT; } - foreach (array_keys($tables) as $t) - { - $tableName = $tables[$t]->getVar('table_name'); - $content .= <<<EOT -// {$tableName} -\${$tableName}Handler =& \${$moduleDirname}->getHandler('{$tableName}');\n -EOT; - } } - $content .=<<<EOT + $ret .= <<<EOT // \$myts =& MyTextSanitizer::getInstance(); if (!isset(\$xoopsTpl) || !is_object(\$xoopsTpl)) { @@ -120,6 +105,20 @@ xoops_cp_header(); \$adminMenu = new ModuleAdmin(); EOT; + return $ret; + } + /* + * @public function render + * @param null + */ + public function render() { + $module = $this->getModule(); + $table = $this->getTable(); + $filename = $this->getFileName(); + $moduleDirname = $module->getVar('mod_dirname'); + $content = $this->getHeaderFilesComments($module, $filename); + $content .= $this->getAdminHeader($moduleDirname, $table); + $this->tdmcfile->create($moduleDirname, 'admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); return $this->tdmcfile->renderFile(); } Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/files/admin/AdminPages.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -62,13 +62,15 @@ * @param string $tableName */ public function getAdminPagesHeader($moduleDirname, $table, $fpif) { - + $ucfModuleDirname = ucfirst($moduleDirname); $ret = <<<EOT include_once 'header.php'; //It recovered the value of argument op in URL$ \$op = XoopsRequest::getString('op', 'list'); // Request {$fpif} \${$fpif} = XoopsRequest::getInt('{$fpif}'); +// Get instance of module +\${$moduleDirname} = {$ucfModuleDirname}Helper::getInstance();\n // Switch options switch (\$op) {\n Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/logoGenerator.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -18,8 +18,8 @@ * @author Xoops Team Developement Modules - http://www.xoops.org * @version $Id: logoGenerator.php 12258 2014-01-02 09:33:29Z timgno $ */ -include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -//include_once XOOPS_ROOT_PATH . '/modules/TDMCreate/include/common.php'; +/*include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +include_once XOOPS_ROOT_PATH . '/modules/tdmcreate/include/common.php'; if(function_exists($_GET['f'])) { // get function name and parameter $_GET['f']($_GET["p"]); include_once 'logoGenerator.php'; @@ -48,23 +48,90 @@ } } } - if (!file_exists($imageBase = TDMC_IMAGE_LOGOS_PATH . "/xoops2.png") || - !file_exists($font = TDMC_IMAGE_LOGOS_PATH . "/VeraBd.ttf") || + if (!file_exists($imageBase = TDMC_IMAGE_LOGOS_PATH . "/empty.png") || + !file_exists($font = TDMC_FONTS_PATH . "/VeraBd.ttf") || !file_exists($iconFile = XOOPS_ICONS32_PATH . '/' . basename($logoIcon))) { return false; } $imageModule = imagecreatefrompng($imageBase); $imageIcon = imagecreatefrompng($iconFile); // Write text + $textColor = imagecolorallocate($imageModule, 0, 0, 0); + $spaceBorder = (92 - strlen($moduleDirname) * 7.5) / 2; + imagefttext($imageModule, 8.5, 0, $spaceBorder, 45, $textColor, $font, ucfirst($moduleDirname), array()); + imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32); + $targetImagePath = TDMC_UPLOAD_IMGMOD_PATH . "/" . $moduleDirname . "_logo.png"; + $targetImageUrl = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleDirname . "_logo.png"; + imagepng($imageModule, $targetImagePath ); + imagedestroy($imageModule); + imagedestroy($imageIcon); + + return $targetImageUrl; + } +}*/ +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +//include_once XOOPS_ROOT_PATH . '/modules/TDMCreate/include/common.php'; + +if(function_exists($_GET['f'])) { // get function name and parameter $_GET['f']($_GET["p"]); + include_once 'logoGenerator.php'; + $ret = logoGenerator::createLogo($_GET['iconName'], $_GET['caption']); + phpFunction($ret); +} else { + echo 'Method Not Exist'; +} + +function phpFunction($val='') +{ // create php function here + echo $val; +} + +class logoGenerator +{ + static function createLogo($logoIcon, $moduleDirname) + { + if (!extension_loaded("gd")) { + return false; + } else { + $required_functions = array("imagecreatefrompng", "imagefttext", "imagecopy", "imagepng", "imagedestroy", "imagecolorallocate"); + foreach ($required_functions as $func) { + if (!function_exists($func)) { + return false; + } + } + } + + $dirname = 'tdmcreate'; + $iconFileName = XOOPS_ROOT_PATH . "/Frameworks/moduleclasses/icons/32/".basename($logoIcon); + + //$dirFonts = TDMC_PATH . "/assets/fonts"; + //$dirLogos = TDMC_PATH . "/assets/images/logos"; + $dirFonts = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/fonts"; + $dirLogos = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/logos"; + + if (!file_exists($imageBase = $dirLogos . "/empty.png") || + !file_exists($font = $dirFonts . "/VeraBd.ttf") || + !file_exists($iconFile = $iconFileName)) { + return false; + } + + $imageModule = imagecreatefrompng($imageBase); + $imageIcon = imagecreatefrompng($iconFile); + + // Write text $text_color = imagecolorallocate($imageModule, 0, 0, 0); $space_to_border = (92 - strlen($moduleDirname) * 7.5) / 2; imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $text_color, $font, ucfirst($moduleDirname), array()); + imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32); - $targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleDirname . "_logo.png"; + + //$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleDirname . "_logo.png"; + $targetImage = "/uploads/" . $dirname . "/images/modules/" . $moduleDirname . "_logo.png"; + imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage ); + imagedestroy($imageModule); imagedestroy($imageIcon); - + return XOOPS_URL.$targetImage; } } \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/modules.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/modules.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -18,7 +18,7 @@ * @since 2.5.x * @author TDM TEAM DEV MODULE * @version $Id: modules.php 12209 2013-10-23 02:49:09Z beckmi $ - * @version $Id: modules.php 12400 2014-02-13 10:22:12Z timgno $ + * @version $Id: modules.php 13040 2015-04-25 15:12:12Z timgno $ */ defined('XOOPS_ROOT_PATH') or die('Restricted access'); @@ -122,7 +122,7 @@ $isNew = $this->isNew(); $title = $isNew ? sprintf(_AM_TDMCREATE_MODULE_NEW) : sprintf(_AM_TDMCREATE_MODULE_EDIT); // - include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); + include_once(XOOPS_ROOT_PATH.'/class/xoopsformloader.php'); // $form = new XoopsThemeForm($title, 'modulesform', $action, 'post', true); $form->setExtra('enctype="multipart/form-data"'); @@ -209,7 +209,7 @@ $this_image = $this->getVar('mod_image'); $mod_image = $this_image ? $this_image : 'empty.png'; // - $uploadirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/repository'; + $uploadirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/modules'; $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULE_IMAGE, '<br />'); $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './' . strtolower($uploadirectory) . '/'); $imageselect= new XoopsFormSelect($imgpath, 'mod_image', $mod_image); @@ -247,7 +247,7 @@ $createLogoTray -> addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$uploadirectory."/".$tables_img."' name='image4' id='image4' alt='' />" ) ); // Create preview and submit buttons $buttonLogoGenerator4= new XoopsFormButton('', 'button4', _AM_TDMCREATE_MODULE_CREATENEWLOGO, 'button'); - $buttonLogoGenerator4->setExtra("onclick='createNewModuleLogo(\"" . XOOPS_URL . "\")'"); + $buttonLogoGenerator4->setExtra("onclick='createNewModuleLogo(\"" . TDMC_URL . "\")'"); $createLogoTray->addElement($buttonLogoGenerator4); // $form->addElement($createLogoTray); @@ -299,51 +299,38 @@ /* * @private static function createLogo * @param mixed $logoIcon - * @param string $moduleName + * @param string $moduleDirname */ - private static function createLogo($logoIcon, $moduleName) + private static function createLogo($logoIcon, $moduleDirname) { - global $pathIcon32; - - if (!extension_loaded("gd")) { + if (!extension_loaded('gd')) { return false; } else { - $required_functions = array("imagecreatefrompng", "imagefttext", "imagecopy", "imagepng", "imagedestroy", "imagecolorallocate"); - foreach ($required_functions as $func) { + $requiredFunctions = array('imagecreatefrompng', 'imagefttext', 'imagecopy', 'imagepng', 'imagedestroy', 'imagecolorallocate'); + foreach ($requiredFunctions as $func) { if (!function_exists($func)) { return false; } } } - - // $dirname = $GLOBALS['xoopsModule']->dirname(); - $iconFileName = $pathIcon32 . '/' . basename($logoIcon); - - $dirlogos = TDMC_PATH . "/images/logos"; - if (!file_exists($imageBase = $dirlogos . "/empty.png") || - !file_exists($font = $dirlogos . "/VeraBd.ttf") || - !file_exists($iconFile = $iconFileName)) { + if (!file_exists($imageBase = TDMC_IMAGE_LOGOS_PATH . '/empty.png') || + !file_exists($font = TDMC_FONTS_PATH . '/VeraBd.ttf') || + !file_exists($iconFile = XOOPS_ICONS32_PATH . '/' . basename($logoIcon))) { return false; } - $imageModule = imagecreatefrompng($imageBase); $imageIcon = imagecreatefrompng($iconFile); - // Write text - $text_color = imagecolorallocate($imageModule, 0, 0, 0); - $space_to_border = (92 - strlen($moduleName) * 7.5) / 2; - imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $text_color, $font, ucfirst($moduleName), array()); - + $textColor = imagecolorallocate($imageModule, 0, 0, 0); + $spaceBorder = (92 - strlen($moduleDirname) * 7.5) / 2; + imagefttext($imageModule, 8.5, 0, $spaceBorder, 45, $textColor, $font, ucfirst($moduleDirname), array()); imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32); - - $targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleName . "_logo.png"; - - imagepng($imageModule, $targetImage ); - + $logoImg = '/' . $moduleDirname . '_logo.png'; + imagepng($imageModule, TDMC_UPLOAD_IMGMOD_PATH . $logoImg ); imagedestroy($imageModule); imagedestroy($imageIcon); - return XOOPS_URL . $targetImage; + return TDMC_UPLOAD_IMGMOD_URL . $logoImg; } } /* Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/tables.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/tables.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -45,6 +45,7 @@ $this->initVar('table_name',XOBJ_DTYPE_TXTBOX); $this->initVar('table_fieldname',XOBJ_DTYPE_TXTBOX); $this->initVar('table_nbfields',XOBJ_DTYPE_INT); + $this->initVar('table_order',XOBJ_DTYPE_INT); $this->initVar('table_image',XOBJ_DTYPE_TXTBOX); $this->initVar('table_autoincrement',XOBJ_DTYPE_INT); $this->initVar('table_blocks',XOBJ_DTYPE_INT); @@ -141,8 +142,14 @@ // $table_nbfield = new XoopsFormText(_AM_TDMCREATE_TABLE_NBFIELDS, 'table_nbfields', 10, 25, $this->getVar('table_nbfields')); $table_nbfield->setDescription(_AM_TDMCREATE_TABLE_NBFIELDS_DESC); - $form->addElement($table_nbfield, true); + $form->addElement($table_nbfield, true); // + if(!$isNew) { + $table_order = new XoopsFormText(_AM_TDMCREATE_TABLE_ORDER, 'table_order', 5, 10, $this->getVar('table_order')); + $table_order->setDescription(_AM_TDMCREATE_TABLE_ORDER_DESC); + $form->addElement($table_order, true); + } + // $get_table_image = $this->getVar('table_image'); $table_image = $get_table_image ? $get_table_image : 'blank.gif'; $iconsdir = '/Frameworks/moduleclasses/icons/32'; @@ -163,6 +170,7 @@ $fileseltray1->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD , 'attachedfile', $this->tdmcreate->getConfig('maxsize'))); $fileseltray1->addElement(new XoopsFormLabel('')); $imgtray1->addElement($fileseltray1); + $imgtray1->setDescription(_AM_TDMCREATE_TABLE_IMAGE_DESC); $form->addElement($imgtray1); // $table_autoincrement = $this->isNew() ? 1 : $this->getVar('table_autoincrement'); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/common.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/common.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/include/common.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -29,6 +29,8 @@ define('TDMC_CLASSES_URL', TDMC_URL . '/class' ); define('TDMC_DOCS_PATH', TDMC_PATH . '/docs' ); define('TDMC_DOCS_URL', TDMC_URL . '/docs' ); +define('TDMC_FONTS_PATH', TDMC_PATH . '/assets/fonts' ); +define('TDMC_FONTS_URL', TDMC_URL . '/assets/fonts' ); define('TDMC_IMAGE_PATH', TDMC_PATH . '/assets/images' ); define('TDMC_IMAGE_URL', TDMC_URL . '/assets/images' ); define('TDMC_IMAGE_LOGOS_PATH', TDMC_PATH . '/assets/images/logos' ); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/admin.php 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/admin.php 2015-04-26 12:17:46 UTC (rev 13043) @@ -140,11 +140,14 @@ define('_AM_TDMCREATE_TABLE_CATEGORY_DESC', "<b class='red bold'>WARNING</b>: <i>Once you have used this option for this module, and edit this table,<br />will not be displayed following the creation of other tables</i>"); define('_AM_TDMCREATE_TABLE_NBFIELDS', "Number fields"); define('_AM_TDMCREATE_TABLE_NBFIELDS_DESC', "Number of fields for this table"); +define('_AM_TDMCREATE_TABLE_ORDER', "Order tables"); +define('_AM_TDMCREATE_TABLE_ORDER_DESC', "You should order the tables to view them in the right ordered on the menu and index page of your new module"); define('_AM_TDMCREATE_TABLE_FIELDNAME', "Prefix Field Name"); define('_AM_TDMCREATE_TABLE_FIELDNAME_DESC', "This is the prefix of field name (optional)<br />If you leave the field blank, doesn't appear anything in the fields of the next screen,<br />otherwise you'll see all the fields with a prefix type (i.e.: <span class='bold'>cat</span> of table <span class='bold'>categories</span>).<br /><b class='red bold'>WARNING</b>: It's recommended to use singolar word"); -define('_AM_TDMCREATE_TABLE_OPTIONS_CHECKS_DESC', "For each table created, a file is created on behalf of this.<br /> +define('_AM_TDMCREATE_TABLE_OPTIONS_CHECKS_DESC', "For each table created, a file is created on behalf of this.<br /> Selecting one or more of these options, deciding whether to enter the name of the file to other files or you define a condition in these other files, need to be created or not."); define('_AM_TDMCREATE_TABLE_IMAGE', "Table Logo"); +//define('_AM_TDMCREATE_TABLE_IMAGE_DESC', "You can choose an image from the list, or upload a new one from your computer"); // Added in version 1.91 define('_AM_TDMCREATE_TABLE_AUTO_INCREMENT', " Auto Increment"); define('_AM_TDMCREATE_TABLE_AUTO_INCREMENT_OPTION', "Default checked"); @@ -172,7 +175,7 @@ define('_AM_TDMCREATE_TABLE_SINGLE', "Add in Single file"); define('_AM_TDMCREATE_TABLE_VISIT', "Add in Visit file"); // v1.38 -define('_AM_TDMCREATE_TABLE_IMAGE_DESC', "<span class='red bold'>WARNING</span>: If you want to choose a new image, is best to name it with the module name before and follow with the name of the image so as not to overwrite any images with the same name, in the <span class='bold'>Frameworks/moduleclasses/moduleadmin/icons/32/</span>. Otherwise an other solution, would be to insert the images in the module, a new folder is created, with the creation of the same module - <span class='bold'>images/32</span>."); +define('_AM_TDMCREATE_TABLE_IMAGE_DESC', "<span class='red bold'>WARNING</span>: If you want to choose a new image, is best to name it with the module name before and follow with the name of the image so as not to overwrite any images with the same name, in the <span class='bold'>Frameworks/moduleclasses/moduleadmin/icons/32/</span>. Otherwise an other solution, would be to insert the images in the module, a new folder is created, with the creation of the same module - <span class='bold'>assets/icons/32</span>."); define('_AM_TDMCREATE_TABLE_FORM_CREATED_OK', "The table <b class='green'>%s</b> is successfully created"); define('_AM_TDMCREATE_TABLE_FORM_UPDATED_OK', "The table <b class='green'>%s</b> is successfully updated"); // ------------------ Form Fields ------------------ Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl 2015-04-26 12:17:46 UTC (rev 13043) @@ -23,12 +23,12 @@ </thead> <tbody> <{foreach item=table from=$tables_list}> - <tr id="table<{$table.id}>" class="fields toggleMain"> - <td class='center bold width5'>(<{$table.id}>) + <tr id="table_<{$table.id}>" order="<{$table.order}>" class="fields toggleMain"> + <td class='center bold width5'>(<{$table.lid}>) <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="<{xoModuleIcons32}><{$table.image}>" alt="<{$table.name}>" height="22" /></td> + <td class='center'><img src="<{xoModuleIcons32}><{$table.image}>" title="<{$table.name}>" alt="<{$table.name}>" /></td> <td class='center bold'><{$table.nbfields}></td> <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl 2015-04-26 12:17:46 UTC (rev 13043) @@ -1,34 +1,34 @@ <table class='width100'> - <tbody class="field-list"> - <{foreach item=field from=$table.fields}> - <{if $field.id > 0}> - <tr id="fieldItem_<{$table.id}>_<{$field.id}>" order="<{$field.order}>" class="<{cycle values='even,odd'}>"> - <td class='center width5'>[<{$field.lid}>] <img class="move" src="<{$modPathIcon16}>/drag.png" alt="<{$field.name}>" /></td> - <td class='center width10'><{$field.name}></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'><img id="loading_img_parent<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_parent<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_parent: <{if $field.parent}>0<{else}>1<{/if}> }, 'img_parent<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.parent}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> - </td> - <td class='center'><img id="loading_img_inlist<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_inlist<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_inlist: <{if $field.inlist}>0<{else}>1<{/if}> }, 'img_inlist<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.inlist}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> - </td> - <td class='center'><img id="loading_img_inform<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_inform<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_inform: <{if $field.inform}>0<{else}>1<{/if}> }, 'img_inform<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.inform}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> - </td> - <td class='center'><img id="loading_img_admin<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_admin<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_admin: <{if $field.admin}>0<{else}>1<{/if}> }, 'img_admin<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> - </td> - <td class='center'><img id="loading_img_user<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_user<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_user: <{if $field.user}>0<{else}>1<{/if}> }, 'img_user<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> - </td> - <td class='center'><img id="loading_img_block<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_block<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_block: <{if $field.block}>0<{else}>1<{/if}> }, 'img_block<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.block}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> - </td> - <td class='center'><img id="loading_img_main<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_main<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_main: <{if $field.main}>0<{else}>1<{/if}> }, 'img_main<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.main}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> - </td> - <td class='center'><img id="loading_img_search<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_search<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_search: <{if $field.search}>0<{else}>1<{/if}> }, 'img_search<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> - </td> - <td class='center width10'> - <img id="loading_img_required<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_required<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_required: <{if $field.required}>0<{else}>1<{/if}> }, 'img_required<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.required}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> - </td> - <td class='center width5'><img src="<{$modPathIcon16}>/left_right.png" alt="Empty" /></td> - </tr> - <{/if}> - <{/foreach}> - </tbody> + <tbody class="field-list"> + <{foreach item=field from=$table.fields}> + <{if $field.id > 0}> + <tr id="field_<{$table.id}>_<{$field.id}>" order="<{$field.order}>" class="<{cycle values='even,odd'}>"> + <td class='center width5'>[<{$field.lid}>] <img class="move" src="<{$modPathIcon16}>/drag.png" alt="<{$field.name}>" /></td> + <td class='center width10'><{$field.name}></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'><img id="loading_img_parent<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_parent<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_parent: <{if $field.parent}>0<{else}>1<{/if}> }, 'img_parent<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.parent}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> + </td> + <td class='center'><img id="loading_img_inlist<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_inlist<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_inlist: <{if $field.inlist}>0<{else}>1<{/if}> }, 'img_inlist<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.inlist}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> + </td> + <td class='center'><img id="loading_img_inform<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_inform<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_inform: <{if $field.inform}>0<{else}>1<{/if}> }, 'img_inform<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.inform}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> + </td> + <td class='center'><img id="loading_img_admin<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_admin<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_admin: <{if $field.admin}>0<{else}>1<{/if}> }, 'img_admin<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> + </td> + <td class='center'><img id="loading_img_user<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_user<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_user: <{if $field.user}>0<{else}>1<{/if}> }, 'img_user<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> + </td> + <td class='center'><img id="loading_img_block<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_block<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_block: <{if $field.block}>0<{else}>1<{/if}> }, 'img_block<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.block}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> + </td> + <td class='center'><img id="loading_img_main<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_main<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_main: <{if $field.main}>0<{else}>1<{/if}> }, 'img_main<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.main}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> + </td> + <td class='center'><img id="loading_img_search<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_search<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_search: <{if $field.search}>0<{else}>1<{/if}> }, 'img_search<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> + </td> + <td class='center width10'> + <img id="loading_img_required<{$field.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_required<{$field.id}>" onclick="tdmcreate_setStatus( { op: 'display', field_id: <{$field.id}>, field_required: <{if $field.required}>0<{else}>1<{/if}> }, 'img_required<{$field.id}>', 'fields.php' )" src="<{xoModuleIcons16}><{$field.required}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$field.name}>" /> + </td> + <td class='center width5'><img src="<{$modPathIcon16}>/left_right.png" alt="Empty" /></td> + </tr> + <{/if}> + <{/foreach}> + </tbody> </table> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables.tpl =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables.tpl 2015-04-24 22:03:15 UTC (rev 13042) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables.tpl 2015-04-26 12:17:46 UTC (rev 13043) @@ -23,18 +23,18 @@ <tbody> <{foreach item=module from=$modules_list}> <tr id="module<{$module.id}>" class="tables toggleMain"> - <td class='center bold width5'>(<{$module.id}>) + <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}>" alt="" height="35" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" alt="16" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" alt="16" /></td> <td class='center'><img id="loading_img_admin<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_admin<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_admin: <{if $module.admin == 1}>0<{else}>1<{/if}> }, 'img_admin<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> </td> <td class='center'><img id="loading_img_user<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$s... [truncated message content] |
From: <txm...@us...> - 2015-04-26 16:14:16
|
Revision: 13046 http://sourceforge.net/p/xoops/svn/13046 Author: txmodxoops Date: 2015-04-26 16:14:14 +0000 (Sun, 26 Apr 2015) Log Message: ----------- Added Chechbox all controll Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/tables.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/admin.php Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/tables.php 2015-04-26 15:06:26 UTC (rev 13045) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/tables.php 2015-04-26 16:14:14 UTC (rev 13046) @@ -174,13 +174,19 @@ $form->addElement($imgtray1); // $table_autoincrement = $this->isNew() ? 1 : $this->getVar('table_autoincrement'); - $check_table_autoincrement = new XoopsFormCheckBox(_AM_TDMCREATE_TABLE_AUTO_INCREMENT, 'table_autoincrement', $table_autoincrement); + $check_table_autoincrement = new XoopsFormRadioYN(_AM_TDMCREATE_TABLE_AUTO_INCREMENT, 'table_autoincrement', $table_autoincrement); $check_table_autoincrement->setDescription(_AM_TDMCREATE_TABLE_AUTO_INCREMENT_DESC); - $check_table_autoincrement->addOption(1, _AM_TDMCREATE_TABLE_AUTO_INCREMENT_OPTION); + //$check_table_autoincrement->addOption(1, _AM_TDMCREATE_TABLE_AUTO_INCREMENT_OPTION); $form->addElement($check_table_autoincrement); // $options_tray = new XoopsFormElementTray(_OPTIONS, '<br />'); // + $table_checkbox_all = new XoopsFormCheckBox('', "tablebox", 1); + $table_checkbox_all->addOption('allbox', _AM_TDMCREATE_TABLE_ALL ); + $table_checkbox_all->setExtra(" onclick='xoopsCheckAll(\"tableform\", \"tablebox\");' "); + $table_checkbox_all->setClass('xo-checkall'); + $options_tray->addElement($table_checkbox_all); + // $table_blocks = $isNew ? 0 : $this->getVar('table_blocks'); $check_table_blocks = new XoopsFormCheckBox(' ', 'table_blocks', $table_blocks); $check_table_blocks->addOption(1, _AM_TDMCREATE_TABLE_BLOCKS); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/admin.php 2015-04-26 15:06:26 UTC (rev 13045) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/language/english/admin.php 2015-04-26 16:14:14 UTC (rev 13046) @@ -146,6 +146,7 @@ define('_AM_TDMCREATE_TABLE_FIELDNAME_DESC', "This is the prefix of field name (optional)<br />If you leave the field blank, doesn't appear anything in the fields of the next screen,<br />otherwise you'll see all the fields with a prefix type (i.e.: <span class='bold'>cat</span> of table <span class='bold'>categories</span>).<br /><b class='red bold'>WARNING</b>: It's recommended to use singolar word"); define('_AM_TDMCREATE_TABLE_OPTIONS_CHECKS_DESC', "For each table created, a file is created on behalf of this.<br /> Selecting one or more of these options, deciding whether to enter the name of the file to other files or you define a condition in these other files, need to be created or not."); +define('_AM_TDMCREATE_TABLE_ALL', "Check All"); define('_AM_TDMCREATE_TABLE_IMAGE', "Table Logo"); //define('_AM_TDMCREATE_TABLE_IMAGE_DESC', "You can choose an image from the list, or upload a new one from your computer"); // Added in version 1.91 |
From: <txm...@us...> - 2015-04-27 19:41:45
|
Revision: 13047 http://sourceforge.net/p/xoops/svn/13047 Author: txmodxoops Date: 2015-04-27 19:41:43 +0000 (Mon, 27 Apr 2015) Log Message: ----------- Updated Fixed bugs Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/admin/style.css XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables.tpl Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-26 16:14:14 UTC (rev 13046) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-27 19:41:43 UTC (rev 13047) @@ -243,9 +243,9 @@ break; case 'order': - foreach($_REQUEST['field_order'] as $order => $id) { + foreach($_POST['field_order'] as $order => $value) { if( $order > 0 ) { - $fieldsObj = $tdmcreate->getHandler('fields')->get( $id ); + $fieldsObj = $tdmcreate->getHandler('fields')->get( $value ); $fieldsObj->setVar('field_order', $order); if (!$tdmcreate->getHandler('fields')->insert( $fieldsObj )) { redirect_header('fields.php', 5, _AM_TDMCREATE_FIELD_ORDER_ERROR); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php 2015-04-26 16:14:14 UTC (rev 13046) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php 2015-04-27 19:41:43 UTC (rev 13047) @@ -255,9 +255,9 @@ break; case 'order': - foreach($_POST['table_order'] as $order => $id) { + foreach($_POST['table_order'] as $order => $value) { if( $order > 0 ) { - $tablesObj = $tdmcreate->getHandler('tables')->get( $id ); + $tablesObj = $tdmcreate->getHandler('tables')->get( $value ); $tablesObj->setVar('table_order', $order); if (!$tdmcreate->getHandler('tables')->insert( $tablesObj )) { redirect_header('tables.php', 5, _AM_TDMCREATE_FIELD_ORDER_ERROR); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/admin/style.css =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/admin/style.css 2015-04-26 16:14:14 UTC (rev 13046) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/css/admin/style.css 2015-04-27 19:41:43 UTC (rev 13047) @@ -19,7 +19,7 @@ * @version $Id: style.css 12258 2014-01-02 09:33:29Z timgno $ */ - body { +body { background: #fafafa; color: #444; font-family: verdana, arial, tahoma, helvetica, sans-serif; @@ -29,8 +29,9 @@ table { margin: 0; padding: 0; } /* Sortable tables & fields */ -tbody tr.sortable td img.move { - cursor: move; +tbody tr td.sortable img.move { + cursor: move; + text-align: center; } tbody tr:hover { @@ -38,41 +39,41 @@ } tr.modules td { - margin: 0; - padding: 5px; - border-bottom: 1px solid #ccc; - background-color:rgba(200,110,20,0.3); - vertical-align: middle; + margin: 0; + padding: 5px; + border-bottom: 1px solid #ccc; + background-color:rgba(200,110,20,0.3); + vertical-align: middle; } tr.tables td { - /* display: block; Problems in FireFox and Opera */ - margin: 0; - padding: 5px; - border-bottom: 1px solid #ccc; - background-color:rgba(230,130,100,0.3); - vertical-align: middle; + /* display: block; Problems in FireFox and Opera */ + margin: 0; + padding: 5px; + border-bottom: 1px solid #ccc; + background-color:rgba(230,130,100,0.3); + vertical-align: middle; } tr.fields td { - /* display: block; Problems in FireFox and Opera */ - margin: 0; - padding: 5px; - border-bottom: 1px solid #ccc; - background-color:rgba(0,255,0,0.3); - vertical-align: middle; + /* display: block; Problems in FireFox and Opera */ + margin: 0; + padding: 5px; + border-bottom: 1px solid #ccc; + background-color:rgba(0,255,0,0.3); + 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; + display: none; } img.imageToggle { - width: 16px; - height: 16px; + width: 16px; + height: 16px; } .even { Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js 2015-04-26 16:14:14 UTC (rev 13046) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js 2015-04-27 19:41:43 UTC (rev 13047) @@ -2,42 +2,23 @@ // When the page is loaded define the current order and items to reorder /* Call the container items to reorder tables */ $(document).ready(function() { - $('.table-list').sortable({ - opacity: 0.6, - handle : '.move', - cursor: 'move', - update: function() { + $('.table-list').sortable({ opacity: 0.6, handle : '.move', cursor: 'move', + update: function(event, ui) { var order = $(this).sortable('serialize') + '&op=order'; - $('#info').load('tables.php'); $.post('tables.php', order, function(response) { $('#message').html(response); - }); + }); } - }); + }).disableSelection(); }); /* Call the container items to reorder fields */ $(document).ready(function() { - $('.field-list').sortable({ - opacity: 0.6, - handle : '.move', - cursor: 'move', + $('.field-list').sortable({ opacity: 0.6, handle : '.move', cursor: 'move', update: function() { var order = $(this).sortable('serialize') + '&op=order'; - $('#info').load('fields.php'); $.post('fields.php', order, function(response) { $('#message').html(response); - }); + }); } - }); -}); -/* -$(document).ready(function() { - $('.field-list').sortable({ // definisco il contenitore di elementi da riordinare - handle : '.move', // definisco con la classe .move quali sono gli elementi trascinabili - update : function () { // aggiorno l'ordine ed eseguo una callback - // salvo una variabile che contiene l'array con il nuovo ordine degli elementi - var order = $('.field-list').sortable('serialize') + '&op=order'; - $("#info").load('fields.php'); - } - }); -});*/ \ No newline at end of file + }).disableSelection(); +}); \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-26 16:14:14 UTC (rev 13046) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-27 19:41:43 UTC (rev 13047) @@ -352,7 +352,7 @@ $parameters_tray = new XoopsFormElementTray('', '<br />'); // Field Elements $criteria_element = new CriteriaCompo(); - $criteria_element->add(new Criteria('fieldelement_tid', $field_tid)); + $criteria_element->add(new Criteria('fieldelement_tid', 0)); $criteria_table = new CriteriaCompo(); $criteria_table->add(new Criteria('fieldelement_mid', $field_mid)); $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$id.']', $field->getVar('field_element')); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql 2015-04-26 16:14:14 UTC (rev 13046) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql 2015-04-27 19:41:43 UTC (rev 13047) @@ -64,7 +64,7 @@ `table_name` VARCHAR(150) NOT NULL DEFAULT '', `table_fieldname` VARCHAR(150) NOT NULL DEFAULT '', `table_nbfields` INT(5) UNSIGNED NOT NULL DEFAULT '0', - `table_order` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0', + `table_order` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0', `table_image` VARCHAR(150) NOT NULL DEFAULT '', `table_autoincrement` TINYINT(1) NOT NULL DEFAULT '1', `table_blocks` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl 2015-04-26 16:14:14 UTC (rev 13046) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields.tpl 2015-04-27 19:41:43 UTC (rev 13047) @@ -22,39 +22,41 @@ </tr> </thead> <tbody> - <{foreach item=table from=$tables_list}> - <tr id="table_<{$table.id}>" order="<{$table.order}>" class="fields toggleMain"> - <td class='center bold width5'>(<{$table.lid}>) - <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="<{xoModuleIcons32}><{$table.image}>" title="<{$table.name}>" alt="<{$table.name}>" /></td> - <td class='center bold'><{$table.nbfields}></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> - <td class='xo-actions txtcenter width6'> - <a href="tables.php?op=edit&table_mid=<{$table.mid}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>"> - <img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>" /> - </a> - <a href="fields.php?op=edit&field_mid=<{$table.mid}>&field_tid=<{$table.id}>&field_numb=<{$table.nbfields}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>"> - <img src="<{xoModuleIcons16 inserttable.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>" /> - </a> - <a href="fields.php?op=delete&field_tid=<{$table.id}>" title="<{$smarty.const._DELETE}>"> - <img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" /> - </a> - </td> - </tr> - <tr class="toggleChild"> - <td id="sortable" colspan="14" class='center'><{includeq file="db:tdmcreate_fields_item.tpl" table=$table}></td> - </tr> - <{/foreach}> + <{foreach item=table from=$tables_list}> + <{if $table.id > 0}> + <tr id="table_<{$table.id}>" order="<{$table.order}>" class="fields toggleMain"> + <td class='center bold width5'>(<{$table.lid}>) + <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="<{xoModuleIcons32}><{$table.image}>" title="<{$table.name}>" alt="<{$table.name}>" /></td> + <td class='center bold'><{$table.nbfields}></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" /></td> + <td class='xo-actions txtcenter width6'> + <a href="tables.php?op=edit&table_mid=<{$table.mid}>&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>"> + <img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>" /> + </a> + <a href="fields.php?op=edit&field_mid=<{$table.mid}>&field_tid=<{$table.id}>&field_numb=<{$table.nbfields}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>"> + <img src="<{xoModuleIcons16 inserttable.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>" /> + </a> + <a href="fields.php?op=delete&field_tid=<{$table.id}>" title="<{$smarty.const._DELETE}>"> + <img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" /> + </a> + </td> + </tr> + <tr class="toggleChild"> + <td class="sortable" colspan="14"><{includeq file="db:tdmcreate_fields_item.tpl" table=$table}></td> + </tr> + <{/if}> + <{/foreach}> </tbody> </table><br /><br /> <!-- Display modules navigation --> Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl 2015-04-26 16:14:14 UTC (rev 13046) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl 2015-04-27 19:41:43 UTC (rev 13047) @@ -2,7 +2,7 @@ <tbody class="field-list"> <{foreach item=field from=$table.fields}> <{if $field.id > 0}> - <tr id="field_<{$table.id}>_<{$field.id}>" order="<{$field.order}>" class="<{cycle values='even,odd'}>"> + <tr id="field_order_<{$field.tid}>_<{$field.id}>_<{$field.order}>" order="<{$field.order}>" class="<{cycle values='even,odd'}>"> <td class='center width5'>[<{$field.lid}>] <img class="move" src="<{$modPathIcon16}>/drag.png" alt="<{$field.name}>" /></td> <td class='center width10'><{$field.name}></td> <td class='center'><img src="<{$modPathIcon16}>/tables.png" alt="Empty" /></td> Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables.tpl =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables.tpl 2015-04-26 16:14:14 UTC (rev 13046) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables.tpl 2015-04-27 19:41:43 UTC (rev 13047) @@ -2,63 +2,65 @@ <{includeq file="db:tdmcreate_header.tpl"}> <!-- Display modules list --> <{if $modules_list}> - <table class='outer width100'> - <thead> - <tr> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ID}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NAME_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_IMAGE_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NBFIELDS_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ADMIN_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_USER_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_BLOCKS_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SUBMENU_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SEARCH_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_COMMENTS_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NOTIFICATIONS_LIST}></th> - <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_PERMISSIONS_LIST}></th> - <th class='center width6'><{$smarty.const._AM_TDMCREATE_FORMACTION}></th> - </tr> - </thead> - <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="<{$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}>" alt="" height="35" /></td> - <td class='center'><img src="<{$modPathIcon16}>/fields.png" alt="16" /></td> - <td class='center'><img id="loading_img_admin<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_admin<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_admin: <{if $module.admin == 1}>0<{else}>1<{/if}> }, 'img_admin<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> - </td> - <td class='center'><img id="loading_img_user<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_user<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_user: <{if $module.user}>0<{else}>1<{/if}> }, 'img_user<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> - </td> - <td class='center'><img id="loading_img_blocks<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_blocks<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_blocks: <{if $module.blocks}>0<{else}>1<{/if}> }, 'img_blocks<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.blocks}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> - </td> - <td class='center'><img src="<{$tdmc_icons_url}>/16/submenu.png" alt="Submenu" title="Submenu" /></td> - <td class='center'><img id="loading_img_search<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_search<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_search: <{if $module.search}>0<{else}>1<{/if}> }, 'img_search<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> - </td> - <td class='center'><img id="loading_img_comments<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_comments<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_comments: <{if $module.comments}>0<{else}>1<{/if}> }, 'img_comments<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> - </td> - <td class='center'><img id="loading_img_notifications<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_notifications<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_notifications: <{if $module.notifications}>0<{else}>1<{/if}> }, 'img_notifications<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> - </td> - <td class='center'><img id="loading_img_permissions<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_permissions<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_permissions: <{if $module.permissions}>0<{else}>1<{/if}> }, 'img_permissions<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.permissions}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> - </td> - <td class='xo-actions txtcenter width6'> - <a href="modules.php?op=edit&mod_id=<{$module.id}>" title="<{$smarty.const._EDIT}>"> - <img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /> - </a> - <a href="modules.php?op=delete&mod_id=<{$module.id}>" title="<{$smarty.const._DELETE}>"> - <img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /> - </a> - </td> - </tr> - <tr class="toggleChild"> - <td id="sortable" colspan="13" class='center'><{includeq file="db:tdmcreate_tables_item.tpl" module=$module}></td> - </tr> - <{/foreach}> - </tbody> - </table><br /><br /> + <table class='outer width100'> + <thead> + <tr> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ID}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NAME_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_IMAGE_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NBFIELDS_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ADMIN_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_USER_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_BLOCKS_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SUBMENU_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SEARCH_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_COMMENTS_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NOTIFICATIONS_LIST}></th> + <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_PERMISSIONS_LIST}></th> + <th class='center width6'><{$smarty.const._AM_TDMCREATE_FORMACTION}></th> + </tr> + </thead> + <tbody> + <{foreach item=module from=$modules_list}> + <{if $module.id > 0}> + <tr id="module<{$module.id}>" class="tables toggleMain"> + <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}>" alt="" height="35" /></td> + <td class='center'><img src="<{$modPathIcon16}>/fields.png" alt="16" /></td> + <td class='center'><img id="loading_img_admin<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_admin<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_admin: <{if $module.admin == 1}>0<{else}>1<{/if}> }, 'img_admin<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> + </td> + <td class='center'><img id="loading_img_user<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_user<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_user: <{if $module.user}>0<{else}>1<{/if}> }, 'img_user<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> + </td> + <td class='center'><img id="loading_img_blocks<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_blocks<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_blocks: <{if $module.blocks}>0<{else}>1<{/if}> }, 'img_blocks<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.blocks}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> + </td> + <td class='center'><img src="<{$tdmc_icons_url}>/16/submenu.png" alt="Submenu" title="Submenu" /></td> + <td class='center'><img id="loading_img_search<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_search<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_search: <{if $module.search}>0<{else}>1<{/if}> }, 'img_search<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> + </td> + <td class='center'><img id="loading_img_comments<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_comments<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_comments: <{if $module.comments}>0<{else}>1<{/if}> }, 'img_comments<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> + </td> + <td class='center'><img id="loading_img_notifications<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_notifications<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_notifications: <{if $module.notifications}>0<{else}>1<{/if}> }, 'img_notifications<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> + </td> + <td class='center'><img id="loading_img_permissions<{$module.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_permissions<{$module.id}>" onclick="tdmcreate_setStatus( { op: 'display_modules', mod_id: <{$module.id}>, mod_permissions: <{if $module.permissions}>0<{else}>1<{/if}> }, 'img_permissions<{$module.id}>', 'modules.php' )" src="<{xoModuleIcons16}><{$module.permissions}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$module.name}>" /> + </td> + <td class='xo-actions txtcenter width6'> + <a href="modules.php?op=edit&mod_id=<{$module.id}>" title="<{$smarty.const._EDIT}>"> + <img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /> + </a> + <a href="modules.php?op=delete&mod_id=<{$module.id}>" title="<{$smarty.const._DELETE}>"> + <img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /> + </a> + </td> + </tr> + <tr class="toggleChild"> + <td class="sortable" colspan="13"><{includeq file="db:tdmcreate_tables_item.tpl" module=$module}></td> + </tr> + <{/if}> + <{/foreach}> + </tbody> + </table><br /><br /> <!-- Display modules navigation --> <div class="clear"> </div> <{if $pagenav}><div class="xo-pagenav floatright"><{$pagenav}></div><div class="clear spacer"></div><{/if}> |
From: <txm...@us...> - 2015-04-28 16:01:23
|
Revision: 13048 http://sourceforge.net/p/xoops/svn/13048 Author: txmodxoops Date: 2015-04-28 16:01:20 +0000 (Tue, 28 Apr 2015) Log Message: ----------- Now you can order tables from the list Fixed bugs Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/index.html XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/naked.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables_item.tpl Removed Paths: ------------- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/loading.gif XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/VeraBd.ttf XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/green.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/red.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/tdmcreate_slogo.png XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/xcvLogo.txt XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/fields.js XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/jq.init.js Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/fields.php 2015-04-28 16:01:20 UTC (rev 13048) @@ -240,18 +240,27 @@ $fieldsObj = $tdmcreate->getHandler('fields')->get( $fieldId ); $form = $fieldsObj->getFormEdit($fieldMid, $fieldTid, $fieldNumb); $GLOBALS['xoopsTpl']->assign('form', $form->render()); - break; + break; - case 'order': - foreach($_POST['field_order'] as $order => $value) { - if( $order > 0 ) { - $fieldsObj = $tdmcreate->getHandler('fields')->get( $value ); - $fieldsObj->setVar('field_order', $order); - if (!$tdmcreate->getHandler('fields')->insert( $fieldsObj )) { - redirect_header('fields.php', 5, _AM_TDMCREATE_FIELD_ORDER_ERROR); - } - } - } + case 'order': + // Initialize fields handler + $fieldsObj = $tdmcreate->getHandler('fields'); + if ( isset($_POST['forder'] ) ) { + $i = 0; + foreach($_POST['forder'] as $order) { + if( $order > 0 ) { + $fieldOrder = $fieldsObj->get($order); + $fieldOrder->setVar('field_order', $i); + if (!$fieldsObj->insert($fieldOrder)) { + $error=true; + } + $i++; + } + } + redirect_header('fields.php', 5, _AM_TDMCREATE_FIELD_ORDER_ERROR); + unset($i); + } + exit; break; case 'delete': Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/admin/tables.php 2015-04-28 16:01:20 UTC (rev 13048) @@ -254,16 +254,25 @@ $GLOBALS['xoopsTpl']->assign('form', $form->render()); break; - case 'order': - foreach($_POST['table_order'] as $order => $value) { - if( $order > 0 ) { - $tablesObj = $tdmcreate->getHandler('tables')->get( $value ); - $tablesObj->setVar('table_order', $order); - if (!$tdmcreate->getHandler('tables')->insert( $tablesObj )) { - redirect_header('tables.php', 5, _AM_TDMCREATE_FIELD_ORDER_ERROR); - } - } - } + case 'order': + // Initialize tables handler + $tablesObj = $tdmcreate->getHandler('tables'); + if ( isset($_POST['torder'] ) ) { + $i = 0; + foreach($_POST['torder'] as $order) { + if( $order > 0 ) { + $tableOrder = $tablesObj->get($order); + $tableOrder->setVar('table_order', $i); + if (!$tablesObj->insert($tableOrder)) { + $error=true; + } + $i++; + } + } + redirect_header('tables.php', 5, _AM_TDMCREATE_TABLE_ORDER_ERROR); + unset($i); + } + exit; break; case 'delete': Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/loading.gif =================================================================== (Binary files differ) Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/VeraBd.ttf =================================================================== (Binary files differ) Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/green.png =================================================================== (Binary files differ) Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/index.html =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/index.html (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/index.html 2015-04-28 16:01:20 UTC (rev 13048) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/naked.png =================================================================== (Binary files differ) Index: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/naked.png =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/naked.png 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/naked.png 2015-04-28 16:01:20 UTC (rev 13048) Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/naked.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/logos/red.png =================================================================== (Binary files differ) Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/tdmcreate_slogo.png =================================================================== (Binary files differ) Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/xcvLogo.txt =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/xcvLogo.txt 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/images/xcvLogo.txt 2015-04-28 16:01:20 UTC (rev 13048) @@ -1 +0,0 @@ -display:table-cell; vertical-align:middle; \ No newline at end of file Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/fields.js =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/fields.js 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/fields.js 2015-04-28 16:01:20 UTC (rev 13048) @@ -1,42 +0,0 @@ -// Jquery function for side fields -/*$(document).ready( function() { - // Controls Drag & Drop - $('tbody tr.sortable td:nth-child(1) img').sortable({ - update: function(event, ui) { - var list = $(this).sortable( 'serialize'); - $.post( 'fields.php?op=order', list ); - }, - 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 } ); - $.post( 'fields.php?op=order', list ); - } - } - ); - $('tr.sortable').disableSelection(); - }, - function() { - $( ".portlet" ) - .addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" ) - .find( ".portlet-header" ) - .addClass( "ui-widget-header ui-corner-all" ) - .prepend( "<span class='ui-icon ui-icon-minusthick portlet-toggle'></span>"); - - $( ".portlet-toggle" ).click(function() { - var icon = $( this ); - icon.toggleClass( "ui-icon-minusthick ui-icon-plusthick" ); - icon.closest( ".portlet" ).find( ".portlet-content" ).toggle(); - }); - } -);*/ -// Quando la pagina è caricata definisci l'ordine attuale e gli elementi da riordinare -$(document).ready(function() { - $('.field-list').sortable({ //definisco il contenitore di elementi da riordinare - handle : '.move', //definisco con la classe .move quali sono gli elementi trascinabili - update : function () { //aggiorno l'ordine ed eseguo una callback - var order = $('.field-list').sortable('serialize'); // salvo una variabile che contiene l'array con il nuovo ordine degli elementi - $("#info").load("modules/tdmcreate/admin/fields.php?"+order); - } - }); -}); \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/functions.js 2015-04-28 16:01:20 UTC (rev 13048) @@ -60,9 +60,14 @@ } $(document).ready(function() { + // Hide/Show Tables or Fields $('tr.toggleMain td:nth-child(1) img').click(function () { $(this).closest('tr.toggleMain').nextUntil('tr.toggleMain').toggle(); }); + // Hide/Show Modules Tables + $('#modtab').hide(); + $('td#modtabs').click(function(){ + $(this).next('#modtab').slideToggle('slow');}); }); function tdmcreate_setStatus( data, img, file ) { Deleted: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/jq.init.js =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/jq.init.js 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/jq.init.js 2015-04-28 16:01:20 UTC (rev 13048) @@ -1,6 +0,0 @@ -$(document).ready(function(){ - // Hide/Show Modules Tables - $('#modtab').hide(); - $('td#modtabs').click(function(){ - $(this).next('#modtab').slideToggle('slow');}); -}); \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/assets/js/sortable.js 2015-04-28 16:01:20 UTC (rev 13048) @@ -1,24 +1,38 @@ // Jquery function for order fields // When the page is loaded define the current order and items to reorder -/* Call the container items to reorder tables */ -$(document).ready(function() { - $('.table-list').sortable({ opacity: 0.6, handle : '.move', cursor: 'move', - update: function(event, ui) { - var order = $(this).sortable('serialize') + '&op=order'; - $.post('tables.php', order, function(response) { - $('#message').html(response); - }); +$(document).ready( function(){ + /* Call the container items to reorder tables */ + $('.table-list').sortable({ + accept: 'tdmc-tables', + opacity: 0.6, + handle : '.move', + cursor: 'move', + connectWith: '.table-list', + update: function(event, ui) { + var list = $(this).sortable( 'serialize'); + $.post( 'tables.php?op=order', list ); + }, + receive: function(event, ui) { + var list = $(this).sortable( 'serialize'); + $.post( 'admin.php?op=order', list ); + } } - }).disableSelection(); -}); -/* Call the container items to reorder fields */ -$(document).ready(function() { - $('.field-list').sortable({ opacity: 0.6, handle : '.move', cursor: 'move', - update: function() { - var order = $(this).sortable('serialize') + '&op=order'; - $.post('fields.php', order, function(response) { - $('#message').html(response); - }); + ).disableSelection(); + /* Call the container items to reorder fields */ + $('.field-list').sortable({ + accept: 'tdmc-fields', + opacity: 0.6, + handle : '.move', + cursor: 'move', + connectWith: '.field-list', + update: function(event, ui) { + var list = $(this).sortable( 'serialize'); + $.post( 'fields.php?op=order', list ); + }, + receive: function(event, ui) { + var list = $(this).sortable( 'serialize'); + $.post( 'fields.php?op=order', list ); + } } - }).disableSelection(); + ).disableSelection(); }); \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/class/fields.php 2015-04-28 16:01:20 UTC (rev 13048) @@ -214,7 +214,7 @@ $parameters_tray = new XoopsFormElementTray('', '<br />'); // Field Elements $criteria_element = new CriteriaCompo(); - $criteria_element->add(new Criteria('fieldelement_tid', $field_tid)); + $criteria_element->add(new Criteria('fieldelement_tid', 0)); $criteria_table = new CriteriaCompo(); $criteria_table->add(new Criteria('fieldelement_mid', $field_mid)); $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element['.$i.']'); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/sql/mysql.sql 2015-04-28 16:01:20 UTC (rev 13048) @@ -118,8 +118,7 @@ `field_required` TINYINT(1) NOT NULL DEFAULT '0', PRIMARY KEY (`field_id`), KEY `field_mid` (`field_mid`), - KEY `field_tid` (`field_tid`), - KEY `field_name` (`field_name`) + KEY `field_tid` (`field_tid`) )ENGINE =MyISAM; # Modified: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl 2015-04-27 19:41:43 UTC (rev 13047) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_fields_item.tpl 2015-04-28 16:01:20 UTC (rev 13048) @@ -2,7 +2,7 @@ <tbody class="field-list"> <{foreach item=field from=$table.fields}> <{if $field.id > 0}> - <tr id="field_order_<{$field.tid}>_<{$field.id}>_<{$field.order}>" order="<{$field.order}>" class="<{cycle values='even,odd'}>"> + <tr id="forder_<{$field.id}>" order="<{$field.order}>" class="tdmc-fields <{cycle values='even,odd'}>"> <td class='center width5'>[<{$field.lid}>] <img class="move" src="<{$modPathIcon16}>/drag.png" alt="<{$field.name}>" /></td> <td class='center width10'><{$field.name}></td> <td class='center'><img src="<{$modPathIcon16}>/tables.png" alt="Empty" /></td> Added: XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables_item.tpl =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables_item.tpl (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a1/tdmcreate/templates/admin/tdmcreate_tables_item.tpl 2015-04-28 16:01:20 UTC (rev 13048) @@ -0,0 +1,41 @@ +<table class='width100'> + <tbody class="table-list"> + <{foreach item=table from=$module.tables}> + <{if $table.id > 0}> + <tr id="torder_<{$table.id}>" order="<{$table.order}>" class="tdmc-tables <{cycle values='even,odd'}>"> + <td class='cell cell-width1'>[<{$table.lid}>] <img class="move" src="<{$modPathIcon16}>/drag.png" alt="<{$table.name}>" /></td> + <td class='cell cell-width2'><{$table.name}></td> + <td class='cell cell-width3'><img src="<{xoModuleIcons32}><{$table.image}>" alt="<{$table.name}>" height="30" /></td> + <td class='cell cell-width4'><{$table.nbfields}></td> + <td class='cell cell-width5'><img id="loading_img_table_admin<{$table.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_table_admin<{$table.id}>" onclick="tdmcreate_setStatus( { op: 'display_tables', table_id: <{$table.id}>, table_admin: <{if $table.admin}>0<{else}>1<{/if}> }, 'img_table_admin<{$table.id}>', 'tables.php' )" src="<{xoModuleIcons16}><{$table.admin}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" /> + </td> + <td class='cell cell-width6'><img id="loading_img_table_user<{$table.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_table_user<{$table.id}>" onclick="tdmcreate_setStatus( { op: 'display_tables', table_id: <{$table.id}>, table_user: <{if $table.user}>0<{else}>1<{/if}> }, 'img_table_user<{$table.id}>', 'tables.php' )" src="<{xoModuleIcons16}><{$table.user}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" /> + </td> + <td class='cell cell-width7'><img id="loading_img_table_blocks<{$table.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_table_blocks<{$table.id}>" onclick="tdmcreate_setStatus( { op: 'display_tables', table_id: <{$table.id}>, table_blocks: <{if $table.blocks}>0<{else}>1<{/if}> }, 'img_table_blocks<{$table.id}>', 'tables.php' )" src="<{xoModuleIcons16}><{$table.blocks}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" /> + </td> + <td class='cell cell-width8'><img id="loading_img_table_submenu<{$table.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_table_submenu<{$table.id}>" onclick="tdmcreate_setStatus( { op: 'display_tables', table_id: <{$table.id}>, table_submenu: <{if $table.submenu}>0<{else}>1<{/if}> }, 'img_table_submenu<{$table.id}>', 'tables.php' )" src="<{xoModuleIcons16}><{$table.submenu}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" /> + </td> + <td class='cell cell-width9'><img id="loading_img_table_search<{$table.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_table_search<{$table.id}>" onclick="tdmcreate_setStatus( { op: 'display_tables', table_id: <{$table.id}>, table_search: <{if $table.search}>0<{else}>1<{/if}> }, 'img_table_search<{$table.id}>', 'tables.php' )" src="<{xoModuleIcons16}><{$table.search}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" /> + </td> + <td class='cell cell-width10'><img id="loading_img_table_comments<{$table.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_table_comments<{$table.id}>" onclick="tdmcreate_setStatus( { op: 'display_tables', table_id: <{$table.id}>, table_comments: <{if $table.comments}>0<{else}>1<{/if}> }, 'img_table_comments<{$table.id}>', 'tables.php' )" src="<{xoModuleIcons16}><{$table.comments}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" /> + </td> + <td class='cell cell-width11'><img id="loading_img_table_notifications<{$table.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_table_notifications<{$table.id}>" onclick="tdmcreate_setStatus( { op: 'display_tables', table_id: <{$table.id}>, table_notifications: <{if $table.notifications}>0<{else}>1<{/if}> }, 'img_table_notifications<{$table.id}>', 'tables.php' )" src="<{xoModuleIcons16}><{$table.notifications}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" /> + </td> + <td class='cell cell-width12'><img id="loading_img_table_permissions<{$table.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_table_permissions<{$table.id}>" onclick="tdmcreate_setStatus( { op: 'display_tables', table_id: <{$table.id}>, table_permissions: <{if $table.permissions}>0<{else}>1<{/if}> }, 'img_table_permissions<{$table.id}>', 'tables.php' )" src="<{xoModuleIcons16}><{$table.permissions}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" /> + </td> + <td class='xo-actions cell cell-width13'> + <a href="tables.php?op=edit&table_mid=<{$table.mid}>&table_id=<{$table.id}>" title="<{$smarty.const._EDIT}>"> + <img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>" /> + </a> + <a href="fields.php?op=edit&field_mid=<{$table.mid}>&field_tid=<{$table.id}>" title="<{$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}>" /> + </a> + </td> + </tr> + <{/if}> + <{/foreach}> + </tbody> +</table> \ No newline at end of file |