Редакция 344 | Редакция 362 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 344 | Редакция 361 | ||
---|---|---|---|
Строка 12... | Строка 12... | ||
12 | *
|
12 | *
|
13 | */
|
13 | */
|
14 | 14 | ||
15 | require_once dirname(__FILE__)."/init.php"; |
15 | require_once dirname(__FILE__)."/init.php"; |
16 | 16 | ||
- | 17 | $scripts = " |
|
- | 18 | <script type='text/javascript'>
|
|
- | 19 | (function($){
|
|
- | 20 | // очищаем select
|
|
- | 21 | $.fn.clearSelect = function() {
|
|
- | 22 | return this.each(function(){
|
|
- | 23 | if(this.tagName=='SELECT') {
|
|
- | 24 | this.options.length = 0;
|
|
- | 25 | $(this).attr('disabled','disabled');
|
|
- | 26 | }
|
|
- | 27 | });
|
|
- | 28 | }
|
|
- | 29 | // заполняем select
|
|
- | 30 | $.fn.fillSelect = function(dataArray) {
|
|
- | 31 | return this.clearSelect.each(function(){
|
|
- | 32 | if(this.tagName=='SELECT') {
|
|
- | 33 | var currentSelect = this;
|
|
- | 34 | $.each(dataArray,function(index,data) {
|
|
- | 35 | var option = new Option(data.text,data.value);
|
|
- | 36 | if($.support.cssFloat) {
|
|
- | 37 | currentSelect.add(option,null);
|
|
- | 38 | } else {
|
|
- | 39 | currentSelect.add(option);
|
|
- | 40 | }
|
|
- | 41 | });
|
|
- | 42 | }
|
|
- | 43 | });
|
|
- | 44 | }
|
|
- | 45 | })(jQuery);
|
|
- | 46 | </script>
|
|
- | 47 | ||
- | 48 | "; |
|
- | 49 | ||
- | 50 | $smarty->assign('scripts', $scripts); |
|
- | 51 | ||
17 | $smarty->display('default.tpl'); |
52 | $smarty->display('default.tpl'); |
18 | 53 | ||
19 | ?>
|
54 | ?>
|