Anonymous avatar Anonymous committed 3047bc5

Theme edits. Preference Menu & Fix for radio buttons in the Write tab.

Comments (0)

Files changed (3)

textpattern/include/txp_article.php

 				else
 				{
 					echo t4.graf(
-						onoffRadio('Annotate', $Annotate)
+						onoffRadio('Annotate', $Annotate),'class="radio"'
 					).
 
 						t4.'<label for="comment-invite" id="comment_invite">'.gTxt('comment_invitation').'</label>'.

textpattern/include/txp_prefs.php

 			prefs_list();
 		} else $step();
 	}
+//-------------------------------------------------------------
 
+	function prefs_nav() {
+		global $step;
+		$out = 
+			'<ul id="pref-nav">'.
+				'<li class="rounded">'.sLink('prefs', 'prefs_list', gTxt('site_prefs'), 				(($step=='prefs_list') ? 'navlink-active' : 'navlink')).'</li>'.
+				'<li class="rounded">'.sLink('prefs', 'advanced_prefs', gTxt('advanced_preferences'),	(($step=='prefs_list') ? 'navlink-active' : 'navlink')).'</li>'.
+				'<li class="rounded">'.sLink('prefs', 'list_languages', gTxt('manage_languages'), 		(($step=='prefs_list') ? 'navlink-active' : 'navlink')).'</li>'.
+			'</ul>';
+			
+		return $out;
+	}
 // -------------------------------------------------------------
 	function prefs_save()
 	{
 		global $textarray;
 
 		echo pagetop(gTxt('edit_preferences'), $message).
-			 n.t.'<div id="content" class="clearfix">'.n.
+			 n.t.'<div id="content" class="clearfix prefs">'.n.
 		       t.'<h1>'.gTxt('edit_preferences').'</h1>';
 
 		extract(get_prefs());
 		$textarray = load_lang($language);
 
 		echo n.n.'<form method="post" action="index.php">'.
-
-			n.n.startTable('list').
-
-			n.n.tr(
-				tdcs(
-					hed(gTxt('site_prefs'), 1)
-				, 3)
-			).
-
-			n.n.tr(
-				tdcs(
-					sLink('prefs', 'prefs_list', gTxt('site_prefs'), 'navlink-active').sp.
-					sLink('prefs', 'advanced_prefs', gTxt('advanced_preferences'), 'navlink').sp.
-					sLink('prefs', 'list_languages', gTxt('manage_languages'), 'navlink')
-				, '3')
-			);
+			prefs_nav().
+			
+			hed(gTxt('site_prefs'), 2);
 
 		$evt_list = safe_column('event', 'txp_prefs', "type = 0 and prefs_id = 1 group by event order by event desc");
 
 
 			while ($a = nextRow($rs))
 			{
+				// do we print the event header?
 				if ($a['event'] != $cur_evt)
 				{
 					$cur_evt = $a['event'];
 						continue;
 					}
 
-					echo n.n.tr(
-						tdcs(
-							hed(gTxt($a['event']), 2, ' class="pref-heading"')
-						, 3)
-					);
+					echo hed(gTxt($a['event']), 3, ' class="pref-heading"');
 				}
 
+				// don't print comment settings if comments not allowed
 				if ($cur_evt == 'comments' && !$use_comments)
 				{
 					continue;
 					continue;
 				}
 
-				$label = ($a['html'] != 'yesnoradio') ?
+				$preflabel = ($a['html'] != 'yesnoradio') ?
 					'<label for="'.$a['name'].'">'.gTxt($a['name']).'</label>' :
 					gTxt($a['name']);
 
-				$out = tda($label, ' style="text-align: right; vertical-align: middle;"');
-
 				if ($a['html'] == 'text_input')
 				{
-					$out.= td(
-						pref_func('text_input', $a['name'], $a['val'], 20)
-					);
+					$prefitem = pref_func('text_input', $a['name'], $a['val'], 20);
+				} else {
+					$prefitem = pref_func($a['html'], $a['name'], $a['val']);
 				}
 
-				else
-				{
-					$out.= td(pref_func($a['html'], $a['name'], $a['val']));
-				}
-
-				$out.= tda(popHelp($a['name']), ' style="vertical-align: middle;"');
-
-				echo tr($out);
+				echo t2.graf(
+						'<span class="left">'.$preflabel.'</span>'.
+						'<span class="right">'.$prefitem.'</span>',
+					'class="pref"').n;
 			}
 		}
-
-		echo n.n.tr(
-			tda(
-				fInput('submit', 'Submit', gTxt('save_button'), 'publish').
+		
+		echo t2.div(
+				fInput('submit', 'Submit', gTxt('save_button'), 'publish','','','','','publish-button').
 				n.sInput('prefs_save').
 				n.eInput('prefs').
-				n.hInput('prefs_id', '1')
-			, ' colspan="3" class="noline"')
-		).
-
-		n.n.endTable().
+				n.hInput('prefs_id', '1'), 'ctr').
 
 		n.n.'</form>';
 
 
 			if (is_array($updates))
 			{
-				$out = join(br, $updates);
+				$out = graf(join(br, $updates),'class="ctr"');
 			}
 
 			else{
 				$out = $updates;
 			}
 
-			echo n.n.startTable('edit').
-
-				n.n.tr(
-					tda($out)
-				).
-
-				n.n.endTable();
+			echo graf($out,'class="pref"');
 		}
 
 		else
 	{
 		global $textarray;
 
-		// this means new language strings and new help entries
-		pagetop(gTxt('advanced_preferences'), $message);
-		
-			echo n.t.'<div id="content" class="clearfix">'.n.
-		          t.'<h1>'.gTxt('advanced_preferences').'</h1>'.n.
+		echo pagetop(gTxt('edit_preferences'), $message).
+			 n.t.'<div id="content" class="clearfix prefs">'.n.
+		       t.'<h1>'.gTxt('edit_preferences').'</h1>';
 
-			n.n.'<form method="post" action="index.php">'.
 
-			n.n.startTable('list').
+		echo n.n.'<form method="post" action="index.php">'.
+			prefs_nav().
+			hed(gTxt('advanced_preferences'), 2);
 
-			n.n.tr(
-				tdcs(
-					hed(gTxt('advanced_preferences'), 1)
-				, 3)
-			).
-
-			n.n.tr(
-				tdcs(
-					sLink('prefs', 'prefs_list', gTxt('site_prefs'), 'navlink').sp.
-					sLink('prefs', 'advanced_prefs', gTxt('advanced_preferences'), 'navlink-active').sp.
-					sLink('prefs', 'list_languages', gTxt('manage_languages'), 'navlink')
-				, '3')
-			);
 
 		$rs = safe_rows_start('*', 'txp_prefs', "type = 1 and prefs_id = 1 order by event, position");
 
 			if ($a['event']!= $cur_evt)
 			{
 				$cur_evt = $a['event'];
-
-				echo n.n.tr(
-					tdcs(
-						hed(gTxt($a['event']), 2, ' class="pref-heading"')
-					, 3)
-				);
+				echo hed(gTxt($a['event']), 3, ' class="pref-heading"');
 			}
 
-				$label = ($a['html'] != 'yesnoradio') ?
+				$preflabel = ($a['html'] != 'yesnoradio') ?
 					'<label for="'.$a['name'].'">'.gTxt($a['name']).'</label>' :
 					gTxt($a['name']);
 
-			$out = tda($label, ' style="text-align: right; vertical-align: middle;"');
-
 			if ($a['html'] == 'text_input')
 			{
 				$look_for = array('expire_logs_after', 'max_url_len', 'time_offset', 'rss_how_many', 'logs_expire');
 
 				$size = in_array($a['name'], $look_for) ? 3 : 20;
 
-				$out.= td(
-					pref_func('text_input', $a['name'], $a['val'], $size)
-				);
+				$prefitem = pref_func('text_input', $a['name'], $a['val'], $size);
 			}
 
 			else
 			{
 				if (is_callable($a['html']))
 				{
-					$out.= td(
-						pref_func($a['html'], $a['name'], $a['val'])
-					);
+					$prefitem = pref_func($a['html'], $a['name'], $a['val']);
 				}
 
 				else
 				{
-					$out.= td($a['val']);
+					$prefitem = $a['val'];
 				}
 			}
 
-			$out .= tda(
-				popHelp($a['name'])
-			, ' style="vertical-align: middle;"');
-
-			echo n.n.tr($out);
+			echo t2.graf(
+					'<span class="left">'.$preflabel.'</span>'.
+					'<span class="right">'.$prefitem.'</span>',
+					'class="pref"').n;
 		}
 
-		echo n.n.tr(
-			tda(
-				fInput('submit', 'Submit', gTxt('save_button'), 'publish').
+		echo t2.div(
+				fInput('submit', 'Submit', gTxt('save_button'), 'publish','','','','','publish-button').
 				sInput('advanced_prefs_save').
 				eInput('prefs').
 				hInput('prefs_id', '1')
-			, ' colspan="3" class="noline"')
-		).
-
-		n.n.endTable().
+			, 'ctr');
 
 		n.n.'</form>'.
 			'</div>';
 
 		// Output Table + Content
 		pagetop(gTxt('update_languages'),$message);
-		echo 	n.t.'<div id="content" class="clearfix">'.n.
-		          t.'<h1>'.gTxt('edit_preferences').'</h1>';
+		echo 	n.t.'<div id="content" class="clearfix prefs" >'.n.
+		          t.'<h1>'.gTxt('edit_preferences').'</h1>'.
+		          
+				prefs_nav().
+				hed(gTxt('manage_languages'), 2);
+
 		          
 		if (isset($msg) && $msg)
 			echo tag ($msg,'p',' style="text-align:center;color:red;width:50%;margin: 2em auto"' );
 
 		echo startTable('list'),
 
-		tr(
-			tdcs(
-				hed(gTxt('manage_languages'), 1)
-			, 3)
-		),
-
-		tr(
-			tdcs(
-				sLink('prefs', 'prefs_list', gTxt('site_prefs'), 'navlink').sp.
-				sLink('prefs','advanced_prefs',gTxt('advanced_preferences'),'navlink').sp.
-				sLink('prefs', 'list_languages', gTxt('manage_languages'), 'navlink-active')
-			, '3')
-		),
-
 		tr(tda('&nbsp;',' colspan="3" style="font-size:0.25em"')),
 		tr( $lang_form ),
 		tr(tda('&nbsp;',' colspan="3" style="font-size:0.25em"')),

textpattern/styles/cp/reno.css

 }
 
 .collapse {
-	background: url("reno/image/minus.gif") no-repeat right center;
+	background: url("reno/images/minus.gif") no-repeat right center;
 }
 
 #content, #logon {
 }
 
 .expand {
-	background: url("reno/image/plus.gif") no-repeat right center;
+	background: url("reno/images/plus.gif") no-repeat right center;
 }
 
 #header {
 	font-weight: normal;
 	margin: 15px 0 15px 0;
 	padding: 0 0 12px 0;
-	background: url("reno/image/dotted-border.gif") repeat-x bottom left;
+	background: url("reno/images/dotted-border.gif") repeat-x bottom left;
 }
 	
 h2 {
 
 #nav .nav-group{
 	padding: 10px 0 10px 0;
-	background: url("reno/image/nav-border.gif") no-repeat bottom left;
+	background: url("reno/images/nav-border.gif") no-repeat bottom left;
 }			
 
 /* Form Elements
 	width: 165px;
 }
 
+.radio label, .radio input { display:inline; }
+
 /* Write
 ---------------------------------------------- */
 
 .expand-collapse {
 	margin: 0;
 	padding: 12px 0 10px 0;
-	background: url("reno/image/dotted-border.gif") repeat-x bottom left;
+	background: url("reno/images/dotted-border.gif") repeat-x bottom left;
 }
 
 #group-body {
 	margin: 10px 0 0 0;
-	background: url("reno/image/dotted-border.gif") repeat-x bottom left;
+	background: url("reno/images/dotted-border.gif") repeat-x bottom left;
 }
 
 #group-date, #group-time, #group-expirydate, #group-expirytime {
 	background-color: #f4f4f4;
 }
 
-#url-title, #url-title-label {
+#url-title,#url-title-label {
 	display: none;
 	}
 
 	clear: both;
 	}
 
+/* Prefs
+---------------------------------------------- */
 
+UL#pref-nav { display: inline-block; }
+UL#pref-nav { display: inline; }
+UL#pref-nav { display: table; margin: auto; }
+UL#pref-nav { overflow: hidden; }
+
+#pref-nav LI { 
+	float: left; 
+	text-align: center;
+	list-style: none;
+	width: 180px;
+	margin: 0 10px;
+	background: #EEE;
+	}
+
+
+p.pref { 
+	clear: both;
+	overflow: auto;
+	}
+	
+.left { 
+	float: left; 
+	width: 450px;
+	padding: 0 10px;
+	text-align: right;
+	}
+	
+.right {
+	float: left; 
+	width: 150px;
+	text-align: left;
+	}
+
+.prefs H2 {
+	font-style: italic;
+	text-align: center;
+	font-size: 150%;
+	font-weight: bold; 
+	margin: 30px 0 !important;
+	}
+	
+.prefs H3 {
+	width: 500px;
+	margin: 0 auto;
+	text-align: center; 
+	border-bottom: 1px solid #EEE;
+	}
+.pref INPUT, .pref LABEL {
+	display: inline;
+}
+
+.ctr
+	{
+	text-align: center;
+	margin: 0 auto;
+	}
+	
+.ctr INPUT
+	{
+	margin: 0 auto;
+	text-align: 0 auto;
+	}
+	
 /* Clearfix
 ---------------------------------------------- */
 .clearfix:after {
 
 .clearfix {display: inline-block;}
 
+.rounded {
+	-moz-border-radius: 10px;
+	-webkit-border-radius: 10px;
+	}
+	
 /* Hides from IE-mac \*/
 * html .clearfix {height: 1%;}
 .clearfix {display: block;}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.