Gebruiker:Josse.Cottenier/defsam.js: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
(Nieuwe pagina aangemaakt met '//******************************** // Eigen script om standaard * // samenvattingen mogelijk te * // maken. * // ...') |
|||
Regel 17: | Regel 17: | ||
"brp": "+{"+"{brp}"+"}", | "brp": "+{"+"{brp}"+"}", | ||
"ws": "+{"+"{ws}"+"}", | "ws": "+{"+"{ws}"+"}", | ||
− | "weg": "+{"+"{weg}"+"}" | + | "weg": "+{"+"{weg}"+"}" |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
//Tot hier | //Tot hier | ||
//****************************************** | //****************************************** | ||
+ | |||
jQuery( document ).ready( function( $ ) { | jQuery( document ).ready( function( $ ) { | ||
$('<span id="standaardsamenvattingen">Standaard: </span>').insertBefore( $('#wpSummaryLabel') ) | $('<span id="standaardsamenvattingen">Standaard: </span>').insertBefore( $('#wpSummaryLabel') ) | ||
jQuery.each(array_sam, function(naam, sam) { | jQuery.each(array_sam, function(naam, sam) { | ||
$('#standaardsamenvattingen').append( | $('#standaardsamenvattingen').append( | ||
− | $('<a style="cursor:pointer; cursor:hand;"></a>').text(naam).click( function( | + | $('<a style="cursor:pointer; cursor:hand;"></a>').text(naam).click( function() { |
− | |||
$('#wpSummary').val(sam); | $('#wpSummary').val(sam); | ||
− | |||
− | |||
− | |||
− | |||
} ) | } ) | ||
) | ) |
Versie van 5 jul 2013 18:56
//********************************
// Eigen script om standaard *
// samenvattingen mogelijk te *
// maken. *
// *
// By: Sumurai8 *
// Problemen/bugs: Mijn overleg *
//********************************
//******************************************
//Toevoegen van de samenvattingen:
//
array_sam =
{ "w": "+{"+"{w}"+"}",
"zb": "+{"+"{zb}"+"}",
"brp": "+{"+"{brp}"+"}",
"ws": "+{"+"{ws}"+"}",
"weg": "+{"+"{weg}"+"}"
}
//Tot hier
//******************************************
jQuery( document ).ready( function( $ ) {
$('<span id="standaardsamenvattingen">Standaard: </span>').insertBefore( $('#wpSummaryLabel') )
jQuery.each(array_sam, function(naam, sam) {
$('#standaardsamenvattingen').append(
$('<a style="cursor:pointer; cursor:hand;"></a>').text(naam).click( function() {
$('#wpSummary').val(sam);
} )
)
} )
$(document.createTextNode('; ')).insertAfter('#standaardsamenvattingen a')
} );