xtras/mathuaerknedam 47:997ed17797d7: Tweaks to the topic, tryin...
commits at adium.im
commits at adium.im
Thu Jun 4 22:16:56 UTC 2009
details: http://hg.adium.im/xtras/mathuaerknedam/rev/997ed17797d7
revision: 47:997ed17797d7
author: mathuaerknedam
date: Thu Jun 04 17:16:42 2009 -0500
Tweaks to the topic, trying to get it to fucntion like Colloquy's topic. The javascript toggle works in the mockup, but it doesn't appear that Adium is executing it.
diffs (163 lines):
diff -r 950b15744355 -r 997ed17797d7 yMous.AdiumMessageStyle/Contents/Resources/Mockup.html
--- a/yMous.AdiumMessageStyle/Contents/Resources/Mockup.html Thu Jun 04 13:34:35 2009 -0500
+++ b/yMous.AdiumMessageStyle/Contents/Resources/Mockup.html Thu Jun 04 17:16:42 2009 -0500
@@ -35,23 +35,16 @@
<body>
-<script type="text/ecmascript" defer="defer" encoding="utf-8" src="/Users/mneedham/Applications/Colloquy.app/Contents/Resources/roomTopicBanner.js"></script>
+<div id="topic" title="Adium development channel. For user help, go to #adium. | 1.4b6: http://beta.adium.im | 1.4hg nightly: http://nightly.adium.im">
+ <script type="text/ecmascript" defer="defer" encoding="utf-8" src="./roomTopicBanner.js"></script>
-<!--
-<div id="topicArea">
- <style id="mainStyle" type="text/css" media="screen,print">
- @import url(./Topic.css);
-
- #topic
- {
- //display: none;
- }
+ <style type="text/css">
+ @import url(./Topic.css);
</style>
<div id="toggleButton" onclick="toggleTopic( event )" style="display: block"></div>
- <div id="topicMessage" title"10|Welcome 9|Welcome 8|Welcome 7|Welcome 6|Welcome 5|Welcome 4|Welcome 3|Welcome 2|Welcome 1|Welcome 0|Welcome " contenteditable>10|Welcome 9|Welcome 8|Welcome 7|Welcome 6|Welcome 5|Welcome 4|Welcome 3|Welcome 2|Welcome 1|Welcome 0|Welcome </div>
+ <span id="topicEdit" ondblclick="this.setAttribute('contentEditable', true); this.focus();">Adium development channel. For user help, go to <a href="irc://irc.freenode.net/#adium" title="irc://irc.freenode.net/#adium">#adium</a>. | 1.4b6: <a href="http://beta.adium.im" title="http://beta.adium.im">http://beta.adium.im</a> | 1.4hg nightly: <a href="http://nightly.adium.im" title="http://nightly.adium.im">http://nightly.adium.im</a></span>
</div>
---!>
<div id="Chat" class="">
diff -r 950b15744355 -r 997ed17797d7 yMous.AdiumMessageStyle/Contents/Resources/Topic.css
--- a/yMous.AdiumMessageStyle/Contents/Resources/Topic.css Thu Jun 04 13:34:35 2009 -0500
+++ b/yMous.AdiumMessageStyle/Contents/Resources/Topic.css Thu Jun 04 17:16:42 2009 -0500
@@ -1,7 +1,6 @@
@charset "utf-8";
-#topic,
-#topicArea
+#topic
{
position: fixed;
background: rgba(208, 208, 208, .85);
@@ -11,18 +10,18 @@
height: 17px;
width: 100%;
z-index: 999;
+ display: table-row;
}
-#topicEdit,
-#topicMessage
+#topicEdit
{
position: absolute;
top: 1px;
- width: 100%;
+ left: 8px;
+ right: 16px;
min-height: 15px;
- padding: 0 20px 0 8px;
+ font-family: Lucida Grande, sans-serif;
font-size: 11px;
- font-family: Lucida Grande, sans-serif;
line-height: 15px;
//text-align: center;
color: black !important;
@@ -32,8 +31,7 @@
-khtml-nbsp-mode: space;
}
-#topicEdit a,
-#topicMessage a
+#topicEdit a
{
//color: blue !important;
}
@@ -41,13 +39,13 @@
#toggleButton
{
position: absolute;
- top: 2px;
- right: 1px;
- width: 17px;
+ top: 3px;
+ right: 4px;
+ //width: 13px;
height: 16px;
z-index: 10;
cursor: default;
- font-size: 12px !important;
+ font-size: 10px !important;
font-family: AppleGothic;
}
diff -r 950b15744355 -r 997ed17797d7 yMous.AdiumMessageStyle/Contents/Resources/Topic.html
--- a/yMous.AdiumMessageStyle/Contents/Resources/Topic.html Thu Jun 04 13:34:35 2009 -0500
+++ b/yMous.AdiumMessageStyle/Contents/Resources/Topic.html Thu Jun 04 17:16:42 2009 -0500
@@ -1,17 +1,9 @@
-<!--
-<script type="text/ecmascript" defer="defer" encoding="utf-8" src="./roomTopicBanner.js"></script>
---!>
+<script type="text/ecmascript" defer="defer" encoding="utf-8" src="./roomTopicBanner.js"></script>
<style type="text/css">
@import url(./Topic.css);
</style>
+<div id="toggleButton" onclick="toggleTopic( event )" style="display: none"></div>
+
%topic%
-
-
-<!--
-<div id="topic">
- <div id="toggleButton" onclick="toggleTopic( event )" style="display: block"></div>
- <div id="topicEdit" title"%message%" contenteditable>%message%</div>
-</div>
---!>
diff -r 950b15744355 -r 997ed17797d7 yMous.AdiumMessageStyle/Contents/Resources/roomTopicBanner.js
--- a/yMous.AdiumMessageStyle/Contents/Resources/roomTopicBanner.js Thu Jun 04 13:34:35 2009 -0500
+++ b/yMous.AdiumMessageStyle/Contents/Resources/roomTopicBanner.js Thu Jun 04 17:16:42 2009 -0500
@@ -10,7 +10,7 @@
else document.getElementById( 'toggleButton' ).className = "";
} else {
if( ! topicToggled && topicSize < 6 ) {
- topicAreaSize = document.getElementById( 'topicMessage' ).clientHeight + 2;
+ topicAreaSize = document.getElementById( 'topicEdit' ).clientHeight + 2;
if( topicAreaSize > 107 ) topicAreaSize = 107;
else if( topicAreaSize < 17 ) topicAreaSize = 17;
document.getElementById( 'toggleButton' ).className = "up";
@@ -23,18 +23,18 @@
}
}
- document.getElementById( 'topicArea' ).style.setProperty( 'height', topicAreaSize + 'px', null );
+ document.getElementById( 'topic' ).style.setProperty( 'height', topicAreaSize + 'px', null );
}
function changeTopic( topic, author, empty ) {
- topicMessage = document.getElementById( 'topicMessage' );
+ topicMessage = document.getElementById( 'topicEdit' );
topicMessage.innerHTML = topic;
topicMessage.title = topicMessage.innerText + ( author ? ' set by ' + author : '' );
refreshTopicSize();
}
function refreshTopicSize( event ) {
- topicMessage = document.getElementById( 'topicMessage' );
+ topicMessage = document.getElementById( 'topicEdit' );
if( topicMessage.clientHeight > 17 )
document.getElementById( 'toggleButton' ).style.setProperty( 'display', 'block', null );
else document.getElementById( 'toggleButton' ).style.setProperty( 'display', 'none', null );
@@ -42,7 +42,7 @@
topicAreaSize = topicMessage.clientHeight + 2;
if( topicAreaSize > 107 ) topicAreaSize = 107;
else if( topicAreaSize < 17 ) topicAreaSize = 17;
- document.getElementById( 'topicArea' ).style.setProperty( 'height', topicAreaSize + 'px', null );
+ document.getElementById( 'topic' ).style.setProperty( 'height', topicAreaSize + 'px', null );
}
}
More information about the commits
mailing list