Version Description
- Resolved wp_editor bug when sorting
Download this release
Release Info
Developer | metaphorcreations |
Plugin | Ditty News Ticker |
Version | 2.2.13 |
Comparing to | |
See all releases |
Code changes from version 2.2.12 to 2.2.13
- ditty-news-ticker.php +2 -2
- inc/admin/fields/fields.php +1 -1
- inc/static.php +1 -1
- inc/static/css/style.css +36 -16
- inc/static/js/partials/admin-general.js +18 -2
- inc/static/js/script-admin.js +2 -2
- inc/static/js/script-admin.min.js +1 -125
- readme.txt +4 -1
ditty-news-ticker.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://dittynewsticker.com/
|
|
5 |
Description: Ditty News Ticker is a multi-functional data display plugin
|
6 |
Text Domain: ditty-news-ticker
|
7 |
Domain Path: languages
|
8 |
-
Version: 2.2.
|
9 |
Author: Metaphor Creations
|
10 |
Author URI: http://www.metaphorcreations.com
|
11 |
Contributors: metaphorcreations
|
@@ -62,7 +62,7 @@ final class Ditty_News_Ticker {
|
|
62 |
|
63 |
// Plugin version
|
64 |
if ( ! defined( 'MTPHR_DNT_VERSION' ) ) {
|
65 |
-
define( 'MTPHR_DNT_VERSION', '2.2.
|
66 |
}
|
67 |
|
68 |
// Plugin Folder Path
|
5 |
Description: Ditty News Ticker is a multi-functional data display plugin
|
6 |
Text Domain: ditty-news-ticker
|
7 |
Domain Path: languages
|
8 |
+
Version: 2.2.13
|
9 |
Author: Metaphor Creations
|
10 |
Author URI: http://www.metaphorcreations.com
|
11 |
Contributors: metaphorcreations
|
62 |
|
63 |
// Plugin version
|
64 |
if ( ! defined( 'MTPHR_DNT_VERSION' ) ) {
|
65 |
+
define( 'MTPHR_DNT_VERSION', '2.2.13' );
|
66 |
}
|
67 |
|
68 |
// Plugin Folder Path
|
inc/admin/fields/fields.php
CHANGED
@@ -242,7 +242,7 @@ function mtphr_dnt_field_wysiwyg( $args=array() ) {
|
|
242 |
|
243 |
$editor_settings = array(
|
244 |
'textarea_name' => $name,
|
245 |
-
'textarea_rows' =>
|
246 |
);
|
247 |
if( isset($args['editor_settings']) && is_array($args['editor_settings']) ) {
|
248 |
$editor_settings = wp_parse_args($args['editor_settings'], $editor_settings);
|
242 |
|
243 |
$editor_settings = array(
|
244 |
'textarea_name' => $name,
|
245 |
+
'textarea_rows' => 3
|
246 |
);
|
247 |
if( isset($args['editor_settings']) && is_array($args['editor_settings']) ) {
|
248 |
$editor_settings = wp_parse_args($args['editor_settings'], $editor_settings);
|
inc/static.php
CHANGED
@@ -34,7 +34,7 @@ function mtphr_dnt_scripts() {
|
|
34 |
wp_register_script( 'jquery-easing', plugins_url('ditty-news-ticker/inc/static/js/jquery.easing.js'), array('jquery'), '1.4.1', true );
|
35 |
|
36 |
// Load the news ticker scripts
|
37 |
-
wp_enqueue_script( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/js/script-admin.min.js'), array( 'jquery','jquery-ui-core','jquery-ui-sortable', 'jquery-easing', 'qtip' ),
|
38 |
wp_localize_script( 'ditty-news-ticker', 'ditty_news_ticker_vars', array(
|
39 |
'security' => wp_create_nonce( 'ditty-news-ticker' ),
|
40 |
'img_title' => __( 'Upload or select an image', 'ditty-news-ticker' ),
|
34 |
wp_register_script( 'jquery-easing', plugins_url('ditty-news-ticker/inc/static/js/jquery.easing.js'), array('jquery'), '1.4.1', true );
|
35 |
|
36 |
// Load the news ticker scripts
|
37 |
+
wp_enqueue_script( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/js/script-admin.min.js'), array( 'jquery','jquery-ui-core','jquery-ui-sortable', 'jquery-easing', 'qtip' ), filemtime(MTPHR_DNT_DIR.'inc/static/js/script-admin.min.js'), true );
|
38 |
wp_localize_script( 'ditty-news-ticker', 'ditty_news_ticker_vars', array(
|
39 |
'security' => wp_create_nonce( 'ditty-news-ticker' ),
|
40 |
'img_title' => __( 'Upload or select an image', 'ditty-news-ticker' ),
|
inc/static/css/style.css
CHANGED
@@ -136,8 +136,10 @@
|
|
136 |
font-size: 30px;
|
137 |
color: #FFF;
|
138 |
margin: -15px 0 0 -15px;
|
139 |
-
-webkit-animation: mtphr-dnt-spinner-rotation .8s infinite linear;
|
140 |
-
animation: mtphr-dnt-spinner-rotation .8s infinite linear;
|
|
|
|
|
141 |
|
142 |
@-webkit-keyframes mtphr-dnt-spinner-rotation {
|
143 |
from {
|
@@ -145,13 +147,23 @@
|
|
145 |
to {
|
146 |
-webkit-transform: rotate(359deg); } }
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
@keyframes mtphr-dnt-spinner-rotation {
|
149 |
from {
|
150 |
-
|
151 |
-
transform: rotate(0deg); }
|
152 |
to {
|
153 |
-
|
154 |
-
transform: rotate(359deg); } }
|
155 |
|
156 |
/* --------------------------------------------------------- */
|
157 |
/* !Images */
|
@@ -168,10 +180,12 @@
|
|
168 |
margin-top: 0; }
|
169 |
.mtphr-dnt-image-container > *:last-child {
|
170 |
margin-bottom: 0; }
|
171 |
-
.mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-photo,
|
|
|
172 |
margin-top: 0;
|
173 |
margin-bottom: 0; }
|
174 |
-
.mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-caption,
|
|
|
175 |
position: absolute;
|
176 |
left: 0;
|
177 |
bottom: 0;
|
@@ -189,8 +203,8 @@
|
|
189 |
display: block; }
|
190 |
.mtphr-dnt-image-container.mtphr-dnt-image-caption-hover .mtphr-dnt-image-caption {
|
191 |
opacity: 0;
|
192 |
-
-webkit-transition: opacity .25s ease;
|
193 |
-
transition: opacity .25s ease; }
|
194 |
.mtphr-dnt-image-container.mtphr-dnt-image-caption-hover:hover .mtphr-dnt-image-caption {
|
195 |
opacity: 1; }
|
196 |
.mtphr-dnt-image-container .mtphr-dnt-image-photo {
|
@@ -249,8 +263,10 @@
|
|
249 |
|
250 |
.mtphr-dnt-nav-hide {
|
251 |
opacity: 0;
|
252 |
-
-webkit-transition: opacity .3s linear;
|
253 |
-
transition: opacity .3s linear;
|
|
|
|
|
254 |
|
255 |
.mtphr-dnt-tick-container:hover .mtphr-dnt-nav-hide {
|
256 |
opacity: 1; }
|
@@ -317,8 +333,8 @@
|
|
317 |
background-color: #333;
|
318 |
border-radius: 20px;
|
319 |
opacity: .8;
|
320 |
-
-webkit-transition: opacity .25s ease;
|
321 |
-
transition: opacity .25s ease; }
|
322 |
.mtphr-dnt-play-pause i:before {
|
323 |
vertical-align: middle; }
|
324 |
.mtphr-dnt-play-pause i.mtphr-dnt-icon-play {
|
@@ -340,13 +356,17 @@
|
|
340 |
color: #666;
|
341 |
background: #FFF;
|
342 |
padding: 6px 8px 4px 7px;
|
|
|
|
|
343 |
border-radius: 5px;
|
344 |
filter: alpha(opacity=50);
|
345 |
-moz-opacity: .5;
|
346 |
-khtml-opacity: .5;
|
347 |
opacity: .5;
|
348 |
-
-webkit-transition: opacity .2s linear;
|
349 |
-
transition: opacity .2s linear;
|
|
|
|
|
350 |
|
351 |
.mtphr-dnt-edit-link:hover {
|
352 |
color: #666;
|
136 |
font-size: 30px;
|
137 |
color: #FFF;
|
138 |
margin: -15px 0 0 -15px;
|
139 |
+
-webkit-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
|
140 |
+
-moz-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
|
141 |
+
-o-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
|
142 |
+
animation: mtphr-dnt-spinner-rotation 0.8s infinite linear; }
|
143 |
|
144 |
@-webkit-keyframes mtphr-dnt-spinner-rotation {
|
145 |
from {
|
147 |
to {
|
148 |
-webkit-transform: rotate(359deg); } }
|
149 |
|
150 |
+
@-moz-keyframes mtphr-dnt-spinner-rotation {
|
151 |
+
from {
|
152 |
+
-moz-transform: rotate(0deg); }
|
153 |
+
to {
|
154 |
+
-moz-transform: rotate(359deg); } }
|
155 |
+
|
156 |
+
@-o-keyframes mtphr-dnt-spinner-rotation {
|
157 |
+
from {
|
158 |
+
-o-transform: rotate(0deg); }
|
159 |
+
to {
|
160 |
+
-o-transform: rotate(359deg); } }
|
161 |
+
|
162 |
@keyframes mtphr-dnt-spinner-rotation {
|
163 |
from {
|
164 |
+
transform: rotate(0deg); }
|
|
|
165 |
to {
|
166 |
+
transform: rotate(359deg); } }
|
|
|
167 |
|
168 |
/* --------------------------------------------------------- */
|
169 |
/* !Images */
|
180 |
margin-top: 0; }
|
181 |
.mtphr-dnt-image-container > *:last-child {
|
182 |
margin-bottom: 0; }
|
183 |
+
.mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-photo,
|
184 |
+
.mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-photo {
|
185 |
margin-top: 0;
|
186 |
margin-bottom: 0; }
|
187 |
+
.mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-caption,
|
188 |
+
.mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-caption {
|
189 |
position: absolute;
|
190 |
left: 0;
|
191 |
bottom: 0;
|
203 |
display: block; }
|
204 |
.mtphr-dnt-image-container.mtphr-dnt-image-caption-hover .mtphr-dnt-image-caption {
|
205 |
opacity: 0;
|
206 |
+
-webkit-transition: opacity 0.25s ease;
|
207 |
+
transition: opacity 0.25s ease; }
|
208 |
.mtphr-dnt-image-container.mtphr-dnt-image-caption-hover:hover .mtphr-dnt-image-caption {
|
209 |
opacity: 1; }
|
210 |
.mtphr-dnt-image-container .mtphr-dnt-image-photo {
|
263 |
|
264 |
.mtphr-dnt-nav-hide {
|
265 |
opacity: 0;
|
266 |
+
-webkit-transition: opacity 0.3s linear;
|
267 |
+
-moz-transition: opacity 0.3s linear;
|
268 |
+
-o-transition: opacity 0.3s linear;
|
269 |
+
transition: opacity 0.3s linear; }
|
270 |
|
271 |
.mtphr-dnt-tick-container:hover .mtphr-dnt-nav-hide {
|
272 |
opacity: 1; }
|
333 |
background-color: #333;
|
334 |
border-radius: 20px;
|
335 |
opacity: .8;
|
336 |
+
-webkit-transition: opacity 0.25s ease;
|
337 |
+
transition: opacity 0.25s ease; }
|
338 |
.mtphr-dnt-play-pause i:before {
|
339 |
vertical-align: middle; }
|
340 |
.mtphr-dnt-play-pause i.mtphr-dnt-icon-play {
|
356 |
color: #666;
|
357 |
background: #FFF;
|
358 |
padding: 6px 8px 4px 7px;
|
359 |
+
-webkit-border-radius: 5px;
|
360 |
+
-moz-border-radius: 5px;
|
361 |
border-radius: 5px;
|
362 |
filter: alpha(opacity=50);
|
363 |
-moz-opacity: .5;
|
364 |
-khtml-opacity: .5;
|
365 |
opacity: .5;
|
366 |
+
-webkit-transition: opacity 0.2s linear;
|
367 |
+
-moz-transition: opacity 0.2s linear;
|
368 |
+
-o-transition: opacity 0.2s linear;
|
369 |
+
transition: opacity 0.2s linear; }
|
370 |
|
371 |
.mtphr-dnt-edit-link:hover {
|
372 |
color: #666;
|
inc/static/js/partials/admin-general.js
CHANGED
@@ -185,7 +185,7 @@ jQuery( document ).ready( function($) {
|
|
185 |
$(this).height($originals.eq(index).height());
|
186 |
});
|
187 |
return $helper;
|
188 |
-
}
|
189 |
});
|
190 |
|
191 |
$('.mtphr-dnt-sort-heading.optional').live( 'click', function(e) {
|
@@ -387,7 +387,23 @@ jQuery( document ).ready( function($) {
|
|
387 |
$(this).height($originals.eq(index).height());
|
388 |
});
|
389 |
return $helper;
|
390 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
});
|
392 |
|
393 |
function mtphr_dnt_list_handle_toggle() {
|
185 |
$(this).height($originals.eq(index).height());
|
186 |
});
|
187 |
return $helper;
|
188 |
+
},
|
189 |
});
|
190 |
|
191 |
$('.mtphr-dnt-sort-heading.optional').live( 'click', function(e) {
|
387 |
$(this).height($originals.eq(index).height());
|
388 |
});
|
389 |
return $helper;
|
390 |
+
},
|
391 |
+
start: function( e, ui ) {
|
392 |
+
var $item = $( ui.item );
|
393 |
+
//$item.parents( '.mtphr-dnt-field-mtphr_dnt_ticks' ).find( '.mtphr-dnt-list-item-contents' ).hide();
|
394 |
+
if ( $item.find('.wp-editor-container').length ) {
|
395 |
+
var id = $item.find( '.wp-editor-area' ).attr('id');
|
396 |
+
tinyMCE.execCommand( 'mceRemoveEditor', true, id );
|
397 |
+
}
|
398 |
+
},
|
399 |
+
stop: function( e, ui ) {
|
400 |
+
var $item = $( ui.item );
|
401 |
+
//$item.parents( '.mtphr-dnt-field-mtphr_dnt_ticks' ).find( '.mtphr-dnt-list-item-contents' ).show();
|
402 |
+
if ( $item.find('.wp-editor-container').length ) {
|
403 |
+
var id = $item.find( '.wp-editor-area' ).attr('id');
|
404 |
+
tinyMCE.execCommand( 'mceAddEditor', true, id );
|
405 |
+
}
|
406 |
+
},
|
407 |
});
|
408 |
|
409 |
function mtphr_dnt_list_handle_toggle() {
|
inc/static/js/script-admin.js
CHANGED
@@ -4,5 +4,5 @@
|
|
4 |
/* global ajaxurl:true */
|
5 |
/* global tinyMCE:true */
|
6 |
|
7 |
-
// @codekit-append '
|
8 |
-
// @codekit-append '
|
4 |
/* global ajaxurl:true */
|
5 |
/* global tinyMCE:true */
|
6 |
|
7 |
+
// @codekit-append 'partials/mtphr-dnt-affix.js';
|
8 |
+
// @codekit-append 'partials/admin-general.js';
|
inc/static/js/script-admin.min.js
CHANGED
@@ -1,125 +1 @@
|
|
1 |
-
/* global CodeMirror:true */
|
2 |
-
/* global wp:true */
|
3 |
-
/* global ditty_news_ticker_vars:true */
|
4 |
-
/* global ajaxurl:true */
|
5 |
-
/* global tinyMCE:true */
|
6 |
-
// @codekit-append '/partials/mtphr-dnt-affix.js';
|
7 |
-
// @codekit-append '/partials/admin-general.js';
|
8 |
-
/* ========================================================================
|
9 |
-
* Bootstrap: mtphr_dnt_affix.js v3.3.5
|
10 |
-
* http://getbootstrap.com/javascript/#mtphr_dnt_affix
|
11 |
-
* ========================================================================
|
12 |
-
* Copyright 2011-2015 Twitter, Inc.
|
13 |
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
14 |
-
* ======================================================================== */
|
15 |
-
!function(h){"use strict";
|
16 |
-
// AFFIX CLASS DEFINITION
|
17 |
-
// ======================
|
18 |
-
// AFFIX PLUGIN DEFINITION
|
19 |
-
// =======================
|
20 |
-
function i(n){return this.each(function(){var t=h(this),e=t.data("bs.mtphr_dnt_affix"),i="object"==typeof n&&n;e||t.data("bs.mtphr_dnt_affix",e=new d(this,i)),"string"==typeof n&&e[n]()})}var d=function(t,e){this.options=h.extend({},d.DEFAULTS,e),this.$target=h(this.options.target).on("scroll.bs.mtphr_dnt_affix.data-api",h.proxy(this.checkPosition,this)).on("click.bs.mtphr_dnt_affix.data-api",h.proxy(this.checkPositionWithEventLoop,this)),this.$element=h(t),this.mtphr_dnt_affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};d.VERSION="3.3.5",d.RESET="mtphr_dnt_affix mtphr_dnt_affix-top mtphr_dnt_affix-bottom",d.DEFAULTS={offset:0,target:window},d.prototype.getState=function(t,e,i,n){var r=this.$target.scrollTop(),a=this.$element.offset(),o=this.$target.height();if(null!==i&&"top"===this.mtphr_dnt_affixed)return r<i&&"top";if("bottom"===this.mtphr_dnt_affixed)return null!==i?!(r+this.unpin<=a.top)&&"bottom":!(r+o<=t-n)&&"bottom";var s=null===this.mtphr_dnt_affixed,h=s?r:a.top,d;return null!==i&&r<=i?"top":null!==n&&t-n<=h+(s?o:e)&&"bottom"},d.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(d.RESET).addClass("mtphr_dnt_affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},d.prototype.checkPositionWithEventLoop=function(){setTimeout(h.proxy(this.checkPosition,this),1)},d.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,n=e.bottom,r=Math.max(h(document).height(),h(document.body).height());"object"!=typeof e&&(n=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof n&&(n=e.bottom(this.$element));var a=this.getState(r,t,i,n);if(this.mtphr_dnt_affixed!==a){null!==this.unpin&&this.$element.css("top","");var o="mtphr_dnt_affix"+(a?"-"+a:""),s=h.Event(o+".bs.mtphr_dnt_affix");if(this.$element.trigger(s),s.isDefaultPrevented())return;this.mtphr_dnt_affixed=a,this.unpin="bottom"===a?this.getPinnedOffset():null,this.$element.removeClass(d.RESET).addClass(o).trigger(o.replace("mtphr_dnt_affix","mtphr_dnt_affixed")+".bs.mtphr_dnt_affix")}"bottom"===a&&this.$element.offset({top:r-t-n})}};var t=h.fn.mtphr_dnt_affix;h.fn.mtphr_dnt_affix=i,h.fn.mtphr_dnt_affix.Constructor=d,
|
21 |
-
// AFFIX NO CONFLICT
|
22 |
-
// =================
|
23 |
-
h.fn.mtphr_dnt_affix.noConflict=function(){return h.fn.mtphr_dnt_affix=t,this},
|
24 |
-
// AFFIX DATA-API
|
25 |
-
// ==============
|
26 |
-
h(window).on("load",function(){h('[data-spy="mtphr_dnt_affix"]').each(function(){var t=h(this),e=t.data();e.offset=e.offset||{},null!==e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!==e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery),jQuery(document).ready(function(o){
|
27 |
-
/* --------------------------------------------------------- */
|
28 |
-
/* !Metabox toggles - 2.0.0 */
|
29 |
-
/* --------------------------------------------------------- */
|
30 |
-
function e(t,e){
|
31 |
-
// Set the metaboxes
|
32 |
-
o("#mtphr-dnt-"+e+"-metaboxes > div").stop(!0,!0).hide();for(var i=t.attr("metabox").split(" "),n=0;n<i.length;n++)o("#"+i[n]).show();
|
33 |
-
// Set the button classes
|
34 |
-
t.siblings("a").removeClass("button-primary"),t.addClass("button-primary"),
|
35 |
-
// Store the new value
|
36 |
-
t.siblings("input").val(t.attr("href").substring(1))}
|
37 |
-
/* --------------------------------------------------------- */
|
38 |
-
/* !Mixed tick list - 2.0.0 */
|
39 |
-
/* --------------------------------------------------------- */
|
40 |
-
function t(t){var e;t.find("input").is(":checked")?t.next().fadeOut():t.next().fadeIn()}var i=o("#mtphr-dnt-settings-select"),n=o("#wpadminbar");
|
41 |
-
/* --------------------------------------------------------- */
|
42 |
-
/* !Affix the menu bar - 2.0.1 */
|
43 |
-
/* --------------------------------------------------------- */i.mtphr_dnt_affix({offset:{top:function(){return o(window).width()<601?this.top=i.offset().top+5:this.top=i.offset().top-n.height()+5}}}),
|
44 |
-
/* --------------------------------------------------------- */
|
45 |
-
/* !Main settings selects - 2.0.0 */
|
46 |
-
/* --------------------------------------------------------- */
|
47 |
-
o(".mtphr-dnt-metabox-group-toggle").click(function(t){t.preventDefault();var e=o(this).attr("href");o(".mtphr-dnt-metabox-group-toggle").removeClass("active"),o(".mtphr-dnt-metabox-group").removeClass("active"),o(this).addClass("active"),o(e).addClass("active"),
|
48 |
-
// Set the input data
|
49 |
-
o('input[name="_mtphr_dnt_admin_tab"]').val(e)}),
|
50 |
-
/* --------------------------------------------------------- */
|
51 |
-
/* !Initiate the CodeMirror fields - 1.4.0 */
|
52 |
-
/* --------------------------------------------------------- */
|
53 |
-
o(".mtphr-dnt-codemirror-css").each(function(){var t=o(this).children("textarea");CodeMirror.fromTextArea(t[0],{mode:"css",lineNumbers:!0,lineWrapping:!0,viewportMargin:1/0})}),o(".mtphr-dnt-codemirror-js").each(function(){var t=o(this).children("textarea"),e;CodeMirror.fromTextArea(t[0],{mode:"htmlmixed",lineNumbers:!0,lineWrapping:!0}).setSize(!1,140)}),
|
54 |
-
/* --------------------------------------------------------- */
|
55 |
-
/* !Code select - 1.4.0 */
|
56 |
-
/* --------------------------------------------------------- */
|
57 |
-
o(".mtphr-dnt-code-select").click(function(t){t.preventDefault();var e,i,n,r=o(this).siblings("pre")[0];o.browser.msie?((i=document.body.createTextRange()).moveToElementText(r),i.select()):o.browser.mozilla||o.browser.opera?(n=window.getSelection(),(i=document.createRange()).selectNodeContents(r),n.removeAllRanges(),n.addRange(i)):(o.browser.safari||o.browser.chrome)&&(n=window.getSelection()).setBaseAndExtent(r,0,r,1)}),
|
58 |
-
/* --------------------------------------------------------- */
|
59 |
-
/* !Ensure javascript is working - 2.0.0 */
|
60 |
-
/* --------------------------------------------------------- */
|
61 |
-
o('input[name="_mtphr_dnt_admin_javascript"]').length&&o('input[name="_mtphr_dnt_admin_javascript"]').val("ok"),o(".mtphr-dnt-type-toggle.button-primary").length&&e(o(".mtphr-dnt-type-toggle.button-primary"),"type"),o(".mtphr-dnt-mode-toggle.button-primary").length&&e(o(".mtphr-dnt-mode-toggle.button-primary"),"mode"),o(".mtphr-dnt-type-toggle").click(function(t){t.preventDefault(),o(this).hasClass("button-primary")||e(o(this),"type")}),o(".mtphr-dnt-mode-toggle").click(function(t){t.preventDefault(),o(this).hasClass("button-primary")||e(o(this),"mode")}),
|
62 |
-
/* --------------------------------------------------------- */
|
63 |
-
/* !Sort list - 1.4.4 */
|
64 |
-
/* --------------------------------------------------------- */
|
65 |
-
0<o(".mtphr-dnt-sort").length&&(o(".mtphr-dnt-sort").sortable({handle:".mtphr-dnt-sort-heading",items:".mtphr-dnt-sort-item",axis:"y",opacity:.7,placeholder:{element:function(t){var e=o(t).innerHeight();return o('<div class="mtphr-dnt-sort-placeholder" style="height:'+e+'px;"></div>')[0]},update:function(){}},helper:function(t,e){var i=e.children(),n=e.clone();return n.children().each(function(t){o(this).width(i.eq(t).width()),o(this).height(i.eq(t).height())}),n}}),o(".mtphr-dnt-sort-heading.optional").live("click",function(t){t.preventDefault();var e=o(this).parents(".mtphr-dnt-sort-item"),i=o(this).next(".mtphr-dnt-sort-item-fields"),n=o(this).children("input");e.hasClass("active")?(e.removeClass("active"),n.val("off"),i.length&&i.stop(!0,!0).slideUp(1e3,"easeOutQuint")):(e.addClass("active"),n.val("on"),i.length&&i.stop(!0,!0).slideDown(1e3,"easeOutQuint"))}))
|
66 |
-
/* --------------------------------------------------------- */
|
67 |
-
/* !List - 2.0.0 */
|
68 |
-
/* --------------------------------------------------------- */,o(".mtphr-dnt-list").mtphr_dnt_list(),
|
69 |
-
/* --------------------------------------------------------- */
|
70 |
-
/* !Single image upload - 2.0.0 */
|
71 |
-
/* --------------------------------------------------------- */
|
72 |
-
// Delete an image
|
73 |
-
o(".mtphr-dnt-single-image").find(".mtphr-dnt-delete").live("click",function(t){t.preventDefault();var e=o(this).parent(),i=e.siblings(".mtphr-dnt-single-image-upload"),n;e.siblings("input").val(""),e.remove(),i.show()}),
|
74 |
-
// Add an image
|
75 |
-
o(".mtphr-dnt-single-image-upload").live("click",function(t){t.preventDefault();
|
76 |
-
// Save the container
|
77 |
-
var i=o(this),n=i.parent(),r=n.children("input"),a;
|
78 |
-
// Create a custom uploader
|
79 |
-
if(!a)
|
80 |
-
// Set the uploader attributes
|
81 |
-
return(a=wp.media({title:ditty_news_ticker_vars.img_title,button:{text:ditty_news_ticker_vars.img_button,size:"small"},multiple:!1,library:{type:"image"}})).on("select",function(){var t=a.state().get("selection").toJSON();if(0<t.length){r.val(t[0].id);
|
82 |
-
// Create the display
|
83 |
-
var e={action:"mtphr_dnt_single_image_ajax",attachment:t[0],security:ditty_news_ticker_vars.security};jQuery.post(ajaxurl,e,function(t){i.hide(),n.append(t)})}}),
|
84 |
-
//Open the uploader dialog
|
85 |
-
a.open(),!1;a.open()});
|
86 |
-
/* --------------------------------------------------------- */
|
87 |
-
/* !Tool tips - 2.0.0 */
|
88 |
-
/* --------------------------------------------------------- */
|
89 |
-
var r={content:{attr:"data-tooltip"},style:{classes:"qtip-light qtip-rounded qtip-shadow"}};o('.mtphr-dnt-help[data-tooltip!=""]').qtip(r),o("body").on("click",'.mtphr-dnt-help[data-tooltip!=""]',function(t){t.preventDefault()}),o(".mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all").find("input").live("click",function(){t(o(this).parents(".mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all"))}),o(".mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all").each(function(){t(o(this))})}),
|
90 |
-
/* --------------------------------------------------------- */
|
91 |
-
/* !List */
|
92 |
-
/* --------------------------------------------------------- */
|
93 |
-
function(s){var e={init:function(i){return this.each(function(){function t(){1<a.find(".mtphr-dnt-list-item").length?(a.find(".mtphr-dnt-list-handle").show(),a.find(".mtphr-dnt-list-delete").show()):(a.find(".mtphr-dnt-list-handle").hide(),a.find(".mtphr-dnt-list-delete").hide())}function r(){a.find(".mtphr-dnt-list-item").each(function(n){s(this).find("textarea, input, select").each(function(){var t,e;if(s(this).hasClass("wp-editor-area")){var i=s(this).parents(".mtphr-dnt-field-type-wysiwyg");t=i.attr("data-name"),e=i.attr("data-key")}else t=s(this).attr("data-name"),e=s(this).attr("data-key");t&&e&&s(this).attr("name",t+"["+n+"]["+e+"]")})}),t()}function n(t,e){
|
94 |
-
// Save the container
|
95 |
-
var i=t.clone();
|
96 |
-
// Reset the duplicate
|
97 |
-
i.find("textarea, input, select").each(function(){"checkbox"===s(this).attr("type")||"radio"===s(this).attr("type")?s(this).removeAttr("checked"):s(this).val("")}),
|
98 |
-
// Setup new wysiwyg editors
|
99 |
-
i.find("textarea").each(function(){if(s(this).hasClass("wp-editor-area")){var n=s(this).parents(".mtphr-dnt-field-type-wysiwyg"),t=n.attr("data-name");n.children(".wp-core-ui").remove();
|
100 |
-
// Create the display
|
101 |
-
var e={action:"mtphr_dnt_wysiwyg_ajax",name:t,security:ditty_news_ticker_vars.security};jQuery.post(ajaxurl,e,function(t){var e,i=s(t).find("textarea").attr("id");n.append(t),"object"==typeof tinyMCE&&"function"==typeof tinyMCE.execCommand&&tinyMCE.execCommand("mceAddEditor",!1,i),
|
102 |
-
// Set the order
|
103 |
-
r()})}}),
|
104 |
-
// Add the duplicate
|
105 |
-
i.hide(),t.after(i),i.fadeIn().addClass(e),
|
106 |
-
// Add qtip support
|
107 |
-
i.find('.mtphr-dnt-help[data-tooltip!=""]').qtip(o),
|
108 |
-
// Set the order
|
109 |
-
r(),
|
110 |
-
// Trigger an added event
|
111 |
-
a.trigger("mtphr_dnt_list_item_added",[i,e])}
|
112 |
-
// Delete list item
|
113 |
-
// Create default options
|
114 |
-
var e={};
|
115 |
-
// Add any set options
|
116 |
-
i&&s.extend(e,i);var a=s(this),o={content:{attr:"data-tooltip"},style:{classes:"qtip-light qtip-rounded qtip-shadow"}};a.sortable({handle:".mtphr-dnt-list-heading",items:".mtphr-dnt-list-item",axis:"y",opacity:.7,placeholder:{element:function(t){var e=s(t).innerHeight();return s('<div class="mtphr-dnt-sort-placeholder" style="height:'+e+'px;"></div>')[0]},update:function(){}},helper:function(t,e){var i=e.children(),n=e.clone();return n.children().each(function(t){s(this).width(i.eq(t).width()),s(this).height(i.eq(t).height())}),n}}),a.find(".mtphr-dnt-list-delete").live("click",function(t){t.preventDefault(),
|
117 |
-
// Fade out the item
|
118 |
-
s(this).parents(".mtphr-dnt-list-item").fadeOut(function(){s(this).remove(),r()})}),
|
119 |
-
// Add new row
|
120 |
-
a.find(".mtphr-dnt-list-add").live("click",function(t){t.preventDefault(),n(s(this).parents(".mtphr-dnt-list-item"))}),a.on("mtphr_dnt_list_add_item",function(t,e,i){n(e,i)}),r()})}};
|
121 |
-
/**
|
122 |
-
* Setup the list
|
123 |
-
*
|
124 |
-
* @since 1.0.0
|
125 |
-
*/s.fn.mtphr_dnt_list=function(t){return e[t]?e[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void s.error("Method "+t+" does not exist in mtphr_dnt_list"):e.init.apply(this,arguments)}}(jQuery);
|
1 |
+
!function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.mtphr_dnt_affix"),a="object"==typeof e&&e;r||n.data("bs.mtphr_dnt_affix",r=new i(this,a)),"string"==typeof e&&r[e]()}))}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.mtphr_dnt_affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.mtphr_dnt_affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.mtphr_dnt_affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.5",i.RESET="mtphr_dnt_affix mtphr_dnt_affix-top mtphr_dnt_affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var r=this.$target.scrollTop(),a=this.$element.offset(),o=this.$target.height();if(null!==i&&"top"===this.mtphr_dnt_affixed)return r<i&&"top";if("bottom"===this.mtphr_dnt_affixed)return null!==i?!(r+this.unpin<=a.top)&&"bottom":!(r+o<=t-n)&&"bottom";var s=null===this.mtphr_dnt_affixed,d=s?r:a.top,h;return null!==i&&r<=i?"top":null!==n&&d+(s?o:e)>=t-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("mtphr_dnt_affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,r=n.top,a=n.bottom,o=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(a=r=n),"function"==typeof r&&(r=n.top(this.$element)),"function"==typeof a&&(a=n.bottom(this.$element));var s=this.getState(o,e,r,a);if(this.mtphr_dnt_affixed!==s){null!==this.unpin&&this.$element.css("top","");var d="mtphr_dnt_affix"+(s?"-"+s:""),h=t.Event(d+".bs.mtphr_dnt_affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.mtphr_dnt_affixed=s,this.unpin="bottom"===s?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(d).trigger(d.replace("mtphr_dnt_affix","mtphr_dnt_affixed")+".bs.mtphr_dnt_affix")}"bottom"===s&&this.$element.offset({top:o-e-a})}};var n=t.fn.mtphr_dnt_affix;t.fn.mtphr_dnt_affix=e,t.fn.mtphr_dnt_affix.Constructor=i,t.fn.mtphr_dnt_affix.noConflict=function(){return t.fn.mtphr_dnt_affix=n,this},t(window).on("load",(function(){t('[data-spy="mtphr_dnt_affix"]').each((function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!==n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!==n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)}))}))}(jQuery),jQuery(document).ready((function(t){function e(e,i){t("#mtphr-dnt-"+i+"-metaboxes > div").stop(!0,!0).hide();for(var n=e.attr("metabox").split(" "),r=0;r<n.length;r++)t("#"+n[r]).show();e.siblings("a").removeClass("button-primary"),e.addClass("button-primary"),e.siblings("input").val(e.attr("href").substring(1))}function i(t){var e;t.find("input").is(":checked")?t.next().fadeOut():t.next().fadeIn()}var n=t("#mtphr-dnt-settings-select"),r=t("#wpadminbar");n.mtphr_dnt_affix({offset:{top:function(){return t(window).width()<601?this.top=n.offset().top+5:this.top=n.offset().top-r.height()+5}}}),t(".mtphr-dnt-metabox-group-toggle").click((function(e){e.preventDefault();var i=t(this).attr("href");t(".mtphr-dnt-metabox-group-toggle").removeClass("active"),t(".mtphr-dnt-metabox-group").removeClass("active"),t(this).addClass("active"),t(i).addClass("active"),t('input[name="_mtphr_dnt_admin_tab"]').val(i)})),t(".mtphr-dnt-codemirror-css").each((function(){var e=t(this).children("textarea");CodeMirror.fromTextArea(e[0],{mode:"css",lineNumbers:!0,lineWrapping:!0,viewportMargin:1/0})})),t(".mtphr-dnt-codemirror-js").each((function(){var e=t(this).children("textarea"),i;CodeMirror.fromTextArea(e[0],{mode:"htmlmixed",lineNumbers:!0,lineWrapping:!0}).setSize(!1,140)})),t(".mtphr-dnt-code-select").click((function(e){e.preventDefault();var i,n,r,a=t(this).siblings("pre")[0];t.browser.msie?((n=document.body.createTextRange()).moveToElementText(a),n.select()):t.browser.mozilla||t.browser.opera?(r=window.getSelection(),(n=document.createRange()).selectNodeContents(a),r.removeAllRanges(),r.addRange(n)):(t.browser.safari||t.browser.chrome)&&(r=window.getSelection()).setBaseAndExtent(a,0,a,1)})),t('input[name="_mtphr_dnt_admin_javascript"]').length&&t('input[name="_mtphr_dnt_admin_javascript"]').val("ok"),t(".mtphr-dnt-type-toggle.button-primary").length&&e(t(".mtphr-dnt-type-toggle.button-primary"),"type"),t(".mtphr-dnt-mode-toggle.button-primary").length&&e(t(".mtphr-dnt-mode-toggle.button-primary"),"mode"),t(".mtphr-dnt-type-toggle").click((function(i){i.preventDefault(),t(this).hasClass("button-primary")||e(t(this),"type")})),t(".mtphr-dnt-mode-toggle").click((function(i){i.preventDefault(),t(this).hasClass("button-primary")||e(t(this),"mode")})),t(".mtphr-dnt-sort").length>0&&(t(".mtphr-dnt-sort").sortable({handle:".mtphr-dnt-sort-heading",items:".mtphr-dnt-sort-item",axis:"y",opacity:.7,placeholder:{element:function(e){var i=t(e).innerHeight();return t('<div class="mtphr-dnt-sort-placeholder" style="height:'+i+'px;"></div>')[0]},update:function(){}},helper:function(e,i){var n=i.children(),r=i.clone();return r.children().each((function(e){t(this).width(n.eq(e).width()),t(this).height(n.eq(e).height())})),r}}),t(".mtphr-dnt-sort-heading.optional").live("click",(function(e){e.preventDefault();var i=t(this).parents(".mtphr-dnt-sort-item"),n=t(this).next(".mtphr-dnt-sort-item-fields"),r=t(this).children("input");i.hasClass("active")?(i.removeClass("active"),r.val("off"),n.length&&n.stop(!0,!0).slideUp(1e3,"easeOutQuint")):(i.addClass("active"),r.val("on"),n.length&&n.stop(!0,!0).slideDown(1e3,"easeOutQuint"))}))),t(".mtphr-dnt-list").mtphr_dnt_list(),t(".mtphr-dnt-single-image").find(".mtphr-dnt-delete").live("click",(function(e){e.preventDefault();var i=t(this).parent(),n=i.siblings(".mtphr-dnt-single-image-upload"),r;i.siblings("input").val(""),i.remove(),n.show()})),t(".mtphr-dnt-single-image-upload").live("click",(function(e){e.preventDefault();var i=t(this),n=i.parent(),r=n.children("input"),a;if(!a)return(a=wp.media({title:ditty_news_ticker_vars.img_title,button:{text:ditty_news_ticker_vars.img_button,size:"small"},multiple:!1,library:{type:"image"}})).on("select",(function(){var t=a.state().get("selection").toJSON();if(t.length>0){r.val(t[0].id);var e={action:"mtphr_dnt_single_image_ajax",attachment:t[0],security:ditty_news_ticker_vars.security};jQuery.post(ajaxurl,e,(function(t){i.hide(),n.append(t)}))}})),a.open(),!1;a.open()}));var a={content:{attr:"data-tooltip"},style:{classes:"qtip-light qtip-rounded qtip-shadow"}};t('.mtphr-dnt-help[data-tooltip!=""]').qtip(a),t("body").on("click",'.mtphr-dnt-help[data-tooltip!=""]',(function(t){t.preventDefault()})),t(".mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all").find("input").live("click",(function(){i(t(this).parents(".mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all"))})),t(".mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all").each((function(){i(t(this))}))})),function(t){var e={init:function(e){return this.each((function(){function i(){o.find(".mtphr-dnt-list-item").length>1?(o.find(".mtphr-dnt-list-handle").show(),o.find(".mtphr-dnt-list-delete").show()):(o.find(".mtphr-dnt-list-handle").hide(),o.find(".mtphr-dnt-list-delete").hide())}function n(){o.find(".mtphr-dnt-list-item").each((function(e){t(this).find("textarea, input, select").each((function(){var i,n;if(t(this).hasClass("wp-editor-area")){var r=t(this).parents(".mtphr-dnt-field-type-wysiwyg");i=r.attr("data-name"),n=r.attr("data-key")}else i=t(this).attr("data-name"),n=t(this).attr("data-key");i&&n&&t(this).attr("name",i+"["+e+"]["+n+"]")}))})),i()}function r(e,i){var r=e.clone();r.find("textarea, input, select").each((function(){"checkbox"===t(this).attr("type")||"radio"===t(this).attr("type")?t(this).removeAttr("checked"):t(this).val("")})),r.find("textarea").each((function(){if(t(this).hasClass("wp-editor-area")){var e=t(this).parents(".mtphr-dnt-field-type-wysiwyg"),i=e.attr("data-name");e.children(".wp-core-ui").remove();var r={action:"mtphr_dnt_wysiwyg_ajax",name:i,security:ditty_news_ticker_vars.security};jQuery.post(ajaxurl,r,(function(i){var r,a=t(i).find("textarea").attr("id");e.append(i),"object"==typeof tinyMCE&&"function"==typeof tinyMCE.execCommand&&tinyMCE.execCommand("mceAddEditor",!1,a),n()}))}})),r.hide(),e.after(r),r.fadeIn().addClass(i),r.find('.mtphr-dnt-help[data-tooltip!=""]').qtip(s),n(),o.trigger("mtphr_dnt_list_item_added",[r,i])}var a={};e&&t.extend(a,e);var o=t(this),s={content:{attr:"data-tooltip"},style:{classes:"qtip-light qtip-rounded qtip-shadow"}};o.sortable({handle:".mtphr-dnt-list-heading",items:".mtphr-dnt-list-item",axis:"y",opacity:.7,placeholder:{element:function(e){var i=t(e).innerHeight();return t('<div class="mtphr-dnt-sort-placeholder" style="height:'+i+'px;"></div>')[0]},update:function(){}},helper:function(e,i){var n=i.children(),r=i.clone();return r.children().each((function(e){t(this).width(n.eq(e).width()),t(this).height(n.eq(e).height())})),r},start:function(e,i){var n=t(i.item);if(n.find(".wp-editor-container").length){var r=n.find(".wp-editor-area").attr("id");tinyMCE.execCommand("mceRemoveEditor",!0,r)}},stop:function(e,i){var n=t(i.item);if(n.find(".wp-editor-container").length){var r=n.find(".wp-editor-area").attr("id");tinyMCE.execCommand("mceAddEditor",!0,r)}}}),o.find(".mtphr-dnt-list-delete").live("click",(function(e){e.preventDefault(),t(this).parents(".mtphr-dnt-list-item").fadeOut((function(){t(this).remove(),n()}))})),o.find(".mtphr-dnt-list-add").live("click",(function(e){e.preventDefault(),r(t(this).parents(".mtphr-dnt-list-item"))})),o.on("mtphr_dnt_list_add_item",(function(t,e,i){r(e,i)})),n()}))}};t.fn.mtphr_dnt_list=function(i){return e[i]?e[i].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist in mtphr_dnt_list"):e.init.apply(this,arguments)}}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -72,6 +72,9 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
75 |
= 2.2.12 =
|
76 |
* Resolved javascript imagesloaded issue
|
77 |
|
@@ -522,4 +525,4 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
|
|
522 |
|
523 |
== Upgrade Notice ==
|
524 |
|
525 |
-
Resolved
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 2.2.13 =
|
76 |
+
* Resolved wp_editor bug when sorting
|
77 |
+
|
78 |
= 2.2.12 =
|
79 |
* Resolved javascript imagesloaded issue
|
80 |
|
525 |
|
526 |
== Upgrade Notice ==
|
527 |
|
528 |
+
Resolved wp_editor bug when sorting
|