2015-04-19 16:21:36 +02:00

35 lines
921 B
Plaintext

<?php
// $Id$
//
// jqplug.module
//
//
//
// Created by Bach on 2008-04.
// Modified by bach on 2009-09-09
// Copyright 2009 gui. All rights reserved.
//
/**
* Implementation of hook_init().
*/
function selectList_init() {
global $theme;
// dsm($theme, 'theme');
$admin_theme = variable_get('admin_theme', 0);
// dsm($admin_theme, "admin_theme");
if($theme == $admin_theme){
$mod_path = drupal_get_path('module', 'selectList');
drupal_add_css($mod_path.'/selectList.css');
drupal_add_js($mod_path.'/jquery.selectlist.pack.js', array('type'=>'file', 'scope'=>'header', 'group'=>JS_LIBRARY));
drupal_add_js('jQuery(document).ready(function($) { $("select[multiple="multiple"]:not(.autocomplete-deluxe-form), .selectlist, select#edit-roles, select#edit-modules", ".page-admin").removeAttr("size").selectList(); });', array('type'=>'inline', 'scope'=>'header', 'group'=>JS_THEME));
}
}