Last active
August 27, 2019 09:08
-
-
Save fraktik/c90ec24d9230070f417e39d7ce068523 to your computer and use it in GitHub Desktop.
UO - báze (Brandýs) + navíc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... nedokončeno... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* zvýrazní nedání souhlasu */ | |
$(".patronattribute:contains('Ne')").css("color","red"); | |
if ($("#patron_attr_2").val() == '') { | |
$("#patron_attr_2").val(0); | |
} | |
if ($("#patron_attr_4").val() == '') { | |
$("#patron_attr_4").val(0); | |
} | |
$("#addbibliotabs li:nth-child(1) a").text("Systém"); | |
$("#addbibliotabs li:nth-child(2) a").text("Autor"); | |
$("#addbibliotabs li:nth-child(3) a").text("Název a vydání"); | |
$("#addbibliotabs li:nth-child(4) a").text("Fyzický popis"); | |
$("#addbibliotabs li:nth-child(5) a").text("Edice"); | |
$("#addbibliotabs li:nth-child(6) a").text("Poznámky"); | |
$("#addbibliotabs li:nth-child(7) a").text("Věcný popis"); | |
$("#addbibliotabs li:nth-child(8) a").text("Vedlejší záhlaví"); | |
$("#addbibliotabs li:nth-child(9) a").text("Elekronický přístup"); | |
$("#addbibliotabs li:nth-child(10) a").text("Národní pole"); | |
$("#searchterms div:nth-child(2) select").val("kw"); | |
$("#searchterms div:nth-child(3) select").val("ti"); | |
$("#searchterms div:nth-child(4) select").val("au"); | |
$("#alt_address_lgd, #alt_contact_lgd").parent().find("ol").hide(); | |
$("#alt_address_lgd, #alt_contact_lgd").click(function(){ | |
$(this).parent().find("ol").slideToggle("slow"); | |
}); | |
/* $("#serials_edit [id$='0p'] input[type='text']").focus(function() { | |
$(this).val($("[id^='serialseq']").val()); | |
}); */ | |
$("#serials_edit [id$='0x'] input[type='text']").focus(function() { | |
$(this).val($("[name='publisheddatetext']").val()); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* OK při přesunu - nefunguje kvůli refocusu na další výpůjčku */ | |
if (window.location.href.indexOf("circ/returns.pl") > -1) { | |
var confirmation = $("#wrong-transfer-modal, #item-transfer-modal"); | |
if (confirmation.length) { | |
var html = '<input type="text" name="yesno" value="" size="3">'; | |
$(html).prependTo(confirmation.find(".modal-footer").first()); | |
var answerYes = confirmation.find("button.approve"); | |
var barcodeField = $("input[name='yesno']"); | |
barcodeField.focus(); | |
barcodeField.blur(function(event) { | |
var response = barcodeField.val(); | |
barcodeField.val(""); | |
if (response == "900009999995") { // OK = ANO - nastavit dle potřeby!!! | |
answerYes.click(); | |
} | |
barcodeField.focus(); | |
event.preventDefault(); | |
}); | |
} | |
} | |
/* OK při přesunu */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* predvyplneni formulare v editaci dosleho periodika */ | |
/* set item type for newspaper */ | |
$("#ser_serials-edit #serials_edit input[name='subscriptionid'][value='4'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='5'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='6'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='7'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='8'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='9'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='127']").parent().find("[id^='subfield'][id$='y'] select").first().val("NO"); | |
/* set human readable date to text date field for newspaper */ | |
today = new Date(); | |
todayHuman = today.getDate() + '. ' + (today.getMonth() + 1) + '. ' + today.getFullYear(); | |
$("#ser_serials-edit #serials_edit input[name='subscriptionid'][value='4'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='5'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='6'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='7'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='8'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='9'], #ser_serials-edit #serials_edit input[name='subscriptionid'][value='127']").parent().find("[name='publisheddatetext']").first().val(todayHuman); | |
/* copy the values to newly created item - it's done in click event handler just for case the thing are not accurate and you need to change some values before you insert an item */ | |
$("#ser_serials-edit a[id^='label']:not([id$='NEW'])").click(function() { | |
today = new Date(); | |
todayISO = today.toISOString().substring(0,10); | |
/* $("#serials_edit [id^='subfield'][id$='p'] input[type='text']").val($("[id^='serialseq']").val());*/ | |
$("#serials_edit [id^='subfield'][id$='x'] input[type='text']").val($("[name='publisheddatetext']").val()); | |
$("#serials_edit [id^='subfield'][id$='d'] input[type='text']").val(todayISO); | |
$("#serials_edit [id^='subfield'][id$='1'] input[type='text']").first().focus(); | |
}); | |
/* konec predvyplneni formulare v editaci dosleho periodika */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
/* ... */ | |
var SMSAlertValue = $("input#SMSnumber").val(); | |
$("input#SMSnumber").parent().remove(); | |
$('<li><label for="SMSnumber">SMS číslo:</label><input type="text" id="SMSnumber" name="SMSnumber" value="' + SMSAlertValue + '" class="noEnterSubmit"></li>').insertAfter($("input#phonepro").parent()); | |
$("input#phone").change(function() { | |
$("input#SMSnumber").val($(this).val().replace(/\s+/g, '')); | |
}); | |
/*...*/ | |
function indicators_generate() { | |
for (field in indicators) { | |
for(ind in indicators[field]) { | |
$("input[name^='tag_" + field + "_indicator" + ind + "']").each(function () { | |
$(this).autocomplete({ | |
minLength: 0, | |
source: indicators[field][ind] | |
}); | |
$(this).focus(function () { | |
$(this).autocomplete("search",""); | |
}); | |
$(this).click(function () { | |
$(this).autocomplete("search",""); | |
}); | |
$(this).css("background-color","#FFFF44"); | |
}); | |
} | |
} | |
} | |
indicators_generate(); | |
$(".buttonPlus").click(indicators_generate); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment