- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
function multiselect_widget_init() {
if(variable_get('multiselect_widget_activeselall', false) === true && (variable_get('multiselect_widget_url', 'all') == 'all' || strstr($_GET['q'], variable_get('multiselect_widget_url', 'all')) !== FALSE)){
drupal_add_css(drupal_get_path('module', 'multiselect_widget') .'/multiselect/jquery.multiSelect.css');
drupal_add_js(drupal_get_path('module', 'multiselect_widget') .'/multiselect/jquery.multiSelect.js');
drupal_add_js(drupal_get_path('module', 'multiselect_widget') .'/multiselect/customSelect.jquery.js');
drupal_add_js(drupal_get_path('module', 'multiselect_widget') .'/multiselect/jquery.bgiframe.min.js');
$selectall = variable_get('multiselect_widget_selall', 'false') ? 'true' : 'false';
drupal_add_js("$(document).ready(function(){
$('#edit-tid').customStyle();
});", 'inline');
drupal_add_js("$(document).ready( function() {
$('".variable_get('multiselect_widget_selector', '.views-exposed-form select[multiple="multiple"]')."').multiSelect({
selectAll: ".$selectall.",
selectAllText: '".variable_get('multiselect_widget_selalltext', 'Выбрать все')."',
noneSelected: '".variable_get('multiselect_widget_notselectedtext', 'Ничего не выбрано')."',
oneOrMoreSelected: '".variable_get('multiselect_widget_countselected', 'Выбрано: %')."'
});
});", 'inline');
}
}