Dotclear


Ignore:
Timestamp:
10/09/13 09:30:33 (12 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Children:
2322:a75984c93a86, 2406:325f49056c79
Message:

Fix invalid html for media page (in attachment context) because of nested form.
Closes #1761

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_media.js

    r2266 r2320  
    144144     }); 
    145145 
     146     // attach media 
     147     $('#form-medias').on('click', '.media-item .attach-media', function(e) { 
     148          var parts = $(this).prop('href').split('?'); 
     149          var str_params = parts[1].split('&'); 
     150          var postData = {}; 
     151 
     152          for (var n=0;n<str_params.length;n++) { 
     153               kv = str_params[n].split('='); 
     154               postData[kv[0]] = kv[1]; 
     155          } 
     156          postData.xd_check = dotclear.nonce; 
     157 
     158          $.post(parts[0], postData, function(data) { 
     159               if (data.url !== undefined) { 
     160                    document.location = data.url; 
     161               } 
     162          }); 
     163 
     164          e.preventDefault(); 
     165     }); 
     166 
    146167     // Replace remove links by a POST on hidden form 
    147168     fileRemoveAct(); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map