Browse Source

put kate modelines in {%comment%}s so they don't get written into the HTML, and reindent JS using 2 spaces

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
83192cf0ff
  1. 3
      pyweb/mumble/templates/mumble/channel.html
  2. 3
      pyweb/mumble/templates/mumble/list.html
  3. 3
      pyweb/mumble/templates/mumble/mobile_list.html
  4. 3
      pyweb/mumble/templates/mumble/mobile_mumble.html
  5. 419
      pyweb/mumble/templates/mumble/mumble.html
  6. 3
      pyweb/mumble/templates/mumble/player.html
  7. 3
      pyweb/mumble/templates/mumble/server.html

3
pyweb/mumble/templates/mumble/channel.html

@ -1,3 +1,6 @@
{% comment %}
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
{% endcomment %}
{% load mumble_extras %} {% load mumble_extras %}
<div class="mumble" style="background-image: url( {{ MEDIA_URL }}/mumble/linie_v.png )"> <div class="mumble" style="background-image: url( {{ MEDIA_URL }}/mumble/linie_v.png )">
<img src="{{ MEDIA_URL }}/mumble/knoten_v.png" alt="" /> <img src="{{ MEDIA_URL }}/mumble/knoten_v.png" alt="" />

3
pyweb/mumble/templates/mumble/list.html

@ -1,3 +1,6 @@
{% comment %}
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
{% endcomment %}
{% extends "index.html" %} {% extends "index.html" %}
{% load mumble_extras %} {% load mumble_extras %}
{% block Headline %} {% block Headline %}

3
pyweb/mumble/templates/mumble/mobile_list.html

@ -1,3 +1,6 @@
{% comment %}
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
{% endcomment %}
{% extends "mobile_index.html" %} {% extends "mobile_index.html" %}
{% load mumble_extras %} {% load mumble_extras %}
{% block Headline %} {% block Headline %}

3
pyweb/mumble/templates/mumble/mobile_mumble.html

@ -1,3 +1,6 @@
{% comment %}
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
{% endcomment %}
{% extends "mobile_index.html" %} {% extends "mobile_index.html" %}
{% load mumble_extras %} {% load mumble_extras %}
{% load i18n %} {% load i18n %}

419
pyweb/mumble/templates/mumble/mumble.html

@ -1,3 +1,6 @@
{% comment %}
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
{% endcomment %}
{% extends "index.html" %} {% extends "index.html" %}
{% load mumble_extras %} {% load mumble_extras %}
{% load i18n %} {% load i18n %}
@ -19,21 +22,21 @@
</p> </p>
</noscript> </noscript>
<div id="mumble_ext_container"></div> <div id="mumble_ext_container"></div>
<div id="mumble_motd" class="mumble-ext x-hide-display">
<ul>
{% if DBaseObject.connecturl %}
<li>{% trans "Server Address" %}: <a href="{{ DBaseObject.connecturl }}">{{ DBaseObject.connecturl }}</a></li>
{% endif %}
{% if DBaseObject.url %}
<li>{% trans "Website" %}: {{ DBaseObject.url|urlize }}</li>
{% endif %}
<li>{% trans "Server version" %}: {{ DBaseObject.version.0 }}.{{ DBaseObject.version.1 }}.{{ DBaseObject.version.2 }}</li>
</ul>
<fieldset>
<legend>{% trans "Welcome message" %}</legend>
{{ DBaseObject.motd|removetags:"script link meta html head body style"|safe }}
</fieldset>
</div>
<div id="mumble_motd" class="mumble-ext x-hide-display">
<ul>
{% if DBaseObject.connecturl %}
<li>{% trans "Server Address" %}: <a href="{{ DBaseObject.connecturl }}">{{ DBaseObject.connecturl }}</a></li>
{% endif %}
{% if DBaseObject.url %}
<li>{% trans "Website" %}: {{ DBaseObject.url|urlize }}</li>
{% endif %}
<li>{% trans "Server version" %}: {{ DBaseObject.version.0 }}.{{ DBaseObject.version.1 }}.{{ DBaseObject.version.2 }}</li>
</ul>
<fieldset>
<legend>{% trans "Welcome message" %}</legend>
{{ DBaseObject.motd|removetags:"script link meta html head body style"|safe }}
</fieldset>
</div>
<div id="mumble_registration" class="mumble-ext"> <div id="mumble_registration" class="mumble-ext">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<h2>{% trans "Server registration" %}</h2> <h2>{% trans "Server registration" %}</h2>
@ -63,14 +66,14 @@
{% blocktrans with DBaseObject.id as serverid %} {% blocktrans with DBaseObject.id as serverid %}
You can upload an image that you would like to use as your user texture here. You can upload an image that you would like to use as your user texture here.
{% endblocktrans %}<br /> {% endblocktrans %}<br />
<br />
{% if MumbleAccount.hasTexture %}
<br />
{% if MumbleAccount.hasTexture %}
{% trans "Your current texture is" %}:<br /> {% trans "Your current texture is" %}:<br />
<img src="{% url mumble.views.showTexture DBaseObject.id MumbleAccount.id %}" alt="user texture" /><br /> <img src="{% url mumble.views.showTexture DBaseObject.id MumbleAccount.id %}" alt="user texture" /><br />
{% else %}
{% trans "You don't currently have a texture set" %}.<br />
{% endif %}
<br />
{% else %}
{% trans "You don't currently have a texture set" %}.<br />
{% endif %}
<br />
{% blocktrans with DBaseObject.id as serverid %} {% blocktrans with DBaseObject.id as serverid %}
Hint: The texture image <b>needs</b> to be 600x60 in size. If you upload an image with Hint: The texture image <b>needs</b> to be 600x60 in size. If you upload an image with
a different size, it will be resized accordingly.<br /> a different size, it will be resized accordingly.<br />
@ -154,200 +157,200 @@
{% endblock %} {% endblock %}
{% block HeadTag %} {% block HeadTag %}
<script type="text/javascript">
Ext.onReady( function(){
Ext.get( 'mumble_registration' ).addClass( 'x-hide-display' );
{% if Registered %}
Ext.get( 'mumble_texture' ).addClass( 'x-hide-display' );
{% endif %}
{% if CurrentUserIsAdmin %}
Ext.get( 'mumble_admin' ).addClass( 'x-hide-display' );
{% endif %}
<script type="text/javascript">
Ext.onReady( function(){
Ext.get( 'mumble_registration' ).addClass( 'x-hide-display' );
{% if Registered %}
Ext.get( 'mumble_texture' ).addClass( 'x-hide-display' );
{% endif %}
{% if CurrentUserIsAdmin %}
Ext.get( 'mumble_admin' ).addClass( 'x-hide-display' );
{% endif %}
{% if CurrentUserIsAdmin %}
userRecord = Ext.data.Record.create([
{ name: 'id', type: 'int' },
{ name: 'name', type: 'string' },
{ name: 'password', type: 'string' },
{ name: 'owner', type: 'int' },
{ name: 'admin', type: 'bool' },
{ name: 'delete', type: 'bool' }
]);
{% if CurrentUserIsAdmin %}
userRecord = Ext.data.Record.create([
{ name: 'id', type: 'int' },
{ name: 'name', type: 'string' },
{ name: 'password', type: 'string' },
{ name: 'owner', type: 'int' },
{ name: 'admin', type: 'bool' },
{ name: 'delete', type: 'bool' }
]);
userAdminStore = new Ext.data.Store({
url: '{% url mumble.views.users DBaseObject.id %}',
reader: new Ext.data.JsonReader({
root: 'objects',
fields: userRecord
}),
autoLoad: true,
remoteSort: false
});
userAdminStore = new Ext.data.Store({
url: '{% url mumble.views.users DBaseObject.id %}',
reader: new Ext.data.JsonReader({
root: 'objects',
fields: userRecord
}),
autoLoad: true,
remoteSort: false
});
adminColumn = new Ext.grid.CheckColumn({
header: '{% trans "Admin on root channel" %}',
dataIndex: 'admin',
width: 50
});
adminColumn = new Ext.grid.CheckColumn({
header: '{% trans "Admin on root channel" %}',
dataIndex: 'admin',
width: 50
});
deleteColumn = new Ext.grid.CheckColumn({
header: '{% trans "Delete" %}',
dataIndex: 'delete',
width: 50
});
deleteColumn = new Ext.grid.CheckColumn({
header: '{% trans "Delete" %}',
dataIndex: 'delete',
width: 50
});
ownerCombo = new Ext.form.ComboBox({
name: 'owner',
hiddenName: 'owner_id',
forceSelection: true,
triggerAction: 'all',
valueField: 'uid',
displayField: 'uname',
store: new Ext.data.Store({
url: '{% url mumble.views.djangousers %}',
reader: new Ext.data.JsonReader({
fields: [ 'uid', 'uname' ],
root: 'objects'
}),
autoLoad: true
})
});
{% endif %}
ownerCombo = new Ext.form.ComboBox({
name: 'owner',
hiddenName: 'owner_id',
forceSelection: true,
triggerAction: 'all',
valueField: 'uid',
displayField: 'uname',
store: new Ext.data.Store({
url: '{% url mumble.views.djangousers %}',
reader: new Ext.data.JsonReader({
fields: [ 'uid', 'uname' ],
root: 'objects'
}),
autoLoad: true
})
});
{% endif %}
var cardpanel = new Ext.Panel({
renderTo: 'mumble_ext_container',
layout: 'card',
id: 'mumble_container',
height: 570,
activeItem: 0,
border: false,
items: [ {
id: 'mumble_tabpanel',
xtype: 'tabpanel',
defaults: { autoheight: true },
activeTab: {{ DisplayTab }},
items: [
{ contentEl: 'mumble_motd', title: '{% trans "Server Info" %}', autoScroll: true },
{ contentEl: 'mumble_registration', title: '{% trans "Registration" %}', autoScroll: true,
var cardpanel = new Ext.Panel({
renderTo: 'mumble_ext_container',
layout: 'card',
id: 'mumble_container',
height: 570,
activeItem: 0,
border: false,
items: [ {
id: 'mumble_tabpanel',
xtype: 'tabpanel',
defaults: { autoheight: true },
activeTab: {{ DisplayTab }},
items: [
{ contentEl: 'mumble_motd', title: '{% trans "Server Info" %}', autoScroll: true },
{ contentEl: 'mumble_registration', title: '{% trans "Registration" %}', autoScroll: true,
{% if user.is_authenticated %}
listeners: {
activate: function(){ Ext.fly("id_name").focus() }
}
{% endif %}
},
{% if CurrentUserIsAdmin %}
{ contentEl: 'mumble_admin', title: '{% trans "Administration" %}', autoScroll: true },
{% endif %}
{% if Registered %}
{ contentEl: 'mumble_texture',title: '{% trans "User Texture" %}', autoScroll: true },
{% endif %}
{% if CurrentUserIsAdmin %}
{
title: '{% trans "User List" %}',
xtype: 'editorgrid',
store: userAdminStore,
cm: new Ext.grid.ColumnModel( [ {
header: '{% trans "name" %}',
dataIndex: 'name',
sortable: true,
editor: new Ext.form.TextField({
allowBlank: false
})
}, {
header: '{% trans "Account owner" %}',
dataIndex: 'owner',
editor: ownerCombo,
sortable: true,
renderer: function( value ){
if( value == '' ) return '';
items = ownerCombo.store.data.items;
for( i = 0; i < items.length; i++ )
if( items[i].data.uid == value )
return items[i].data.uname;
}
{% if user.is_authenticated %}
listeners: {
activate: function(){ Ext.fly("id_name").focus() }
}
{% endif %}
},
{% if CurrentUserIsAdmin %}
{ contentEl: 'mumble_admin', title: '{% trans "Administration" %}', autoScroll: true },
{% endif %}
{% if Registered %}
{ contentEl: 'mumble_texture',title: '{% trans "User Texture" %}', autoScroll: true },
{% endif %}
{% if CurrentUserIsAdmin %}
{
title: '{% trans "User List" %}',
xtype: 'editorgrid',
store: userAdminStore,
cm: new Ext.grid.ColumnModel( [ {
header: '{% trans "name" %}',
dataIndex: 'name',
sortable: true,
editor: new Ext.form.TextField({
allowBlank: false
})
}, {
header: '{% trans "Account owner" %}',
dataIndex: 'owner',
editor: ownerCombo,
sortable: true,
renderer: function( value ){
if( value == '' ) return '';
items = ownerCombo.store.data.items;
for( i = 0; i < items.length; i++ )
if( items[i].data.uid == value )
return items[i].data.uname;
}
}, adminColumn, {
header: '{% trans "Change password" %}',
dataIndex: 'password',
editor: new Ext.form.TextField({
inputType: 'password'
}),
renderer: function( value ){
ret = '';
for( i = 0; i < value.length; i++ )
ret += '*';
return ret;
}
}, deleteColumn ] ),
tbar: [{
text: '{% trans "Add" %}',
handler : function(){
userAdminStore.add( new userRecord( {
id: -1,
name: 'New User',
admin: false,
owner: '',
password: '',
'delete': false
} ) );
}
}, {
text: '{% trans "Save" %}',
handler : function(){
data = [];
for( i = 0; i < userAdminStore.data.items.length; i++ ){
rec = userAdminStore.data.items[i];
if( rec.dirty ){
data.push(rec.data);
}
}
var conn = new Ext.data.Connection();
conn.request( {
url: userAdminStore.url,
params: { data: Ext.encode( data ) },
success: function(){
for( i = 0; i < userAdminStore.data.items.length; i++ ){
rec = userAdminStore.data.items[i];
if( rec.data['delete'] == true )
userAdminStore.remove( rec );
else if( rec.dirty ){
rec.commit();
}
}
}
} );
}
}, {
text: '{% trans "Resync with Murmur" %}',
handler: function(){
userAdminStore.reload({
params: { 'resync': 'true' }
});
}
}],
plugins: [ adminColumn, deleteColumn ]
}
{% endif %}
]
},
{% for item in ChannelTable %}
{ contentEl: 'mumble_{{ item.id }}', id: 'carditem_{{ item.id }}' },
{% endfor %}
]
});
}, adminColumn, {
header: '{% trans "Change password" %}',
dataIndex: 'password',
editor: new Ext.form.TextField({
inputType: 'password'
}),
renderer: function( value ){
ret = '';
for( i = 0; i < value.length; i++ )
ret += '*';
return ret;
}
}, deleteColumn ] ),
tbar: [{
text: '{% trans "Add" %}',
handler : function(){
userAdminStore.add( new userRecord( {
id: -1,
name: 'New User',
admin: false,
owner: '',
password: '',
'delete': false
} ) );
}
}, {
text: '{% trans "Save" %}',
handler : function(){
data = [];
for( i = 0; i < userAdminStore.data.items.length; i++ ){
rec = userAdminStore.data.items[i];
if( rec.dirty ){
data.push(rec.data);
}
}
var conn = new Ext.data.Connection();
conn.request( {
url: userAdminStore.url,
params: { data: Ext.encode( data ) },
success: function(){
for( i = 0; i < userAdminStore.data.items.length; i++ ){
rec = userAdminStore.data.items[i];
if( rec.data['delete'] == true )
userAdminStore.remove( rec );
else if( rec.dirty ){
rec.commit();
}
}
}
} );
}
}, {
text: '{% trans "Resync with Murmur" %}',
handler: function(){
userAdminStore.reload({
params: { 'resync': 'true' }
});
}
}],
plugins: [ adminColumn, deleteColumn ]
}
{% endif %}
]
},
{% for item in ChannelTable %}
{ contentEl: 'mumble_{{ item.id }}', id: 'carditem_{{ item.id }}' },
{% endfor %}
]
});
Ext.get( 'link_server' ).on( 'click', function( event, target ){
cardpanel.layout.setActiveItem( 'mumble_tabpanel' );
event.preventDefault();
});
{% for item in ChannelTable %}
Ext.get( 'link_{{ item.id }}' ).on( 'click', function( event, target ){
cardpanel.layout.setActiveItem( 'carditem_{{ item.id }}' );
event.preventDefault();
});
{% endfor %}
} );
</script>
<meta http-equiv="refresh" content="300" />
Ext.get( 'link_server' ).on( 'click', function( event, target ){
cardpanel.layout.setActiveItem( 'mumble_tabpanel' );
event.preventDefault();
});
{% for item in ChannelTable %}
Ext.get( 'link_{{ item.id }}' ).on( 'click', function( event, target ){
cardpanel.layout.setActiveItem( 'carditem_{{ item.id }}' );
event.preventDefault();
});
{% endfor %}
} );
</script>
<meta http-equiv="refresh" content="300" />
{% endblock %} {% endblock %}

3
pyweb/mumble/templates/mumble/player.html

@ -1,3 +1,6 @@
{% comment %}
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
{% endcomment %}
{% load mumble_extras %} {% load mumble_extras %}
{% load i18n %} {% load i18n %}
<div class="mumble" style="background-image: url( {{ MEDIA_URL }}/mumble/linie_v.png )"> <div class="mumble" style="background-image: url( {{ MEDIA_URL }}/mumble/linie_v.png )">

3
pyweb/mumble/templates/mumble/server.html

@ -1,3 +1,6 @@
{% comment %}
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
{% endcomment %}
{% load mumble_extras %} {% load mumble_extras %}
<div style="margin-left: 20px;"> <div style="margin-left: 20px;">
<img src="{{ MEDIA_URL }}/mumble/mumble.16x16.png" alt="server" /> <img src="{{ MEDIA_URL }}/mumble/mumble.16x16.png" alt="server" />

Loading…
Cancel
Save