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 | 54 | {% endblock %} |
| 55 | 55 | {% block javascript %} |
| 56 | 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 | 63 | </head> |
| 58 | 64 | <body> |
| 59 | 65 | {% block nav %} | ... | ... |
courses/static/js/topic_editation_presentation.js
| 1 | 1 | |
| 2 | 2 | $(document).ready(function(){ |
| 3 | - $(".editation").hide(); | |
| 3 | + $(".editation").hide(); | |
| 4 | 4 | }); |
| 5 | + | |
| 5 | 6 | function show_editation(id_topic){ |
| 6 | 7 | $(".presentation_"+ id_topic).hide(); |
| 7 | 8 | $(".editation_"+ id_topic).show(); |
| 9 | + $('#summernote').summernote({height: 300}); | |
| 8 | 10 | }; |
| 9 | 11 | |
| 10 | 12 | function show_presentation(id_topic){ | ... | ... |
courses/templates/course/view.html
| ... | ... | @@ -158,9 +158,11 @@ |
| 158 | 158 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
| 159 | 159 | </button> |
| 160 | 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 | 164 | </ul> |
| 165 | + | |
| 164 | 166 | </div> |
| 165 | 167 | </div> |
| 166 | 168 | {% endif %} | ... | ... |
courses/templates/subject/form_view_teacher.html
| ... | ... | @@ -25,6 +25,8 @@ |
| 25 | 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 | 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 | 27 | </ul> |
| 28 | + | |
| 29 | + | |
| 28 | 30 | {% endif %} |
| 29 | 31 | </div> |
| 30 | 32 | </div> |
| ... | ... | @@ -49,7 +51,7 @@ |
| 49 | 51 | </div> |
| 50 | 52 | <div class="form-group editation editation_{{topic.slug}}"> |
| 51 | 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 | 55 | </div> |
| 54 | 56 | |
| 55 | 57 | {# materiais do topico#} |
| ... | ... | @@ -207,3 +209,5 @@ |
| 207 | 209 | </div> |
| 208 | 210 | </div> |
| 209 | 211 | <!-- EndModal --> |
| 212 | + | |
| 213 | + | ... | ... |
courses/templates/subject/index.html
| ... | ... | @@ -75,7 +75,7 @@ |
| 75 | 75 | </button> |
| 76 | 76 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
| 77 | 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 | 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 | 80 | </ul> |
| 81 | 81 | </div> | ... | ... |