var sf_position = '0'; var sf_templates = "Vezi toate rezultatele<\/a>"; var sf_input = '.search-live'; jQuery(document) .ready( function() { jQuery(sf_input) .ajaxyLiveSearch( { "expand" : false, "searchUrl" : "/portal/hunedoara/orastie/portal.nsf/SearchByDenumire?SearchView&Query=%Query", "text" : "Cauta", "delay" : 500, "iwidth" : 180, "width" : 315, "ajaxUrl" : "/portal/hunedoara/orastie/portal.nsf/SearchByDenumire?SearchView", "rtl" : 0 }); jQuery(".live-search_ajaxy-selective-input").keyup( function() { var width = jQuery(this).val().length * 8; if (width < 50) { width = 50; } jQuery(this).width(width); }); jQuery(".live-search_ajaxy-selective-search").click( function() { jQuery(this).find( ".live-search_ajaxy-selective-input") .focus(); }); jQuery(".live-search_ajaxy-selective-close").click( function() { jQuery(this).parent().remove(); }); }); function getQueryParam(strParam) { strParam = '&' + strParam + '='; var intPos = location.href.toLowerCase().indexOf(strParam.toLowerCase()); if (intPos < 0) return null; var strRet = location.href.substring(intPos + strParam.length); intPos = strRet.indexOf('&'); strRet = (intPos >= 0) ? strRet.substring(0, intPos) : strRet; return strRet; } function changeViewPage(intPage, intCount, intMax) { var strTmp = '', strJump = location.href, strNewJump; strNewJump = '&Start=' + ((intPage - 1) * intCount + 1); if (isNaN(intPage) || intPage > intMax || intPage < 1) return; if ((strTmp = getQueryParam('Start'))) strJump = strJump.replace(new RegExp('&Start=' + strTmp), strNewJump); else strJump += strNewJump; location.href = strJump; } $('form#SubmissionForm') .submit( function(event) { $("#hiddenRecaptcha").val(grecaptcha.getResponse()); // Disable the default form submission event.preventDefault(); // Gat all form data var formData = new FormData($(this)[0]); $('input').each( function() { formData.append($(this).attr('name'), $(this).val()); }); var dt = new Date(); var yn = dt.getFullYear(); // Submit form to Domino server using specified form $ .ajax( { url : '/dm/' + yn + '/callcenter.nsf/Mesaj?CreateDocument', type : 'POST', data : formData, async : false, cache : false, contentType : false, // Important! processData : false, // Important! success : function(response) { if (response.success) { $('#message') .attr('class', 'alert alert-success') .html( '
Document adaugat cu success.
Codul pentru identificarea si consultarea stadiului este:

' + response.IdDocument + '
'); clearForm('form#SubmissionForm'); grecaptcha.reset(); } else { var msgError = '
Solicitarea dumneavoastrã nu a putut fi procesatã.
'; $('#message').attr('class', 'alert alert-danger') .html(msgError); } } }); return false; }); $('form#RegistraturaForm').submit( function(event) { // Disable the default form submission event.preventDefault(); // Gat all form data var formData = ""; $('input,select').each( function() { formData = formData + "&" + $(this).attr('name') + "=" + $(this).val() }); // Submit form to Domino server using specified form $.ajax( { url : '/portal/medias/portal.nsf/QueryStatus?OpenAgent', type : 'GET', data : formData, async : false, cache : false, contentType : false, // Important! processData : false, // Important! success : function(response) { $('#message').html(response); } }); return false; }); function clearForm(form) { $(':input', form).each( function() { var type = this.type; var tag = this.tagName.toLowerCase(); // normalize case if (type == 'text' || type == 'tel' || type == 'email' || type == 'file' || type == 'password' || tag == 'textarea') this.value = ""; else if (type == 'checkbox' || type == 'radio') this.checked = false; else if (tag == 'select') this.selectedIndex = -1; }); }; $(document) .ready( function() { $('#DisplayServiciiOnline') .DataTable( { "pagingType" : "full_numbers", "language" : { "sProcessing" : "Proceseaza...", "sLengthMenu" : "Afiseaza _MENU_ inregistrari pe pagina", "sZeroRecords" : "Nu am gasit nimic - ne pare rau", "sInfo" : "Afisate de la _START_ la _END_ din _TOTAL_ inregistrari", "sInfoEmpty" : "Afisate de la 0 la 0 din 0 inregistrari", "sInfoFiltered" : "(filtrate dintr-un total de _MAX_ inregistrari)", "sInfoPostFix" : "", "sSearch" : "Cauta:", "sUrl" : "", "oPaginate" : { "sFirst" : "Prima", "sPrevious" : "«", "sNext" : "»", "sLast" : "Ultima" } }, "lengthMenu": [[ 25, 50,100, -1], [25, 50,100, "Toate"]] }); }); $('select#an').on('change', function() { window.location.href = ''+strPageUrl +'?OpenDocument&Category='+ this.value ; })