Changeset 26607


Ignore:
Timestamp:
Jan 11, 2014, 12:00:56 PM (7 years ago)
Author:
mistic100
Message:

allow to ignore a file

Location:
extensions/plugin_lang_analysis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/plugin_lang_analysis/admin.php

    r26059 r26607  
    5555        'path' => $file,
    5656        'is_admin' => strpos($file, '/admin') === 0 || strpos($file, 'admin.tpl') !== false,
    57         'lang_files' => $default_lang_files
     57        'ignore' => false,
     58        'lang_files' => $default_lang_files,
    5859        );
    5960    }
     
    8384        'path' => $file,
    8485        'is_admin' => $data['is_admin']=='true',
     86        'ignore' => $data['ignore']=='true',
    8587        'lang_files' => array(),
    8688        );
     
    109111  foreach ($files as $file => $file_data)
    110112  {
     113    if ($file_data['ignore']) continue;
     114
    111115    $file_strings = analyze_file($_GET['plugin_id'].$file);
    112116   
  • extensions/plugin_lang_analysis/template/config.tpl

    r26059 r26607  
    2222  }
    2323});
     24
     25$('.switch-button.ignore span').click(function() {
     26  if ($(this).hasClass('active')) {
     27    $(this).removeClass('active');
     28    $(this).next('input').val('false');
     29  }
     30  else {
     31    $(this).addClass('active');
     32    $(this).next('input').val('true');
     33  }
     34});
    2435{/literal}{/footer_script}
    2536
     
    3445      <th>{'Core dependency'|translate}</th>
    3546      <th>{'Local dependencies'|translate}</th>
     47      <th>{'Ignore'|translate}</th>
    3648    </tr>
    3749  </thead>
     
    5668        </div>
    5769      </td>
     70      <td>
     71        <div class="switch-button ignore">
     72          <span class="item ignore {if $file.ignore}active{/if}">&times;</span>
     73          <input type="hidden" name="files[{$file.path}][ignore]" value="{if $file.ignore}true{else}false{/if}">
     74        </div>
     75      </td>
    5876    </tr>
    5977  {/foreach}
  • extensions/plugin_lang_analysis/template/style.css

    r23472 r26607  
    3030    .switch-button span.other.active {
    3131      background:#4CC6FF;
     32    }
     33    .switch-button span.ignore.active {
     34      background:#ff0000;
    3235    }
    3336    .switch-button span:first-of-type {
Note: See TracChangeset for help on using the changeset viewer.