Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modified for match notification version 1.0 #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions threaded_messages/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
from django.db.models import signals

if "notification" in settings.INSTALLED_APPS:
from notification import models as notification
from notification.models import NoticeType

def create_notice_types(app, created_models, verbosity, **kwargs):
notification.create_notice_type("received_email", "Private messages", "(this is highly recommended)")
signals.post_syncdb.connect(create_notice_types, sender=notification)
NoticeType.create("received_email", "Private messages", "(this is highly recommended)")
import notification
signals.post_syncdb.connect(create_notice_types, sender=notification.models)
else:
print "Skipping creation of NoticeTypes (Threaded Messages) as notification app not found"
122 changes: 122 additions & 0 deletions threaded_messages/static/css/token-input-facebook.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/* Example tokeninput style #2: Facebook style */
ul.token-input-list-facebook {
overflow: hidden;
height: auto !important;
height: 1%;
width: 400px;
border: 1px solid #8496ba;
cursor: text;
font-size: 12px;
font-family: Verdana, sans-serif;
min-height: 1px;
z-index: 999;
margin: 0;
padding: 0;
background-color: #fff;
list-style-type: none;
clear: left;
}

ul.token-input-list-facebook li input {
border: 0;
width: 100px;
padding: 3px 8px;
background-color: white;
margin: 2px 0;
-webkit-appearance: caret;
}

li.token-input-token-facebook {
overflow: hidden;
height: auto !important;
height: 15px;
margin: 3px;
padding: 1px 3px;
background-color: #eff2f7;
color: #000;
cursor: default;
border: 1px solid #ccd5e4;
font-size: 11px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
float: left;
white-space: nowrap;
}

li.token-input-token-facebook p {
display: inline;
padding: 0;
margin: 0;
}

li.token-input-token-facebook span {
color: #a6b3cf;
margin-left: 5px;
font-weight: bold;
cursor: pointer;
}

li.token-input-selected-token-facebook {
background-color: #5670a6;
border: 1px solid #3b5998;
color: #fff;
}

li.token-input-input-token-facebook {
float: left;
margin: 0;
padding: 0;
list-style-type: none;
}

div.token-input-dropdown-facebook {
position: absolute;
width: 400px;
background-color: #fff;
overflow: hidden;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
cursor: default;
font-size: 11px;
font-family: Verdana, sans-serif;
z-index: 1;
}

div.token-input-dropdown-facebook p {
margin: 0;
padding: 5px;
font-weight: bold;
color: #777;
}

div.token-input-dropdown-facebook ul {
margin: 0;
padding: 0;
}

div.token-input-dropdown-facebook ul li {
background-color: #fff;
padding: 3px;
margin: 0;
list-style-type: none;
}

div.token-input-dropdown-facebook ul li.token-input-dropdown-item-facebook {
background-color: #fff;
}

div.token-input-dropdown-facebook ul li.token-input-dropdown-item2-facebook {
background-color: #fff;
}

div.token-input-dropdown-facebook ul li em {
font-weight: bold;
font-style: normal;
}

div.token-input-dropdown-facebook ul li.token-input-selected-dropdown-item-facebook {
background-color: #3b5998;
color: #fff;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% load avatar_tags %}
<div class="message">
<div class="avatar">
<a href="{{ message.sender.get_absolute_url }}">
Expand Down