Dotclear


Ignore:
Timestamp:
10/09/13 16:42:03 (12 years ago)
Author:
Lepeltier kévin <kevin@…>
Branch:
widgets
Message:

widgets : bug sur le bouton de mise à jour

Location:
plugins/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/widgets/index.php

    r2403 r2408  
    124124     foreach ($_POST['w'] as $nsid => $nsw) { 
    125125          foreach ($nsw as $i => $v) { 
    126                if (!empty($v['down'])) { 
     126               if (!empty($v['_down'])) { 
    127127                    $oldorder = $_POST['w'][$nsid][$i]['order']; 
    128128                    $neworder = $oldorder + 1; 
     
    133133                    } 
    134134               } 
    135                if (!empty($v['up'])) { 
     135               if (!empty($v['_up'])) { 
    136136                    $oldorder = $_POST['w'][$nsid][$i]['order']; 
    137137                    $neworder = $oldorder - 1; 
     
    394394          ($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : ''). 
    395395          '<span class="toolsWidget remove-if-drag">'. 
    396           '<input type="image" class="upWidget'.$upDisabled.'up.png" name="'.$iname.'[up]" value="'.__('Up the widget').'" />'. 
    397           '<input type="image" class="downWidget'.$downDisabled.'down.png" name="'.$iname.'[down]" value="'.__('Down the widget').'" />'.' '. 
     396          '<input type="image" class="upWidget'.$upDisabled.'up.png" name="'.$iname.'[_up]" value="'.__('Up the widget').'" />'. 
     397          '<input type="image" class="downWidget'.$downDisabled.'down.png" name="'.$iname.'[_down]" value="'.__('Down the widget').'" />'.' '. 
    398398          '<input type="image" class="removeWidget" src="images/trash.png" name="'.$iname.'[_rem]" value="'.__('Remove widget').'" />'. 
    399399          '</span>'. 
  • plugins/widgets/widgets.js

    r2401 r2408  
    106106      
    107107     // remove 
    108      $('input[name*=rem]').click(function (e) { 
     108     $('input[name*=_rem]').click(function (e) { 
    109109          e.preventDefault(); 
    110110          $(this).parents('li').remove(); 
     
    112112      
    113113     // move 
    114      $('input[name*=down]').click(function (e) { 
     114     $('input[name*=_down]').click(function (e) { 
    115115          e.preventDefault(); 
    116116          $this = $(this); 
     
    119119          reorder($this.parents('ul.connected')); 
    120120     }); 
    121      $('input[name*=up]').click(function (e) { 
     121     $('input[name*=_up]').click(function (e) { 
    122122          e.preventDefault(); 
    123123          $this = $(this); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map