Dotclear

Changeset 1256:c4a9f61c4cd2 for admin/js


Ignore:
Timestamp:
08/01/13 17:50:58 (12 years ago)
Author:
akewea
Branch:
ticket#1422
Children:
1257:ca39ff0aceae, 1405:4767c2d94902
Message:

ticket#1422: add confirm on post format change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_post.js

    r1140 r1256  
    7979          // Get document format and prepare toolbars 
    8080          var formatField = $('#post_format').get(0); 
     81          var last_post_format = $(formatField).val(); 
    8182          $(formatField).change(function() { 
    82                excerptTb.switchMode(this.value); 
    83                contentTb.switchMode(this.value); 
     83               // Confirm post format change 
     84               if(window.confirm(dotclear.msg.confirm_change_post_format_noconvert)){ 
     85                    excerptTb.switchMode(this.value); 
     86                    contentTb.switchMode(this.value); 
     87                    last_post_format = $(this).val(); 
     88               }else{ 
     89                    // Restore last format if change cancelled 
     90                    $(this).val(last_post_format); 
     91               } 
    8492          }); 
    8593           
Note: See TracChangeset for help on using the changeset viewer.

Sites map