Commit c0f9ba2f08b57b591b6af0f8feb7c6f3a8c35b96
Committed by
GitHub
Exists in
master
and in
5 other branches
Merge pull request #181 from amadeusproject/dev
Deploy Sprint V
Showing
185 changed files
with
8387 additions
and
1375 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 185 files displayed.
amadeus/settings.py
... | ... | @@ -47,12 +47,18 @@ INSTALLED_APPS = [ |
47 | 47 | 'rolepermissions', |
48 | 48 | 'rest_framework', |
49 | 49 | 'django_bootstrap_breadcrumbs', |
50 | + 's3direct', | |
50 | 51 | |
52 | + 'users', | |
51 | 53 | 'core', |
52 | 54 | 'app', |
53 | 55 | 'courses', |
54 | - 'users', | |
55 | 56 | 'forum', |
57 | + 'poll', | |
58 | + 'links', | |
59 | + 'exam', | |
60 | + 'files', | |
61 | + | |
56 | 62 | ] |
57 | 63 | |
58 | 64 | MIDDLEWARE_CLASSES = [ |
... | ... | @@ -191,6 +197,32 @@ MESSAGE_TAGS = { |
191 | 197 | messages_constants.ERROR: 'danger', |
192 | 198 | } |
193 | 199 | |
200 | +#Send email for forgot Password | |
201 | +EMAIL_USE_TLS = True | |
202 | +DEFAULT_FROM_EMAIL = 'test@gmail.com' | |
203 | +SERVER_EMAIL = 'test@gmail.com' | |
204 | +EMAIL_HOST = 'smtp.gmail.com' | |
205 | +EMAIL_PORT = 587 | |
206 | +EMAIL_HOST_USER = 'amadeusteste@gmail.com' | |
207 | +EMAIL_HOST_PASSWORD = 'amadeusteste' | |
208 | +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' | |
209 | + | |
210 | +#s3direct | |
211 | + | |
212 | +# AWS keys | |
213 | +AWS_SECRET_ACCESS_KEY = '' | |
214 | +AWS_ACCESS_KEY_ID = '' | |
215 | +AWS_STORAGE_BUCKET_NAME = '' | |
216 | + | |
217 | +S3DIRECT_REGION = 'sa-east-1' | |
218 | + | |
219 | +from uuid import uuid4 | |
220 | + | |
221 | +S3DIRECT_DESTINATIONS = { | |
222 | + # Specify a non-default bucket for PDFs | |
223 | + 'material': (lambda original_filename: 'uploads/material/'+str(uuid4())+'.pdf', lambda u: True, ['application/pdf']), | |
224 | + | |
225 | +} | |
194 | 226 | |
195 | 227 | try: |
196 | 228 | from .local_settings import * | ... | ... |
amadeus/urls.py
... | ... | @@ -23,9 +23,11 @@ urlpatterns = [ |
23 | 23 | url(r'^home/', include('app.urls', namespace = 'app')), |
24 | 24 | url(r'^course/', include('courses.urls', namespace = 'course')), |
25 | 25 | url(r'^users/', include('users.urls', namespace = 'users')), |
26 | - url(r'^forum/', include('forum.urls', namespace = 'forum')), | |
27 | 26 | url(r'^admin/', admin.site.urls), |
28 | 27 | url(r'^', include('core.urls', namespace = 'core')), |
28 | + | |
29 | + #S3Direct | |
30 | + url(r'^s3direct/', include('s3direct.urls')), | |
29 | 31 | ] |
30 | 32 | |
31 | 33 | urlpatterns += static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT) | ... | ... |
app/templates/home.html
... | ... | @@ -119,11 +119,11 @@ |
119 | 119 | </div> |
120 | 120 | |
121 | 121 | {% else %} |
122 | - <ul class="timeline" style="-webkit-padding-start: 0px"> | |
122 | + | |
123 | 123 | <div id="timeline"> |
124 | 124 | {% include page_template %} |
125 | 125 | </div> |
126 | - </ul> | |
126 | + | |
127 | 127 | {% endif %} |
128 | 128 | |
129 | 129 | <div id="loading" class="alert alert-primary" role="alert" style="display: none"> |
... | ... | @@ -132,14 +132,3 @@ |
132 | 132 | </center> |
133 | 133 | </div> |
134 | 134 | {% endblock %} |
135 | - | |
136 | -{% block rightbar %} | |
137 | - <div class="panel panel-warning"> | |
138 | - <div class="panel-heading"> | |
139 | - <h3 class="panel-title">Pending Stuffs</h3> | |
140 | - </div> | |
141 | - <div class="panel-body"> | |
142 | - <p>{% trans 'No pending tasks at the moment.' %}</p> | |
143 | - </div> | |
144 | - </div> | |
145 | -{% endblock rightbar %} | |
146 | 135 | \ No newline at end of file | ... | ... |
app/templates/home_professor.html
... | ... | @@ -54,24 +54,3 @@ |
54 | 54 | {% endif %} |
55 | 55 | {% endblock %} |
56 | 56 | |
57 | -{% block rightbar %} | |
58 | - <div class="col-md-12"> | |
59 | - <div><div class="panel panel-warning"> | |
60 | - <div class="panel-heading"> | |
61 | - <h3 class="panel-title">{% trans 'Pending Stuffs' %}</h3> | |
62 | - </div> | |
63 | - <div class="panel-body"> | |
64 | - | |
65 | - </div> | |
66 | -</div></div> | |
67 | - <div><div class="panel panel-warning"> | |
68 | - <div class="panel-heading"> | |
69 | - <h3 class="panel-title">{% trans 'Goals' %}</h3> | |
70 | - </div> | |
71 | - <div class="panel-body"> | |
72 | - | |
73 | - </div> | |
74 | -</div></div> | |
75 | - </div> | |
76 | - | |
77 | -{% endblock rightbar %} | ... | ... |
app/templates/home_student.html
app/templates/home_teacher_student_content.html
1 | 1 | {% load static i18n %} |
2 | 2 | |
3 | 3 | {% for notification in objects %} |
4 | - <li {% if not notification.read %}class="not_read"{% endif %}> | |
5 | - <div class="avatar"> | |
6 | - <img src="{{ notification.user.image_url }}"> | |
4 | + | |
5 | + | |
6 | + <div class="well timeLine"> | |
7 | + <div class="row"> | |
8 | + <div class="col-md-12"> | |
9 | + <p><a href="#"></a></p><h6><a href="#"><i>Default Path to Notification</i></a></h6><p></p> | |
10 | + </div> | |
11 | + </div> | |
12 | + <div class="row"> | |
13 | + <div class="col-xs-2 col-md-1"> | |
14 | + <img class="imgTimeLine" src="{{ notification.user.image_url }}"> | |
7 | 15 | </div> |
8 | - <div class="bubble-container"> | |
9 | - <div class="bubble"> | |
10 | - <div class="retweet" style="color: white"> | |
11 | - {{ notification.datetime }} | |
12 | - </div> | |
13 | - <h3>{{ notification.user }}</h3> - <h3>{{ notification.action_resource }}</h3><br/> | |
14 | - <a href="{% url 'core:notification_read' notification.id %}">{{ notification }}</a> | |
15 | - </div> | |
16 | - <div class="arrow"></div> | |
16 | + <div class="col-xs-10 col-md-11"> | |
17 | + <i class="fa fa-pencil-square-o" aria-hidden="true"></i> | |
18 | + <a href=""><h4 class="resource_inline"><b>{{ notification.user }}</b></h4></a> | |
19 | + <p class="resource_inline">{{notification.message}} em : <a href="{% url 'core:notification_read' notification.id %}">Recurso</a></p> | |
20 | + <p class="timePost"><i> {{ notification.datetime|timesince }} {% trans "ago" %} </i></p> | |
17 | 21 | </div> |
18 | - </li> | |
22 | + </div> | |
23 | +</div> | |
19 | 24 | {% endfor %} |
20 | 25 | ... | ... |
core/context_processors.py
... | ... | @@ -5,6 +5,6 @@ def notifications(request): |
5 | 5 | context['notifications'] = None |
6 | 6 | if request.user.is_authenticated: |
7 | 7 | return { |
8 | - 'notifications': Notification.objects.filter(user= request.user, read=False).order_by('-datetime') | |
8 | + 'notifications': Notification.objects.filter(user= request.user, read=False).order_by('-datetime')[0:5] | |
9 | 9 | } |
10 | 10 | return context | ... | ... |
core/forms.py
1 | 1 | from django import forms |
2 | +from datetime import date | |
2 | 3 | from django.utils.translation import ugettext_lazy as _ |
3 | 4 | from users.models import User |
4 | 5 | from pycpfcnpj import cpfcnpj |
... | ... | @@ -15,31 +16,7 @@ class RegisterUserForm(forms.ModelForm): |
15 | 16 | |
16 | 17 | def validate_cpf(self, cpf): |
17 | 18 | cpf = ''.join(re.findall('\d', str(cpf))) |
18 | - # print(cpf) | |
19 | - | |
20 | - # if (not cpf) or (len(cpf) < 11): | |
21 | - # return False | |
22 | - | |
23 | - # #Get only the first 9 digits and generate other 2 | |
24 | - # _int = map(int, cpf) | |
25 | - # integer = list(map(int, cpf)) | |
26 | - # new = integer[:9] | |
27 | - | |
28 | - # while len(new) < 11: | |
29 | - # r = sum([(len(new) + 1 - i)* v for i, v in enumerate(new)]) % 11 | |
30 | - | |
31 | - # if r > 1: | |
32 | - # f = 11 - r | |
33 | - # else: | |
34 | - # f = 0 | |
35 | - # new.append(f) | |
36 | - | |
37 | - # #if generated number is the same(original) the cpf is valid | |
38 | - # new2 = list(new) | |
39 | - # if new2 == _int: | |
40 | - # return cpf | |
41 | - # else: | |
42 | - # return False | |
19 | + | |
43 | 20 | if cpfcnpj.validate(cpf): |
44 | 21 | return True |
45 | 22 | return False |
... | ... | @@ -50,6 +27,13 @@ class RegisterUserForm(forms.ModelForm): |
50 | 27 | raise forms.ValidationError(_('There is already a registered User with this e-mail')) |
51 | 28 | return email |
52 | 29 | |
30 | + def clean_birth_date(self): | |
31 | + birth_date = self.cleaned_data['birth_date'] | |
32 | + if birth_date >= date.today(): | |
33 | + raise forms.ValidationError(_('Please enter a valid date')) | |
34 | + return birth_date | |
35 | + | |
36 | + | |
53 | 37 | def clean_cpf(self): |
54 | 38 | cpf = self.cleaned_data['cpf'] |
55 | 39 | if User.objects.filter(cpf = cpf).exists(): | ... | ... |
core/migrations/0001_initial.py
1 | 1 | # -*- coding: utf-8 -*- |
2 | -# Generated by Django 1.10 on 2016-09-22 05:46 | |
2 | +# Generated by Django 1.10 on 2016-10-05 13:37 | |
3 | 3 | from __future__ import unicode_literals |
4 | 4 | |
5 | 5 | import autoslug.fields |
... | ... | @@ -74,7 +74,7 @@ class Migration(migrations.Migration): |
74 | 74 | fields=[ |
75 | 75 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
76 | 76 | ('name', models.CharField(max_length=100, verbose_name='Name')), |
77 | - ('slug', autoslug.fields.AutoSlugField(editable=False, null=True, populate_from='name', unique=True, verbose_name='Slug')), | |
77 | + ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True, verbose_name='Slug')), | |
78 | 78 | ('created_date', models.DateField(auto_now_add=True, verbose_name='Created Date')), |
79 | 79 | ('url', models.CharField(default='', max_length=100, verbose_name='URL')), |
80 | 80 | ], | ... | ... |
... | ... | @@ -0,0 +1,27 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-10-12 17:29 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.db import migrations, models | |
6 | + | |
7 | + | |
8 | +class Migration(migrations.Migration): | |
9 | + | |
10 | + dependencies = [ | |
11 | + ('core', '0001_initial'), | |
12 | + ] | |
13 | + | |
14 | + operations = [ | |
15 | + migrations.CreateModel( | |
16 | + name='MymeType', | |
17 | + fields=[ | |
18 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
19 | + ('typ', models.CharField(max_length=100, unique=True, verbose_name='Type')), | |
20 | + ('icon', models.CharField(max_length=50, unique=True, verbose_name='Icon')), | |
21 | + ], | |
22 | + options={ | |
23 | + 'verbose_name_plural': 'Amadeus Myme Types', | |
24 | + 'verbose_name': 'Amadeus Myme Type', | |
25 | + }, | |
26 | + ), | |
27 | + ] | ... | ... |
core/models.py
... | ... | @@ -4,22 +4,36 @@ from users.models import User |
4 | 4 | from autoslug.fields import AutoSlugField |
5 | 5 | # Create your models here. |
6 | 6 | |
7 | +class MymeType(models.Model): | |
8 | + typ = models.CharField(_('Type'), max_length=100, unique=True) | |
9 | + icon = models.CharField(_('Icon'), max_length=50, unique=True) | |
10 | + | |
11 | + class Meta: | |
12 | + verbose_name= _('Amadeus Myme Type') | |
13 | + verbose_name_plural = _('Amadeus Myme Types') | |
14 | + | |
15 | + def get_icon(self, type): | |
16 | + pass | |
17 | + | |
18 | + def __str__(self): | |
19 | + return self.typ | |
20 | + | |
7 | 21 | class Action(models.Model): |
8 | 22 | """ |
9 | - It represents an Action on the program by a User such as "create post", | |
23 | + It represents an Action on the program by a User such as "create post", | |
10 | 24 | "visualize post", etc. It is supposed to be created everytime we want an aciton |
11 | 25 | """ |
12 | 26 | |
13 | 27 | name = models.CharField(_('Name'), max_length = 100) |
14 | 28 | created_date = models.DateField(_('Created Date'), auto_now_add=True) |
15 | - | |
29 | + | |
16 | 30 | class Meta: |
17 | 31 | verbose_name = "Action" |
18 | 32 | verbose_name_plural = "Actions" |
19 | 33 | |
20 | 34 | def __str__(self): |
21 | 35 | return self.name |
22 | - | |
36 | + | |
23 | 37 | |
24 | 38 | class Resource(models.Model): |
25 | 39 | """ |
... | ... | @@ -27,38 +41,38 @@ class Resource(models.Model): |
27 | 41 | Example: Pool was answered (Resource: Pool), PDF was visualized(Resource: PDF). |
28 | 42 | |
29 | 43 | Attributes: |
30 | - @name: name of the resource affected, it will be unique because a resource can be affecte | |
44 | + @name: name of the resource affected, it will be unique because a resource can be affecte | |
31 | 45 | by a huge amount of actions |
32 | 46 | @created_date: The date the resource was created |
33 | 47 | @link: Which URL made that resource able to find |
34 | 48 | """ |
35 | 49 | |
36 | 50 | name = models.CharField(_('Name'), max_length =100) |
37 | - slug = AutoSlugField(_("Slug"), populate_from='name', unique=True, null=True) | |
51 | + slug = AutoSlugField(_("Slug"), populate_from='name', unique=True) | |
38 | 52 | created_date = models.DateField(_('Created Date'), auto_now_add=True) |
39 | 53 | url = models.CharField(_('URL'), max_length =100, default="") |
40 | 54 | |
41 | 55 | |
42 | 56 | class Meta: |
43 | 57 | verbose_name = "Resource" |
44 | - verbose_name_plural = "Resources" | |
58 | + verbose_name_plural = "Resources" | |
45 | 59 | |
46 | 60 | def __str__(self): |
47 | 61 | return self.name |
48 | 62 | |
49 | 63 | |
50 | 64 | class Action_Resource(models.Model): |
51 | - | |
65 | + | |
52 | 66 | action = models.ForeignKey(Action , verbose_name= _('Action_Applied')) |
53 | 67 | resource = models.ForeignKey(Resource, verbose_name = _('Resource')) |
54 | - | |
68 | + | |
55 | 69 | class Meta: |
56 | 70 | verbose_name = "Action_Resource" |
57 | 71 | verbose_name_plural = "Action_Resources" |
58 | 72 | |
59 | 73 | def __str__(self): |
60 | 74 | return ''.join([self.action.name, " / ", self.resource.name]) |
61 | - | |
75 | + | |
62 | 76 | |
63 | 77 | class Notification(models.Model): |
64 | 78 | """ |
... | ... | @@ -77,7 +91,7 @@ class Notification(models.Model): |
77 | 91 | datetime = models.DateTimeField(_("Date and Time of action"), auto_now_add = True) |
78 | 92 | action_resource = models.ForeignKey(Action_Resource, verbose_name = _('Action_Resource')) |
79 | 93 | actor = models.ForeignKey(User, related_name = _('%(class)s_Performer'), verbose_name= _('Perfomer'), null = True) |
80 | - | |
94 | + | |
81 | 95 | class Meta: |
82 | 96 | verbose_name = _("Notification") |
83 | 97 | verbose_name_plural = _("Notifications") | ... | ... |
core/static/css/base/amadeus.css
... | ... | @@ -266,7 +266,6 @@ li.alert_li:hover{background-color:#eee} |
266 | 266 | a.alert_message{color : grey} |
267 | 267 | a.alert_message:hover{color : grey} |
268 | 268 | |
269 | -/*=================== Ailson - Please Don't touch*/ | |
270 | 269 | .breadcrumb .divider{ |
271 | 270 | display: none; |
272 | 271 | } |
... | ... | @@ -297,27 +296,41 @@ body .container .jumbotron-inverse, body .container .well-inverse, body .contain |
297 | 296 | color: #000; |
298 | 297 | } |
299 | 298 | |
300 | -.timeline.post { | |
301 | - border-top-left-radius: 8px; | |
302 | - border-top-right-radius: 8px; | |
303 | - padding-bottom: 0px; | |
304 | - -webkit-padding-start: 0px !important; | |
305 | - width: 100%; | |
306 | -} | |
307 | -.timeline.post a { | |
308 | - color: #000; | |
299 | +/*TIMELINE CLASSES BEGIN */ | |
300 | +.resource_inline{ | |
301 | + display: inline-block; | |
309 | 302 | } |
310 | -.timeline.post li { | |
311 | - padding: 10px; | |
312 | - border-bottom: 1px solid #fff; | |
303 | + | |
304 | +.imgTimeLine{ | |
305 | + width: 100%; | |
306 | + height: auto; | |
307 | + padding-top: 10px; | |
313 | 308 | } |
314 | -.timeline.post li:last-child { | |
315 | - border: none; | |
309 | +.timeLine div .col-md-11{ | |
310 | + padding-left: 0px; | |
316 | 311 | } |
317 | -.timeline.post h3 { | |
318 | - margin-top: 5px; | |
312 | +.timeLine div .col-md-11 i{ | |
313 | + padding-right: 5px; | |
319 | 314 | } |
320 | 315 | |
316 | +/*TIMELINE CLASSES END*/ | |
317 | + | |
321 | 318 | .notification-count { |
322 | 319 | background-color: #FF0000; |
323 | 320 | } |
321 | + | |
322 | +.img-list-user{ | |
323 | + width: 150px; | |
324 | + height: 150px; | |
325 | +} | |
326 | + | |
327 | +.datepicker{z-index:9999 !important} | |
328 | + | |
329 | +ul, li { | |
330 | + list-style-type: none !important; | |
331 | + text-decoration: none !important; | |
332 | +} | |
333 | + | |
334 | +.icon_edit_remove{ | |
335 | + float: right; | |
336 | +} | |
324 | 337 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,884 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer { | |
7 | + position: fixed; | |
8 | + z-index: 1981; | |
9 | + top: 0; | |
10 | + right: 0; | |
11 | + bottom: 0; | |
12 | + left: 0; | |
13 | + padding: 0; | |
14 | + margin: 0; | |
15 | + background-color: #252525; | |
16 | + opacity: .5; | |
17 | +} | |
18 | +.alertify .ajs-modal { | |
19 | + position: fixed; | |
20 | + top: 0; | |
21 | + right: 0; | |
22 | + left: 0; | |
23 | + bottom: 0; | |
24 | + padding: 0; | |
25 | + overflow-y: auto; | |
26 | + z-index: 1981; | |
27 | +} | |
28 | +.alertify .ajs-dialog { | |
29 | + position: relative; | |
30 | + margin: 5% auto; | |
31 | + min-height: 110px; | |
32 | + max-width: 500px; | |
33 | + padding: 24px 24px 0 24px; | |
34 | + outline: 0; | |
35 | + background-color: #fff; | |
36 | +} | |
37 | +.alertify .ajs-dialog.ajs-capture:before { | |
38 | + content: ''; | |
39 | + position: absolute; | |
40 | + top: 0; | |
41 | + right: 0; | |
42 | + bottom: 0; | |
43 | + left: 0; | |
44 | + display: block; | |
45 | + z-index: 1; | |
46 | +} | |
47 | +.alertify .ajs-reset { | |
48 | + position: absolute !important; | |
49 | + display: inline !important; | |
50 | + width: 0 !important; | |
51 | + height: 0 !important; | |
52 | + opacity: 0 !important; | |
53 | +} | |
54 | +.alertify .ajs-commands { | |
55 | + position: absolute; | |
56 | + right: 4px; | |
57 | + margin: -14px 24px 0 0; | |
58 | + z-index: 2; | |
59 | +} | |
60 | +.alertify .ajs-commands button { | |
61 | + display: none; | |
62 | + width: 10px; | |
63 | + height: 10px; | |
64 | + margin-left: 10px; | |
65 | + padding: 10px; | |
66 | + border: 0; | |
67 | + background-color: transparent; | |
68 | + background-repeat: no-repeat; | |
69 | + background-position: center; | |
70 | + cursor: pointer; | |
71 | +} | |
72 | +.alertify .ajs-commands button.ajs-close { | |
73 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC); | |
74 | +} | |
75 | +.alertify .ajs-commands button.ajs-maximize { | |
76 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC); | |
77 | +} | |
78 | +.alertify .ajs-header { | |
79 | + margin: -24px; | |
80 | + margin-bottom: 0; | |
81 | + padding: 16px 24px; | |
82 | + background-color: #fff; | |
83 | +} | |
84 | +.alertify .ajs-body { | |
85 | + min-height: 56px; | |
86 | +} | |
87 | +.alertify .ajs-body .ajs-content { | |
88 | + padding: 16px 24px 16px 16px; | |
89 | +} | |
90 | +.alertify .ajs-footer { | |
91 | + padding: 4px; | |
92 | + margin-left: -24px; | |
93 | + margin-right: -24px; | |
94 | + min-height: 43px; | |
95 | + background-color: #fff; | |
96 | +} | |
97 | +.alertify .ajs-footer .ajs-buttons.ajs-primary { | |
98 | + text-align: right; | |
99 | +} | |
100 | +.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button { | |
101 | + margin: 4px; | |
102 | +} | |
103 | +.alertify .ajs-footer .ajs-buttons.ajs-auxiliary { | |
104 | + float: left; | |
105 | + clear: none; | |
106 | + text-align: left; | |
107 | +} | |
108 | +.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button { | |
109 | + margin: 4px; | |
110 | +} | |
111 | +.alertify .ajs-footer .ajs-buttons .ajs-button { | |
112 | + min-width: 88px; | |
113 | + min-height: 35px; | |
114 | +} | |
115 | +.alertify .ajs-handle { | |
116 | + position: absolute; | |
117 | + display: none; | |
118 | + width: 10px; | |
119 | + height: 10px; | |
120 | + right: 0; | |
121 | + bottom: 0; | |
122 | + z-index: 1; | |
123 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==); | |
124 | + -webkit-transform: scaleX(1) /*rtl:scaleX(-1)*/; | |
125 | + transform: scaleX(1) /*rtl:scaleX(-1)*/; | |
126 | + cursor: se-resize; | |
127 | +} | |
128 | +.alertify.ajs-no-overflow .ajs-body .ajs-content { | |
129 | + overflow: hidden !important; | |
130 | +} | |
131 | +.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content { | |
132 | + left: 0; | |
133 | + right: 0; | |
134 | + padding: 0; | |
135 | +} | |
136 | +.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body { | |
137 | + margin-left: -24px; | |
138 | + margin-right: -24px; | |
139 | +} | |
140 | +.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content { | |
141 | + padding: 0; | |
142 | +} | |
143 | +.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content { | |
144 | + left: 0; | |
145 | + right: 0; | |
146 | +} | |
147 | +.alertify.ajs-maximizable .ajs-commands button.ajs-maximize, | |
148 | +.alertify.ajs-maximizable .ajs-commands button.ajs-restore { | |
149 | + display: inline-block; | |
150 | +} | |
151 | +.alertify.ajs-closable .ajs-commands button.ajs-close { | |
152 | + display: inline-block; | |
153 | +} | |
154 | +.alertify.ajs-maximized .ajs-dialog { | |
155 | + width: 100% !important; | |
156 | + height: 100% !important; | |
157 | + max-width: none !important; | |
158 | + margin: 0 auto !important; | |
159 | + top: 0 !important; | |
160 | + left: 0 !important; | |
161 | +} | |
162 | +.alertify.ajs-maximized.ajs-modeless .ajs-modal { | |
163 | + position: fixed !important; | |
164 | + min-height: 100% !important; | |
165 | + max-height: none !important; | |
166 | + margin: 0 !important; | |
167 | +} | |
168 | +.alertify.ajs-maximized .ajs-commands button.ajs-maximize { | |
169 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=); | |
170 | +} | |
171 | +.alertify.ajs-resizable .ajs-dialog, | |
172 | +.alertify.ajs-maximized .ajs-dialog { | |
173 | + padding: 0; | |
174 | +} | |
175 | +.alertify.ajs-resizable .ajs-commands, | |
176 | +.alertify.ajs-maximized .ajs-commands { | |
177 | + margin: 14px 24px 0 0; | |
178 | +} | |
179 | +.alertify.ajs-resizable .ajs-header, | |
180 | +.alertify.ajs-maximized .ajs-header { | |
181 | + position: absolute; | |
182 | + top: 0; | |
183 | + left: 0; | |
184 | + right: 0; | |
185 | + margin: 0; | |
186 | + padding: 16px 24px; | |
187 | +} | |
188 | +.alertify.ajs-resizable .ajs-body, | |
189 | +.alertify.ajs-maximized .ajs-body { | |
190 | + min-height: 224px; | |
191 | + display: inline-block; | |
192 | +} | |
193 | +.alertify.ajs-resizable .ajs-body .ajs-content, | |
194 | +.alertify.ajs-maximized .ajs-body .ajs-content { | |
195 | + position: absolute; | |
196 | + top: 50px; | |
197 | + right: 24px; | |
198 | + bottom: 50px; | |
199 | + left: 24px; | |
200 | + overflow: auto; | |
201 | +} | |
202 | +.alertify.ajs-resizable .ajs-footer, | |
203 | +.alertify.ajs-maximized .ajs-footer { | |
204 | + position: absolute; | |
205 | + left: 0; | |
206 | + right: 0; | |
207 | + bottom: 0; | |
208 | + margin: 0; | |
209 | +} | |
210 | +.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog { | |
211 | + min-width: 548px; | |
212 | +} | |
213 | +.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle { | |
214 | + display: block; | |
215 | +} | |
216 | +.alertify.ajs-movable:not(.ajs-maximized) .ajs-header { | |
217 | + cursor: move; | |
218 | +} | |
219 | +.alertify.ajs-modeless .ajs-dimmer, | |
220 | +.alertify.ajs-modeless .ajs-reset { | |
221 | + display: none; | |
222 | +} | |
223 | +.alertify.ajs-modeless .ajs-modal { | |
224 | + overflow: visible; | |
225 | + max-width: none; | |
226 | + max-height: 0; | |
227 | +} | |
228 | +.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin { | |
229 | + display: inline-block; | |
230 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC); | |
231 | +} | |
232 | +.alertify.ajs-modeless.ajs-unpinned .ajs-modal { | |
233 | + position: absolute; | |
234 | +} | |
235 | +.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin { | |
236 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=); | |
237 | +} | |
238 | +.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body { | |
239 | + max-height: 500px; | |
240 | + overflow: auto; | |
241 | +} | |
242 | +.alertify.ajs-basic .ajs-header { | |
243 | + opacity: 0; | |
244 | +} | |
245 | +.alertify.ajs-basic .ajs-footer { | |
246 | + visibility: hidden; | |
247 | +} | |
248 | +.alertify.ajs-frameless .ajs-header { | |
249 | + position: absolute; | |
250 | + top: 0; | |
251 | + left: 0; | |
252 | + right: 0; | |
253 | + min-height: 60px; | |
254 | + margin: 0; | |
255 | + padding: 0; | |
256 | + opacity: 0; | |
257 | + z-index: 1; | |
258 | +} | |
259 | +.alertify.ajs-frameless .ajs-footer { | |
260 | + display: none; | |
261 | +} | |
262 | +.alertify.ajs-frameless .ajs-body .ajs-content { | |
263 | + position: absolute; | |
264 | + top: 0; | |
265 | + right: 0; | |
266 | + bottom: 0; | |
267 | + left: 0; | |
268 | +} | |
269 | +.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog { | |
270 | + padding-top: 0; | |
271 | +} | |
272 | +.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands { | |
273 | + margin-top: 0; | |
274 | +} | |
275 | +.ajs-no-overflow { | |
276 | + overflow: hidden !important; | |
277 | + outline: none; | |
278 | +} | |
279 | +.ajs-no-overflow.ajs-fixed { | |
280 | + position: fixed; | |
281 | + top: 0; | |
282 | + right: 0; | |
283 | + bottom: 0; | |
284 | + left: 0; | |
285 | + overflow-y: scroll!important; | |
286 | +} | |
287 | +.ajs-no-selection, | |
288 | +.ajs-no-selection * { | |
289 | + -webkit-user-select: none; | |
290 | + -moz-user-select: none; | |
291 | + -ms-user-select: none; | |
292 | + user-select: none; | |
293 | +} | |
294 | +@media screen and (max-width: 568px) { | |
295 | + .alertify .ajs-dialog { | |
296 | + min-width: 150px; | |
297 | + } | |
298 | + .alertify:not(.ajs-maximized) .ajs-modal { | |
299 | + padding: 0 5%; | |
300 | + } | |
301 | + .alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog { | |
302 | + min-width: initial; | |
303 | + min-width: auto /*IE fallback*/; | |
304 | + } | |
305 | +} | |
306 | +@-moz-document url-prefix() { | |
307 | + .alertify button:focus { | |
308 | + outline: 1px dotted #3593D2; | |
309 | + } | |
310 | +} | |
311 | +.alertify .ajs-dimmer, | |
312 | +.alertify .ajs-modal { | |
313 | + -webkit-transform: translate3d(0, 0, 0); | |
314 | + transform: translate3d(0, 0, 0); | |
315 | + transition-property: opacity, visibility; | |
316 | + transition-timing-function: linear; | |
317 | + transition-duration: 250ms; | |
318 | +} | |
319 | +.alertify.ajs-hidden .ajs-dimmer, | |
320 | +.alertify.ajs-hidden .ajs-modal { | |
321 | + visibility: hidden; | |
322 | + opacity: 0; | |
323 | +} | |
324 | +.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
325 | + -webkit-animation-duration: 500ms; | |
326 | + animation-duration: 500ms; | |
327 | +} | |
328 | +.alertify.ajs-out.ajs-hidden .ajs-dialog { | |
329 | + -webkit-animation-duration: 250ms; | |
330 | + animation-duration: 250ms; | |
331 | +} | |
332 | +.alertify .ajs-dialog.ajs-shake { | |
333 | + -webkit-animation-name: ajs-shake; | |
334 | + animation-name: ajs-shake; | |
335 | + -webkit-animation-duration: .1s; | |
336 | + animation-duration: .1s; | |
337 | + -webkit-animation-fill-mode: both; | |
338 | + animation-fill-mode: both; | |
339 | +} | |
340 | +@-webkit-keyframes ajs-shake { | |
341 | + 0%, | |
342 | + 100% { | |
343 | + -webkit-transform: translate3d(0, 0, 0); | |
344 | + transform: translate3d(0, 0, 0); | |
345 | + } | |
346 | + 10%, | |
347 | + 30%, | |
348 | + 50%, | |
349 | + 70%, | |
350 | + 90% { | |
351 | + -webkit-transform: translate3d(-10px, 0, 0); | |
352 | + transform: translate3d(-10px, 0, 0); | |
353 | + } | |
354 | + 20%, | |
355 | + 40%, | |
356 | + 60%, | |
357 | + 80% { | |
358 | + -webkit-transform: translate3d(10px, 0, 0); | |
359 | + transform: translate3d(10px, 0, 0); | |
360 | + } | |
361 | +} | |
362 | +@keyframes ajs-shake { | |
363 | + 0%, | |
364 | + 100% { | |
365 | + -webkit-transform: translate3d(0, 0, 0); | |
366 | + transform: translate3d(0, 0, 0); | |
367 | + } | |
368 | + 10%, | |
369 | + 30%, | |
370 | + 50%, | |
371 | + 70%, | |
372 | + 90% { | |
373 | + -webkit-transform: translate3d(-10px, 0, 0); | |
374 | + transform: translate3d(-10px, 0, 0); | |
375 | + } | |
376 | + 20%, | |
377 | + 40%, | |
378 | + 60%, | |
379 | + 80% { | |
380 | + -webkit-transform: translate3d(10px, 0, 0); | |
381 | + transform: translate3d(10px, 0, 0); | |
382 | + } | |
383 | +} | |
384 | +.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
385 | + -webkit-animation-name: ajs-slideIn; | |
386 | + animation-name: ajs-slideIn; | |
387 | + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); | |
388 | + animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); | |
389 | +} | |
390 | +.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog { | |
391 | + -webkit-animation-name: ajs-slideOut; | |
392 | + animation-name: ajs-slideOut; | |
393 | + -webkit-animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045); | |
394 | + animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045); | |
395 | +} | |
396 | +.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
397 | + -webkit-animation-name: ajs-zoomIn; | |
398 | + animation-name: ajs-zoomIn; | |
399 | +} | |
400 | +.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog { | |
401 | + -webkit-animation-name: ajs-zoomOut; | |
402 | + animation-name: ajs-zoomOut; | |
403 | +} | |
404 | +.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
405 | + -webkit-animation-name: ajs-fadeIn; | |
406 | + animation-name: ajs-fadeIn; | |
407 | +} | |
408 | +.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog { | |
409 | + -webkit-animation-name: ajs-fadeOut; | |
410 | + animation-name: ajs-fadeOut; | |
411 | +} | |
412 | +.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
413 | + -webkit-animation-name: ajs-pulseIn; | |
414 | + animation-name: ajs-pulseIn; | |
415 | +} | |
416 | +.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog { | |
417 | + -webkit-animation-name: ajs-pulseOut; | |
418 | + animation-name: ajs-pulseOut; | |
419 | +} | |
420 | +.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
421 | + -webkit-animation-name: ajs-flipInX; | |
422 | + animation-name: ajs-flipInX; | |
423 | +} | |
424 | +.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog { | |
425 | + -webkit-animation-name: ajs-flipOutX; | |
426 | + animation-name: ajs-flipOutX; | |
427 | +} | |
428 | +.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
429 | + -webkit-animation-name: ajs-flipInY; | |
430 | + animation-name: ajs-flipInY; | |
431 | +} | |
432 | +.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog { | |
433 | + -webkit-animation-name: ajs-flipOutY; | |
434 | + animation-name: ajs-flipOutY; | |
435 | +} | |
436 | +@-webkit-keyframes ajs-pulseIn { | |
437 | + 0%, | |
438 | + 20%, | |
439 | + 40%, | |
440 | + 60%, | |
441 | + 80%, | |
442 | + 100% { | |
443 | + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); | |
444 | + } | |
445 | + 0% { | |
446 | + opacity: 0; | |
447 | + -webkit-transform: scale3d(0.3, 0.3, 0.3); | |
448 | + transform: scale3d(0.3, 0.3, 0.3); | |
449 | + } | |
450 | + 20% { | |
451 | + -webkit-transform: scale3d(1.1, 1.1, 1.1); | |
452 | + transform: scale3d(1.1, 1.1, 1.1); | |
453 | + } | |
454 | + 40% { | |
455 | + -webkit-transform: scale3d(0.9, 0.9, 0.9); | |
456 | + transform: scale3d(0.9, 0.9, 0.9); | |
457 | + } | |
458 | + 60% { | |
459 | + opacity: 1; | |
460 | + -webkit-transform: scale3d(1.03, 1.03, 1.03); | |
461 | + transform: scale3d(1.03, 1.03, 1.03); | |
462 | + } | |
463 | + 80% { | |
464 | + -webkit-transform: scale3d(0.97, 0.97, 0.97); | |
465 | + transform: scale3d(0.97, 0.97, 0.97); | |
466 | + } | |
467 | + 100% { | |
468 | + opacity: 1; | |
469 | + -webkit-transform: scale3d(1, 1, 1); | |
470 | + transform: scale3d(1, 1, 1); | |
471 | + } | |
472 | +} | |
473 | +@keyframes ajs-pulseIn { | |
474 | + 0%, | |
475 | + 20%, | |
476 | + 40%, | |
477 | + 60%, | |
478 | + 80%, | |
479 | + 100% { | |
480 | + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); | |
481 | + } | |
482 | + 0% { | |
483 | + opacity: 0; | |
484 | + -webkit-transform: scale3d(0.3, 0.3, 0.3); | |
485 | + transform: scale3d(0.3, 0.3, 0.3); | |
486 | + } | |
487 | + 20% { | |
488 | + -webkit-transform: scale3d(1.1, 1.1, 1.1); | |
489 | + transform: scale3d(1.1, 1.1, 1.1); | |
490 | + } | |
491 | + 40% { | |
492 | + -webkit-transform: scale3d(0.9, 0.9, 0.9); | |
493 | + transform: scale3d(0.9, 0.9, 0.9); | |
494 | + } | |
495 | + 60% { | |
496 | + opacity: 1; | |
497 | + -webkit-transform: scale3d(1.03, 1.03, 1.03); | |
498 | + transform: scale3d(1.03, 1.03, 1.03); | |
499 | + } | |
500 | + 80% { | |
501 | + -webkit-transform: scale3d(0.97, 0.97, 0.97); | |
502 | + transform: scale3d(0.97, 0.97, 0.97); | |
503 | + } | |
504 | + 100% { | |
505 | + opacity: 1; | |
506 | + -webkit-transform: scale3d(1, 1, 1); | |
507 | + transform: scale3d(1, 1, 1); | |
508 | + } | |
509 | +} | |
510 | +@-webkit-keyframes ajs-pulseOut { | |
511 | + 20% { | |
512 | + -webkit-transform: scale3d(0.9, 0.9, 0.9); | |
513 | + transform: scale3d(0.9, 0.9, 0.9); | |
514 | + } | |
515 | + 50%, | |
516 | + 55% { | |
517 | + opacity: 1; | |
518 | + -webkit-transform: scale3d(1.1, 1.1, 1.1); | |
519 | + transform: scale3d(1.1, 1.1, 1.1); | |
520 | + } | |
521 | + 100% { | |
522 | + opacity: 0; | |
523 | + -webkit-transform: scale3d(0.3, 0.3, 0.3); | |
524 | + transform: scale3d(0.3, 0.3, 0.3); | |
525 | + } | |
526 | +} | |
527 | +@keyframes ajs-pulseOut { | |
528 | + 20% { | |
529 | + -webkit-transform: scale3d(0.9, 0.9, 0.9); | |
530 | + transform: scale3d(0.9, 0.9, 0.9); | |
531 | + } | |
532 | + 50%, | |
533 | + 55% { | |
534 | + opacity: 1; | |
535 | + -webkit-transform: scale3d(1.1, 1.1, 1.1); | |
536 | + transform: scale3d(1.1, 1.1, 1.1); | |
537 | + } | |
538 | + 100% { | |
539 | + opacity: 0; | |
540 | + -webkit-transform: scale3d(0.3, 0.3, 0.3); | |
541 | + transform: scale3d(0.3, 0.3, 0.3); | |
542 | + } | |
543 | +} | |
544 | +@-webkit-keyframes ajs-zoomIn { | |
545 | + 0% { | |
546 | + opacity: 0; | |
547 | + -webkit-transform: scale3d(0.25, 0.25, 0.25); | |
548 | + transform: scale3d(0.25, 0.25, 0.25); | |
549 | + } | |
550 | + 100% { | |
551 | + opacity: 1; | |
552 | + -webkit-transform: scale3d(1, 1, 1); | |
553 | + transform: scale3d(1, 1, 1); | |
554 | + } | |
555 | +} | |
556 | +@keyframes ajs-zoomIn { | |
557 | + 0% { | |
558 | + opacity: 0; | |
559 | + -webkit-transform: scale3d(0.25, 0.25, 0.25); | |
560 | + transform: scale3d(0.25, 0.25, 0.25); | |
561 | + } | |
562 | + 100% { | |
563 | + opacity: 1; | |
564 | + -webkit-transform: scale3d(1, 1, 1); | |
565 | + transform: scale3d(1, 1, 1); | |
566 | + } | |
567 | +} | |
568 | +@-webkit-keyframes ajs-zoomOut { | |
569 | + 0% { | |
570 | + opacity: 1; | |
571 | + -webkit-transform: scale3d(1, 1, 1); | |
572 | + transform: scale3d(1, 1, 1); | |
573 | + } | |
574 | + 100% { | |
575 | + opacity: 0; | |
576 | + -webkit-transform: scale3d(0.25, 0.25, 0.25); | |
577 | + transform: scale3d(0.25, 0.25, 0.25); | |
578 | + } | |
579 | +} | |
580 | +@keyframes ajs-zoomOut { | |
581 | + 0% { | |
582 | + opacity: 1; | |
583 | + -webkit-transform: scale3d(1, 1, 1); | |
584 | + transform: scale3d(1, 1, 1); | |
585 | + } | |
586 | + 100% { | |
587 | + opacity: 0; | |
588 | + -webkit-transform: scale3d(0.25, 0.25, 0.25); | |
589 | + transform: scale3d(0.25, 0.25, 0.25); | |
590 | + } | |
591 | +} | |
592 | +@-webkit-keyframes ajs-fadeIn { | |
593 | + 0% { | |
594 | + opacity: 0; | |
595 | + } | |
596 | + 100% { | |
597 | + opacity: 1; | |
598 | + } | |
599 | +} | |
600 | +@keyframes ajs-fadeIn { | |
601 | + 0% { | |
602 | + opacity: 0; | |
603 | + } | |
604 | + 100% { | |
605 | + opacity: 1; | |
606 | + } | |
607 | +} | |
608 | +@-webkit-keyframes ajs-fadeOut { | |
609 | + 0% { | |
610 | + opacity: 1; | |
611 | + } | |
612 | + 100% { | |
613 | + opacity: 0; | |
614 | + } | |
615 | +} | |
616 | +@keyframes ajs-fadeOut { | |
617 | + 0% { | |
618 | + opacity: 1; | |
619 | + } | |
620 | + 100% { | |
621 | + opacity: 0; | |
622 | + } | |
623 | +} | |
624 | +@-webkit-keyframes ajs-flipInX { | |
625 | + 0% { | |
626 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); | |
627 | + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); | |
628 | + transition-timing-function: ease-in; | |
629 | + opacity: 0; | |
630 | + } | |
631 | + 40% { | |
632 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); | |
633 | + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); | |
634 | + transition-timing-function: ease-in; | |
635 | + } | |
636 | + 60% { | |
637 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); | |
638 | + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); | |
639 | + opacity: 1; | |
640 | + } | |
641 | + 80% { | |
642 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); | |
643 | + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); | |
644 | + } | |
645 | + 100% { | |
646 | + -webkit-transform: perspective(400px); | |
647 | + transform: perspective(400px); | |
648 | + } | |
649 | +} | |
650 | +@keyframes ajs-flipInX { | |
651 | + 0% { | |
652 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); | |
653 | + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); | |
654 | + transition-timing-function: ease-in; | |
655 | + opacity: 0; | |
656 | + } | |
657 | + 40% { | |
658 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); | |
659 | + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); | |
660 | + transition-timing-function: ease-in; | |
661 | + } | |
662 | + 60% { | |
663 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); | |
664 | + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); | |
665 | + opacity: 1; | |
666 | + } | |
667 | + 80% { | |
668 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); | |
669 | + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); | |
670 | + } | |
671 | + 100% { | |
672 | + -webkit-transform: perspective(400px); | |
673 | + transform: perspective(400px); | |
674 | + } | |
675 | +} | |
676 | +@-webkit-keyframes ajs-flipOutX { | |
677 | + 0% { | |
678 | + -webkit-transform: perspective(400px); | |
679 | + transform: perspective(400px); | |
680 | + } | |
681 | + 30% { | |
682 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); | |
683 | + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); | |
684 | + opacity: 1; | |
685 | + } | |
686 | + 100% { | |
687 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); | |
688 | + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); | |
689 | + opacity: 0; | |
690 | + } | |
691 | +} | |
692 | +@keyframes ajs-flipOutX { | |
693 | + 0% { | |
694 | + -webkit-transform: perspective(400px); | |
695 | + transform: perspective(400px); | |
696 | + } | |
697 | + 30% { | |
698 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); | |
699 | + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); | |
700 | + opacity: 1; | |
701 | + } | |
702 | + 100% { | |
703 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); | |
704 | + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); | |
705 | + opacity: 0; | |
706 | + } | |
707 | +} | |
708 | +@-webkit-keyframes ajs-flipInY { | |
709 | + 0% { | |
710 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); | |
711 | + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); | |
712 | + transition-timing-function: ease-in; | |
713 | + opacity: 0; | |
714 | + } | |
715 | + 40% { | |
716 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); | |
717 | + transform: perspective(400px) rotate3d(0, 1, 0, -20deg); | |
718 | + transition-timing-function: ease-in; | |
719 | + } | |
720 | + 60% { | |
721 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); | |
722 | + transform: perspective(400px) rotate3d(0, 1, 0, 10deg); | |
723 | + opacity: 1; | |
724 | + } | |
725 | + 80% { | |
726 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); | |
727 | + transform: perspective(400px) rotate3d(0, 1, 0, -5deg); | |
728 | + } | |
729 | + 100% { | |
730 | + -webkit-transform: perspective(400px); | |
731 | + transform: perspective(400px); | |
732 | + } | |
733 | +} | |
734 | +@keyframes ajs-flipInY { | |
735 | + 0% { | |
736 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); | |
737 | + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); | |
738 | + transition-timing-function: ease-in; | |
739 | + opacity: 0; | |
740 | + } | |
741 | + 40% { | |
742 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); | |
743 | + transform: perspective(400px) rotate3d(0, 1, 0, -20deg); | |
744 | + transition-timing-function: ease-in; | |
745 | + } | |
746 | + 60% { | |
747 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); | |
748 | + transform: perspective(400px) rotate3d(0, 1, 0, 10deg); | |
749 | + opacity: 1; | |
750 | + } | |
751 | + 80% { | |
752 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); | |
753 | + transform: perspective(400px) rotate3d(0, 1, 0, -5deg); | |
754 | + } | |
755 | + 100% { | |
756 | + -webkit-transform: perspective(400px); | |
757 | + transform: perspective(400px); | |
758 | + } | |
759 | +} | |
760 | +@-webkit-keyframes ajs-flipOutY { | |
761 | + 0% { | |
762 | + -webkit-transform: perspective(400px); | |
763 | + transform: perspective(400px); | |
764 | + } | |
765 | + 30% { | |
766 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); | |
767 | + transform: perspective(400px) rotate3d(0, 1, 0, -15deg); | |
768 | + opacity: 1; | |
769 | + } | |
770 | + 100% { | |
771 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); | |
772 | + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); | |
773 | + opacity: 0; | |
774 | + } | |
775 | +} | |
776 | +@keyframes ajs-flipOutY { | |
777 | + 0% { | |
778 | + -webkit-transform: perspective(400px); | |
779 | + transform: perspective(400px); | |
780 | + } | |
781 | + 30% { | |
782 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); | |
783 | + transform: perspective(400px) rotate3d(0, 1, 0, -15deg); | |
784 | + opacity: 1; | |
785 | + } | |
786 | + 100% { | |
787 | + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); | |
788 | + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); | |
789 | + opacity: 0; | |
790 | + } | |
791 | +} | |
792 | +@-webkit-keyframes ajs-slideIn { | |
793 | + 0% { | |
794 | + margin-top: -100%; | |
795 | + } | |
796 | + 100% { | |
797 | + margin-top: 5%; | |
798 | + } | |
799 | +} | |
800 | +@keyframes ajs-slideIn { | |
801 | + 0% { | |
802 | + margin-top: -100%; | |
803 | + } | |
804 | + 100% { | |
805 | + margin-top: 5%; | |
806 | + } | |
807 | +} | |
808 | +@-webkit-keyframes ajs-slideOut { | |
809 | + 0% { | |
810 | + margin-top: 5%; | |
811 | + } | |
812 | + 100% { | |
813 | + margin-top: -100%; | |
814 | + } | |
815 | +} | |
816 | +@keyframes ajs-slideOut { | |
817 | + 0% { | |
818 | + margin-top: 5%; | |
819 | + } | |
820 | + 100% { | |
821 | + margin-top: -100%; | |
822 | + } | |
823 | +} | |
824 | +.alertify-notifier { | |
825 | + position: fixed; | |
826 | + width: 0; | |
827 | + overflow: visible; | |
828 | + z-index: 1982; | |
829 | + -webkit-transform: translate3d(0, 0, 0); | |
830 | + transform: translate3d(0, 0, 0); | |
831 | +} | |
832 | +.alertify-notifier .ajs-message { | |
833 | + position: relative; | |
834 | + width: 260px; | |
835 | + max-height: 0; | |
836 | + padding: 0; | |
837 | + opacity: 0; | |
838 | + margin: 0; | |
839 | + -webkit-transform: translate3d(0, 0, 0); | |
840 | + transform: translate3d(0, 0, 0); | |
841 | + transition-duration: 250ms; | |
842 | + transition-timing-function: linear; | |
843 | +} | |
844 | +.alertify-notifier .ajs-message.ajs-visible { | |
845 | + transition-duration: 500ms; | |
846 | + transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); | |
847 | + opacity: 1; | |
848 | + max-height: 100%; | |
849 | + padding: 15px; | |
850 | + margin-top: 10px; | |
851 | +} | |
852 | +.alertify-notifier .ajs-message.ajs-success { | |
853 | + background: rgba(91, 189, 114, 0.95); | |
854 | +} | |
855 | +.alertify-notifier .ajs-message.ajs-error { | |
856 | + background: rgba(217, 92, 92, 0.95); | |
857 | +} | |
858 | +.alertify-notifier .ajs-message.ajs-warning { | |
859 | + background: rgba(252, 248, 215, 0.95); | |
860 | +} | |
861 | +.alertify-notifier.ajs-top { | |
862 | + top: 10px; | |
863 | +} | |
864 | +.alertify-notifier.ajs-bottom { | |
865 | + bottom: 10px; | |
866 | +} | |
867 | +.alertify-notifier.ajs-right { | |
868 | + right: 10px; | |
869 | +} | |
870 | +.alertify-notifier.ajs-right .ajs-message { | |
871 | + right: -320px; | |
872 | +} | |
873 | +.alertify-notifier.ajs-right .ajs-message.ajs-visible { | |
874 | + right: 290px; | |
875 | +} | |
876 | +.alertify-notifier.ajs-left { | |
877 | + left: 10px; | |
878 | +} | |
879 | +.alertify-notifier.ajs-left .ajs-message { | |
880 | + left: -300px; | |
881 | +} | |
882 | +.alertify-notifier.ajs-left .ajs-message.ajs-visible { | |
883 | + left: 0; | |
884 | +} | ... | ... |
... | ... | @@ -0,0 +1,6 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer,.alertify .ajs-modal{position:fixed;padding:0;z-index:1981;top:0;right:0;bottom:0;left:0}.alertify .ajs-dimmer{margin:0;background-color:#252525;opacity:.5}.alertify .ajs-modal{overflow-y:auto}.alertify .ajs-dialog{position:relative;margin:5% auto;min-height:110px;max-width:500px;padding:24px 24px 0;outline:0;background-color:#fff}.alertify .ajs-dialog.ajs-capture:before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;display:block;z-index:1}.alertify .ajs-reset{position:absolute!important;display:inline!important;width:0!important;height:0!important;opacity:0!important}.alertify .ajs-commands{position:absolute;right:4px;margin:-14px 24px 0 0;z-index:2}.alertify .ajs-commands button{display:none;width:10px;height:10px;margin-left:10px;padding:10px;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.alertify .ajs-commands button.ajs-close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC)}.alertify .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC)}.alertify .ajs-header{margin:-24px -24px 0;padding:16px 24px;background-color:#fff}.alertify .ajs-body{min-height:56px}.alertify .ajs-body .ajs-content{padding:16px 24px 16px 16px}.alertify .ajs-footer{padding:4px;margin-left:-24px;margin-right:-24px;min-height:43px;background-color:#fff}.alertify.ajs-maximized .ajs-dialog,.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-dialog{padding:0}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button,.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons.ajs-primary{text-align:right}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary{float:left;clear:none;text-align:left}.alertify .ajs-footer .ajs-buttons .ajs-button{min-width:88px;min-height:35px}.alertify .ajs-handle{position:absolute;display:none;width:10px;height:10px;right:0;bottom:0;z-index:1;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);-webkit-transform:scaleX(1);transform:scaleX(1);cursor:se-resize}.alertify.ajs-no-overflow .ajs-body .ajs-content{overflow:hidden!important}.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content{left:0;right:0;padding:0}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body{margin-left:-24px;margin-right:-24px}.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content{left:0;right:0}.alertify.ajs-closable .ajs-commands button.ajs-close,.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{display:inline-block}.alertify.ajs-maximized .ajs-dialog{width:100%!important;height:100%!important;max-width:none!important;margin:0 auto!important;top:0!important;left:0!important}.alertify.ajs-maximized.ajs-modeless .ajs-modal{position:fixed!important;min-height:100%!important;max-height:none!important;margin:0!important}.alertify.ajs-maximized .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=)}.alertify.ajs-maximized .ajs-commands,.alertify.ajs-resizable .ajs-commands{margin:14px 24px 0 0}.alertify.ajs-maximized .ajs-header,.alertify.ajs-resizable .ajs-header{position:absolute;top:0;left:0;right:0;margin:0;padding:16px 24px}.alertify.ajs-maximized .ajs-body,.alertify.ajs-resizable .ajs-body{min-height:224px;display:inline-block}.alertify.ajs-maximized .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-body .ajs-content{position:absolute;top:50px;right:24px;bottom:50px;left:24px;overflow:auto}.alertify.ajs-maximized .ajs-footer,.alertify.ajs-resizable .ajs-footer{position:absolute;left:0;right:0;bottom:0;margin:0}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog{min-width:548px}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle{display:block}.alertify.ajs-movable:not(.ajs-maximized) .ajs-header{cursor:move}.alertify.ajs-modeless .ajs-dimmer,.alertify.ajs-modeless .ajs-reset{display:none}.alertify.ajs-modeless .ajs-modal{overflow:visible;max-width:none;max-height:0}.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin{display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC)}.alertify.ajs-modeless.ajs-unpinned .ajs-modal{position:absolute}.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=)}.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body{max-height:500px;overflow:auto}.alertify.ajs-basic .ajs-header{opacity:0}.alertify.ajs-basic .ajs-footer{visibility:hidden}.alertify.ajs-frameless .ajs-header{position:absolute;top:0;left:0;right:0;min-height:60px;margin:0;padding:0;opacity:0;z-index:1}.alertify.ajs-frameless .ajs-footer{display:none}.alertify.ajs-frameless .ajs-body .ajs-content{position:absolute;top:0;right:0;bottom:0;left:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog{padding-top:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands{margin-top:0}.ajs-no-overflow{overflow:hidden!important;outline:0}.ajs-no-overflow.ajs-fixed{position:fixed;top:0;right:0;bottom:0;left:0;overflow-y:scroll!important}.ajs-no-selection,.ajs-no-selection *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (max-width:568px){.alertify .ajs-dialog{min-width:150px}.alertify:not(.ajs-maximized) .ajs-modal{padding:0 5%}.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog{min-width:initial;min-width:auto}}@-moz-document url-prefix(){.alertify button:focus{outline:#3593D2 dotted 1px}}.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);transition-property:opacity,visibility;transition-timing-function:linear;transition-duration:250ms}.alertify.ajs-hidden .ajs-dimmer,.alertify.ajs-hidden .ajs-modal{visibility:hidden;opacity:0}.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-duration:.5s;animation-duration:.5s}.alertify.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-duration:250ms;animation-duration:250ms}.alertify .ajs-dialog.ajs-shake{-webkit-animation-name:ajs-shake;animation-name:ajs-shake;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-slideIn;animation-name:ajs-slideIn;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1.275);animation-timing-function:cubic-bezier(.175,.885,.32,1.275)}.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-slideOut;animation-name:ajs-slideOut;-webkit-animation-timing-function:cubic-bezier(.6,-.28,.735,.045);animation-timing-function:cubic-bezier(.6,-.28,.735,.045)}.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-zoomIn;animation-name:ajs-zoomIn}.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-zoomOut;animation-name:ajs-zoomOut}.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-fadeIn;animation-name:ajs-fadeIn}.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-fadeOut;animation-name:ajs-fadeOut}.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-pulseIn;animation-name:ajs-pulseIn}.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-pulseOut;animation-name:ajs-pulseOut}.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInX;animation-name:ajs-flipInX}.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutX;animation-name:ajs-flipOutX}.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInY;animation-name:ajs-flipInY}.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutY;animation-name:ajs-flipOutY}@-webkit-keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@-webkit-keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@-webkit-keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@-webkit-keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@-webkit-keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}@keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}.alertify-notifier{position:fixed;width:0;overflow:visible;z-index:1982;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-notifier .ajs-message{position:relative;width:260px;max-height:0;padding:0;opacity:0;margin:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);transition-duration:250ms;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{transition-duration:.5s;transition-timing-function:cubic-bezier(.175,.885,.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.alertify-notifier .ajs-message.ajs-success{background:rgba(91,189,114,.95)}.alertify-notifier .ajs-message.ajs-error{background:rgba(217,92,92,.95)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95)}.alertify-notifier.ajs-top{top:10px}.alertify-notifier.ajs-bottom{bottom:10px}.alertify-notifier.ajs-right{right:10px}.alertify-notifier.ajs-right .ajs-message{right:-320px}.alertify-notifier.ajs-right .ajs-message.ajs-visible{right:290px}.alertify-notifier.ajs-left{left:10px}.alertify-notifier.ajs-left .ajs-message{left:-300px}.alertify-notifier.ajs-left .ajs-message.ajs-visible{left:0} | |
0 | 7 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,884 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer { | |
7 | + position: fixed; | |
8 | + z-index: 1981; | |
9 | + top: 0; | |
10 | + left: 0; | |
11 | + bottom: 0; | |
12 | + right: 0; | |
13 | + padding: 0; | |
14 | + margin: 0; | |
15 | + background-color: #252525; | |
16 | + opacity: .5; | |
17 | +} | |
18 | +.alertify .ajs-modal { | |
19 | + position: fixed; | |
20 | + top: 0; | |
21 | + left: 0; | |
22 | + right: 0; | |
23 | + bottom: 0; | |
24 | + padding: 0; | |
25 | + overflow-y: auto; | |
26 | + z-index: 1981; | |
27 | +} | |
28 | +.alertify .ajs-dialog { | |
29 | + position: relative; | |
30 | + margin: 5% auto; | |
31 | + min-height: 110px; | |
32 | + max-width: 500px; | |
33 | + padding: 24px 24px 0 24px; | |
34 | + outline: 0; | |
35 | + background-color: #fff; | |
36 | +} | |
37 | +.alertify .ajs-dialog.ajs-capture:before { | |
38 | + content: ''; | |
39 | + position: absolute; | |
40 | + top: 0; | |
41 | + left: 0; | |
42 | + bottom: 0; | |
43 | + right: 0; | |
44 | + display: block; | |
45 | + z-index: 1; | |
46 | +} | |
47 | +.alertify .ajs-reset { | |
48 | + position: absolute !important; | |
49 | + display: inline !important; | |
50 | + width: 0 !important; | |
51 | + height: 0 !important; | |
52 | + opacity: 0 !important; | |
53 | +} | |
54 | +.alertify .ajs-commands { | |
55 | + position: absolute; | |
56 | + left: 4px; | |
57 | + margin: -14px 0 0 24px; | |
58 | + z-index: 2; | |
59 | +} | |
60 | +.alertify .ajs-commands button { | |
61 | + display: none; | |
62 | + width: 10px; | |
63 | + height: 10px; | |
64 | + margin-right: 10px; | |
65 | + padding: 10px; | |
66 | + border: 0; | |
67 | + background-color: transparent; | |
68 | + background-repeat: no-repeat; | |
69 | + background-position: center; | |
70 | + cursor: pointer; | |
71 | +} | |
72 | +.alertify .ajs-commands button.ajs-close { | |
73 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC); | |
74 | +} | |
75 | +.alertify .ajs-commands button.ajs-maximize { | |
76 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC); | |
77 | +} | |
78 | +.alertify .ajs-header { | |
79 | + margin: -24px; | |
80 | + margin-bottom: 0; | |
81 | + padding: 16px 24px; | |
82 | + background-color: #fff; | |
83 | +} | |
84 | +.alertify .ajs-body { | |
85 | + min-height: 56px; | |
86 | +} | |
87 | +.alertify .ajs-body .ajs-content { | |
88 | + padding: 16px 16px 16px 24px; | |
89 | +} | |
90 | +.alertify .ajs-footer { | |
91 | + padding: 4px; | |
92 | + margin-right: -24px; | |
93 | + margin-left: -24px; | |
94 | + min-height: 43px; | |
95 | + background-color: #fff; | |
96 | +} | |
97 | +.alertify .ajs-footer .ajs-buttons.ajs-primary { | |
98 | + text-align: left; | |
99 | +} | |
100 | +.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button { | |
101 | + margin: 4px; | |
102 | +} | |
103 | +.alertify .ajs-footer .ajs-buttons.ajs-auxiliary { | |
104 | + float: right; | |
105 | + clear: none; | |
106 | + text-align: right; | |
107 | +} | |
108 | +.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button { | |
109 | + margin: 4px; | |
110 | +} | |
111 | +.alertify .ajs-footer .ajs-buttons .ajs-button { | |
112 | + min-width: 88px; | |
113 | + min-height: 35px; | |
114 | +} | |
115 | +.alertify .ajs-handle { | |
116 | + position: absolute; | |
117 | + display: none; | |
118 | + width: 10px; | |
119 | + height: 10px; | |
120 | + left: 0; | |
121 | + bottom: 0; | |
122 | + z-index: 1; | |
123 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==); | |
124 | + -webkit-transform: scaleX(-1); | |
125 | + transform: scaleX(-1); | |
126 | + cursor: sw-resize; | |
127 | +} | |
128 | +.alertify.ajs-no-overflow .ajs-body .ajs-content { | |
129 | + overflow: hidden !important; | |
130 | +} | |
131 | +.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content { | |
132 | + right: 0; | |
133 | + left: 0; | |
134 | + padding: 0; | |
135 | +} | |
136 | +.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body { | |
137 | + margin-right: -24px; | |
138 | + margin-left: -24px; | |
139 | +} | |
140 | +.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content { | |
141 | + padding: 0; | |
142 | +} | |
143 | +.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content { | |
144 | + right: 0; | |
145 | + left: 0; | |
146 | +} | |
147 | +.alertify.ajs-maximizable .ajs-commands button.ajs-maximize, | |
148 | +.alertify.ajs-maximizable .ajs-commands button.ajs-restore { | |
149 | + display: inline-block; | |
150 | +} | |
151 | +.alertify.ajs-closable .ajs-commands button.ajs-close { | |
152 | + display: inline-block; | |
153 | +} | |
154 | +.alertify.ajs-maximized .ajs-dialog { | |
155 | + width: 100% !important; | |
156 | + height: 100% !important; | |
157 | + max-width: none !important; | |
158 | + margin: 0 auto !important; | |
159 | + top: 0 !important; | |
160 | + right: 0 !important; | |
161 | +} | |
162 | +.alertify.ajs-maximized.ajs-modeless .ajs-modal { | |
163 | + position: fixed !important; | |
164 | + min-height: 100% !important; | |
165 | + max-height: none !important; | |
166 | + margin: 0 !important; | |
167 | +} | |
168 | +.alertify.ajs-maximized .ajs-commands button.ajs-maximize { | |
169 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=); | |
170 | +} | |
171 | +.alertify.ajs-resizable .ajs-dialog, | |
172 | +.alertify.ajs-maximized .ajs-dialog { | |
173 | + padding: 0; | |
174 | +} | |
175 | +.alertify.ajs-resizable .ajs-commands, | |
176 | +.alertify.ajs-maximized .ajs-commands { | |
177 | + margin: 14px 0 0 24px; | |
178 | +} | |
179 | +.alertify.ajs-resizable .ajs-header, | |
180 | +.alertify.ajs-maximized .ajs-header { | |
181 | + position: absolute; | |
182 | + top: 0; | |
183 | + right: 0; | |
184 | + left: 0; | |
185 | + margin: 0; | |
186 | + padding: 16px 24px; | |
187 | +} | |
188 | +.alertify.ajs-resizable .ajs-body, | |
189 | +.alertify.ajs-maximized .ajs-body { | |
190 | + min-height: 224px; | |
191 | + display: inline-block; | |
192 | +} | |
193 | +.alertify.ajs-resizable .ajs-body .ajs-content, | |
194 | +.alertify.ajs-maximized .ajs-body .ajs-content { | |
195 | + position: absolute; | |
196 | + top: 50px; | |
197 | + left: 24px; | |
198 | + bottom: 50px; | |
199 | + right: 24px; | |
200 | + overflow: auto; | |
201 | +} | |
202 | +.alertify.ajs-resizable .ajs-footer, | |
203 | +.alertify.ajs-maximized .ajs-footer { | |
204 | + position: absolute; | |
205 | + right: 0; | |
206 | + left: 0; | |
207 | + bottom: 0; | |
208 | + margin: 0; | |
209 | +} | |
210 | +.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog { | |
211 | + min-width: 548px; | |
212 | +} | |
213 | +.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle { | |
214 | + display: block; | |
215 | +} | |
216 | +.alertify.ajs-movable:not(.ajs-maximized) .ajs-header { | |
217 | + cursor: move; | |
218 | +} | |
219 | +.alertify.ajs-modeless .ajs-dimmer, | |
220 | +.alertify.ajs-modeless .ajs-reset { | |
221 | + display: none; | |
222 | +} | |
223 | +.alertify.ajs-modeless .ajs-modal { | |
224 | + overflow: visible; | |
225 | + max-width: none; | |
226 | + max-height: 0; | |
227 | +} | |
228 | +.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin { | |
229 | + display: inline-block; | |
230 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC); | |
231 | +} | |
232 | +.alertify.ajs-modeless.ajs-unpinned .ajs-modal { | |
233 | + position: absolute; | |
234 | +} | |
235 | +.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin { | |
236 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=); | |
237 | +} | |
238 | +.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body { | |
239 | + max-height: 500px; | |
240 | + overflow: auto; | |
241 | +} | |
242 | +.alertify.ajs-basic .ajs-header { | |
243 | + opacity: 0; | |
244 | +} | |
245 | +.alertify.ajs-basic .ajs-footer { | |
246 | + visibility: hidden; | |
247 | +} | |
248 | +.alertify.ajs-frameless .ajs-header { | |
249 | + position: absolute; | |
250 | + top: 0; | |
251 | + right: 0; | |
252 | + left: 0; | |
253 | + min-height: 60px; | |
254 | + margin: 0; | |
255 | + padding: 0; | |
256 | + opacity: 0; | |
257 | + z-index: 1; | |
258 | +} | |
259 | +.alertify.ajs-frameless .ajs-footer { | |
260 | + display: none; | |
261 | +} | |
262 | +.alertify.ajs-frameless .ajs-body .ajs-content { | |
263 | + position: absolute; | |
264 | + top: 0; | |
265 | + left: 0; | |
266 | + bottom: 0; | |
267 | + right: 0; | |
268 | +} | |
269 | +.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog { | |
270 | + padding-top: 0; | |
271 | +} | |
272 | +.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands { | |
273 | + margin-top: 0; | |
274 | +} | |
275 | +.ajs-no-overflow { | |
276 | + overflow: hidden !important; | |
277 | + outline: none; | |
278 | +} | |
279 | +.ajs-no-overflow.ajs-fixed { | |
280 | + position: fixed; | |
281 | + top: 0; | |
282 | + left: 0; | |
283 | + bottom: 0; | |
284 | + right: 0; | |
285 | + overflow-y: scroll!important; | |
286 | +} | |
287 | +.ajs-no-selection, | |
288 | +.ajs-no-selection * { | |
289 | + -webkit-user-select: none; | |
290 | + -moz-user-select: none; | |
291 | + -ms-user-select: none; | |
292 | + user-select: none; | |
293 | +} | |
294 | +@media screen and (max-width: 568px) { | |
295 | + .alertify .ajs-dialog { | |
296 | + min-width: 150px; | |
297 | + } | |
298 | + .alertify:not(.ajs-maximized) .ajs-modal { | |
299 | + padding: 0 5%; | |
300 | + } | |
301 | + .alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog { | |
302 | + min-width: initial; | |
303 | + min-width: auto /*IE fallback*/; | |
304 | + } | |
305 | +} | |
306 | +@-moz-document url-prefix() { | |
307 | + .alertify button:focus { | |
308 | + outline: 1px dotted #3593D2; | |
309 | + } | |
310 | +} | |
311 | +.alertify .ajs-dimmer, | |
312 | +.alertify .ajs-modal { | |
313 | + -webkit-transform: translate3d(0, 0, 0); | |
314 | + transform: translate3d(0, 0, 0); | |
315 | + transition-property: opacity, visibility; | |
316 | + transition-timing-function: linear; | |
317 | + transition-duration: 250ms; | |
318 | +} | |
319 | +.alertify.ajs-hidden .ajs-dimmer, | |
320 | +.alertify.ajs-hidden .ajs-modal { | |
321 | + visibility: hidden; | |
322 | + opacity: 0; | |
323 | +} | |
324 | +.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
325 | + -webkit-animation-duration: 500ms; | |
326 | + animation-duration: 500ms; | |
327 | +} | |
328 | +.alertify.ajs-out.ajs-hidden .ajs-dialog { | |
329 | + -webkit-animation-duration: 250ms; | |
330 | + animation-duration: 250ms; | |
331 | +} | |
332 | +.alertify .ajs-dialog.ajs-shake { | |
333 | + -webkit-animation-name: ajs-shake; | |
334 | + animation-name: ajs-shake; | |
335 | + -webkit-animation-duration: .1s; | |
336 | + animation-duration: .1s; | |
337 | + -webkit-animation-fill-mode: both; | |
338 | + animation-fill-mode: both; | |
339 | +} | |
340 | +@-webkit-keyframes ajs-shake { | |
341 | + 0%, | |
342 | + 100% { | |
343 | + -webkit-transform: translate3d(0, 0, 0); | |
344 | + transform: translate3d(0, 0, 0); | |
345 | + } | |
346 | + 10%, | |
347 | + 30%, | |
348 | + 50%, | |
349 | + 70%, | |
350 | + 90% { | |
351 | + -webkit-transform: translate3d(10px, 0, 0); | |
352 | + transform: translate3d(10px, 0, 0); | |
353 | + } | |
354 | + 20%, | |
355 | + 40%, | |
356 | + 60%, | |
357 | + 80% { | |
358 | + -webkit-transform: translate3d(-10px, 0, 0); | |
359 | + transform: translate3d(-10px, 0, 0); | |
360 | + } | |
361 | +} | |
362 | +@keyframes ajs-shake { | |
363 | + 0%, | |
364 | + 100% { | |
365 | + -webkit-transform: translate3d(0, 0, 0); | |
366 | + transform: translate3d(0, 0, 0); | |
367 | + } | |
368 | + 10%, | |
369 | + 30%, | |
370 | + 50%, | |
371 | + 70%, | |
372 | + 90% { | |
373 | + -webkit-transform: translate3d(10px, 0, 0); | |
374 | + transform: translate3d(10px, 0, 0); | |
375 | + } | |
376 | + 20%, | |
377 | + 40%, | |
378 | + 60%, | |
379 | + 80% { | |
380 | + -webkit-transform: translate3d(-10px, 0, 0); | |
381 | + transform: translate3d(-10px, 0, 0); | |
382 | + } | |
383 | +} | |
384 | +.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
385 | + -webkit-animation-name: ajs-slideIn; | |
386 | + animation-name: ajs-slideIn; | |
387 | + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); | |
388 | + animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); | |
389 | +} | |
390 | +.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog { | |
391 | + -webkit-animation-name: ajs-slideOut; | |
392 | + animation-name: ajs-slideOut; | |
393 | + -webkit-animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045); | |
394 | + animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045); | |
395 | +} | |
396 | +.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
397 | + -webkit-animation-name: ajs-zoomIn; | |
398 | + animation-name: ajs-zoomIn; | |
399 | +} | |
400 | +.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog { | |
401 | + -webkit-animation-name: ajs-zoomOut; | |
402 | + animation-name: ajs-zoomOut; | |
403 | +} | |
404 | +.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
405 | + -webkit-animation-name: ajs-fadeIn; | |
406 | + animation-name: ajs-fadeIn; | |
407 | +} | |
408 | +.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog { | |
409 | + -webkit-animation-name: ajs-fadeOut; | |
410 | + animation-name: ajs-fadeOut; | |
411 | +} | |
412 | +.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
413 | + -webkit-animation-name: ajs-pulseIn; | |
414 | + animation-name: ajs-pulseIn; | |
415 | +} | |
416 | +.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog { | |
417 | + -webkit-animation-name: ajs-pulseOut; | |
418 | + animation-name: ajs-pulseOut; | |
419 | +} | |
420 | +.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
421 | + -webkit-animation-name: ajs-flipInX; | |
422 | + animation-name: ajs-flipInX; | |
423 | +} | |
424 | +.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog { | |
425 | + -webkit-animation-name: ajs-flipOutX; | |
426 | + animation-name: ajs-flipOutX; | |
427 | +} | |
428 | +.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog { | |
429 | + -webkit-animation-name: ajs-flipInY; | |
430 | + animation-name: ajs-flipInY; | |
431 | +} | |
432 | +.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog { | |
433 | + -webkit-animation-name: ajs-flipOutY; | |
434 | + animation-name: ajs-flipOutY; | |
435 | +} | |
436 | +@-webkit-keyframes ajs-pulseIn { | |
437 | + 0%, | |
438 | + 20%, | |
439 | + 40%, | |
440 | + 60%, | |
441 | + 80%, | |
442 | + 100% { | |
443 | + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); | |
444 | + } | |
445 | + 0% { | |
446 | + opacity: 0; | |
447 | + -webkit-transform: scale3d(0.3, 0.3, 0.3); | |
448 | + transform: scale3d(0.3, 0.3, 0.3); | |
449 | + } | |
450 | + 20% { | |
451 | + -webkit-transform: scale3d(1.1, 1.1, 1.1); | |
452 | + transform: scale3d(1.1, 1.1, 1.1); | |
453 | + } | |
454 | + 40% { | |
455 | + -webkit-transform: scale3d(0.9, 0.9, 0.9); | |
456 | + transform: scale3d(0.9, 0.9, 0.9); | |
457 | + } | |
458 | + 60% { | |
459 | + opacity: 1; | |
460 | + -webkit-transform: scale3d(1.03, 1.03, 1.03); | |
461 | + transform: scale3d(1.03, 1.03, 1.03); | |
462 | + } | |
463 | + 80% { | |
464 | + -webkit-transform: scale3d(0.97, 0.97, 0.97); | |
465 | + transform: scale3d(0.97, 0.97, 0.97); | |
466 | + } | |
467 | + 100% { | |
468 | + opacity: 1; | |
469 | + -webkit-transform: scale3d(1, 1, 1); | |
470 | + transform: scale3d(1, 1, 1); | |
471 | + } | |
472 | +} | |
473 | +@keyframes ajs-pulseIn { | |
474 | + 0%, | |
475 | + 20%, | |
476 | + 40%, | |
477 | + 60%, | |
478 | + 80%, | |
479 | + 100% { | |
480 | + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); | |
481 | + } | |
482 | + 0% { | |
483 | + opacity: 0; | |
484 | + -webkit-transform: scale3d(0.3, 0.3, 0.3); | |
485 | + transform: scale3d(0.3, 0.3, 0.3); | |
486 | + } | |
487 | + 20% { | |
488 | + -webkit-transform: scale3d(1.1, 1.1, 1.1); | |
489 | + transform: scale3d(1.1, 1.1, 1.1); | |
490 | + } | |
491 | + 40% { | |
492 | + -webkit-transform: scale3d(0.9, 0.9, 0.9); | |
493 | + transform: scale3d(0.9, 0.9, 0.9); | |
494 | + } | |
495 | + 60% { | |
496 | + opacity: 1; | |
497 | + -webkit-transform: scale3d(1.03, 1.03, 1.03); | |
498 | + transform: scale3d(1.03, 1.03, 1.03); | |
499 | + } | |
500 | + 80% { | |
501 | + -webkit-transform: scale3d(0.97, 0.97, 0.97); | |
502 | + transform: scale3d(0.97, 0.97, 0.97); | |
503 | + } | |
504 | + 100% { | |
505 | + opacity: 1; | |
506 | + -webkit-transform: scale3d(1, 1, 1); | |
507 | + transform: scale3d(1, 1, 1); | |
508 | + } | |
509 | +} | |
510 | +@-webkit-keyframes ajs-pulseOut { | |
511 | + 20% { | |
512 | + -webkit-transform: scale3d(0.9, 0.9, 0.9); | |
513 | + transform: scale3d(0.9, 0.9, 0.9); | |
514 | + } | |
515 | + 50%, | |
516 | + 55% { | |
517 | + opacity: 1; | |
518 | + -webkit-transform: scale3d(1.1, 1.1, 1.1); | |
519 | + transform: scale3d(1.1, 1.1, 1.1); | |
520 | + } | |
521 | + 100% { | |
522 | + opacity: 0; | |
523 | + -webkit-transform: scale3d(0.3, 0.3, 0.3); | |
524 | + transform: scale3d(0.3, 0.3, 0.3); | |
525 | + } | |
526 | +} | |
527 | +@keyframes ajs-pulseOut { | |
528 | + 20% { | |
529 | + -webkit-transform: scale3d(0.9, 0.9, 0.9); | |
530 | + transform: scale3d(0.9, 0.9, 0.9); | |
531 | + } | |
532 | + 50%, | |
533 | + 55% { | |
534 | + opacity: 1; | |
535 | + -webkit-transform: scale3d(1.1, 1.1, 1.1); | |
536 | + transform: scale3d(1.1, 1.1, 1.1); | |
537 | + } | |
538 | + 100% { | |
539 | + opacity: 0; | |
540 | + -webkit-transform: scale3d(0.3, 0.3, 0.3); | |
541 | + transform: scale3d(0.3, 0.3, 0.3); | |
542 | + } | |
543 | +} | |
544 | +@-webkit-keyframes ajs-zoomIn { | |
545 | + 0% { | |
546 | + opacity: 0; | |
547 | + -webkit-transform: scale3d(0.25, 0.25, 0.25); | |
548 | + transform: scale3d(0.25, 0.25, 0.25); | |
549 | + } | |
550 | + 100% { | |
551 | + opacity: 1; | |
552 | + -webkit-transform: scale3d(1, 1, 1); | |
553 | + transform: scale3d(1, 1, 1); | |
554 | + } | |
555 | +} | |
556 | +@keyframes ajs-zoomIn { | |
557 | + 0% { | |
558 | + opacity: 0; | |
559 | + -webkit-transform: scale3d(0.25, 0.25, 0.25); | |
560 | + transform: scale3d(0.25, 0.25, 0.25); | |
561 | + } | |
562 | + 100% { | |
563 | + opacity: 1; | |
564 | + -webkit-transform: scale3d(1, 1, 1); | |
565 | + transform: scale3d(1, 1, 1); | |
566 | + } | |
567 | +} | |
568 | +@-webkit-keyframes ajs-zoomOut { | |
569 | + 0% { | |
570 | + opacity: 1; | |
571 | + -webkit-transform: scale3d(1, 1, 1); | |
572 | + transform: scale3d(1, 1, 1); | |
573 | + } | |
574 | + 100% { | |
575 | + opacity: 0; | |
576 | + -webkit-transform: scale3d(0.25, 0.25, 0.25); | |
577 | + transform: scale3d(0.25, 0.25, 0.25); | |
578 | + } | |
579 | +} | |
580 | +@keyframes ajs-zoomOut { | |
581 | + 0% { | |
582 | + opacity: 1; | |
583 | + -webkit-transform: scale3d(1, 1, 1); | |
584 | + transform: scale3d(1, 1, 1); | |
585 | + } | |
586 | + 100% { | |
587 | + opacity: 0; | |
588 | + -webkit-transform: scale3d(0.25, 0.25, 0.25); | |
589 | + transform: scale3d(0.25, 0.25, 0.25); | |
590 | + } | |
591 | +} | |
592 | +@-webkit-keyframes ajs-fadeIn { | |
593 | + 0% { | |
594 | + opacity: 0; | |
595 | + } | |
596 | + 100% { | |
597 | + opacity: 1; | |
598 | + } | |
599 | +} | |
600 | +@keyframes ajs-fadeIn { | |
601 | + 0% { | |
602 | + opacity: 0; | |
603 | + } | |
604 | + 100% { | |
605 | + opacity: 1; | |
606 | + } | |
607 | +} | |
608 | +@-webkit-keyframes ajs-fadeOut { | |
609 | + 0% { | |
610 | + opacity: 1; | |
611 | + } | |
612 | + 100% { | |
613 | + opacity: 0; | |
614 | + } | |
615 | +} | |
616 | +@keyframes ajs-fadeOut { | |
617 | + 0% { | |
618 | + opacity: 1; | |
619 | + } | |
620 | + 100% { | |
621 | + opacity: 0; | |
622 | + } | |
623 | +} | |
624 | +@-webkit-keyframes ajs-flipInX { | |
625 | + 0% { | |
626 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg); | |
627 | + transform: perspective(400px) rotate3d(1, 0, 0, -90deg); | |
628 | + transition-timing-function: ease-in; | |
629 | + opacity: 0; | |
630 | + } | |
631 | + 40% { | |
632 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg); | |
633 | + transform: perspective(400px) rotate3d(1, 0, 0, 20deg); | |
634 | + transition-timing-function: ease-in; | |
635 | + } | |
636 | + 60% { | |
637 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg); | |
638 | + transform: perspective(400px) rotate3d(1, 0, 0, -10deg); | |
639 | + opacity: 1; | |
640 | + } | |
641 | + 80% { | |
642 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg); | |
643 | + transform: perspective(400px) rotate3d(1, 0, 0, 5deg); | |
644 | + } | |
645 | + 100% { | |
646 | + -webkit-transform: perspective(400px); | |
647 | + transform: perspective(400px); | |
648 | + } | |
649 | +} | |
650 | +@keyframes ajs-flipInX { | |
651 | + 0% { | |
652 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg); | |
653 | + transform: perspective(400px) rotate3d(1, 0, 0, -90deg); | |
654 | + transition-timing-function: ease-in; | |
655 | + opacity: 0; | |
656 | + } | |
657 | + 40% { | |
658 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg); | |
659 | + transform: perspective(400px) rotate3d(1, 0, 0, 20deg); | |
660 | + transition-timing-function: ease-in; | |
661 | + } | |
662 | + 60% { | |
663 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg); | |
664 | + transform: perspective(400px) rotate3d(1, 0, 0, -10deg); | |
665 | + opacity: 1; | |
666 | + } | |
667 | + 80% { | |
668 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg); | |
669 | + transform: perspective(400px) rotate3d(1, 0, 0, 5deg); | |
670 | + } | |
671 | + 100% { | |
672 | + -webkit-transform: perspective(400px); | |
673 | + transform: perspective(400px); | |
674 | + } | |
675 | +} | |
676 | +@-webkit-keyframes ajs-flipOutX { | |
677 | + 0% { | |
678 | + -webkit-transform: perspective(400px); | |
679 | + transform: perspective(400px); | |
680 | + } | |
681 | + 30% { | |
682 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg); | |
683 | + transform: perspective(400px) rotate3d(1, 0, 0, 20deg); | |
684 | + opacity: 1; | |
685 | + } | |
686 | + 100% { | |
687 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg); | |
688 | + transform: perspective(400px) rotate3d(1, 0, 0, -90deg); | |
689 | + opacity: 0; | |
690 | + } | |
691 | +} | |
692 | +@keyframes ajs-flipOutX { | |
693 | + 0% { | |
694 | + -webkit-transform: perspective(400px); | |
695 | + transform: perspective(400px); | |
696 | + } | |
697 | + 30% { | |
698 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg); | |
699 | + transform: perspective(400px) rotate3d(1, 0, 0, 20deg); | |
700 | + opacity: 1; | |
701 | + } | |
702 | + 100% { | |
703 | + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg); | |
704 | + transform: perspective(400px) rotate3d(1, 0, 0, -90deg); | |
705 | + opacity: 0; | |
706 | + } | |
707 | +} | |
708 | +@-webkit-keyframes ajs-flipInY { | |
709 | + 0% { | |
710 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg); | |
711 | + transform: perspective(400px) rotate3d(0, -1, 0, -90deg); | |
712 | + transition-timing-function: ease-in; | |
713 | + opacity: 0; | |
714 | + } | |
715 | + 40% { | |
716 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 20deg); | |
717 | + transform: perspective(400px) rotate3d(0, -1, 0, 20deg); | |
718 | + transition-timing-function: ease-in; | |
719 | + } | |
720 | + 60% { | |
721 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -10deg); | |
722 | + transform: perspective(400px) rotate3d(0, -1, 0, -10deg); | |
723 | + opacity: 1; | |
724 | + } | |
725 | + 80% { | |
726 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 5deg); | |
727 | + transform: perspective(400px) rotate3d(0, -1, 0, 5deg); | |
728 | + } | |
729 | + 100% { | |
730 | + -webkit-transform: perspective(400px); | |
731 | + transform: perspective(400px); | |
732 | + } | |
733 | +} | |
734 | +@keyframes ajs-flipInY { | |
735 | + 0% { | |
736 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg); | |
737 | + transform: perspective(400px) rotate3d(0, -1, 0, -90deg); | |
738 | + transition-timing-function: ease-in; | |
739 | + opacity: 0; | |
740 | + } | |
741 | + 40% { | |
742 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 20deg); | |
743 | + transform: perspective(400px) rotate3d(0, -1, 0, 20deg); | |
744 | + transition-timing-function: ease-in; | |
745 | + } | |
746 | + 60% { | |
747 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -10deg); | |
748 | + transform: perspective(400px) rotate3d(0, -1, 0, -10deg); | |
749 | + opacity: 1; | |
750 | + } | |
751 | + 80% { | |
752 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 5deg); | |
753 | + transform: perspective(400px) rotate3d(0, -1, 0, 5deg); | |
754 | + } | |
755 | + 100% { | |
756 | + -webkit-transform: perspective(400px); | |
757 | + transform: perspective(400px); | |
758 | + } | |
759 | +} | |
760 | +@-webkit-keyframes ajs-flipOutY { | |
761 | + 0% { | |
762 | + -webkit-transform: perspective(400px); | |
763 | + transform: perspective(400px); | |
764 | + } | |
765 | + 30% { | |
766 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 15deg); | |
767 | + transform: perspective(400px) rotate3d(0, -1, 0, 15deg); | |
768 | + opacity: 1; | |
769 | + } | |
770 | + 100% { | |
771 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg); | |
772 | + transform: perspective(400px) rotate3d(0, -1, 0, -90deg); | |
773 | + opacity: 0; | |
774 | + } | |
775 | +} | |
776 | +@keyframes ajs-flipOutY { | |
777 | + 0% { | |
778 | + -webkit-transform: perspective(400px); | |
779 | + transform: perspective(400px); | |
780 | + } | |
781 | + 30% { | |
782 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, 15deg); | |
783 | + transform: perspective(400px) rotate3d(0, -1, 0, 15deg); | |
784 | + opacity: 1; | |
785 | + } | |
786 | + 100% { | |
787 | + -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg); | |
788 | + transform: perspective(400px) rotate3d(0, -1, 0, -90deg); | |
789 | + opacity: 0; | |
790 | + } | |
791 | +} | |
792 | +@-webkit-keyframes ajs-slideIn { | |
793 | + 0% { | |
794 | + margin-top: -100%; | |
795 | + } | |
796 | + 100% { | |
797 | + margin-top: 5%; | |
798 | + } | |
799 | +} | |
800 | +@keyframes ajs-slideIn { | |
801 | + 0% { | |
802 | + margin-top: -100%; | |
803 | + } | |
804 | + 100% { | |
805 | + margin-top: 5%; | |
806 | + } | |
807 | +} | |
808 | +@-webkit-keyframes ajs-slideOut { | |
809 | + 0% { | |
810 | + margin-top: 5%; | |
811 | + } | |
812 | + 100% { | |
813 | + margin-top: -100%; | |
814 | + } | |
815 | +} | |
816 | +@keyframes ajs-slideOut { | |
817 | + 0% { | |
818 | + margin-top: 5%; | |
819 | + } | |
820 | + 100% { | |
821 | + margin-top: -100%; | |
822 | + } | |
823 | +} | |
824 | +.alertify-notifier { | |
825 | + position: fixed; | |
826 | + width: 0; | |
827 | + overflow: visible; | |
828 | + z-index: 1982; | |
829 | + -webkit-transform: translate3d(0, 0, 0); | |
830 | + transform: translate3d(0, 0, 0); | |
831 | +} | |
832 | +.alertify-notifier .ajs-message { | |
833 | + position: relative; | |
834 | + width: 260px; | |
835 | + max-height: 0; | |
836 | + padding: 0; | |
837 | + opacity: 0; | |
838 | + margin: 0; | |
839 | + -webkit-transform: translate3d(0, 0, 0); | |
840 | + transform: translate3d(0, 0, 0); | |
841 | + transition-duration: 250ms; | |
842 | + transition-timing-function: linear; | |
843 | +} | |
844 | +.alertify-notifier .ajs-message.ajs-visible { | |
845 | + transition-duration: 500ms; | |
846 | + transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); | |
847 | + opacity: 1; | |
848 | + max-height: 100%; | |
849 | + padding: 15px; | |
850 | + margin-top: 10px; | |
851 | +} | |
852 | +.alertify-notifier .ajs-message.ajs-success { | |
853 | + background: rgba(91, 189, 114, 0.95); | |
854 | +} | |
855 | +.alertify-notifier .ajs-message.ajs-error { | |
856 | + background: rgba(217, 92, 92, 0.95); | |
857 | +} | |
858 | +.alertify-notifier .ajs-message.ajs-warning { | |
859 | + background: rgba(252, 248, 215, 0.95); | |
860 | +} | |
861 | +.alertify-notifier.ajs-top { | |
862 | + top: 10px; | |
863 | +} | |
864 | +.alertify-notifier.ajs-bottom { | |
865 | + bottom: 10px; | |
866 | +} | |
867 | +.alertify-notifier.ajs-right { | |
868 | + left: 10px; | |
869 | +} | |
870 | +.alertify-notifier.ajs-right .ajs-message { | |
871 | + left: -320px; | |
872 | +} | |
873 | +.alertify-notifier.ajs-right .ajs-message.ajs-visible { | |
874 | + left: 290px; | |
875 | +} | |
876 | +.alertify-notifier.ajs-left { | |
877 | + right: 10px; | |
878 | +} | |
879 | +.alertify-notifier.ajs-left .ajs-message { | |
880 | + right: -300px; | |
881 | +} | |
882 | +.alertify-notifier.ajs-left .ajs-message.ajs-visible { | |
883 | + right: 0; | |
884 | +} | ... | ... |
... | ... | @@ -0,0 +1,6 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer,.alertify .ajs-modal{position:fixed;padding:0;z-index:1981;top:0;left:0;bottom:0;right:0}.alertify .ajs-dimmer{margin:0;background-color:#252525;opacity:.5}.alertify .ajs-modal{overflow-y:auto}.alertify .ajs-dialog{position:relative;margin:5% auto;min-height:110px;max-width:500px;padding:24px 24px 0;outline:0;background-color:#fff}.alertify .ajs-dialog.ajs-capture:before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;display:block;z-index:1}.alertify .ajs-reset{position:absolute!important;display:inline!important;width:0!important;height:0!important;opacity:0!important}.alertify .ajs-commands{position:absolute;left:4px;margin:-14px 0 0 24px;z-index:2}.alertify .ajs-commands button{display:none;width:10px;height:10px;margin-right:10px;padding:10px;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.alertify .ajs-commands button.ajs-close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC)}.alertify .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC)}.alertify .ajs-header{margin:-24px -24px 0;padding:16px 24px;background-color:#fff}.alertify .ajs-body{min-height:56px}.alertify .ajs-body .ajs-content{padding:16px 16px 16px 24px}.alertify .ajs-footer{padding:4px;margin-right:-24px;margin-left:-24px;min-height:43px;background-color:#fff}.alertify.ajs-maximized .ajs-dialog,.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-dialog{padding:0}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button,.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons.ajs-primary{text-align:left}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary{float:right;clear:none;text-align:right}.alertify .ajs-footer .ajs-buttons .ajs-button{min-width:88px;min-height:35px}.alertify .ajs-handle{position:absolute;display:none;width:10px;height:10px;left:0;bottom:0;z-index:1;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);-webkit-transform:scaleX(-1);transform:scaleX(-1);cursor:sw-resize}.alertify.ajs-no-overflow .ajs-body .ajs-content{overflow:hidden!important}.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content{right:0;left:0;padding:0}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body{margin-right:-24px;margin-left:-24px}.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content{right:0;left:0}.alertify.ajs-closable .ajs-commands button.ajs-close,.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{display:inline-block}.alertify.ajs-maximized .ajs-dialog{width:100%!important;height:100%!important;max-width:none!important;margin:0 auto!important;top:0!important;right:0!important}.alertify.ajs-maximized.ajs-modeless .ajs-modal{position:fixed!important;min-height:100%!important;max-height:none!important;margin:0!important}.alertify.ajs-maximized .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=)}.alertify.ajs-maximized .ajs-commands,.alertify.ajs-resizable .ajs-commands{margin:14px 0 0 24px}.alertify.ajs-maximized .ajs-header,.alertify.ajs-resizable .ajs-header{position:absolute;top:0;right:0;left:0;margin:0;padding:16px 24px}.alertify.ajs-maximized .ajs-body,.alertify.ajs-resizable .ajs-body{min-height:224px;display:inline-block}.alertify.ajs-maximized .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-body .ajs-content{position:absolute;top:50px;left:24px;bottom:50px;right:24px;overflow:auto}.alertify.ajs-maximized .ajs-footer,.alertify.ajs-resizable .ajs-footer{position:absolute;right:0;left:0;bottom:0;margin:0}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog{min-width:548px}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle{display:block}.alertify.ajs-movable:not(.ajs-maximized) .ajs-header{cursor:move}.alertify.ajs-modeless .ajs-dimmer,.alertify.ajs-modeless .ajs-reset{display:none}.alertify.ajs-modeless .ajs-modal{overflow:visible;max-width:none;max-height:0}.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin{display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC)}.alertify.ajs-modeless.ajs-unpinned .ajs-modal{position:absolute}.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=)}.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body{max-height:500px;overflow:auto}.alertify.ajs-basic .ajs-header{opacity:0}.alertify.ajs-basic .ajs-footer{visibility:hidden}.alertify.ajs-frameless .ajs-header{position:absolute;top:0;right:0;left:0;min-height:60px;margin:0;padding:0;opacity:0;z-index:1}.alertify.ajs-frameless .ajs-footer{display:none}.alertify.ajs-frameless .ajs-body .ajs-content{position:absolute;top:0;left:0;bottom:0;right:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog{padding-top:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands{margin-top:0}.ajs-no-overflow{overflow:hidden!important;outline:0}.ajs-no-overflow.ajs-fixed{position:fixed;top:0;left:0;bottom:0;right:0;overflow-y:scroll!important}.ajs-no-selection,.ajs-no-selection *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (max-width:568px){.alertify .ajs-dialog{min-width:150px}.alertify:not(.ajs-maximized) .ajs-modal{padding:0 5%}.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog{min-width:initial;min-width:auto}}@-moz-document url-prefix(){.alertify button:focus{outline:#3593D2 dotted 1px}}.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);transition-property:opacity,visibility;transition-timing-function:linear;transition-duration:250ms}.alertify.ajs-hidden .ajs-dimmer,.alertify.ajs-hidden .ajs-modal{visibility:hidden;opacity:0}.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-duration:.5s;animation-duration:.5s}.alertify.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-duration:250ms;animation-duration:250ms}.alertify .ajs-dialog.ajs-shake{-webkit-animation-name:ajs-shake;animation-name:ajs-shake;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}}@keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}}.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-slideIn;animation-name:ajs-slideIn;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1.275);animation-timing-function:cubic-bezier(.175,.885,.32,1.275)}.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-slideOut;animation-name:ajs-slideOut;-webkit-animation-timing-function:cubic-bezier(.6,-.28,.735,.045);animation-timing-function:cubic-bezier(.6,-.28,.735,.045)}.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-zoomIn;animation-name:ajs-zoomIn}.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-zoomOut;animation-name:ajs-zoomOut}.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-fadeIn;animation-name:ajs-fadeIn}.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-fadeOut;animation-name:ajs-fadeOut}.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-pulseIn;animation-name:ajs-pulseIn}.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-pulseOut;animation-name:ajs-pulseOut}.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInX;animation-name:ajs-flipInX}.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutX;animation-name:ajs-flipOutX}.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInY;animation-name:ajs-flipInY}.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutY;animation-name:ajs-flipOutY}@-webkit-keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@-webkit-keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-10deg);transform:perspective(400px) rotate3d(1,0,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,5deg);transform:perspective(400px) rotate3d(1,0,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-10deg);transform:perspective(400px) rotate3d(1,0,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,5deg);transform:perspective(400px) rotate3d(1,0,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);opacity:0}}@keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);opacity:0}}@-webkit-keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,20deg);transform:perspective(400px) rotate3d(0,-1,0,20deg);transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-10deg);transform:perspective(400px) rotate3d(0,-1,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,5deg);transform:perspective(400px) rotate3d(0,-1,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,20deg);transform:perspective(400px) rotate3d(0,-1,0,20deg);transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-10deg);transform:perspective(400px) rotate3d(0,-1,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,5deg);transform:perspective(400px) rotate3d(0,-1,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,15deg);transform:perspective(400px) rotate3d(0,-1,0,15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);opacity:0}}@keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,15deg);transform:perspective(400px) rotate3d(0,-1,0,15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);opacity:0}}@-webkit-keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@-webkit-keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}@keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}.alertify-notifier{position:fixed;width:0;overflow:visible;z-index:1982;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-notifier .ajs-message{position:relative;width:260px;max-height:0;padding:0;opacity:0;margin:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);transition-duration:250ms;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{transition-duration:.5s;transition-timing-function:cubic-bezier(.175,.885,.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.alertify-notifier .ajs-message.ajs-success{background:rgba(91,189,114,.95)}.alertify-notifier .ajs-message.ajs-error{background:rgba(217,92,92,.95)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95)}.alertify-notifier.ajs-top{top:10px}.alertify-notifier.ajs-bottom{bottom:10px}.alertify-notifier.ajs-right{left:10px}.alertify-notifier.ajs-right .ajs-message{left:-320px}.alertify-notifier.ajs-right .ajs-message.ajs-visible{left:290px}.alertify-notifier.ajs-left{right:10px}.alertify-notifier.ajs-left .ajs-message{right:-300px}.alertify-notifier.ajs-left .ajs-message.ajs-visible{right:0} | |
0 | 7 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,60 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer { | |
7 | + background-color: #000; | |
8 | + opacity: .5; | |
9 | +} | |
10 | +.alertify .ajs-dialog { | |
11 | + max-width: 600px; | |
12 | + min-height: 122px; | |
13 | + background-color: #fff; | |
14 | + border: 1px solid rgba(0, 0, 0, 0.2); | |
15 | + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); | |
16 | + border-radius: 6px; | |
17 | +} | |
18 | +.alertify .ajs-header { | |
19 | + color: #333; | |
20 | + border-bottom: 1px solid #e5e5e5; | |
21 | + border-radius: 6px 6px 0 0; | |
22 | + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
23 | + font-size: 18px; | |
24 | +} | |
25 | +.alertify .ajs-body { | |
26 | + font-family: 'Roboto', sans-serif; | |
27 | + color: black; | |
28 | +} | |
29 | +.alertify.ajs-resizable .ajs-content, | |
30 | +.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content { | |
31 | + top: 58px; | |
32 | + bottom: 68px; | |
33 | +} | |
34 | +.alertify .ajs-footer { | |
35 | + background-color: #fff; | |
36 | + padding: 15px; | |
37 | + border-top: 1px solid #e5e5e5; | |
38 | + border-radius: 0 0 6px 6px; | |
39 | +} | |
40 | +.alertify-notifier .ajs-message { | |
41 | + background: rgba(255, 255, 255, 0.95); | |
42 | + color: #000; | |
43 | + text-align: center; | |
44 | + border: solid 1px #ddd; | |
45 | + border-radius: 2px; | |
46 | +} | |
47 | +.alertify-notifier .ajs-message.ajs-success { | |
48 | + color: #fff; | |
49 | + background: rgba(91, 189, 114, 0.95); | |
50 | + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); | |
51 | +} | |
52 | +.alertify-notifier .ajs-message.ajs-error { | |
53 | + color: #fff; | |
54 | + background: rgba(217, 92, 92, 0.95); | |
55 | + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); | |
56 | +} | |
57 | +.alertify-notifier .ajs-message.ajs-warning { | |
58 | + background: rgba(252, 248, 215, 0.95); | |
59 | + border-color: #999; | |
60 | +} | ... | ... |
core/static/css/vendor/alertifyjs/themes/bootstrap.min.css
0 → 100644
... | ... | @@ -0,0 +1,6 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer{background-color:#000;opacity:.5}.alertify .ajs-dialog{max-width:600px;min-height:122px;background-color:#fff;border:1px solid rgba(0,0,0,.2);box-shadow:0 5px 15px rgba(0,0,0,.5);border-radius:6px}.alertify .ajs-header{color:#333;border-bottom:1px solid #e5e5e5;border-radius:6px 6px 0 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#000}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:58px;bottom:68px}.alertify .ajs-footer{background-color:#fff;padding:15px;border-top:1px solid #e5e5e5;border-radius:0 0 6px 6px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:1px solid #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} | |
0 | 7 | \ No newline at end of file | ... | ... |
core/static/css/vendor/alertifyjs/themes/bootstrap.rtl.css
0 → 100644
... | ... | @@ -0,0 +1,60 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer { | |
7 | + background-color: #000; | |
8 | + opacity: .5; | |
9 | +} | |
10 | +.alertify .ajs-dialog { | |
11 | + max-width: 600px; | |
12 | + min-height: 122px; | |
13 | + background-color: #fff; | |
14 | + border: 1px solid rgba(0, 0, 0, 0.2); | |
15 | + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); | |
16 | + border-radius: 6px; | |
17 | +} | |
18 | +.alertify .ajs-header { | |
19 | + color: #333; | |
20 | + border-bottom: 1px solid #e5e5e5; | |
21 | + border-radius: 6px 6px 0 0; | |
22 | + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
23 | + font-size: 18px; | |
24 | +} | |
25 | +.alertify .ajs-body { | |
26 | + font-family: 'Roboto', sans-serif; | |
27 | + color: black; | |
28 | +} | |
29 | +.alertify.ajs-resizable .ajs-content, | |
30 | +.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content { | |
31 | + top: 58px; | |
32 | + bottom: 68px; | |
33 | +} | |
34 | +.alertify .ajs-footer { | |
35 | + background-color: #fff; | |
36 | + padding: 15px; | |
37 | + border-top: 1px solid #e5e5e5; | |
38 | + border-radius: 0 0 6px 6px; | |
39 | +} | |
40 | +.alertify-notifier .ajs-message { | |
41 | + background: rgba(255, 255, 255, 0.95); | |
42 | + color: #000; | |
43 | + text-align: center; | |
44 | + border: solid 1px #ddd; | |
45 | + border-radius: 2px; | |
46 | +} | |
47 | +.alertify-notifier .ajs-message.ajs-success { | |
48 | + color: #fff; | |
49 | + background: rgba(91, 189, 114, 0.95); | |
50 | + text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); | |
51 | +} | |
52 | +.alertify-notifier .ajs-message.ajs-error { | |
53 | + color: #fff; | |
54 | + background: rgba(217, 92, 92, 0.95); | |
55 | + text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); | |
56 | +} | |
57 | +.alertify-notifier .ajs-message.ajs-warning { | |
58 | + background: rgba(252, 248, 215, 0.95); | |
59 | + border-color: #999; | |
60 | +} | ... | ... |
core/static/css/vendor/alertifyjs/themes/bootstrap.rtl.min.css
0 → 100644
... | ... | @@ -0,0 +1,6 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer{background-color:#000;opacity:.5}.alertify .ajs-dialog{max-width:600px;min-height:122px;background-color:#fff;border:1px solid rgba(0,0,0,.2);box-shadow:0 5px 15px rgba(0,0,0,.5);border-radius:6px}.alertify .ajs-header{color:#333;border-bottom:1px solid #e5e5e5;border-radius:6px 6px 0 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#000}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:58px;bottom:68px}.alertify .ajs-footer{background-color:#fff;padding:15px;border-top:1px solid #e5e5e5;border-radius:0 0 6px 6px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:1px solid #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} | |
0 | 7 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,68 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dialog { | |
7 | + background-color: white; | |
8 | + box-shadow: 0px 15px 20px 0px rgba(0, 0, 0, 0.25); | |
9 | + border-radius: 2px; | |
10 | +} | |
11 | +.alertify .ajs-header { | |
12 | + color: black; | |
13 | + font-weight: bold; | |
14 | + background: #fafafa; | |
15 | + border-bottom: #eee 1px solid; | |
16 | + border-radius: 2px 2px 0 0; | |
17 | +} | |
18 | +.alertify .ajs-body { | |
19 | + color: black; | |
20 | +} | |
21 | +.alertify .ajs-body .ajs-content .ajs-input { | |
22 | + display: block; | |
23 | + width: 100%; | |
24 | + padding: 8px; | |
25 | + margin: 4px; | |
26 | + border-radius: 2px; | |
27 | + border: 1px solid #CCC; | |
28 | +} | |
29 | +.alertify .ajs-body .ajs-content p { | |
30 | + margin: 0; | |
31 | +} | |
32 | +.alertify .ajs-footer { | |
33 | + background: #fbfbfb; | |
34 | + border-top: #eee 1px solid; | |
35 | + border-radius: 0 0 2px 2px; | |
36 | +} | |
37 | +.alertify .ajs-footer .ajs-buttons .ajs-button { | |
38 | + background-color: transparent; | |
39 | + color: #000; | |
40 | + border: 0; | |
41 | + font-size: 14px; | |
42 | + font-weight: bold; | |
43 | + text-transform: uppercase; | |
44 | +} | |
45 | +.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok { | |
46 | + color: #3593D2; | |
47 | +} | |
48 | +.alertify-notifier .ajs-message { | |
49 | + background: rgba(255, 255, 255, 0.95); | |
50 | + color: #000; | |
51 | + text-align: center; | |
52 | + border: solid 1px #ddd; | |
53 | + border-radius: 2px; | |
54 | +} | |
55 | +.alertify-notifier .ajs-message.ajs-success { | |
56 | + color: #fff; | |
57 | + background: rgba(91, 189, 114, 0.95); | |
58 | + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); | |
59 | +} | |
60 | +.alertify-notifier .ajs-message.ajs-error { | |
61 | + color: #fff; | |
62 | + background: rgba(217, 92, 92, 0.95); | |
63 | + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); | |
64 | +} | |
65 | +.alertify-notifier .ajs-message.ajs-warning { | |
66 | + background: rgba(252, 248, 215, 0.95); | |
67 | + border-color: #999; | |
68 | +} | ... | ... |
core/static/css/vendor/alertifyjs/themes/default.min.css
0 → 100644
... | ... | @@ -0,0 +1,6 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dialog{background-color:#fff;box-shadow:0 15px 20px 0 rgba(0,0,0,.25);border-radius:2px}.alertify .ajs-header{color:#000;font-weight:700;background:#fafafa;border-bottom:#eee 1px solid;border-radius:2px 2px 0 0}.alertify .ajs-body{color:#000}.alertify .ajs-body .ajs-content .ajs-input{display:block;width:100%;padding:8px;margin:4px;border-radius:2px;border:1px solid #CCC}.alertify .ajs-body .ajs-content p{margin:0}.alertify .ajs-footer{background:#fbfbfb;border-top:#eee 1px solid;border-radius:0 0 2px 2px}.alertify .ajs-footer .ajs-buttons .ajs-button{background-color:transparent;color:#000;border:0;font-size:14px;font-weight:700;text-transform:uppercase}.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok{color:#3593D2}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:1px solid #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} | |
0 | 7 | \ No newline at end of file | ... | ... |
core/static/css/vendor/alertifyjs/themes/default.rtl.css
0 → 100644
... | ... | @@ -0,0 +1,68 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dialog { | |
7 | + background-color: white; | |
8 | + box-shadow: 0px 15px 20px 0px rgba(0, 0, 0, 0.25); | |
9 | + border-radius: 2px; | |
10 | +} | |
11 | +.alertify .ajs-header { | |
12 | + color: black; | |
13 | + font-weight: bold; | |
14 | + background: #fafafa; | |
15 | + border-bottom: #eee 1px solid; | |
16 | + border-radius: 2px 2px 0 0; | |
17 | +} | |
18 | +.alertify .ajs-body { | |
19 | + color: black; | |
20 | +} | |
21 | +.alertify .ajs-body .ajs-content .ajs-input { | |
22 | + display: block; | |
23 | + width: 100%; | |
24 | + padding: 8px; | |
25 | + margin: 4px; | |
26 | + border-radius: 2px; | |
27 | + border: 1px solid #CCC; | |
28 | +} | |
29 | +.alertify .ajs-body .ajs-content p { | |
30 | + margin: 0; | |
31 | +} | |
32 | +.alertify .ajs-footer { | |
33 | + background: #fbfbfb; | |
34 | + border-top: #eee 1px solid; | |
35 | + border-radius: 0 0 2px 2px; | |
36 | +} | |
37 | +.alertify .ajs-footer .ajs-buttons .ajs-button { | |
38 | + background-color: transparent; | |
39 | + color: #000; | |
40 | + border: 0; | |
41 | + font-size: 14px; | |
42 | + font-weight: bold; | |
43 | + text-transform: uppercase; | |
44 | +} | |
45 | +.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok { | |
46 | + color: #3593D2; | |
47 | +} | |
48 | +.alertify-notifier .ajs-message { | |
49 | + background: rgba(255, 255, 255, 0.95); | |
50 | + color: #000; | |
51 | + text-align: center; | |
52 | + border: solid 1px #ddd; | |
53 | + border-radius: 2px; | |
54 | +} | |
55 | +.alertify-notifier .ajs-message.ajs-success { | |
56 | + color: #fff; | |
57 | + background: rgba(91, 189, 114, 0.95); | |
58 | + text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); | |
59 | +} | |
60 | +.alertify-notifier .ajs-message.ajs-error { | |
61 | + color: #fff; | |
62 | + background: rgba(217, 92, 92, 0.95); | |
63 | + text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); | |
64 | +} | |
65 | +.alertify-notifier .ajs-message.ajs-warning { | |
66 | + background: rgba(252, 248, 215, 0.95); | |
67 | + border-color: #999; | |
68 | +} | ... | ... |
core/static/css/vendor/alertifyjs/themes/default.rtl.min.css
0 → 100644
... | ... | @@ -0,0 +1,6 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dialog{background-color:#fff;box-shadow:0 15px 20px 0 rgba(0,0,0,.25);border-radius:2px}.alertify .ajs-header{color:#000;font-weight:700;background:#fafafa;border-bottom:#eee 1px solid;border-radius:2px 2px 0 0}.alertify .ajs-body{color:#000}.alertify .ajs-body .ajs-content .ajs-input{display:block;width:100%;padding:8px;margin:4px;border-radius:2px;border:1px solid #CCC}.alertify .ajs-body .ajs-content p{margin:0}.alertify .ajs-footer{background:#fbfbfb;border-top:#eee 1px solid;border-radius:0 0 2px 2px}.alertify .ajs-footer .ajs-buttons .ajs-button{background-color:transparent;color:#000;border:0;font-size:14px;font-weight:700;text-transform:uppercase}.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok{color:#3593D2}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:1px solid #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} | |
0 | 7 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,84 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer { | |
7 | + background-color: rgba(0, 0, 0, 0.85); | |
8 | + opacity: 1; | |
9 | +} | |
10 | +.alertify .ajs-dialog { | |
11 | + max-width: 50%; | |
12 | + min-height: 137px; | |
13 | + background-color: #F4F4F4; | |
14 | + border: 1px solid #DDD; | |
15 | + box-shadow: none; | |
16 | + border-radius: 5px; | |
17 | +} | |
18 | +.alertify .ajs-header { | |
19 | + padding: 1.5rem 2rem; | |
20 | + border-bottom: none; | |
21 | + border-radius: 5px 5px 0 0; | |
22 | + color: #555; | |
23 | + background-color: #fff; | |
24 | + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
25 | + font-size: 1.6em; | |
26 | + font-weight: 700; | |
27 | +} | |
28 | +.alertify .ajs-body { | |
29 | + font-family: 'Roboto', sans-serif; | |
30 | + color: #555; | |
31 | +} | |
32 | +.alertify .ajs-body .ajs-content .ajs-input { | |
33 | + width: 100%; | |
34 | + margin: 0; | |
35 | + padding: .65em 1em; | |
36 | + font-size: 1em; | |
37 | + background-color: #FFF; | |
38 | + border: 1px solid rgba(0, 0, 0, 0.15); | |
39 | + outline: 0; | |
40 | + color: rgba(0, 0, 0, 0.7); | |
41 | + border-radius: .3125em; | |
42 | + transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease; | |
43 | + box-sizing: border-box; | |
44 | +} | |
45 | +.alertify .ajs-body .ajs-content .ajs-input:active { | |
46 | + border-color: rgba(0, 0, 0, 0.3); | |
47 | + background-color: #FAFAFA; | |
48 | +} | |
49 | +.alertify .ajs-body .ajs-content .ajs-input:focus { | |
50 | + border-color: rgba(0, 0, 0, 0.2); | |
51 | + color: rgba(0, 0, 0, 0.85); | |
52 | +} | |
53 | +.alertify.ajs-resizable .ajs-content, | |
54 | +.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content { | |
55 | + top: 64px; | |
56 | + bottom: 74px; | |
57 | +} | |
58 | +.alertify .ajs-footer { | |
59 | + background-color: #fff; | |
60 | + padding: 1rem 2rem; | |
61 | + border-top: none; | |
62 | + border-radius: 0 0 5px 5px; | |
63 | +} | |
64 | +.alertify-notifier .ajs-message { | |
65 | + background: rgba(255, 255, 255, 0.95); | |
66 | + color: #000; | |
67 | + text-align: center; | |
68 | + border: solid 1px #ddd; | |
69 | + border-radius: 2px; | |
70 | +} | |
71 | +.alertify-notifier .ajs-message.ajs-success { | |
72 | + color: #fff; | |
73 | + background: rgba(91, 189, 114, 0.95); | |
74 | + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); | |
75 | +} | |
76 | +.alertify-notifier .ajs-message.ajs-error { | |
77 | + color: #fff; | |
78 | + background: rgba(217, 92, 92, 0.95); | |
79 | + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); | |
80 | +} | |
81 | +.alertify-notifier .ajs-message.ajs-warning { | |
82 | + background: rgba(252, 248, 215, 0.95); | |
83 | + border-color: #999; | |
84 | +} | ... | ... |
core/static/css/vendor/alertifyjs/themes/semantic.min.css
0 → 100644
... | ... | @@ -0,0 +1,6 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer{background-color:rgba(0,0,0,.85);opacity:1}.alertify .ajs-dialog{max-width:50%;min-height:137px;background-color:#F4F4F4;border:1px solid #DDD;box-shadow:none;border-radius:5px}.alertify .ajs-header{padding:1.5rem 2rem;border-bottom:none;border-radius:5px 5px 0 0;color:#555;background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.6em;font-weight:700}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#555}.alertify .ajs-body .ajs-content .ajs-input{width:100%;margin:0;padding:.65em 1em;font-size:1em;background-color:#FFF;border:1px solid rgba(0,0,0,.15);outline:0;color:rgba(0,0,0,.7);border-radius:.3125em;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease;box-sizing:border-box}.alertify .ajs-body .ajs-content .ajs-input:active{border-color:rgba(0,0,0,.3);background-color:#FAFAFA}.alertify .ajs-body .ajs-content .ajs-input:focus{border-color:rgba(0,0,0,.2);color:rgba(0,0,0,.85)}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:64px;bottom:74px}.alertify .ajs-footer{background-color:#fff;padding:1rem 2rem;border-top:none;border-radius:0 0 5px 5px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:1px solid #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} | |
0 | 7 | \ No newline at end of file | ... | ... |
core/static/css/vendor/alertifyjs/themes/semantic.rtl.css
0 → 100644
... | ... | @@ -0,0 +1,84 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer { | |
7 | + background-color: rgba(0, 0, 0, 0.85); | |
8 | + opacity: 1; | |
9 | +} | |
10 | +.alertify .ajs-dialog { | |
11 | + max-width: 50%; | |
12 | + min-height: 137px; | |
13 | + background-color: #F4F4F4; | |
14 | + border: 1px solid #DDD; | |
15 | + box-shadow: none; | |
16 | + border-radius: 5px; | |
17 | +} | |
18 | +.alertify .ajs-header { | |
19 | + padding: 1.5rem 2rem; | |
20 | + border-bottom: none; | |
21 | + border-radius: 5px 5px 0 0; | |
22 | + color: #555; | |
23 | + background-color: #fff; | |
24 | + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
25 | + font-size: 1.6em; | |
26 | + font-weight: 700; | |
27 | +} | |
28 | +.alertify .ajs-body { | |
29 | + font-family: 'Roboto', sans-serif; | |
30 | + color: #555; | |
31 | +} | |
32 | +.alertify .ajs-body .ajs-content .ajs-input { | |
33 | + width: 100%; | |
34 | + margin: 0; | |
35 | + padding: .65em 1em; | |
36 | + font-size: 1em; | |
37 | + background-color: #FFF; | |
38 | + border: 1px solid rgba(0, 0, 0, 0.15); | |
39 | + outline: 0; | |
40 | + color: rgba(0, 0, 0, 0.7); | |
41 | + border-radius: .3125em; | |
42 | + transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease; | |
43 | + box-sizing: border-box; | |
44 | +} | |
45 | +.alertify .ajs-body .ajs-content .ajs-input:active { | |
46 | + border-color: rgba(0, 0, 0, 0.3); | |
47 | + background-color: #FAFAFA; | |
48 | +} | |
49 | +.alertify .ajs-body .ajs-content .ajs-input:focus { | |
50 | + border-color: rgba(0, 0, 0, 0.2); | |
51 | + color: rgba(0, 0, 0, 0.85); | |
52 | +} | |
53 | +.alertify.ajs-resizable .ajs-content, | |
54 | +.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content { | |
55 | + top: 64px; | |
56 | + bottom: 74px; | |
57 | +} | |
58 | +.alertify .ajs-footer { | |
59 | + background-color: #fff; | |
60 | + padding: 1rem 2rem; | |
61 | + border-top: none; | |
62 | + border-radius: 0 0 5px 5px; | |
63 | +} | |
64 | +.alertify-notifier .ajs-message { | |
65 | + background: rgba(255, 255, 255, 0.95); | |
66 | + color: #000; | |
67 | + text-align: center; | |
68 | + border: solid 1px #ddd; | |
69 | + border-radius: 2px; | |
70 | +} | |
71 | +.alertify-notifier .ajs-message.ajs-success { | |
72 | + color: #fff; | |
73 | + background: rgba(91, 189, 114, 0.95); | |
74 | + text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); | |
75 | +} | |
76 | +.alertify-notifier .ajs-message.ajs-error { | |
77 | + color: #fff; | |
78 | + background: rgba(217, 92, 92, 0.95); | |
79 | + text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); | |
80 | +} | |
81 | +.alertify-notifier .ajs-message.ajs-warning { | |
82 | + background: rgba(252, 248, 215, 0.95); | |
83 | + border-color: #999; | |
84 | +} | ... | ... |
core/static/css/vendor/alertifyjs/themes/semantic.rtl.min.css
0 → 100644
... | ... | @@ -0,0 +1,6 @@ |
1 | +/** | |
2 | + * alertifyjs 1.8.0 http://alertifyjs.com | |
3 | + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. | |
4 | + * Copyright 2016 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) | |
5 | + * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/ | |
6 | +.alertify .ajs-dimmer{background-color:rgba(0,0,0,.85);opacity:1}.alertify .ajs-dialog{max-width:50%;min-height:137px;background-color:#F4F4F4;border:1px solid #DDD;box-shadow:none;border-radius:5px}.alertify .ajs-header{padding:1.5rem 2rem;border-bottom:none;border-radius:5px 5px 0 0;color:#555;background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.6em;font-weight:700}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#555}.alertify .ajs-body .ajs-content .ajs-input{width:100%;margin:0;padding:.65em 1em;font-size:1em;background-color:#FFF;border:1px solid rgba(0,0,0,.15);outline:0;color:rgba(0,0,0,.7);border-radius:.3125em;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease;box-sizing:border-box}.alertify .ajs-body .ajs-content .ajs-input:active{border-color:rgba(0,0,0,.3);background-color:#FAFAFA}.alertify .ajs-body .ajs-content .ajs-input:focus{border-color:rgba(0,0,0,.2);color:rgba(0,0,0,.85)}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:64px;bottom:74px}.alertify .ajs-footer{background-color:#fff;padding:1rem 2rem;border-top:none;border-radius:0 0 5px 5px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:1px solid #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} | |
0 | 7 | \ No newline at end of file | ... | ... |
30.5 KB
28.8 KB
core/static/js/base/amadeus.js
... | ... | @@ -16,7 +16,7 @@ function campoNumerico(campo, evento){ |
16 | 16 | evento.returnValue = false; |
17 | 17 | return false; |
18 | 18 | } |
19 | -} | |
19 | +}; | |
20 | 20 | |
21 | 21 | function formatarCpf(campo, evento){ |
22 | 22 | var codTecla; |
... | ... | @@ -47,83 +47,54 @@ function formatarCpf(campo, evento){ |
47 | 47 | return false; |
48 | 48 | } |
49 | 49 | return false; |
50 | -} | |
50 | +}; | |
51 | 51 | |
52 | -function validarCpfSemAlert(campo,nome,idElementoMensagemErro){ | |
53 | - //alert("teste"); | |
54 | - cpf = campo.value; | |
55 | - | |
56 | - cpf = cpf.replace(".",""); | |
57 | - cpf = cpf.replace("-",""); | |
58 | - cpf = cpf.replace(".",""); | |
59 | - retorno = true; | |
52 | +function formatarTelefone(campo, evento){ | |
53 | + var codTecla; | |
54 | + var tamanho; | |
55 | + if( document.all ) { // Internet Explorer | |
56 | + codTecla = evento.keyCode; | |
57 | + } else if( document.layers ) { // Nestcape | |
58 | + codTecla = evento.which; | |
59 | + } else if( evento ) { // Firefox | |
60 | + codTecla = evento.which; | |
61 | + } | |
62 | + tamanho = campo.value.length; | |
60 | 63 | |
61 | - if(trim(cpf).length > 0){ | |
62 | - //alert("teste2"); | |
63 | - cpfstr= ''; | |
64 | - temp = cpf + ''; | |
65 | - | |
66 | - cpfstr = temp.substring(0,3); | |
67 | - cpfstr = cpfstr + temp.substring(3,6); | |
68 | - cpfstr = cpfstr + temp.substring(6,9); | |
69 | - cpfstr = cpfstr + temp.substring(9,11); | |
70 | - | |
71 | - | |
72 | - | |
73 | - retorno = false; | |
74 | - if(cpf != null){ | |
75 | - //alert("teste3"); | |
76 | - soma = 0; | |
77 | - digito1 = 0; | |
78 | - digito2 = 0; | |
79 | - for(i = 0; i < 9; i = i + 1) { | |
80 | - soma = soma + ((parseInt(cpf.substring(i,i+1)))*(11-(i+1))); | |
81 | - } | |
82 | - soma = soma % 11; | |
83 | - if (soma == 0 || soma == 1) { | |
84 | - digito1 = 0; | |
85 | - } else { | |
86 | - digito1 = 11 - soma; | |
87 | - } | |
88 | - soma = 0; | |
89 | - | |
90 | - for(i = 0; i < 9; i = i + 1) { | |
91 | - soma = soma + ((parseInt(cpf.substring(i,i+1)))*(12-(i+1))); | |
92 | - } | |
93 | - soma = soma + (digito1*2); | |
94 | - soma = soma % 11; | |
95 | - if (soma == 0 || soma == 1) { | |
96 | - digito2 = 0; | |
97 | - } | |
98 | - else{ | |
99 | - digito2 = 11 - soma; | |
100 | - } | |
101 | - digito = digito1 +''+ digito2; | |
102 | - | |
103 | - | |
104 | - //alert(cpfstr.substring(9,11)); | |
105 | - if(digito == (cpfstr.substring(9,11))){ | |
106 | - retorno = true; | |
107 | - } else{ | |
108 | - //alert("teste4"); | |
109 | - retorno = false; | |
110 | - | |
111 | - } | |
112 | - } else { | |
113 | - retorno = false; | |
64 | + if(((codTecla > 47 && codTecla < 58) || (codTecla == 8)) && tamanho < 15){ | |
65 | + | |
66 | + if(tamanho == 0){ | |
67 | + campo.value = "(" + campo.value; | |
68 | + }else if( tamanho == 3 ){ | |
69 | + campo.value = campo.value + ") "; | |
70 | + }else if(tamanho == 9){ | |
71 | + campo.value = campo.value + "-"; | |
72 | + }else if(tamanho == 14){ | |
73 | + // alert('oi'); | |
74 | + campo.value = campo.value.slice(0, 4) + campo.value.slice(5, 14); | |
75 | + campo.value = campo.value.slice(0, 8) + campo.value.slice(9, 10) + campo.value.slice(8, 9) + campo.value.slice(10, 14) | |
114 | 76 | } |
115 | - }else{ | |
116 | - retorno = false; | |
117 | - } | |
118 | - //alert(retorno); | |
119 | - if(retorno == false){ | |
120 | - //alert('E-mail informado invalido! Por favor, especifique um E-mail válido para o campo \"' + nome + '\".'); | |
121 | - document.getElementById(idElementoMensagemErro).style.display = ''; | |
122 | - campo.focus(); | |
123 | - return false; | |
124 | - }else{ | |
125 | - document.getElementById(idElementoMensagemErro).style.display = 'none'; | |
126 | 77 | return true; |
78 | + | |
79 | + } else if(codTecla == 0 || codTecla == 8){ | |
80 | + return true; | |
81 | + } else { | |
82 | + evento.returnValue = false; | |
83 | + return false; | |
127 | 84 | } |
128 | - return retorno; | |
129 | -} | |
130 | 85 | \ No newline at end of file |
86 | + return false; | |
87 | +} | |
88 | + | |
89 | +/* | |
90 | +This functions get the next 5 notifications from the user given a "step"(an amount) of previous notifications | |
91 | +*/ | |
92 | +function getNotifications(step){ | |
93 | + $.get('/getNotifications', | |
94 | + {'steps':step, 'amount': 5}, function(data){ | |
95 | + $("#notification-dropdown").append(data); | |
96 | + $('#notification-see-more').remove(); | |
97 | + var seemore = '<li><a onclick="getNotifications('+(step+5)+')"> <div id="notification-see-more" class="list-group-item"> <div class="row-content"><p class="list-group-item-text">See More</p> </div> </a></li>'; | |
98 | + $("#notification-dropdown").append(seemore); | |
99 | + $("#notification-count").text(step+5); | |
100 | + }); | |
101 | +} | ... | ... |
core/static/js/base/header.js
1 | 1 | $(document).ready(function(){ |
2 | 2 | $('[data-toggle="tooltip"]').tooltip(); //activate tooltip on all elements that has attribute data-toggle |
3 | -}); | |
4 | 3 | \ No newline at end of file |
4 | +}); | |
5 | + | |
6 | + | |
7 | +/* | |
8 | + | |
9 | +*/ | |
10 | +function getNotifications(step){ | |
11 | + $.ajax('/getNotifications',{ | |
12 | + steps: step, | |
13 | + amount: 5, | |
14 | + sucess: function(response){ | |
15 | + | |
16 | + } | |
17 | + }); | |
18 | +} | |
19 | + | |
20 | + | |
21 | +/* | |
22 | + | |
23 | +*/ | |
24 | +function checkIfNewNotification(){ | |
25 | + | |
26 | +} | |
5 | 27 | \ No newline at end of file | ... | ... |
core/static/js/main.js
... | ... | @@ -0,0 +1,3 @@ |
1 | +/*! alertifyjs - v1.8.0 - Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) */ | |
2 | +!function(a){"use strict";function b(a,b){a.className+=" "+b}function c(a,b){for(var c=a.className.split(" "),d=b.split(" "),e=0;e<d.length;e+=1){var f=c.indexOf(d[e]);f>-1&&c.splice(f,1)}a.className=c.join(" ")}function d(){return"rtl"===a.getComputedStyle(document.body).direction}function e(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}function f(){return document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft}function g(a){for(;a.lastChild;)a.removeChild(a.lastChild)}function h(a){if(null===a)return a;var b;if(Array.isArray(a)){b=[];for(var c=0;c<a.length;c+=1)b.push(h(a[c]));return b}if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return b=new RegExp(a.source),b.global=a.global,b.ignoreCase=a.ignoreCase,b.multiline=a.multiline,b.lastIndex=a.lastIndex,b;if("object"==typeof a){b={};for(var d in a)a.hasOwnProperty(d)&&(b[d]=h(a[d]));return b}return a}function i(a,b){var c=a.elements.root;c.parentNode.removeChild(c),delete a.elements,a.settings=h(a.__settings),a.__init=b,delete a.__internal}function j(a,b){return function(){if(arguments.length>0){for(var c=[],d=0;d<arguments.length;d+=1)c.push(arguments[d]);return c.push(a),b.apply(a,c)}return b.apply(a,[null,a])}}function k(a,b){return{index:a,button:b,cancel:!1}}function l(a,b){"function"==typeof b.get(a)&&b.get(a).call(b)}function m(){function a(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function b(a){var b=d[a].dialog;return b&&"function"==typeof b.__init&&b.__init(b),b}function c(b,c,e,f){var g={dialog:null,factory:c};return void 0!==f&&(g.factory=function(){return a(new d[f].factory,new c)}),e||(g.dialog=a(new g.factory,t)),d[b]=g}var d={};return{defaults:o,dialog:function(d,e,f,g){if("function"!=typeof e)return b(d);if(this.hasOwnProperty(d))throw new Error("alertify.dialog: name already exists");var h=c(d,e,f,g);f?this[d]=function(){if(0===arguments.length)return h.dialog;var b=a(new h.factory,t);return b&&"function"==typeof b.__init&&b.__init(b),b.main.apply(b,arguments),b.show.apply(b)}:this[d]=function(){if(h.dialog&&"function"==typeof h.dialog.__init&&h.dialog.__init(h.dialog),0===arguments.length)return h.dialog;var a=h.dialog;return a.main.apply(h.dialog,arguments),a.show.apply(h.dialog)}},closeAll:function(a){for(var b=p.slice(0),c=0;c<b.length;c+=1){var d=b[c];(void 0===a||a!==d)&&d.close()}},setting:function(a,c,d){if("notifier"===a)return u.setting(c,d);var e=b(a);return e?e.setting(c,d):void 0},set:function(a,b,c){return this.setting(a,b,c)},get:function(a,b){return this.setting(a,b)},notify:function(a,b,c,d){return u.create(b,d).push(a,c)},message:function(a,b,c){return u.create(null,c).push(a,b)},success:function(a,b,c){return u.create("success",c).push(a,b)},error:function(a,b,c){return u.create("error",c).push(a,b)},warning:function(a,b,c){return u.create("warning",c).push(a,b)},dismissAll:function(){u.dismissAll()}}}var n={ENTER:13,ESC:27,F1:112,F12:123,LEFT:37,RIGHT:39},o={autoReset:!0,basic:!1,closable:!0,closableByDimmer:!0,frameless:!1,maintainFocus:!0,maximizable:!0,modal:!0,movable:!0,moveBounded:!1,overflow:!0,padding:!0,pinnable:!0,pinned:!0,preventBodyShift:!1,resizable:!0,startMaximized:!1,transition:"pulse",notifier:{delay:5,position:"bottom-right"},glossary:{title:"AlertifyJS",ok:"OK",cancel:"Cancel",acccpt:"Accept",deny:"Deny",confirm:"Confirm",decline:"Decline",close:"Close",maximize:"Maximize",restore:"Restore"},theme:{input:"ajs-input",ok:"ajs-ok",cancel:"ajs-cancel"}},p=[],q=function(){return document.addEventListener?function(a,b,c,d){a.addEventListener(b,c,d===!0)}:document.attachEvent?function(a,b,c){a.attachEvent("on"+b,c)}:void 0}(),r=function(){return document.removeEventListener?function(a,b,c,d){a.removeEventListener(b,c,d===!0)}:document.detachEvent?function(a,b,c){a.detachEvent("on"+b,c)}:void 0}(),s=function(){var a,b,c=!1,d={animation:"animationend",OAnimation:"oAnimationEnd oanimationend",msAnimation:"MSAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(a in d)if(void 0!==document.documentElement.style[a]){b=d[a],c=!0;break}return{type:b,supported:c}}(),t=function(){function m(a){if(!a.__internal){delete a.__init,a.__settings||(a.__settings=h(a.settings)),null===za&&document.body.setAttribute("tabindex","0");var c;"function"==typeof a.setup?(c=a.setup(),c.options=c.options||{},c.focus=c.focus||{}):c={buttons:[],focus:{element:null,select:!1},options:{}},"object"!=typeof a.hooks&&(a.hooks={});var d=[];if(Array.isArray(c.buttons))for(var e=0;e<c.buttons.length;e+=1){var f=c.buttons[e],g={};for(var i in f)f.hasOwnProperty(i)&&(g[i]=f[i]);d.push(g)}var k=a.__internal={isOpen:!1,activeElement:document.body,timerIn:void 0,timerOut:void 0,buttons:d,focus:c.focus,options:{title:void 0,modal:void 0,basic:void 0,frameless:void 0,pinned:void 0,movable:void 0,moveBounded:void 0,resizable:void 0,autoReset:void 0,closable:void 0,closableByDimmer:void 0,maximizable:void 0,startMaximized:void 0,pinnable:void 0,transition:void 0,padding:void 0,overflow:void 0,onshow:void 0,onclose:void 0,onfocus:void 0,onmove:void 0,onmoved:void 0,onresize:void 0,onresized:void 0,onmaximize:void 0,onmaximized:void 0,onrestore:void 0,onrestored:void 0},resetHandler:void 0,beginMoveHandler:void 0,beginResizeHandler:void 0,bringToFrontHandler:void 0,modalClickHandler:void 0,buttonsClickHandler:void 0,commandsClickHandler:void 0,transitionInHandler:void 0,transitionOutHandler:void 0,destroy:void 0},l={};l.root=document.createElement("div"),l.root.className=Ca.base+" "+Ca.hidden+" ",l.root.innerHTML=Ba.dimmer+Ba.modal,l.dimmer=l.root.firstChild,l.modal=l.root.lastChild,l.modal.innerHTML=Ba.dialog,l.dialog=l.modal.firstChild,l.dialog.innerHTML=Ba.reset+Ba.commands+Ba.header+Ba.body+Ba.footer+Ba.resizeHandle+Ba.reset,l.reset=[],l.reset.push(l.dialog.firstChild),l.reset.push(l.dialog.lastChild),l.commands={},l.commands.container=l.reset[0].nextSibling,l.commands.pin=l.commands.container.firstChild,l.commands.maximize=l.commands.pin.nextSibling,l.commands.close=l.commands.maximize.nextSibling,l.header=l.commands.container.nextSibling,l.body=l.header.nextSibling,l.body.innerHTML=Ba.content,l.content=l.body.firstChild,l.footer=l.body.nextSibling,l.footer.innerHTML=Ba.buttons.auxiliary+Ba.buttons.primary,l.resizeHandle=l.footer.nextSibling,l.buttons={},l.buttons.auxiliary=l.footer.firstChild,l.buttons.primary=l.buttons.auxiliary.nextSibling,l.buttons.primary.innerHTML=Ba.button,l.buttonTemplate=l.buttons.primary.firstChild,l.buttons.primary.removeChild(l.buttonTemplate);for(var m=0;m<a.__internal.buttons.length;m+=1){var n=a.__internal.buttons[m];ya.indexOf(n.key)<0&&ya.push(n.key),n.element=l.buttonTemplate.cloneNode(),n.element.innerHTML=n.text,"string"==typeof n.className&&""!==n.className&&b(n.element,n.className);for(var o in n.attrs)"className"!==o&&n.attrs.hasOwnProperty(o)&&n.element.setAttribute(o,n.attrs[o]);"auxiliary"===n.scope?l.buttons.auxiliary.appendChild(n.element):l.buttons.primary.appendChild(n.element)}a.elements=l,k.resetHandler=j(a,X),k.beginMoveHandler=j(a,aa),k.beginResizeHandler=j(a,ga),k.bringToFrontHandler=j(a,B),k.modalClickHandler=j(a,R),k.buttonsClickHandler=j(a,T),k.commandsClickHandler=j(a,F),k.transitionInHandler=j(a,Y),k.transitionOutHandler=j(a,Z);for(var p in k.options)void 0!==c.options[p]?a.set(p,c.options[p]):v.defaults.hasOwnProperty(p)?a.set(p,v.defaults[p]):"title"===p&&a.set(p,v.defaults.glossary[p]);"function"==typeof a.build&&a.build()}document.body.appendChild(a.elements.root)}function o(){wa=f(),xa=e()}function t(){a.scrollTo(wa,xa)}function u(){for(var a=0,d=0;d<p.length;d+=1){var e=p[d];(e.isModal()||e.isMaximized())&&(a+=1)}0===a&&document.body.className.indexOf(Ca.noOverflow)>=0?(c(document.body,Ca.noOverflow),w(!1)):a>0&&document.body.className.indexOf(Ca.noOverflow)<0&&(w(!0),b(document.body,Ca.noOverflow))}function w(d){v.defaults.preventBodyShift&&document.documentElement.scrollHeight>document.documentElement.clientHeight&&(d?(Ea=xa,Da=a.getComputedStyle(document.body).top,b(document.body,Ca.fixed),document.body.style.top=-xa+"px"):(xa=Ea,document.body.style.top=Da,c(document.body,Ca.fixed),t()))}function x(a,d,e){"string"==typeof e&&c(a.elements.root,Ca.prefix+e),b(a.elements.root,Ca.prefix+d),za=a.elements.root.offsetWidth}function y(a){a.get("modal")?(c(a.elements.root,Ca.modeless),a.isOpen()&&(pa(a),N(a),u())):(b(a.elements.root,Ca.modeless),a.isOpen()&&(oa(a),N(a),u()))}function z(a){a.get("basic")?b(a.elements.root,Ca.basic):c(a.elements.root,Ca.basic)}function A(a){a.get("frameless")?b(a.elements.root,Ca.frameless):c(a.elements.root,Ca.frameless)}function B(a,b){for(var c=p.indexOf(b),d=c+1;d<p.length;d+=1)if(p[d].isModal())return;return document.body.lastChild!==b.elements.root&&(document.body.appendChild(b.elements.root),p.splice(p.indexOf(b),1),p.push(b),W(b)),!1}function C(a,d,e,f){switch(d){case"title":a.setHeader(f);break;case"modal":y(a);break;case"basic":z(a);break;case"frameless":A(a);break;case"pinned":O(a);break;case"closable":Q(a);break;case"maximizable":P(a);break;case"pinnable":K(a);break;case"movable":ea(a);break;case"resizable":ka(a);break;case"transition":x(a,f,e);break;case"padding":f?c(a.elements.root,Ca.noPadding):a.elements.root.className.indexOf(Ca.noPadding)<0&&b(a.elements.root,Ca.noPadding);break;case"overflow":f?c(a.elements.root,Ca.noOverflow):a.elements.root.className.indexOf(Ca.noOverflow)<0&&b(a.elements.root,Ca.noOverflow);break;case"transition":x(a,f,e)}"function"==typeof a.hooks.onupdate&&a.hooks.onupdate.call(a,d,e,f)}function D(a,b,c,d,e){var f={op:void 0,items:[]};if("undefined"==typeof e&&"string"==typeof d)f.op="get",b.hasOwnProperty(d)?(f.found=!0,f.value=b[d]):(f.found=!1,f.value=void 0);else{var g;if(f.op="set","object"==typeof d){var h=d;for(var i in h)b.hasOwnProperty(i)?(b[i]!==h[i]&&(g=b[i],b[i]=h[i],c.call(a,i,g,h[i])),f.items.push({key:i,value:h[i],found:!0})):f.items.push({key:i,value:h[i],found:!1})}else{if("string"!=typeof d)throw new Error("args must be a string or object");b.hasOwnProperty(d)?(b[d]!==e&&(g=b[d],b[d]=e,c.call(a,d,g,e)),f.items.push({key:d,value:e,found:!0})):f.items.push({key:d,value:e,found:!1})}}return f}function E(a){var b;S(a,function(a){return b=a.invokeOnClose===!0}),!b&&a.isOpen()&&a.close()}function F(a,b){var c=a.srcElement||a.target;switch(c){case b.elements.commands.pin:b.isPinned()?H(b):G(b);break;case b.elements.commands.maximize:b.isMaximized()?J(b):I(b);break;case b.elements.commands.close:E(b)}return!1}function G(a){a.set("pinned",!0)}function H(a){a.set("pinned",!1)}function I(a){l("onmaximize",a),b(a.elements.root,Ca.maximized),a.isOpen()&&u(),l("onmaximized",a)}function J(a){l("onrestore",a),c(a.elements.root,Ca.maximized),a.isOpen()&&u(),l("onrestored",a)}function K(a){a.get("pinnable")?b(a.elements.root,Ca.pinnable):c(a.elements.root,Ca.pinnable)}function L(a){var b=f();a.elements.modal.style.marginTop=e()+"px",a.elements.modal.style.marginLeft=b+"px",a.elements.modal.style.marginRight=-b+"px"}function M(a){var b=parseInt(a.elements.modal.style.marginTop,10),c=parseInt(a.elements.modal.style.marginLeft,10);if(a.elements.modal.style.marginTop="",a.elements.modal.style.marginLeft="",a.elements.modal.style.marginRight="",a.isOpen()){var d=0,g=0;""!==a.elements.dialog.style.top&&(d=parseInt(a.elements.dialog.style.top,10)),a.elements.dialog.style.top=d+(b-e())+"px",""!==a.elements.dialog.style.left&&(g=parseInt(a.elements.dialog.style.left,10)),a.elements.dialog.style.left=g+(c-f())+"px"}}function N(a){a.get("modal")||a.get("pinned")?M(a):L(a)}function O(a){a.get("pinned")?(c(a.elements.root,Ca.unpinned),a.isOpen()&&M(a)):(b(a.elements.root,Ca.unpinned),a.isOpen()&&!a.isModal()&&L(a))}function P(a){a.get("maximizable")?b(a.elements.root,Ca.maximizable):c(a.elements.root,Ca.maximizable)}function Q(a){a.get("closable")?(b(a.elements.root,Ca.closable),ua(a)):(c(a.elements.root,Ca.closable),va(a))}function R(a,b){var c=a.srcElement||a.target;return Fa||c!==b.elements.modal||b.get("closableByDimmer")!==!0||E(b),Fa=!1,!1}function S(a,b){for(var c=0;c<a.__internal.buttons.length;c+=1){var d=a.__internal.buttons[c];if(!d.element.disabled&&b(d)){var e=k(c,d);"function"==typeof a.callback&&a.callback.apply(a,[e]),e.cancel===!1&&a.close();break}}}function T(a,b){var c=a.srcElement||a.target;S(b,function(a){return a.element===c&&(Ga=!0)})}function U(a){if(Ga)return void(Ga=!1);var b=p[p.length-1],c=a.keyCode;return 0===b.__internal.buttons.length&&c===n.ESC&&b.get("closable")===!0?(E(b),!1):ya.indexOf(c)>-1?(S(b,function(a){return a.key===c}),!1):void 0}function V(a){var b=p[p.length-1],c=a.keyCode;if(c===n.LEFT||c===n.RIGHT){for(var d=b.__internal.buttons,e=0;e<d.length;e+=1)if(document.activeElement===d[e].element)switch(c){case n.LEFT:return void d[(e||d.length)-1].element.focus();case n.RIGHT:return void d[(e+1)%d.length].element.focus()}}else if(c<n.F12+1&&c>n.F1-1&&ya.indexOf(c)>-1)return a.preventDefault(),a.stopPropagation(),S(b,function(a){return a.key===c}),!1}function W(a,b){if(b)b.focus();else{var c=a.__internal.focus,d=c.element;switch(typeof c.element){case"number":a.__internal.buttons.length>c.element&&(d=a.get("basic")===!0?a.elements.reset[0]:a.__internal.buttons[c.element].element);break;case"string":d=a.elements.body.querySelector(c.element);break;case"function":d=c.element.call(a)}"undefined"!=typeof d&&null!==d||0!==a.__internal.buttons.length||(d=a.elements.reset[0]),d&&d.focus&&(d.focus(),c.select&&d.select&&d.select())}}function X(a,b){if(!b)for(var c=p.length-1;c>-1;c-=1)if(p[c].isModal()){b=p[c];break}if(b&&b.isModal()){var d,e=a.srcElement||a.target,f=e===b.elements.reset[1]||0===b.__internal.buttons.length&&e===document.body;f&&(b.get("maximizable")?d=b.elements.commands.maximize:b.get("closable")&&(d=b.elements.commands.close)),void 0===d&&("number"==typeof b.__internal.focus.element?e===b.elements.reset[0]?d=b.elements.buttons.auxiliary.firstChild||b.elements.buttons.primary.firstChild:f&&(d=b.elements.reset[0]):e===b.elements.reset[0]&&(d=b.elements.buttons.primary.lastChild||b.elements.buttons.auxiliary.lastChild)),W(b,d)}}function Y(a,b){clearTimeout(b.__internal.timerIn),W(b),t(),Ga=!1,l("onfocus",b),r(b.elements.dialog,s.type,b.__internal.transitionInHandler),c(b.elements.root,Ca.animationIn)}function Z(a,b){clearTimeout(b.__internal.timerOut),r(b.elements.dialog,s.type,b.__internal.transitionOutHandler),da(b),ja(b),b.isMaximized()&&!b.get("startMaximized")&&J(b),v.defaults.maintainFocus&&b.__internal.activeElement&&(b.__internal.activeElement.focus(),b.__internal.activeElement=null),"function"==typeof b.__internal.destroy&&b.__internal.destroy.apply(b)}function $(a,b){var c=a[Ka]-Ia,d=a[La]-Ja;Na&&(d-=document.body.scrollTop),b.style.left=c+"px",b.style.top=d+"px"}function _(a,b){var c=a[Ka]-Ia,d=a[La]-Ja;Na&&(d-=document.body.scrollTop),b.style.left=Math.min(Ma.maxLeft,Math.max(Ma.minLeft,c))+"px",Na?b.style.top=Math.min(Ma.maxTop,Math.max(Ma.minTop,d))+"px":b.style.top=Math.max(Ma.minTop,d)+"px"}function aa(a,c){if(null===Pa&&!c.isMaximized()&&c.get("movable")){var d,e=0,f=0;if("touchstart"===a.type?(a.preventDefault(),d=a.targetTouches[0],Ka="clientX",La="clientY"):0===a.button&&(d=a),d){var g=c.elements.dialog;if(b(g,Ca.capture),g.style.left&&(e=parseInt(g.style.left,10)),g.style.top&&(f=parseInt(g.style.top,10)),Ia=d[Ka]-e,Ja=d[La]-f,c.isModal()?Ja+=c.elements.modal.scrollTop:c.isPinned()&&(Ja-=document.body.scrollTop),c.get("moveBounded")){var h=g,i=-e,j=-f;do i+=h.offsetLeft,j+=h.offsetTop;while(h=h.offsetParent);Ma={maxLeft:i,minLeft:-i,maxTop:document.documentElement.clientHeight-g.clientHeight-j,minTop:-j},Oa=_}else Ma=null,Oa=$;return l("onmove",c),Na=!c.isModal()&&c.isPinned(),Ha=c,Oa(d,g),b(document.body,Ca.noSelection),!1}}}function ba(a){if(Ha){var b;"touchmove"===a.type?(a.preventDefault(),b=a.targetTouches[0]):0===a.button&&(b=a),b&&Oa(b,Ha.elements.dialog)}}function ca(){if(Ha){var a=Ha;Ha=Ma=null,c(document.body,Ca.noSelection),c(a.elements.dialog,Ca.capture),l("onmoved",a)}}function da(a){Ha=null;var b=a.elements.dialog;b.style.left=b.style.top=""}function ea(a){a.get("movable")?(b(a.elements.root,Ca.movable),a.isOpen()&&qa(a)):(da(a),c(a.elements.root,Ca.movable),a.isOpen()&&ra(a))}function fa(a,b,c){var e=b,f=0,g=0;do f+=e.offsetLeft,g+=e.offsetTop;while(e=e.offsetParent);var h,i;c===!0?(h=a.pageX,i=a.pageY):(h=a.clientX,i=a.clientY);var j=d();if(j&&(h=document.body.offsetWidth-h,isNaN(Qa)||(f=document.body.offsetWidth-f-b.offsetWidth)),b.style.height=i-g+Ta+"px",b.style.width=h-f+Ta+"px",!isNaN(Qa)){var k=.5*Math.abs(b.offsetWidth-Ra);j&&(k*=-1),b.offsetWidth>Ra?b.style.left=Qa+k+"px":b.offsetWidth>=Sa&&(b.style.left=Qa-k+"px")}}function ga(a,c){if(!c.isMaximized()){var d;if("touchstart"===a.type?(a.preventDefault(),d=a.targetTouches[0]):0===a.button&&(d=a),d){l("onresize",c),Pa=c,Ta=c.elements.resizeHandle.offsetHeight/2;var e=c.elements.dialog;return b(e,Ca.capture),Qa=parseInt(e.style.left,10),e.style.height=e.offsetHeight+"px",e.style.minHeight=c.elements.header.offsetHeight+c.elements.footer.offsetHeight+"px",e.style.width=(Ra=e.offsetWidth)+"px","none"!==e.style.maxWidth&&(e.style.minWidth=(Sa=e.offsetWidth)+"px"),e.style.maxWidth="none",b(document.body,Ca.noSelection),!1}}}function ha(a){if(Pa){var b;"touchmove"===a.type?(a.preventDefault(),b=a.targetTouches[0]):0===a.button&&(b=a),b&&fa(b,Pa.elements.dialog,!Pa.get("modal")&&!Pa.get("pinned"))}}function ia(){if(Pa){var a=Pa;Pa=null,c(document.body,Ca.noSelection),c(a.elements.dialog,Ca.capture),Fa=!0,l("onresized",a)}}function ja(a){Pa=null;var b=a.elements.dialog;"none"===b.style.maxWidth&&(b.style.maxWidth=b.style.minWidth=b.style.width=b.style.height=b.style.minHeight=b.style.left="",Qa=Number.Nan,Ra=Sa=Ta=0)}function ka(a){a.get("resizable")?(b(a.elements.root,Ca.resizable),a.isOpen()&&sa(a)):(ja(a),c(a.elements.root,Ca.resizable),a.isOpen()&&ta(a))}function la(){for(var a=0;a<p.length;a+=1){var b=p[a];b.get("autoReset")&&(da(b),ja(b))}}function ma(b){1===p.length&&(q(a,"resize",la),q(document.body,"keyup",U),q(document.body,"keydown",V),q(document.body,"focus",X),q(document.documentElement,"mousemove",ba),q(document.documentElement,"touchmove",ba),q(document.documentElement,"mouseup",ca),q(document.documentElement,"touchend",ca),q(document.documentElement,"mousemove",ha),q(document.documentElement,"touchmove",ha),q(document.documentElement,"mouseup",ia),q(document.documentElement,"touchend",ia)),q(b.elements.commands.container,"click",b.__internal.commandsClickHandler),q(b.elements.footer,"click",b.__internal.buttonsClickHandler),q(b.elements.reset[0],"focus",b.__internal.resetHandler),q(b.elements.reset[1],"focus",b.__internal.resetHandler),Ga=!0,q(b.elements.dialog,s.type,b.__internal.transitionInHandler),b.get("modal")||oa(b),b.get("resizable")&&sa(b),b.get("movable")&&qa(b)}function na(b){1===p.length&&(r(a,"resize",la),r(document.body,"keyup",U),r(document.body,"keydown",V),r(document.body,"focus",X),r(document.documentElement,"mousemove",ba),r(document.documentElement,"mouseup",ca),r(document.documentElement,"mousemove",ha),r(document.documentElement,"mouseup",ia)),r(b.elements.commands.container,"click",b.__internal.commandsClickHandler),r(b.elements.footer,"click",b.__internal.buttonsClickHandler),r(b.elements.reset[0],"focus",b.__internal.resetHandler),r(b.elements.reset[1],"focus",b.__internal.resetHandler),q(b.elements.dialog,s.type,b.__internal.transitionOutHandler),b.get("modal")||pa(b),b.get("movable")&&ra(b),b.get("resizable")&&ta(b)}function oa(a){q(a.elements.dialog,"focus",a.__internal.bringToFrontHandler,!0)}function pa(a){r(a.elements.dialog,"focus",a.__internal.bringToFrontHandler,!0)}function qa(a){q(a.elements.header,"mousedown",a.__internal.beginMoveHandler),q(a.elements.header,"touchstart",a.__internal.beginMoveHandler)}function ra(a){r(a.elements.header,"mousedown",a.__internal.beginMoveHandler),r(a.elements.header,"touchstart",a.__internal.beginMoveHandler)}function sa(a){q(a.elements.resizeHandle,"mousedown",a.__internal.beginResizeHandler),q(a.elements.resizeHandle,"touchstart",a.__internal.beginResizeHandler)}function ta(a){r(a.elements.resizeHandle,"mousedown",a.__internal.beginResizeHandler),r(a.elements.resizeHandle,"touchstart",a.__internal.beginResizeHandler)}function ua(a){q(a.elements.modal,"click",a.__internal.modalClickHandler)}function va(a){r(a.elements.modal,"click",a.__internal.modalClickHandler)}var wa,xa,ya=[],za=null,Aa=a.navigator.userAgent.indexOf("Safari")>-1&&a.navigator.userAgent.indexOf("Chrome")<0,Ba={dimmer:'<div class="ajs-dimmer"></div>',modal:'<div class="ajs-modal" tabindex="0"></div>',dialog:'<div class="ajs-dialog" tabindex="0"></div>',reset:'<button class="ajs-reset"></button>',commands:'<div class="ajs-commands"><button class="ajs-pin"></button><button class="ajs-maximize"></button><button class="ajs-close"></button></div>',header:'<div class="ajs-header"></div>',body:'<div class="ajs-body"></div>',content:'<div class="ajs-content"></div>',footer:'<div class="ajs-footer"></div>',buttons:{primary:'<div class="ajs-primary ajs-buttons"></div>',auxiliary:'<div class="ajs-auxiliary ajs-buttons"></div>'},button:'<button class="ajs-button"></button>',resizeHandle:'<div class="ajs-handle"></div>'},Ca={animationIn:"ajs-in",animationOut:"ajs-out",base:"alertify",basic:"ajs-basic",capture:"ajs-capture",closable:"ajs-closable",fixed:"ajs-fixed",frameless:"ajs-frameless",hidden:"ajs-hidden",maximize:"ajs-maximize",maximized:"ajs-maximized",maximizable:"ajs-maximizable",modeless:"ajs-modeless",movable:"ajs-movable",noSelection:"ajs-no-selection",noOverflow:"ajs-no-overflow",noPadding:"ajs-no-padding",pin:"ajs-pin",pinnable:"ajs-pinnable",prefix:"ajs-",resizable:"ajs-resizable",restore:"ajs-restore",shake:"ajs-shake",unpinned:"ajs-unpinned"},Da="",Ea=0,Fa=!1,Ga=!1,Ha=null,Ia=0,Ja=0,Ka="pageX",La="pageY",Ma=null,Na=!1,Oa=null,Pa=null,Qa=Number.Nan,Ra=0,Sa=0,Ta=0;return{__init:m,isOpen:function(){return this.__internal.isOpen},isModal:function(){return this.elements.root.className.indexOf(Ca.modeless)<0},isMaximized:function(){return this.elements.root.className.indexOf(Ca.maximized)>-1},isPinned:function(){return this.elements.root.className.indexOf(Ca.unpinned)<0},maximize:function(){return this.isMaximized()||I(this),this},restore:function(){return this.isMaximized()&&J(this),this},pin:function(){return this.isPinned()||G(this),this},unpin:function(){return this.isPinned()&&H(this),this},bringToFront:function(){return B(null,this),this},moveTo:function(a,b){if(!isNaN(a)&&!isNaN(b)){l("onmove",this);var c=this.elements.dialog,e=c,f=0,g=0;c.style.left&&(f-=parseInt(c.style.left,10)),c.style.top&&(g-=parseInt(c.style.top,10));do f+=e.offsetLeft,g+=e.offsetTop;while(e=e.offsetParent);var h=a-f,i=b-g;d()&&(h*=-1),c.style.left=h+"px",c.style.top=i+"px",l("onmoved",this)}return this},resizeTo:function(a,b){var c=parseFloat(a),d=parseFloat(b),e=/(\d*\.\d+|\d+)%/;if(!isNaN(c)&&!isNaN(d)&&this.get("resizable")===!0){l("onresize",this),(""+a).match(e)&&(c=c/100*document.documentElement.clientWidth),(""+b).match(e)&&(d=d/100*document.documentElement.clientHeight);var f=this.elements.dialog;"none"!==f.style.maxWidth&&(f.style.minWidth=(Sa=f.offsetWidth)+"px"),f.style.maxWidth="none",f.style.minHeight=this.elements.header.offsetHeight+this.elements.footer.offsetHeight+"px",f.style.width=c+"px",f.style.height=d+"px",l("onresized",this)}return this},setting:function(a,b){var c=this,d=D(this,this.__internal.options,function(a,b,d){C(c,a,b,d)},a,b);if("get"===d.op)return d.found?d.value:"undefined"!=typeof this.settings?D(this,this.settings,this.settingUpdated||function(){},a,b).value:void 0;if("set"===d.op){if(d.items.length>0)for(var e=this.settingUpdated||function(){},f=0;f<d.items.length;f+=1){var g=d.items[f];g.found||"undefined"==typeof this.settings||D(this,this.settings,e,g.key,g.value)}return this}},set:function(a,b){return this.setting(a,b),this},get:function(a){return this.setting(a)},setHeader:function(b){return"string"==typeof b?(g(this.elements.header),this.elements.header.innerHTML=b):b instanceof a.HTMLElement&&this.elements.header.firstChild!==b&&(g(this.elements.header),this.elements.header.appendChild(b)),this},setContent:function(b){return"string"==typeof b?(g(this.elements.content),this.elements.content.innerHTML=b):b instanceof a.HTMLElement&&this.elements.content.firstChild!==b&&(g(this.elements.content),this.elements.content.appendChild(b)),this},showModal:function(a){return this.show(!0,a)},show:function(a,d){if(m(this),this.__internal.isOpen){da(this),ja(this),b(this.elements.dialog,Ca.shake);var e=this;setTimeout(function(){c(e.elements.dialog,Ca.shake)},200)}else{if(this.__internal.isOpen=!0,p.push(this),v.defaults.maintainFocus&&(this.__internal.activeElement=document.activeElement),"function"==typeof this.prepare&&this.prepare(),ma(this),void 0!==a&&this.set("modal",a),o(),u(),"string"==typeof d&&""!==d&&(this.__internal.className=d,b(this.elements.root,d)),this.get("startMaximized")?this.maximize():this.isMaximized()&&J(this),N(this),c(this.elements.root,Ca.animationOut),b(this.elements.root,Ca.animationIn),clearTimeout(this.__internal.timerIn),this.__internal.timerIn=setTimeout(this.__internal.transitionInHandler,s.supported?1e3:100),Aa){var f=this.elements.root;f.style.display="none",setTimeout(function(){f.style.display="block"},0)}za=this.elements.root.offsetWidth,c(this.elements.root,Ca.hidden),"function"==typeof this.hooks.onshow&&this.hooks.onshow.call(this),l("onshow",this)}return this},close:function(){return this.__internal.isOpen&&(na(this),c(this.elements.root,Ca.animationIn),b(this.elements.root,Ca.animationOut),clearTimeout(this.__internal.timerOut),this.__internal.timerOut=setTimeout(this.__internal.transitionOutHandler,s.supported?1e3:100),b(this.elements.root,Ca.hidden),za=this.elements.modal.offsetWidth,"undefined"!=typeof this.__internal.className&&""!==this.__internal.className&&c(this.elements.root,this.__internal.className),"function"==typeof this.hooks.onclose&&this.hooks.onclose.call(this),l("onclose",this),p.splice(p.indexOf(this),1),this.__internal.isOpen=!1,u()),this},closeOthers:function(){return v.closeAll(this),this},destroy:function(){return this.__internal.isOpen?(this.__internal.destroy=function(){i(this,m)},this.close()):i(this,m),this}}}(),u=function(){function d(a){a.__internal||(a.__internal={position:v.defaults.notifier.position,delay:v.defaults.notifier.delay},l=document.createElement("DIV"),h(a)),l.parentNode!==document.body&&document.body.appendChild(l)}function e(a){a.__internal.pushed=!0,m.push(a)}function f(a){m.splice(m.indexOf(a),1),a.__internal.pushed=!1}function h(a){switch(l.className=n.base,a.__internal.position){case"top-right":b(l,n.top+" "+n.right);break;case"top-left":b(l,n.top+" "+n.left);break;case"bottom-left":b(l,n.bottom+" "+n.left);break;default:case"bottom-right":b(l,n.bottom+" "+n.right)}}function i(d,h){function i(a,b){b.dismiss(!0)}function m(a,b){r(b.element,s.type,m),l.removeChild(b.element)}function o(a){return a.__internal||(a.__internal={pushed:!1,delay:void 0,timer:void 0,clickHandler:void 0,transitionEndHandler:void 0,transitionTimeout:void 0},a.__internal.clickHandler=j(a,i),a.__internal.transitionEndHandler=j(a,m)),a}function p(a){clearTimeout(a.__internal.timer),clearTimeout(a.__internal.transitionTimeout)}return o({element:d,push:function(a,c){if(!this.__internal.pushed){e(this),p(this);var d,f;switch(arguments.length){case 0:f=this.__internal.delay;break;case 1:"number"==typeof a?f=a:(d=a,f=this.__internal.delay);break;case 2:d=a,f=c}return"undefined"!=typeof d&&this.setContent(d),u.__internal.position.indexOf("top")<0?l.appendChild(this.element):l.insertBefore(this.element,l.firstChild),k=this.element.offsetWidth,b(this.element,n.visible),q(this.element,"click",this.__internal.clickHandler),this.delay(f)}return this},ondismiss:function(){},callback:h,dismiss:function(a){return this.__internal.pushed&&(p(this),("function"!=typeof this.ondismiss||this.ondismiss.call(this)!==!1)&&(r(this.element,"click",this.__internal.clickHandler),"undefined"!=typeof this.element&&this.element.parentNode===l&&(this.__internal.transitionTimeout=setTimeout(this.__internal.transitionEndHandler,s.supported?1e3:100),c(this.element,n.visible),"function"==typeof this.callback&&this.callback.call(this,a)),f(this))),this},delay:function(a){if(p(this),this.__internal.delay="undefined"==typeof a||isNaN(+a)?u.__internal.delay:+a,this.__internal.delay>0){var b=this;this.__internal.timer=setTimeout(function(){b.dismiss()},1e3*this.__internal.delay)}return this},setContent:function(b){return"string"==typeof b?(g(this.element),this.element.innerHTML=b):b instanceof a.HTMLElement&&this.element.firstChild!==b&&(g(this.element),this.element.appendChild(b)),this},dismissOthers:function(){return u.dismissAll(this),this}})}var k,l,m=[],n={base:"alertify-notifier",message:"ajs-message",top:"ajs-top",right:"ajs-right",bottom:"ajs-bottom",left:"ajs-left",visible:"ajs-visible",hidden:"ajs-hidden"};return{setting:function(a,b){if(d(this),"undefined"==typeof b)return this.__internal[a];switch(a){case"position":this.__internal.position=b,h(this);break;case"delay":this.__internal.delay=b}return this},set:function(a,b){return this.setting(a,b),this},get:function(a){return this.setting(a)},create:function(a,b){d(this);var c=document.createElement("div");return c.className=n.message+("string"==typeof a&&""!==a?" ajs-"+a:""),i(c,b)},dismissAll:function(a){for(var b=m.slice(0),c=0;c<b.length;c+=1){var d=b[c];(void 0===a||a!==d)&&d.dismiss()}}}}(),v=new m;v.dialog("alert",function(){return{main:function(a,b,c){var d,e,f;switch(arguments.length){case 1:e=a;break;case 2:"function"==typeof b?(e=a,f=b):(d=a,e=b);break;case 3:d=a,e=b,f=c}return this.set("title",d),this.set("message",e),this.set("onok",f),this},setup:function(){return{buttons:[{text:v.defaults.glossary.ok,key:n.ESC,invokeOnClose:!0,className:v.defaults.theme.ok}],focus:{element:0,select:!1},options:{maximizable:!1,resizable:!1}}},build:function(){},prepare:function(){},setMessage:function(a){this.setContent(a)},settings:{message:void 0,onok:void 0,label:void 0},settingUpdated:function(a,b,c){switch(a){case"message":this.setMessage(c);break;case"label":this.__internal.buttons[0].element&&(this.__internal.buttons[0].element.innerHTML=c)}},callback:function(a){if("function"==typeof this.get("onok")){var b=this.get("onok").call(this,a);"undefined"!=typeof b&&(a.cancel=!b)}}}}),v.dialog("confirm",function(){function a(a){null!==c.timer&&(clearInterval(c.timer),c.timer=null,a.__internal.buttons[c.index].element.innerHTML=c.text)}function b(b,d,e){a(b),c.duration=e,c.index=d,c.text=b.__internal.buttons[d].element.innerHTML,c.timer=setInterval(j(b,c.task),1e3),c.task(null,b)}var c={timer:null,index:null,text:null,duration:null,task:function(b,d){if(d.isOpen()){if(d.__internal.buttons[c.index].element.innerHTML=c.text+" (‏"+c.duration+"‏) ",c.duration-=1,-1===c.duration){a(d);var e=d.__internal.buttons[c.index],f=k(c.index,e);"function"==typeof d.callback&&d.callback.apply(d,[f]),f.close!==!1&&d.close()}}else a(d)}};return{main:function(a,b,c,d){var e,f,g,h;switch(arguments.length){case 1:f=a;break;case 2:f=a,g=b;break;case 3:f=a,g=b,h=c;break;case 4:e=a,f=b,g=c,h=d}return this.set("title",e),this.set("message",f),this.set("onok",g),this.set("oncancel",h),this},setup:function(){return{buttons:[{text:v.defaults.glossary.ok,key:n.ENTER,className:v.defaults.theme.ok},{text:v.defaults.glossary.cancel,key:n.ESC,invokeOnClose:!0,className:v.defaults.theme.cancel}],focus:{element:0,select:!1},options:{maximizable:!1,resizable:!1}}},build:function(){},prepare:function(){},setMessage:function(a){this.setContent(a)},settings:{message:null,labels:null,onok:null,oncancel:null,defaultFocus:null,reverseButtons:null},settingUpdated:function(a,b,c){switch(a){case"message":this.setMessage(c); | |
3 | +break;case"labels":"ok"in c&&this.__internal.buttons[0].element&&(this.__internal.buttons[0].text=c.ok,this.__internal.buttons[0].element.innerHTML=c.ok),"cancel"in c&&this.__internal.buttons[1].element&&(this.__internal.buttons[1].text=c.cancel,this.__internal.buttons[1].element.innerHTML=c.cancel);break;case"reverseButtons":c===!0?this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element):this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element);break;case"defaultFocus":this.__internal.focus.element="ok"===c?0:1}},callback:function(b){a(this);var c;switch(b.index){case 0:"function"==typeof this.get("onok")&&(c=this.get("onok").call(this,b),"undefined"!=typeof c&&(b.cancel=!c));break;case 1:"function"==typeof this.get("oncancel")&&(c=this.get("oncancel").call(this,b),"undefined"!=typeof c&&(b.cancel=!c))}},autoOk:function(a){return b(this,0,a),this},autoCancel:function(a){return b(this,1,a),this}}}),v.dialog("prompt",function(){var b=document.createElement("INPUT"),c=document.createElement("P");return{main:function(a,b,c,d,e){var f,g,h,i,j;switch(arguments.length){case 1:g=a;break;case 2:g=a,h=b;break;case 3:g=a,h=b,i=c;break;case 4:g=a,h=b,i=c,j=d;break;case 5:f=a,g=b,h=c,i=d,j=e}return this.set("title",f),this.set("message",g),this.set("value",h),this.set("onok",i),this.set("oncancel",j),this},setup:function(){return{buttons:[{text:v.defaults.glossary.ok,key:n.ENTER,className:v.defaults.theme.ok},{text:v.defaults.glossary.cancel,key:n.ESC,invokeOnClose:!0,className:v.defaults.theme.cancel}],focus:{element:b,select:!0},options:{maximizable:!1,resizable:!1}}},build:function(){b.className=v.defaults.theme.input,b.setAttribute("type","text"),b.value=this.get("value"),this.elements.content.appendChild(c),this.elements.content.appendChild(b)},prepare:function(){},setMessage:function(b){"string"==typeof b?(g(c),c.innerHTML=b):b instanceof a.HTMLElement&&c.firstChild!==b&&(g(c),c.appendChild(b))},settings:{message:void 0,labels:void 0,onok:void 0,oncancel:void 0,value:"",type:"text",reverseButtons:void 0},settingUpdated:function(a,c,d){switch(a){case"message":this.setMessage(d);break;case"value":b.value=d;break;case"type":switch(d){case"text":case"color":case"date":case"datetime-local":case"email":case"month":case"number":case"password":case"search":case"tel":case"time":case"week":b.type=d;break;default:b.type="text"}break;case"labels":d.ok&&this.__internal.buttons[0].element&&(this.__internal.buttons[0].element.innerHTML=d.ok),d.cancel&&this.__internal.buttons[1].element&&(this.__internal.buttons[1].element.innerHTML=d.cancel);break;case"reverseButtons":d===!0?this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element):this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element)}},callback:function(a){var c;switch(a.index){case 0:this.settings.value=b.value,"function"==typeof this.get("onok")&&(c=this.get("onok").call(this,a,this.settings.value),"undefined"!=typeof c&&(a.cancel=!c));break;case 1:"function"==typeof this.get("oncancel")&&(c=this.get("oncancel").call(this,a),"undefined"!=typeof c&&(a.cancel=!c)),a.cancel||(b.value=this.settings.value)}}}}),"object"==typeof module&&"object"==typeof module.exports?module.exports=v:"function"==typeof define&&define.amd?define([],function(){return v}):a.alertify||(a.alertify=v)}("undefined"!=typeof window?window:this); | |
0 | 4 | \ No newline at end of file | ... | ... |
core/templates/base.html
... | ... | @@ -7,8 +7,7 @@ |
7 | 7 | <title>{{ title }}</title> |
8 | 8 | |
9 | 9 | <meta http-equiv="Cache-Control" content="no-cache, no-store" /> |
10 | - <!--<link href="{% static 'img/favicon.ico' %}" rel="shortcut icon" />--> | |
11 | - | |
10 | + <link href="{% static 'img/favicon.ico' %}" rel="shortcut icon" /> | |
12 | 11 | <!-- Roboto font --> |
13 | 12 | <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> |
14 | 13 | <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> |
... | ... | @@ -18,15 +17,18 @@ |
18 | 17 | <script type="text/javascript" src="{% static 'js/vendor/jquery-ui.js' %}"></script> |
19 | 18 | |
20 | 19 | <!-- Bootstrap and themes (material) --> |
21 | - <link rel="stylesheet" type="text/css" href="{% static 'bootstrap-3.3.7/css/bootstrap.min.css' %}"> | |
20 | + <link rel="stylesheet" type="text/css" href="{% static 'bootstrap-3.3.7/css/bootstrap.css' %}"> | |
22 | 21 | <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/material.min.css' %}"> |
23 | 22 | <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/ripples.min.css' %}"> |
24 | 23 | <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/datepicker.css' %}"> |
25 | - <script type="text/javascript" src="{% static 'js/vendor/bootstrap.min.js' %}"></script> | |
24 | + <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/alertifyjs/alertify.min.css' %}"> | |
25 | + <link rel="stylesheet" type="text/css" href="{% static 'css/vendor/alertifyjs/themes/bootstrap.css' %}"> | |
26 | + <script type="text/javascript" src="{% static 'bootstrap-3.3.7/js/bootstrap.js' %}"></script> | |
26 | 27 | <script type="text/javascript" src="{% static 'js/vendor/bootstrap-acessibility.min.js' %}"></script> |
27 | 28 | <script type="text/javascript" src="{% static 'js/vendor/material.min.js' %}"></script> |
28 | 29 | <script type="text/javascript" src="{% static 'js/vendor/ripples.min.js' %}"></script> |
29 | 30 | <script type="text/javascript" src="{% static 'js/vendor/bootstrap-datepicker.js' %}"></script> |
31 | + <script type="text/javascript" src="{% static 'js/vendor/alertify.min.js' %}"></script> | |
30 | 32 | |
31 | 33 | <!-- Font awesome --> |
32 | 34 | <link rel="stylesheet" type="text/css" href="{% static 'font-awesome-4.6.3/css/font-awesome.min.css' %}"> |
... | ... | @@ -38,8 +40,11 @@ |
38 | 40 | <script type="text/javascript">$.material.init()</script> |
39 | 41 | |
40 | 42 | <!--Javascript block for specific-app ones --> |
43 | + <script src="{% static 'js/base/amadeus.js' %}"></script> | |
41 | 44 | {% block style %} |
42 | 45 | {% endblock %} |
46 | + {% block javascript %} | |
47 | + {% endblock %} | |
43 | 48 | </head> |
44 | 49 | <body> |
45 | 50 | <div class="container-fluid"> |
... | ... | @@ -57,44 +62,14 @@ |
57 | 62 | <div class="navbar-collapse collapse navbar-responsive-collapse"> |
58 | 63 | <ul class="nav navbar-nav navbar-right notifications"> |
59 | 64 | <li class="" data-toggle="tooltip" data-placement="bottom" title data-original-title="notifications"> |
60 | - <a class="dropdown-toggle" data-toggle="dropdown"> <span class="badge notification-count">{{notifications.count}}</span><i class="fa fa-bell" aria-hidden="true"></i></a> | |
65 | + <a class="dropdown-toggle" data-toggle="dropdown"> <span id="notification-count" class="badge notification-count">{{notifications.count}}</span><i class="fa fa-bell" aria-hidden="true"></i></a> | |
61 | 66 | <ul id="notification-dropdown" class="dropdown-menu"> |
62 | 67 | <li class="dropdown-header">Notifications</li> |
63 | - {% for notification in notifications %} | |
64 | - {% if notification.actor %} <!-- if the notification has a user--> | |
65 | - <li> | |
66 | - <a href="{% url 'core:notification_read' notification.id %}"><div class="list-group-item"> | |
67 | - <div class="row-picture"> | |
68 | - <img class="circle" src="http://lorempixel.com/56/56/people/1" alt="icon"> | |
69 | - <div class="least-content pull-right">{{ notification.datetime }}</div> | |
70 | - </div> | |
71 | - <div class="row-content"> | |
72 | - <p class="list-group-item-text">{{ notification.message }}</p> | |
73 | - </div> | |
74 | - </div> | |
75 | - </a> | |
76 | - </li> | |
77 | - {% else %} | |
78 | - <li> | |
79 | - <a href="{% url 'core:notification_read' notification.id %}"> | |
80 | - <div class="list-group-item"> | |
81 | - <div class="row-action-primary"> | |
82 | - <i class="material-icons">folder</i> | |
83 | - </div> | |
84 | - <div class="row-content"> | |
85 | - | |
86 | - <div class="least-content pull-right">{{ notification.datetime }}</div> | |
87 | - | |
88 | - <p class="list-group-item-text">{{ notification.message }}</p> | |
89 | - </div> | |
90 | - </a> | |
91 | - </li> | |
92 | - {% endif %} | |
93 | - {% endfor %} | |
68 | + {% include "notifications.html" %} | |
94 | 69 | |
95 | 70 | <li> |
96 | - <a> | |
97 | - <div class="list-group-item"> | |
71 | + <a onclick="getNotifications(5)"> | |
72 | + <div id="notification-see-more" class="list-group-item"> | |
98 | 73 | <div class="row-content"> |
99 | 74 | <p class="list-group-item-text">See More</p> |
100 | 75 | </div> |
... | ... | @@ -128,22 +103,19 @@ |
128 | 103 | |
129 | 104 | {% endblock %} |
130 | 105 | <div class="row"> |
131 | - <div class="col-xs-9 col-sm-9 col-md-9 col-lg-9 col-xl-9"> | |
106 | + <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> | |
132 | 107 | {% block content %} |
133 | 108 | |
134 | 109 | {% endblock %} |
135 | - </div> | |
110 | + </div> | |
136 | 111 | |
137 | - <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 col-xl-3"> | |
138 | - {% block rightbar %} | |
139 | - | |
140 | - {% endblock rightbar %} | |
141 | - </div> | |
112 | + | |
142 | 113 | </div> |
143 | 114 | </div> |
144 | - | |
145 | - | |
146 | 115 | </div> |
147 | 116 | </div> |
117 | + <script src="{% static 'js/main.js' %}"></script> | |
118 | + <script type="text/javascript" src="{% static 'js/topic_editation_presentation.js' %}"></script> | |
148 | 119 | </body> |
120 | + | |
149 | 121 | </html> | ... | ... |
core/templates/index.html
... | ... | @@ -59,7 +59,7 @@ |
59 | 59 | </div> |
60 | 60 | </form> |
61 | 61 | <div class="col-md-10 col-sm-10 col-xs-10 col-lg-10"> |
62 | - <a href="{% url 'core:remember_password' %}">{% trans "Forgot your password?" %}</a> | |
62 | + <a href="{% url 'core:password_reset' %}">{% trans "Forgot your password?" %}</a> | |
63 | 63 | </div> |
64 | 64 | {# </div> #} |
65 | 65 | {# <div class="row"> #} |
... | ... | @@ -78,6 +78,4 @@ |
78 | 78 | </div> |
79 | 79 | {% endblock%} |
80 | 80 | |
81 | -{% block rightbar %} | |
82 | 81 | |
83 | -{% endblock rightbar %} | ... | ... |
... | ... | @@ -0,0 +1,33 @@ |
1 | + | |
2 | +<!-- This templates is responsible to display the list of notifications at the top of the page. --> | |
3 | +{% for notification in notifications %} | |
4 | + {% if notification.actor %} <!-- if the notification has a user--> | |
5 | + <li> | |
6 | + <a href="{% url 'core:notification_read' notification.id %}"><div class="list-group-item"> | |
7 | + <div class="row-picture"> | |
8 | + <img class="circle" src="http://lorempixel.com/56/56/people/1" alt="icon"> | |
9 | + <div class="least-content pull-right">{{ notification.datetime }}</div> | |
10 | + </div> | |
11 | + <div class="row-content"> | |
12 | + <p class="list-group-item-text">{{ notification.message }}</p> | |
13 | + </div> | |
14 | + </div> | |
15 | + </a> | |
16 | + </li> | |
17 | + {% else %} | |
18 | + <li> | |
19 | + <a href="{% url 'core:notification_read' notification.id %}"> | |
20 | + <div class="list-group-item"> | |
21 | + <div class="row-action-primary"> | |
22 | + <i class="material-icons">folder</i> | |
23 | + </div> | |
24 | + <div class="row-content"> | |
25 | + | |
26 | + <div class="least-content pull-right">{{ notification.datetime }}</div> | |
27 | + | |
28 | + <p class="list-group-item-text">{{ notification.message }}</p> | |
29 | + </div> | |
30 | + </a> | |
31 | + </li> | |
32 | + {% endif %} | |
33 | +{% endfor %} | |
0 | 34 | \ No newline at end of file | ... | ... |
core/templates/register_user.html
... | ... | @@ -8,11 +8,16 @@ |
8 | 8 | |
9 | 9 | |
10 | 10 | {% block content %} |
11 | - {% if message %} | |
12 | - <div class="alert alert-danger"> | |
13 | - {{message}} | |
14 | - </div> | |
15 | - {% endif %} | |
11 | + {% if messages %} | |
12 | + {% for message in messages %} | |
13 | + <div class="alert alert-{{ message.tags }} alert-dismissible" role="alert"> | |
14 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
15 | + <span aria-hidden="true">×</span> | |
16 | + </button> | |
17 | + <p>{{ message }}</p> | |
18 | + </div> | |
19 | + {% endfor %} | |
20 | + {% endif %} | |
16 | 21 | <div class="row logo-row"> |
17 | 22 | <div class="col-lg-offset-2 col-lg-9"> |
18 | 23 | <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus" id="logo"> |
... | ... | @@ -29,10 +34,15 @@ |
29 | 34 | <legend>{% trans 'User Register' %}</legend> |
30 | 35 | {% for field in form %} |
31 | 36 | <div class="form-group is-empy{% if form.has_error %} has-error {% endif %} is-fileinput"> |
32 | - <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}</label> | |
37 | + {% if field.field.required %} | |
38 | + <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}<span>*</span></label> | |
39 | + {% else %} | |
40 | + <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}</label> | |
41 | + {% endif %} | |
33 | 42 | <div class="col-md-8"> |
34 | 43 | {% if field.auto_id == 'id_birth_date' %} |
35 | - {% render_field field class='form-control input-sm' type='date' %} | |
44 | + {% render_field field class='form-control input-sm date-picker' %} | |
45 | + | |
36 | 46 | <span id="helpBlock" class="help-block">{{ field.help_text }}</span> |
37 | 47 | {% elif field.auto_id == 'id_image' %} |
38 | 48 | {% render_field field class='form-control input-sm' %} |
... | ... | @@ -46,6 +56,9 @@ |
46 | 56 | </div> |
47 | 57 | {% elif field.auto_id == 'id_cpf' %} |
48 | 58 | {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} |
59 | + | |
60 | + {% elif field.auto_id == 'id_phone' %} | |
61 | + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} | |
49 | 62 | {% else %} |
50 | 63 | {% render_field field class='form-control' %} |
51 | 64 | <span id="helpBlock" class="help-block">{{ field.help_text }}</span> |
... | ... | @@ -81,5 +94,4 @@ |
81 | 94 | </div> |
82 | 95 | |
83 | 96 | <br clear="all" /> |
84 | - <script src="{% static 'js/base/amadeus.js' %}"></script> | |
85 | 97 | {% endblock %} | ... | ... |
... | ... | @@ -0,0 +1,37 @@ |
1 | +{% extends "index.html" %} | |
2 | +{% load i18n static %} | |
3 | + | |
4 | +{% block content %} | |
5 | + | |
6 | + <div class="row"> | |
7 | + <div class="col-md-4 col-md-offset-4 col-xs-4 col-xs-offset-4 col-sm-4 col-sm-offset-4 col-lg-4 col-lg-offset-4 col-xl-4 col-xl-offset-4"> | |
8 | + <div class="row"> | |
9 | + <div class="col-md-offset-2 col-md-8 col-sm-offset-2 col-sm-8 col-xs-offset-2 col-xs-8 col-lg-offset-2 col-lg-8 col-xs-offset-2 col-xs-8"> | |
10 | + </br> | |
11 | + </br> | |
12 | + <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus"> | |
13 | + </br> | |
14 | + </div> | |
15 | + </div> | |
16 | + </div> | |
17 | + <div class="row "> | |
18 | + <div class="col-lg-9 col-lg-offset-2 col-xs-9 col-xs-offset-2 col-sm-9 col-sm-offset-2 col-md-9 col-md-offset-2 col-xl-9 col-xl-offset-2"> | |
19 | + <div class="card"> | |
20 | + <div class="card-block"> | |
21 | + <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12 col-xl-12"> | |
22 | + <form class="form-group " method="post" action=""> | |
23 | + {% csrf_token %} | |
24 | + <div class="form-group is-empty"> | |
25 | + <p> | |
26 | + Sua senha foi definida. Você pode ir em frente e entrar agora. | |
27 | + </p> | |
28 | + </div> | |
29 | + </form> | |
30 | + </div> | |
31 | + </div> | |
32 | + </div> | |
33 | + </div> | |
34 | + </div> | |
35 | + </div> | |
36 | + | |
37 | +{% endblock content %} | ... | ... |
... | ... | @@ -0,0 +1,40 @@ |
1 | +{% extends "index.html" %} | |
2 | +{% load i18n static %} | |
3 | + | |
4 | + {% block content%} | |
5 | + | |
6 | + <div class="row"> | |
7 | + <div class="col-md-4 col-md-offset-4 col-xs-4 col-xs-offset-4 col-sm-4 col-sm-offset-4 col-lg-4 col-lg-offset-4 col-xl-4 col-xl-offset-4"> | |
8 | + <div class="row"> | |
9 | + <div class="col-md-offset-2 col-md-8 col-sm-offset-2 col-sm-8 col-xs-offset-2 col-xs-8 col-lg-offset-2 col-lg-8 col-xs-offset-2 col-xs-8"> | |
10 | + </br> | |
11 | + </br> | |
12 | + <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus"> | |
13 | + </br> | |
14 | + </div> | |
15 | + </div> | |
16 | + </div> | |
17 | + <div class="row "> | |
18 | + <div class="col-lg-9 col-lg-offset-2 col-xs-9 col-xs-offset-2 col-sm-9 col-sm-offset-2 col-md-9 col-md-offset-2 col-xl-9 col-xl-offset-2"> | |
19 | + | |
20 | + | |
21 | + | |
22 | + {% if validlink %} | |
23 | + | |
24 | + <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> | |
25 | + | |
26 | + <form method="post">{% csrf_token %} | |
27 | + {{ form.new_password1.errors }} | |
28 | + <p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p> | |
29 | + {{ form.new_password2.errors }} | |
30 | + <p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p> | |
31 | + <p><input type="submit" value="{% trans 'Change my password' %}" /></p> | |
32 | + </form> | |
33 | + | |
34 | + {% else %} | |
35 | + | |
36 | + <p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> | |
37 | + | |
38 | + {% endif %} | |
39 | + | |
40 | + {% endblock %} | ... | ... |
... | ... | @@ -0,0 +1,41 @@ |
1 | +{% extends "index.html" %} | |
2 | +{% load i18n static %} | |
3 | + | |
4 | +{% block content %} | |
5 | + | |
6 | + <div class="row"> | |
7 | + <div class="col-md-4 col-md-offset-4 col-xs-4 col-xs-offset-4 col-sm-4 col-sm-offset-4 col-lg-4 col-lg-offset-4 col-xl-4 col-xl-offset-4"> | |
8 | + <div class="row"> | |
9 | + <div class="col-md-offset-2 col-md-8 col-sm-offset-2 col-sm-8 col-xs-offset-2 col-xs-8 col-lg-offset-2 col-lg-8 col-xs-offset-2 col-xs-8"> | |
10 | + </br> | |
11 | + </br> | |
12 | + <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus"> | |
13 | + </br> | |
14 | + </div> | |
15 | + </div> | |
16 | + </div> | |
17 | + <div class="row "> | |
18 | + <div class="col-lg-9 col-lg-offset-2 col-xs-9 col-xs-offset-2 col-sm-9 col-sm-offset-2 col-md-9 col-md-offset-2 col-xl-9 col-xl-offset-2"> | |
19 | + <div class="card"> | |
20 | + <div class="card-block"> | |
21 | + <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12 col-xl-12"> | |
22 | + <form class="form-group " method="post" action=""> | |
23 | + {% csrf_token %} | |
24 | + <div class="form-group is-empty"> | |
25 | + <p> | |
26 | + Temos enviado instruções para configurar sua senha, se uma conta existe com o e-mail inserido. | |
27 | + Você deve recebê-los em breve. | |
28 | + </p> | |
29 | + <p> | |
30 | + Se você não receber um e-mail, por favor, certifique-se de que introduziu o endereço que você registrou, | |
31 | + e verifique a pasta de spam. | |
32 | + </p> | |
33 | + </div> | |
34 | + </form> | |
35 | + </div> | |
36 | + </div> | |
37 | + </div> | |
38 | + </div> | |
39 | + </div> | |
40 | + | |
41 | +{% endblock %} | ... | ... |
... | ... | @@ -0,0 +1,14 @@ |
1 | +To initiate the password reset process for your {{ user.get_username }} TestSite Account, | |
2 | +click the link below: | |
3 | + | |
4 | +{% block reset_link %} | |
5 | +{{ protocol }}://{{ domain }}{% url 'core:password_reset_confirm' uidb64=uid token=token %} | |
6 | + | |
7 | +{% endblock %} | |
8 | + | |
9 | +If clicking the link above doesn't work, please copy and paste the URL in a new browser | |
10 | +window instead. | |
11 | + | |
12 | + | |
13 | +Sincerely, | |
14 | +Amadeus. | ... | ... |
... | ... | @@ -0,0 +1,58 @@ |
1 | +{% extends "index.html" %} | |
2 | +{% load i18n static %} | |
3 | +{% block content%} | |
4 | + | |
5 | + <div class="row"> | |
6 | + <div class="col-md-4 col-md-offset-4 col-xs-4 col-xs-offset-4 col-sm-4 col-sm-offset-4 col-lg-4 col-lg-offset-4 col-xl-4 col-xl-offset-4"> | |
7 | + <div class="row"> | |
8 | + <div class="col-md-offset-2 col-md-8 col-sm-offset-2 col-sm-8 col-xs-offset-2 col-xs-8 col-lg-offset-2 col-lg-8 col-xs-offset-2 col-xs-8"> | |
9 | + </br> | |
10 | + </br> | |
11 | + <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus"> | |
12 | + </br> | |
13 | + </div> | |
14 | + </div> | |
15 | + </div> | |
16 | + <div class="row "> | |
17 | + <div class="col-lg-9 col-lg-offset-2 col-xs-9 col-xs-offset-2 col-sm-9 col-sm-offset-2 col-md-9 col-md-offset-2 col-xl-9 col-xl-offset-2"> | |
18 | + {% if success %} | |
19 | + <div class="alert alert-success alert-dismissible" role="alert"> | |
20 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
21 | + <span aria-hidden="true">×</span> | |
22 | + </button> | |
23 | + <ul> | |
24 | + <li>{{ success }}</li> | |
25 | + </ul> | |
26 | + </div> | |
27 | + {% elif danger %} | |
28 | + <div class="alert alert-danger alert-dismissible" role="alert"> | |
29 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
30 | + <span aria-hidden="true">×</span> | |
31 | + </button> | |
32 | + <ul> | |
33 | + <li>{{ danger }}</li> | |
34 | + </ul> | |
35 | + </div> | |
36 | + {% endif %} | |
37 | + <div class="card"> | |
38 | + <div class="card-block"> | |
39 | + <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12 col-xl-12"> | |
40 | + <form class="form-group " method="post" action=""> | |
41 | + {% csrf_token %} | |
42 | + <div class="form-group is-empty"> | |
43 | + <label for="inputEmail" class="ccontrol-label"> {% trans 'E-mail' %}</label> | |
44 | + <input name="email" type="email" class="form-control" id="inputEmail" placeholder="Email" {% if email %}value="{{form.email}}"{% endif %}> | |
45 | + </div> | |
46 | + <div class="col-lg-offset-4 col-lg-4 col-xs-offset-4 col-xs-4 col-sm-offset-4 col-sm-4 col-md-offset-4 col-md-4 col-xl-offset-4 col-xl-4"> | |
47 | + <button type="submite" class="btn btn-raised btn-primary btn-block">{% trans 'Send' %}</button> | |
48 | + | |
49 | + </div> | |
50 | + </form> | |
51 | + </div> | |
52 | + </div> | |
53 | + </div> | |
54 | + </div> | |
55 | + </div> | |
56 | + </div> | |
57 | + | |
58 | +{% endblock content %} | ... | ... |
core/templates/remember_password.html
... | ... | @@ -1,62 +0,0 @@ |
1 | -{% extends "index.html" %} | |
2 | -{% load i18n static %} | |
3 | -{% block content%} | |
4 | - | |
5 | - <div class="row"> | |
6 | - <div class="col-md-4 col-md-offset-4 col-xs-4 col-xs-offset-4 col-sm-4 col-sm-offset-4 col-lg-4 col-lg-offset-4 col-xl-4 col-xl-offset-4"> | |
7 | - <div class="row"> | |
8 | - <div class="col-md-offset-2 col-md-8 col-sm-offset-2 col-sm-8 col-xs-offset-2 col-xs-8 col-lg-offset-2 col-lg-8 col-xs-offset-2 col-xs-8"> | |
9 | - </br> | |
10 | - </br> | |
11 | - <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus"> | |
12 | - </br> | |
13 | - </div> | |
14 | - </div> | |
15 | - </div> | |
16 | - <div class="row "> | |
17 | - <div class="col-lg-9 col-lg-offset-2 col-xs-9 col-xs-offset-2 col-sm-9 col-sm-offset-2 col-md-9 col-md-offset-2 col-xl-9 col-xl-offset-2"> | |
18 | - {% if success %} | |
19 | - <div class="alert alert-success alert-dismissible" role="alert"> | |
20 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
21 | - <span aria-hidden="true">×</span> | |
22 | - </button> | |
23 | - <ul> | |
24 | - <li>{{ success }}</li> | |
25 | - </ul> | |
26 | - </div> | |
27 | - {% elif danger %} | |
28 | - <div class="alert alert-danger alert-dismissible" role="alert"> | |
29 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
30 | - <span aria-hidden="true">×</span> | |
31 | - </button> | |
32 | - <ul> | |
33 | - <li>{{ danger }}</li> | |
34 | - </ul> | |
35 | - </div> | |
36 | - {% endif %} | |
37 | - <div class="card"> | |
38 | - <div class="card-block"> | |
39 | - <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12 col-xl-12"> | |
40 | - <form class="form-group " method="post" action=""> | |
41 | - {% csrf_token %} | |
42 | - <div class="form-group is-empty"> | |
43 | - <label for="inputEmail" class="ccontrol-label"> {% trans 'E-mail' %}</label> | |
44 | - <input name="email" type="email" class="form-control" id="inputEmail" placeholder="Email" {% if email %}value="{{email}}"{% endif %}> | |
45 | - </div> | |
46 | - <div class="form-group is-empty"> | |
47 | - <label for="inputRegistration" class="control-label"> {% trans 'Registration' %} </label> | |
48 | - <input name="registration" type="text" class="col-md-4 col-xs-4 col-sm-4 col-lg-4 col-xl-4 form-control" id="inputRegistration" placeholder="Registration" {% if registration %}value="{{registration}}"{% endif %}> | |
49 | - </div> | |
50 | - <div class="col-lg-offset-4 col-lg-4 col-xs-offset-4 col-xs-4 col-sm-offset-4 col-sm-4 col-md-offset-4 col-md-4 col-xl-offset-4 col-xl-4"> | |
51 | - <button type="submite" class="btn btn-raised btn-primary btn-block">{% trans 'Send' %}</button> | |
52 | - | |
53 | - </div> | |
54 | - </form> | |
55 | - </div> | |
56 | - </div> | |
57 | - </div> | |
58 | - </div> | |
59 | - </div> | |
60 | - </div> | |
61 | - | |
62 | -{% endblock content %} |
core/tests.py
1 | 1 | from django.test import TestCase, Client |
2 | 2 | from django.core.urlresolvers import reverse |
3 | +from django.utils.translation import ugettext_lazy as _ | |
3 | 4 | from rolepermissions.shortcuts import assign_role |
4 | 5 | from users.models import User |
5 | 6 | from django.core import mail |
... | ... | @@ -44,9 +45,11 @@ class RegisterUserTestCase(TestCase): |
44 | 45 | self.url = reverse('core:register') |
45 | 46 | self.data = { |
46 | 47 | 'username': 'testeamadeus', |
48 | + 'birth_date': '12/12/2000', | |
47 | 49 | 'email': 'teste@amadeus.com', |
48 | 50 | 'password': 'aminhasenha1', |
49 | 51 | 'password2': 'aminhasenha1', |
52 | + 'cpf': '705.089.884-89', | |
50 | 53 | 'name': 'Teste Amadeus', |
51 | 54 | 'city': 'Praia', |
52 | 55 | 'state': 'PE', |
... | ... | @@ -55,9 +58,9 @@ class RegisterUserTestCase(TestCase): |
55 | 58 | |
56 | 59 | def test_register_ok(self): |
57 | 60 | |
58 | - response = self.client.post(self.url, self.data) | |
59 | - self.assertRedirects(response, 'http://localhost%s' % reverse('core:home')) | |
60 | - self.assertEqual(response.status_code, 302) | |
61 | + response = self.client.post(self.url, self.data, follow=True) | |
62 | + self.assertRedirects(response, reverse('core:home')) | |
63 | + self.assertEqual(response.status_code, 200) | |
61 | 64 | self.assertEqual(User.objects.count(), 1) |
62 | 65 | |
63 | 66 | def test_register_error(self): |
... | ... | @@ -66,6 +69,7 @@ class RegisterUserTestCase(TestCase): |
66 | 69 | |
67 | 70 | data = { |
68 | 71 | 'username': 'testeamadeus', |
72 | + 'birth_date': '12/12/2000', | |
69 | 73 | 'email': 'teste@amadeus.com', |
70 | 74 | 'password': 'aminhasenha1', |
71 | 75 | 'password2': 'aminhasenha', |
... | ... | @@ -80,6 +84,7 @@ class RegisterUserTestCase(TestCase): |
80 | 84 | data = { |
81 | 85 | 'username': 'testeamadeus', |
82 | 86 | 'email': 'teste.amadeus.com', |
87 | + 'birth_date': '12/12/2000', | |
83 | 88 | 'password': 'aminhasenha1', |
84 | 89 | 'password2': 'aminhasenha', |
85 | 90 | 'name': 'Teste Amadeus', |
... | ... | @@ -89,11 +94,12 @@ class RegisterUserTestCase(TestCase): |
89 | 94 | } |
90 | 95 | |
91 | 96 | response = self.client.post(self.url, data) |
92 | - self.assertFormError(response, 'form', 'email', 'Insira um endereço de email válido.') | |
97 | + self.assertFormError(response, 'form', 'email', _('Enter a valid email address.')) | |
93 | 98 | |
94 | 99 | data = { |
95 | 100 | 'username': '', |
96 | 101 | 'email': 'teste@amadeus.com', |
102 | + 'birth_date': '12/12/2000', | |
97 | 103 | 'password': 'aminhasenha1', |
98 | 104 | 'password2': 'aminhasenha', |
99 | 105 | 'name': 'Teste Amadeus', |
... | ... | @@ -102,7 +108,7 @@ class RegisterUserTestCase(TestCase): |
102 | 108 | 'gender': 'F', |
103 | 109 | } |
104 | 110 | response = self.client.post(self.url, data) |
105 | - self.assertFormError(response, 'form', 'username', 'Este campo é obrigatório.') | |
111 | + self.assertFormError(response, 'form', 'username', _('This field is required.')) | |
106 | 112 | |
107 | 113 | class RememberPasswordTestCase(TestCase): |
108 | 114 | |
... | ... | @@ -159,21 +165,21 @@ class UpdateUserTestCase(TestCase): |
159 | 165 | data = {'username': 'test', 'password': 'testing1'} |
160 | 166 | response = self.client.post(reverse('core:home'), data) |
161 | 167 | self.assertRedirects(response, reverse('app:index')) |
162 | - | |
163 | 168 | |
164 | 169 | data={ |
165 | - 'username': 'testeamadeus', | |
166 | - 'email': 'teste@amadeus.com', | |
170 | + 'username': 'test', | |
171 | + 'birth_date': '12/12/2000', | |
172 | + 'email': 'testing@amadeus.com', | |
173 | + 'cpf': '705.089.884-89', | |
167 | 174 | 'name': 'Teste Amadeus', |
168 | 175 | 'city': 'Praia', |
169 | 176 | 'state': 'PE', |
170 | 177 | 'gender': 'F', |
171 | 178 | } |
172 | - # self.assertRedirects(response1, reverse('app:index')) | |
173 | 179 | response = self.client.get(self.url) |
174 | 180 | self.assertEqual(response.status_code, 200) |
175 | 181 | response = self.client.post(self.url, data) |
176 | - self.assertEqual(response.status_code, 302) | |
182 | + self.assertRedirects(response, reverse('users:profile')) | |
177 | 183 | |
178 | 184 | def test_update_error(self): |
179 | 185 | |
... | ... | @@ -189,12 +195,13 @@ class UpdateUserTestCase(TestCase): |
189 | 195 | 'username': '', |
190 | 196 | 'email': 'teste@amadeus.com', |
191 | 197 | 'name': 'Teste Amadeus', |
198 | + 'birth_date': '12/12/2000', | |
192 | 199 | 'city': 'Praia', |
193 | 200 | 'state': 'PE', |
194 | 201 | 'gender': 'F', |
195 | 202 | } |
196 | 203 | response = self.client.post(self.url, data) |
197 | - self.assertFormError(response, 'form', 'username', 'Este campo é obrigatório.') | |
204 | + self.assertFormError(response, 'form', 'username', _('This field is required.')) | |
198 | 205 | |
199 | 206 | |
200 | 207 | class DeleteUserTestCase(TestCase): | ... | ... |
core/urls.py
1 | 1 | from django.conf.urls import url, include |
2 | 2 | from django.contrib.auth import views as auth_views |
3 | - | |
3 | +from django.contrib.auth.views import password_reset, password_reset_done,password_reset_confirm, password_reset_complete | |
4 | 4 | from . import views |
5 | 5 | |
6 | 6 | |
... | ... | @@ -9,5 +9,19 @@ urlpatterns = [ |
9 | 9 | url(r'^register/$', views.RegisterUser.as_view(), name='register'), |
10 | 10 | url(r'^remember_password/$', views.remember_password, name='remember_password'), |
11 | 11 | url(r'^logout/$', auth_views.logout, {'next_page': 'core:home'}, name='logout'), |
12 | - url(r'^notification/([0-9]+)/$', views.processNotification, name='notification_read') | |
12 | + url(r'^notification/([0-9]+)/$', views.processNotification, name='notification_read'), | |
13 | + url(r'^getNotifications/$', views.getNotifications, name='getNotifications'), | |
14 | + | |
15 | +#Reset Password | |
16 | + | |
17 | + url(r'^reset/$', password_reset, {'template_name':'registration/passwor_reset_form.html', | |
18 | + 'email_template_name':'registration/passwor_reset_email.html', | |
19 | + 'subject_template_name' :'registration/password_reset_subject.txt', | |
20 | + 'post_reset_redirect':'done/'}, name="password_reset"), | |
21 | + url(r'^reset/done/$', password_reset_done, {'template_name':'registration/passwor_reset_done.html'}), | |
22 | + url(r'^reset/(?P<uidb64>[0-9A-Za-z]+)/(?P<token>.+)/$', password_reset_confirm, | |
23 | + {'template_name':'registration/passwor_reset_confirm.html', | |
24 | + 'post_reset_redirect' : '/done/'}, | |
25 | + name='password_reset_confirm'), | |
26 | + url(r'^done/$', password_reset_complete,{'template_name':'registration/passwor_reset_complete.html'}), | |
13 | 27 | ] | ... | ... |
core/views.py
... | ... | @@ -5,8 +5,9 @@ from django.contrib.auth.mixins import LoginRequiredMixin |
5 | 5 | from .decorators import log_decorator |
6 | 6 | from django.contrib import messages |
7 | 7 | from django.shortcuts import render, redirect |
8 | +from django.template.loader import render_to_string | |
8 | 9 | from django.views.generic import CreateView, UpdateView |
9 | -from django.http import HttpResponse | |
10 | +from django.http import HttpResponse, JsonResponse | |
10 | 11 | from django.core.mail import send_mail,BadHeaderError |
11 | 12 | from django.conf import settings |
12 | 13 | from core.mixins import NotificationMixin |
... | ... | @@ -95,6 +96,28 @@ def processNotification(self, notificationId): |
95 | 96 | notification.save() |
96 | 97 | return redirect(notification.action_resource.resource.url) |
97 | 98 | |
99 | + | |
100 | + | |
101 | + | |
102 | +def getNotifications(request): | |
103 | + context = {} | |
104 | + if request.user.is_authenticated: | |
105 | + | |
106 | + steps = int(request.GET['steps']) | |
107 | + amount = int(request.GET['amount']) | |
108 | + notifications = Notification.objects.filter(user= request.user, read=False).order_by('-datetime')[steps:steps+amount] | |
109 | + context['notifications'] = notifications | |
110 | + else: #go to login page | |
111 | + return HttpResponse('teste') | |
112 | + | |
113 | + | |
114 | + html = render_to_string("notifications.html", context) | |
115 | + print(html) | |
116 | + return HttpResponse(html) | |
117 | + | |
118 | + | |
119 | + | |
120 | + | |
98 | 121 | # class LoginClass(LoginView): |
99 | 122 | # template_name='index.html' |
100 | 123 | # | ... | ... |
courses/admin.py
1 | 1 | from django.contrib import admin |
2 | 2 | |
3 | -from .models import Category, Course, Subject,Topic | |
3 | +from .models import CourseCategory, Course, Subject,Topic, Activity, Material | |
4 | 4 | |
5 | 5 | class CategoryAdmin(admin.ModelAdmin): |
6 | 6 | list_display = ['name', 'slug'] |
... | ... | @@ -18,7 +18,17 @@ class TopicAdmin(admin.ModelAdmin): |
18 | 18 | list_display = ['name', 'slug'] |
19 | 19 | search_fields = ['name', 'slug'] |
20 | 20 | |
21 | -admin.site.register(Category, CategoryAdmin) | |
21 | +class ActivityAdmin(admin.ModelAdmin): | |
22 | + list_display = ['name', 'slug'] | |
23 | + search_fields = ['name', 'slug'] | |
24 | + | |
25 | +class MaterialAdmin(admin.ModelAdmin): | |
26 | + list_display = ['name', 'slug'] | |
27 | + search_fields = ['name', 'slug'] | |
28 | + | |
29 | +admin.site.register(CourseCategory, CategoryAdmin) | |
22 | 30 | admin.site.register(Course, CourseAdmin) |
23 | 31 | admin.site.register(Subject, SubjectAdmin) |
24 | 32 | admin.site.register(Topic, TopicAdmin) |
33 | +admin.site.register(Activity,ActivityAdmin) | |
34 | +admin.site.register(Material,MaterialAdmin) | ... | ... |
courses/forms.py
1 | - | |
2 | 1 | from django import forms |
3 | 2 | from django.utils.translation import ugettext_lazy as _ |
4 | -from .models import Category, Course, Subject, Topic | |
3 | +from .models import CourseCategory, Course, Subject, Topic, ActivityFile, Activity | |
4 | +from s3direct.widgets import S3DirectWidget | |
5 | 5 | |
6 | 6 | |
7 | -class CategoryForm(forms.ModelForm): | |
7 | +class CategoryCourseForm(forms.ModelForm): | |
8 | 8 | |
9 | 9 | class Meta: |
10 | - model = Category | |
10 | + model = CourseCategory | |
11 | 11 | fields = ('name',) |
12 | 12 | labels = { |
13 | 13 | 'name': _('Name') |
14 | 14 | } |
15 | 15 | help_texts = { |
16 | - 'name': _('Category name') | |
16 | + 'name': _('CourseCategory name') | |
17 | 17 | } |
18 | 18 | |
19 | 19 | |
... | ... | @@ -62,7 +62,7 @@ class CourseForm(forms.ModelForm): |
62 | 62 | 'init_date': _('Course start date'), |
63 | 63 | 'end_date': _('Course end date'), |
64 | 64 | 'image': _('Image'), |
65 | - 'category': _('Category'), | |
65 | + 'category': _('CourseCategory'), | |
66 | 66 | } |
67 | 67 | help_texts = { |
68 | 68 | 'name': _('Course name'), |
... | ... | @@ -74,7 +74,7 @@ class CourseForm(forms.ModelForm): |
74 | 74 | 'init_date': _('Date that the course starts (dd/mm/yyyy)'), |
75 | 75 | 'end_date': _('Date that the course ends (dd/mm/yyyy)'), |
76 | 76 | 'image': _('Representative image of the course'), |
77 | - 'category': _('Category which the course belongs'), | |
77 | + 'category': _('CourseCategory which the course belongs'), | |
78 | 78 | } |
79 | 79 | |
80 | 80 | widgets = { |
... | ... | @@ -102,7 +102,7 @@ class UpdateCourseForm(CourseForm): |
102 | 102 | 'init_date': _('Course start date'), |
103 | 103 | 'end_date': _('Course end date'), |
104 | 104 | 'image': _('Image'), |
105 | - 'category': _('Category'), | |
105 | + 'category': _('CourseCategory'), | |
106 | 106 | 'students': _('Student'), |
107 | 107 | } |
108 | 108 | help_texts = { |
... | ... | @@ -115,7 +115,7 @@ class UpdateCourseForm(CourseForm): |
115 | 115 | 'init_date': _('Date that the course starts (dd/mm/yyyy)'), |
116 | 116 | 'end_date': _('Date that the course ends (dd/mm/yyyy)'), |
117 | 117 | 'image': _('Representative image of the course'), |
118 | - 'category': _('Category which the course belongs'), | |
118 | + 'category': _('CourseCategory which the course belongs'), | |
119 | 119 | 'students': _("Course's Students"), |
120 | 120 | } |
121 | 121 | widgets = { |
... | ... | @@ -153,3 +153,38 @@ class TopicForm(forms.ModelForm): |
153 | 153 | 'name': _("Topic's name"), |
154 | 154 | 'description': _("Topic's description"), |
155 | 155 | } |
156 | + | |
157 | +class ActivityFileForm(forms.ModelForm): | |
158 | + name = forms.CharField( | |
159 | + required=False, | |
160 | + max_length=100, | |
161 | + widget=forms.TextInput(attrs={ | |
162 | + 'placeholder': 'Nome', | |
163 | + 'class': 'form-control' | |
164 | + }, | |
165 | + ) | |
166 | + ) | |
167 | + pdf = forms.URLField(required=True, widget=S3DirectWidget( | |
168 | + dest='activitys', | |
169 | + html=( | |
170 | + '<div class="s3direct" data-policy-url="{policy_url}">' | |
171 | + ' <a class="file-link" target="_blank" href="{file_url}">{file_name}</a>' | |
172 | + ' <a class="file-remove" href="#remove">Remover</a>' | |
173 | + ' <input class="file-url" type="hidden" value="{file_url}" id="{element_id}" name="{name}" />' | |
174 | + ' <input class="file-dest" type="hidden" value="{dest}">' | |
175 | + ' <input class="file-input" type="file" />' | |
176 | + ' <div class="progress">' | |
177 | + ' <div class="progress-bar progress-bar-success progress-bar-striped active bar">' | |
178 | + ' </div>' | |
179 | + ' </div>' | |
180 | + '</div>' | |
181 | + ))) | |
182 | + | |
183 | + class Meta: | |
184 | + model = ActivityFile | |
185 | + fields = ['pdf','name'] | |
186 | + | |
187 | +class ActivityForm(forms.ModelForm): | |
188 | + class Meta: | |
189 | + model = Activity | |
190 | + fields = ['topic', 'limit_date', 'students','all_students'] | ... | ... |
courses/migrations/0001_initial.py
1 | 1 | # -*- coding: utf-8 -*- |
2 | -# Generated by Django 1.10 on 2016-09-22 05:46 | |
2 | +# Generated by Django 1.10 on 2016-10-05 13:37 | |
3 | 3 | from __future__ import unicode_literals |
4 | 4 | |
5 | 5 | import autoslug.fields |
6 | 6 | from django.conf import settings |
7 | 7 | from django.db import migrations, models |
8 | 8 | import django.db.models.deletion |
9 | +import s3direct.fields | |
9 | 10 | |
10 | 11 | |
11 | 12 | class Migration(migrations.Migration): |
... | ... | @@ -22,13 +23,26 @@ class Migration(migrations.Migration): |
22 | 23 | name='Activity', |
23 | 24 | fields=[ |
24 | 25 | ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.Resource')), |
25 | - ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='Creation Date')), | |
26 | 26 | ('limit_date', models.DateTimeField(verbose_name='Deliver Date')), |
27 | - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='student')), | |
27 | + ('all_students', models.BooleanField(default=False, verbose_name='All Students')), | |
28 | + ('students', models.ManyToManyField(related_name='activities', to=settings.AUTH_USER_MODEL, verbose_name='Students')), | |
28 | 29 | ], |
29 | 30 | bases=('core.resource',), |
30 | 31 | ), |
31 | 32 | migrations.CreateModel( |
33 | + name='ActivityFile', | |
34 | + fields=[ | |
35 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
36 | + ('pdf', s3direct.fields.S3DirectField()), | |
37 | + ('name', models.CharField(max_length=100)), | |
38 | + ('diet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='courses.Activity')), | |
39 | + ], | |
40 | + options={ | |
41 | + 'verbose_name': 'Activity File', | |
42 | + 'verbose_name_plural': 'Activitys Files', | |
43 | + }, | |
44 | + ), | |
45 | + migrations.CreateModel( | |
32 | 46 | name='Category', |
33 | 47 | fields=[ |
34 | 48 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
... | ... | @@ -37,8 +51,8 @@ class Migration(migrations.Migration): |
37 | 51 | ('create_date', models.DateField(auto_now_add=True, verbose_name='Creation Date')), |
38 | 52 | ], |
39 | 53 | options={ |
40 | - 'verbose_name_plural': 'Categories', | |
41 | 54 | 'verbose_name': 'Category', |
55 | + 'verbose_name_plural': 'Categories', | |
42 | 56 | }, |
43 | 57 | ), |
44 | 58 | migrations.CreateModel( |
... | ... | @@ -57,21 +71,21 @@ class Migration(migrations.Migration): |
57 | 71 | ('end_date', models.DateField(verbose_name='End of Course Date')), |
58 | 72 | ('image', models.ImageField(blank=True, upload_to='courses/', verbose_name='Image')), |
59 | 73 | ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Category', verbose_name='Category')), |
60 | - ('professors', models.ManyToManyField(related_name='courses', to=settings.AUTH_USER_MODEL, verbose_name='Professors')), | |
74 | + ('professors', models.ManyToManyField(related_name='courses_professors', to=settings.AUTH_USER_MODEL, verbose_name='Professors')), | |
61 | 75 | ('students', models.ManyToManyField(related_name='courses_student', to=settings.AUTH_USER_MODEL, verbose_name='Students')), |
62 | 76 | ], |
63 | 77 | options={ |
64 | - 'verbose_name_plural': 'Courses', | |
65 | - 'ordering': ('create_date', 'name'), | |
66 | 78 | 'verbose_name': 'Course', |
79 | + 'ordering': ('create_date', 'name'), | |
80 | + 'verbose_name_plural': 'Courses', | |
67 | 81 | }, |
68 | 82 | ), |
69 | 83 | migrations.CreateModel( |
70 | 84 | name='Material', |
71 | 85 | fields=[ |
72 | 86 | ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.Resource')), |
73 | - ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='Creation Date')), | |
74 | - ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='student')), | |
87 | + ('all_students', models.BooleanField(default=False, verbose_name='All Students')), | |
88 | + ('students', models.ManyToManyField(related_name='materials', to=settings.AUTH_USER_MODEL, verbose_name='Students')), | |
75 | 89 | ], |
76 | 90 | bases=('core.resource',), |
77 | 91 | ), |
... | ... | @@ -91,9 +105,23 @@ class Migration(migrations.Migration): |
91 | 105 | ('professors', models.ManyToManyField(related_name='subjects', to=settings.AUTH_USER_MODEL, verbose_name='Professors')), |
92 | 106 | ], |
93 | 107 | options={ |
94 | - 'verbose_name_plural': 'Subjects', | |
95 | - 'ordering': ('create_date', 'name'), | |
96 | 108 | 'verbose_name': 'Subject', |
109 | + 'ordering': ('create_date', 'name'), | |
110 | + 'verbose_name_plural': 'Subjects', | |
111 | + }, | |
112 | + ), | |
113 | + migrations.CreateModel( | |
114 | + name='SubjectCategory', | |
115 | + fields=[ | |
116 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
117 | + ('name', models.CharField(max_length=100, verbose_name='Name')), | |
118 | + ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True, verbose_name='Slug')), | |
119 | + ('description', models.TextField(blank=True, verbose_name='Description')), | |
120 | + ('subjects', models.ManyToManyField(to='courses.Subject')), | |
121 | + ], | |
122 | + options={ | |
123 | + 'verbose_name': 'subject category', | |
124 | + 'verbose_name_plural': 'subject categories', | |
97 | 125 | }, |
98 | 126 | ), |
99 | 127 | migrations.CreateModel( |
... | ... | @@ -110,19 +138,19 @@ class Migration(migrations.Migration): |
110 | 138 | ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Subject', verbose_name='Subject')), |
111 | 139 | ], |
112 | 140 | options={ |
113 | - 'verbose_name_plural': 'Topics', | |
114 | - 'ordering': ('create_date', 'name'), | |
115 | 141 | 'verbose_name': 'Topic', |
142 | + 'ordering': ('create_date', 'name'), | |
143 | + 'verbose_name_plural': 'Topics', | |
116 | 144 | }, |
117 | 145 | ), |
118 | 146 | migrations.AddField( |
119 | 147 | model_name='material', |
120 | 148 | name='topic', |
121 | - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Topic', verbose_name='Topic'), | |
149 | + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='materials', to='courses.Topic', verbose_name='Topic'), | |
122 | 150 | ), |
123 | 151 | migrations.AddField( |
124 | 152 | model_name='activity', |
125 | 153 | name='topic', |
126 | - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Topic', verbose_name='Topic'), | |
154 | + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activities', to='courses.Topic', verbose_name='Topic'), | |
127 | 155 | ), |
128 | 156 | ] | ... | ... |
courses/migrations/0002_auto_20160926_0026.py
... | ... | @@ -1,38 +0,0 @@ |
1 | -# -*- coding: utf-8 -*- | |
2 | -# Generated by Django 1.10 on 2016-09-26 03:26 | |
3 | -from __future__ import unicode_literals | |
4 | - | |
5 | -import autoslug.fields | |
6 | -from django.db import migrations, models | |
7 | - | |
8 | - | |
9 | -class Migration(migrations.Migration): | |
10 | - | |
11 | - dependencies = [ | |
12 | - ('courses', '0001_initial'), | |
13 | - ] | |
14 | - | |
15 | - operations = [ | |
16 | - migrations.CreateModel( | |
17 | - name='SubjectCategory', | |
18 | - fields=[ | |
19 | - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
20 | - ('name', models.CharField(max_length=100, verbose_name='Name')), | |
21 | - ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True, verbose_name='Slug')), | |
22 | - ('description', models.TextField(blank=True, verbose_name='Description')), | |
23 | - ('subjects', models.ManyToManyField(to='courses.Subject')), | |
24 | - ], | |
25 | - options={ | |
26 | - 'verbose_name_plural': 'subject categories', | |
27 | - 'verbose_name': 'subject category', | |
28 | - }, | |
29 | - ), | |
30 | - migrations.RemoveField( | |
31 | - model_name='activity', | |
32 | - name='create_date', | |
33 | - ), | |
34 | - migrations.RemoveField( | |
35 | - model_name='material', | |
36 | - name='create_date', | |
37 | - ), | |
38 | - ] |
... | ... | @@ -0,0 +1,22 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-10-05 21:02 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.conf import settings | |
6 | +from django.db import migrations, models | |
7 | + | |
8 | + | |
9 | +class Migration(migrations.Migration): | |
10 | + | |
11 | + dependencies = [ | |
12 | + migrations.swappable_dependency(settings.AUTH_USER_MODEL), | |
13 | + ('courses', '0001_initial'), | |
14 | + ] | |
15 | + | |
16 | + operations = [ | |
17 | + migrations.AddField( | |
18 | + model_name='subject', | |
19 | + name='students', | |
20 | + field=models.ManyToManyField(related_name='subject_student', to=settings.AUTH_USER_MODEL, verbose_name='Students'), | |
21 | + ), | |
22 | + ] | ... | ... |
courses/migrations/0003_auto_20160927_1945.py
... | ... | @@ -1,52 +0,0 @@ |
1 | -# -*- coding: utf-8 -*- | |
2 | -# Generated by Django 1.10 on 2016-09-27 22:45 | |
3 | -from __future__ import unicode_literals | |
4 | - | |
5 | -from django.conf import settings | |
6 | -from django.db import migrations, models | |
7 | -import django.db.models.deletion | |
8 | - | |
9 | - | |
10 | -class Migration(migrations.Migration): | |
11 | - | |
12 | - dependencies = [ | |
13 | - ('courses', '0002_auto_20160926_0026'), | |
14 | - ] | |
15 | - | |
16 | - operations = [ | |
17 | - migrations.CreateModel( | |
18 | - name='Answer', | |
19 | - fields=[ | |
20 | - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
21 | - ('answer', models.CharField(max_length=200, verbose_name='Answer')), | |
22 | - ('order', models.PositiveSmallIntegerField(verbose_name='Order')), | |
23 | - ], | |
24 | - options={ | |
25 | - 'verbose_name_plural': 'Answers', | |
26 | - 'verbose_name': 'Answer', | |
27 | - 'ordering': ('order',), | |
28 | - }, | |
29 | - ), | |
30 | - migrations.CreateModel( | |
31 | - name='Poll', | |
32 | - fields=[ | |
33 | - ('activity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='courses.Activity')), | |
34 | - ('question', models.CharField(max_length=300, verbose_name='Question')), | |
35 | - ], | |
36 | - options={ | |
37 | - 'verbose_name_plural': 'Polls', | |
38 | - 'verbose_name': 'Poll', | |
39 | - }, | |
40 | - bases=('courses.activity',), | |
41 | - ), | |
42 | - migrations.AlterField( | |
43 | - model_name='course', | |
44 | - name='professors', | |
45 | - field=models.ManyToManyField(related_name='courses_professors', to=settings.AUTH_USER_MODEL, verbose_name='Professors'), | |
46 | - ), | |
47 | - migrations.AddField( | |
48 | - model_name='answer', | |
49 | - name='poll', | |
50 | - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='courses.Poll', verbose_name='Answers'), | |
51 | - ), | |
52 | - ] |
... | ... | @@ -0,0 +1,30 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-10-07 19:12 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.conf import settings | |
6 | +from django.db import migrations, models | |
7 | + | |
8 | + | |
9 | +class Migration(migrations.Migration): | |
10 | + | |
11 | + dependencies = [ | |
12 | + ('courses', '0002_subject_students'), | |
13 | + ] | |
14 | + | |
15 | + operations = [ | |
16 | + migrations.RenameModel( | |
17 | + old_name='Category', | |
18 | + new_name='CourseCategory', | |
19 | + ), | |
20 | + migrations.AlterField( | |
21 | + model_name='activity', | |
22 | + name='limit_date', | |
23 | + field=models.DateField(verbose_name='Deliver Date'), | |
24 | + ), | |
25 | + migrations.AlterField( | |
26 | + model_name='subject', | |
27 | + name='professors', | |
28 | + field=models.ManyToManyField(related_name='professors_subjects', to=settings.AUTH_USER_MODEL, verbose_name='Professors'), | |
29 | + ), | |
30 | + ] | ... | ... |
... | ... | @@ -0,0 +1,21 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-10-11 22:51 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.db import migrations, models | |
6 | +import django.db.models.deletion | |
7 | + | |
8 | + | |
9 | +class Migration(migrations.Migration): | |
10 | + | |
11 | + dependencies = [ | |
12 | + ('courses', '0003_auto_20161007_1612'), | |
13 | + ] | |
14 | + | |
15 | + operations = [ | |
16 | + migrations.AlterField( | |
17 | + model_name='course', | |
18 | + name='category', | |
19 | + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_category', to='courses.CourseCategory', verbose_name='Category'), | |
20 | + ), | |
21 | + ] | ... | ... |
... | ... | @@ -0,0 +1,31 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-10-13 17:29 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.db import migrations, models | |
6 | +import django.db.models.deletion | |
7 | + | |
8 | + | |
9 | +class Migration(migrations.Migration): | |
10 | + | |
11 | + dependencies = [ | |
12 | + ('core', '0002_mymetype'), | |
13 | + ('courses', '0004_auto_20161011_1951'), | |
14 | + ] | |
15 | + | |
16 | + operations = [ | |
17 | + migrations.CreateModel( | |
18 | + name='File', | |
19 | + fields=[ | |
20 | + ('material_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='courses.Material')), | |
21 | + ('description', models.TextField(blank=True, verbose_name='Description')), | |
22 | + ('content', models.FileField(upload_to='uploads/courses/subject/topic/%Y/%m/%d/')), | |
23 | + ('typ', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='file', to='core.MymeType', verbose_name='Type')), | |
24 | + ], | |
25 | + options={ | |
26 | + 'verbose_name': 'Topic file', | |
27 | + 'verbose_name_plural': 'Topic files', | |
28 | + }, | |
29 | + bases=('courses.material',), | |
30 | + ), | |
31 | + ] | ... | ... |
courses/models.py
... | ... | @@ -2,9 +2,10 @@ from django.utils.translation import ugettext_lazy as _ |
2 | 2 | from django.db import models |
3 | 3 | from autoslug.fields import AutoSlugField |
4 | 4 | from users.models import User |
5 | -from core.models import Resource | |
5 | +from core.models import Resource, MymeType | |
6 | +from s3direct.fields import S3DirectField | |
6 | 7 | |
7 | -class Category(models.Model): | |
8 | +class CourseCategory(models.Model): | |
8 | 9 | |
9 | 10 | name = models.CharField(_('Name'), max_length = 100, unique = True) |
10 | 11 | slug = AutoSlugField(_("Slug"),populate_from='name',unique=True) |
... | ... | @@ -30,7 +31,7 @@ class Course(models.Model): |
30 | 31 | init_date = models.DateField(_('Begin of Course Date')) |
31 | 32 | end_date = models.DateField(_('End of Course Date')) |
32 | 33 | image = models.ImageField(verbose_name = _('Image'), blank = True, upload_to = 'courses/') |
33 | - category = models.ForeignKey(Category, verbose_name = _('Category')) | |
34 | + category = models.ForeignKey(CourseCategory, verbose_name = _('Category'), related_name='course_category') | |
34 | 35 | professors = models.ManyToManyField(User,verbose_name=_('Professors'), related_name='courses_professors') |
35 | 36 | students = models.ManyToManyField(User,verbose_name=_('Students'), related_name='courses_student') |
36 | 37 | |
... | ... | @@ -53,7 +54,8 @@ class Subject(models.Model): |
53 | 54 | create_date = models.DateTimeField(_('Creation Date'), auto_now_add = True) |
54 | 55 | update_date = models.DateTimeField(_('Date of last update'), auto_now=True) |
55 | 56 | course = models.ForeignKey(Course, verbose_name = _('Course'), related_name="subjects") |
56 | - professors = models.ManyToManyField(User,verbose_name=_('Professors'), related_name='subjects') | |
57 | + professors = models.ManyToManyField(User,verbose_name=_('Professors'), related_name='professors_subjects') | |
58 | + students = models.ManyToManyField(User,verbose_name=_('Students'), related_name='subject_student') | |
57 | 59 | |
58 | 60 | |
59 | 61 | class Meta: |
... | ... | @@ -88,52 +90,40 @@ It is one kind of possible resources available inside a Topic. |
88 | 90 | Activity is something that has a deadline and has to be delivered by the student |
89 | 91 | """ |
90 | 92 | class Activity(Resource): |
91 | - topic = models.ForeignKey(Topic, verbose_name = _('Topic')) | |
92 | - limit_date = models.DateTimeField(_('Deliver Date')) | |
93 | - student = models.ForeignKey(User, verbose_name = _('student')) | |
93 | + topic = models.ForeignKey(Topic, verbose_name = _('Topic'), related_name='activities') | |
94 | + limit_date = models.DateField(_('Deliver Date')) | |
95 | + students = models.ManyToManyField(User, verbose_name = _('Students'), related_name='activities') | |
96 | + all_students = models.BooleanField(_('All Students'), default=False) | |
94 | 97 | |
98 | +class ActivityFile(models.Model): | |
99 | + pdf = S3DirectField(dest='activitys') | |
100 | + diet = models.ForeignKey('Activity', related_name='files') | |
101 | + name = models.CharField(max_length=100) | |
102 | + | |
103 | + def __str__(self): | |
104 | + return self.name | |
105 | + | |
106 | + class Meta: | |
107 | + verbose_name = u"Activity File" | |
108 | + verbose_name_plural = u"Activitys Files" | |
95 | 109 | |
96 | 110 | """ |
97 | 111 | It represents any Material inside a topic, be it a file, a link, etc. |
98 | 112 | """ |
99 | 113 | class Material(Resource): |
100 | - topic = models.ForeignKey(Topic, verbose_name = _('Topic')) | |
101 | - student = models.ForeignKey(User, verbose_name = _('student')) | |
114 | + topic = models.ForeignKey(Topic, verbose_name = _('Topic'), related_name='materials') | |
115 | + students = models.ManyToManyField(User, verbose_name = _('Students'), related_name='materials') | |
116 | + all_students = models.BooleanField(_('All Students'), default=False) | |
102 | 117 | |
103 | 118 | """ |
104 | 119 | It is a category for each subject. |
105 | 120 | """ |
106 | 121 | class SubjectCategory(models.Model): |
107 | 122 | name = models.CharField(_('Name'), max_length= 100) |
108 | - slug = AutoSlugField(_("Slug"),populate_from='name',unique=True) | |
123 | + slug = AutoSlugField(_("Slug"),populate_from='name',unique=True) | |
109 | 124 | description = models.TextField(_('Description'), blank = True) |
110 | 125 | subjects = models.ManyToManyField(Subject) |
111 | 126 | |
112 | 127 | class Meta: |
113 | 128 | verbose_name = _('subject category') |
114 | 129 | verbose_name_plural = _('subject categories') |
115 | - | |
116 | -class Poll(Activity): | |
117 | - question = models.CharField(_('Question'), max_length = 300) | |
118 | - | |
119 | - class Meta: | |
120 | - #ordering = ('create_date','name') | |
121 | - verbose_name = _('Poll') | |
122 | - verbose_name_plural = _('Polls') | |
123 | - | |
124 | - def __str__(self): | |
125 | - return str(self.question) + str("/") + str(self.topic) | |
126 | - | |
127 | -class Answer(models.Model): | |
128 | - answer = models.CharField(_("Answer"), max_length = 200) | |
129 | - order = models.PositiveSmallIntegerField(_("Order")) | |
130 | - poll = models.ForeignKey(Poll, verbose_name = _('Answers'), related_name='answers') | |
131 | - | |
132 | - class Meta: | |
133 | - ordering = ('order',) | |
134 | - verbose_name = _('Answer') | |
135 | - verbose_name_plural = _('Answers') | |
136 | - | |
137 | - def __str__(self): | |
138 | - return str(self.question) + str("/") + str(self.topic) | |
139 | - | ... | ... |
... | ... | @@ -0,0 +1,8 @@ |
1 | +$(".edit_card").on('click', function() { | |
2 | + $(".presentation").css('display','none'); | |
3 | + $(".editation").css('display','block'); | |
4 | +}) | |
5 | +$(".edit_card_end").on('click', function() { | |
6 | + $(".editation").css('display','none'); | |
7 | + $(".presentation").css('display','block'); | |
8 | +}) | |
0 | 9 | \ No newline at end of file | ... | ... |
courses/templates/category/create.html
1 | 1 | {% extends 'app/base.html' %} |
2 | 2 | |
3 | -{% load static i18n %} | |
3 | +{% load static i18n permission_tags %} | |
4 | 4 | {% load widget_tweaks %} |
5 | 5 | |
6 | 6 | {% block breadcrumbs %} |
... | ... | @@ -11,43 +11,72 @@ |
11 | 11 | {% endblock %} |
12 | 12 | |
13 | 13 | {% block sidebar %} |
14 | - <div class="list-group"> | |
15 | - <a href="{% url 'course:manage_cat' %}" class="list-group-item"> | |
16 | - {% trans 'Categories' %} | |
17 | - </a> | |
14 | + <div class="panel panel-primary navigation"> | |
15 | + <div class="panel-heading"> | |
16 | + <h5>{% trans 'Menu' %}</h5> | |
17 | + </div> | |
18 | + <div class="panel-body"> | |
19 | + <ul class="nav nav-pills nav-stacked"> | |
20 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
21 | + <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
22 | + </ul> | |
23 | + </div> | |
24 | + </div> | |
25 | + | |
26 | +{% if user|has_role:'professor, system_admin' %} | |
27 | + | |
28 | + <div class="panel panel-primary navigation"> | |
29 | + <div class="panel-heading"> | |
30 | + <h3 class="panel-title">Actions</h3> | |
31 | + </div> | |
32 | + <div class="panel-body"> | |
33 | + <ul class="nav nav-pills nav-stacked"> | |
34 | + <li><a href="javascript:void(0)">Replicate Course</a></li> | |
35 | + <li><a href="{% url 'course:create' %}">Create Course</a></li> | |
36 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
37 | + </ul> | |
38 | + </div> | |
18 | 39 | </div> |
19 | -{% endblock %} | |
20 | 40 | |
21 | -{% block content %} | |
22 | - <div class="alert alert-info alert-dismissible" role="alert"> | |
23 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
24 | - <span aria-hidden="true">×</span> | |
25 | - </button> | |
26 | - <p>{% trans 'All fields are required' %}</p> | |
41 | + <div class="panel panel-primary navigation"> | |
42 | + <div class="panel-heading"> | |
43 | + <h3 class="panel-title">Category</h3> | |
44 | + </div> | |
45 | + <div class="panel-body"> | |
46 | + <ul class="nav nav-pills nav-stacked"> | |
47 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
48 | + <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
49 | + </ul> | |
50 | + </div> | |
27 | 51 | </div> |
52 | +{% endif %} | |
28 | 53 | |
29 | - <form method="post" action=""> | |
30 | - {% csrf_token %} | |
31 | - {% for field in form %} | |
32 | - <div class="form-group {% if form.has_error %}has-error{% endif %}"> | |
33 | - <label for="{{ field.auto_id }}">{{ field.label }}</label> | |
34 | - {% render_field field class='form-control input-sm' %} | |
35 | - </div> | |
36 | - <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
37 | - {% if field.errors.length > 0 %} | |
38 | - <div class="alert alert-danger alert-dismissible" role="alert"> | |
39 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
40 | - <span aria-hidden="true">×</span> | |
41 | - </button> | |
42 | - <ul> | |
43 | - {% for error in field.errors %} | |
44 | - <li>{{ error }}</li> | |
45 | - {% endfor %} | |
46 | - </ul> | |
47 | - </div> | |
54 | +{% endblock %} | |
55 | + | |
56 | +{% block content %} | |
57 | + <div class="card card-content"> | |
58 | + <div class="card-body"> | |
59 | + <form method="post" action="">{% csrf_token %} | |
60 | + {% for field in form %} | |
61 | + <div class="form-group {% if form.has_error %}has-error{% endif %}"> | |
62 | + <label for="{{ field.auto_id }}">{{ field.label }}</label> | |
63 | + {% render_field field class='form-control input-sm' %} | |
64 | + </div> | |
65 | + {% if field.errors.length > 0 %} | |
66 | + <div class="alert alert-danger alert-dismissible" role="alert"> | |
67 | + <ul> | |
68 | + {% for error in field.errors %} | |
69 | + <li>{{ error }}</li> | |
70 | + {% endfor %} | |
71 | + </ul> | |
72 | + </div> | |
73 | + </div> | |
74 | + {% endif %} | |
75 | + {% endfor %} | |
76 | + <div class="row text-center"> | |
77 | + <input type="submit" value="{% trans 'Save' %}" class="btn btn-sm btn-success" /> | |
78 | + </div> | |
79 | + </form> | |
48 | 80 | </div> |
49 | - {% endif %} | |
50 | - {% endfor %} | |
51 | - <input type="submit" value="{% trans 'Save' %}" class="btn btn-sm btn-success" /> | |
52 | - </form> | |
81 | + </div> | |
53 | 82 | {% endblock %} | ... | ... |
courses/templates/category/delete.html
1 | 1 | {% extends 'app/base.html' %} |
2 | 2 | |
3 | 3 | {% load static i18n %} |
4 | +{% load static i18n permission_tags %} | |
4 | 5 | |
5 | 6 | {% block breadcrumbs %} |
6 | 7 | <ol class="breadcrumb"> |
... | ... | @@ -10,21 +11,54 @@ |
10 | 11 | {% endblock %} |
11 | 12 | |
12 | 13 | {% block sidebar %} |
13 | - <div class="list-group"> | |
14 | - <a href="{% url 'course:manage_cat' %}" class="list-group-item active"> | |
15 | - {% trans 'Categories' %} | |
16 | - </a> | |
17 | - <a href="{% url 'course:create_cat' %}" class="list-group-item"> | |
18 | - {% trans 'Create Category' %} | |
19 | - </a> | |
14 | + <div class="panel panel-primary navigation"> | |
15 | + <div class="panel-heading"> | |
16 | + <h5>{% trans 'Menu' %}</h5> | |
17 | + </div> | |
18 | + <div class="panel-body"> | |
19 | + <ul class="nav nav-pills nav-stacked"> | |
20 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
21 | + <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
22 | + </ul> | |
23 | + </div> | |
24 | + </div> | |
25 | + | |
26 | +{% if user|has_role:'professor, system_admin' %} | |
27 | + | |
28 | + <div class="panel panel-primary navigation"> | |
29 | + <div class="panel-heading"> | |
30 | + <h3 class="panel-title">Actions</h3> | |
31 | + </div> | |
32 | + <div class="panel-body"> | |
33 | + <ul class="nav nav-pills nav-stacked"> | |
34 | + <li><a href="javascript:void(0)">Replicate Course</a></li> | |
35 | + <li><a href="{% url 'course:create' %}">Create Course</a></li> | |
36 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
37 | + </ul> | |
38 | + </div> | |
20 | 39 | </div> |
40 | + <div class="panel panel-primary navigation"> | |
41 | + <div class="panel-heading"> | |
42 | + <h3 class="panel-title">Category</h3> | |
43 | + </div> | |
44 | + <div class="panel-body"> | |
45 | + <ul class="nav nav-pills nav-stacked"> | |
46 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
47 | + <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
48 | + </ul> | |
49 | + </div> | |
50 | + </div> | |
51 | +{% endif %} | |
21 | 52 | {% endblock %} |
22 | 53 | |
23 | 54 | {% block content %} |
24 | - <form action="" method="post"> | |
25 | - {% csrf_token %} | |
26 | - <p>{% trans 'Are you sure you want to delete the category' %} "{{ object }}"?</p> | |
27 | - <input type="submit" class="btn btn-success btn-sm" value="{% trans 'Yes' %}" /> | |
28 | - <a href="{% url 'course:manage' %}" class="btn btn-danger btn-sm">{% trans 'No' %}</a> | |
29 | - </form> | |
55 | + <div class="card card-content"> | |
56 | + <div class="card-body"> | |
57 | + <form action="" method="post">{% csrf_token %} | |
58 | + <h1>{% trans 'Are you sure you want to delete the category' %} "{{ object }}"?</h1> | |
59 | + <input type="submit" class="btn btn-success btn-sm" value="{% trans 'Yes' %}" /> | |
60 | + <a href="{% url 'course:manage_cat' %}" class="btn btn-danger btn-sm">{% trans 'No' %}</a> | |
61 | + </form> | |
62 | + </div> | |
63 | + </div> | |
30 | 64 | {% endblock %} | ... | ... |
courses/templates/category/index.html
1 | 1 | {% extends 'app/base.html' %} |
2 | 2 | |
3 | 3 | {% load static i18n %} |
4 | +{% load static i18n permission_tags %} | |
5 | +{% load widget_tweaks %} | |
4 | 6 | |
5 | 7 | {% block breadcrumbs %} |
6 | 8 | <ol class="breadcrumb"> |
... | ... | @@ -10,14 +12,45 @@ |
10 | 12 | {% endblock %} |
11 | 13 | |
12 | 14 | {% block sidebar %} |
13 | - <div class="list-group"> | |
14 | - <a href="{% url 'course:manage_cat' %}" class="list-group-item active"> | |
15 | - {% trans 'Categories' %} | |
16 | - </a> | |
17 | - <a href="{% url 'course:create_cat' %}" class="list-group-item"> | |
18 | - {% trans 'Create Category' %} | |
19 | - </a> | |
15 | + <div class="panel panel-primary navigation"> | |
16 | + <div class="panel-heading"> | |
17 | + <h5>{% trans 'Menu' %}</h5> | |
18 | + </div> | |
19 | + <div class="panel-body"> | |
20 | + <ul class="nav nav-pills nav-stacked"> | |
21 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
22 | + <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
23 | + </ul> | |
24 | + </div> | |
25 | + </div> | |
26 | + | |
27 | + {% if user|has_role:'professor, system_admin' %} | |
28 | + | |
29 | + <div class="panel panel-primary navigation"> | |
30 | + <div class="panel-heading"> | |
31 | + <h3 class="panel-title">Actions</h3> | |
32 | + </div> | |
33 | + <div class="panel-body"> | |
34 | + <ul class="nav nav-pills nav-stacked"> | |
35 | + <li><a href="javascript:void(0)">Replicate Course</a></li> | |
36 | + <li><a href="{% url 'course:create' %}">Create Course</a></li> | |
37 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
38 | + </ul> | |
39 | + </div> | |
40 | + </div> | |
41 | + | |
42 | + <div class="panel panel-primary navigation"> | |
43 | + <div class="panel-heading"> | |
44 | + <h3 class="panel-title">Category</h3> | |
45 | + </div> | |
46 | + <div class="panel-body"> | |
47 | + <ul class="nav nav-pills nav-stacked"> | |
48 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
49 | + <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
50 | + </ul> | |
51 | + </div> | |
20 | 52 | </div> |
53 | +{% endif %} | |
21 | 54 | {% endblock %} |
22 | 55 | |
23 | 56 | {% block content %} | ... | ... |
courses/templates/category/update.html
1 | 1 | {% extends 'app/base.html' %} |
2 | 2 | |
3 | 3 | {% load static i18n %} |
4 | +{% load static i18n permission_tags %} | |
4 | 5 | {% load widget_tweaks %} |
5 | 6 | |
6 | 7 | {% block breadcrumbs %} |
... | ... | @@ -11,43 +12,84 @@ |
11 | 12 | {% endblock %} |
12 | 13 | |
13 | 14 | {% block sidebar %} |
14 | - <div class="list-group"> | |
15 | - <a href="{% url 'course:manage_cat' %}" class="list-group-item"> | |
16 | - {% trans 'Categories' %} | |
17 | - </a> | |
15 | + <div class="panel panel-primary navigation"> | |
16 | + <div class="panel-heading"> | |
17 | + <h5>{% trans 'Menu' %}</h5> | |
18 | + </div> | |
19 | + <div class="panel-body"> | |
20 | + <ul class="nav nav-pills nav-stacked"> | |
21 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
22 | + <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
23 | + </ul> | |
24 | + </div> | |
25 | + </div> | |
26 | + | |
27 | +{% if user|has_role:'professor, system_admin' %} | |
28 | + | |
29 | + <div class="panel panel-primary navigation"> | |
30 | + <div class="panel-heading"> | |
31 | + <h3 class="panel-title">Actions</h3> | |
32 | + </div> | |
33 | + <div class="panel-body"> | |
34 | + <ul class="nav nav-pills nav-stacked"> | |
35 | + <li><a href="javascript:void(0)">Replicate Course</a></li> | |
36 | + <li><a href="{% url 'course:create' %}">Create Course</a></li> | |
37 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
38 | + </ul> | |
39 | + </div> | |
40 | + </div> | |
41 | + <div class="panel panel-primary navigation"> | |
42 | + <div class="panel-heading"> | |
43 | + <h3 class="panel-title">Category</h3> | |
44 | + </div> | |
45 | + <div class="panel-body"> | |
46 | + <ul class="nav nav-pills nav-stacked"> | |
47 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
48 | + <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
49 | + </ul> | |
50 | + </div> | |
18 | 51 | </div> |
52 | +{% endif %} | |
19 | 53 | {% endblock %} |
20 | 54 | |
21 | 55 | {% block content %} |
22 | - <div class="alert alert-info alert-dismissible" role="alert"> | |
23 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
24 | - <span aria-hidden="true">×</span> | |
25 | - </button> | |
26 | - <p>{% trans 'All fields are required' %}</p> | |
27 | - </div> | |
28 | - | |
29 | - <form method="post" action=""> | |
30 | - {% csrf_token %} | |
31 | - {% for field in form %} | |
32 | - <div class="form-group {% if form.has_error %}has-error{% endif %}"> | |
33 | - <label for="{{ field.auto_id }}">{{ field.label }}</label> | |
34 | - {% render_field field class='form-control input-sm' %} | |
56 | + {% if messages %} | |
57 | + {% for message in messages %} | |
58 | + <div class="alert alert-success alert-dismissible" role="alert"> | |
59 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
60 | + <span aria-hidden="true">×</span> | |
61 | + </button> | |
62 | + <p>{{ message }}</p> | |
35 | 63 | </div> |
36 | - <span id="helpBlock" class="help-block">{{ field.help_text }}</span> | |
37 | - {% if field.errors.length > 0 %} | |
38 | - <div class="alert alert-danger alert-dismissible" role="alert"> | |
39 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
40 | - <span aria-hidden="true">×</span> | |
41 | - </button> | |
42 | - <ul> | |
43 | - {% for error in field.errors %} | |
44 | - <li>{{ error }}</li> | |
45 | - {% endfor %} | |
46 | - </ul> | |
47 | - </div> | |
48 | - </div> | |
49 | - {% endif %} | |
50 | 64 | {% endfor %} |
51 | - <input type="submit" value="{% trans 'Save' %}" class="btn btn-sm btn-success" /> | |
52 | - </form> | |
65 | + {% endif %} | |
66 | + <div class="card card-content"> | |
67 | + <div class="card-body"> | |
68 | + <form method="post" action=""> | |
69 | + {% csrf_token %} | |
70 | + {% for field in form %} | |
71 | + <div class="form-group {% if form.has_error %}has-error{% endif %}"> | |
72 | + <label for="{{ field.auto_id }}">{{ field.label }}</label> | |
73 | + {% render_field field class='form-control input-sm' %} | |
74 | + </div> | |
75 | + {% if field.errors.length > 0 %} | |
76 | + <div class="alert alert-danger alert-dismissible" role="alert"> | |
77 | + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
78 | + <span aria-hidden="true">×</span> | |
79 | + </button> | |
80 | + <ul> | |
81 | + {% for error in field.errors %} | |
82 | + <li>{{ error }}</li> | |
83 | + {% endfor %} | |
84 | + </ul> | |
85 | + </div> | |
86 | + </div> | |
87 | + {% endif %} | |
88 | + {% endfor %} | |
89 | + <div class="row text-center"> | |
90 | + <input type="submit" value="{% trans 'Save' %}" class="btn btn-sm btn-success" /> | |
91 | + </div> | |
92 | + </form> | |
93 | + </div> | |
94 | + </div> | |
53 | 95 | {% endblock %} | ... | ... |
courses/templates/category/view.html
1 | 1 | {% extends 'app/base.html' %} |
2 | 2 | |
3 | +{% load static i18n permission_tags %} | |
4 | +{% load widget_tweaks %} | |
3 | 5 | {% load static i18n %} |
4 | 6 | |
7 | + | |
5 | 8 | {% block breadcrumbs %} |
6 | 9 | <ol class="breadcrumb"> |
7 | 10 | <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> |
... | ... | @@ -10,27 +13,57 @@ |
10 | 13 | {% endblock %} |
11 | 14 | |
12 | 15 | {% block sidebar %} |
13 | - <div class="list-group"> | |
14 | - <a href="{% url 'course:manage_cat' %}" class="list-group-item"> | |
15 | - {% trans 'Categories' %} | |
16 | - </a> | |
17 | - <a href="{% url 'course:create_cat' %}" class="list-group-item"> | |
18 | - {% trans 'Create Category' %} | |
19 | - </a> | |
20 | - <a href="" class="list-group-item"> | |
21 | - {% trans 'Edit Category' %} | |
22 | - </a> | |
23 | - <a href="" class="list-group-item"> | |
24 | - {% trans 'Remove Category' %} | |
25 | - </a> | |
26 | - </div> | |
16 | + <div class="panel panel-primary navigation"> | |
17 | + <div class="panel-heading"> | |
18 | + <h5>{% trans 'Menu' %}</h5> | |
19 | + </div> | |
20 | + <div class="panel-body"> | |
21 | + <ul class="nav nav-pills nav-stacked"> | |
22 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
23 | + <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
24 | + </ul> | |
25 | + </div> | |
26 | + </div> | |
27 | + {% if user|has_role:'professor, system_admin' %} | |
28 | + | |
29 | + <div class="panel panel-primary navigation"> | |
30 | + <div class="panel-heading"> | |
31 | + <h3 class="panel-title">Actions</h3> | |
32 | + </div> | |
33 | + <div class="panel-body"> | |
34 | + <ul class="nav nav-pills nav-stacked"> | |
35 | + <li><a href="javascript:void(0)">Replicate Course</a></li> | |
36 | + <li><a href="{% url 'course:create' %}">Create Course</a></li> | |
37 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
38 | + </ul> | |
39 | + </div> | |
40 | + </div> | |
41 | + | |
42 | + <div class="panel panel-primary navigation"> | |
43 | + <div class="panel-heading"> | |
44 | + <h3 class="panel-title">Category</h3> | |
45 | + </div> | |
46 | + <div class="panel-body"> | |
47 | + <ul class="nav nav-pills nav-stacked"> | |
48 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
49 | + <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
50 | + <li><a href="{% url 'course:delete_cat' category.slug %}">Remove Category</a></li> | |
51 | + <li><a href="{% url 'course:update_cat' category.slug %}">Update Category</a></li> | |
52 | + </ul> | |
53 | + </div> | |
54 | + </div> | |
55 | + {% endif %} | |
27 | 56 | {% endblock %} |
28 | 57 | |
29 | 58 | {% block content %} |
30 | - <div class="row"> | |
31 | - <div class="col-sm-12"> | |
32 | - <p><b>{% trans 'Name:' %} </b> {{ category }}</p> | |
33 | - <p><b>{% trans 'Slug:' %} </b> {{ category.slug }}</p> | |
59 | + <div class="card card-content"> | |
60 | + <div class="card-body"> | |
61 | + <div class="row"> | |
62 | + <div class="col-sm-12"> | |
63 | + <p><b>{% trans 'Name:' %} </b> {{ category }}</p> | |
64 | + <p><b>{% trans 'Slug:' %} </b> {{ category.slug }}</p> | |
65 | + </div> | |
66 | + </div> | |
34 | 67 | </div> |
35 | 68 | </div> |
36 | 69 | {% endblock %} | ... | ... |
courses/templates/course/index.html
... | ... | @@ -17,11 +17,41 @@ |
17 | 17 | </div> |
18 | 18 | <div class="panel-body"> |
19 | 19 | <ul class="nav nav-pills nav-stacked"> |
20 | + <li><a href="{% url 'core:home' %}">{% trans 'Home' %}</a></li> | |
20 | 21 | <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> |
21 | 22 | <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> |
22 | 23 | </ul> |
23 | 24 | </div> |
24 | 25 | </div> |
26 | + | |
27 | +{% if user|has_role:'professor, system_admin' %} | |
28 | + | |
29 | + <div class="panel panel-primary navigation"> | |
30 | + <div class="panel-heading"> | |
31 | + <h3 class="panel-title">Actions</h3> | |
32 | + </div> | |
33 | + <div class="panel-body"> | |
34 | + <ul class="nav nav-pills nav-stacked"> | |
35 | + <li><a href="javascript:void(0)">Replicate Course</a></li> | |
36 | + <li><a href="{% url 'course:create' %}">Create Course</a></li> | |
37 | + </ul> | |
38 | + </div> | |
39 | + </div> | |
40 | + | |
41 | + <div class="panel panel-primary navigation"> | |
42 | + <div class="panel-heading"> | |
43 | + <h3 class="panel-title">Category</h3> | |
44 | + </div> | |
45 | + <div class="panel-body"> | |
46 | + <ul class="nav nav-pills nav-stacked"> | |
47 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | |
48 | + <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | |
49 | + </ul> | |
50 | + </div> | |
51 | + </div> | |
52 | + | |
53 | +{% endif %} | |
54 | + | |
25 | 55 | {% endblock %} |
26 | 56 | |
27 | 57 | {% block content %} |
... | ... | @@ -35,69 +65,169 @@ |
35 | 65 | </div> |
36 | 66 | {% endfor %} |
37 | 67 | {% endif %} |
38 | - <div class="col-md-12"> | |
68 | + | |
69 | +<div class="col-md-12"> | |
70 | + <form id="searchform" action="{% url 'course:manage' %}" method="get" accept-charset="utf-8"> | |
39 | 71 | <div class="input-group"> |
40 | - <div class="form-group is-empty"><input type="search" class="form-control" placeholder="Search Courses"></div> | |
41 | - <span class="input-group-btn input-group-sm"> | |
42 | - <button type="button" class="btn btn-fab btn-fab-mini"> | |
43 | - <i class="material-icons">search</i> | |
44 | - </button> | |
45 | - </span> | |
72 | + <div class="form-group is-empty"> | |
73 | + <input type="search" class="form-control" placeholder="Search Courses" name="q" id="searchbox"></div> | |
74 | + <span class="input-group-btn input-group-sm"> | |
75 | + <button type="button" class="btn btn-fab btn-fab-mini"> | |
76 | + <i class="material-icons">search</i> | |
77 | + </button> | |
78 | + </span> | |
79 | + </div> | |
80 | + </form> | |
46 | 81 | </div> |
82 | + <div class="col-md-12"> | |
83 | + <div class="btn-group btn-group-justified btn-group-raised"> | |
84 | + <a href="?category=all" class="btn btn-raised btn-info">Todos</a> | |
85 | + {% for category_course in categorys_courses %} | |
86 | + <a href="?category={{category_course.name}}" class="btn btn-raised btn-primary">{{category_course.name}}</a> | |
87 | + {% endfor %} | |
88 | + </div> | |
47 | 89 | </div> |
48 | - {% if courses|length > 0 %} | |
49 | - {% for course in courses %} | |
50 | - <div class="col-md-12"> | |
51 | - <div class="panel panel-info"> | |
52 | - <!--{% if course.image %} | |
53 | - <img src="{{ course.image_url }}" class="img-responsive" /> | |
54 | - {% else %} | |
55 | - <img src="" class="img-responsive" /> | |
56 | - {% endif %} --> | |
57 | - <div class="panel-heading"> | |
58 | - <h3 class="panel-title">Course</h3> | |
59 | - <span class="label label-info">{{ course.category }}</span> | |
60 | - <span class="label label-warning">{{ course.max_students }} {% trans 'students tops' %}</span> | |
61 | - </div> | |
62 | - <div class="panel-body"> | |
63 | - <p><b>Course Name: </b>{{ course.name }}</p> | |
64 | - <p><b>Duration (in semesters): </b>09</p> | |
65 | - <p><b>Coordinator: </b>{{course.professors}}</p> | |
66 | - <p> | |
67 | - <b>Description:</b> | |
68 | - <i> | |
69 | - "Lorem ipsum dolor sit amet, consecctetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | |
70 | - </i> | |
71 | - </p> | |
72 | 90 | |
73 | - {% if user|has_role:'professor, system_admin' %} | |
74 | - <a href="{% url 'course:update' course.slug %}" class="btn btn-sm btn-primary"> | |
75 | - <span class="glyphicon glyphicon-edit"></span> | |
76 | - </a> | |
77 | - <a href="{% url 'course:delete' course.slug %}" class="btn btn-sm btn-danger"> | |
78 | - <span class="glyphicon glyphicon-trash"></span> | |
79 | - </a> | |
80 | - {% endif %} | |
91 | +</fieldset> | |
92 | + <div class="col-md-12"> | |
93 | + {% if courses|length > 0 %} | |
94 | + {% if request.GET.category == 'all' or none or request.GET.category == '' %} | |
95 | + {% for course in list_courses %} | |
96 | + <div class="panel-group ui-accordion ui-widget ui-helper-reset ui-sortable" id="accordion" role="tablist" aria-multiselectable="false"> | |
97 | + <div class="group"> | |
98 | + <div class="panel panel-info"> | |
99 | + <div class="panel-heading" role="tab"> | |
100 | + <div class="row"> | |
101 | + <div class="col-xs-9 col-md-9 titleTopic"> | |
102 | + <a role="button" data-toggle="collapse" data-parent="#accordion" href=".collapseOne" aria-expanded="false" aria-controls="collapseOne" class="collapsed"> | |
103 | + <h4 style="color:white">{{course.name}}</h4> | |
104 | + </a> | |
105 | + </div> | |
106 | + {% if user|has_role:'professor, system_admin' %} | |
107 | + <div class="col-xs-4 col-md-3" id="divMoreActions"> | |
108 | + <div class="btn-group"> | |
109 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
110 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
111 | + </button> | |
112 | + <ul class="dropdown-menu" aria-labelledby="moreActions"> | |
113 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal4"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> Replicate</a></li> | |
114 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeCourse"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> Remove</a></li> | |
115 | + </ul> | |
116 | + </div> | |
117 | + </div> | |
118 | + {% endif %} | |
119 | + </div> | |
120 | + </div> | |
121 | + <div class="panel-collapse collapseOne collapse in" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true" aria-hidden="false" tabindex="0"> | |
122 | + <div class="panel-body"> | |
123 | + <p><b>Course Name: </b>{{course.name}}</p> | |
124 | + <p><b>Duration (in semesters): </b>09</p> | |
125 | + <p><b>Coordinator: </b>{{course.professors}}</p> | |
126 | + <p> | |
127 | + <b>Description:</b> | |
128 | + <i> | |
129 | + {{course.description}} | |
130 | + </i> | |
131 | + </p> | |
132 | + <a href="{% url 'course:view' course.slug %}" class="btn btn-raised btn-default center-block">{% trans 'View Course' %}<div class="ripple-container"></div></a> | |
133 | + </div> | |
134 | + </div> | |
135 | + </div> | |
136 | + </div> | |
137 | + </div> | |
138 | + {% endfor %} | |
139 | + {% else %} | |
140 | + {% for course in courses_category %} | |
141 | + {% if course.category.name == request.GET.category %} | |
142 | + <!-- Put your content here! --> | |
143 | + <div class="panel-group ui-accordion ui-widget ui-helper-reset ui-sortable" id="accordion" role="tablist" aria-multiselectable="false"> | |
144 | + <div class="group"> | |
145 | + <div class="panel panel-info"> | |
146 | + <div class="panel-heading" role="tab"> | |
147 | + <div class="row"> | |
148 | + <div class="col-xs-9 col-md-9 titleTopic"> | |
149 | + <a role="button" data-toggle="collapse" data-parent="#accordion" href=".collapseOne" aria-expanded="false" aria-controls="collapseOne" class="collapsed"> | |
150 | + <h4 style="color:white">{{course.name}}</h4> | |
151 | + </a> | |
152 | + </div> | |
153 | + {% if user|has_role:'professor, system_admin' %} | |
154 | + <div class="col-xs-4 col-md-3" id="divMoreActions"> | |
155 | + <div class="btn-group"> | |
156 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
157 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
158 | + </button> | |
159 | + <ul class="dropdown-menu" aria-labelledby="moreActions"> | |
160 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal4"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> Replicate</a></li> | |
161 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeCourse"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> Remove</a></li> | |
162 | + </ul> | |
163 | + </div> | |
164 | + </div> | |
165 | + {% endif %} | |
166 | + </div> | |
167 | + </div> | |
168 | + <div class="panel-collapse collapseOne collapse in" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true" aria-hidden="false" tabindex="0"> | |
169 | + <div class="panel-body"> | |
170 | + <p><b>Course Name: </b>{{course.name}}</p> | |
171 | + <p><b>Duration (in semesters): </b>09</p> | |
172 | + <p><b>Coordinator: </b>{{course.professors}}</p> | |
173 | + <p> | |
174 | + <b>Description:</b> | |
175 | + <i> | |
176 | + {{course.description}} | |
177 | + </i> | |
178 | + </p> | |
179 | + <a href="{% url 'course:view' course.slug %}" class="btn btn-raised btn-default center-block">{% trans 'View Course' %}<div class="ripple-container"></div></a> | |
180 | + </div> | |
181 | + </div> | |
182 | + </div> | |
183 | + </div> | |
184 | + </div> | |
185 | + {% endif %} | |
186 | + {% endfor %} | |
187 | + {% endif %} | |
188 | + {% else %} | |
189 | + {% trans 'No courses found' %} | |
190 | + {% endif %} | |
191 | + <div class="group"> | |
192 | + <div class="modal" id="removeCourse"> | |
193 | + <div class="modal-dialog"> | |
194 | + <div class="modal-content"> | |
195 | + <div class="modal-header"> | |
196 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> | |
197 | + <h4 class="modal-title"></h4> | |
198 | + </div> | |
199 | + <div class="modal-body"> | |
200 | + <p>Delete your course?</p> | |
201 | + </div> | |
202 | + <div class="modal-footer"> | |
81 | 203 | |
82 | - <a href="{% url 'course:view' course.slug %}" class="btn btn-raised btn-default center-block">View Course</a> | |
204 | + <a href="http://127.0.0.1:8080/html/screens/users/profile_user.html" target="_self"><button type="button" class="btn btn-primary">Confirm</button></a> | |
83 | 205 | |
206 | + </div> | |
207 | + </div> | |
84 | 208 | </div> |
85 | - </div> | |
86 | - </div> | |
87 | - | |
88 | - {% endfor %} | |
89 | - | |
90 | - | |
91 | - <nav aria-label="Page navigation"> | |
92 | - <ul class="pagination"> | |
93 | - {% for page_number in paginator.page_range %} | |
94 | - <li{% if page_obj.number == page_number %} class="active"{% endif %}> | |
95 | - <a href="?page={{ page_number }}">{{ page_number }}</a> | |
96 | - </li> | |
97 | - {% endfor %} | |
98 | - </ul> | |
209 | + </div> | |
210 | + </div> | |
211 | + </div> | |
212 | + <div class="col-md-12"> | |
213 | + <nav aria-label="Page navigation"> | |
214 | + <ul class="pagination"> | |
215 | + {% if page_obj.has_previous %} | |
216 | + <li> | |
217 | + <a href="?page={{ page_obj.previous_page_number }}"><span><<</span></a> | |
218 | + </li> | |
219 | + {% endif %} | |
220 | + {% for page_number in paginator.page_range %} | |
221 | + <li{% if page_obj.number == page_number %} class="active"{% endif %}> | |
222 | + <a href="?page={{ page_number }}">{{ page_number }}</a> | |
223 | + </li> | |
224 | + {% endfor %} | |
225 | + {% if page_obj.has_next %} | |
226 | + <li> | |
227 | + <a href="?page={{ page_obj.next_page_number }}"><span>>></span></a> | |
228 | + </li> | |
229 | + {% endif %} | |
230 | + </ul> | |
99 | 231 | </nav> |
100 | - {% else %} | |
101 | - {% trans 'No courses found' %} | |
102 | - {% endif %} | |
232 | + </div> | |
103 | 233 | {% endblock %} | ... | ... |
courses/templates/course/update.html
courses/templates/course/view.html
... | ... | @@ -15,120 +15,197 @@ |
15 | 15 | {% endblock %} |
16 | 16 | |
17 | 17 | {% block sidebar %} |
18 | -<div class="panel panel-primary"> | |
19 | - <div class="panel-heading"> | |
20 | - <img src="{{ user.image_url }}" id="img" class="img-circle img-responsive"> | |
21 | - </br> | |
22 | - <div class="row"> | |
23 | - <div class="col-xs-3 col-md-3"> | |
24 | - <i class="fa fa-facebook-official fa-2x" aria-hidden="true"></i> | |
18 | + <div class="panel panel-primary navigation"> | |
19 | + <div class="panel-heading"> | |
20 | + <h5>{% trans 'Menu' %}</h5> | |
21 | + </div> | |
22 | + <div class="panel-body"> | |
23 | + <ul class="nav nav-pills nav-stacked"> | |
24 | + <li><a href="{% url 'core:home' %}">{% trans "Home" %}</a></li> | |
25 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
26 | + <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
27 | + </ul> | |
28 | + </div> | |
25 | 29 | </div> |
26 | - <div class="col-xs-3 col-md-3"> | |
27 | - <i class="fa fa-twitter fa-2x" aria-hidden="true"></i> | |
28 | - </div> | |
29 | - <div class="col-xs-3 col-md-3"> | |
30 | - <i class="fa fa-linkedin-square fa-2x" aria-hidden="true"></i> | |
31 | - </div> | |
32 | - <div class="col-xs-3 col-md-3"> | |
33 | - <i class="fa fa-google-plus-official fa-2x" aria-hidden="true"></i> | |
34 | - </div> | |
30 | + | |
31 | +{% if user|has_role:'professor, system_admin' %} | |
32 | + | |
33 | + <div class="panel panel-primary navigation"> | |
34 | + <div class="panel-heading"> | |
35 | + <h3 class="panel-title">Actions</h3> | |
36 | + </div> | |
37 | + <div class="panel-body"> | |
38 | + <ul class="nav nav-pills nav-stacked"> | |
39 | + <li><a href="teacher/course_participants_teacher.html" target="_self">Participants</a></li> | |
40 | + <li><a href="javascript:void(0)">Replicate Subject</a></li> | |
41 | + <li><a href="javascript:void(0)">Create Subject</a></li> | |
42 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal">Create Topic</a></li> | |
43 | + </ul> | |
35 | 44 | </div> |
36 | - </div> | |
37 | - <div class="panel-body"> | |
38 | - <ul class="nav nav-pills nav-stacked"> | |
39 | - <li><a href="{% url 'app:index' %}">{% trans "Home" %}</a></li> | |
40 | - <li><a href="{% url 'users:profile' %}">{% trans "Profile" %}</a></li> | |
41 | - {# <li><a href="">{% trans "Courses" %}</a></li>#} | |
42 | - </ul> | |
43 | - </div> | |
44 | -</div> | |
45 | -{% if courses.count > 0 %} | |
46 | -<div class="panel panel-primary"> | |
47 | - <div class="panel-heading"> | |
48 | - <h5>{% trans "Courses" %}</h5> | |
49 | - </div> | |
50 | - <div class="panel-body"> | |
51 | - <ul class="nav nav-pills nav-stacked"> | |
52 | - {% for course in courses %} | |
53 | - <li><a href="{% url 'course:view' course.slug %}">{{course}}</a></li> | |
54 | - {% endfor %} | |
55 | - </ul> | |
56 | - </div> | |
57 | 45 | </div> |
58 | 46 | {% endif %} |
47 | + | |
59 | 48 | {% endblock %} |
60 | 49 | |
61 | 50 | {% block content %} |
62 | 51 | |
63 | -<div class="panel panel-info"> | |
64 | - <div class="panel-heading"> | |
65 | - <div class="row"> | |
66 | - <div class="col-xs-10 col-md-11"> | |
67 | - <h3 class="panel-title">{{course.name}}</h3> | |
68 | - </div> | |
69 | - <div class="col-xs-2 col-md-1"> | |
70 | - {% if user|has_role:'professor, system_admin' %} | |
52 | + <div class="col-md-12"> | |
53 | + <div class="panel panel-info"> | |
54 | + <div class="panel-heading headingOne"> | |
55 | + <div class="row"> | |
56 | + <div class="col-xs-8 col-md-10 titleTopic"> | |
57 | + <h4>{{course}}</h4> | |
58 | + </div> | |
59 | + {% if user|has_role:'professor' or user|has_role:'system_admin' %} | |
60 | + <div class="col-xs-4 col-md-2" id="divMoreActions"> | |
61 | + <div class="btn-group"> | |
62 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
63 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
64 | + <div class="ripple-container"></div></button> | |
65 | + <ul class="dropdown-menu" aria-labelledby="moreActions"> | |
66 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#createSubject"><i class="fa fa-plus-square-o" aria-hidden="true"></i> Create Subject</a></li> | |
67 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal4"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> Replicate</a></li> | |
68 | + <li><a href="{% url 'course:update' course.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> Edit</a></li> | |
69 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal2"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> Remove</a></li> | |
70 | + </ul> | |
71 | + </div> | |
72 | + </div> | |
73 | + {% endif %} | |
74 | + </div> | |
75 | + </div> | |
76 | + <div class="panel-body"> | |
77 | + <p><b>Course Name: </b>{{course.name}}</p> | |
78 | + <p><b>Duration (in semesters): </b>09</p> | |
79 | + <p><b>Coordinator: </b>{{course.professors}}</p> | |
80 | + <p> | |
81 | + <b>Description:</b> | |
82 | + <i> | |
83 | + {{course.description}} | |
84 | + </i> | |
85 | + </p> | |
71 | 86 | |
72 | - <div class="btn-group icon-more-horiz"> | |
73 | - <button class="btn btn-default btn-xs dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
74 | - <i class="material-icons">more_horiz</i> | |
75 | - </button> | |
76 | - <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> | |
77 | - <li><a href="{% url 'course:update' course.slug %}"><i class="material-icons">create</i> Edit</a></li> | |
78 | - <li><a href="{% url 'course:delete' course.slug %}"><i class="material-icons">delete_sweep</i> Remove</a></li> | |
79 | - </ul> | |
87 | + </div> | |
88 | + </div> | |
80 | 89 | |
81 | - </div> | |
82 | - {% endif %} | |
90 | +<!-- MODAL CREATE SUBJECT --> | |
91 | +<div class="modal" tabindex="-1" role="dialog " id="createSubject"> | |
92 | + <div class="modal-dialog"> | |
93 | + <div class="modal-content"> | |
94 | + <div class="modal-header"> | |
95 | + <h4 class="modal-title">Create a New Subject</h4> | |
96 | + </div> | |
97 | + <div class="modal-body"> | |
98 | + <div> | |
99 | + <!--<form class="form-horizontal"> | |
100 | + <div class="form-group is-empty"> | |
101 | + <label class="control-label col-md-2 col-md-offset-1 col-xs-2 col-xs-offset-1">Name</label> | |
102 | + <div class="col-md-8 col-xs-8"> | |
103 | + <input type="text" class="form-control" name="nameSubject"> | |
104 | + </div> | |
105 | + </div> | |
106 | + <div class="form-group is-empty"> | |
107 | + <label class="control-label col-md-2 col-md-offset-1 col-xs-2 col-xs-offset-1">Description</label> | |
108 | + <div class="col-md-8 col-xs-8"> | |
109 | + <textarea class="form-control" rows="3" id="textAreaSubject"></textarea> | |
110 | + <span class="help-block">Sign the description of the course.</span> | |
111 | + </div> | |
112 | + </div> | |
113 | + <div class="form-group is-empty"> | |
114 | + <label class="control-label col-md-2 col-md-offset-1 col-xs-2 col-xs-offset-1">Goals</label> | |
115 | + <div class="col-md-8 col-xs-8"> | |
116 | + <textarea class="form-control" rows="3" id="textAreaSubject"></textarea> | |
117 | + <span class="help-block">Sign the objectives of the course until the end of the course.</span> | |
118 | + </div> | |
119 | + </div> | |
120 | + <div class="form-group is-empty"> | |
121 | + <label class="control-label col-md-2 col-md-offset-1 col-xs-2 col-xs-offset-1">Students Limit</label> | |
122 | + <div class="col-md-8 col-xs-8"> | |
123 | + <input type="number" class="form-control" name="StudentLimit"> | |
124 | + </div> | |
125 | + </div> | |
126 | + <div class="row"> | |
127 | + <div class="col-md-6 col-xs-12"> | |
128 | + <div class="row"> | |
129 | + <div class="form-group is-empty"> | |
130 | + <label class="control-label col-md-4 col-xs-4 col-xs-offset-1">Begining</label> | |
131 | + <div class="col-md-8 col-xs-6"> | |
132 | + <input type="date" class="form-control" name="BeginDate"> | |
133 | + </div> | |
134 | + </div> | |
135 | + </div> | |
136 | + </div> | |
137 | + <div class="col-md-6 col-xs-12"> | |
138 | + <div class="row"> | |
139 | + <div class="form-group is-empty"> | |
140 | + <label class="control-label col-md-4 col-xs-4 col-xs-offset-1">End</label> | |
141 | + <div class="col-md-8 col-xs-6"> | |
142 | + <input type="date" class="form-control" name="EndDate"> | |
143 | + </div> | |
144 | + </div> | |
145 | + </div> | |
146 | + </div> | |
147 | + </div> | |
148 | + </form>--> | |
149 | + </div> | |
150 | + <div class="modal-footer"> | |
151 | + <button type="button" data-dismiss="modal" class="btn btn-default">Cancel</button> | |
152 | + <a href="#" target="_self"><button type="button" class="btn btn-primary">Confirm</button></a> | |
83 | 153 | </div> |
84 | 154 | </div> |
155 | + </div> | |
85 | 156 | </div> |
86 | - <div class="panel-body"> | |
87 | - <p><b>Course Name: </b>{{course.name}}</p> | |
88 | - <p><b>Duration (in semesters): </b></p> | |
89 | - {% for professor in course.professors.all %} | |
90 | - <p><b>Professor: </b>{{professor.name}}</p> | |
91 | - {% endfor %} | |
92 | - | |
93 | - <p> | |
94 | - <b>Description:</b> | |
95 | - <i> | |
96 | - {{course.content}} | |
97 | - </i> | |
98 | - </p> | |
157 | +</div> | |
99 | 158 | |
100 | - </div> | |
159 | +<div class="panel-group ui-accordion ui-widget ui-helper-reset ui-sortable" id="accordion" role="tablist" aria-multiselectable="false"> | |
160 | + <div><div class="panel panel-info"> | |
101 | 161 | </div> |
102 | 162 | |
103 | 163 | |
104 | -{% for subject in subjects %} | |
105 | - <div class="panel panel-info"> | |
106 | - <div class="panel-heading"> | |
107 | - <div class="row"> | |
108 | - <a href="{% url 'course:view_subject' subject.slug %}"> | |
109 | - <div class="col-md-11"> | |
164 | +<!-- MODAL REMOVE --> | |
165 | +<div class="modal" id="removeSubject"> | |
166 | + <div class="modal-dialog"> | |
167 | + <div class="modal-content"> | |
168 | + <div class="modal-header"> | |
169 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> | |
170 | + <h4 class="modal-title"></h4> | |
171 | + </div> | |
172 | + <div class="modal-body"> | |
173 | + <p>Are you sure you want to remove this subject?</p> | |
174 | + </div> | |
175 | + <div class="modal-footer"> | |
176 | + | |
177 | + <a href="http://127.0.0.1:8080/html/screens/users/teacher/home_course_teacher.html" target="_self"><button type="button" class="btn btn-primary">Confirm</button></a> | |
110 | 178 | |
111 | - <h3 class="panel-title">{{subject}}</h3> | |
179 | + </div> | |
180 | + </div> | |
181 | + </div> | |
182 | +</div> | |
183 | +</div> | |
184 | +<div> | |
112 | 185 | |
186 | +{% for subject in subjects %} | |
187 | +<div class="panel panel-info"> | |
188 | + <div class="panel-heading headingTwo ui-sortable-handle" role="tab"> | |
189 | + <div class="row"> | |
190 | + <div class="col-xs-9 col-md-10 titleTopic"> | |
191 | + <a role="button" data-toggle="collapse" data-parent="#accordion" href=".collapseTwo" aria-expanded="true" aria-controls="collapseTwo"> | |
192 | + <h4 style="color:white">{{subject.name}}</h4> | |
193 | + </a> | |
113 | 194 | </div> |
114 | - </a> | |
115 | - <div class="col-md-1 text-right"> | |
116 | - {% if user|has_role:'professor, system_admin' %} | |
117 | - <div class="btn-group icon-more-horiz"> | |
118 | - <button class="btn btn-default btn-xs dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
119 | - <i class="material-icons">more_horiz</i> | |
195 | + <div class="col-xs-3 col-md-2" id="divMoreActions"> | |
196 | + <div class="btn-group"> | |
197 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
198 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
120 | 199 | </button> |
121 | - <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> | |
122 | - <li><a href="{% url 'course:update_subject' subject.slug %}"><i class="material-icons">create</i> {% trans "Edit" %}</a></li> | |
123 | - <li><a href="{% url 'course:delete_subject' subject.slug %}"><i class="material-icons">delete_sweep</i> {% trans "Remove" %}</a></li> | |
200 | + <ul class="dropdown-menu" aria-labelledby="moreActions"> | |
201 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal3"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> Replicate</a></li> | |
202 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeSubject2"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> Remove</a></li> | |
124 | 203 | </ul> |
125 | - | |
126 | 204 | </div> |
127 | - {% endif %} | |
128 | 205 | </div> |
129 | 206 | </div> |
130 | - </div> | |
131 | - <div class="panel-body"> | |
207 | + </div> | |
208 | + <div class="panel-body"> | |
132 | 209 | <p><b>{% trans "Professor" %}: </b>{% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} |
133 | 210 | {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> |
134 | 211 | <p> |
... | ... | @@ -145,22 +222,44 @@ |
145 | 222 | <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> |
146 | 223 | </div> |
147 | 224 | </div> |
225 | + <a href="{% url 'course:view_subject' subject.slug %}" class="btn btn-raised btn-default center-block">{% trans 'View Subject' %}<div class="ripple-container"></div></a> | |
148 | 226 | </div> |
227 | +</div> | |
228 | +{% if user|has_role:'professor' or user|has_role:'system_admin' %} | |
229 | + | |
230 | + <div class="form-group"> | |
231 | + <a href="{% url 'course:create_subject' subject.slug %}" data-toggle="modal" data-target="" class="btn btn-primary btn-lg btn-block btn-raised">{% trans 'Create Subject' %}<div class="ripple-container"></div></a> | |
149 | 232 | </div> |
233 | +{% endif %} | |
234 | + | |
235 | + | |
150 | 236 | {% endfor %} |
151 | -<a class="btn-floating btn-large waves-effect waves-light red" href="{% url 'course:create' %}"> | |
152 | - <i class="fa fa-plus" aria-hidden="true"></i> | |
153 | - </a> | |
154 | -{% endblock %} | |
155 | 237 | |
156 | 238 | |
157 | -{% block rightbar %} | |
158 | -<div class="panel panel-warning"> | |
159 | - <div class="panel-heading"> | |
160 | - <h3 class="panel-title">{% trans "Pending Stuffs" %}</h3> | |
161 | - </div> | |
162 | - <div class="panel-body"> | |
163 | - <p>{% trans 'No pending tasks at the moment.' %}</p> | |
239 | +<!-- MODAL REMOVE --> | |
240 | + <div class="modal" id="removeSubject2"> | |
241 | + <div class="modal-dialog"> | |
242 | + <div class="modal-content"> | |
243 | + <div class="modal-header"> | |
244 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> | |
245 | + <h4 class="modal-title"></h4> | |
246 | + </div> | |
247 | + <div class="modal-body"> | |
248 | + <p>Are you sure you want to remove this subject?</p> | |
249 | + </div> | |
250 | + <div class="modal-footer"> | |
251 | + | |
252 | + <a href="http://127.0.0.1:8080/html/screens/users/teacher/home_course_teacher.html" target="_self"><button type="button" class="btn btn-primary">Confirm</button></a> | |
253 | + | |
254 | + </div> | |
164 | 255 | </div> |
256 | + </div> | |
165 | 257 | </div> |
166 | -{% endblock rightbar %} | |
258 | + | |
259 | + | |
260 | +</div> | |
261 | +</div> | |
262 | +</div> | |
263 | + | |
264 | +{% endblock %} | |
265 | + | ... | ... |
courses/templates/poll/poll.html
... | ... | @@ -1,53 +0,0 @@ |
1 | -{% extends "topic/index.html" %} | |
2 | - | |
3 | -{% load i18n %} | |
4 | - | |
5 | -{% block style %} | |
6 | - <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> | |
7 | -{% endblock %} | |
8 | - | |
9 | -{% block content %} | |
10 | -<div class="col-md-8 col-md-offset-2"> | |
11 | - <div class="panel panel-primary"> | |
12 | - <div class="panel-heading"> | |
13 | - <h3 class="panel-title"> | |
14 | - <span class="glyphicon glyphicon-hand-right"></span> Question?</h3> | |
15 | - </div> | |
16 | - <div class="container-fluid"> | |
17 | - <form id="form" class="" action="" method="post"> | |
18 | - <div class="row form-group"> | |
19 | - <div class="col-md-1"> | |
20 | - </br> | |
21 | - <label><span class="glyphicon glyphicon-menu-hamburger"></span></label> | |
22 | - </div> | |
23 | - <div class="col-md-10"> | |
24 | - <div class="form-control-md has-success is-empty"> | |
25 | - <input type="text" class="form-control" placeholder="Email address default size"> | |
26 | - <span class="help-block">Please enter a valid email address</span> | |
27 | - </div> | |
28 | - </div> | |
29 | - <div class="col-md-1"> | |
30 | - </br> | |
31 | - <label><span class="glyphicon glyphicon-remove" onclick="this.parentNode.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode.parentNode);"></span></label> | |
32 | - </div> | |
33 | - </div> | |
34 | - </form> | |
35 | - </br> | |
36 | - </div> | |
37 | - | |
38 | - </div> | |
39 | - <div class="panel-footer text-center"> | |
40 | - <button type="button" id="add" class="btn btn-primary btn-block btn-sm">add</button> | |
41 | - <a href="#" class="small">View Result</a> | |
42 | - </div> | |
43 | - </div> | |
44 | -<script type="text/javascript"> | |
45 | -$( "#form" ).sortable({ | |
46 | - delay: 100, | |
47 | - distance: 5, | |
48 | -}); | |
49 | -$("#add").click(function() { | |
50 | - $("#form").append('<div class="row form-group"><div class="col-md-1"></br><label><span class="glyphicon glyphicon-menu-hamburger"></span></label></div><div class="col-md-10"><div class="form-group-md has-success is-empty"><input type="text" class="form-control" placeholder="Email address default size"><span class="help-block">Please enter a valid email address</span></div></div><div class="col-md-1"></br><label><span class="glyphicon glyphicon-remove" onclick="this.parentNode.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode.parentNode);"></span></label></div></br></div>'); | |
51 | -}); | |
52 | -</script> | |
53 | -{% endblock content %} |
courses/templates/subject/form_view_student.html
1 | -{% load i18n %} | |
1 | +{% load static i18n list_topic_foruns %} | |
2 | + | |
3 | +{% block javascript %} | |
4 | + <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> | |
5 | +{% endblock %} | |
2 | 6 | |
3 | 7 | <div class="panel panel-default"> |
4 | 8 | <a href="{% url 'course:view_topic' topic.slug %}"> |
... | ... | @@ -13,4 +17,25 @@ |
13 | 17 | </div> |
14 | 18 | <div class="panel-body"> |
15 | 19 | <p>{{topic.description|linebreaks}}</p> |
16 | -</div> | |
17 | 20 | \ No newline at end of file |
21 | + {% list_topic_foruns request topic %} | |
22 | + {% list_topic_poll request topic %} | |
23 | +</div> | |
24 | + | |
25 | +<div class="modal fade" id="forumModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
26 | + <div class="modal-dialog" role="document"> | |
27 | + <div class="modal-content"> | |
28 | + <div class="modal-header"> | |
29 | + <h4 class="modal-title" id="myModalLabel">{% trans 'Forum' %}</h4> | |
30 | + </div> | |
31 | + <div class="modal-body"> | |
32 | + <section> | |
33 | + <div class="forum_topics"></div> | |
34 | + </section> | |
35 | + </div> | |
36 | + <div class="modal-footer"> | |
37 | + <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">{% trans 'Close' %}</button> | |
38 | + <button type="button" class="btn btn-primary btn-raised">{% trans 'Save changes' %}</button> | |
39 | + </div> | |
40 | + </div> | |
41 | + </div> | |
42 | +</div> | ... | ... |
courses/templates/subject/form_view_teacher.html
1 | -{% load static i18n list_topic_foruns %} | |
1 | + {% load static i18n list_topic_foruns permission_tags %} | |
2 | 2 | |
3 | -{% block javascript %} | |
4 | - <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> | |
5 | -{% endblock %} | |
3 | + {% block javascript %} | |
4 | + <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> | |
5 | + {% endblock %} | |
6 | 6 | |
7 | -<div class="panel panel-default"> | |
8 | - <a href="{% url 'course:view_topic' topic.slug %}"> | |
9 | - <div class="panel-heading"> | |
7 | + <div class="panel-group accordion ui-accordion ui-widget ui-helper-reset ui-sortable" role="tablist" aria-multiselectable="false"> | |
8 | + <div class="group"><div class="panel panel-default"> | |
9 | + <div class="panel-heading headingOne ui-sortable-handle" role="tab"> | |
10 | + <div class="row"> | |
11 | + <div class="col-xs-9 col-md-10 titleTopic"> | |
12 | + <a role="button" data-toggle="collapse" data-parent=".accordion" href=".collapseOne" aria-expanded="false" aria-controls="collapseOne" class="" aria-selected="false" tabindex="-1"> | |
13 | + {{topic}} | |
14 | + </a> | |
15 | + </div> | |
16 | + <div class="col-xs-3 col-md-2 divMoreActions"> | |
17 | + <div class="btn-group"> | |
18 | + <button type="button" class="btn btn-default btn-sm eye" data-toggle="tooltip" data-placement="bottom" title="Visible"> | |
19 | + <i class="fa fa-eye fa-2x" aria-hidden="true"></i> | |
20 | + </button> | |
21 | + </div> | |
22 | + <div class="btn-group"> | |
23 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
24 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
25 | + </button> | |
26 | + {% if user|has_role:'system_admin' or topic.owner == user %} | |
27 | + <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | |
28 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal4"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> | |
29 | + <li><a href="javascript:void(0)" class="edit_card"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | |
30 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeTopic"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> | |
31 | + </ul> | |
32 | + {% endif %} | |
33 | + </div> | |
34 | + </div> | |
35 | + </div> | |
36 | + </div> | |
37 | + <div class="panel-collapse collapseOne collapse in" role="tabpanel" aria-labelledby="headingOne" aria-expanded="false" aria-hidden="true" tabindex="-1" aria-selected="false"> | |
38 | + <div class="panel-body"> | |
39 | + <div class="presentation"> | |
40 | + <p> | |
41 | + <i> | |
42 | + {{topic.description|linebreaks}} | |
43 | + </i> | |
44 | + </p> | |
10 | 45 | <div class="row"> |
11 | - <div class="col-md-9 col-sm-9"> | |
12 | - <h3>{{ topic }}</h3> | |
46 | + <div class="col-xs-6 col-md-6"> | |
47 | + <div class="resource_inline"> | |
48 | + <h4>Material</h4> | |
49 | + </div> | |
50 | + <div class="resource_inline"> | |
51 | + <div class="dropdown"> | |
52 | + <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
53 | + <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
54 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#createLinksModal">Create a Link<div class="ripple-container"><div class="ripple ripple-on ripple-out" style="left: 54.5312px; top: 22px; background-color: rgb(0, 150, 136); transform: scale(20);"></div></div></a></li> | |
55 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#createFileModal">Create a file<div class="ripple-container"><div class="ripple ripple-on ripple-out" style="left: 33.5312px; top: 11px; background-color: rgb(0, 150, 136); transform: scale(20);"></div></div></a></li> | |
56 | + </ul> | |
57 | + </div> | |
58 | + </div> | |
59 | + <ul> | |
60 | + <li><i class="fa fa-book" aria-hidden="true"></i> <a href="#">Book 1</a></li> | |
61 | + <li><i class="fa fa-link" aria-hidden="true"></i> <a href="#" data-toggle="modal" data-target="#linksModal">Link 1</a></li> | |
62 | + <li><i class="fa fa-file-code-o" aria-hidden="true"></i> <a href="#" data-toggle="modal" data-target="#embedModal">EMBED Material</a></li> | |
63 | + </ul> | |
64 | + </div> | |
65 | + <div class="col-xs-4 col-md-4"> | |
66 | + <div class="resource_inline"> | |
67 | + <h4>Activities</h4> | |
13 | 68 | </div> |
14 | - <div class="col-md-3 col-sm-3"> | |
15 | - <a href="{% url 'course:update_topic' topic.slug%}" class="btn">{% trans "edit" %}</a> | |
69 | + <div class="resource_inline"> | |
70 | + <div class="dropdown"> | |
71 | + <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
72 | + <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
73 | + <li><a href="javascript:createForum('{% url 'course:forum:create' %}', '{{ topic.id }}')">{% trans 'Create Forum' %}<div class="ripple-container"><div class="ripple ripple-on ripple-out" style="left: 33.5312px; top: 11px; background-color: rgb(0, 150, 136); transform: scale(20);"></div></div></a></li> | |
74 | + </ul> | |
75 | + </div> | |
16 | 76 | </div> |
77 | + <ul> | |
78 | + <li><i class="fa fa-file-text" aria-hidden="true"></i> <a href="#" data-toggle="modal" data-target="#ActivityModal">Activitie 1</a></li> | |
79 | + <div class="foruns_list"> | |
80 | + {% list_topic_foruns request topic %} | |
81 | + </div> | |
82 | + </ul> | |
83 | + </div> | |
84 | + {% list_topic_poll request topic %} | |
85 | + </div> | |
86 | + </div> | |
87 | + <div class="editation" style="display: none"> | |
88 | + <div class="form-group"> | |
89 | + <label class="control-label" for="focusedInput2">Name Topic</label> | |
90 | + <input type="text" class="form-control" value="Topic 1"> | |
17 | 91 | </div> |
92 | + <div class="form-group is-empty"> | |
93 | + <label class="control-label" for="focusedInput2">Description</label> | |
94 | + <textarea class="form-control" rows="3" id="textArea"></textarea> | |
95 | + </div> | |
96 | + <div class="row"> | |
97 | + <div class=" col-xs-6 col-md-4"> | |
98 | + <div class="resource_inline"> | |
99 | + <h4>Material</h4> | |
100 | + </div> | |
101 | + <div class="resource_inline"> | |
102 | + <div class="dropdown"> | |
103 | + <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
104 | + <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
105 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#createLinksModal">Create a Link</a></li> | |
106 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#createFileModal">Create a file</a></li> | |
107 | + </ul> | |
108 | + </div> | |
109 | + </div> | |
110 | + <ul> | |
111 | + <li class="icon_edit_remove"> <a href="#" data-toggle="modal" data-target="#editFileModal"><i class="fa fa-pencil fa-lg" aria-hidden="true"></i></a> <a href="#" data-toggle="modal" data-target="#removeFileModal"><i class="fa fa-trash fa-lg" aria-hidden="true"></i></a></li> | |
112 | + <li><a href="#">Book 1</a> </li> | |
113 | + <li class="icon_edit_remove"> <a href="#" data-toggle="modal" data-target="#linksModalEdit"><i class="fa fa-pencil fa-lg" aria-hidden="true"></i></a> <a href="#" data-toggle="modal" data-target="#removeLink"><i class="fa fa-trash fa-lg" aria-hidden="true"></i></a></li> | |
114 | + <li><a href="#" data-toggle="modal" data-target="#linksModal">Link 1</a></li> | |
115 | + <li class="icon_edit_remove"><i class="fa fa-pencil fa-lg" aria-hidden="true"></i> <i class="fa fa-trash fa-lg" aria-hidden="true"></i></li> | |
116 | + <li><a href="#" data-toggle="modal" data-target="#embedModal">EMBED Material</a></li> | |
117 | + </ul> | |
118 | + </div> | |
119 | + <div class="col-xs-4 col-md-offset-1 col-md-4"> | |
120 | + <div class="resource_inline"> | |
121 | + <h4>Activities</h4> | |
122 | + </div> | |
123 | + <div class="resource_inline"> | |
124 | + <div class="dropdown"> | |
125 | + <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | |
126 | + <ul class="dropdown-menu" aria-labelledby="dLabel"> | |
127 | + <li>Qualquer coisa</li> | |
128 | + </ul> | |
129 | + </div> | |
130 | + </div> | |
131 | + <ul> | |
132 | + <li class="icon_edit_remove"><i class="fa fa-pencil fa-lg" aria-hidden="true"></i> <i class="fa fa-trash fa-lg" aria-hidden="true"></i></li> | |
133 | + <li><a href="#" data-toggle="modal" data-target="#ActivityModal">Activitie 1</a></li> | |
134 | + <li class="icon_edit_remove"><i class="fa fa-pencil fa-lg" aria-hidden="true"></i> <i class="fa fa-trash fa-lg" aria-hidden="true"></i></li> | |
135 | + | |
136 | + </ul> | |
137 | + </div> | |
138 | + </div> | |
139 | + <div class="form-group"> | |
140 | + <div class="col-md-10"> | |
141 | + <button type="button" class="btn btn-raised btn-default edit_card_end">Cancel</button> | |
142 | + <button type="submit" class="btn btn-raised btn-primary edit_card_end">Submit</button> | |
143 | + </div> | |
144 | + </div> | |
145 | + </div> | |
18 | 146 | </div> |
19 | - </a> | |
20 | - <div class="panel-body"> | |
21 | - <p>{{ topic.description|linebreaks }}</p> | |
22 | - {% list_topic_foruns request topic %} | |
147 | + </div> | |
148 | + | |
23 | 149 | </div> |
24 | -</div> | |
150 | + <!-- MODAL REMOVE TOPIC --> | |
151 | + <div class="modal" id="removeTopic"> | |
152 | + <div class="modal-dialog"> | |
153 | + <div class="modal-content"> | |
154 | + <div class="modal-header"> | |
155 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> | |
156 | + <h4 class="modal-title"></h4> | |
157 | + </div> | |
158 | + <div class="modal-body"> | |
159 | + <p>Delete your Topic?</p> | |
160 | + </div> | |
161 | + <div class="modal-footer"> | |
162 | + | |
163 | + <a href="http://localhost:8080/html/screens/users/profile_user.html" target="_self"><button type="button" class="btn btn-primary">Confirm</button></a> | |
164 | + | |
165 | + </div> | |
166 | + </div> | |
167 | + </div> | |
168 | + </div> | |
169 | + <!-- END --> | |
25 | 170 | |
26 | -<div class="modal fade" id="forumModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
171 | + <!-- MODAL EDIT FILE --> | |
172 | + <div class="modal fade" id="editFileModal" tabindex="-1" role="dialog" aria-labelledby="editFileLabel"> | |
27 | 173 | <div class="modal-dialog" role="document"> |
174 | + <div class="modal-content"> | |
175 | + <div class="modal-header"> | |
176 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
177 | + <h4 class="modal-title" id="editFileLabel">Add File</h4> | |
178 | + </div> | |
179 | + <div class="modal-body"> | |
180 | + <!-- Card --> | |
181 | + | |
182 | + <form class="form-horizontal"> | |
183 | + <fieldset> | |
184 | + | |
185 | + <div class="form-group"> | |
186 | + <label for="inputName" class="col-md-2 control-label">Name</label> | |
187 | + | |
188 | + <div class="col-md-10"> | |
189 | + <input type="text" class="form-control" id="inputText" placeholder="Name" value="Book 1"> | |
190 | + </div> | |
191 | + </div> | |
192 | + | |
193 | + <div class="form-group is-empty is-fileinput"> | |
194 | + <label for="inputFile" class="col-md-2 control-label">File</label> | |
195 | + | |
196 | + <div class="col-md-10"> | |
197 | + <input type="text" readonly="" class="form-control" placeholder="Browse..."> | |
198 | + <input type="file" id="inputFile" multiple=""> | |
199 | + </div> | |
200 | + </div> | |
201 | + | |
202 | + | |
203 | + <div class="form-group"> | |
204 | + <div class="col-md-12 text-center"> | |
205 | + <p><b>The file size shouldn't exceed 10MB</b></p> | |
206 | + </div> | |
207 | + </div> | |
208 | + | |
209 | + <div class="form-group"> | |
210 | + <div class="col-md-12"> | |
211 | + <a href="javascript:void(0)" class="btn btn-raised btn-default">Cancel</a> | |
212 | + <a href="javascript:void(0)" class="btn btn-raised btn-primary">Submit</a> | |
213 | + </div> | |
214 | + </div> | |
215 | + </fieldset> | |
216 | + </form> | |
217 | + | |
218 | + | |
219 | + <!-- .end Card --> | |
220 | + </div> | |
221 | + </div> | |
222 | + </div> | |
223 | + </div> | |
224 | + | |
225 | +{% if user|has_role:'system_admin' or topic.owner == user%} | |
226 | + {% include "files/create_file.html" %} | |
227 | +{% endif %} | |
228 | + | |
229 | + <!-- MODAL REMOVE FILE --> | |
230 | + <div class="modal" id="removeFileModal"> | |
231 | + <div class="modal-dialog"> | |
232 | + <div class="modal-content"> | |
233 | + <div class="modal-header"> | |
234 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> | |
235 | + <h4 class="modal-title"></h4> | |
236 | + </div> | |
237 | + <div class="modal-body"> | |
238 | + <p>Do you really want to delete this file?</p> | |
239 | + </div> | |
240 | + <div class="modal-footer"> | |
241 | + | |
242 | + <a href="#" target="_self"><button type="button" class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Confirm</button></a> | |
243 | + | |
244 | + </div> | |
245 | + </div> | |
246 | + </div> | |
247 | + </div> | |
248 | + <!-- END --> | |
249 | + | |
250 | + <!--MODAL VIEW LINK--> | |
251 | + <div class="modal fade" id="linksModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
252 | + <div class="modal-dialog" role="document"> | |
253 | + <div class="modal-content"> | |
254 | + <div class="modal-header"> | |
255 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
256 | + <h4 class="modal-title" id="myModalLabel">Links</h4> | |
257 | + </div> | |
258 | + <div class="modal-body"> | |
259 | + <!-- Card --> | |
260 | + <article class="card animated fadeInLeft"> | |
261 | + <img class="card-img-top img-responsive" src="https://www.python.org/static/opengraph-icon-200x200.png" align="left"> | |
262 | + <div class="card-block"> | |
263 | + <b class="card-title">Python</b><p></p> | |
264 | + <b class="text-muted">Guido van Rossum</b> | |
265 | + <p class="card-text"> </p><p>Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than possible in languages such as C++ or Java.</p> | |
266 | + <a href="https://www.python.org/" class="btn btn-primary">Read more</a> | |
267 | + </div> | |
268 | + </article> | |
269 | + <!-- .end Card --> | |
270 | + </div> | |
271 | + </div> | |
272 | + </div> | |
273 | + </div> | |
274 | + <!-- EndModal --> | |
275 | + | |
276 | + <!--MODAL CREATE LINK--> | |
277 | + <div class="modal fade" id="createLinksModal" tabindex="-1" role="dialog" aria-labelledby="createLink" style="display: none;"> | |
278 | + <div class="modal-dialog" role="document"> | |
279 | + <div class="modal-content"> | |
280 | + <div class="modal-header"> | |
281 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
282 | + <h4 class="modal-title" id="createLink">Create a New Link</h4> | |
283 | + </div> | |
284 | + <div class="modal-body"> | |
285 | + <!-- Card --> | |
286 | + <div class="form-group is-empty"> | |
287 | + <label class="control-label" for="inputDefault">Name</label> | |
288 | + <input type="text" class="form-control" id="inputDefault"> | |
289 | + </div> | |
290 | + <div class="form-group is-empty"> | |
291 | + <label class="control-label" for="inputDefault">Url</label> | |
292 | + <input type="text" class="form-control" id="inputDefault"> | |
293 | + </div> | |
294 | + <div class="form-group is-empty"> | |
295 | + <label class="control-label" for="inputDefault">Descrição</label> | |
296 | + <textarea class="form-control" rows="3"></textarea> | |
297 | + </div> | |
298 | + <div class="form-group"> | |
299 | + <a href="javascript:void(0)" class="btn btn-raised btn-default">Cancel</a> | |
300 | + <a href="javascript:void(0)" class="btn btn-raised btn-primary">Submit</a> | |
301 | + </div> | |
302 | + <!-- .end Card --> | |
303 | + </div> | |
304 | + </div> | |
305 | + </div> | |
306 | + </div> | |
307 | + <!-- EndModal --> | |
308 | + | |
309 | + <!-- MODAL REMOVE LINK --> | |
310 | + <div class="modal" id="removeLink"> | |
311 | + <div class="modal-dialog"> | |
28 | 312 | <div class="modal-content"> |
29 | - <div class="modal-header"> | |
30 | - <h4 class="modal-title" id="myModalLabel">Forum</h4> | |
31 | - </div> | |
32 | - <div class="modal-body"> | |
33 | - <section> | |
34 | - <div class="forum_topics"></div> | |
35 | - <div class="form-group"> | |
36 | - <div class="input-group"> | |
37 | - <textarea type="text" id="addon3a" class="form-control" placeholder="{% trans 'Post a comment...' %}"></textarea> | |
38 | - <span class="input-group-btn"> | |
39 | - <button type="button" class="btn btn-fab btn-fab-mini"> | |
40 | - <i class="material-icons">send</i> | |
313 | + <div class="modal-header"> | |
314 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> | |
315 | + <h4 class="modal-title"></h4> | |
316 | + </div> | |
317 | + <div class="modal-body"> | |
318 | + <p>Do you really want to delete this link?</p> | |
319 | + </div> | |
320 | + <div class="modal-footer"> | |
321 | + | |
322 | + <a href="#" target="_self"><button type="button" class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Confirm</button></a> | |
323 | + | |
324 | + </div> | |
325 | + </div> | |
326 | + </div> | |
327 | + </div> | |
328 | + <!-- END --> | |
329 | + | |
330 | + <!-- MODAL EMBEED--> | |
331 | + <div class="modal fade" id="embedModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
332 | + <div class="modal-dialog" role="document"> | |
333 | + <div class="modal-content"> | |
334 | + <div class="modal-header"> | |
335 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
336 | + <h4 class="modal-title" id="myModalLabel">Material EMBED</h4> | |
337 | + </div> | |
338 | + <div class="modal-body"> | |
339 | + <div class="form-group is-empty"> | |
340 | + <label for="inputEmail" class="col-md-2 control-label">Name:</label> | |
341 | + <div class="col-md-10"> | |
342 | + <input type="text" class="form-control" id="inputEmail" placeholder="Name"> | |
343 | + </div> | |
344 | + </div> | |
345 | + <form class="form-horizontal"> | |
346 | + <div class="form-group is-empty"> | |
347 | + <label for="textArea" class="col-md-2 control-label">Code:</label> | |
348 | + | |
349 | + <div class="col-md-10"> | |
350 | + <textarea class="form-control" rows="2" id="textArea"></textarea> | |
351 | + <span class="help-block">Material description</span> | |
352 | + </div> | |
353 | + </div> | |
354 | + <div class="form-group is-empty"> | |
355 | + <label for="number" class="col-md-2 control-label">Height</label> | |
356 | + <div class="col-md-4"> | |
357 | + <input type="number" class="form-control" id="inputNumber" placeholder="Heiht"> | |
358 | + </div> | |
359 | + </div> | |
360 | + <div class="form-group is-empty"> | |
361 | + <label for="number" class="col-md-2 control-label">Weight</label> | |
362 | + <div class="col-md-4"> | |
363 | + <input type="number" class="form-control" id="inputNumber" placeholder="Weight"> | |
364 | + </div> | |
365 | + </div> | |
366 | + </form> | |
367 | + | |
368 | + </div> | |
369 | + <div class="modal-footer"> | |
370 | + <!-- Don't remove that!!! | |
371 | + <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">Close</button>--> | |
372 | + | |
373 | + <!-- Put curtom buttons here!!! --> | |
374 | + <button type="button" class="btn btn-primary btn-raised">Confirm</button> | |
375 | + </div> | |
376 | + </div> | |
377 | + </div> | |
378 | + </div> | |
379 | + <!-- EndModal --> | |
380 | + | |
381 | + <!-- MODAL ACTIVITIES--> | |
382 | + <div class="modal fade" id="ActivityModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
383 | + <div class="modal-dialog" role="document"> | |
384 | + <div class="modal-content"> | |
385 | + <div class="modal-header"> | |
386 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
387 | + <h4 class="modal-title" id="myModalLabel"></h4> | |
388 | + </div> | |
389 | + <div class="modal-body"> | |
390 | + <form class="form-horizontal"> | |
391 | + | |
392 | + <fieldset> | |
393 | + <legend>Atividade Proposta</legend> | |
394 | + <div class="form-group is-empty"> | |
395 | + <label for="NameIn" class="col-md-2 control-label">Name:</label> | |
396 | + <div class="col-md-10"> | |
397 | + <input type="text" id="NameIn" class="form-control"> | |
398 | + </div> | |
399 | + </div> | |
400 | + <div class="form-group is-empty"> | |
401 | + <label for="DescIn" class="col-md-2 control-label">Describe:</label> | |
402 | + <div class="col-md-10"> | |
403 | + <textarea class="form-control" id="DescIn" rows="2"></textarea> | |
404 | + </div> | |
405 | + </div> | |
406 | + <div class="form-group is-empty"> | |
407 | + <label for="DateIn" class="col-md-2 control-label">Opening: </label> | |
408 | + <div class="col-md-10"> | |
409 | + <input type="text" id="DateIn" class="form-control date-picker" requerid=""> | |
410 | + </div> | |
411 | + </div> | |
412 | + <div class="form-group is-empty"> | |
413 | + <label for="DateIn" class="col-md-2 control-label">Ending: </label> | |
414 | + <div class="col-md-10"> | |
415 | + <input type="text" id="DateIn" class="form-control date-picker" requerid=""> | |
416 | + </div> | |
417 | + </div> | |
418 | + <div class="form-group" style="margin-top: 0;"> | |
419 | + <div class="col-md-offset-2 col-md-10"> | |
420 | + <div class="checkbox"> | |
421 | + <label> | |
422 | + <input type="checkbox"><span class="checkbox-material"><span class="check"></span></span> Send Later | |
423 | + </label> | |
424 | + </div> | |
425 | + </div> | |
426 | + </div> | |
427 | + <div class="form-group"> | |
428 | + <div class="col-md-10 col-md-offset-2"> | |
429 | + <button type="button" class="btn btn-default">Cancel</button> | |
430 | + <button type="submit" class="btn btn-primary">Submit</button> | |
431 | + </div> | |
432 | + </div> | |
433 | + | |
434 | + | |
435 | + </fieldset> | |
436 | + </form> | |
437 | + </div> | |
438 | + </div> | |
439 | + </div> | |
440 | + </div> | |
441 | + <!--EndModal--> | |
442 | + | |
443 | + <!-- MODAL FORUM --> | |
444 | + <div class="modal fade" id="forumModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
445 | + <div class="modal-dialog" role="document"> | |
446 | + <div class="modal-content"> | |
447 | + <div class="modal-header"> | |
448 | + <h4 class="modal-title" id="myModalLabel">Forum</h4> | |
449 | + </div> | |
450 | + <div class="modal-body"> | |
451 | + <!--Forum--> | |
452 | + <!--Main wrapper--> | |
453 | + <div class="comments-list"> | |
454 | + <div class="section-heading"> | |
455 | + <h1>Python</h1> | |
456 | + <h4><b>Description:</b>High-level Language</h4> | |
457 | + <h4><b>Opened in:</b> September 1st</h4> | |
458 | + </div> | |
459 | + <!--First row--> | |
460 | + <div class="row"> | |
461 | + | |
462 | + <!--Content column--> | |
463 | + <div class="col-sm-10 col-xs-12"> | |
464 | + <h3 class="user-name">Gerson Jefferson</h3> | |
465 | + | |
466 | + <div class="card-data"> | |
467 | + <p class="comment-date"><i class="fa fa-clock-o"></i> 05/10/2015</p> | |
468 | + </div> | |
469 | + | |
470 | + <p class="comment-text">Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat | |
471 | + cupidatat non proident.</p> | |
472 | + </div> | |
473 | + <!--/.Content column--> | |
474 | + </div> | |
475 | + <a class="btn btn-sm" style="float: right;" data-toggle="collapse" href="#collapse1" aria-expanded="false" aria-controls="collapseExample">Reply</a> | |
476 | + <div class="collapse" id="collapse1"> | |
477 | + <div class="md-form"> | |
478 | + <div class="form-group is-empty"><input type="text" id="form1" class="form-control" placeholder="comment on the cometary"></div><span class="input-group-btn"> | |
479 | + <button type="button" class="btn btn-sm"> | |
480 | + <i class="fa fa-paper-plane"> Send</i> | |
481 | + </button> | |
482 | + </span> | |
483 | + </div> | |
484 | + </div> | |
485 | + </div> | |
486 | + | |
487 | + <!--/.First row--> | |
488 | + | |
489 | + <!--Second row--> | |
490 | + <div class="row"> | |
491 | + | |
492 | + <!--Content column--> | |
493 | + <div class="col-sm-10 col-xs-12"> | |
494 | + <h3 class="user-name">Cherielly</h3> | |
495 | + | |
496 | + <div class="card-data"> | |
497 | + <p class="comment-date"><i class="fa fa-clock-o"></i> 08/10/2015</p> | |
498 | + </div> | |
499 | + | |
500 | + <p class="comment-text">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam | |
501 | + voluptatem quia voluptas sit aspernatur.</p> | |
502 | + </div> | |
503 | + <!--/.Content column--> | |
504 | + </div> | |
505 | + <a class="btn btn-sm" style="float: right;" data-toggle="collapse" href="#collapse2" aria-expanded="false" aria-controls="collapseExample">Reply</a> | |
506 | + <div class="collapse" id="collapse2"> | |
507 | + <div class="md-form"> | |
508 | + <div class="form-group is-empty"><input type="text" id="form1" class="form-control" placeholder="comment on the cometary"></div><span class="input-group-btn"> | |
509 | + <button type="button" class="btn btn-sm"> | |
510 | + <i class="fa fa-paper-plane"> Send</i> | |
41 | 511 | </button> |
42 | - </span> | |
512 | + </span> | |
43 | 513 | </div> |
514 | + </div> | |
515 | + | |
516 | + | |
517 | + <!--/.Second row--> | |
518 | + | |
519 | + <!--Third row--> | |
520 | + <div class="row"> | |
521 | + | |
522 | + | |
523 | + <!--Content column--> | |
524 | + <div class="col-sm-10 col-xs-12"> | |
525 | + <h3 class="user-name">Gemozecleia</h3> | |
526 | + | |
527 | + <div class="card-data"> | |
528 | + <p class="comment-date"><i class="fa fa-clock-o"></i> 17/10/2015 | |
529 | + </p></div> | |
530 | + | |
531 | + <p class="comment-text">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa | |
532 | + qui officia. | |
533 | + </p> | |
44 | 534 | </div> |
45 | - </section> | |
535 | + <!--/.Content column--> | |
536 | + | |
537 | + </div> | |
538 | + <a class="btn btn-sm" style="float: right;" data-toggle="collapse" href="#collapse3" aria-expanded="false" aria-controls="collapseExample">Reply</a> | |
539 | + <div class="collapse" id="collapse3"> | |
540 | + <div class="md-form"> | |
541 | + <div class="form-group is-empty"><input type="text" id="form1" class="form-control" placeholder="comment on the cometary"></div><span class="input-group-btn"> | |
542 | + <button type="button" class="btn btn-sm"> | |
543 | + <i class="fa fa-paper-plane"> Send</i> | |
544 | + </button> | |
545 | + </span> | |
546 | + </div> | |
547 | + </div> | |
548 | + | |
549 | + <!--/.Third row--> | |
550 | + <div class="row"> | |
551 | + <div class="form-group is-empty"> | |
552 | + <div class="col-sm-10 col-xs-12"> | |
553 | + <input type="text" id="addon3a" class="form-control" placeholder="Add Comment"> | |
554 | + | |
555 | + <span class="input-group-btn"> | |
556 | + <button type="button" class="btn btn-fab btn-fab-mini"> | |
557 | + <i class="material-icons">send</i> | |
558 | + </button> | |
559 | + </span> | |
560 | + </div> | |
561 | + </div> | |
562 | + </div> | |
563 | + | |
564 | + </div> | |
565 | + <div class="modal-footer"> | |
566 | + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |
567 | + <button type="button" class="btn btn-primary">Save changes</button> | |
568 | + </div> | |
569 | + </div> | |
570 | + </div> | |
571 | + </div> | |
572 | + <!--EndForumModal--> | |
573 | + | |
574 | + <!-- MODAL LINK EDIT--> | |
575 | + <div class="modal fade" id="linksModalEdit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
576 | + <div class="modal-dialog" role="document"> | |
577 | + <div class="modal-content"> | |
578 | + <div class="modal-header"> | |
579 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
580 | + <h4 class="modal-title" id="myModalLabel">Links</h4> | |
581 | + </div> | |
582 | + <div class="modal-body"> | |
583 | + <!-- Card --> | |
584 | + <div class="form-group"> | |
585 | + <label class="control-label" for="inputDefault">Name</label> | |
586 | + <input value="Python" type="text" class="form-control" id="inputDefault"> | |
46 | 587 | </div> |
47 | - <div class="modal-footer"> | |
48 | - <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">{% trans 'Close' %}</button> | |
49 | - <button type="button" class="btn btn-primary btn-raised">{% trans 'Save changes' %}</button> | |
588 | + <div class="form-group"> | |
589 | + <label class="control-label" for="inputDefault">Url</label> | |
590 | + <input value="https://www.python.org/" type="text" class="form-control" id="inputDefault"> | |
50 | 591 | </div> |
592 | + <div class="form-group is-empty"> | |
593 | + <label class="control-label" for="inputDefault">Descrição</label> | |
594 | + <textarea class="form-control" rows="3"></textarea> | |
595 | + </div> | |
596 | + <div class="form-group"> | |
597 | + <a href="javascript:void(0)" class="btn btn-raised btn-default">Cancel</a> | |
598 | + <a href="javascript:void(0)" class="btn btn-raised btn-primary">Submit</a> | |
599 | + </div> | |
600 | + <!-- .end Card --> | |
601 | + </div> | |
51 | 602 | </div> |
603 | + </div> | |
604 | + </div> | |
605 | + <!-- EndModal --> | |
52 | 606 | </div> |
53 | -</div> | |
54 | 607 | \ No newline at end of file |
608 | + </div> | |
609 | + | |
610 | + | |
611 | + <div class="modal fade" id="createForum" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
612 | + <div class="modal-dialog" role="document"> | |
613 | + <div class="modal-content"> | |
614 | + <div class="modal-header"> | |
615 | + <h4 class="modal-title" id="myModalLabel">{% trans 'Forum' %}</h4> | |
616 | + </div> | |
617 | + <div class="modal-body"> | |
618 | + <section> | |
619 | + <div class="forum_form"></div> | |
620 | + </section> | |
621 | + </div> | |
622 | + <div class="modal-footer"> | |
623 | + <button type="button" class="btn btn-danger btn-raised" data-dismiss="modal">{% trans 'Close' %}</button> | |
624 | + <button type="button" onclick="$('#forum_create').submit();" class="btn btn-primary btn-raised">{% trans 'Create' %}</button> | |
625 | + </div> | |
626 | + </div> | |
627 | + </div> | |
628 | + </div> | |
55 | 629 | \ No newline at end of file | ... | ... |
courses/templates/subject/index.html
... | ... | @@ -36,27 +36,41 @@ |
36 | 36 | <div class="panel panel-info"> |
37 | 37 | <div class="panel-heading"> |
38 | 38 | <div class="row"> |
39 | - <div class="col-md-7 col-sm-7"> | |
39 | + <div class="col-md-9 col-sm-9"> | |
40 | 40 | <h3>{{subject}}</h3> |
41 | 41 | </div> |
42 | - <div class="col-md-2 col-sm-2"> | |
43 | - {% if user|has_role:'system_admin' or user in subject.professors %} | |
44 | - <a href="{% url 'course:update_subject' subject.slug%}" class="btn">{% trans "edit" %}</a> | |
45 | - {% endif %} | |
46 | - </div> | |
47 | - <div class="col-md-3 col-sm-3"> | |
48 | - {% if user|has_role:'system_admin' or user in subject.professors %} | |
49 | - <a href="{% url 'course:delete_subject' subject.slug%}" class="btn">{% trans "delete" %}</a> | |
50 | - {% endif %} | |
51 | - </div> | |
42 | + {% if user|has_role:'system_admin' or user in subject.professors %} | |
43 | + <div class="col-xs-4 col-md-3 divMoreActions"> | |
44 | + <div class="btn-group"> | |
45 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
46 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
47 | + </button> | |
48 | + <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | |
49 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal4"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> | |
50 | + <li><a href="{% url 'course:update_subject' subject.slug %}" data-toggle="modal" data-target="#editSubject"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | |
51 | + <li><a href="{% url 'course:delete_subject' subject.slug %}" data-toggle="modal" data-target="#removeSubject"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> | |
52 | + </ul> | |
53 | + </div> | |
54 | + </div> | |
55 | + {% endif %} | |
52 | 56 | </div> |
53 | 57 | </div> |
54 | 58 | <div class="panel-body"> |
55 | - <p> | |
56 | - {{subject.description|linebreaks}} | |
57 | - </p> | |
58 | - </div> | |
59 | - </div> | |
59 | + <p><b>Professor:</b> {{subject.professors}}</p> | |
60 | + <p> | |
61 | + <b>Description:</b> | |
62 | + {{subject.description|linebreaks}} | |
63 | + </p> | |
64 | + <div class="row"> | |
65 | + <div class="col-xs-6 col-md-6"> | |
66 | + <p><b>Begining:</b> {{subject.init_date}}</p> | |
67 | + </div> | |
68 | + <div class="col-xs-6 col-md-6"> | |
69 | + <p><b>End:</b> {{subject.end_date}}</p> | |
70 | + </div> | |
71 | + </div> | |
72 | + </div> | |
73 | + </div> | |
60 | 74 | |
61 | 75 | {% for topic in topics %} |
62 | 76 | {% if user|has_role:'system_admin' or topic.owner == user%} |
... | ... | @@ -67,19 +81,9 @@ |
67 | 81 | {% endfor %} |
68 | 82 | |
69 | 83 | {% if user|has_role:'system_admin' or topic.owner == user%} |
70 | - <a name="create_topic" class="btn btn-primary btn-md btn-block" href="{% url 'course:create_topic' subject.slug %}">{% trans "Create Topic" %}</a> | |
84 | + <div class="form-group"> | |
85 | + <a href="{% url 'course:create_topic' subject.slug %}" data-toggle="modal" data-target="" class="btn btn-primary btn-lg btn-block btn-raised" name="create_topic">{% trans "Create Topic" %}<div class="ripple-container"></div></a> | |
86 | + </div> | |
71 | 87 | {% endif %} |
72 | 88 | |
73 | 89 | {% endblock %} |
74 | - | |
75 | -{% block rightbar %} | |
76 | - | |
77 | - <div class="panel panel-warning"> | |
78 | - <div class="panel-heading"> | |
79 | - <h3 class="panel-title">{% trans "Pending Stuffs" %}</h3> | |
80 | - </div> | |
81 | - <div class="panel-body"> | |
82 | - | |
83 | - </div> | |
84 | - </div> | |
85 | -{% endblock rightbar %} | ... | ... |
... | ... | @@ -0,0 +1,18 @@ |
1 | +{% load static i18n permission_tags%} | |
2 | + | |
3 | +<script src="{% static 'js/modals_requisitions.js'%}"></script> | |
4 | +<script src="{% static 'js/modal_poll.js'%}"></script> | |
5 | + | |
6 | +{% if request.user|has_role:'professor, system_admin'%} | |
7 | +{% for poll in polls %} | |
8 | + <li id="poll_{{poll.slug}}"><i class="material-icons">poll</i> <a href="javascript:get('{% url 'course:poll:update_poll' poll.slug %}','#poll','#modal_poll');">{{ poll.name }}</a><a href="javascript:get('{% url 'course:poll:delete_poll' poll.slug %}','#poll','#modal_poll');"><span class="glyphicon glyphicon-remove"></span></a></li> | |
9 | +{% endfor %} | |
10 | +<button class="btn btn-primary btn-raised" onclick="javascript:get('{% url 'course:poll:create_poll' topic.slug%}','#poll','#modal_poll');">{% trans '+ Create Poll' %}</button> | |
11 | +{% else %} | |
12 | +{% for poll in polls %} | |
13 | + <li id="poll_{{poll.slug}}"><i class="material-icons">poll</i> <a href="javascript:get('{% url 'course:poll:view_poll' poll.slug %}','#poll','#modal_poll');">{{ poll.name }}</a></li> | |
14 | +{% endfor %} | |
15 | +{% endif %} | |
16 | +<div class="row" id="modal_poll"> | |
17 | + | |
18 | +</div> | ... | ... |
courses/templates/subject_category/index.html
... | ... | @@ -63,15 +63,3 @@ |
63 | 63 | |
64 | 64 | |
65 | 65 | {% endblock %} |
66 | - | |
67 | -{% block rightbar %} | |
68 | - | |
69 | - <div class="panel panel-warning"> | |
70 | - <div class="panel-heading"> | |
71 | - <h3 class="panel-title">{% trans "Pending Stuffs" %}</h3> | |
72 | - </div> | |
73 | - <div class="panel-body"> | |
74 | - | |
75 | - </div> | |
76 | - </div> | |
77 | -{% endblock rightbar %} | |
78 | 66 | \ No newline at end of file | ... | ... |
courses/templates/topic/index.html
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | {% else %} |
13 | 13 | <li class="active">{{ topic.name }}</li> |
14 | 14 | {% endif %} |
15 | - | |
15 | + | |
16 | 16 | </ol> |
17 | 17 | {% endblock %} |
18 | 18 | |
... | ... | @@ -50,19 +50,23 @@ |
50 | 50 | <div class="panel panel-info"> |
51 | 51 | <div class="panel-heading"> |
52 | 52 | <div class="row"> |
53 | - <div class="col-md-7 col-sm-7"> | |
53 | + <div class="col-md-10 col-sm-7"> | |
54 | 54 | <h3>{{subject}}</h3> |
55 | 55 | </div> |
56 | - <div class="col-md-2 col-sm-2"> | |
57 | - {% if user|has_role:'system_admin' or user in subject.professors %} | |
58 | - <a href="{% url 'course:update_subject' subject.slug%}" class="btn">{% trans "edit" %}</a> | |
59 | - {% endif %} | |
60 | - </div> | |
61 | - <div class="col-md-3 col-sm-3"> | |
62 | - {% if user|has_role:'system_admin' or user in subject.professors %} | |
63 | - <a href="{% url 'course:delete_subject' subject.slug%}" class="btn">{% trans "delete" %}</a> | |
64 | - {% endif %} | |
65 | - </div> | |
56 | + <div class="col-xs-4 col-md-2 divMoreActions"> | |
57 | + {% if user|has_role:'system_admin' or user in subject.professors %} | |
58 | + <div class="btn-group"> | |
59 | + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
60 | + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | |
61 | + </button> | |
62 | + <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | |
63 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal4"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> | |
64 | + <li><a href="{% url 'course:update_subject' subject.slug %}" data-toggle="modal" data-target="#editSubject"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | |
65 | + <li><a href="{% url 'course:delete_subject' subject.slug %}" data-toggle="modal" data-target="#removeSubject"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> | |
66 | + </ul> | |
67 | + </div> | |
68 | + {% endif %} | |
69 | + </div> | |
66 | 70 | </div> |
67 | 71 | </div> |
68 | 72 | <div class="panel-body"> |
... | ... | @@ -73,116 +77,61 @@ |
73 | 77 | </div> |
74 | 78 | <div class="panel panel-default"> |
75 | 79 | <div class="panel-body"> |
76 | - <form class="form-horizontal"> | |
80 | + {% for activit in activitys %} | |
81 | + <form class="form-horizontal" enctype='multipart/form-data'>{% csrf_token %} | |
77 | 82 | <fieldset> |
78 | - <legend>Atividade 1</legend> | |
83 | + <legend>{{activit.name}}</legend> | |
79 | 84 | |
80 | 85 | <div class="container-fluid"> |
81 | 86 | <div class="row"> |
82 | - <div class="col-md-4"> | |
83 | - | |
87 | + <div class="col-md-8"> | |
84 | 88 | <div class="form-group is-empty"> |
85 | - <input type="text" class="form-control col-md-8" placeholder="Search Student"> | |
89 | + <input type="text" class="form-control col-md-4" placeholder="Search Student"> | |
86 | 90 | </div> |
87 | - | |
88 | - </div> | |
89 | - </div> | |
91 | + </div> | |
92 | + </div> | |
93 | + {% for student in students_activit %} | |
90 | 94 | <div class="panel-group" id="accordion"> |
91 | 95 | <div class="panel panel-info"> |
92 | 96 | <div class="panel-heading"> |
93 | 97 | <h4 class="panel-title"> |
94 | 98 | <a data-toggle="collapse" data-parent="#accordion" href="#collapse1"> |
95 | - Aluno Maria<i class="fa fa-plus-square" aria-hidden="true"></i></a> | |
99 | + {{student.name}} <i class="fa fa-plus-square" aria-hidden="true"></i></a> | |
96 | 100 | </h4> |
97 | 101 | </div> |
98 | 102 | <div id="collapse1" class="panel-collapse collapse"> |
99 | 103 | <div class="panel-body"> |
100 | 104 | <div class="row"> |
101 | - <div class="col-md-6"> | |
102 | - <i class="fa fa-file-archive-o fa-lg" aria-hidden="true">Atividade.doc</i> | |
103 | - | |
105 | + <div class="col-md-4"> | |
106 | + <i class="fa fa-file-archive-o fa-lg" aria-hidden="true">Atividade.doc</i> | |
104 | 107 | </div> |
105 | - <div class="col-md-6"> | |
106 | - <label> Nota:</label> | |
107 | - <input type="number" step="0.01"> | |
108 | - </div> | |
108 | + {% if user|has_role:'professor, system_admin' %} | |
109 | + <div class="col-md-4"> | |
110 | + <label> Nota:</label> | |
111 | + <input type="number" step="0.01"> | |
112 | + </div> | |
113 | + {% else %} | |
114 | + <div class="col-md-4"> | |
115 | + <!--<input type="hidden" name="id" value=""> | |
116 | + <input type="hidden" name="student" value="">--> | |
117 | + <div class="form-group {% if form.pdf.errors %} has-error {% endif %}"> | |
118 | + {{ form.as_p }} | |
119 | + </div> | |
120 | + <button type="submit" class="btn btn-success" id="send_button">Enviar</button> | |
121 | + </div> | |
122 | + {% endif %} | |
109 | 123 | </div> |
110 | 124 | </div> |
111 | 125 | </div> |
112 | 126 | </div> |
113 | - <div class="panel panel-info"> | |
114 | - <div class="panel-heading"> | |
115 | - <h4 class="panel-title"> | |
116 | - <a data-toggle="collapse" data-parent="#accordion" href="#collapse2"> | |
117 | - Aluno Joao<i class="fa fa-plus-square" aria-hidden="true"></i></a> | |
118 | - </h4> | |
119 | - </div> | |
120 | - <div id="collapse2" class="panel-collapse collapse"> | |
121 | - <div class="panel-body"> | |
122 | - <div class="row"> | |
123 | - <div class="col-md-6"> | |
124 | - <i class="fa fa-file-archive-o fa-lg" aria-hidden="true">Atividade.doc</i> | |
125 | - | |
126 | - </div> | |
127 | - <div class="col-md-6"> | |
128 | - <label> Nota:</label> | |
129 | - <input type="number" step="0.01"> | |
130 | - </div> | |
131 | - </div> | |
132 | - | |
133 | - </div> | |
134 | - </div> | |
135 | - </div> | |
136 | - <div class="panel panel-info"> | |
137 | - <div class="panel-heading"> | |
138 | - <h4 class="panel-title"> | |
139 | - <a data-toggle="collapse" data-parent="#accordion" href="#collapse3"> | |
140 | - Aluno Santos<i class="fa fa-plus-square" aria-hidden="true"></i></a> | |
141 | - </h4> | |
142 | - </div> | |
143 | - <div id="collapse3" class="panel-collapse collapse"> | |
144 | - <div class="panel-body"> | |
145 | - <div class="row"> | |
146 | - <div class="col-md-6"> | |
147 | - <i class="fa fa-file-archive-o fa-lg" aria-hidden="true">Atividade.doc</i> | |
148 | - | |
149 | - </div> | |
150 | - <div class="col-md-6"> | |
151 | - <label> Nota:</label> | |
152 | - <input type="number" step="0.01"> | |
153 | - </div> | |
154 | - </div> | |
155 | - </div> | |
156 | - </div> | |
157 | - </div> | |
158 | - <div class="panel panel-info"> | |
159 | - <div class="panel-heading"> | |
160 | - <h4 class="panel-title"> | |
161 | - <a data-toggle="collapse" data-parent="#accordion" href="#collapse4"> | |
162 | - Aluno Ruam<i class="fa fa-plus-square" aria-hidden="true"></i></a> | |
163 | - </h4> | |
164 | - </div> | |
165 | - <div id="collapse4" class="panel-collapse collapse"> | |
166 | - <div class="panel-body"> | |
167 | - <div class="row"> | |
168 | - <div class="col-md-6"> | |
169 | - <i class="fa fa-file-archive-o fa-lg" aria-hidden="true">Atividade.doc</i> | |
170 | - | |
171 | - </div> | |
172 | - <div class="col-md-6"> | |
173 | - <label> Nota:</label> | |
174 | - <input type="number" step="0.01"> | |
175 | 127 | </div> |
128 | + {% endfor %} | |
176 | 129 | </div> |
177 | - | |
178 | - </div> | |
179 | - </div> | |
180 | - </div> | |
181 | - | |
182 | -</div> | |
183 | -</div> | |
184 | - | |
185 | -</fieldset></form> | |
130 | + </fieldset> | |
131 | + </form> | |
132 | +{% empty %} | |
133 | + {% trans 'No activity found' %} | |
134 | +{% endfor %} | |
186 | 135 | |
187 | 136 | <ul class="pagination pagination-sm"> |
188 | 137 | <li class="disabled"><a href="javascript:void(0)">«</a></li> |
... | ... | @@ -200,15 +149,3 @@ |
200 | 149 | </div> |
201 | 150 | </div> |
202 | 151 | {% endblock %} |
203 | - | |
204 | -{% block rightbar %} | |
205 | - | |
206 | - <div class="panel panel-warning"> | |
207 | - <div class="panel-heading"> | |
208 | - <h3 class="panel-title">{% trans "Pending Stuffs" %}</h3> | |
209 | - </div> | |
210 | - <div class="panel-body"> | |
211 | - | |
212 | - </div> | |
213 | - </div> | |
214 | -{% endblock rightbar %} | ... | ... |
courses/templates/topic/list_topic_foruns.html
1 | 1 | {% for forum in foruns %} |
2 | - <a href="javascript:showForum('{% url 'forum:index' %}', '{{forum.id}}')">{{ forum }}</a><br /> | |
2 | + <li><i class="fa fa-commenting" aria-hidden="true"></i> <a id="forum_{{ forum.id }}" href="{% url 'course:forum:view' forum.slug %}"> {{ forum }}</a></li> | |
3 | 3 | {% endfor %} |
4 | 4 | \ No newline at end of file | ... | ... |
courses/templatetags/list_topic_foruns.py
1 | 1 | from django import template |
2 | 2 | |
3 | 3 | from forum.models import Forum |
4 | - | |
4 | +from poll.models import Poll | |
5 | 5 | register = template.Library() |
6 | 6 | |
7 | 7 | """ |
... | ... | @@ -16,4 +16,15 @@ def list_topic_foruns(request, topic): |
16 | 16 | |
17 | 17 | context['foruns'] = Forum.objects.filter(topic = topic) |
18 | 18 | |
19 | - return context | |
20 | 19 | \ No newline at end of file |
20 | + return context | |
21 | + | |
22 | +@register.inclusion_tag('subject/poll_item_actions.html') | |
23 | +def list_topic_poll(request, topic): | |
24 | + context = { | |
25 | + 'request': request, | |
26 | + } | |
27 | + | |
28 | + context['polls'] = Poll.objects.filter(topic = topic) | |
29 | + context['topic'] = topic | |
30 | + | |
31 | + return context | ... | ... |
courses/urls.py
1 | -from django.conf.urls import url | |
1 | +from django.conf.urls import url, include | |
2 | 2 | |
3 | 3 | from . import views |
4 | - | |
4 | +from links import views as linkviews | |
5 | 5 | urlpatterns = [ |
6 | 6 | url(r'^$', views.IndexView.as_view(), name='manage'), |
7 | 7 | url(r'^create/$', views.CreateCourseView.as_view(), name='create'), |
... | ... | @@ -20,8 +20,14 @@ urlpatterns = [ |
20 | 20 | url(r'^subjects/delete/(?P<slug>[\w_-]+)/$', views.DeleteSubjectView.as_view(), name='delete_subject'), |
21 | 21 | url(r'^topics/create/(?P<slug>[\w_-]+)/$', views.CreateTopicView.as_view(), name='create_topic'), |
22 | 22 | url(r'^topics/update/(?P<slug>[\w_-]+)/$', views.UpdateTopicView.as_view(), name='update_topic'), |
23 | + url(r'^topics/createlink/$', linkviews.CreateLink.as_view(),name = 'create_link'), | |
24 | + url(r'^topics/deletelink/(?P<linkname>[\w_-]+)/$', linkviews.deleteLink,name = 'delete_link'), | |
23 | 25 | url(r'^topics/(?P<slug>[\w_-]+)/$', views.TopicsView.as_view(), name='view_topic'), |
24 | 26 | url(r'^subjects/categories$',views.IndexSubjectCategoryView.as_view(), name='subject_category_index'), |
25 | - url(r'^to/poll/to/$', views.Poll.as_view(), name='poll'), | |
27 | + url(r'^forum/', include('forum.urls', namespace = 'forum')), | |
28 | + url(r'^poll/', include('poll.urls', namespace = 'poll')), | |
29 | + url(r'^exam/', include('exam.urls', namespace = 'exam')), | |
30 | + | |
31 | + | |
26 | 32 | |
27 | 33 | ] | ... | ... |
courses/views.py
... | ... | @@ -2,7 +2,7 @@ from django.shortcuts import render, get_object_or_404, redirect |
2 | 2 | from django.views import generic |
3 | 3 | from django.contrib import messages |
4 | 4 | from django.contrib.auth.decorators import login_required |
5 | -from django.core.paginator import Paginator, EmptyPage | |
5 | +from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger | |
6 | 6 | from django.contrib.auth.mixins import LoginRequiredMixin |
7 | 7 | from rolepermissions.mixins import HasRoleMixin |
8 | 8 | from django.core.urlresolvers import reverse_lazy |
... | ... | @@ -10,11 +10,13 @@ from django.utils.translation import ugettext_lazy as _ |
10 | 10 | from rolepermissions.verifications import has_role |
11 | 11 | from django.db.models import Q |
12 | 12 | from rolepermissions.verifications import has_object_permission |
13 | +from django.http import HttpResponseRedirect | |
13 | 14 | |
14 | -from .forms import CourseForm, UpdateCourseForm, CategoryForm, SubjectForm,TopicForm | |
15 | -from .models import Course, Subject, Category,Topic, SubjectCategory | |
15 | +from .forms import CourseForm, UpdateCourseForm, CategoryCourseForm, SubjectForm,TopicForm,ActivityForm | |
16 | +from .models import Course, Subject, CourseCategory,Topic, SubjectCategory,Activity | |
16 | 17 | from core.mixins import NotificationMixin |
17 | 18 | from users.models import User |
19 | +from files.forms import FileForm | |
18 | 20 | |
19 | 21 | from datetime import date |
20 | 22 | |
... | ... | @@ -25,16 +27,55 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): |
25 | 27 | queryset = Course.objects.all() |
26 | 28 | template_name = 'course/index.html' |
27 | 29 | context_object_name = 'courses' |
28 | - paginate_by = 3 | |
30 | + paginate_by = 2 | |
29 | 31 | |
30 | 32 | def get_context_data(self, **kwargs): |
31 | 33 | context = super(IndexView, self).get_context_data(**kwargs) |
32 | - context['categories'] = Category.objects.all() | |
34 | + list_courses = None | |
35 | + categorys_courses = None | |
36 | + if has_role(self.request.user,'professor') or has_role(self.request.user,'system_admin'): | |
37 | + list_courses = Course.objects.filter(professors__name = self.request.user.name).order_by('name') | |
38 | + categorys_courses = CourseCategory.objects.filter(course_category__professors__name = self.request.user.name).distinct() | |
39 | + else: | |
40 | + list_courses = Course.objects.filter(students__name = self.request.user.name) | |
41 | + categorys_courses = CourseCategory.objects.filter(course_category__students__name = self.request.user.name).distinct() | |
42 | + | |
43 | + courses_category = Course.objects.filter(category__name = self.request.GET.get('category')) | |
44 | + | |
45 | + none = None | |
46 | + q = self.request.GET.get('category', None) | |
47 | + if q is None: | |
48 | + none = True | |
49 | + context['none'] = none | |
50 | + | |
51 | + paginator = Paginator(list_courses, self.paginate_by) | |
52 | + page = self.request.GET.get('page') | |
53 | + | |
54 | + try: | |
55 | + list_courses = paginator.page(page) | |
56 | + except PageNotAnInteger: | |
57 | + list_courses = paginator.page(1) | |
58 | + except EmptyPage: | |
59 | + list_courses = paginator.page(paginator.num_pages) | |
60 | + | |
61 | + context['courses_category'] = courses_category | |
62 | + context['list_courses'] = list_courses | |
63 | + context['categorys_courses'] = categorys_courses | |
33 | 64 | |
34 | - # context['professors'] = Course.objects.all().select_related('professors__name') | |
35 | - # super.createNotification(users= User.obejcts.all(), message="testando a notificacao em login") | |
36 | 65 | return context |
37 | 66 | |
67 | + def get_queryset(self): | |
68 | + try: | |
69 | + name = self.kwargs['q'] | |
70 | + except: | |
71 | + name = '' | |
72 | + if (name != ''): | |
73 | + object_list = Course.objects.filter(name__icontains = name) | |
74 | + else: | |
75 | + object_list = Course.objects.all() | |
76 | + print(object_list) | |
77 | + return object_list | |
78 | + | |
38 | 79 | class CreateCourseView(LoginRequiredMixin, HasRoleMixin, NotificationMixin,generic.edit.CreateView): |
39 | 80 | |
40 | 81 | allowed_roles = ['professor', 'system_admin'] |
... | ... | @@ -178,13 +219,13 @@ class FilteredView(LoginRequiredMixin, generic.ListView): |
178 | 219 | paginate_by = 3 |
179 | 220 | |
180 | 221 | def get_queryset(self): |
181 | - category = get_object_or_404(Category, slug = self.kwargs.get('slug')) | |
222 | + category = get_object_or_404(CourseCategory, slug = self.kwargs.get('slug')) | |
182 | 223 | return Course.objects.filter(category = category) |
183 | 224 | |
184 | 225 | def get_context_data(self, **kwargs): |
185 | - category = get_object_or_404(Category, slug = self.kwargs.get('slug')) | |
226 | + category = get_object_or_404(CourseCategory, slug = self.kwargs.get('slug')) | |
186 | 227 | context = super(FilteredView, self).get_context_data(**kwargs) |
187 | - context['categories'] = Category.objects.all() | |
228 | + context['categories'] = CourseCategory.objects.all() | |
188 | 229 | context['cat'] = category |
189 | 230 | |
190 | 231 | return context |
... | ... | @@ -193,10 +234,9 @@ class IndexCatView(LoginRequiredMixin, generic.ListView): |
193 | 234 | |
194 | 235 | login_url = reverse_lazy("core:home") |
195 | 236 | redirect_field_name = 'next' |
196 | - queryset = Category.objects.all() | |
237 | + queryset = CourseCategory.objects.all() | |
197 | 238 | template_name = 'category/index.html' |
198 | 239 | context_object_name = 'categories' |
199 | - paginate_by = 3 | |
200 | 240 | |
201 | 241 | class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): |
202 | 242 | |
... | ... | @@ -204,13 +244,12 @@ class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): |
204 | 244 | login_url = reverse_lazy("core:home") |
205 | 245 | redirect_field_name = 'next' |
206 | 246 | template_name = 'category/create.html' |
207 | - form_class = CategoryForm | |
247 | + form_class = CategoryCourseForm | |
208 | 248 | success_url = reverse_lazy('course:manage_cat') |
209 | 249 | |
210 | - def render_to_response(self, context, **response_kwargs): | |
250 | + def get_success_url(self): | |
211 | 251 | messages.success(self.request, _('Category created successfully!')) |
212 | - | |
213 | - return self.response_class(request=self.request, template=self.get_template_names(), context=context, using=self.template_engine) | |
252 | + return reverse_lazy('course:manage_cat') | |
214 | 253 | |
215 | 254 | class UpdateCatView(LoginRequiredMixin, HasRoleMixin, generic.UpdateView): |
216 | 255 | |
... | ... | @@ -218,19 +257,17 @@ class UpdateCatView(LoginRequiredMixin, HasRoleMixin, generic.UpdateView): |
218 | 257 | login_url = reverse_lazy("core:home") |
219 | 258 | redirect_field_name = 'next' |
220 | 259 | template_name = 'category/update.html' |
221 | - model = Category | |
222 | - form_class = CategoryForm | |
223 | - success_url = reverse_lazy('course:manage_cat') | |
224 | - | |
225 | - def render_to_response(self, context, **response_kwargs): | |
226 | - messages.success(self.request, _('Category edited successfully!')) | |
260 | + model = CourseCategory | |
261 | + form_class = CategoryCourseForm | |
227 | 262 | |
228 | - return self.response_class(request=self.request, template=self.get_template_names(), context=context, using=self.template_engine) | |
263 | + def get_success_url(self): | |
264 | + messages.success(self.request, _('Category updated successfully!')) | |
265 | + return reverse_lazy('course:update_cat', kwargs={'slug' : self.object.slug}) | |
229 | 266 | |
230 | 267 | class ViewCat(LoginRequiredMixin, generic.DetailView): |
231 | 268 | login_url = reverse_lazy("core:home") |
232 | 269 | redirect_field_name = 'next' |
233 | - model = Category | |
270 | + model = CourseCategory | |
234 | 271 | template_name = 'category/view.html' |
235 | 272 | context_object_name = 'category' |
236 | 273 | |
... | ... | @@ -239,14 +276,12 @@ class DeleteCatView(LoginRequiredMixin, HasRoleMixin, generic.DeleteView): |
239 | 276 | allowed_roles = ['professor', 'system_admin'] |
240 | 277 | login_url = reverse_lazy("core:home") |
241 | 278 | redirect_field_name = 'next' |
242 | - model = Category | |
279 | + model = CourseCategory | |
243 | 280 | template_name = 'category/delete.html' |
244 | - success_url = reverse_lazy('course:manage_cat') | |
245 | 281 | |
246 | - def render_to_response(self, context, **response_kwargs): | |
282 | + def get_success_url(self): | |
247 | 283 | messages.success(self.request, _('Category deleted successfully!')) |
248 | - | |
249 | - return self.response_class(request=self.request, template=self.get_template_names(), context=context, using=self.template_engine) | |
284 | + return reverse_lazy('course:manage_cat') | |
250 | 285 | |
251 | 286 | class SubjectsView(LoginRequiredMixin, generic.ListView): |
252 | 287 | |
... | ... | @@ -269,6 +304,7 @@ class SubjectsView(LoginRequiredMixin, generic.ListView): |
269 | 304 | context = super(SubjectsView, self).get_context_data(**kwargs) |
270 | 305 | context['course'] = subject.course |
271 | 306 | context['subject'] = subject |
307 | + context['form_file'] = FileForm | |
272 | 308 | context['topics'] = Topic.objects.filter(subject = subject) |
273 | 309 | return context |
274 | 310 | |
... | ... | @@ -283,18 +319,27 @@ class TopicsView(LoginRequiredMixin, generic.ListView): |
283 | 319 | def get_queryset(self): |
284 | 320 | topic = get_object_or_404(Topic, slug = self.kwargs.get('slug')) |
285 | 321 | subject = topic.subject |
286 | - context = Topic.objects.filter(subject = subject, visible=True) | |
322 | + topics_q = Topic.objects.filter(subject = subject, visible=True) | |
287 | 323 | #if (self.request.user in subject.professors.all() or has_role(self.request.user,'system_admin')): |
288 | 324 | #context = subject.topics.all() <- Change it By Activities |
289 | - return context | |
325 | + return topics_q | |
290 | 326 | |
291 | 327 | def get_context_data(self, **kwargs): |
292 | 328 | topic = get_object_or_404(Topic, slug = self.kwargs.get('slug')) |
293 | 329 | context = super(TopicsView, self).get_context_data(**kwargs) |
330 | + activitys = Activity.objects.filter(topic__name = topic.name) | |
331 | + students_activit = User.objects.filter(activities__in = Activity.objects.all()) | |
332 | + # page_user = User.objects.get(id= self.kwargs['user_id']) | |
294 | 333 | context['topic'] = topic |
295 | 334 | context['subject'] = topic.subject |
335 | + context['activitys'] = activitys | |
336 | + context['students_activit'] = students_activit | |
337 | + context['form'] = ActivityForm | |
338 | + # context['user_activity_id'] = Activity.objects.filter(students__id = self.kwargs['students_id']) | |
339 | + # context['page_user'] = page_user | |
296 | 340 | return context |
297 | 341 | |
342 | + | |
298 | 343 | class CreateTopicView(LoginRequiredMixin, HasRoleMixin, NotificationMixin, generic.edit.CreateView): |
299 | 344 | |
300 | 345 | allowed_roles = ['professor', 'system_admin'] |
... | ... | @@ -339,7 +384,7 @@ class UpdateTopicView(LoginRequiredMixin, HasRoleMixin, generic.UpdateView): |
339 | 384 | return super(UpdateTopicView, self).dispatch(*args, **kwargs) |
340 | 385 | |
341 | 386 | def get_object(self, queryset=None): |
342 | - return get_object_or_404(Topic, slug = self.kwargs.get('slug')) | |
387 | + return get_object_or_404(Topic, slug = self.kwargs.get('slug')) | |
343 | 388 | |
344 | 389 | def get_success_url(self): |
345 | 390 | return reverse_lazy('course:view_subject', kwargs={'slug' : self.object.subject.slug}) |
... | ... | @@ -455,27 +500,3 @@ class IndexSubjectCategoryView(LoginRequiredMixin, generic.ListView): |
455 | 500 | context = super(IndexSubjectCategoryView, self).get_context_data(**kwargs) |
456 | 501 | context['subject_categories'] = SubjectCategory.objects.all() |
457 | 502 | return context |
458 | - | |
459 | - | |
460 | -class Poll(generic.TemplateView): | |
461 | - | |
462 | - # login_url = reverse_lazy("core:home") | |
463 | - # redirect_field_name = 'next' | |
464 | - # model = Course | |
465 | - # context_object_name = 'course' | |
466 | - template_name = 'poll/poll.html' | |
467 | - # queryset = Course.objects.all() | |
468 | - | |
469 | - # def get_queryset(self): | |
470 | - # return Course.objects.all()[0] | |
471 | - | |
472 | - def get_context_data(self, **kwargs): | |
473 | - context = super(Poll, self).get_context_data(**kwargs) | |
474 | - course = Course.objects.all()[0] | |
475 | - context['course'] = course | |
476 | - context['subject'] = course.subjects.all()[0] | |
477 | - context['subjects'] = course.subjects.all() | |
478 | - # if (has_role(self.request.user,'system_admin')): | |
479 | - # context['subjects'] = self.object.course.subjects.all() | |
480 | - return context | |
481 | - | ... | ... |
... | ... | @@ -0,0 +1,14 @@ |
1 | +from django.contrib import admin | |
2 | + | |
3 | +from .models import Exam, Answer | |
4 | + | |
5 | +class ExamAdmin(admin.ModelAdmin): | |
6 | + list_display = ['name', 'slug','begin_date','limit_date'] | |
7 | + search_fields = ['name','slug'] | |
8 | + | |
9 | +class AnswerAdmin(admin.ModelAdmin): | |
10 | + list_display = ['answer','order'] | |
11 | + search_fields = ['answer'] | |
12 | + | |
13 | +admin.site.register(Exam, ExamAdmin) | |
14 | +admin.site.register(Answer, AnswerAdmin) | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +from django.utils.translation import ugettext_lazy as _ | |
2 | +from django import forms | |
3 | +from .models import Exam | |
4 | + | |
5 | +class ExamForm(forms.ModelForm): | |
6 | + def clean_end_date(self): | |
7 | + begin_date = self.data['begin_date'] | |
8 | + limit_date = self.data['limit_date'] | |
9 | + | |
10 | + if begin_date and limit_date and limit_date < begin_date: | |
11 | + raise forms.ValidationError(_('The end date may not be before the start date.')) | |
12 | + return endDate | |
13 | + | |
14 | + | |
15 | + class Meta: | |
16 | + model = Exam | |
17 | + fields = ['name','begin_date','limit_date'] | |
18 | + | |
19 | + widgets = { | |
20 | + 'name': forms.TextInput(attrs={'placeholder': 'Exam?'}), | |
21 | + 'begin_date': forms.DateTimeInput(attrs={'placeholder': _('Start date to resolve the exam')}), | |
22 | + 'limit_date': forms.DateTimeInput(attrs={'placeholder': _('Finish date permited to resolve the exam')}), | |
23 | + } | ... | ... |
... | ... | @@ -0,0 +1,48 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-10-06 19:57 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.db import migrations, models | |
6 | +import django.db.models.deletion | |
7 | + | |
8 | + | |
9 | +class Migration(migrations.Migration): | |
10 | + | |
11 | + initial = True | |
12 | + | |
13 | + dependencies = [ | |
14 | + ] | |
15 | + | |
16 | + operations = [ | |
17 | + migrations.CreateModel( | |
18 | + name='Answer', | |
19 | + fields=[ | |
20 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
21 | + ('answer', models.CharField(max_length=200, verbose_name='Answer')), | |
22 | + ('order', models.PositiveSmallIntegerField(verbose_name='Order')), | |
23 | + ], | |
24 | + options={ | |
25 | + 'verbose_name_plural': 'Answers', | |
26 | + 'ordering': ('order',), | |
27 | + 'verbose_name': 'Answer', | |
28 | + }, | |
29 | + ), | |
30 | + migrations.CreateModel( | |
31 | + name='Exam', | |
32 | + fields=[ | |
33 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
34 | + ('name', models.CharField(max_length=100, verbose_name='Name')), | |
35 | + ('beginDate', models.DateTimeField(auto_now_add=True, verbose_name='Start Date')), | |
36 | + ('endDate', models.DateTimeField(auto_now=True, verbose_name='Date of last update')), | |
37 | + ], | |
38 | + options={ | |
39 | + 'verbose_name_plural': 'Exams', | |
40 | + 'verbose_name': 'Exam', | |
41 | + }, | |
42 | + ), | |
43 | + migrations.AddField( | |
44 | + model_name='answer', | |
45 | + name='exam', | |
46 | + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='exam.Exam', verbose_name='Answers'), | |
47 | + ), | |
48 | + ] | ... | ... |
... | ... | @@ -0,0 +1,50 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-10-13 23:47 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.db import migrations, models | |
6 | +import django.db.models.deletion | |
7 | + | |
8 | + | |
9 | +class Migration(migrations.Migration): | |
10 | + | |
11 | + dependencies = [ | |
12 | + ('courses', '0005_file'), | |
13 | + ('exam', '0001_initial'), | |
14 | + ] | |
15 | + | |
16 | + operations = [ | |
17 | + migrations.RemoveField( | |
18 | + model_name='exam', | |
19 | + name='beginDate', | |
20 | + ), | |
21 | + migrations.RemoveField( | |
22 | + model_name='exam', | |
23 | + name='endDate', | |
24 | + ), | |
25 | + migrations.RemoveField( | |
26 | + model_name='exam', | |
27 | + name='id', | |
28 | + ), | |
29 | + migrations.RemoveField( | |
30 | + model_name='exam', | |
31 | + name='name', | |
32 | + ), | |
33 | + migrations.AddField( | |
34 | + model_name='exam', | |
35 | + name='activity_ptr', | |
36 | + field=models.OneToOneField(auto_created=True, default=None, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='courses.Activity'), | |
37 | + preserve_default=False, | |
38 | + ), | |
39 | + migrations.AddField( | |
40 | + model_name='exam', | |
41 | + name='begin_date', | |
42 | + field=models.DateField(default=None, verbose_name='Begin of Course Date'), | |
43 | + preserve_default=False, | |
44 | + ), | |
45 | + migrations.AlterField( | |
46 | + model_name='answer', | |
47 | + name='answer', | |
48 | + field=models.CharField(max_length=300, verbose_name='Answer'), | |
49 | + ), | |
50 | + ] | ... | ... |
... | ... | @@ -0,0 +1,30 @@ |
1 | +from django.utils.translation import ugettext_lazy as _ | |
2 | +from django.db import models | |
3 | +from autoslug.fields import AutoSlugField | |
4 | +from users.models import User | |
5 | +from core.models import Resource | |
6 | +from courses.models import Activity | |
7 | + | |
8 | +class Exam(Activity): | |
9 | + begin_date = models.DateField(_('Begin of Course Date')) | |
10 | + | |
11 | + class Meta: | |
12 | + verbose_name = _('Exam') | |
13 | + verbose_name_plural = _('Exams') | |
14 | + | |
15 | + def __str__(self): | |
16 | + return str(self.name) + str("/") + str(self.topic) | |
17 | + | |
18 | + | |
19 | +class Answer(models.Model): | |
20 | + answer = models.CharField(_("Answer"), max_length = 300) | |
21 | + order = models.PositiveSmallIntegerField(_("Order")) | |
22 | + exam = models.ForeignKey(Exam, verbose_name = _('Answers'), related_name='answers') | |
23 | + | |
24 | + class Meta: | |
25 | + ordering = ('order',) | |
26 | + verbose_name = _('Answer') | |
27 | + verbose_name_plural = _('Answers') | |
28 | + | |
29 | + def __str__(self): | |
30 | + return str(self.answer) + str("/") + str(self.poll) | ... | ... |
... | ... | @@ -0,0 +1,12 @@ |
1 | +from rolepermissions.permissions import register_object_checker | |
2 | +from amadeus.roles import SystemAdmin | |
3 | + | |
4 | +@register_object_checker() | |
5 | +def edit_exam(role, user, exam): | |
6 | + if (role == SystemAdmin): | |
7 | + return True | |
8 | + | |
9 | + if (user in exam.topic.subject.professors.all()): | |
10 | + return True | |
11 | + | |
12 | + return False | ... | ... |
... | ... | @@ -0,0 +1,10 @@ |
1 | +from django.conf.urls import url | |
2 | + | |
3 | +from . import views | |
4 | + | |
5 | +urlpatterns = [ | |
6 | + url(r'^create/(?P<slug>[\w\-_]+)/$', views.CreateExam.as_view(), name='create_exam'), | |
7 | + url(r'^update/(?P<slug>[\w\-_]+)/$', views.UpdateExam.as_view(), name='update_exam'), | |
8 | + url(r'^view/(?P<slug>[\w\-_]+)/$', views.ViewExam.as_view(), name='view_exam'), | |
9 | + url(r'^delete/(?P<slug>[\w\-_]+)/$', views.DeleteExam.as_view(), name='delete_exam'), | |
10 | +] | ... | ... |
... | ... | @@ -0,0 +1,208 @@ |
1 | +from django.shortcuts import render, get_object_or_404, redirect | |
2 | +from django.views import generic | |
3 | +from django.contrib.auth.decorators import login_required | |
4 | +from django.core.paginator import Paginator, EmptyPage | |
5 | +from django.contrib.auth.mixins import LoginRequiredMixin | |
6 | +from rolepermissions.mixins import HasRoleMixin | |
7 | +from django.core.urlresolvers import reverse_lazy | |
8 | +from django.utils.translation import ugettext_lazy as _ | |
9 | +from rolepermissions.verifications import has_role | |
10 | +from rolepermissions.verifications import has_object_permission | |
11 | +from django.db.models import Q | |
12 | +# from django.views.generic.edit import FormMixin | |
13 | + | |
14 | +from .forms import ExamForm | |
15 | +from .models import Exam, Answer | |
16 | +from core.mixins import NotificationMixin | |
17 | +from users.models import User | |
18 | +from courses.models import Course, Topic | |
19 | + | |
20 | +class ViewExam(LoginRequiredMixin,generic.DetailView): | |
21 | + | |
22 | + model = Exam | |
23 | + context_object_name = 'exam' | |
24 | + template_name = 'exam/view.html' | |
25 | + | |
26 | + def get_object(self, queryset=None): | |
27 | + return get_object_or_404(Exam, slug = self.kwargs.get('slug')) | |
28 | + | |
29 | + def form_invalid(self, form,**kwargs): | |
30 | + context = super(ViewExam, self).form_invalid(form) | |
31 | + answers = {} | |
32 | + for key in self.request.POST: | |
33 | + if(key != 'csrfmiddlewaretoken' and key != 'name' and key!= 'begin_date' and key != 'limit_date' and key != 'all_students' and key != 'students'): | |
34 | + answers[key] = self.request.POST[key] | |
35 | + | |
36 | + keys = sorted(answers) | |
37 | + context.context_data['answers'] = answers | |
38 | + context.context_data['keys'] = keys | |
39 | + return context | |
40 | + | |
41 | + def form_valid(self, form): | |
42 | + exam = self.object | |
43 | + exam = form.save(commit = False) | |
44 | + exam.answers.all().delete() | |
45 | + exam.save() | |
46 | + | |
47 | + | |
48 | + for key in self.request.POST: | |
49 | + if(key != 'csrfmiddlewaretoken' and key != 'name' and key != 'begin_date' and key != 'limit_date' and key != 'all_students' and key != 'students'): | |
50 | + answer = Answer(answer=self.request.POST[key],order=key,exam=exam) | |
51 | + answer.save() | |
52 | + | |
53 | + return super(ViewExam, self).form_valid(form) | |
54 | + | |
55 | + def get_context_data(self, **kwargs): | |
56 | + context = super(ViewExam, self).get_context_data(**kwargs) | |
57 | + exam = self.object | |
58 | + context['course'] = exam.topic.subject.course | |
59 | + context['subject'] = exam.topic.subject | |
60 | + context['subjects'] = exam.topic.subject.course.subjects.all() | |
61 | + | |
62 | + answers = {} | |
63 | + for answer in exam.answers.all(): | |
64 | + answers[answer.order] = answer.answer | |
65 | + | |
66 | + keys = sorted(answers) | |
67 | + context['answers'] = answers | |
68 | + context['keys'] = keys | |
69 | + | |
70 | + print (context) | |
71 | + return context | |
72 | + | |
73 | + | |
74 | +class CreateExam(LoginRequiredMixin,HasRoleMixin,generic.CreateView): | |
75 | + | |
76 | + allowed_roles = ['professor', 'system_admin'] | |
77 | + login_url = reverse_lazy("core:home") | |
78 | + redirect_field_name = 'next' | |
79 | + model = Exam | |
80 | + form_class = ExamForm | |
81 | + context_object_name = 'exam' | |
82 | + template_name = 'exam/create.html' | |
83 | + success_url = reverse_lazy('core:home') | |
84 | + | |
85 | + def form_invalid(self, form,**kwargs): | |
86 | + context = super(CreateExam, self).form_invalid(form) | |
87 | + answers = {} | |
88 | + for key in self.request.POST: | |
89 | + if(key != 'csrfmiddlewaretoken' and key != 'name' and key != 'begin_date' and key != 'limit_date' and key != 'all_students' and key != 'students'): | |
90 | + answers[key] = self.request.POST[key] | |
91 | + | |
92 | + keys = sorted(answers) | |
93 | + context.context_data['answers'] = answers | |
94 | + context.context_data['keys'] = keys | |
95 | + return context | |
96 | + | |
97 | + def form_valid(self, form): | |
98 | + self.object = form.save(commit = False) | |
99 | + topic = get_object_or_404(Topic, slug = self.kwargs.get('slug')) | |
100 | + self.object.topic = topic | |
101 | + self.object.save() | |
102 | + | |
103 | + for key in self.request.POST: | |
104 | + if(key != 'csrfmiddlewaretoken' and key != 'name' and key != 'begin_date' and key != 'limit_date' and key != 'all_students' and key != 'students'): | |
105 | + answer = Answer(answer=self.request.POST[key],order=key,exam=self.object) | |
106 | + answer.save() | |
107 | + | |
108 | + return super(CreatePoll, self).form_valid(form) | |
109 | + | |
110 | + def get_context_data(self, **kwargs): | |
111 | + context = super(CreateExam, self).get_context_data(**kwargs) | |
112 | + topic = get_object_or_404(Topic, slug = self.kwargs.get('slug')) | |
113 | + context['course'] = topic.subject.course | |
114 | + context['subject'] = topic.subject | |
115 | + context['subjects'] = topic.subject.course.subjects.all() | |
116 | + return context | |
117 | + | |
118 | +class UpdateExam(LoginRequiredMixin,HasRoleMixin,generic.UpdateView): | |
119 | + | |
120 | + allowed_roles = ['professor', 'system_admin'] | |
121 | + login_url = reverse_lazy("core:home") | |
122 | + redirect_field_name = 'next' | |
123 | + model = Exam | |
124 | + form_class = ExamForm | |
125 | + context_object_name = 'exam' | |
126 | + template_name = 'exam/update.html' | |
127 | + success_url = reverse_lazy('core:home') | |
128 | + | |
129 | + def dispatch(self, *args, **kwargs): | |
130 | + exam = get_object_or_404(Exam, slug = self.kwargs.get('slug')) | |
131 | + if(not has_object_permission('edit_exam', self.request.user, exam)): | |
132 | + return self.handle_no_permission() | |
133 | + return super(UpdatePoll, self).dispatch(*args, **kwargs) | |
134 | + | |
135 | + def get_object(self, queryset=None): | |
136 | + return get_object_or_404(Exam, slug = self.kwargs.get('slug')) | |
137 | + | |
138 | + def form_invalid(self, form,**kwargs): | |
139 | + context = super(UpdateExam, self).form_invalid(form) | |
140 | + answers = {} | |
141 | + for key in self.request.POST: | |
142 | + if(key != 'csrfmiddlewaretoken' and key != 'name' and key != 'begin_date' and key != 'limit_date' and key != 'all_students' and key != 'students'): | |
143 | + answers[key] = self.request.POST[key] | |
144 | + | |
145 | + keys = sorted(answers) | |
146 | + context.context_data['answers'] = answers | |
147 | + context.context_data['keys'] = keys | |
148 | + return context | |
149 | + | |
150 | + def form_valid(self, form): | |
151 | + exam = self.object | |
152 | + exam = form.save(commit = False) | |
153 | + exam.answers.all().delete() | |
154 | + exam.save() | |
155 | + | |
156 | + | |
157 | + for key in self.request.POST: | |
158 | + if(key != 'csrfmiddlewaretoken' and key != 'name' and key != 'begin_date' and key != 'limit_date' and key != 'all_students' and key != 'students'): | |
159 | + answer = Answer(answer=self.request.POST[key],order=key,exam=exam) | |
160 | + answer.save() | |
161 | + | |
162 | + return super(UpdateExam, self).form_valid(form) | |
163 | + | |
164 | + def get_context_data(self, **kwargs): | |
165 | + context = super(UpdateExam, self).get_context_data(**kwargs) | |
166 | + exam = self.object | |
167 | + context['course'] = exam.topic.subject.course | |
168 | + context['subject'] = exam.topic.subject | |
169 | + context['subjects'] = exam.topic.subject.course.subjects.all() | |
170 | + | |
171 | + answers = {} | |
172 | + for answer in exam.answers.all(): | |
173 | + # print (key.answer) | |
174 | + answers[answer.order] = answer.answer | |
175 | + | |
176 | + keys = sorted(answers) | |
177 | + context['answers'] = answers | |
178 | + context['keys'] = keys | |
179 | + | |
180 | + return context | |
181 | + | |
182 | +class DeleteExam(LoginRequiredMixin, HasRoleMixin, generic.DeleteView): | |
183 | + | |
184 | + allowed_roles = ['professor', 'system_admin'] | |
185 | + login_url = reverse_lazy("core:home") | |
186 | + redirect_field_name = 'next' | |
187 | + model = Exam | |
188 | + template_name = 'exam/remove.html' | |
189 | + | |
190 | + def dispatch(self, *args, **kwargs): | |
191 | + exam = get_object_or_404(Exam, slug = self.kwargs.get('slug')) | |
192 | + if(not has_object_permission('delete_exam', self.request.user, exam)): | |
193 | + return self.handle_no_permission() | |
194 | + return super(DeleteExam, self).dispatch(*args, **kwargs) | |
195 | + | |
196 | + | |
197 | + def get_context_data(self, **kwargs): | |
198 | + context = super(DeleteExam, self).get_context_data(**kwargs) | |
199 | + context['course'] = self.object.topic.subject.course | |
200 | + context['subject'] = self.object.topic.subject | |
201 | + context['exam'] = self.object | |
202 | + context['subjects'] = self.object.topic.subject.course.subjects.filter(Q(visible=True) | Q(professors__in=[self.request.user])) | |
203 | + if (has_role(self.request.user,'system_admin')): | |
204 | + context['subjects'] = self.object.topic.subject.course.subjects.all() | |
205 | + return context | |
206 | + | |
207 | + def get_success_url(self): | |
208 | + return reverse_lazy('course:view_topic', kwargs={'slug' : self.object.topic.slug}) | ... | ... |