Dotclear

Changeset 2287:7a307319dfa0


Ignore:
Timestamp:
10/05/13 22:26:00 (12 years ago)
Author:
Denis Jean-Chirstian <contact@…>
Branch:
default
Children:
2288:2685c7d01ec3, 2404:26ab8fe42321
Message:

A touch of javascript, confirm deletion on plugins and themes, disable search on words shorter than 2 chars, and help text.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_blog_theme.js

    r2195 r2287  
    11$(function() { 
     2     // expend theme info 
    23     $('.module-sshot').not('.current-theme .module-sshot').each(function(){ 
    34          var bar = $('<div>').addClass('bloc-toggler'); 
     
    1112          })); 
    1213     }); 
     14 
     15     // confirm module deletion 
     16     $('div.module-actions form input[type=submit][name=delete]').click(function() { 
     17          var module_id = $('input[name=module]',$(this).parent()).val(); 
     18          return window.confirm(dotclear.msg.confirm_delete_theme.replace('%s',module_id)); 
     19     }); 
     20 
     21     // dirty short search blocker 
     22     $('div.modules-search form input[type=submit]').click(function(){ 
     23          var mlen = $('input[name=m_search]',$(this).parent()).val(); 
     24          if (mlen.length > 2){return true;}else{return false;} 
     25     }); 
    1326}); 
  • admin/js/_plugins.js

    r2222 r2287  
    150150 
    151151$(function() { 
    152         $('table.modules.expandable tr:not(.line)').each(function() { 
    153                 dotclear.modulesExpander(this,$('table.modules.expandable tr.line')); 
    154         }); 
    155         $('table.modules.expandable tr.line').each(function() { 
    156                 dotclear.moduleExpander(this); 
    157         }); 
     152/* 
     153     // expand all modules lines 
     154     $('table.modules.expandable tr:not(.line)').each(function() { 
     155          dotclear.modulesExpander(this,$('table.modules.expandable tr.line')); 
     156     }); 
     157*/ 
     158     // expand a module line 
     159     $('table.modules.expandable tr.line').each(function() { 
     160          dotclear.moduleExpander(this); 
     161     }); 
     162 
     163     // confirm module deletion 
     164     $('div.module-actions form input[type=submit][name=delete]').click(function() { 
     165          var module_id = $('input[name=module]',$(this).parent()).val(); 
     166          return window.confirm(dotclear.msg.confirm_delete_plugin.replace('%s',module_id)); 
     167     }); 
    158168}); 
  • inc/admin/lib.moduleslist.php

    r2270 r2287  
    257257 
    258258          echo  
     259          '<div class="modules-search">'. 
    259260          '<form action="'.$this->getURL().'" method="get" class="fieldset">'. 
    260261          '<p><label for="m_search" class="classic">'.__('Search in repository:').'&nbsp;</label><br />'. 
    261262          form::field(array('m_search','m_search'), 30, 255, html::escapeHTML($query)). 
    262263          '<input type="submit" value="'.__('Search').'" /> '; 
    263           if ($query) { echo ' <a href="'.$this->getURL().'" class="button">'.__('Reset search').'</a>'; } 
    264           echo '</p>'. 
     264 
     265          if ($query) {  
     266               echo  
     267               ' <a href="'.$this->getURL().'" class="button">'.__('Reset search').'</a>'; 
     268          } 
     269 
     270          echo  
     271          '</p>'. 
     272          '<p class="form-note">'. 
     273          __('Search is allowed on multiple terms longer than 2 chars, terms must be separated by space.'). 
     274          '</p>'. 
    265275          '</form>'; 
    266276 
     
    273283               '</p>'; 
    274284          } 
     285          echo '</div>'; 
     286 
    275287          return $this; 
    276288     } 
     
    451463                    'details'                => '', 
    452464                    'sshot'             => '', 
    453                     'score'                  => 0 
     465                    'score'                  => 0, 
     466                    'type'                   => null 
    454467               ), 
    455468               # Module's values 
Note: See TracChangeset for help on using the changeset viewer.

Sites map