Commit 295f601114f3b7c849c2ba7ce45f17439b8241ae
1 parent
36dfc230
Exists in
master
and in
5 other branches
Adding summernote in update topic modal [Issue #232]
Showing
5 changed files
with
19 additions
and
5 deletions
Show diff stats
core/templates/base.html
@@ -54,6 +54,12 @@ | @@ -54,6 +54,12 @@ | ||
54 | {% endblock %} | 54 | {% endblock %} |
55 | {% block javascript %} | 55 | {% block javascript %} |
56 | {% endblock %} | 56 | {% endblock %} |
57 | + | ||
58 | + <!-- Summernote --> | ||
59 | + <script src="http://podivej.se/js/summernote.min.js" type="text/javascript"></script> | ||
60 | + <link href="http://podivej.se/css/summernote.css" type="text/css" rel="stylesheet" /> | ||
61 | + <link href="http://podivej.se/css/summernote-bs3.css" type="text/css" rel="stylesheet"> | ||
62 | + | ||
57 | </head> | 63 | </head> |
58 | <body> | 64 | <body> |
59 | {% block nav %} | 65 | {% block nav %} |
courses/static/js/topic_editation_presentation.js
1 | 1 | ||
2 | $(document).ready(function(){ | 2 | $(document).ready(function(){ |
3 | - $(".editation").hide(); | 3 | + $(".editation").hide(); |
4 | }); | 4 | }); |
5 | + | ||
5 | function show_editation(id_topic){ | 6 | function show_editation(id_topic){ |
6 | $(".presentation_"+ id_topic).hide(); | 7 | $(".presentation_"+ id_topic).hide(); |
7 | $(".editation_"+ id_topic).show(); | 8 | $(".editation_"+ id_topic).show(); |
9 | + $('#summernote').summernote({height: 300}); | ||
8 | }; | 10 | }; |
9 | 11 | ||
10 | function show_presentation(id_topic){ | 12 | function show_presentation(id_topic){ |
courses/templates/course/view.html
@@ -158,9 +158,11 @@ | @@ -158,9 +158,11 @@ | ||
158 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | 158 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
159 | </button> | 159 | </button> |
160 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | 160 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
161 | - <li><a href="{% url 'course:replicate_subject' subject.slug %}" data-toggle="modal" data-target="#myModal3"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans 'Replicate' %}</a></li> | ||
162 | - <li><a href="javascript:delete_subject.get('{% url 'course:delete_subject' subject.slug %}','#subject','#modal_subject')" data-toggle="modal" data-target="#removeSubject"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | 161 | + <li><a href="{% url 'course:replicate_subject' subject.slug %}"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> |
162 | + <li><a href="{% url 'course:update_subject' subject.slug %}"> <i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | ||
163 | + <li><a href="{% url 'course:delete_subject' subject.slug %}" ><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> | ||
163 | </ul> | 164 | </ul> |
165 | + | ||
164 | </div> | 166 | </div> |
165 | </div> | 167 | </div> |
166 | {% endif %} | 168 | {% endif %} |
courses/templates/subject/form_view_teacher.html
@@ -25,6 +25,8 @@ | @@ -25,6 +25,8 @@ | ||
25 | <li><a href="javascript:show_editation('{{topic.slug}}')"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | 25 | <li><a href="javascript:show_editation('{{topic.slug}}')"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> |
26 | <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> | 26 | <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> |
27 | </ul> | 27 | </ul> |
28 | + | ||
29 | + | ||
28 | {% endif %} | 30 | {% endif %} |
29 | </div> | 31 | </div> |
30 | </div> | 32 | </div> |
@@ -49,7 +51,7 @@ | @@ -49,7 +51,7 @@ | ||
49 | </div> | 51 | </div> |
50 | <div class="form-group editation editation_{{topic.slug}}"> | 52 | <div class="form-group editation editation_{{topic.slug}}"> |
51 | <label class="control-label" for="focusedInput2">{% trans 'Description' %}</label> | 53 | <label class="control-label" for="focusedInput2">{% trans 'Description' %}</label> |
52 | - <textarea class="form-control" rows="3" id="textArea">{{topic.description}}</textarea> | 54 | + <textarea class="form-control" rows="3" id="summernote">{{topic.description}}</textarea> |
53 | </div> | 55 | </div> |
54 | 56 | ||
55 | {# materiais do topico#} | 57 | {# materiais do topico#} |
@@ -207,3 +209,5 @@ | @@ -207,3 +209,5 @@ | ||
207 | </div> | 209 | </div> |
208 | </div> | 210 | </div> |
209 | <!-- EndModal --> | 211 | <!-- EndModal --> |
212 | + | ||
213 | + |
courses/templates/subject/index.html
@@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
75 | </button> | 75 | </button> |
76 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> | 76 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
77 | <li><a href="{% url 'course:replicate_subject' subject.slug %}"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> | 77 | <li><a href="{% url 'course:replicate_subject' subject.slug %}"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i> {% trans "Replicate" %}</a></li> |
78 | - <li><a href="{% url 'course:update_subject' subject.slug %}" <i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> | 78 | + <li><a href="{% url 'course:update_subject' subject.slug %}"> <i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans "Edit" %}</a></li> |
79 | <li><a href="{% url 'course:delete_subject' subject.slug %}" ><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> | 79 | <li><a href="{% url 'course:delete_subject' subject.slug %}" ><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans "Remove" %}</a></li> |
80 | </ul> | 80 | </ul> |
81 | </div> | 81 | </div> |