Browse Source
merged mmServer class into Mumble model, changed channel viewer to use divs instead of a table (can be more cleanly generated), cleaned up views and removed a whole lot of bad(tm) code
Natenom/support-murmur-13-1446181288462
merged mmServer class into Mumble model, changed channel viewer to use divs instead of a table (can be more cleanly generated), cleaned up views and removed a whole lot of bad(tm) code
Natenom/support-murmur-13-1446181288462
Michael Ziegler
16 years ago
10 changed files with 341 additions and 352 deletions
-
41htdocs/mumble/style.css
-
141pyweb/mumble/mmobjects.py
-
218pyweb/mumble/models.py
-
24pyweb/mumble/templatetags/mumble_extras.py
-
77pyweb/mumble/views.py
-
17template/mumble/channel.htm
-
62template/mumble/content.htm
-
79template/mumble/mumble.htm
-
25template/mumble/player.htm
-
9template/mumble/server.htm
@ -1,29 +1,26 @@ |
|||||
td.mumble img { |
|
||||
padding: 0px; |
|
||||
margin: 0px; |
|
||||
} |
|
||||
|
|
||||
a.dingen:link, a.dingen:visited, a.dingen:hover, a.dingen:active { |
|
||||
|
a.mumble:link, a.mumble:visited, a.mumble:hover, a.mumble:active { |
||||
font-weight: bold; |
font-weight: bold; |
||||
font-size: 8pt; |
font-size: 8pt; |
||||
color: #283E53; |
color: #283E53; |
||||
text-decoration: none; |
text-decoration: none; |
||||
} |
|
||||
|
|
||||
td.mumble { |
|
||||
height: 20px; |
|
||||
padding: 0px; |
|
||||
margin: 0px; |
|
||||
line-height: 6px; |
|
||||
border: none; |
|
||||
} |
|
||||
|
} |
||||
|
|
||||
div.mumble { |
div.mumble { |
||||
background-color: #FFFFFF; |
|
||||
color: #283E53; |
|
||||
padding: 10px; |
|
||||
margin-top: 20px; |
|
||||
margin-bottom: 20px; |
|
||||
width: 80%; |
|
||||
min-height: 250px; |
|
||||
} |
|
||||
|
background-image: url( /static/mumble/linie_v.png ); |
||||
|
background-repeat: repeat-y; |
||||
|
margin-left: 20px; |
||||
|
margin-bottom: 0; |
||||
|
padding-bottom: 0; |
||||
|
} |
||||
|
|
||||
|
div.mumble img { |
||||
|
padding: 0px; |
||||
|
margin: 0px; |
||||
|
} |
||||
|
|
||||
|
span.mumble { |
||||
|
width: 10em; |
||||
|
float:right; |
||||
|
} |
||||
|
|
@ -0,0 +1,17 @@ |
|||||
|
{% load mumble_extras %} |
||||
|
<div class="mumble"> |
||||
|
<img src="/static/mumble/knoten_v.png" /> |
||||
|
{% if Channel.linked %} |
||||
|
<img src="/static/mumble/channel_linked.png" alt="linked channel" /> |
||||
|
{% else %} |
||||
|
<img src="/static/mumble/channel.png" alt="channel" /> |
||||
|
{% endif %} |
||||
|
<a href="{{ Channel|chanurl:MumbleAccount }}" class="mumble" id="link_{{ Channel.id }}" title="{{ Channel.name }}"> |
||||
|
{{ Channel.name|trunc:30 }} |
||||
|
</a> |
||||
|
{% for sub in Channel.subchans %} |
||||
|
{{ sub|chanview:MumbleAccount }} |
||||
|
{% endfor %} |
||||
|
{% for player in Channel.players %}{{ player|chanview }}{% endfor %} |
||||
|
</div> |
||||
|
|
@ -1,62 +0,0 @@ |
|||||
{% load mumble_extras %} |
|
||||
<div class="mumble"> |
|
||||
<table cellspacing="0" cellpadding="0" style="width:100%; border:none"> |
|
||||
<tr> |
|
||||
<td class="mumble" id="server" colspan="2"> |
|
||||
<img src="/static/mumble/mumble.16x16.png" alt="mumble" /> |
|
||||
<a href="mumble://{% if MumbleAccount %}{{ MumbleAccount.name }}@{% endif %}{{ DBaseObject.addr }}:{{ DBaseObject.port }}/" class="dingen" id="link_server"> |
|
||||
{{ ServerObject.rootName }} |
|
||||
</a> |
|
||||
</tr> |
|
||||
{% for item in ChannelTable %} |
|
||||
<tr> |
|
||||
<td class="mumble" id="{{ item.1.id }}"> |
|
||||
<span {% spaceless %} |
|
||||
{% if item.1.is_channel %} |
|
||||
class="mumble_channel" |
|
||||
{% else %} |
|
||||
class="mumble_player" |
|
||||
{% endif %} |
|
||||
{% endspaceless %} title="{{ item.1.name }}"> |
|
||||
{% spaceless %} |
|
||||
{% for num in item.0|mrange %} |
|
||||
<img src="/static/mumble/linie_v_trans.png" alt="|" /> |
|
||||
{% endfor %} |
|
||||
<img src="/static/mumble/knoten_v_trans.png" alt="+-" /> |
|
||||
{% endspaceless %} |
|
||||
{% if item.1.is_player %} |
|
||||
<img src="/static/mumble/talking_off.png" alt="player" /> |
|
||||
<a id="link_{{ item.1.id }}" class="dingen" href="#" title="{{ item.1.name }}">{{ item.1.name|trunc:30 }}</a> |
|
||||
{% else %} |
|
||||
{% if item.1.linked %} |
|
||||
<img src="/static/mumble/channel_linked.png" alt="linked channel"/> |
|
||||
{% else %} |
|
||||
<img src="/static/mumble/channel.png" alt="channel"/> |
|
||||
{% endif %} |
|
||||
<a href="mumble://{% if MumbleAccount %}{{ MumbleAccount.name }}@{% endif %}{{ DBaseObject.addr }}:{{ DBaseObject.port }}/{% for chan in item.2 %}{{ chan|urlencode }}/{% endfor %}{{ item.1.name|urlencode }}" class="dingen" id="link_{{ item.1.id }}" title="{{ item.1.name }}">{{ item.1.name|trunc:30 }}</a> |
|
||||
{% endif %} |
|
||||
</span> |
|
||||
</td> |
|
||||
<td class="mumble"> |
|
||||
{% if item.1.userid %} |
|
||||
{% if item.1.isAuthed %} |
|
||||
<img src="/static/mumble/authenticated.png" alt="authed" title="Authenticated" /> |
|
||||
{% endif %} |
|
||||
{% if item.1.muted %} |
|
||||
<img src="/static/mumble/muted_server.png" alt="muted" title="Muted by server" /> |
|
||||
{% endif %} |
|
||||
{% if item.1.deafened %} |
|
||||
<img src="/static/mumble/deafened_server.png" alt="deafened" title="Deafened by server" /> |
|
||||
{% endif %} |
|
||||
{% if item.1.selfmuted %} |
|
||||
<img src="/static/mumble/muted_self.png" alt="self-muted" title="Muted by themselves" /> |
|
||||
{% endif %} |
|
||||
{% if item.1.selfdeafened %} |
|
||||
<img src="/static/mumble/deafened_self.png" alt="self-deafened" title="Deafened by themselves" /> |
|
||||
{% endif %} |
|
||||
{% endif %} |
|
||||
</td> |
|
||||
</tr> |
|
||||
{% endfor %} |
|
||||
</table> |
|
||||
</div> |
|
@ -0,0 +1,25 @@ |
|||||
|
{% load mumble_extras %} |
||||
|
<div class="mumble"> |
||||
|
<span class="mumble"> |
||||
|
{% if Player.isAuthed %} |
||||
|
<img src="/static/mumble/authenticated.png" alt="authed" title="Authenticated" /> |
||||
|
{% endif %} |
||||
|
{% if Player.muted %} |
||||
|
<img src="/static/mumble/muted_server.png" alt="muted" title="Muted by server" /> |
||||
|
{% endif %} |
||||
|
{% if Player.deafened %} |
||||
|
<img src="/static/mumble/deafened_server.png" alt="deafened" title="Deafened by server" /> |
||||
|
{% endif %} |
||||
|
{% if Player.selfmuted %} |
||||
|
<img src="/static/mumble/muted_self.png" alt="self-muted" title="Muted by themselves" /> |
||||
|
{% endif %} |
||||
|
{% if Player.selfdeafened %} |
||||
|
<img src="/static/mumble/deafened_self.png" alt="self-deafened" title="Deafened by themselves" /> |
||||
|
{% endif %} |
||||
|
</span> |
||||
|
<span> |
||||
|
<img src="/static/mumble/knoten_v.png" /> |
||||
|
<img src="/static/mumble/talking_off.png" alt="Player" /> |
||||
|
<a id="link_{{ Player.id }}" class="mumble" href="#" title="{{ Player.name }}">{{ Player.name|trunc:30 }}</a> |
||||
|
</span> |
||||
|
</div> |
@ -0,0 +1,9 @@ |
|||||
|
{% load mumble_extras %} |
||||
|
<div style="margin-left: 20px"> |
||||
|
<img src="/static/mumble/mumble.16x16.png" alt="server" /> |
||||
|
<a class="mumble" id="link_server" href="{{ Server|chanurl:MumbleAccount }}">{{ Server.name|trunc:30 }}</a> |
||||
|
</div> |
||||
|
{% for sub in Server.rootchan.subchans %} |
||||
|
{{ sub|chanview:MumbleAccount }} |
||||
|
{% endfor %} |
||||
|
{% for player in Server.rootchan.players %}{{ player|chanview }}{% endfor %} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue