What follows is the starting point of a link collection. I plan to open up this page, so that other people can also add useful links which belong to the subject of the pattern approach of Christopher Alexander. Update: (August 2014) There is an "add new link" form at the end of this page.
All of your links must be assigned at least to one category to be displayed
jQuery(document).ready(function()
{
jQuery('.arrow-up').hide();
jQuery('#linklist1 a.track_this_link').click(function() {
linkid = this.id;
linkid = linkid.substring(5);
path = '';
jQuery.
ajax( { type: 'POST', url: 'https://peter.baumgartner.name/wp-admin/admin-ajax.php', data: { action: 'link_library_tracker', _ajax_nonce: 'df719ecc37', id:linkid, xpath:path } });
return true;
});
jQuery('#linklist1 .expandlinks').click(function() {
target = '.' + jQuery(this).attr('id');
subcattarget = '.' + jQuery(this).attr('data-subcat');
if ( jQuery( target ).is(':visible') ) {
jQuery(target).slideUp();
jQuery(subcattarget).slideToggle();
jQuery(this).children('img').attr('src', 'https://peter.baumgartner.name/wp-content/plugins/link-library/icons/expand-32.
png');
} else {
jQuery(target).slideDown();
jQuery(subcattarget).slideToggle();
jQuery(this).children('img').attr('src', 'https://peter.baumgartner.name/wp-content/plugins/link-library/icons/collapse-32.png');
}
});
jQuery('#linklist1 .linklistcatclass').click(function() {
jQuery(this).siblings('.expandlinks').click();
});
jQuery('#linklist1 .linklistcatnamedesc').click(function() {
jQuery(this).siblings('.expandlinks').click();
});
});
jQuery( document ).ready( function() {
jQuery('.lltooltip').each(function () {
jQuery(this).tipTip();
});
var LinkLibraryValidationLanguage = {
errorTitle: 'Form submission failed!',
requiredFields: 'You have not answered all required fields',
badTime: 'You have not given a correct time',
badEmail: 'You have not given a correct e-mail address',
badTelephone: 'You have not given a correct phone number',
badSecurityAnswer: 'You have not given a correct answer to the security question',
badDate: 'You have not given a correct date',
lengthBadStart: 'The input value must be between ',
lengthBadEnd: 'characters',
lengthTooLongStart: 'The input value is longer than ',
lengthTooShortStart: 'The input value is shorter than ',
notConfirmed: 'Input values could not be confirmed',
badDomain: 'Incorrect domain value',
badUrl: 'The input value is not a correct URL. Requires http:// or https://.',
badCustomVal: 'The input value is incorrect',
andSpaces: ' and spaces ',
badInt: 'The input value was not a correct number',
badSecurityNumber: 'Your social security number was incorrect',
badUKVatAnswer: 'Incorrect UK VAT Number',
badStrength: 'The password is not strong enough',
badNumberOfSelectedOptionsStart: 'You have to choose at least ',
badNumberOfSelectedOptionsEnd: ' answers',
badAlphaNumeric: 'The input value can only contain alphanumeric characters ',
badAlphaNumericExtra: ' and ',
wrongFileSize: 'The file you are trying to upload is too large (max %s)',
wrongFileType: 'Only files of type %s is allowed',
groupCheckedRangeStart: 'Please choose between ',
groupCheckedTooFewStart: 'Please choose at least ',
groupCheckedTooManyStart: 'Please choose a maximum of ',
groupCheckedEnd: ' item(s)',
badCreditCard: 'The credit card number is not correct',
badCVV: 'The CVV number was not correct',
wrongFileDim : 'Incorrect image dimensions,',
imageTooTall : 'the image can not be taller than',
imageTooWide : 'the image can not be wider than',
imageTooSmall : 'the image was too small',
min : 'min',
max : 'max',
imageRatioNotAccepted : 'Image ratio is not accepted'
};
jQuery.validate({
modules : 'location, date, security, file',
language : LinkLibraryValidationLanguage,
});
jQuery('#link_category').change(function() {
var cat_data = jQuery('#link_category').val();
if ( Array.isArray( cat_data ) ) {
if ( cat_data.indexOf('new') != -1 ) {
jQuery('.customcatrow').show();
} else {
jQuery('.customcatrow').hide();
};
} else {
if ( jQuery('#link_category').val() == 'new' ) {
jQuery('.customcatrow').show();
} else {
jQuery('.customcatrow').hide();
};
};
});
jQuery('#link_tags').change(function() {
var tag_data = jQuery('#link_tags').val();
if ( Array.isArray( tag_data ) ) {
if ( tag_data.indexOf('new') != -1 ) {
jQuery('.customtagrow').show();
} else {
jQuery('.customtagrow').hide();
};
};
});
});
Gefällt mir Wird geladen …