-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature parity with SearchWP Finnish Base Forms
- Loading branch information
Showing
9 changed files
with
443 additions
and
244 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# License for voikkospell and Voikko dictionary | ||
|
||
## Voikkospell (part of libvoikko) | ||
|
||
[https://github.com/voikko/corevoikko/tree/master/libvoikko](https://github.com/voikko/corevoikko/tree/master/libvoikko) | ||
|
||
GNU GPL v3.0 or later | ||
|
||
## Voikko-fi | ||
|
||
[https://github.com/voikko/corevoikko/tree/master/voikko-fi](https://github.com/voikko/corevoikko/tree/master/voikko-fi) | ||
|
||
GNU GPL v2.0 or later | ||
|
||
## Binaries | ||
|
||
[https://github.com/siiptuo/voikko-build](https://github.com/siiptuo/voikko-build) | ||
|
||
GNU GPL v3.0 or later |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Voikko-Dictionary-Format: 5 | ||
Language: fi-x-standard | ||
Copyright: 2006-2017 Hannu Väisänen, Harri Pitkänen, Teemu Likonen and others | ||
License: GPL version 2 or later | ||
Description: suomi (perussanasto) | ||
SM-Version: 2.2 | ||
SM-Patchinfo: | ||
Build-Config: GENLEX_OPTS= EXTRA_LEX= | ||
Build-Date: Sat, 04 Aug 2018 18:51:58 +0000 | ||
Morphology-Backend: finnishVfst |
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
(function ($) { | ||
var update = function () { | ||
if ($('input[name=api_type]:checked').val() === 'command_line') { | ||
$('.js-relevanssi-finnish-base-forms-api-url').hide(); | ||
} else { | ||
$('.js-relevanssi-finnish-base-forms-api-url').show(); | ||
} | ||
$('.js-relevanssi-finnish-base-forms-test-output').html(''); | ||
}; | ||
$(document).ready(function () { | ||
update(); | ||
$('input[name=api_type]').change(function () { | ||
update(); | ||
}); | ||
$('.js-relevanssi-finnish-base-forms-form').submit(function (event) { | ||
var self = this; | ||
event.preventDefault(); | ||
$('.js-relevanssi-finnish-base-forms-submit-button').attr('disabled', true); | ||
var data = { | ||
action: 'relevanssi_finnish_base_forms_test', | ||
}; | ||
if ($('input[name=api_type]:checked').val() === 'command_line') { | ||
data.api_type = 'command_line'; | ||
} else { | ||
data.api_type = 'web_api'; | ||
data.api_root = $('input[name=api_url]').val(); | ||
} | ||
$.post(ajaxurl, data) | ||
.done(function() { | ||
$('.js-relevanssi-finnish-base-forms-submit-button').attr('disabled', false); | ||
self.submit(); | ||
}) | ||
.fail(function() { | ||
window.scrollTo(0, 0); | ||
$('.js-relevanssi-finnish-base-forms-submit-button').attr('disabled', false); | ||
$('.notice.notice-success').remove(); | ||
$('.js-relevanssi-finnish-base-forms-admin-notices').html( | ||
'<div class="notice notice-error">' + | ||
'<p>Failed to connect the Voikko API. Make sure Voikko has been correctly installed.</p>' + | ||
'</div>' | ||
); | ||
var update = function () { | ||
if ($('input[name=api_type]:checked').val() === 'binary' || $('input[name=api_type]:checked').val() === 'command_line') { | ||
$('.js-finnish-base-forms-api-url').hide(); | ||
} else { | ||
$('.js-finnish-base-forms-api-url').show(); | ||
} | ||
}; | ||
$(document).ready(function () { | ||
update(); | ||
$('input[name=api_type]').change(function () { | ||
update(); | ||
}); | ||
$('.js-finnish-base-forms-form').submit(function (event) { | ||
var self = this; | ||
event.preventDefault(); | ||
$('.js-finnish-base-forms-submit-button').attr('disabled', true); | ||
var slug = $('.js-finnish-base-forms-form').data('slug'); | ||
var data = { | ||
action: slug + '_finnish_base_forms_test', | ||
}; | ||
if ($('input[name=api_type]:checked').val() === 'command_line' || $('input[name=api_type]:checked').val() === 'binary') { | ||
data.api_type = $('input[name=api_type]:checked').val(); | ||
} else { | ||
data.api_type = 'web_api'; | ||
data.api_root = $('input[name=api_url]').val(); | ||
} | ||
$.post(ajaxurl, data) | ||
.done(function() { | ||
$('.js-finnish-base-forms-submit-button').attr('disabled', false); | ||
self.submit(); | ||
}) | ||
.fail(function() { | ||
window.scrollTo(0, 0); | ||
$('.js-finnish-base-forms-submit-button').attr('disabled', false); | ||
$('.notice.notice-success').remove(); | ||
$('.js-finnish-base-forms-admin-notices').html( | ||
'<div class="notice notice-error">' + | ||
'<p>Failed to connect the Voikko API. Make sure Voikko has been correctly installed.</p>' + | ||
'</div>' | ||
); | ||
}); | ||
}); | ||
}); | ||
}); | ||
})(jQuery); | ||
})(jQuery); |
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
Oops, something went wrong.