Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

changes to reflect smartmin 1.4

  • Loading branch information...
commit ecfda86470ed540a3dbedcdd51ec74b7a8e71b1e 1 parent 121c354
Nic Pottier nicpottier authored
BIN  nsms/console/static/console/queued.png
BIN  nsms/console/static/console/sent.png
32 nsms/console/templates/console/message_list.html
@@ -3,13 +3,28 @@
3 3 {% block pre-content %}
4 4 <div class="page-header"><h2>SMS Message Log</h2></div>
5 5 <p>This console displays all messages which have passed through the system. You can search incoming and outgoing messages as well as test functionality in the system through the tester below.</p>
  6 +
  7 +<div class="span10">
  8 + <table class="table">
  9 + <tr>
  10 + <td width="10"><div class="cin">&nbsp;</div></td><td width="120">Incoming test message</td>
  11 + <td width="10"><div class="in">&nbsp;</div></td><td width="120">Incoming message</td>
  12 + <td width="10"><div class="queued">&nbsp;</div></td><td width="120">Outgoing message still unsent</td>
  13 + </tr>
  14 + <tr>
  15 + <td><div class="cout">&nbsp;</div></td><td>Outgoing test message</td>
  16 + <td><div class="delivered">&nbsp;</div></td><td>Outgoing message delivered</td>
  17 + <td><div class="sent">&nbsp;</div></td><td>Outgoing message sent</td>
  18 + </tr>
  19 + </table>
  20 +</div>
6 21 {% endblock %}
7 22
8 23 {% block post-content %}
9 24 <div class="row">
10 25 <br/><br/>
11 26
12   - <div class="tester module span14">
  27 + <div class="tester module span10">
13 28 <div class="page-header">
14 29 <h2>Message Tester</h2>
15 30 </div>
@@ -38,12 +53,12 @@
38 53
39 54 {% block extra-style %}
40 55 <style>
41   - table tbody tr td +td +td +td {
  56 + #pjax table tbody tr td +td +td +td {
42 57 width: 120px;
43 58 text-align: right;
44 59 }
45 60
46   - table tbody tr th +th +th +th {
  61 + #pjax table tbody tr th +th +th +th {
47 62 width: 120px;
48 63 text-align: right;
49 64 }
@@ -76,11 +91,18 @@
76 91 background-image: url("{{ STATIC_URL }}console/queued.png");
77 92 }
78 93
79   - div.console {
  94 + div.cin {
  95 + width: 10px;
  96 + height: 15px;
  97 + background-repeat: no-repeat;
  98 + background-image: url("{{ STATIC_URL }}console/cin.png");
  99 + }
  100 +
  101 + div.cout {
80 102 width: 10px;
81 103 height: 15px;
82 104 background-repeat: no-repeat;
83   - background-image: url("{{ STATIC_URL }}console/console.png");
  105 + background-image: url("{{ STATIC_URL }}console/cout.png");
84 106 }
85 107 </style>
86 108 {% endblock %}
6 nsms/console/views.py
@@ -53,11 +53,13 @@ def get_number(self, obj):
53 53 def get_direction(self, obj):
54 54 if obj.direction == 'I':
55 55 if obj.connection.backend.name == 'console':
56   - style = 'console'
  56 + style = 'cin'
57 57 else:
58 58 style = 'in'
59 59 else:
60   - if obj.status == 'D':
  60 + if obj.connection.backend.name == 'console':
  61 + style = 'cout'
  62 + elif obj.status == 'D':
61 63 style = 'delivered'
62 64 elif obj.status == 'S' or obj.connection.backend.name == 'console':
63 65 style = 'sent'
2  nsms/text/templates/text/text_list.html
@@ -2,7 +2,9 @@
2 2
3 3 {% block pre-content %}
4 4 <div class="page-header"><h2>Translations</h2></div>
  5 +<div class="well">
5 6 Translations provide a way for your to modify the various messages the system might send back to users. You can provide translations in the supported languages, making sure to follow the same format as the original text. Any change you make will immediately take effect.
  7 +</div>
6 8 {% endblock %}
7 9
8 10
16 nsms/text/templates/text/text_update.html
... ... @@ -1,6 +1,6 @@
1 1 {% extends "smartmin/update.html" %}
2 2
3   -{% block form-span %}14{% endblock %}
  3 +{% block form-span %}span12{% endblock %}
4 4
5 5 {% block extra-script %}
6 6 {{ block.super }}
@@ -8,17 +8,17 @@
8 8
9 9 $(function(){
10 10 // add our counter div
11   - $("<div class='counter'>&nbsp;</div>").insertAfter("textarea");
  11 + $("<div class='counter'>&nbsp;</div>").insertBefore("textarea");
12 12
13 13 function updateCounter(){
14 14 var len = $(this).val().length;
15 15
16   - $(this).next().text(len);
  16 + $(this).prev().text(len);
17 17
18 18 if (len > 160){
19   - $(this).next().addClass("long");
  19 + $(this).prev().addClass("long");
20 20 } else {
21   - $(this).next().removeClass("long");
  21 + $(this).prev().removeClass("long");
22 22 }
23 23 }
24 24
@@ -39,8 +39,10 @@
39 39
40 40 .counter {
41 41 float: right;
42   - margin-right: 182px;
43   - width: 65px;
  42 + position: absolute;
  43 + width: 25px;
  44 + margin-left: -45px;
  45 + margin-top: 20px;
44 46 text-align: right;
45 47 font-size: 10px;
46 48 color: #555;

0 comments on commit ecfda86

Please sign in to comment.
Something went wrong with that request. Please try again.