Skip to content

Commit

Permalink
Merge pull request #483 from woothemes/release-1-6-4
Browse files Browse the repository at this point in the history
Release 1 6 4
  • Loading branch information
Dan Johnson committed Aug 13, 2014
2 parents 5a002d0 + 070f2cb commit 865f407
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 34 deletions.
60 changes: 31 additions & 29 deletions assets/js/lesson-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,35 @@ jQuery(document).ready( function($) {
});

/***************************************************************************************************
* 4 - Quiz Question Functions.
* 4 - Load Chosen Dropdowns.
***************************************************************************************************/

// Lessons Write Panel
if ( jQuery( '#lesson-complexity-options' ).exists() ) { jQuery( '#lesson-complexity-options' ).chosen(); }
if ( jQuery( '#lesson-prerequisite-options' ).exists() ) { jQuery( '#lesson-prerequisite-options' ).chosen(); }
if ( jQuery( '#lesson-course-options' ).exists() ) { jQuery( '#lesson-course-options' ).chosen(); }
if ( jQuery( '#lesson-course-details #course-prerequisite-options' ).exists() ) { jQuery( '#lesson-course-details #course-prerequisite-options' ).chosen(); }
if ( jQuery( '#lesson-course-details #course-category-options' ).exists() ) { jQuery( '#lesson-course-details #course-category-options' ).chosen(); }
if ( jQuery( '#course-woocommerce-product-options' ).exists() && '-' != jQuery( '#course-woocommerce-product-options' ).val() ) { jQuery( '#course-woocommerce-product-options' ).chosen(); }

// Quiz edit panel
if ( jQuery( '#add-question-type-options' ).exists() ) { jQuery( '#add-question-type-options' ).chosen(); }
if ( jQuery( '#add-question-category-options' ).exists() ) { jQuery( '#add-question-category-options' ).chosen(); }
if ( jQuery( '#add-multiple-question-options' ).exists() ) { jQuery( '#add-multiple-question-options' ).chosen(); }

// Courses Write Panel
if ( jQuery( '#course-wc-product #course-woocommerce-product-options' ).exists() ) { jQuery( '#course-woocommerce-product-options' ).chosen(); }
if ( jQuery( '#add-multiple-question-category-options' ).exists() ) { jQuery( '#add-multiple-question-category-options' ).chosen(); }

// Sensei Settings Panel
jQuery( 'div.woothemes-sensei-settings form select' ).each( function() {
if ( !jQuery( this ).hasClass( 'range-input' ) ) {
jQuery( this ).chosen();
} // End If Statement
});

/***************************************************************************************************
* 5 - Quiz Question Functions.
***************************************************************************************************/

/**
Expand Down Expand Up @@ -1314,6 +1342,8 @@ jQuery(document).ready( function($) {
jQuery.fn.uploadQuestionMedia( jQuery( this ).closest( 'div' ).find( '.upload_media_file_button' ) );
});

jQuery( '#add-new-question .tab-content:not(:first)' ).addClass( 'hidden' );

jQuery( '.add-question-tabs .nav-tab' ).click( function() {
var tab_id = jQuery( this ).attr('id');
var tab_content_id = tab_id + '-content';
Expand Down Expand Up @@ -1356,34 +1386,6 @@ jQuery(document).ready( function($) {
});
});

/***************************************************************************************************
* 5 - Load Chosen Dropdowns.
***************************************************************************************************/

// Lessons Write Panel
if ( jQuery( '#lesson-complexity-options' ).exists() ) { jQuery( '#lesson-complexity-options' ).chosen(); }
if ( jQuery( '#lesson-prerequisite-options' ).exists() ) { jQuery( '#lesson-prerequisite-options' ).chosen(); }
if ( jQuery( '#lesson-course-options' ).exists() ) { jQuery( '#lesson-course-options' ).chosen(); }
if ( jQuery( '#lesson-course-details #course-prerequisite-options' ).exists() ) { jQuery( '#lesson-course-details #course-prerequisite-options' ).chosen(); }
if ( jQuery( '#lesson-course-details #course-category-options' ).exists() ) { jQuery( '#lesson-course-details #course-category-options' ).chosen(); }
if ( jQuery( '#course-woocommerce-product-options' ).exists() && '-' != jQuery( '#course-woocommerce-product-options' ).val() ) { jQuery( '#course-woocommerce-product-options' ).chosen(); }

// Quiz edit panel
if ( jQuery( '#add-question-type-options' ).exists() ) { jQuery( '#add-question-type-options' ).chosen(); }
if ( jQuery( '#add-question-category-options' ).exists() ) { jQuery( '#add-question-category-options' ).chosen(); }
if ( jQuery( '#add-multiple-question-options' ).exists() ) { jQuery( '#add-multiple-question-options' ).chosen(); }

// Courses Write Panel
if ( jQuery( '#course-wc-product #course-woocommerce-product-options' ).exists() ) { jQuery( '#course-woocommerce-product-options' ).chosen(); }
if ( jQuery( '#add-multiple-question-category-options' ).exists() ) { jQuery( '#add-multiple-question-category-options' ).chosen(); }

// Sensei Settings Panel
jQuery( 'div.woothemes-sensei-settings form select' ).each( function() {
if ( !jQuery( this ).hasClass( 'range-input' ) ) {
jQuery( this ).chosen();
} // End If Statement
});

/***************************************************************************************************
* 6 - Single Quiz Edit Screen.
***************************************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion assets/js/lesson-metadata.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** Sensei Changelog ***

2014.08.13 - version 1.6.4
* Fix - Fixing chosen input width in Category Questions tab

2014.08.05 - version 1.6.3
* New - Single class to manage Sensei notices
* Tweak - Adding missing text filter
Expand Down
4 changes: 2 additions & 2 deletions classes/class-woothemes-sensei-lesson.php
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ public function quiz_panel_add( $context = 'quiz' ) {

if( 'quiz' == $context ) {

$html .= '<div class="tab-content hidden" id="tab-existing-content">';
$html .= '<div class="tab-content" id="tab-existing-content">';

$html .= '<p><em>' . sprintf( __( 'Add an existing question to this quiz from the %1$squestion bank%2$s.', 'woothemes-sensei' ), '<a href="' . admin_url( 'edit.php?post_type=question' ) . '">', '</a>' ) . '</em></p>';

Expand Down Expand Up @@ -1062,7 +1062,7 @@ public function quiz_panel_add( $context = 'quiz' ) {
$html .= '</div>';

if ( ! empty( $question_cats ) && ! is_wp_error( $question_cats ) ) {
$html .= '<div class="tab-content hidden" id="tab-multiple-content">';
$html .= '<div class="tab-content" id="tab-multiple-content">';

$html .= '<p><em>' . sprintf( __( 'Add any number of questions from a specified category. Edit your question categories %1$shere%2$s.', 'woothemes-sensei' ), '<a href="' . admin_url( 'edit-tags.php?taxonomy=question-category&post_type=question' ) . '">', '</a>' ) . '</em></p>';

Expand Down
4 changes: 2 additions & 2 deletions woothemes-sensei.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Sensei
Plugin URI: http://www.woothemes.com/products/sensei/
Description: A course management plugin that offers the smoothest platform for helping you teach anything.
Version: 1.6.3
Version: 1.6.4
Author: WooThemes
Author URI: http://www.woothemes.com/
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down Expand Up @@ -37,7 +37,7 @@

global $woothemes_sensei;
$woothemes_sensei = new WooThemes_Sensei( __FILE__ );
$woothemes_sensei->version = '1.6.3';
$woothemes_sensei->version = '1.6.4';

/**
* Plugin updates
Expand Down

0 comments on commit 865f407

Please sign in to comment.