Skip to content

Commit

Permalink
minor fix to OT modal button css class toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
kontur committed Oct 21, 2017
1 parent e21385f commit fc92611
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 14 deletions.
2 changes: 1 addition & 1 deletion FontsamplerPlugin.php
Expand Up @@ -39,7 +39,7 @@ function __construct( $wpdb, $twig ) {
// keep track of db versions and migrations via this
// simply set this to the current PLUGIN VERSION number when bumping it
// i.e. a database update always bumps the version number of the plugin as well
$this->fontsampler_db_version = '0.3.7';
$this->fontsampler_db_version = '0.3.8';
$current_db_version = get_option( self::FONTSAMPLER_OPTION_DB_VERSION );

// if no previous db version has been registered assume new install and set
Expand Down
2 changes: 1 addition & 1 deletion changelog.txt
@@ -1,4 +1,4 @@
# 0.3.7
# 0.3.7 & 0.3.8
- Implemented shortcode attribute to overwrite or dynamically set the default text
- Implemented shortcode attribute to overwrite or dynamically set the fonts and font files
- Implemented events called on the wrapper after initialisation and font change
Expand Down
2 changes: 1 addition & 1 deletion fontsampler.php
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Fontsampler
Plugin URI: https://fontsampler.johannesneumeier.com
Description: Create interactive webfont previews via shortcodes. Create and edit previews from the ¶ Fontsampler sidebar menu or click "Settings" on the left.
Version: 0.3.7
Version: 0.3.8
Author: Johannes Neumeier
Author URI: http://johannesneumeier.com
Copyright: Copyright 2016-2017 Johannes Neumeier
Expand Down
2 changes: 1 addition & 1 deletion js/fontsampler.js

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions js/ui-setup.js
Expand Up @@ -140,12 +140,20 @@ define(['jquery', 'rangeslider', 'selectric'], function ($) {
$(document).on("click", closeOpenOTModal);
function closeOpenOTModal (e) {
if (typeof e === "undefined") {
$(".fontsampler-opentype-features.shown").removeClass("shown")
$(".fontsampler-opentype-features.shown").each(function () {
$(this).removeClass("shown");
$(this).siblings(".fontsampler-opentype-toggle")
.removeClass("fontsampler-multiselect-selected");
});
} else {
// if this top most clicked element was inside an OT wrapper
if ($(e.target).parents(".fontsampler-opentype").length === 0) {
//click outside OT modal
$wrapper.find(".fontsampler-opentype-features").removeClass("shown");
$wrapper.find(".fontsampler-opentype-features").each(function () {
$(this).removeClass("shown");
$(this).siblings(".fontsampler-opentype-toggle")
.removeClass("fontsampler-multiselect-selected");
});
}
}
}
Expand Down
21 changes: 14 additions & 7 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "fontsampler",
"version": "0.3.7",
"version": "0.3.8",
"description": "Wordpress plugin for testing webfonts; dev dependencies",
"main": "js/main.js",
"scripts": {
Expand All @@ -21,12 +21,20 @@
"ignore": "admin/js/fontsampler-admin.js"
},
"less": {
"patterns": ["css"],
"extensions": ["less"]
"patterns": [
"css"
],
"extensions": [
"less"
]
},
"less-admin": {
"patterns": ["admin/css"],
"extensions": ["less"]
"patterns": [
"admin/css"
],
"extensions": [
"less"
]
}
},
"repository": {
Expand All @@ -42,6 +50,5 @@
"devDependencies": {
"npm-watch": "^0.3.0"
},
"dependencies": {
}
"dependencies": {}
}
12 changes: 11 additions & 1 deletion readme.txt
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: fonts, typeface, preview, shortcode
Requires at least: 4.0
Tested up to: 4.8.2
Stable tag: 0.3.7
Stable tag: 0.3.8
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -119,6 +119,16 @@ special cases like stencil, outline etc. variants might need that you give them

== Changelog ==

= 0.3.7 & 0.3.8 =
- Implemented shortcode attribute to overwrite or dynamically set the default text
- Implemented shortcode attribute to overwrite or dynamically set the fonts and font files
- Implemented events called on the wrapper after initialisation and font change
- Now serving all frontend javascript assets as one minified file (previously 20+ dynamic file calls)
- Now serving all backend javascript assets as one minified file (previously 30+ dynamic file calls)
- Fixed a compability issue arising from other plugins using the same javascript dependency manager
- Fixed an issue where OpenType features that are enabled by default did not have their UI elements reflect that correctly
- Fixed an issue where switching fonts would revert selections made in the OpenType modal

= 0.3.6 =
* Implemented a feature that strips pasted text of its original styling
* Fixed an issue that caused dropdowns to not work on mobile devices
Expand Down

0 comments on commit fc92611

Please sign in to comment.