diff --git a/.gitignore b/.gitignore index 914900f..c310ca1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,12 @@ -env/* -sms/db +.Python +bin/ +include/ +lib/ +pip-selfcheck.json + +sms/db/*.db +*.db-shm +*.db-wal + *.pyc -*.swp + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9beb2b2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:2.7-buster + +COPY sms /sms +COPY requirements.txt / +RUN pip install --no-cache-dir -r requirements.txt + +ENTRYPOINT ["python", "/sms/manage.py", "runserver", "0.0.0.0:8000"] diff --git a/README.md b/README.md index 68779a3..fa47c9e 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,90 @@ iMessage SMS database browsing web app ====================================== +This is a fork of jsok's repo [here](https://github.com/jsok/django-imessage). I have refactored some of the code, added functionalities and will continue to added functionalities to it as it seems to be a useful tool that elegantly solves a widely researched and discussed topic, how to read and search Apple's iMessages. + +The readme below is a modified version of jsok's to reflect the changes I've made. What? ----- -iOS stores all your SMS/Messages in a sqlite database. This gets downloaded to your computer each time you backup/sync your phone via iTunes. +iOS and OSX store all your iMessages/SMS texts in a sqlite database. This gets downloaded to your computer each time you backup/sync your phone via iTunes. -This is a django app which allows you to drop your SMS database into it, fire it up and have all your messages in a nice browseable web app. +This is a django app which allows you to drop your iMessage/SMS database(s) into it, fire it up and have all your messages and databases in a nice browseable web app. In addition to just viewing your messages, you can also filter by date and/or query search terms. Why? ---- -Why not? iOS will only show the most recent 100 or so messages on the screen, to view older ones you need to hit "Load Earlier Messages" and wait. Too bad if you want to see messages from last month, or even last year! With this app you can see them all and search them. +Why not? iOS and OSX will only show the most recent 100 or so messages on the screen, to view older ones you need to hit "Load Earlier Messages" and wait. Too bad if you want to see messages from last month, or even last year! With this app you can see them all, go to a specific date for a conversation and/or search them. How? ---- -The SMS database has been analysed by many and its schema is well known. I've taken some of this info and used it to convince django's ORM into reading it. +The iMessage/SMS database has been analysed by many and its schema is well known. I've taken some of this info and used it to convince django's ORM into reading it. + +**For iOS:** + +If you have a jailbroken device: + +* SSH into your device +* Navigate to `/var/mobile/Library/SMS/` +* scp sms.db to your computer + +If you do not have a jailbroken device or you do not want to use ssh: + +* Backup your iphone locally on your computer +* Navigate to `~/Library/Application Support/Mobile Sync/Backup//3d0d7e5fb2ce288813306e4d4636395e047a3d28` +* Copy the db file somewhere + +**For OSX** -You can find the database in your iOS backup: -`~/Library/Application Support/Mobile Sync/Backup//3d0d7e5fb2ce288813306e4d4636395e047a3d28` +* Open terminal.app +* Navigate to `~/Library/Messages/` +* Copy chat.db somewhere + +As of OSX 10.15 and with iCloud message sync on it seems like users cannot access the `~/Library/Messages/` directory (I cannot confirm when or what caused this) so do the following steps instead: + +1. Open terminal.app +2. `open ~/Library/Messages/` +3. Copy `chat.db` to the cloned github directory Screenshot ---------- -![Screenshot](https://raw.github.com/jsok/django-imessage/master/screenshot.png) +![Screenshot](https://raw.github.com/clayshieh/django-imessage/master/messages_screenshot.png) Setup ----- Requirements are: - django 1.4 - - pytz (for timezone info) - - [UiUIKit 2.1](http://code.google.com/p/iphone-universal/) + - pytz + +1. edit `core/settings.py` and set your TIME_ZONE (list of timezones [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)) +2. Then drop your iMessage/SMS database(s) in `sms/db/` +3. run `python manage.py runserver` +4. Navigate to `http://localhost:8000/databases/` and select the database you wish to view + +Navigate to `http://localhost:8000` for instructions in general + +Docker Setup +------------ +1. [Install Docker](https://docs.docker.com/get-docker/) +2. Run the container with the following command: +`docker run -it -p 8000:8000 -v :/sms/db/sms.db clayshieh/django-imessage:latest` +3. Navigate to `http://localhost:8000` + +Updates +------- +9/22/2020 -1. edit `core/settings.py` and set your TIME_ZONE. -2. Then drop your SMS database in `db/sms.db` (rename it). -3. Unzip UiUIKit into `static/UiUIKit` -4. run `manage.py syncdb` -5. `manage.py runserver` -6. Point your browser at `http://localhost:8000/messages`, where you can browse your messages. + - Dockerized the app and updated instructions for OSX + - I have not worked on or updated this app in quite a while. There have been a lot of changes in both iOS and OSX so if you have any issues while using the app please let me know + - I did not realize that issues cannot be opened on forked repos, I will be moving all the code to a new repo and leaving this repo as a pointer once I either get permission from [jsok](https://github.com/jsok) and refactor the code Future TODO ----------- - - Messages.app style timestamps (supressed timestamps when messages are received within a given time delta) - - Some way of searching your messages - - Group chat isn't yet supported + - ~~Messages.app style timestamps (supressed timestamps when messages are received within a given time delta)~~ + - ~~Some way of searching your messages~~ + - Update to Django 1.11 + - Add support attachments if it is a OSX database + - Add contact import support to associate numbers with canonical names + - Add support for group chats + - Convert message data to REST endpoints so UI doesn't hang when loading + - Make setup process user friendly in terms of uploading user db, uploading attachments directory, etc. + - ~~Support multiple database selection~~ + - ~~Add exporting functionality~~ diff --git a/messages_screenshot.png b/messages_screenshot.png new file mode 100644 index 0000000..df43fe4 Binary files /dev/null and b/messages_screenshot.png differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f6acfa2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +Django==1.4 +pytz==2017.3 diff --git a/screenshot.png b/screenshot.png deleted file mode 100644 index 23ab40e..0000000 Binary files a/screenshot.png and /dev/null differ diff --git a/sms/core/__init__.py b/sms/core/__init__.py index e69de29..0abc04c 100644 --- a/sms/core/__init__.py +++ b/sms/core/__init__.py @@ -0,0 +1 @@ +#sms.db \ No newline at end of file diff --git a/sms/core/settings.py b/sms/core/settings.py index ab92c8b..f426791 100644 --- a/sms/core/settings.py +++ b/sms/core/settings.py @@ -1,7 +1,6 @@ # Django settings for sms project. import os from os.path import join -import django PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__)) + '/..' CORE_APP_ROOT = os.path.dirname(os.path.realpath(__file__)) @@ -16,7 +15,7 @@ MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' -DATABASE_NAME = 'sms.db' +DATABASE_NAME = open(join(join(PROJECT_ROOT, 'db'), "db.conf"), "r").read().strip() DATABASE_PATH = join(join(PROJECT_ROOT, 'db'), DATABASE_NAME) DATABASES = { 'default': { @@ -33,7 +32,7 @@ # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # In a Windows environment this must be set to your system time zone. -TIME_ZONE = 'Australia/Sydney' +TIME_ZONE = 'America/Los_Angeles' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html diff --git a/sms/core/urls.py b/sms/core/urls.py index 8329bc0..ee2b84b 100644 --- a/sms/core/urls.py +++ b/sms/core/urls.py @@ -3,7 +3,11 @@ from django.contrib import admin admin.autodiscover() +from . import views + urlpatterns = patterns('', + url(r'^$', views.index), + url(r'^databases/', views.databases), url(r'^messages/', include('messages.urls')), url(r'^admin/', include(admin.site.urls)), ) diff --git a/sms/core/views.py b/sms/core/views.py new file mode 100644 index 0000000..ae381f0 --- /dev/null +++ b/sms/core/views.py @@ -0,0 +1,43 @@ +from django.shortcuts import render +from django.conf import settings +from os.path import join +from os import listdir + + +def index(request): + return render(request, 'home.html', {}) + + +def databases(request): + changed = False + files = listdir(join(join(settings.PROJECT_ROOT, 'db'))) + dbs = [] + for file in files: + if file.endswith(".db"): + dbs.append(file) + selected_db = settings.DATABASE_NAME + config_db = open(join(join(settings.PROJECT_ROOT, 'db'), "db.conf"), "r").read().strip() + + if "select" in request.GET and request.GET["select"]: + select = request.GET["select"].strip() + if select != config_db: + with open(join(join(settings.PROJECT_ROOT, 'db'), "db.conf"), "w") as f: + f.write(select) + + # Jank way of implementing the syncdb functionality below. Works because django hot reloads. + # from django.core.management import execute_from_command_line + # execute_from_command_line("syncdb") + with open(join(settings.CORE_APP_ROOT, "__init__.py"), "w") as f: + f.write("#" + select) + + selected_db = select + config_db = select + changed = True + + context = { + "databases": dbs, + "selected": selected_db, + "config_db": config_db, + "changed": changed + } + return render(request, 'db.html', context) diff --git a/sms/db/.gitignore b/sms/db/.gitignore new file mode 100644 index 0000000..f935021 --- /dev/null +++ b/sms/db/.gitignore @@ -0,0 +1 @@ +!.gitignore diff --git a/sms/db/db.conf b/sms/db/db.conf new file mode 100644 index 0000000..4f6746b --- /dev/null +++ b/sms/db/db.conf @@ -0,0 +1 @@ +sms.db \ No newline at end of file diff --git a/sms/messages/fields.py b/sms/messages/fields.py index f757faf..29aedca 100644 --- a/sms/messages/fields.py +++ b/sms/messages/fields.py @@ -29,10 +29,15 @@ def db_type(self, connection): def to_python(self, value): super(IMessageTimeStampField, self) + try: app_tz = timezone(settings.TIME_ZONE) return datetime.fromtimestamp(value+self.IMESSAGE_DELTA).replace(tzinfo=app_tz) - except: + except ValueError: + # to handle new version of databases (OSX 10.13) + app_tz = timezone(settings.TIME_ZONE) + return datetime.fromtimestamp(value/1000000000 + self.IMESSAGE_DELTA).replace(tzinfo=app_tz) + except Exception: return value diff --git a/sms/messages/urls.py b/sms/messages/urls.py index bfa06b2..bcabbf3 100644 --- a/sms/messages/urls.py +++ b/sms/messages/urls.py @@ -2,5 +2,5 @@ urlpatterns = patterns('messages.views', url(r'^$', 'index'), - url(r'^(?P\d+)/$', 'messages'), + url(r'^(?P\d+)/$', 'messages'), ) diff --git a/sms/messages/views.py b/sms/messages/views.py index beba739..3321a8f 100644 --- a/sms/messages/views.py +++ b/sms/messages/views.py @@ -1,24 +1,175 @@ -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.conf import settings +from django.shortcuts import render +from django.http import HttpResponse from messages.models import Message, Handle -def index(request, template_name="messages/index.html"): +from datetime import datetime, timedelta +from pytz import timezone + +def index(request): context = { "handles": Handle.objects.all() } + return render(request, "messages/index.html", context) - return render_to_response(template_name, - RequestContext(request, context)) - -def messages(request, handle_id, template_name="messages/messages.html"): +def messages(request, handle_id): handle = Handle.objects.get(pk=handle_id) + # filter display + start = None + end = None + search = None + # filtering functions + start_date = None + end_date = None + search_terms_cleaned = [] + + if "start" in request.GET and request.GET["start"]: + start = request.GET["start"] + app_tz = timezone(settings.TIME_ZONE) + start_date = datetime.strptime(request.GET["start"], "%Y-%m-%d").replace(tzinfo=app_tz) + if "end" in request.GET and request.GET["end"]: + end = request.GET["end"] + app_tz = timezone(settings.TIME_ZONE) + end_date = datetime.strptime(request.GET["end"], "%Y-%m-%d").replace(tzinfo=app_tz) + if "search" in request.GET and request.GET["search"]: + search = request.GET["search"] + query = request.GET["search"].upper() + if query: + search_terms = [] + if " OR " in query: + for q in query.split(" OR "): + search_terms.append([q.strip()]) + else: + search_terms.append([query]) + for search_term in search_terms: + tmp = [] + if " AND " in search_term[0]: + for x in search_term[0].split(" AND "): + tmp.append(x.strip()) + else: + tmp = search_term + search_terms_cleaned.append(tmp) + + messages = handle.message_set.all() + + def valid_date(message): + msg_date = message.date + if start_date and msg_date < start_date: + return 0 + if end_date and msg_date > end_date: + return -1 + else: + return 1 + + def valid_search(message): + if message.text: + message_text = message.text.upper() + for search_term in search_terms_cleaned: + if len(search_term) == 1: + if search_term[0] in message_text: + return True + else: + found = True + for search_term_mul in search_term: + if not found: + break + else: + found = search_term_mul in message_text + if found: + return True + return False + + # process filters + datestamps = [] + filtered_messages = [] + if messages: + if start_date or end_date or search_terms_cleaned: + for message in messages: + # date only + if (start_date or end_date) and not search_terms_cleaned: + ret = valid_date(message) + if ret == 0: + continue + elif ret == -1: + break + else: + filtered_messages.append(message) + + # search only + elif search_terms_cleaned and not (start_date or end_date): + ret = valid_search(message) + if ret: + filtered_messages.append(message) + + # both + else: + ret = valid_date(message) + if ret == 0: + continue + elif ret == -1: + break + else: + if valid_search(message): + filtered_messages.append(message) + + else: + filtered_messages = messages + + # process datestamps + if filtered_messages: + last = filtered_messages[0].date + datestamps.append(1) + for n, message in enumerate(filtered_messages): + message_date = message.date + if message_date.month != last.month or message_date.day != last.day or message_date.year != last.year: + datestamps.append(n + 1) + last = message.date + + # process exporting data + def csv_format(): + ret = "" + for message in filtered_messages: + ret += ",".join([str(message.text), str(message.date), str(message.service), str(message.is_from_me)]) + "\n" + return ret + + def json_format(): + ret = [] + for message in filtered_messages: + tmp = {} + tmp["text"] = message.text + tmp["date"] = message.date + tmp["service"] = message.service + tmp["is_from_me"] = message.is_from_me + ret.append(tmp) + return str(ret) + + export_formats = { + "CSV": csv_format, + "JSON": json_format + } + + if "export" in request.GET and request.GET["export"]: + ret = None + export_type = request.GET["export"] + if export_type.upper() in export_formats: + ret = export_formats[export_type]() + else: + ret = "Invalid export format." + return HttpResponse(ret) + context = { "handle": handle, + "messages": filtered_messages, + "datestamps": datestamps, + "start": start, + "end": end, + "search": search, + "export_formats": export_formats.keys() } - return render_to_response(template_name, - RequestContext(request, context)) + return render(request, "messages/messages.html", context) + diff --git a/sms/static/UiUIKit/images/actionButton.png b/sms/static/UiUIKit/images/actionButton.png deleted file mode 100644 index 0f92dfd..0000000 Binary files a/sms/static/UiUIKit/images/actionButton.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/apple-touch-icon.png b/sms/static/UiUIKit/images/apple-touch-icon.png deleted file mode 100644 index 50d8959..0000000 Binary files a/sms/static/UiUIKit/images/apple-touch-icon.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/backButton.png b/sms/static/UiUIKit/images/backButton.png deleted file mode 100644 index e27ea8c..0000000 Binary files a/sms/static/UiUIKit/images/backButton.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/banner-1.png b/sms/static/UiUIKit/images/banner-1.png deleted file mode 100644 index 91727c9..0000000 Binary files a/sms/static/UiUIKit/images/banner-1.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/banner-2.png b/sms/static/UiUIKit/images/banner-2.png deleted file mode 100644 index 2290ba4..0000000 Binary files a/sms/static/UiUIKit/images/banner-2.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/banner-3.png b/sms/static/UiUIKit/images/banner-3.png deleted file mode 100644 index 6637239..0000000 Binary files a/sms/static/UiUIKit/images/banner-3.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/bgHeader.png b/sms/static/UiUIKit/images/bgHeader.png deleted file mode 100644 index 6a54e19..0000000 Binary files a/sms/static/UiUIKit/images/bgHeader.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/bgMetal.png b/sms/static/UiUIKit/images/bgMetal.png deleted file mode 100644 index 99b9b74..0000000 Binary files a/sms/static/UiUIKit/images/bgMetal.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/bglight.png b/sms/static/UiUIKit/images/bglight.png deleted file mode 100644 index ca2acd9..0000000 Binary files a/sms/static/UiUIKit/images/bglight.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/blackbg.png b/sms/static/UiUIKit/images/blackbg.png deleted file mode 100644 index 5234139..0000000 Binary files a/sms/static/UiUIKit/images/blackbg.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/blueButton.png b/sms/static/UiUIKit/images/blueButton.png deleted file mode 100644 index 0cfbee1..0000000 Binary files a/sms/static/UiUIKit/images/blueButton.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/camera-roll.png b/sms/static/UiUIKit/images/camera-roll.png deleted file mode 100644 index e4e4119..0000000 Binary files a/sms/static/UiUIKit/images/camera-roll.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_aqua_l.png b/sms/static/UiUIKit/images/chat_bubbles_aqua_l.png deleted file mode 100644 index 2a8e638..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_aqua_l.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_aqua_r.png b/sms/static/UiUIKit/images/chat_bubbles_aqua_r.png deleted file mode 100644 index cb61fec..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_aqua_r.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_clear_l.png b/sms/static/UiUIKit/images/chat_bubbles_clear_l.png deleted file mode 100644 index 19dc7d6..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_clear_l.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_clear_r.png b/sms/static/UiUIKit/images/chat_bubbles_clear_r.png deleted file mode 100644 index 6194d28..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_clear_r.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_graphite_l.png b/sms/static/UiUIKit/images/chat_bubbles_graphite_l.png deleted file mode 100644 index 2f0f6c0..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_graphite_l.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_graphite_r.png b/sms/static/UiUIKit/images/chat_bubbles_graphite_r.png deleted file mode 100644 index c51369d..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_graphite_r.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_lemon_l.png b/sms/static/UiUIKit/images/chat_bubbles_lemon_l.png deleted file mode 100644 index 7cbdf98..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_lemon_l.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_lemon_r.png b/sms/static/UiUIKit/images/chat_bubbles_lemon_r.png deleted file mode 100644 index 3508405..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_lemon_r.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_lime_l.png b/sms/static/UiUIKit/images/chat_bubbles_lime_l.png deleted file mode 100644 index 4be16be..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_lime_l.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_lime_r.png b/sms/static/UiUIKit/images/chat_bubbles_lime_r.png deleted file mode 100644 index a36ab6c..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_lime_r.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_orange_l.png b/sms/static/UiUIKit/images/chat_bubbles_orange_l.png deleted file mode 100644 index d0fc14d..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_orange_l.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_orange_r.png b/sms/static/UiUIKit/images/chat_bubbles_orange_r.png deleted file mode 100644 index 2c73d6a..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_orange_r.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_pink_l.png b/sms/static/UiUIKit/images/chat_bubbles_pink_l.png deleted file mode 100644 index b811fe3..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_pink_l.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_pink_r.png b/sms/static/UiUIKit/images/chat_bubbles_pink_r.png deleted file mode 100644 index 04d4e7d..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_pink_r.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_purple_l.png b/sms/static/UiUIKit/images/chat_bubbles_purple_l.png deleted file mode 100644 index 345cb24..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_purple_l.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chat_bubbles_purple_r.png b/sms/static/UiUIKit/images/chat_bubbles_purple_r.png deleted file mode 100644 index 1495560..0000000 Binary files a/sms/static/UiUIKit/images/chat_bubbles_purple_r.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chevron.png b/sms/static/UiUIKit/images/chevron.png deleted file mode 100644 index 1f422a9..0000000 Binary files a/sms/static/UiUIKit/images/chevron.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chevron_b.png b/sms/static/UiUIKit/images/chevron_b.png deleted file mode 100644 index 451d311..0000000 Binary files a/sms/static/UiUIKit/images/chevron_b.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chevron_dg.png b/sms/static/UiUIKit/images/chevron_dg.png deleted file mode 100644 index b8590a5..0000000 Binary files a/sms/static/UiUIKit/images/chevron_dg.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/chevron_w.png b/sms/static/UiUIKit/images/chevron_w.png deleted file mode 100644 index 8970e39..0000000 Binary files a/sms/static/UiUIKit/images/chevron_w.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/grayButton.png b/sms/static/UiUIKit/images/grayButton.png deleted file mode 100644 index 83f2c45..0000000 Binary files a/sms/static/UiUIKit/images/grayButton.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/greenButton.png b/sms/static/UiUIKit/images/greenButton.png deleted file mode 100644 index 96ea153..0000000 Binary files a/sms/static/UiUIKit/images/greenButton.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/iphoneuikitlogo.png b/sms/static/UiUIKit/images/iphoneuikitlogo.png deleted file mode 100644 index 0458a8a..0000000 Binary files a/sms/static/UiUIKit/images/iphoneuikitlogo.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/kitbg.png b/sms/static/UiUIKit/images/kitbg.png deleted file mode 100644 index b310430..0000000 Binary files a/sms/static/UiUIKit/images/kitbg.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/list-icon-1.png b/sms/static/UiUIKit/images/list-icon-1.png deleted file mode 100644 index 024451b..0000000 Binary files a/sms/static/UiUIKit/images/list-icon-1.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/list-icon-2.png b/sms/static/UiUIKit/images/list-icon-2.png deleted file mode 100644 index 38cca3f..0000000 Binary files a/sms/static/UiUIKit/images/list-icon-2.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/list-icon-3.png b/sms/static/UiUIKit/images/list-icon-3.png deleted file mode 100644 index 85ff75f..0000000 Binary files a/sms/static/UiUIKit/images/list-icon-3.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/list-icon-4.png b/sms/static/UiUIKit/images/list-icon-4.png deleted file mode 100644 index e8b6e41..0000000 Binary files a/sms/static/UiUIKit/images/list-icon-4.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/list-icon-5.png b/sms/static/UiUIKit/images/list-icon-5.png deleted file mode 100644 index 456dc4f..0000000 Binary files a/sms/static/UiUIKit/images/list-icon-5.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/minid-profile.png b/sms/static/UiUIKit/images/minid-profile.png deleted file mode 100644 index ae10ec8..0000000 Binary files a/sms/static/UiUIKit/images/minid-profile.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/profile-user.png b/sms/static/UiUIKit/images/profile-user.png deleted file mode 100644 index d65596b..0000000 Binary files a/sms/static/UiUIKit/images/profile-user.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/redButton.png b/sms/static/UiUIKit/images/redButton.png deleted file mode 100644 index af24f71..0000000 Binary files a/sms/static/UiUIKit/images/redButton.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/standard-img.png b/sms/static/UiUIKit/images/standard-img.png deleted file mode 100644 index 158d06b..0000000 Binary files a/sms/static/UiUIKit/images/standard-img.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/stripes.png b/sms/static/UiUIKit/images/stripes.png deleted file mode 100644 index 1760f9b..0000000 Binary files a/sms/static/UiUIKit/images/stripes.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/toolButton.png b/sms/static/UiUIKit/images/toolButton.png deleted file mode 100644 index afe4d7a..0000000 Binary files a/sms/static/UiUIKit/images/toolButton.png and /dev/null differ diff --git a/sms/static/UiUIKit/images/whiteButton.png b/sms/static/UiUIKit/images/whiteButton.png deleted file mode 100644 index ce8c9cb..0000000 Binary files a/sms/static/UiUIKit/images/whiteButton.png and /dev/null differ diff --git a/sms/static/UiUIKit/stylesheets/iphone.css b/sms/static/UiUIKit/stylesheets/iphone.css deleted file mode 100644 index d42d3f9..0000000 --- a/sms/static/UiUIKit/stylesheets/iphone.css +++ /dev/null @@ -1,1103 +0,0 @@ -/* - - Universal iPhone UI Kit 1.0 - Author: Diego Martín Lafuente. - E-Mail: dlafuente@gmail.com - AIM: Minidixier - Licence: AGPLv3 - date: 2008-08-09 - - URL: www.minid.net - SVN URL: http://code.google.com/p/iphone-universal/source/checkout - Download: http://code.google.com/p/iphone-universal/downloads/list - - */ - - - body { - background: rgb(197,204,211) url(../images/stripes.png); - font-family: Helvetica; - margin: 0 0 0 10px; - padding: 0; - -webkit-user-select: none; - -webkit-text-size-adjust: none; - } - - - - - - - - - - - - - - - - /* standard header on body */ - - div#header + h1, ul + h1 { - color: rgb(76,86,108); - font: bold 18px Helvetica; - text-shadow: #fff 0 1px 0; - margin: 15px 0 0 10px; - } - - - - /* standard paragraph on body */ - - ul + p, ul.data + p + p, ul.form + p + p { - color: rgb(76,86,108); - font: 14px Helvetica; - text-align: center; - text-shadow: white 0 1px 0; - margin: 0 10px 17px 0; - } - - - - - - - - - - - - - - - - /* headers */ - - div#header { - background: rgb(109,133,163) url(../images/bgHeader.png) repeat-x top; - border-top: 1px solid rgb(205,213,223); - border-bottom: 1px solid rgb(46,55,68); - padding: 10px; - margin: 0 0 0 -10px; - min-height: 44px; - -webkit-box-sizing: border-box; - } - - - div#header h1 { - color: #fff; - font: bold 20px/30px Helvetica; - text-shadow: #2d3642 0 -1px 0; - text-align: center; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - width: 49%; - padding: 5px 0; - margin: 2px 0 0 -24%; - position: absolute; - top: 0; - left: 50%; - } - - div#header a { - color: #FFF; - background: none; - font: bold 12px/30px Helvetica; - border-width: 0 5px; - margin: 0; - padding: 0 3px; - width: auto; - height: 30px; - text-shadow: rgb(46,55,68) 0 -1px 0; - text-overflow: ellipsis; - text-decoration: none; - white-space: nowrap; - position: absolute; - overflow: hidden; - top: 7px; - right: 6px; - -webkit-border-image: url(../images/toolButton.png) 0 5 0 5; - } - - div#header #backButton { - left: 6px; - right: auto; - padding: 0; - max-width: 55px; - border-width: 0 8px 0 14px; - -webkit-border-image: url(../images/backButton.png) 0 8 0 14; - } - - - .Action { - border-width: 0 5px; - -webkit-border-image: url(../images/actionButton.png) 0 5 0 5; - } - - - - div#header ul { - margin-top: 15px; - } - - div#header p { - color: rgb(60,70,80); - font-weight: bold; - font-size: 13px; - text-align: center; - clear: both; - position: absolute; - top: 4px; - left: 35px; - right: 35px; - margin: 0; - text-shadow: #C0CBDB 0 1px 0; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - - div.pre { - height: 60px; - } - - - div.pre h1 { - top: 18px !important; - } - - div.pre a { - top: 25px !important; - right: 6px; - } - - div.pre a#Backbutton { - left: 6px !important; - } - - - - - - /***** List (base) ******/ - - ul { - color: black; - background: #fff; - border: 1px solid #B4B4B4; - font: bold 17px Helvetica; - padding: 0; - margin: 15px 10px 17px 0; - -webkit-border-radius: 8px; - } - - - ul li { - color: #666; - border-top: 1px solid #B4B4B4; - list-style-type: none; - padding: 10px 10px 10px 10px; - } - - - - /* when you have a first LI item on any list */ - - li:first-child { - border-top: 0; - -webkit-border-top-left-radius: 8px; - -webkit-border-top-right-radius: 8px; - } - - li:last-child { - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - } - - - /* universal arrows */ - - ul li.arrow { - background-image: url(../images/chevron.png); - background-position: right center; - background-repeat: no-repeat; - } - - - #plastic ul li.arrow, #metal ul li.arrow { - background-image: url(../images/chevron_dg.png); - background-position: right center; - background-repeat: no-repeat; - } - - - - /* universal links on list */ - - ul li a, li.img a + a { - color: #000; - text-decoration: none; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: block; - padding: 12px 10px 12px 10px; - margin: -10px; - -webkit-tap-highlight-color:rgba(0,0,0,0); - } - - ul li.img a + a { - margin: -10px 10px -20px -5px; - font-size: 17px; - font-weight: bold; - } - - ul li.img a + a + a { - font-size: 14px; - font-weight: normal; - margin-left: -10px; - margin-bottom: -10px; - margin-top: 0; - } - - - ul li.img a + small + a { - margin-left: -5px; - } - - - ul li.img a + small + a + a { - margin-left: -10px; - margin-top: -20px; - margin-bottom: -10px; - font-size: 14px; - font-weight: normal; - } - - ul li.img a + small + a + a + a { - margin-left: 0px !important; - margin-bottom: 0; - } - - - ul li a + a { - color: #000; - font: 14px Helvetica; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: block; - margin: 0; - padding: 0; - } - - ul li a + a + a, ul li.img a + a + a + a, ul li.img a + small + a + a + a { - color: #666; - font: 13px Helvetica; - margin: 0; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: block; - padding: 0; - } - - - - - - /* standard mini-label */ - - ul li small { - color: #369; - font: 17px Helvetica; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: block; - width: 23%; - float: right; - padding: 3px 0px; - } - - - - ul li.arrow small { - padding: 0 15px; - } - - ul li small.counter { - font-size: 17px !important; - line-height: 13px !important; - font-weight: bold; - background: rgb(154,159,170); - color: #fff; - -webkit-border-radius: 11px; - padding: 4px 10px 5px 10px; - display: inline !important; - width: auto; - margin-top: 2px; - } - - - ul li.arrow small.counter { - margin-right: 15px; - } - - - - - /* resize without labels */ - - ul li.arrow a { - width: 95%; - } - - /* with labels */ - - ul li small + a { - width: 75%; - } - - ul li.arrow small + a { - width: 70%; - } - - - - /* images */ - - ul li.img { - padding-left: 115px; - } - - ul li.img a.img { - background: url(../images/standard-img.png) no-repeat; - display: inline-block; - width: 100px; - height: 75px; - margin: -10px 0 -20px -115px; - float: left; - } - - - - /* individuals */ - - - - ul.individual { - border: 0; - background: none; - clear: both; - height: 45px; - } - - ul.individual li { - color: rgb(183,190,205); - background: white; - border: 1px solid rgb(180,180,180); - font-size: 14px; - text-align: center; - -webkit-border-radius: 8px; - -webkit-box-sizing: border-box; - width: 48%; - float:left; - display: block; - padding: 11px 10px 14px 10px; - } - - ul.individual li + li { - float: right; - - } - - - ul.individual li a { - color: rgb(50,79,133); - line-height: 16px; - margin: -11px -10px -14px -10px; - padding: 11px 10px 14px 10px; - -webkit-border-radius: 8px; - } - - ul.individual li a:hover { - color: #fff; - background: #36c; - } - - - - - /* Normal lists and metal */ - - body#normal h4 { - color: #fff; - background: rgb(154,159,170) url(../images/bglight.png) top left repeat-x; - border-top: 1px solid rgb(165,177,186); - text-shadow: #666 0 1px 0; - margin: 0; - padding: 2px 10px; - } - - - body#normal, body#metal { - margin: 0; - padding: 0; - background-color: rgb(255,255,255); - } - - body#normal ul, body#metal ul, body#plastic ul { - -webkit-border-radius: 0; - margin: 0; - border-left: 0; - border-right: 0; - border-top: 0; - } - - body#metal ul { - border-top: 0; - border-bottom: 0; - background: rgb(180,180,180); - } - - - - - body#normal ul li { - font-size: 20px; - } - - body#normal ul li small { - font-size: 16px; - line-height: 28px; - } - - body#normal li, body#metal li { - -webkit-border-radius: 0; - } - - body#normal li em { - font-weight: normal; - font-style: normal; - } - - body#normal h4 + ul { - border-top: 1px solid rgb(152,158,164); - border-bottom: 1px solid rgb(113,125,133); - } - - - body#metal ul li { - border-top: 1px solid rgb(238,238,238); - border-bottom: 1px solid rgb(156,158,165); - background: url(../images/bgMetal.png) top left repeat-x; - font-size: 26px; - text-shadow: #fff 0 1px 0; - } - - body#metal ul li a { - line-height: 26px; - margin: 0; - padding: 13px 0; - } - - body#metal ul li a:hover { - color: rgb(0,0,0); - } - - body#metal ul li:hover small { - color: inherit; - } - - - body#metal ul li a em { - display: block; - font-size: 14px; - font-style: normal; - color: #444; - width: 50%; - line-height: 14px; - } - - body#metal ul li small { - float: right; - position: relative; - margin-top: 10px; - font-weight: bold; - } - - - body#metal ul li.arrow a small { - padding-right: 0; - line-height: 17px; - } - - - body#metal ul li.arrow { - background: url(../images/bgMetal.png) top left repeat-x, - url(../images/chevron_dg.png) right center no-repeat; - } - - - - /* option panel */ - - div#optionpanel { - background: url(../images/blackbg.png) top left repeat-x; - text-align: center; - padding: 20px 10px 15px 10px; - position: absolute; - left: 0; - right: 0; - bottom: 0; - } - - div#optionpanel h2 { - font-size: 17px; - color: #fff; - text-shadow: #000 0 1px 0; - } - - - - - - /***** BUTTONS *****/ - - .button { - color: #fff; - font: bold 20px/46px Helvetica; - text-decoration: none; - text-align: center; - text-shadow: #000 0 1px 0; - border-width: 0px 14px 0px 14px; - display: block; - margin: 3px 0; - } - - .green { -webkit-border-image: url(../images/greenButton.png) 0 14 0 14; } - .red { -webkit-border-image: url(../images/redButton.png) 0 14 0 14; } - - .white { - color: #000; - text-shadow: #fff 0px 1px 0; - -webkit-border-image: url(../images/whiteButton.png) 0 14 0 14; - } - - .black { -webkit-border-image: url(../images/grayButton.png) 0 14 0 14; } - - -/***** FORMS *****/ - -/* fields list */ - - ul.form { - - } - - ul.form li { - padding: 7px 10px; - } - - ul.form li.error { border: 2px solid red; } - ul.form li.error + li.error { border-top: 0; } - - ul.form li:hover { background: #fff; } - - ul li input[type="text"], ul li input[type="password"], ul li textarea, ul li select { - color: #777; - background: #fff url(../.png); /* this is a hack due the default input shadow that iphones uses on textfields */ - border: 0; - font: normal 17px Helvetica; - padding: 0; - display: inline-block; - margin-left: 0px; - width: 100%; - -webkit-appearance: textarea; - } - - ul li textarea { - height: 120px; - padding: 0; - text-indent: -2px; - } - - ul li select { - text-indent: 0px; - background: transparent url(../images/chevron.png) no-repeat 103% 3px; - -webkit-appearance: textfield; - margin-left: -6px; - width: 104%; - } - - ul li input[type="checkbox"], ul li input[type="radio"] { - margin: 0; - color: rgb(50,79,133); - padding: 10px 10px; - } - - ul li input[type="checkbox"]:after, ul li input[type="radio"]:after { - content: attr(title); - font: 17px Helvetica; - display: block; - width: 246px; - margin: -12px 0 0 17px; - } - - - - /**** INFORMATION FIELDS ****/ - - ul.data li h4 { - margin: 10px 0 5px 0; - } - - ul.data li p { - text-align: left; - font-size: 14px; - line-height: 18px; - font-weight: normal; - margin: 0; - } - - ul.data li p + p { margin-top: 10px; } - - - ul.data li { - background: none; - padding: 15px 10px; - color: #222; - } - - ul.data li a { - display: inline; - color: #2E3744; - text-decoration: underline; - } - - - ul.field li small { - position: absolute; - right: 25px; - margin-top: 3px; - z-index: 3; - } - - ul.field li h3 { - color: rgb(76,86,108); - width: 25%; - font-size: 13px; - line-height: 18px; - margin: 0 10px 0 0; - float: left; - text-align: right; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - padding: 0; - } - - ul.field li a { - font-size: 13px; - line-height: 18px; - overflow: visible; - white-space: normal; - display: inline-block; - width: 60%; - padding: 0; - margin: 0 0 0 0; - vertical-align: top; - } - - ul.field li big { - font-size: 13px; - line-height: 18px; - font-weight: normal; - overflow: visible; - white-space: normal; - display: inline-block; - width: 60%; - } - - - - - - - ul.field li small { - font-size: 13px; - font-weight: bold; - } - - - /* this is for profiling */ - - ul.profile { - border: 0; - background: none; - clear: both; - min-height: 62px; - position: relative; - } - - ul.profile li { - background: #fff url(../images/profile-user.png) no-repeat; - border: 1px solid #B4B4B4; - width: 62px; - height: 62px; - -webkit-border-radius: 4px; - -webkit-box-sizing: border-box; - float: left; - } - - ul.profile li + li { - border: 0; - background: none; - width: 70%; - } - - - ul.profile li + li h2, ul.profile li + li p { - color: rgb(46,55,68); - text-shadow: #fff 0 1px 0; - margin: 0; - } - - ul.profile li + li h2 { - font: bold 18px/22px Helvetica; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - - ul.profile li + li p { - font: 14px/18px Helvetica; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - - - /* any A element inside this kind of field list will scale 62x62 */ - - ul.profile li a { - display: block; - width: 62px; - height: 62px; - color: transparent; - } - - - - /***** PLASTIC LISTS *****/ - - body#plastic { - margin: 0; - padding: 0; - background: rgb(173,173,173); - } - - body#plastic ul { - -webkit-border-radius: 0; - margin: 0; - border-left: 0; - border-right: 0; - border-top: 0; - background-color: rgb(173,173,173); - } - - - body#plastic ul li { - -webkit-border-radius: 0; - border-top: 1px solid rgb(191,191,191); - border-bottom: 1px solid rgb(157,157,157); - } - - - body#plastic ul li:nth-child(odd) { - background-color: rgb(152,152,152); - border-top: 1px solid rgb(181,181,181); - border-bottom: 1px solid rgb(138,138,138); - } - - - body#plastic ul + p { - font-size: 11px; - color: #2f3237; - text-shadow: none; - padding: 10px 10px; - } - - body#plastic ul + p strong { - font-size: 14px; - line-height: 18px; - text-shadow: #fff 0 1px 0; - } - - body#plastic ul li a { - text-shadow: rgb(211,211,211) 0 1px 0; - } - - body#plastic ul li:nth-child(odd) a { - text-shadow: rgb(191,191,191) 0 1px 0; - } - - - body#plastic ul li small { - color: #3C3C3C; - text-shadow: rgb(211,211,211) 0 1px 0; - font-size: 13px; - font-weight: bold; - text-transform: uppercase; - line-height: 24px; - } - - - - /**** MINI & BIG BANNERS ****/ - - #plastic ul.minibanner, #plastic ul.bigbanner { - margin: 10px; - border: 0; - height: 81px; - clear: both; - } - - #plastic ul.bigbanner { - height: 140px !important; - } - - #plastic ul.minibanner li { - border: 1px solid rgb(138,138,138); - background-color: rgb(152,152,152); - width: 145px; - height: 81px; - float: left; - -webkit-border-radius: 5px; - padding: 0; - } - - #plastic ul.bigbanner li { - border: 1px solid rgb(138,138,138); - background-color: rgb(152,152,152); - width: 296px; - height: 140px; - float: left; - -webkit-border-radius: 5px; - padding: 0; - margin-bottom: 4px; - } - - #plastic ul.minibanner li:first-child { - margin-right: 6px; - } - - - #plastic ul.minibanner li a { - color: transparent; - text-shadow: none; - display: block; - width: 145px; - height: 81px; - } - - #plastic ul.bigbanner li a { - color: transparent; - text-shadow: none; - display: block; - width: 296px; - height: 145px; - } - - - - /**** CHAT ****/ - - - body#chat { - background: #DBE1ED; - } - - body#chat div.bubble { - margin: 10px 10px 0 0px; - width: 80%; - clear: both; - } - - - - body#chat div.right { - float: right; - } - - body#chat div.left { - float: left; - } - - - body#chat div.right p { - border-width: 10px 20px 12px 10px; - } - - body#chat div.left p { - border-width: 10px 10px 12px 20px; - } - - /* lefties */ - - body#chat div.left p.lime { - -webkit-border-image: url(../images/chat_bubbles_lime_l.png) 10 10 13 19; - } - - body#chat div.left p.lemon { - -webkit-border-image: url(../images/chat_bubbles_lemon_l.png) 10 10 13 19; - } - - body#chat div.left p.orange { - -webkit-border-image: url(../images/chat_bubbles_orange_l.png) 10 10 13 19; - } - - body#chat div.left p.aqua { - -webkit-border-image: url(../images/chat_bubbles_aqua_l.png) 10 10 13 19; - } - - body#chat div.left p.purple { - -webkit-border-image: url(../images/chat_bubbles_purple_l.png) 10 10 13 19; - } - - body#chat div.left p.pink { - -webkit-border-image: url(../images/chat_bubbles_pink_l.png) 10 10 13 19; - } - - body#chat div.left p.graphite { - -webkit-border-image: url(../images/chat_bubbles_graphite_l.png) 10 10 13 19; - } - - body#chat div.left p.clear { - -webkit-border-image: url(../images/chat_bubbles_clear_l.png) 10 10 13 19; - } - - - - - /*rights*/ - - body#chat div.right p.aqua { - -webkit-border-image: url(../images/chat_bubbles_aqua_r.png) 10 19 13 10; - } - - body#chat div.right p.lemon { - -webkit-border-image: url(../images/chat_bubbles_lemon_r.png) 10 19 13 10; - } - - body#chat div.right p.lime { - -webkit-border-image: url(../images/chat_bubbles_lime_r.png) 10 19 13 10; - } - - body#chat div.right p.purple { - -webkit-border-image: url(../images/chat_bubbles_purple_r.png) 10 19 13 10; - } - - body#chat div.right p.pink { - -webkit-border-image: url(../images/chat_bubbles_pink_r.png) 10 19 13 10; - } - - body#chat div.right p.graphite { - -webkit-border-image: url(../images/chat_bubbles_graphite_r.png) 10 19 13 10; - } - - body#chat div.right p.clear { - -webkit-border-image: url(../images/chat_bubbles_clear_r.png) 10 19 13 10; - } - - - - - - - - body#chat div.bubble p { - color: #000; - font-size: 16px; - margin: 0; - } - - body#chat div.bubble + p { - color: #666; - text-align: center; - font-size: 12px; - font-weight: bold; - margin: 0; - padding: 10px 0 0 0; - clear: both; - } - - - - - - - /**** image grids ****/ - - - body#images { - background: #fff; - margin: 0; - } - - body#images ul { - margin: 4px 4px 4px 0; - border: 0; - -webkit-border-radius: 0; - } - - body#images ul li { - border: 1px solid #C0D5DD; - -webkit-border-radius: 0; - width: 73px; - height: 73px; - float: left; - margin: 0 0 4px 4px; - background: #F4FBFE url(../images/image-loading.gif) no-repeat center center; - padding: 0; - } - - body#images ul li a { - display: block; - width: 100%; - height: 100%; - margin: 0; - padding: 0; - } - - - /*** BLANK PAGES ***/ - - body#blank { - background: #fff; - } - - - body#blank p { - color: #898989; - text-align: center; - margin: 250px 0 0 0; - } - - - - - /**** ICONFIED LIST ****/ - - - ul li a img.ico, ul li img.ico { - float: left; - display: block; - margin: -4px 10px -4px -1px; - } - - \ No newline at end of file diff --git a/sms/static/style.css b/sms/static/style.css new file mode 100644 index 0000000..e0e8bad --- /dev/null +++ b/sms/static/style.css @@ -0,0 +1,201 @@ +/*taken from codepen by Captain Anonymous here: https://codepen.io/anon/pen/qdyEPL and modified*/ + +body { + background: white; + font: 14px "Helvetica Neue", Helvetica, Arial, sans-serif; + } +blockquote { + margin: 0 auto; + max-width: 95vw; +} +blockquote>p { + margin: 0 0 0.5em; + border-radius: 1em; + padding: 0.5em 1em; + background: #e5e5ea; + max-width: 75%; + clear: both; + position: relative; +} +p.dateStamp { + margin: 0 auto; + width: 50%; + background: none; + clear: both; + position: relative; + font-size: 14px; + text-align: center; +} +p.timestampThem { + background: none; + max-width: 75%; + clear: both; + position: relative; + float: left; + font-size: 10px; +} +p.timestampMe { + background: none; + max-width: 75%; + clear: both; + position: relative; + float: right; + font-size: 10px; +} +p.them { + float: left; +} +p.them::after { + content: ""; + position: absolute; + left: -0.5em; + bottom: 0; + width: 0.5em; + height: 1em; + border-right: 0.5em solid #e5e5ea; + border-bottom-right-radius: 1em 0.5em; +} +p.meBlue { + float: right; + background-color: #1289fe; + color: white; +} +p.meBlue::after { + content: ""; + position: absolute; + right: -0.5em; + bottom: 0; + width: 0.5em; + height: 1em; + border-left: 0.5em solid #1289fe; + border-bottom-left-radius: 1em 0.5em; +} +p.meGreen { + float: right; + background-color: #65D85E; + color: white; +} +p.meGreen::after { + content: ""; + position: absolute; + right: -0.5em; + bottom: 0; + width: 0.5em; + height: 1em; + border-left: 0.5em solid #65D85E; + border-bottom-left-radius: 1em 0.5em; +} + +/*taken from github gist by joesteinkamp here: https://gist.github.com/joesteinkamp/3396230 and modified*/ +ul { + list-style-type: none; + padding: 0; + background: #fff; +} +a.chat { + display: block; + padding: 9px 10px 5px 10px; + border-bottom: 1px solid #E7E7E7; + -webkit-box-sizing: border-box; + box-sizing: border-box; + text-decoration: none; + font-family: Helvetica, Arial, sans-serif; + font-size: 18px; + font-weight: bold; + color: #000; +} +a.chat:hover, a.chat:active { + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#058cf5), color-stop(100%,#015ee6)); + background: -webkit-linear-gradient(top, #058cf5 0%,#015ee6 100%); + background: linear-gradient(top, #058cf5 0%,#015ee6 100%); + color: #fff; +} +a.chat:after { + content: "〉"; + float: right; + font-weight: bold; + color: #808080; + font-size: 13px; + text-shadow: 1px 0 1px #808080; +} +a:hover:after, a:hover:after { + color: #fff; + text-shadow: 1px 0 1px #fff; +} +a#backButton:after { + content: "〉"; + float: left; + font-weight: bold; + color: #808080; + font-size: 13px; + text-shadow: 1px 0 1px #808080; +} +a:hover:after, a:hover:after { + color: #fff; + text-shadow: 1px 0 1px #fff; +} + +/* taken from w3 here: https://www.w3schools.com/howto/howto_css_modals.asp */ + +.modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1; /* Sit on top */ + padding-top: 100px; /* Location of the box */ + left: 0; + top: 0; + width: 100vw; /* Full width */ + height: 100vh; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ +} + +/* Modal Content */ +.modal-content { + background-color: #fefefe; + margin: auto; + padding: 20px; + border: 1px solid #888; + width: 80%; +} +.modal-content>h3 { + text-align: center; +} +.modal-content>button { + display: block; + margin: 0 auto; +} + +/* The Close Button */ +.close { + color: #aaaaaa; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; +} + +/*custom*/ +#header { + overflow: auto; +} +#actionBar { + padding-top: 9px; +} +label { + font-family: Helvetica, Arial, sans-serif; + font-size: 14px; + color: #000; +} +img { + max-width: 40vw; + max-height: 40vh; + float: right; +} \ No newline at end of file diff --git a/sms/templates/base.html b/sms/templates/base.html index be1a1f9..d0214eb 100644 --- a/sms/templates/base.html +++ b/sms/templates/base.html @@ -4,9 +4,9 @@ {% block title %}{% endblock %} - + - + {% block scripts %}{% endblock %} {%block content %}{% endblock %} diff --git a/sms/templates/db.html b/sms/templates/db.html new file mode 100644 index 0000000..97db11c --- /dev/null +++ b/sms/templates/db.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} +{% block title %}Databases{% endblock %} +{% block scripts %} + +{% endblock %} +{% block content %} + +
+

Currently loaded database: {{selected}}

+

Database in config file: {{config_db}}

+ + + + +
+ +{% endblock %} \ No newline at end of file diff --git a/sms/templates/home.html b/sms/templates/home.html new file mode 100644 index 0000000..2e1476a --- /dev/null +++ b/sms/templates/home.html @@ -0,0 +1,125 @@ + + + + + Django-iMessages + + + +

+ Welcome to Django iMessages +

+

Usage

+

Databases Index

+

+ The databases index page lists all databases found in the db/ folder that end with *.db. You can put multiple + iMessage database files in there and select the one you want to view. There is no need to restart the server + when you change which database is being read and syncdb does not need to be run again if you put in new databases. +

+

+ To see all databases in the directory go here: HERE +

+

Messages Index

+

+ The messages index page lists all conversations found in the database SMS and iMessage alike. Click on the phone number/handle + that you wish to view the conversations for. +

+

+ To see all conversations in the database go here: HERE +

+

Messages

+

+ The messages page shows you the current conversation you are looking at in a Messages style format. All messages + are loaded if not filtered so large conversations may cause the browser to lag when looking at said conversation. +

+ Filter by Date +

+ The messages page supports filtering by date ranges via a date input UI or a GET query parameter. For the date + input UI, simply go to the top right of the message page and select the range of dates for the current conversation you wish + to view and press 'Go'. Because large conversations may take a while for the browser to load, you can also filter + by date via a GET query parameter by adding a query string to the end of the url of the conversation. +

+

+ For example, +

+

+ If you are looking at a conversation with a handle_id of 1 then your URL would be: https://localhost:8000/messages/1/. +

+

+ If you want to filter starting from the date Jan. 2, 2000 and onward then you would navigate to: + https://localhost:8000/messages/1/?start=2000-1-2. +

+

+ If you want to filter between the dates Jan. 2, 2000 and Jan. 3, 2000 then you would navigate to: + https://localhost:8000/messages/1/?start=2000-1-2&end=2000-1-3. +

+

+ If you want to filter up to the date Jan. 2, 2000 then you would navigate to: + https://localhost:8000/messages/1/?end=2000-1-2. +

+ Filter by Search Query +

+ The messages page supports filtering by search query terms via a simple text box or a GET query parameter. For + the search input UI, similar to the date UI, go to the top right of the message page and type in the search query + you wish to search for and press 'Go'. Because large conversations may take a while for the browser to load, you can also filter + by search query via a GET query parameter by adding a query string to the end of the url of the conversation. +

+

+ Currently search only supports the two operators: AND and OR. +

+

+ For example, +

+

+ if you are looking at a conversation with a handle_id of 1 with the following scenarios: +

+

+ 1. A single term "term1" you would navigate to: +

+

+ https://localhost:8000/messages/1/?search=term1 +

+

+ 2. One term or the other "term1" or "term2" you would navigate to: +

+

+ https://localhost:8000/messages/1/?search=term1%20OR%20term2 +

+

+ 3. One term and the other "term1" and "term2" you would navigate to: +

+

+ https://localhost:8000/messages/1/?search=term1%20AND%20term2 +

+ Export Data +

+ You can also export data by clicking on the "Export" button on the top right of this page. The export function + will export the messages in various formats with the currently specified filters if any. +

+

+ Note: +

+
    +
  • Search expects a whitespace before and after the AND and OR operators
  • +
  • AND and OR should not be used in search query terms themselves
  • +
  • Search terms AND and OR can be combined
  • +
  • OR takes precedence over AND meaning x OR y AND z is interpreted as x OR (y AND z)
  • +
  • Case does not matter in search terms
  • +
  • Search and date can be combined
  • +
+

Trouble Shooting

+
    +
  • Did you drag the db file to /sms/db/ and rename it to sms.db?
  • +
  • Did you run python manage.py syncdb?
  • +
+

+ If you are still having issues, feel free to open an issue or email me. +

+ + + + \ No newline at end of file diff --git a/sms/templates/messages/index.html b/sms/templates/messages/index.html index 1be6906..3b56a04 100644 --- a/sms/templates/messages/index.html +++ b/sms/templates/messages/index.html @@ -5,10 +5,13 @@ + diff --git a/sms/templates/messages/messages.html b/sms/templates/messages/messages.html index 8ca07b3..48d326b 100644 --- a/sms/templates/messages/messages.html +++ b/sms/templates/messages/messages.html @@ -1,33 +1,97 @@ {% extends "base.html" %} {% block title %}Messages from {{ handle.id }}{% endblock %} +{% block scripts %} + +{% endblock %} {% block body_id %}chat{% endblock %} {% block content %} -