stableversion-3.0
Last change
on this file since a8b1f3f was
f3bf392,
checked in by lhernandez <lhernandez@…>, 8 años ago
|
se agrego el modulo views_php
|
-
Propiedad mode establecida a
100644
|
File size:
927 octetos
|
Ver. | Línea | |
---|
[f3bf392] | 1 | (function ($) { |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * Attach views php clickable variables behavior. |
---|
| 5 | */ |
---|
| 6 | Drupal.behaviors.viewsPHPVariables = function (context) { |
---|
| 7 | $('.views-php-variables', context).each(function() { |
---|
| 8 | $('a', this).live('click', function() { |
---|
| 9 | var textarea = $(this.href.replace(/^.*#/, '#'))[0]; |
---|
| 10 | var text = $(this).text(); |
---|
| 11 | textarea.focus(); |
---|
| 12 | if (!isNaN(textarea.selectionStart)) { |
---|
| 13 | textarea.value = textarea.value.substring(0, textarea.selectionStart) + text + textarea.value.substring(textarea.selectionEnd); |
---|
| 14 | textarea.selectionStart = textarea.selectionStart + text.length; |
---|
| 15 | textarea.selectionEnd = textarea.selectionEnd + text.length; |
---|
| 16 | } |
---|
| 17 | // IE support. |
---|
| 18 | else if (document.selection) { |
---|
| 19 | document.selection.createRange().text = text; |
---|
| 20 | } |
---|
| 21 | else { |
---|
| 22 | textarea.value += text; |
---|
| 23 | } |
---|
| 24 | textarea.focus(); |
---|
| 25 | |
---|
| 26 | return false; |
---|
| 27 | }); |
---|
| 28 | }); |
---|
| 29 | }; |
---|
| 30 | |
---|
| 31 | })(jQuery); |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.