Dotclear


Ignore:
Timestamp:
09/18/18 20:22:10 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Use let and const rather than var (ES2015/ES6), use template string where is more efficient

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/themeEditor/js/script.js

    r3709 r3880  
    44$(function() { 
    55  // Cope with saving 
    6   var msg = false; 
     6  let msg = false; 
    77  $('#file-form input[name="write"]').click(function(e) { 
    8     var f = this.form; 
     8    const f = this.form; 
    99 
    10     var data = { 
     10    const data = { 
    1111      file_content: (!dotclear.colorsyntax ? $(f).find('#file_content').get(0).value : editor.getValue()), 
    1212      xd_check: $(f).find('input[name="xd_check"]').get(0).value, 
     
    2222 
    2323    $.post(document.location.href, data, function(res) { 
    24       var err = $(res).find('div.error li:first'); 
     24      const err = $(res).find('div.error li:first'); 
    2525      if (err.length > 0) { 
    2626        msg.text(dotclear.msg.error_occurred + ' ' + err.text()); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map