diff options
-rw-r--r-- | librevideojs-html5-player.php | 13 | ||||
-rw-r--r-- | librevideojs/js/mce-button.js | 29 |
2 files changed, 31 insertions, 11 deletions
diff --git a/librevideojs-html5-player.php b/librevideojs-html5-player.php index 2a50e91..1d39b60 100644 --- a/librevideojs-html5-player.php +++ b/librevideojs-html5-player.php @@ -88,16 +88,9 @@ function librevideojs_html5_player_enqueue_scripts() { $plugin_url = plugins_url('', __FILE__); wp_register_script('librevideojs', $plugin_url . '/librevideojs/js/cliplibrejs.dev.js', true); wp_enqueue_script('librevideojs'); - wp_register_style('librevideojs-mixteal-style', $plugin_url . '/librevideojs/css/mix-material/mix-teal.min.css'); - wp_enqueue_style('librevideojs-mixteal-style'); - wp_register_style('librevideojs-mixred-style', $plugin_url . '/librevideojs/css/mix-material/mix-red.min.css'); - wp_enqueue_style('librevideojs-mixred-style'); - //Abrir un directorio conocido, y proceder a leer su contenido - // foreach(glob($plugin_url . '/librevideojs/css/mix-material/*.min.css') as $theme) { - // wp_register_style('librevideojs-mixred-style', $theme); - // wp_enqueue_style('librevideojs-mixred-style'); - // } - wp_register_style('librevideojs-material-style', $plugin_url . '/librevideojs/css/librevideojs-material/libre-skin-teal.min.css'); + wp_register_style('librevideojs-mix-master-style', $plugin_url . '/librevideojs/css/mix-material/master.css'); + wp_enqueue_style('librevideojs-mix-master-style'); + wp_register_style('librevideojs-material-style', $plugin_url . '/librevideojs/css/librevideojs-material/master.css'); wp_enqueue_style('librevideojs-material-style'); wp_register_style('librevideojs-style', $plugin_url . '/librevideojs-html5-player.css'); wp_enqueue_style('librevideojs-style'); diff --git a/librevideojs/js/mce-button.js b/librevideojs/js/mce-button.js index f823366..03956da 100644 --- a/librevideojs/js/mce-button.js +++ b/librevideojs/js/mce-button.js @@ -44,6 +44,9 @@ var code = 'webm'; if (v.code) code = v.code; + var color = 'materialteal'; + if (v.color) + code = v.color; var content = ''; if (v.content) content = v.content; @@ -52,6 +55,27 @@ title: 'LibreVideoJS - Inserción de vídeo', body: [ { + type: 'listbox', + name: 'color', + label: 'Piel', + value: color, + 'values': [ + {text: 'mixblue', value: 'mixblue'}, + {text: 'mixgrey', value: 'mixgrey'}, + {text: 'mixpurple', value: 'mixpurple'}, + {text: 'mixred', value: 'mixred'}, + {text: 'mixteal', value: 'mixteal'}, + {text: 'mixyellow', value: 'mixyellow'}, + {text: 'materialblue', value: 'materialblue'}, + {text: 'materialgrey', value: 'materialgrey'}, + {text: 'materialpurple', value: 'materialpurple'}, + {text: 'materialred', value: 'materialred'}, + {text: 'materialyellow', value: 'materialyellow'}, + {text: 'materialteal', value: 'materialteal'}, + ], + tooltip: 'Selecciona el color' + }, + { type: 'textbox', name: 'url', label: 'URL', @@ -95,6 +119,8 @@ shortcode_str += ' poster="' + e.data.poster + '"'; if (typeof e.data.code != 'undefined' && e.data.code.length) shortcode_str += ' code="' + e.data.code + '"'; + if (typeof e.data.color != 'undefined' && e.data.color.length) + shortcode_str += ' skin="' + e.data.color + '"'; //add panel content shortcode_str += ']' + e.data.content + '[/' + sh_tag + ']'; @@ -111,7 +137,8 @@ editor.execCommand('librevideojs_popup', '', { url : '', poster: '', - code : 'webm', + code: 'webm', + color: '', content: '', }); } |