1/** 2 * jQuery Yii plugin file. 3 * 4 * @author Qiang Xue <[email protected]> 5 * @link http://www.yiiframework.com/ 6 * @copyright 2008-2010 Yii Software LLC 7 * @license http://www.yiiframework.com/license/ 8 */ 9 10;(function($) { 11 12$.yii = { 13 version : '1.0', 14 15 submitForm : function (element, url, params) { 16 var f = $(element).parents('form')[0]; 17 if (!f) { 18 f = document.createElement('form'); 19 f.style.display = 'none'; 20 element.parentNode.appendChild(f); 21 f.method = 'POST'; 22 } 23 if (typeof url == 'string' && url != '') { 24 f.action = url; 25 } 26 if (element.target != null) { 27 f.target = element.target; 28 } 29 30 var inputs = []; 31 $.each(params, function(name, value) { 32 var input = document.createElement("input"); 33 input.setAttribute("type", "hidden"); 34 input.setAttribute("name", name); 35 input.setAttribute("value", value); 36 f.appendChild(input); 37 inputs.push(input); 38 }); 39 40 // remember who triggers the form submission 41 // this is used by jquery.yiiactiveform.js 42 $(f).data('submitObject', $(element)); 43 44 $(f).trigger('submit'); 45 46 $.each(inputs, function() { 47 f.removeChild(this); 48 }); 49 } 50}; 51 52})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.