Procházet zdrojové kódy

Style wireframe and script changes

Made the close button universal.
Modified the Setting pane to fill the screen.
Head is expanded by default. Click handlers on the head area. Head will
auto hide 1s after page load.
Added close buttons to the Users and Settings panes.
Nathaniel van Diepen před 12 roky
rodič
revize
37b20d33e5
3 změnil soubory, kde provedl 17 přidání a 5 odebrání
  1. 3 3
      www/css/style.css
  2. 3 1
      www/index.html
  3. 11 1
      www/js/omnomirc.js

+ 3 - 3
www/css/style.css

@@ -17,13 +17,13 @@ html,body{
 	-ms-user-select: none;
 	-ms-user-select: none;
 	user-select: none;
 	user-select: none;
 }
 }
-#tabs-list span.tab .close-button{
+.close-button{
 	float: right;
 	float: right;
 	font-weight: bold;
 	font-weight: bold;
 	font-size: 16px;
 	font-size: 16px;
 	font-family: Arial,Liberation Sans,DejaVu Sans,sans-serif;
 	font-family: Arial,Liberation Sans,DejaVu Sans,sans-serif;
 }
 }
-#tabs-list span.tab .close-button:hover{
+.close-button:hover{
 	color: red;
 	color: red;
 }
 }
 #head{
 #head{
@@ -84,7 +84,7 @@ html,body{
 	z-index: 20;
 	z-index: 20;
 }
 }
 #settings.open{
 #settings.open{
-	width: 50%;
+	width: 100%;
 }
 }
 #entry{
 #entry{
 	width: 100%;
 	width: 100%;

+ 3 - 1
www/index.html

@@ -12,7 +12,7 @@
 		<link rel="stylesheet" href="css/style.css"></link>
 		<link rel="stylesheet" href="css/style.css"></link>
 	</head>
 	</head>
 	<body>
 	<body>
-		<div id="head">
+		<div id="head" class="hovered">
 			<div id="info" class="unselectable">
 			<div id="info" class="unselectable">
 				<span id="title"></span>
 				<span id="title"></span>
 				<span id="topic"></span>
 				<span id="topic"></span>
@@ -27,10 +27,12 @@
 			<button id="send" value="send">send</button>
 			<button id="send" value="send">send</button>
 			<div id="users">
 			<div id="users">
 				<span class="unselectable">Users</span>
 				<span class="unselectable">Users</span>
+				<span class="close-button">&times;</span>
 				<ul id="user-list"></ul>
 				<ul id="user-list"></ul>
 			</div>
 			</div>
 			<div id="settings">
 			<div id="settings">
 				<span class="unselectable">Settings</span>
 				<span class="unselectable">Settings</span>
+				<span class="close-button">&times;</span>
 				<ul id="settings-list"></ul>
 				<ul id="settings-list"></ul>
 			</div>
 			</div>
 		</div>
 		</div>

+ 11 - 1
www/js/omnomirc.js

@@ -133,15 +133,22 @@
 				$(this).removeClass('open');
 				$(this).removeClass('open');
 			},
 			},
 			timeout: 1000
 			timeout: 1000
+		}).children('.close-button').click(function(){
+			$(this).parent().removeClass('open');
+			return false;
 		});
 		});
 		$("#head").hoverIntent({
 		$("#head").hoverIntent({
 			over: function(){
 			over: function(){
-				$(this).addClass('hovered');
+				setTimeout(function(){
+					$('#head:hover').addClass('hovered');
+				},1000);
 			},
 			},
 			out: function(){
 			out: function(){
 				$(this).removeClass('hovered');
 				$(this).removeClass('hovered');
 			},
 			},
 			timeout: 1000
 			timeout: 1000
+		}).click(function(){
+			$(this).addClass('hovered');
 		});
 		});
 		$('.unselectable').attr('unselectable','on');
 		$('.unselectable').attr('unselectable','on');
 		//DEBUG
 		//DEBUG
@@ -155,5 +162,8 @@
 		//END DEBUG
 		//END DEBUG
 		$o.refreshTabs();
 		$o.refreshTabs();
 		$o.event('ready');
 		$o.event('ready');
+		setTimeout(function(){
+			$('#head').removeClass('hovered');
+		},1000);
 	});
 	});
 })(window,jQuery);
 })(window,jQuery);