瀏覽代碼

Upgrade: Toggle checkmarks by row click.

fusionate 2 年之前
父節點
當前提交
4c73b1fd3d
共有 1 個文件被更改,包括 22 次插入22 次删除
  1. 22 22
      core/upgrade/index.php

+ 22 - 22
core/upgrade/index.php

@@ -157,13 +157,13 @@
 
 	if (permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx") && is_writeable($_SERVER["PROJECT_ROOT"]."/.git")) {
 		echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
-		echo "<tr>\n";
+		echo "<tr onclick=\"document.getElementById('do_source').checked = !document.getElementById('do_source').checked;\">\n";
 		echo "	<td width='30%' class='vncell' style='vertical-align:middle;'>\n";
 		echo "		<div style='".$step_container_style."'><span style='".$step_number_style."'>".$step++."</span></div>";
 		echo "		".$text['label-upgrade_source'];
 		echo "	</td>\n";
-		echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-		echo "		<input type='checkbox' name='action[upgrade_source]' id='do_source' value='1'> &nbsp;".$text['description-upgrade_source']."<br />\n";
+		echo "	<td width='70%' class='vtable' style='height: 50px; cursor: pointer;'>\n";
+		echo "		<input type='checkbox' name='action[upgrade_source]' id='do_source' value='1' onclick=\"event.stopPropagation();\"> &nbsp;".$text['description-upgrade_source']."<br />\n";
 
 		// show current git version info
 		chdir($_SERVER["PROJECT_ROOT"]);
@@ -175,7 +175,7 @@
 			echo $text['label-git_branch'].' '.$git_current_branch." \n";
 			//echo $text['label-git_commit'].' '." ";
 			echo "<a href='https://github.com/fusionpbx/fusionpbx/compare/";
-			echo $git_current_commit . "..." . "$git_current_branch' target='_blank'> \n";
+			echo $git_current_commit . "..." . "$git_current_branch' target='_blank' onclick=\"event.stopPropagation();\"> \n";
 			echo $git_current_commit . "</a><br />\n";
 			echo "</a>";
 		}
@@ -187,26 +187,26 @@
 
 	if (permission_exists("upgrade_schema")) {
 		echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
-		echo "<tr>\n";
+		echo "<tr onclick=\"document.getElementById('do_schema').checked = !document.getElementById('do_schema').checked; (!document.getElementById('do_schema').checked ? $('#do_data_types').prop('checked', false) : null); $('#tr_data_types').slideToggle('fast');\">\n";
 		echo "	<td width='30%' class='vncell' style='vertical-align:middle;'>\n";
 		echo "		<div style='".$step_container_style."'><span style='".$step_number_style."'>".$step."</span></div>";
 		echo "		".$text['label-upgrade_schema'];
 		echo "	</td>\n";
-		echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-		echo "		<input type='checkbox' name='action[upgrade_schema]' id='do_schema' value='1' onchange=\"$('#do_data_types').prop('checked', false); $('#tr_data_types').slideToggle('fast');\"> &nbsp;".$text['description-upgrade_schema']."\n";
+		echo "	<td width='70%' class='vtable' style='height: 50px; cursor: pointer;'>\n";
+		echo "		<input type='checkbox' name='action[upgrade_schema]' id='do_schema' value='1' onclick=\"event.stopPropagation(); $('#tr_data_types').slideToggle('fast'); (!document.getElementById('do_schema').checked ? $('#do_data_types').prop('checked', false) : null);\"> &nbsp;".$text['description-upgrade_schema']."\n";
 		echo "	</td>\n";
 		echo "</tr>\n";
 		echo "</table>\n";
 
 		echo "<div id='tr_data_types' style='display: none;'>\n";
 		echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
-		echo "<tr>\n";
+		echo "<tr onclick=\"document.getElementById('do_data_types').checked = !document.getElementById('do_data_types').checked;\">\n";
 		echo "	<td width='30%' class='vncell' style='vertical-align:middle;'>\n";
 		echo "		<div style='".$step_container_style."'><span style='".$step_number_style." letter-spacing: -0.06em;'>".$step++."B</span></div>";
 		echo "		".$text['label-upgrade_data_types'];
 		echo "	</td>\n";
-		echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-		echo "		<input type='checkbox' name='action[data_types]' id='do_data_types' value='true'> &nbsp;".$text['description-upgrade_data_types']."\n";
+		echo "	<td width='70%' class='vtable' style='height: 50px; cursor: pointer;'>\n";
+		echo "		<input type='checkbox' name='action[data_types]' id='do_data_types' value='true' onclick=\"event.stopPropagation();\"> &nbsp;".$text['description-upgrade_data_types']."\n";
 		echo "	</td>\n";
 		echo "</tr>\n";
 		echo "</table>\n";
@@ -215,13 +215,13 @@
 
 	if (permission_exists("upgrade_apps")) {
 		echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
-		echo "<tr>\n";
+		echo "<tr onclick=\"document.getElementById('do_apps').checked = !document.getElementById('do_apps').checked;\">\n";
 		echo "	<td width='30%' class='vncell' style='vertical-align:middle;'>\n";
 		echo "		<div style='".$step_container_style."'><span style='".$step_number_style."'>".$step++."</span></div>";
 		echo "		".$text['label-upgrade_apps'];
 		echo "	</td>\n";
-		echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-		echo "		<input type='checkbox' name='action[app_defaults]' id='do_apps' value='1'> &nbsp;".$text['description-upgrade_apps']."\n";
+		echo "	<td width='70%' class='vtable' style='height: 50px; cursor: pointer;'>\n";
+		echo "		<input type='checkbox' name='action[app_defaults]' id='do_apps' value='1' onclick=\"event.stopPropagation();\"> &nbsp;".$text['description-upgrade_apps']."\n";
 		echo "	</td>\n";
 		echo "</tr>\n";
 		echo "</table>\n";
@@ -229,14 +229,14 @@
 
 	if (permission_exists("menu_restore")) {
 		echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
-		echo "<tr>\n";
+		echo "<tr onclick=\"document.getElementById('do_menu').checked = !document.getElementById('do_menu').checked; $('#sel_menu').fadeToggle('fast');\">\n";
 		echo "	<td width='30%' class='vncell' style='vertical-align:middle;'>\n";
 		echo "		<div style='".$step_container_style."'><span style='".$step_number_style."'>".$step++."</span></div>";
 		echo "		".$text['label-upgrade_menu'];
 		echo "	</td>\n";
-		echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-		echo 			"<input type='checkbox' name='action[menu_defaults]' id='do_menu' value='1' onchange=\"$('#sel_menu').fadeToggle('fast');\">";
-		echo 			"<select name='sel_menu' id='sel_menu' class='formfld' style='display: none; vertical-align: middle; margin-left: 5px;'>";
+		echo "	<td width='70%' class='vtable' style='height: 50px; cursor: pointer;'>\n";
+		echo 		"<input type='checkbox' name='action[menu_defaults]' id='do_menu' value='1' onclick=\"event.stopPropagation(); $('#sel_menu').fadeToggle('fast');\">";
+		echo 		"<select name='sel_menu' id='sel_menu' class='formfld' style='display: none; vertical-align: middle; margin-left: 5px;' onclick=\"event.stopPropagation();\">";
 		$sql = "select * from v_menus ";
 		$database = new database;
 		$result = $database->select($sql, null, 'all');
@@ -246,8 +246,8 @@
 			}
 		}
 		unset ($sql, $result);
-		echo 			"</select>";
-		echo 			" &nbsp;".$text['description-upgrade_menu'];
+		echo 		"</select>";
+		echo 		" &nbsp;".$text['description-upgrade_menu'];
 		echo "	</td>\n";
 		echo "</tr>\n";
 		echo "</table>\n";
@@ -255,13 +255,13 @@
 
 	if (permission_exists("group_edit")) {
 		echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
-		echo "<tr>\n";
+		echo "<tr onclick=\"document.getElementById('do_permissions').checked = !document.getElementById('do_permissions').checked;\">\n";
 		echo "	<td width='30%' class='vncell' style='vertical-align:middle;'>\n";
 		echo "		<div style='".$step_container_style."'><span style='".$step_number_style."'>".$step++."</span></div>";
 		echo "		".$text['label-upgrade_permissions'];
 		echo "	</td>\n";
-		echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-		echo "		<input type='checkbox' name='action[permission_defaults]' id='do_permissions' value='1'> &nbsp;".$text['description-upgrade_permissions']."\n";
+		echo "	<td width='70%' class='vtable' style='height: 50px; cursor: pointer;'>\n";
+		echo "		<input type='checkbox' name='action[permission_defaults]' id='do_permissions' value='1' onclick=\"event.stopPropagation();\"> &nbsp;".$text['description-upgrade_permissions']."\n";
 		echo "	</td>\n";
 		echo "</tr>\n";
 		echo "</table>\n";