Dotclear

source: admin/js/_blog_theme.js @ 2290:5d1d8e73d41a

Revision 2290:5d1d8e73d41a, 1.0 KB checked in by franck <carnet.franck.paul@…>, 12 years ago (diff)

Click on theme screenshot now expand/collapse information and actions

RevLine 
[0]1$(function() {
[2287]2     // expend theme info
[2195]3     $('.module-sshot').not('.current-theme .module-sshot').each(function(){
4          var bar = $('<div>').addClass('bloc-toggler');
5          $(this).after(
6          $(bar).toggleWithLegend($(this).parent().children('.toggle-bloc'),{
7               img_on_src: dotclear.img_plus_theme_src,
8               img_on_alt: dotclear.img_plus_theme_alt,
9               img_off_src: dotclear.img_minus_theme_src,
[2290]10               img_off_alt: dotclear.img_minus_theme_alt,
[2195]11               legend_click: true
12          }));
[2290]13          $(this).children('img').click(function(){
14               $(this).parent().parent().children('.bloc-toggler').click();
15          });
[2192]16     });
[2287]17
18     // confirm module deletion
19     $('div.module-actions form input[type=submit][name=delete]').click(function() {
20          var module_id = $('input[name=module]',$(this).parent()).val();
21          return window.confirm(dotclear.msg.confirm_delete_theme.replace('%s',module_id));
22     });
23
24     // dirty short search blocker
25     $('div.modules-search form input[type=submit]').click(function(){
26          var mlen = $('input[name=m_search]',$(this).parent()).val();
27          if (mlen.length > 2){return true;}else{return false;}
28     });
[2192]29});
Note: See TracBrowser for help on using the repository browser.

Sites map