1/** 2 * This file is part of OXID eShop Community Edition. 3 * 4 * OXID eShop Community Edition is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * OXID eShop Community Edition is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>. 16 * 17 * @link http://www.oxid-esales.com 18 * @copyright (C) OXID eSales AG 2003-2014 19 * @version OXID eShop CE 20 */ 21( function( $ ) { 22 23 oxInnerLabel = { 24 25 options: { 26 sDefaultValue : 'innerLabel', 27 sReloadElement : '' 28 }, 29 30 _create: function(){ 31 32 var self = this, 33 options = self.options, 34 input = self.element, 35 label = $("label[for='"+input.attr('id')+"']"); 36 37 self._reload( input, label ); 38 39 input.focus(function() { 40 label.hide(); 41 }); 42 43 input.blur(function() { 44 if ( $.trim(input.val()) == ''){ 45 label.show(); 46 } 47 }); 48 49 if ($.trim(input.val()) != '') { 50 label.hide(); 51 } 52 input.delay(500).queue(function(){ 53 if ($.trim(input.val()) != '') { 54 label.hide(); 55 } 56 }); 57 58 $(options.sReloadElement).click(function() { 59 setTimeout(function(){ self._reload( self.element, label ); }, 100); 60 }); 61 }, 62 63 _reload : function( input, label ){ 64 var pos = input.position(); 65 label.css( { "left": (pos.left) + "px", "top":(pos.top) + "px" } ); 66 } 67 } 68 69 $.widget( "ui.oxInnerLabel", oxInnerLabel ); 70 71} )( 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.