Преглед на файлове

Misc: Fix datetimepicker on Time Conditions, CDR, Contact Times, etc.
Misc: Fix textarea height.
Theme: CSS adjustments to correct misc bugs.

reliberate преди 9 години
родител
ревизия
776e5522fe
променени са 4 файла, в които са добавени 76 реда и са изтрити 61 реда
  1. 2 4
      core/install/resources/page_parts/install_config_database.php
  2. 19 36
      core/upgrade/index.php
  3. 5 5
      core/users/group_permissions.php
  4. 50 16
      themes/default/template.php

+ 2 - 4
core/install/resources/page_parts/install_config_database.php

@@ -143,8 +143,7 @@
 		echo "</td>\n";
 		echo "<td class='vtable' align='left'>\n";
 		if($db_create=='1') { $checked = "checked='checked'"; } else { $checked = ''; }
-		echo "	<input type='checkbox' name='db_create' value='1' $checked />&nbsp;";
-		echo "Create the database\n";
+		echo "	<label><input type='checkbox' name='db_create' value='1' $checked /> Create the database</label>\n";
 		echo "<br />\n";
 		echo "Choose whether to create the database\n";
 		echo "</td>\n";
@@ -240,8 +239,7 @@
 		echo "</td>\n";
 		echo "<td class='vtable' align='left'>\n";
 		if($db_create=='1') { $checked = "checked='checked'"; } else { $checked = ''; }
-		echo "	<input type='checkbox' name='db_create' value='1' $checked />&nbsp;";
-		echo "Create the database\n";
+		echo "	<label><input type='checkbox' name='db_create' value='1' $checked /> Create the database</label>\n";
 		echo "</td>\n";
 		echo "</tr>\n";
 

+ 19 - 36
core/upgrade/index.php

@@ -149,10 +149,7 @@ if (permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpb
 	echo "		".$text['label-upgrade_source'];
 	echo "	</td>\n";
 	echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-	echo "		<label for='do_source'>";
-	echo "			<input type='checkbox' class='formfld' name='do[source]' id='do_source' value='1'>";
-	echo "			".$text['description-upgrade_source'];
-	echo "		</label>\n";
+	echo "		<label for='do_source'><input type='checkbox' name='do[source]' id='do_source' value='1'> ".$text['description-upgrade_source']."</label>\n";
 	echo "	</td>\n";
 	echo "</tr>\n";
 	echo "</table>\n";
@@ -165,10 +162,7 @@ if (permission_exists("upgrade_schema")) {
 	echo "		".$text['label-upgrade_schema'];
 	echo "	</td>\n";
 	echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-	echo "		<label for='do_schema'>";
-	echo "			<input type='checkbox' class='formfld' name='do[schema]' id='do_schema' value='1' onchange=\"$('#do_data_types').prop('checked', false); $('#tr_data_types').slideToggle('fast');\">";
-	echo "			".$text['description-upgrade_schema'];
-	echo "		</label>\n";
+	echo "		<label for='do_schema'><input type='checkbox' name='do[schema]' id='do_schema' value='1' onchange=\"$('#do_data_types').prop('checked', false); $('#tr_data_types').slideToggle('fast');\"> ".$text['description-upgrade_schema']."</label>\n";
 	echo "	</td>\n";
 	echo "</tr>\n";
 	echo "</table>\n";
@@ -180,10 +174,7 @@ if (permission_exists("upgrade_schema")) {
 	echo "		".$text['label-upgrade_data_types'];
 	echo "	</td>\n";
 	echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-	echo "		<label for='do_data_types'>";
-	echo "			<input type='checkbox' class='formfld' name='do[data_types]' id='do_data_types' value='true'>";
-	echo "			".$text['description-upgrade_data_types'];
-	echo "		</label>\n";
+	echo "		<label for='do_data_types'><input type='checkbox' name='do[data_types]' id='do_data_types' value='true'> ".$text['description-upgrade_data_types']."</label>\n";
 	echo "	</td>\n";
 	echo "</tr>\n";
 	echo "</table>\n";
@@ -197,10 +188,7 @@ if (permission_exists("upgrade_apps")) {
 	echo "		".$text['label-upgrade_apps'];
 	echo "	</td>\n";
 	echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-	echo "		<label for='do_apps'>";
-	echo "			<input type='checkbox' class='formfld' name='do[apps]' id='do_apps' value='1'>";
-	echo "			".$text['description-upgrade_apps'];
-	echo "		</label>\n";
+	echo "		<label for='do_apps'><input type='checkbox' name='do[apps]' id='do_apps' value='1'> ".$text['description-upgrade_apps']."</label>\n";
 	echo "	</td>\n";
 	echo "</tr>\n";
 	echo "</table>\n";
@@ -213,22 +201,20 @@ if (permission_exists("menu_restore")) {
 	echo "		".$text['label-upgrade_menu'];
 	echo "	</td>\n";
 	echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-	echo "		<table cellpadding='0' cellspacing='0' border='0'>";
-	echo "			<tr><td>";
-	echo "				<input type='checkbox' class='formfld' name='do[menu]' id='do_menu' value='1' onchange=\"$('#td_sel_menu').fadeToggle('fast');\">";
-	echo "			</td><td id='td_sel_menu' style='display: none; padding: 0px 3px 0px 8px;'>";
-	echo "				<select name='sel_menu' id='sel_menu' class='formfld'>\n";
-		$sql = "select * from v_menus ";
-		$prep_statement = $db->prepare(check_sql($sql));
-		$prep_statement->execute();
-		$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
-		foreach ($result as &$row) {
-			echo "<option value='".$row["menu_uuid"]."|".$row["menu_language"]."'>".$row["menu_name"]."</option>\n";
-		}
-		unset ($sql, $result, $prep_statement);
-	echo "				</select>\n";
-	echo "			</td><td class='vtable' style='border: none; padding: 3px;'><label for='do_menu'>".$text['description-upgrade_menu']."</label></td></tr>";
-	echo "		</table>";
+	echo "		<label for='do_menu'>";
+	echo 			"<input type='checkbox' name='do[menu]' 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;'>";
+	$sql = "select * from v_menus ";
+	$prep_statement = $db->prepare(check_sql($sql));
+	$prep_statement->execute();
+	$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+	foreach ($result as &$row) {
+		echo "<option value='".$row["menu_uuid"]."|".$row["menu_language"]."'>".$row["menu_name"]."</option>";
+	}
+	unset ($sql, $result, $prep_statement);
+	echo 			"</select>";
+	echo 			" ".$text['description-upgrade_menu'];
+	echo 		"</label>\n";
 	echo "	</td>\n";
 	echo "</tr>\n";
 	echo "</table>\n";
@@ -241,10 +227,7 @@ if (permission_exists("group_edit")) {
 	echo "		".$text['label-upgrade_permissions'];
 	echo "	</td>\n";
 	echo "	<td width='70%' class='vtable' style='height: 50px;'>\n";
-	echo "		<label for='do_permissions'>";
-	echo "			<input type='checkbox' class='formfld' name='do[permissions]' id='do_permissions' value='1'>";
-	echo "			".$text['description-upgrade_permissions'];
-	echo "		</label>\n";
+	echo "		<label for='do_permissions'><input type='checkbox' name='do[permissions]' id='do_permissions' value='1'> ".$text['description-upgrade_permissions']."</label>\n";
 	echo "	</td>\n";
 	echo "</tr>\n";
 	echo "</table>\n";

+ 5 - 5
core/users/group_permissions.php

@@ -382,17 +382,17 @@ require_once "resources/require.php";
 
 			echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
 			echo "	<tr>\n";
-			echo "		<th style='text-align: center; padding: 0px;'><input type='checkbox' id='check_toggle_".$app_index."' onclick=\"check_toggle('".$app_index."', this.checked);\"></th>\n";
-			echo "		<th width='33%'>".$text['label-permission_permissions']."</th>\n";
-			echo "		<th width='66%'>".$text['label-permission_description']."</th>\n";
+			echo "		<th style='text-align: center; padding: 0 7px;'><input type='checkbox' id='check_toggle_".$app_index."' onclick=\"check_toggle('".$app_index."', this.checked);\"></th>\n";
+			echo "		<th width='30%'>".$text['label-permission_permissions']."</th>\n";
+			echo "		<th width='70%'>".$text['label-permission_description']."</th>\n";
 			echo "	<tr>\n";
 
 			foreach ($app['permissions'] as $permission_index => $row) {
 				$checked = ($permissions_db_checklist[$row['name']] == "true") ? "checked='checked'" : null;
 				echo "<tr id='permission_".$row['name']."'>\n";
 				echo "	<td valign='top' class='".$row_style[$c]."' style='text-align: center; padding: 3px 0px 0px 0px;'><input type='checkbox' name='permissions_form[]' id='perm_".$app_index."_".$permission_index."' ".$checked." value='".$row['name']."'></td>\n";
-				echo "	<td valign='top' width='30%' nowrap='nowrap' class='".$row_style[$c]."' onclick=\"(document.getElementById('perm_".$app_index."_".$permission_index."').checked) ? document.getElementById('perm_".$app_index."_".$permission_index."').checked = false : document.getElementById('perm_".$app_index."_".$permission_index."').checked = true;\">".$row['name']."</td>\n";
-				echo "	<td valign='top' width='70%' class='row_stylebg' onclick=\"(document.getElementById('perm_".$app_index."_".$permission_index."').checked) ? document.getElementById('perm_".$app_index."_".$permission_index."').checked = false : document.getElementById('perm_".$app_index."_".$permission_index."').checked = true;\">".$row['description']."&nbsp;</td>\n";
+				echo "	<td valign='top' nowrap='nowrap' class='".$row_style[$c]."' onclick=\"(document.getElementById('perm_".$app_index."_".$permission_index."').checked) ? document.getElementById('perm_".$app_index."_".$permission_index."').checked = false : document.getElementById('perm_".$app_index."_".$permission_index."').checked = true;\">".$row['name']."</td>\n";
+				echo "	<td valign='top' class='row_stylebg' onclick=\"(document.getElementById('perm_".$app_index."_".$permission_index."').checked) ? document.getElementById('perm_".$app_index."_".$permission_index."').checked = false : document.getElementById('perm_".$app_index."_".$permission_index."').checked = true;\">".$row['description']."&nbsp;</td>\n";
 				echo "</tr>\n";
 				$c = ($c == 0) ? 1 : 0;
 

+ 50 - 16
themes/default/template.php

@@ -742,7 +742,7 @@
 
 		#main_content {
 			padding: 8px;
-		}
+			}
 		}
 
 /* GENERAL ELEMENTS *****************************************************************/
@@ -781,10 +781,16 @@
 	:-ms-input-placeholder { color: <?php echo $placeholder_color; ?> } /* ie 10+ */
 	::placeholder { color: <?php echo $placeholder_color; ?> } /* official standard */
 
-	input.txt,
-	textarea.txt,
 	select.txt,
-	.formfld {
+	textarea.txt,
+	input[type=text].txt,
+	input[type=number].txt,
+	input[type=password].txt,
+	select.formfld,
+	textarea.formfld,
+	input[type=text].formfld,
+	input[type=number].formfld,
+	input[type=password].formfld {
 		font-family: <?php echo ($_SESSION['theme']['input_text_font']['text'] != '') ? $_SESSION['theme']['input_text_font']['text'] : 'Arial'; ?>;
 		font-size: <?php echo ($_SESSION['theme']['input_text_size']['text'] != '') ? $_SESSION['theme']['input_text_size']['text'] : '12px'; ?>;
 		color: <?php echo ($_SESSION['theme']['input_text_color']['text'] != '') ? $_SESSION['theme']['input_text_color']['text'] : '#000000'; ?>;
@@ -821,8 +827,14 @@
 		vertical-align: middle;
 		}
 
-	input.txt,
-	.formfld {
+	textarea.txt,
+	input[type=text].txt,
+	input[type=number].txt,
+	input[type=password].txt,
+	textarea.formfld,
+	input[type=text].formfld,
+	input[type=number].formfld,
+	input[type=password].formfld {
 		transition: width 0.25s;
 		-moz-transition: width 0.25s;
 		-webkit-transition: width 0.25s;
@@ -834,13 +846,25 @@
 		padding: 4px 2px;
 		}
 
-	input.txt:hover,
-	.formfld:hover {
+	textarea.txt:hover,
+	input[type=text].txt:hover,
+	input[type=number].txt:hover,
+	input[type=password].txt:hover,
+	textarea.formfld:hover,
+	input[type=text].formfld:hover,
+	input[type=number].formfld:hover,
+	input[type=password].formfld:hover {
 		border-color: <?php echo ($_SESSION['theme']['input_border_color_hover']['text'] != '') ? $_SESSION['theme']['input_border_color_hover']['text'] : '#c0c0c0'; ?>;
 		}
 
-	input.txt:focus,
-	.formfld:focus {
+	textarea.txt:focus,
+	input[type=text].txt:focus,
+	input[type=number].txt:focus,
+	input[type=password].txt:focus,
+	textarea.formfld:focus,
+	input[type=text].formfld:focus,
+	input[type=number].formfld:focus,
+	input[type=password].formfld:focus {
 		border-color: <?php echo ($_SESSION['theme']['input_border_color_focus']['text'] != '') ? $_SESSION['theme']['input_border_color_focus']['text'] : '#c0c0c0'; ?>;
 		/* first clear */
 		-webkit-box-shadow: none;
@@ -984,11 +1008,22 @@
 		display: inline;
 		}
 
+	textarea {
+		min-height: 75px;
+		}
+
 	label {
 		font-weight: normal;
 		vertical-align: middle;
 		}
 
+	label input[type=checkbox],
+	label input[type=radio] {
+		vertical-align: -2px;
+		margin: 0;
+		padding: 0;
+		}
+
 	span.playback_progress_bar {
 		background-color: #c43e42;
 		height: 1px;
@@ -1728,7 +1763,6 @@
 		//hide message bar on hover
 			$("#message_text").mouseover(function() { $(this).hide(); $("#message_container").hide(); });
 
-
 		<?php
 		if (permission_exists("domain_select") && count($_SESSION['domains']) > 1) {
 			?>
@@ -1771,7 +1805,6 @@
 		}
 		?>
 
-
 		//link table rows (except the last - the list_control_icons cell) on a table with a class of 'tr_hover', according to the href attribute of the <tr> tag
 			$('.tr_hover tr').each(function(i,e) {
 			  $(e).children('td:not(.list_control_icon,.list_control_icons,.tr_link_void)').click(function() {
@@ -1780,15 +1813,16 @@
 			  });
 			});
 
-
 		//apply the auto-size jquery script to all text inputs
-			$("input.txt, textarea.txt, .formfld").autosizeInput();
-
+			$("input[type=text].txt,input[type=number].txt,input[type=password].txt,input[type=text].formfld,input[type=number].formfld,input[type=password].formfld").not('.datetimepicker').autosizeInput();
 
 		//apply bootstrap-datetime plugin
 			$(function() {
 				$('.datetimepicker').datetimepicker({
-					format: 'YYYY-MM-DD HH:mm'
+					format: 'YYYY-MM-DD HH:mm',
+					showTodayButton: true,
+					showClear: true,
+					showClose: true,
 				});
 			});