From 6d4d02116b703ae2f66aef1ece5b964ea333fd8c Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 4 Jul 2015 11:22:41 -0700 Subject: [PATCH] Language tables GUI cleanup. data-return option added to e-expandit selector. --- e107_admin/language.php | 34 +++++++++++++++++++++++----------- e107_web/js/core/all.jquery.js | 6 ++++++ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/e107_admin/language.php b/e107_admin/language.php index c7161df9b..2de1f742a 100644 --- a/e107_admin/language.php +++ b/e107_admin/language.php @@ -434,11 +434,13 @@ if (isset($_POST['create_edit_existing'])) if (isset($_POST['edit_existing'])) { //XXX - JS ok with the current functionality? + $frm = e107::getForm(); + $text .= "
".$_POST['lang_choices']." - +
@@ -450,22 +452,32 @@ if (isset($_POST['edit_existing'])) $installed = 'lan_'.strtolower($_POST['lang_choices'])."_".$table_name; if (stristr($_POST['lang_choices'], $installed) === FALSE) { + + $selected = ($sql->db_Table_exists($table_name,$_POST['lang_choices'])) ? " checked='checked'" : ""; + + $tableName = ucfirst(str_replace("_", " ", $table_name)); + $tableLabel = ($selected) ? "".$tableName."" : $tableName; + $text .= " - + @@ -508,7 +520,7 @@ if (isset($_POST['edit_existing'])) "; - $ns->tablerender($_POST['lang_choices'], $mes->render().$text); + $ns->tablerender(ADLAN_132.SEP.LANG_LAN_03.SEP.$_POST['lang_choices'], $mes->render().$text); } require_once (e_ADMIN."footer.php"); // --------------------------------------------------------------------------- diff --git a/e107_web/js/core/all.jquery.js b/e107_web/js/core/all.jquery.js index d7c674bed..bd54bba8c 100644 --- a/e107_web/js/core/all.jquery.js +++ b/e107_web/js/core/all.jquery.js @@ -75,6 +75,12 @@ $(document).ready(function() $('#'+ this).slideToggle("slow"); }); + + if($(this).attr("data-return")==='true') + { + return true; + } + return false; }
".ucfirst(str_replace("_", " ", $table_name))."".$tableLabel." -
+
+
"; - $selected = ($sql->db_Table_exists($table_name,$_POST['lang_choices'])) ? " checked='checked'" : ""; + + + $text .= " - +
-
- - -    - +
". + $frm->checkbox("copydata_".$table_name, 1, false, LANG_LAN_15)." + +
+ +