From d3498f262951cd81c50c4ff04721880f2e18e773 Mon Sep 17 00:00:00 2001 From: John Paul Balagolan Date: Sat, 20 Aug 2022 20:55:38 +0800 Subject: [PATCH 05/20] WP-274 change data-toggle to data-bs-toggle attribute for collapsible content --- oer_template/single-resource-audio.php | 4 ++-- oer_template/single-resource-pdf.php | 4 ++-- oer_template/single-resource-standard.php | 4 ++-- oer_template/single-resource-video.php | 4 ++-- oer_template/single-resource-website.php | 4 ++-- oer_template/single-resource-youtube.php | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/oer_template/single-resource-audio.php b/oer_template/single-resource-audio.php index 116ee92..e824334 100644 --- a/oer_template/single-resource-audio.php +++ b/oer_template/single-resource-audio.php @@ -132,7 +132,7 @@ else echo '
  • '.wp_kses($subject,$allowed_tags).'
  • '; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> @@ -163,7 +163,7 @@ else echo "
  • ".esc_html($curriculum['post_title'])."
  • "; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> diff --git a/oer_template/single-resource-pdf.php b/oer_template/single-resource-pdf.php index 4bc078d..7407be8 100644 --- a/oer_template/single-resource-pdf.php +++ b/oer_template/single-resource-pdf.php @@ -175,7 +175,7 @@ else echo '
  • '.wp_kses($subject,$allowed_tags).'
  • '; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> @@ -206,7 +206,7 @@ else echo "
  • ".esc_html($curriculum['post_title'])."
  • "; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> diff --git a/oer_template/single-resource-standard.php b/oer_template/single-resource-standard.php index e6d0d0d..0c0ed74 100644 --- a/oer_template/single-resource-standard.php +++ b/oer_template/single-resource-standard.php @@ -212,7 +212,7 @@ else echo '
  • '.wp_kses($subject,$allowed_tags).'
  • '; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> @@ -243,7 +243,7 @@ else echo "
  • ".esc_html($curriculum['post_title'])."
  • "; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> diff --git a/oer_template/single-resource-video.php b/oer_template/single-resource-video.php index 661b028..838aec4 100644 --- a/oer_template/single-resource-video.php +++ b/oer_template/single-resource-video.php @@ -135,7 +135,7 @@ else echo '
  • '.wp_kses($subject,$allowed_tags).'
  • '; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> @@ -166,7 +166,7 @@ else echo "
  • ".esc_html($curriculum['post_title'])."
  • "; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> diff --git a/oer_template/single-resource-website.php b/oer_template/single-resource-website.php index e49b71b..18150df 100644 --- a/oer_template/single-resource-website.php +++ b/oer_template/single-resource-website.php @@ -127,7 +127,7 @@ else echo '
  • '.wp_kses($subject,$allowed_tags).'
  • '; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> @@ -158,7 +158,7 @@ else echo "
  • ".esc_html($curriculum['post_title'])."
  • "; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> diff --git a/oer_template/single-resource-youtube.php b/oer_template/single-resource-youtube.php index 7d7e24c..acce1b6 100644 --- a/oer_template/single-resource-youtube.php +++ b/oer_template/single-resource-youtube.php @@ -149,7 +149,7 @@ else echo '
  • '.wp_kses($subject,$allowed_tags).'
  • '; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> @@ -180,7 +180,7 @@ else echo "
  • ".esc_html($curriculum['post_title'])."
  • "; if (($i==2) && ($cnt>2)) - echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; + echo '
  • SEE '.esc_html($moreCnt).' MORE +
  • '; $i++; } ?> From f47642c87dfd2e45755825c17bd209f76a9018c7 Mon Sep 17 00:00:00 2001 From: John Paul Balagolan Date: Mon, 22 Aug 2022 21:15:55 +0800 Subject: [PATCH 06/20] WP-275 fix arrow icon misalignment on subjects display --- css/front_styles.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/css/front_styles.css b/css/front_styles.css index 1e61650..59e4d8f 100644 --- a/css/front_styles.css +++ b/css/front_styles.css @@ -660,4 +660,11 @@ div#oer_related_resources_list label input { .twenty-thirteen .wp-block-wp-oer-plugin-wp-oer-subjects-index .oer-cntnr .oer-ctgry-cntnr .oer_snglctwpr .oer-cat-div .oer-cat-txt-btm-cntnr ul li span:last-child { position:absolute; top:0; right:0; } .twenty-twelve .wp-block-wp-oer-plugin-wp-oer-subjects-index .oer-cntnr .oer-ctgry-cntnr .oer_snglctwpr .oer-cat-div .oer-cat-txt-btm-cntnr ul li { margin-top:35px; margin-left:0; } .twenty-twelve .wp-block-wp-oer-plugin-wp-oer-subjects-index .oer-cntnr .oer-ctgry-cntnr .oer_snglctwpr .oer-cat-div .oer-cat-txt-btm-cntnr ul li .oer-mne-sbjct-ttl { width:45%; } -.oer-subject-resources-list .oer-snglrsrc .oer-snglttldscrght .tagcloud span { margin:10px 0; } \ No newline at end of file +.oer-subject-resources-list .oer-snglrsrc .oer-snglttldscrght .tagcloud span { margin:10px 0; } +.tc-oer-subject-areas-list li.lp-subject-hidden i { + display: inline-flex; + flex-direction: column; + justify-content: center; + margin-left: 3px; + margin-right: 3px; +} \ No newline at end of file From ad9b7afc65a50678fa47a5ccbc0913ed903edb06 Mon Sep 17 00:00:00 2001 From: John Paul Balagolan Date: Mon, 22 Aug 2022 23:47:03 +0800 Subject: [PATCH 07/20] WP-280 fix read more button on more fields section redirecting to 404 page --- oer_template/partial/content-meta.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oer_template/partial/content-meta.php b/oer_template/partial/content-meta.php index 213792d..c8d7afd 100644 --- a/oer_template/partial/content-meta.php +++ b/oer_template/partial/content-meta.php @@ -37,7 +37,7 @@ ?>
    :
    230): ?> -
    +
    :
    230): ?> -
    +
    :
    230): ?> -
    +
    Date: Thu, 25 Aug 2022 10:27:19 +0800 Subject: [PATCH 08/20] WP-281 fix selected substandards not displaying when editing a resource --- includes/oer-functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/oer-functions.php b/includes/oer-functions.php index 6487403..448c1fd 100644 --- a/includes/oer-functions.php +++ b/includes/oer-functions.php @@ -3474,7 +3474,10 @@ function oer_get_standard_label($slug){ $results = $wpdb->get_results( $wpdb->prepare( "SELECT * from " . $wpdb->prefix. $table_name . " where id = %s" , $id ) , ARRAY_A); if (!empty($results)){ foreach($results as $result) { - $standard = $result['description']; + if ($table_name == "oer_sub_standards") + $standard = $result['standard_title']; + else + $standard = $result['description']; } } From 1ac32cf797fe566c6a0883a5db564537d851c706 Mon Sep 17 00:00:00 2001 From: John Paul Balagolan Date: Fri, 26 Aug 2022 08:50:51 +0800 Subject: [PATCH 09/20] WP-271 fix filter button dropdown not working when clicked --- js/resource-category.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/js/resource-category.js b/js/resource-category.js index f8b26ef..d6be1dc 100644 --- a/js/resource-category.js +++ b/js/resource-category.js @@ -55,12 +55,18 @@ jQuery(document).ready(function(){ jQuery('.sortoption').text(jQuery('.sort-options').find('li.cs-selected').text()); jQuery('.sort-resources').click(function(){ - jQuery('.sort-options').fadeToggle('fast'); + if (jQuery('.sort-options').is(":visible")) + jQuery('.sort-options').fadeIn('fast'); + else + jQuery('.sort-options').fadeOut('fast'); }); jQuery('.sort-resources').keydown(function(e){ - if (e.which==13 || e.which==32) { - jQuery('.sort-options').fadeToggle('fast'); - } + if (e.which==13 || e.which==32) { + if (jQuery('.sort-options').is(":visible")) + jQuery('.sort-options').fadeIn('fast'); + else + jQuery('.sort-options').fadeOut('fast'); + } }); jQuery('.sort-options ul li a').click(function(){ @@ -68,7 +74,7 @@ jQuery(document).ready(function(){ jQuery(this).parent().addClass('cs-selected'); jQuery('.sortoption').text(jQuery(this).text()); jQuery('.sort-selectbox').val(jQuery(this).parent().attr('data-value')); - jQuery('.sort-options').fadeToggle('fast'); + jQuery('.sort-options').fadeIn('fast'); jQuery('.sort-selectbox').trigger("change"); }); }); From ac249a208d8fab9ee39f2ae251b970c6b5f297ce Mon Sep 17 00:00:00 2001 From: John Paul Balagolan Date: Fri, 26 Aug 2022 09:12:06 +0800 Subject: [PATCH 10/20] WP-279 add debugging to check if core/editor is present --- js/back_scripts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/back_scripts.js b/js/back_scripts.js index f0b0fe2..0087d72 100644 --- a/js/back_scripts.js +++ b/js/back_scripts.js @@ -112,6 +112,7 @@ jQuery(document).ready(function(e) { if (typeof wp.data !== "undefined") { wp.data.subscribe(function(){ + console.log(wp.data.select('core/editor')); var isSavingPost = wp.data.select('core/editor').isSavingPost(); var isAutosavingPost = wp.data.select('core/editor').isAutosavingPost(); From 745e83d316055cf35f5174e33e38581bd025c2ab Mon Sep 17 00:00:00 2001 From: John Paul Balagolan Date: Fri, 26 Aug 2022 09:17:28 +0800 Subject: [PATCH 11/20] WP-279 add checking if core/editor is loaded on subscribe wrapper --- js/back_scripts.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/js/back_scripts.js b/js/back_scripts.js index 0087d72..ea3ca22 100644 --- a/js/back_scripts.js +++ b/js/back_scripts.js @@ -112,13 +112,14 @@ jQuery(document).ready(function(e) { if (typeof wp.data !== "undefined") { wp.data.subscribe(function(){ - console.log(wp.data.select('core/editor')); - var isSavingPost = wp.data.select('core/editor').isSavingPost(); - var isAutosavingPost = wp.data.select('core/editor').isAutosavingPost(); - - if (isSavingPost && !isAutosavingPost) { - if (typeof window.tinyMCE !== "undefined") - window.tinyMCE.triggerSave(); + if (wp.data.select('core/editor')){ + var isSavingPost = wp.data.select('core/editor').isSavingPost(); + var isAutosavingPost = wp.data.select('core/editor').isAutosavingPost(); + + if (isSavingPost && !isAutosavingPost) { + if (typeof window.tinyMCE !== "undefined") + window.tinyMCE.triggerSave(); + } } }); } From d8a06205e2a9a67a784fbe2870a96c9103baf20e Mon Sep 17 00:00:00 2001 From: John Paul Balagolan Date: Tue, 30 Aug 2022 22:52:40 +0800 Subject: [PATCH 12/20] WP-273 fix expand/collapse of "See More" button on resource page --- oer_template/single-resource-audio.php | 2 +- oer_template/single-resource-pdf.php | 2 +- oer_template/single-resource-standard.php | 2 +- oer_template/single-resource-video.php | 2 +- oer_template/single-resource-website.php | 2 +- oer_template/single-resource-youtube.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/oer_template/single-resource-audio.php b/oer_template/single-resource-audio.php index e824334..a6de600 100644 --- a/oer_template/single-resource-audio.php +++ b/oer_template/single-resource-audio.php @@ -175,7 +175,7 @@
    -

    +

    diff --git a/oer_template/single-resource-pdf.php b/oer_template/single-resource-pdf.php index 7407be8..e6bb267 100644 --- a/oer_template/single-resource-pdf.php +++ b/oer_template/single-resource-pdf.php @@ -222,7 +222,7 @@
    -

    +

    diff --git a/oer_template/single-resource-standard.php b/oer_template/single-resource-standard.php index 0c0ed74..96e1551 100644 --- a/oer_template/single-resource-standard.php +++ b/oer_template/single-resource-standard.php @@ -255,7 +255,7 @@
    -

    +

    diff --git a/oer_template/single-resource-video.php b/oer_template/single-resource-video.php index 838aec4..80addc0 100644 --- a/oer_template/single-resource-video.php +++ b/oer_template/single-resource-video.php @@ -178,7 +178,7 @@
    -

    +

    diff --git a/oer_template/single-resource-website.php b/oer_template/single-resource-website.php index 18150df..86679f7 100644 --- a/oer_template/single-resource-website.php +++ b/oer_template/single-resource-website.php @@ -170,7 +170,7 @@
    -

    +

    diff --git a/oer_template/single-resource-youtube.php b/oer_template/single-resource-youtube.php index acce1b6..3784743 100644 --- a/oer_template/single-resource-youtube.php +++ b/oer_template/single-resource-youtube.php @@ -192,7 +192,7 @@
    -

    +

    From 22cba5ac0c83d6c1dbc15c24b92686377bbd63c9 Mon Sep 17 00:00:00 2001 From: John Paul Balagolan Date: Tue, 30 Aug 2022 23:18:53 +0800 Subject: [PATCH 13/20] WP-274 fixed standards collapsible content on resource page --- includes/oer-functions.php | 2 +- includes/resource_metafields.php | 4 ++-- js/front_scripts.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/oer-functions.php b/includes/oer-functions.php index 448c1fd..fe9ec0c 100644 --- a/includes/oer-functions.php +++ b/includes/oer-functions.php @@ -3534,7 +3534,7 @@ function oer_standards_list_display($resource_id){ foreach($stds as $std){ if (isset($std['core_standard_id'])) { echo "
  • "; - echo ''.esc_html($std['core_standard_name']).' '; + echo ''.esc_html($std['core_standard_name']).' '; ?>
    - +
  • @@ -947,7 +947,7 @@ function chck_val($atr , $oer_grade) ?>
    - +
    diff --git a/js/front_scripts.js b/js/front_scripts.js index a6c00de..a284312 100644 --- a/js/front_scripts.js +++ b/js/front_scripts.js @@ -69,6 +69,7 @@ jQuery(document).ready(function(e) { setTimeout(function(){ jQuery('[data-toggle="collapse"]').removeAttr('data-parent'); + jQuery('[data-bs-toggle="collapse"]').removeAttr('data-parent'); }, 1000); }); From c0ad5c0296e3817b8cbe065fcbd2e73966cb137c Mon Sep 17 00:00:00 2001 From: John Paul Balagolan Date: Mon, 19 Sep 2022 23:00:34 +0800 Subject: [PATCH 14/20] WP-286 fix overlapping text on settings and import page including standards list --- css/back_styles.css | 11 ++++++----- includes/import.php | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/css/back_styles.css b/css/back_styles.css index 33e71bb..f4bf028 100644 --- a/css/back_styles.css +++ b/css/back_styles.css @@ -207,9 +207,9 @@ ul.oer_slctstandard > li border: 1px solid #cccccc; padding-left: 10px; } -.oer-plugin-footer { margin:10px 0 0; } -.oer-plugin-info { display:inline-block; } -.oer-plugin-link { display:inline-block; margin-left:10px; } +.oer-plugin-footer { margin:10px 0 0; font-size:0.9em; } +.oer-plugin-info { display:inline-block; width: 49%; } +.oer-plugin-link { display:inline-block; margin-left:10px; width:48%; text-align:right; } .clear { clear:both; } #col-standards-left { width:40%; float:left; } #col-standards-left .oer_pargrph { width:auto; float:none; } @@ -221,8 +221,9 @@ ul.oer_slctstandard > li .oer-plugin-row:first-child, .oer-import-row:first-child { padding:15px 15px 0; } .oer-import-row:first-child { padding:10px 0 0; } .oer-import-row { padding:0; } -.oer-plugin-row .oer-row-left, .oer-import-row .row-left { width:63%; float:left; } -.oer-plugin-row .oer-row-right, .oer-import-row .row-right { width:35%; float:right; } +.oer-import-row .row-left .fields table.form-table td label { display:inline; } +.oer-plugin-row .oer-row-left, .oer-import-row .row-left { width:68%; float:left; } +.oer-plugin-row .oer-row-right, .oer-import-row .row-right { width:30%; float:right; } .oer-import-row .row2-left { width:85%; float:left; } .oer-import-row .row2-right { width:13%; float:right; } .oer-plugin-row fieldset, .oer-import-row fieldset { margin-bottom:15px; } diff --git a/includes/import.php b/includes/import.php index 0fcd546..469704e 100644 --- a/includes/import.php +++ b/includes/import.php @@ -70,9 +70,9 @@