Browse Source

UI updates

Nathaniel van Diepen 10 years ago
parent
commit
3ea75e49f5
4 changed files with 32 additions and 13 deletions
  1. 1 0
      css/fonts.css
  2. 6 8
      css/jquery-ui.css
  3. 10 0
      css/style.css
  4. 15 5
      js/index.js

+ 1 - 0
css/fonts.css

@@ -1,6 +1,7 @@
 *{
 	font-family: 'FiraSans';
 	word-wrap: break-word;
+	font-weight: normal;
 }
 body,input[type=text],input[type=password]{
 	font-size: 130%;

+ 6 - 8
css/jquery-ui.css

@@ -194,7 +194,6 @@
 	cursor: default;
 }
 .ui-button {
-	text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,0.3);
 	display: inline-block;
 	position: relative;
 	padding: 0;
@@ -231,6 +230,7 @@ button.ui-button-icons-only {
 .ui-button .ui-button-text {
 	display: block;
 	line-height: normal;
+	font-weight: 500;
 }
 .ui-button-text-only .ui-button-text {
 	padding: .4em 1em;
@@ -792,7 +792,6 @@ body .ui-tooltip {
 /* Component containers
 ----------------------------------*/
 .ui-widget {
-	font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
 	font-size: 1.1em;
 }
 .ui-widget .ui-widget {
@@ -802,7 +801,6 @@ body .ui-tooltip {
 .ui-widget select,
 .ui-widget textarea,
 .ui-widget button {
-	font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
 	font-size: 1em;
 }
 .ui-widget-content {
@@ -815,7 +813,7 @@ body .ui-tooltip {
 }
 .ui-widget-header {
 	border: 1px solid #e78f08;
-	background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x;
+	background: #fafafa url(../img/headers/ui/header.png) repeat-x left bottom;
 	color: #ffffff;
 	font-weight: bold;
 }
@@ -1132,25 +1130,25 @@ body .ui-tooltip {
 .ui-corner-top,
 .ui-corner-left,
 .ui-corner-tl {
-	border-top-left-radius: 4px;
+	border-top-left-radius: 2px;
 }
 .ui-corner-all,
 .ui-corner-top,
 .ui-corner-right,
 .ui-corner-tr {
-	border-top-right-radius: 4px;
+	border-top-right-radius: 2px;
 }
 .ui-corner-all,
 .ui-corner-bottom,
 .ui-corner-left,
 .ui-corner-bl {
-	border-bottom-left-radius: 4px;
+	border-bottom-left-radius: 2px;
 }
 .ui-corner-all,
 .ui-corner-bottom,
 .ui-corner-right,
 .ui-corner-br {
-	border-bottom-right-radius: 4px;
+	border-bottom-right-radius: 2px;
 }
 
 /* Overlays */

+ 10 - 0
css/style.css

@@ -25,6 +25,16 @@ input[type=submit]:active,button.recommend:active{
 	background: #008aaa;
 	color: #333;
 }
+.recommend-force{
+	background-image: url(../img/buttons/ui/recommend.png) !important;
+	background-color: #00caf2 !important;
+	border-color: #00acce !important;
+}
+.recommend-force:active{
+	border-color: #008aaa !important;
+	background: #008aaa !important;
+	color: #333 !important;
+}
 .cancel{
 	background-image: url(../images/buttons/ui/danger.png);
 	background-color: #b70404;

+ 15 - 5
js/index.js

@@ -208,7 +208,7 @@
 				flag('error',true);
 				var msg = '['+State.url+']'+e.error;
 				console.error(msg.trim()+"\n"+(exists(e.state)?JSON.stringify(e.state):''));
-				alert(msg.trim(),callback);
+				alert(msg.trim(),'Error',callback);
 			}
 		},
 		getNewState = function(){
@@ -334,7 +334,7 @@
 			form: function(selector){
 				$(selector).find('#form').position({of:selector,my:'center',at:'center'});
 			},
-			dialog: function(selector){
+			dialog: function(selector,title){
 				$(selector).dialog({
 					close: function(){
 						flag('error',false);
@@ -345,7 +345,17 @@
 						loading(false);
 					},
 					resizable: false,
-					draggable: false
+					draggable: false,
+					title: title,
+					buttons: [
+						{
+							text: 'Ok',
+							class: 'recommend-force',
+							click: function(){
+								$(this).dialog('close');
+							}
+						}
+					]
 				});
 			},
 			links: function(selector){
@@ -385,9 +395,9 @@
 				location.reload();
 			}
 		},
-		alert = function(text,callback){
+		alert = function(text,title,callback){
 			$('#dialog').text(text).data('callback',callback);
-			render.dialog('#dialog');
+			render.dialog('#dialog',title,callback);
 		},
 		loading = function(state){
 			state = exists(state)?state:false;