소스 검색

Fixed layout issues in Chrome

Nathaniel van Diepen 11 년 전
부모
커밋
5a72657e30
3개의 변경된 파일32개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 0
      www/css/style.css
  2. 1 1
      www/index.html
  3. 25 2
      www/js/omnomirc.js

+ 6 - 0
www/css/style.css

@@ -109,6 +109,9 @@ html,body{
 	bottom: 0;
 	right: 88px;
 	width: 36px;
+	padding: 0;
+	margin: 0;
+	height: 18px;
 	border-style: none;
 	border-left-style: solid;
 	background-color: white;
@@ -124,6 +127,9 @@ html,body{
 	border-color: black;
 	border-width: 1px;
 	overflow: hidden;
+	position: absolute;
+}
+#users,#input,#send,#settings{
 	position: fixed;
 }
 #content-list,#users-list,#settings-list,#tabs-list{

+ 1 - 1
www/index.html

@@ -3,7 +3,7 @@
 	<head>
 		<title>OmnomIRC3</title>
 		<meta charset='utf-8'> 
-		<script type="text/javascript" src="js/console-shim-min"></script>
+		<script type="text/javascript" src="js/console-shim-min.js"></script>
 		<script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
 		<script type="text/javascript" src="js/jquery.hoverIntent.minified.js"></script>
 		<script type="text/javascript" src="js/jquery.timago.js"></script>

+ 25 - 2
www/js/omnomirc.js

@@ -22,13 +22,15 @@
 			return 'Version: '+$o.version
 		},
 		event = function(msg,type){
-			type=type==undefined?'event':type;
+			type=typeof type == 'undefined'?'event':type;
 			switch(type){
 				case 'ready':type='document_ready';break;
 			}
 			log('['+type.toUpperCase()+'] '+msg);
 		},
-		log=console.log,
+		log = function(){
+				console.log.apply(console,arguments);
+		},
 		exists = function(object){
 			return typeof object != 'undefined';
 		},
@@ -325,6 +327,27 @@
 			zIndex: 99999,
 			trigger: 'right'
 		});
+		$.contextMenu({
+			selector: '#tabs-list',
+			items: {
+				add: {
+					name: 'New Tab',
+					icon: 'add',
+					callback: function(){
+						$(this).contextMenu('hide');
+						var title = prompt('Title');
+						tabs.push({
+							name: prompt('channel'),
+							title: title,
+							topic: 'Topic for '+title
+						});
+						$o.refreshTabs();
+					}
+				}
+			},
+			zIndex: 99999,
+			trigger: 'right'
+		});
 		$('#tabs-scroll-right').click(function(){
 			event('scroll right');
 			$tl.scrollTop(($tl.scrollTop()||0)+20);