Ditty News Ticker - Version 2.2.18

Version Description

  • Javascript update for WP 5.5
Download this release

Release Info

Developer metaphorcreations
Plugin Icon 128x128 Ditty News Ticker
Version 2.2.18
Comparing to
See all releases

Code changes from version 2.2.17 to 2.2.18

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.17
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
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.18
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
inc/static/css/style.css CHANGED
@@ -1,6 +1,9 @@
1
  .rtl .mtphr-dnt {
2
  direction: ltr; }
3
 
 
 
 
4
  .rtl .mtphr-dnt-tick {
5
  direction: rtl; }
6
 
@@ -141,10 +144,8 @@
141
  font-size: 30px;
142
  color: #FFF;
143
  margin: -15px 0 0 -15px;
144
- -webkit-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
145
- -moz-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
146
- -o-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
147
- animation: mtphr-dnt-spinner-rotation 0.8s infinite linear; }
148
 
149
  @-webkit-keyframes mtphr-dnt-spinner-rotation {
150
  from {
@@ -152,18 +153,6 @@
152
  to {
153
  -webkit-transform: rotate(359deg); } }
154
 
155
- @-moz-keyframes mtphr-dnt-spinner-rotation {
156
- from {
157
- -moz-transform: rotate(0deg); }
158
- to {
159
- -moz-transform: rotate(359deg); } }
160
-
161
- @-o-keyframes mtphr-dnt-spinner-rotation {
162
- from {
163
- -o-transform: rotate(0deg); }
164
- to {
165
- -o-transform: rotate(359deg); } }
166
-
167
  @keyframes mtphr-dnt-spinner-rotation {
168
  from {
169
  transform: rotate(0deg); }
@@ -185,12 +174,10 @@
185
  margin-top: 0; }
186
  .mtphr-dnt-image-container > *:last-child {
187
  margin-bottom: 0; }
188
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-photo,
189
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-photo {
190
  margin-top: 0;
191
  margin-bottom: 0; }
192
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-caption,
193
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-caption {
194
  position: absolute;
195
  left: 0;
196
  bottom: 0;
@@ -208,8 +195,7 @@
208
  display: block; }
209
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover .mtphr-dnt-image-caption {
210
  opacity: 0;
211
- -webkit-transition: opacity 0.25s ease;
212
- transition: opacity 0.25s ease; }
213
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover:hover .mtphr-dnt-image-caption {
214
  opacity: 1; }
215
  .mtphr-dnt-image-container .mtphr-dnt-image-photo {
@@ -268,10 +254,7 @@
268
 
269
  .mtphr-dnt-nav-hide {
270
  opacity: 0;
271
- -webkit-transition: opacity 0.3s linear;
272
- -moz-transition: opacity 0.3s linear;
273
- -o-transition: opacity 0.3s linear;
274
- transition: opacity 0.3s linear; }
275
 
276
  .mtphr-dnt-tick-container:hover .mtphr-dnt-nav-hide {
277
  opacity: 1; }
@@ -338,8 +321,7 @@
338
  background-color: #333;
339
  border-radius: 20px;
340
  opacity: .8;
341
- -webkit-transition: opacity 0.25s ease;
342
- transition: opacity 0.25s ease; }
343
  .mtphr-dnt-play-pause i:before {
344
  vertical-align: middle; }
345
  .mtphr-dnt-play-pause i.mtphr-dnt-icon-play {
@@ -360,17 +342,12 @@
360
  color: #666;
361
  background: #FFF;
362
  padding: 6px 8px 4px 7px;
363
- -webkit-border-radius: 5px;
364
- -moz-border-radius: 5px;
365
  border-radius: 5px;
366
  filter: alpha(opacity=50);
367
  -moz-opacity: .5;
368
  -khtml-opacity: .5;
369
  opacity: .5;
370
- -webkit-transition: opacity 0.2s linear;
371
- -moz-transition: opacity 0.2s linear;
372
- -o-transition: opacity 0.2s linear;
373
- transition: opacity 0.2s linear; }
374
 
375
  .mtphr-dnt-edit-link:hover {
376
  color: #666;
1
  .rtl .mtphr-dnt {
2
  direction: ltr; }
3
 
4
+ .rtl .mtphr-dnt-title {
5
+ direction: rtl; }
6
+
7
  .rtl .mtphr-dnt-tick {
8
  direction: rtl; }
9
 
144
  font-size: 30px;
145
  color: #FFF;
146
  margin: -15px 0 0 -15px;
147
+ -webkit-animation: mtphr-dnt-spinner-rotation .8s infinite linear;
148
+ animation: mtphr-dnt-spinner-rotation .8s infinite linear; }
 
 
149
 
150
  @-webkit-keyframes mtphr-dnt-spinner-rotation {
151
  from {
153
  to {
154
  -webkit-transform: rotate(359deg); } }
155
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  @keyframes mtphr-dnt-spinner-rotation {
157
  from {
158
  transform: rotate(0deg); }
174
  margin-top: 0; }
175
  .mtphr-dnt-image-container > *:last-child {
176
  margin-bottom: 0; }
177
+ .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-photo, .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-photo {
 
178
  margin-top: 0;
179
  margin-bottom: 0; }
180
+ .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-caption, .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-caption {
 
181
  position: absolute;
182
  left: 0;
183
  bottom: 0;
195
  display: block; }
196
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover .mtphr-dnt-image-caption {
197
  opacity: 0;
198
+ transition: opacity .25s ease; }
 
199
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover:hover .mtphr-dnt-image-caption {
200
  opacity: 1; }
201
  .mtphr-dnt-image-container .mtphr-dnt-image-photo {
254
 
255
  .mtphr-dnt-nav-hide {
256
  opacity: 0;
257
+ transition: opacity .3s linear; }
 
 
 
258
 
259
  .mtphr-dnt-tick-container:hover .mtphr-dnt-nav-hide {
260
  opacity: 1; }
321
  background-color: #333;
322
  border-radius: 20px;
323
  opacity: .8;
324
+ transition: opacity .25s ease; }
 
325
  .mtphr-dnt-play-pause i:before {
326
  vertical-align: middle; }
327
  .mtphr-dnt-play-pause i.mtphr-dnt-icon-play {
342
  color: #666;
343
  background: #FFF;
344
  padding: 6px 8px 4px 7px;
 
 
345
  border-radius: 5px;
346
  filter: alpha(opacity=50);
347
  -moz-opacity: .5;
348
  -khtml-opacity: .5;
349
  opacity: .5;
350
+ transition: opacity .2s linear; }
 
 
 
351
 
352
  .mtphr-dnt-edit-link:hover {
353
  color: #666;
inc/static/js/partials/admin-general.js CHANGED
@@ -188,7 +188,7 @@ jQuery( document ).ready( function($) {
188
  },
189
  });
190
 
191
- $('.mtphr-dnt-sort-heading.optional').live( 'click', function(e) {
192
  e.preventDefault();
193
 
194
  var $container = $(this).parents('.mtphr-dnt-sort-item'),
@@ -224,7 +224,7 @@ jQuery( document ).ready( function($) {
224
  /* --------------------------------------------------------- */
225
 
226
  // Delete an image
227
- $('.mtphr-dnt-single-image').find('.mtphr-dnt-delete').live( 'click', function(e) {
228
  e.preventDefault();
229
 
230
  var $image = $(this).parent(),
@@ -237,7 +237,7 @@ jQuery( document ).ready( function($) {
237
  });
238
 
239
  // Add an image
240
- $('.mtphr-dnt-single-image-upload').live( 'click', function(e) {
241
  e.preventDefault();
242
 
243
  // Save the container
@@ -322,7 +322,7 @@ jQuery( document ).ready( function($) {
322
  }
323
  }
324
 
325
- $('.mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all').find('input').live( 'click', function() {
326
  mtphr_dnt_mixed_ticks_all( $(this).parents('.mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all') );
327
  });
328
 
@@ -508,7 +508,7 @@ jQuery( document ).ready( function($) {
508
  }
509
 
510
  // Delete list item
511
- $table.find('.mtphr-dnt-list-delete').live( 'click', function(e) {
512
  e.preventDefault();
513
 
514
  // Fade out the item
@@ -519,7 +519,7 @@ jQuery( document ).ready( function($) {
519
  });
520
 
521
  // Add new row
522
- $table.find('.mtphr-dnt-list-add').live( 'click', function(e) {
523
  e.preventDefault();
524
  mtphr_dnt_list_add_item( $(this).parents('.mtphr-dnt-list-item') );
525
  });
188
  },
189
  });
190
 
191
+ $('body').on( 'click', '.mtphr-dnt-sort-heading.optional', function(e) {
192
  e.preventDefault();
193
 
194
  var $container = $(this).parents('.mtphr-dnt-sort-item'),
224
  /* --------------------------------------------------------- */
225
 
226
  // Delete an image
227
+ $('body').on( 'click', '.mtphr-dnt-single-image .mtphr-dnt-delete', function(e) {
228
  e.preventDefault();
229
 
230
  var $image = $(this).parent(),
237
  });
238
 
239
  // Add an image
240
+ $('body').on( 'click', '.mtphr-dnt-single-image-upload', function(e) {
241
  e.preventDefault();
242
 
243
  // Save the container
322
  }
323
  }
324
 
325
+ $('body').on( 'click', '.mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all input', function() {
326
  mtphr_dnt_mixed_ticks_all( $(this).parents('.mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all') );
327
  });
328
 
508
  }
509
 
510
  // Delete list item
511
+ $table.on( 'click', '.mtphr-dnt-list-delete', function(e) {
512
  e.preventDefault();
513
 
514
  // Fade out the item
519
  });
520
 
521
  // Add new row
522
+ $table.on( 'click', '.mtphr-dnt-list-add', function(e) {
523
  e.preventDefault();
524
  mtphr_dnt_list_add_item( $(this).parents('.mtphr-dnt-list-item') );
525
  });
inc/static/js/script-admin.min.js CHANGED
@@ -1 +1 @@
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);
1
+ !function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.mtphr_dnt_affix"),o="object"==typeof e&&e;r||n.data("bs.mtphr_dnt_affix",r=new i(this,o)),"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(),o=this.$element.offset(),a=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<=o.top)&&"bottom":!(r+a<=t-n)&&"bottom";var s=null===this.mtphr_dnt_affixed,d=s?r:o.top,h;return null!==i&&r<=i?"top":null!==n&&d+(s?a: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,o=n.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(o=r=n),"function"==typeof r&&(r=n.top(this.$element)),"function"==typeof o&&(o=n.bottom(this.$element));var s=this.getState(a,e,r,o);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:a-e-o})}};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,o=t(this).siblings("pre")[0];t.browser.msie?((n=document.body.createTextRange()).moveToElementText(o),n.select()):t.browser.mozilla||t.browser.opera?(r=window.getSelection(),(n=document.createRange()).selectNodeContents(o),r.removeAllRanges(),r.addRange(n)):(t.browser.safari||t.browser.chrome)&&(r=window.getSelection()).setBaseAndExtent(o,0,o,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("body").on("click",".mtphr-dnt-sort-heading.optional",(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("body").on("click",".mtphr-dnt-single-image .mtphr-dnt-delete",(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("body").on("click",".mtphr-dnt-single-image-upload",(function(e){e.preventDefault();var i=t(this),n=i.parent(),r=n.children("input"),o;if(!o)return(o=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=o.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)}))}})),o.open(),!1;o.open()}));var o={content:{attr:"data-tooltip"},style:{classes:"qtip-light qtip-rounded qtip-shadow"}};t('.mtphr-dnt-help[data-tooltip!=""]').qtip(o),t("body").on("click",'.mtphr-dnt-help[data-tooltip!=""]',(function(t){t.preventDefault()})),t("body").on("click",".mtphr-dnt-list-field-mtphr_dnt_mixed_ticks_all input",(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(){a.find(".mtphr-dnt-list-item").length>1?(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 n(){a.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,o=t(i).find("textarea").attr("id");e.append(i),"object"==typeof tinyMCE&&"function"==typeof tinyMCE.execCommand&&tinyMCE.execCommand("mceAddEditor",!1,o),n()}))}})),r.hide(),e.after(r),r.fadeIn().addClass(i),r.find('.mtphr-dnt-help[data-tooltip!=""]').qtip(s),n(),a.trigger("mtphr_dnt_list_item_added",[r,i])}var o={};e&&t.extend(o,e);var a=t(this),s={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(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)}}}),a.on("click",".mtphr-dnt-list-delete",(function(e){e.preventDefault(),t(this).parents(".mtphr-dnt-list-item").fadeOut((function(){t(this).remove(),n()}))})),a.on("click",".mtphr-dnt-list-add",(function(e){e.preventDefault(),r(t(this).parents(".mtphr-dnt-list-item"))})),a.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);
inc/static/sass/style.scss CHANGED
@@ -4,6 +4,9 @@
4
  .mtphr-dnt {
5
  direction: ltr;
6
  }
 
 
 
7
  .mtphr-dnt-tick {
8
  direction: rtl;
9
  }
4
  .mtphr-dnt {
5
  direction: ltr;
6
  }
7
+ .mtphr-dnt-title {
8
+ direction: rtl;
9
+ }
10
  .mtphr-dnt-tick {
11
  direction: rtl;
12
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: metaphorcreations
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FUZKZGAJSBAE6
4
  Tags: ticker, news, news ticker, rotator, data rotator, lists, data
5
  Requires at least: 4.5
6
- Tested up to: 5.4.2
7
  Stable tag: /trunk/
8
  License: GPL2
9
 
@@ -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.17 =
76
  * Bug fix with scrolling ticker
77
 
@@ -537,4 +540,4 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
537
 
538
  == Upgrade Notice ==
539
 
540
- Bug fix with scrolling ticker
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FUZKZGAJSBAE6
4
  Tags: ticker, news, news ticker, rotator, data rotator, lists, data
5
  Requires at least: 4.5
6
+ Tested up to: 5.5
7
  Stable tag: /trunk/
8
  License: GPL2
9
 
72
 
73
  == Changelog ==
74
 
75
+ = 2.2.18 =
76
+ * Javascript update for WP 5.5
77
+
78
  = 2.2.17 =
79
  * Bug fix with scrolling ticker
80
 
540
 
541
  == Upgrade Notice ==
542
 
543
+ Javascript update for WP 5.5