Skip to content

Commit

Permalink
Merge pull request #100 from grueneschweiz/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
cyrillbolliger authored Nov 12, 2020
2 parents 0a26609 + d6f7679 commit 8c055dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
( function() {
var max_slug_len = 50; // plus '-X' for multiple identical slugs
var max_slug_len = 50; // plus '_X' for multiple identical slugs

var fields_container = document.querySelector( '.form_fields_repeater' );
var fields = document.querySelectorAll( '.form_input_label input' );
Expand Down Expand Up @@ -95,11 +95,11 @@

while (- 1 !== slug_exists && slug_exists !== index) {
j ++;
slug_exists = slugs.indexOf( slug + '-' + j );
slug_exists = slugs.indexOf( slug + '_' + j );
}

if (j) {
slug += '-' + j;
slug += '_' + j;
}

return slug;
Expand Down Expand Up @@ -132,10 +132,13 @@
}

for (var j = 0; j < tabs.length; j ++) {
tabs[ j ].removeEventListener( 'click', hideSlugFields );
tabs[ j ].addEventListener( 'click', hideSlugFields );
}

for (var l = 0; l < typeFields.length; l ++) {
typeFields[ l ].removeEventListener( 'change',
setFieldLabelFieldVisibility );
typeFields[ l ].addEventListener( 'change',
setFieldLabelFieldVisibility );
}
Expand Down Expand Up @@ -220,7 +223,7 @@
str = str.toLowerCase();

// remove accents, swap ñ for n, etc
var from = 'àáäâèéëêìíïîòóöôùúüûñç·/_,:;';
var from = 'àáäâèéëêìíïîòóöôùúüûñç·/-,:;';
var to = 'aaaaeeeeiiiioooouuuunc______';

for (var i = 0, l = from.length; i < l; i ++) {
Expand Down
2 changes: 1 addition & 1 deletion wordpress/wp-content/themes/les-verts/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
* Theme Name: Les Verts
* Description: Custom theme for the GREENS of Switzerland. Designed by superhuit.ch, built by gruene.ch on top of superhuit's stack.
* Author: superhuit.ch & gruene.ch
* Version: 0.17.0
* Version: 0.17.1
*/

0 comments on commit 8c055dc

Please sign in to comment.