Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Fixed failed with size of video #658

Open
wants to merge 8 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ table.cmb_metabox .cmb_media_status .embed_status {
max-width: 800px;
}

table.cmb_metabox .cmb_media_status .embed_status iframe {
max-width: 100%;
}

/* line 235, style.scss */
table.cmb_metabox .cmb_media_status .img_status .cmb_remove_file_button, table.cmb_metabox .cmb_media_status .embed_status .cmb_remove_file_button {
text-indent: -9999px;
Expand Down
94 changes: 93 additions & 1 deletion css/style.min.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ table.cmb_metabox .cmb_media_status .img_status img, table.cmb_metabox .cmb_medi
table.cmb_metabox .cmb_media_status .embed_status {
float: left;
max-width:800px

iframe {
max-width: 100%;
}
}

table.cmb_metabox .cmb_media_status .img_status .cmb_remove_file_button, table.cmb_metabox .cmb_media_status .embed_status .cmb_remove_file_button {
Expand Down
30 changes: 25 additions & 5 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@
// Autoload helper classes
spl_autoload_register('cmb_Meta_Box::autoload_helpers');

// Define URL path
if ( ! defined( 'CMB_META_BOX_URL' ) )
define( 'CMB_META_BOX_URL', cmb_Meta_Box::get_meta_box_url() );

// Load translation
load_textdomain( 'cmb', trailingslashit( dirname(__FILE__) . '/lang' ) . get_locale() . '.mo' );

$meta_boxes = array();
$meta_boxes = apply_filters( 'cmb_meta_boxes', $meta_boxes );
foreach ( $meta_boxes as $meta_box ) {
$my_box = new cmb_Meta_Box( $meta_box );
}

define( 'CMB_META_BOX_URL', cmb_Meta_Box::get_meta_box_url() );

/**
* Create meta boxes
*/
Expand Down Expand Up @@ -244,7 +249,7 @@ public function register_scripts() {
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';

// scripts required for cmb
$scripts = array( 'jquery', 'jquery-ui-core', 'cmb-datepicker', /*'media-upload', */'cmb-timepicker' );
$scripts = array( 'jquery', 'jquery-ui-core', /* 'cmb-datepicker', 'media-upload', */'cmb-timepicker' );
// styles required for cmb
$styles = array();

Expand All @@ -268,7 +273,7 @@ public function register_scripts() {
$scripts[] = 'farbtastic';
$styles[] = 'farbtastic';
}
wp_register_script( 'cmb-datepicker', CMB_META_BOX_URL . 'js/jquery.datePicker.min.js' );
wp_enqueue_script( 'jquery-ui-datepicker' );
wp_register_script( 'cmb-timepicker', CMB_META_BOX_URL . 'js/jquery.timePicker.min.js' );
wp_register_script( 'cmb-scripts', CMB_META_BOX_URL .'js/cmb'. $min .'.js', $scripts, self::CMB_VERSION );

Expand All @@ -289,7 +294,22 @@ public function register_scripts() {
'down_arrow' => __( ' [ ↓ ]', 'cmb' ),
'check_toggle' => __( 'Select / Deselect All', 'cmb' ),
'defaults' => array(
'date_picker' => false,
'date_picker' => array(
'changeMonth' => true,
'changeYear' => true,
'showButtonPanel' => true,
'dateFormat' => __( 'yy-mm-dd', 'cmb' ),
'dayNames' => explode(',', __( 'Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday', 'cmb' )),
'dayNamesMin' => explode(',', __( 'Su, Mo, Tu, We, Th, Fr, Sa', 'cmb' ) ),
'dayNamesShort' => explode(',', __( 'Sun, Mon, Tue, Wed, Thu, Fri, Sat', 'cmb' ) ),
'monthNames' => explode(',', __( 'January, February, March, April, May, June, July, August, September, October, November, December', 'cmb' ) ),
'monthNamesShort' => explode(',', __( 'Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec', 'cmb') ),
'nextText' => __( 'Next', 'cmb' ),
'prevText' => __( 'Prev', 'cmb' ),
'currentText' => __( 'Today', 'cmb' ),
'closeText' => __( 'Done', 'cmb' ),
'clearText' => __( 'Clear', 'cmb' ),
),
'color_picker' => false,
'time_picker' => array(
'startTime' => '00:00',
Expand Down
7 changes: 1 addition & 6 deletions js/cmb.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,12 +610,7 @@ window.CMB = (function(window, document, $, undefined){
}

$selector.datepicker( "destroy" );
$selector.datepicker();

// Set the defaults if we have any
if ( cmb.defaults.datePicker && ! $.isEmptyObject( cmb.defaults.datePicker ) ) {
$.datepicker.setDefaults( cmb.defaults.datePicker );
}
$selector.datepicker( cmb.defaults.datePicker );
};

cmb.initColorPickers = function( $selector ) {
Expand Down
2 changes: 1 addition & 1 deletion js/cmb.min.js

Large diffs are not rendered by default.

Loading