Project

General

Profile

0001-agenda-highlight-last-saved-updated-act.patch

Serghei Mihai, 29 July 2014 05:55 PM

Download (2.13 KB)

View differences:

Subject: [PATCH 1/3] agenda: highlight last saved updated act

Closes #3148
 calebasse/agenda/views.py               |  1 +
 calebasse/static/css/agenda.css         |  2 +-
 calebasse/static/js/calebasse.agenda.js | 10 ----------
 3 files changed, 2 insertions(+), 11 deletions(-)
calebasse/agenda/views.py
365 365
                else:
366 366
                    state_name = request.POST.get('act_state')
367 367
                    act.set_state(state_name, request.user)
368
                    messages.add_message(self.request, messages.INFO, u'Acte modifié avec succès')
368 369
            except Act.DoesNotExist:
369 370
                pass
370 371
            return HttpResponseRedirect('#acte-frame-'+acte_id)
calebasse/static/css/agenda.css
288 288
    float: right;
289 289
}
290 290

  
291
div .changed {
291
.frame.acte:target {
292 292
    box-shadow: 2px 2px .5em 5px #db9595;
293 293
}
calebasse/static/js/calebasse.agenda.js
344 344

  
345 345
(function($) {
346 346
  $(function() {
347
      $('#actes .frame select').on('change', function() {
348
          var container = $(this).closest('.frame');
349
          if ($(this).data('previous') != $(this).val()) {
350
              container.addClass('changed');
351
          } else {
352
              container.removeClass('changed');
353
          }
354

  
355
      });
356

  
357 347
      $('#tabs').tabs({
358 348
          load: function(event, ui) {
359 349
              var tab = $(ui.tab).attr('id').split('-');
360
-