Best JavaScript code snippet using fast-check-monorepo
tie.js
Source:tie.js
1jQuery(document).ready(function() {2 jQuery('.tie-tooltip').tipsy({fade: true, gravity: 's'});3 if( jQuery('li.menu-top.toplevel_page_panel .tie-theme-update').length ){4 jQuery('li.menu-top.toplevel_page_panel .wp-menu-name').append( ' <span class="update-plugins"><span class="update-count">'+tieLang.update+'</span></span>' );5 }6 // Preview Fonts7 jQuery("select[name='tie_options[typography_test][font]']").change(function(){8 var selected_font = jQuery("select[name='tie_options[typography_test][font]'] option:selected").val();9 var parts = selected_font.split(':');10 var output = parts[0] ;11 jQuery("#tie-fonts-css").attr( 'href' , 'https://fonts.googleapis.com/css?family='+output );12 jQuery("#font-preview").css( "font-family" , output );13 });14 jQuery("input[name='tie_options[typography_test][color]']").change(function(){15 var selected_color = jQuery("input[name='tie_options[typography_test][color]']").val();16 jQuery("#font-preview").css( "color" , selected_color );17 });18 jQuery("select[name='tie_options[typography_test][size]']").change(function(){19 var selected_size = jQuery("select[name='tie_options[typography_test][size]'] option:selected").val();20 jQuery("#font-preview").css( "font-size" , selected_size+'px' );21 });22 jQuery("select[name='tie_options[typography_test][weight]']").change(function(){23 var selected_weight = jQuery("select[name='tie_options[typography_test][weight]'] option:selected").val();24 jQuery("#font-preview").css( "font-weight" , selected_weight );25 });26 jQuery("select[name='tie_options[typography_test][style]']").change(function(){27 var selected_style = jQuery("select[name='tie_options[typography_test][style]'] option:selected").val();28 jQuery("#font-preview").css( "font-style" , selected_style );29 });30// Del Preview Image31 jQuery(document).on("click", ".del-img" , function(){32 jQuery(this).parent().fadeOut(function() {33 jQuery(this).hide();34 jQuery(this).parent().find('input[class="img-path"]').attr('value', '' );35 });36 });37// Breaking News options38 var selected_breaking = jQuery("input[name='tie_options[breaking_type]']:checked").val();39 jQuery('#breaking_cat-item , #breaking_tag-item , #breaking_custom-item , #breaking_number-item').hide();40 if (selected_breaking == 'category') {jQuery('#breaking_cat-item , #breaking_number-item').show();}41 if (selected_breaking == 'tag') {jQuery('#breaking_tag-item , #breaking_number-item').show();}42 if (selected_breaking == 'custom') { jQuery('#breaking_custom-item').show(); }43 jQuery("input[name='tie_options[breaking_type]']").change(function(){44 var selected_breaking = jQuery("input[name='tie_options[breaking_type]']:checked").val();45 if (selected_breaking == 'category') {46 jQuery('#breaking_tag-item , #breaking_custom-item').hide();47 jQuery('#breaking_cat-item , #breaking_number-item').fadeIn();48 }49 if (selected_breaking == 'tag') {50 jQuery('#breaking_cat-item , #breaking_custom-item').hide();51 jQuery('#breaking_tag-item , #breaking_number-item').fadeIn();52 }53 if (selected_breaking == 'custom') {54 jQuery('#breaking_cat-item , #breaking_tag-item , #breaking_number-item').hide();55 jQuery('#breaking_custom-item').fadeIn();56 }57 });58// Single Post Head59 var selected_item = jQuery("select[name='tie_post_head'] option:selected").val();60 if (selected_item == 'video') {jQuery('#tie_video_url-item, #tie_video_self-item, #tie_embed_code-item').show();}61 if (selected_item == 'audio') {jQuery('#tie_audio_mp3-item, #tie_audio_m4a-item, #tie_audio_oga-item').show();}62 if (selected_item == 'soundcloud') {jQuery('#tie_audio_soundcloud-item, #tie_audio_soundcloud_play-item, #tie_audio_soundcloud_visual-item').show();}63 if (selected_item == 'slider') {jQuery('#tie_post_slider-item').show();}64 if (selected_item == 'map') {jQuery('#tie_googlemap_url-item').show();}65 jQuery("select[name='tie_post_head']").change(function(){66 var selected_item = jQuery("select[name='tie_post_head'] option:selected").val();67 if (selected_item == 'video') {68 jQuery('#tie_post_slider-item, #tie_googlemap_url-item, #tie_audio_mp3-item, #tie_audio_m4a-item, #tie_audio_oga-item, #tie_audio_soundcloud-item, #tie_audio_soundcloud_play-item, #tie_audio_soundcloud_visual-item').hide();69 jQuery('#tie_video_url-item, #tie_video_self-item, #tie_embed_code-item').fadeIn();70 }71 if (selected_item == 'audio') {72 jQuery('#tie_video_url-item, #tie_video_self-item, #tie_embed_code-item, #tie_post_slider-item, #tie_googlemap_url-item, #tie_audio_soundcloud-item, #tie_audio_soundcloud_play-item, #tie_audio_soundcloud_visual-item').hide();73 jQuery('#tie_audio_mp3-item, #tie_audio_m4a-item, #tie_audio_oga-item').fadeIn();74 }75 if (selected_item == 'soundcloud') {76 jQuery('#tie_video_url-item, #tie_video_self-item, #tie_embed_code-item, #tie_post_slider-item, #tie_googlemap_url-item, #tie_audio_mp3-item, #tie_audio_m4a-item, #tie_audio_oga-item').hide();77 jQuery('#tie_audio_soundcloud-item, #tie_audio_soundcloud_play-item, #tie_audio_soundcloud_visual-item').fadeIn();78 }79 if (selected_item == 'slider') {80 jQuery('#tie_video_url-item, #tie_video_self-item, #tie_embed_code-item, #tie_googlemap_url-item, #tie_audio_mp3-item, #tie_audio_m4a-item, #tie_audio_oga-item, #tie_audio_soundcloud-item, #tie_audio_soundcloud_play-item, #tie_audio_soundcloud_visual-item').hide();81 jQuery('#tie_post_slider-item').fadeIn();82 }83 if (selected_item == 'map') {84 jQuery('#tie_video_url-item, #tie_video_self-item, #tie_embed_code-item, #tie_post_slider-item, #tie_audio_mp3-item, #tie_audio_m4a-item, #tie_audio_oga-item, #tie_audio_soundcloud-item, #tie_audio_soundcloud_play-item, #tie_audio_soundcloud_visual-item').hide();85 jQuery('#tie_googlemap_url-item').fadeIn();86 }87 if (selected_item == 'thumb' || selected_item == 'none' || selected_item == '') {88 jQuery('#tie_video_url-item, #tie_video_self-item, #tie_embed_code-item, #tie_post_slider-item, #tie_googlemap_url-item, #tie_audio_mp3-item, #tie_audio_m4a-item, #tie_audio_oga-item, #tie_audio_soundcloud-item, #tie_audio_soundcloud_play-item, #tie_audio_soundcloud_visual-item').hide();89 }90 });91// Single page template Head92 var selected_item = jQuery("select[name='page_template'] option:selected").val();93 if (selected_item == 'template-blog.php' || selected_item == 'template-masonry.php' || selected_item == 'template-media.php' ) {jQuery('#tie-template-blog').show();}94 if (selected_item == 'template-best-reviews.php') {jQuery('#tie-template-blog, #tie_posts_num-item').show();}95 if (selected_item == 'template-authors.php') {jQuery('#tie-template-authors').show();}96 jQuery("select[name='page_template']").change(function(){97 var selected_item = jQuery("select[name='page_template'] option:selected").val();98 jQuery('#tie-template-blog, #tie-template-authors, #tie_posts_num-item').hide();99 if (selected_item == 'template-blog.php' || selected_item == 'template-masonry.php' || selected_item == 'template-media.php' ) {100 jQuery('#tie-template-blog').fadeIn();101 }102 if (selected_item == 'template-best-reviews.php') {103 jQuery('#tie-template-blog, #tie_posts_num-item').fadeIn();104 }105 if (selected_item == 'template-authors.php') {106 jQuery('#tie-template-authors').fadeIn();107 }108 });109// Slider Type110 var selected_pos = jQuery("input[name='slider_type']:checked").val();111 if (selected_pos == 'elastic') {jQuery('#elastic').show();}112 if (selected_pos == 'flexi') {jQuery('#flexi').show();}113 jQuery("input[name='slider_type']").change(function(){114 var selected_pos = jQuery("input[name='slider_type']:checked").val();115 if (selected_pos == 'elastic') {116 jQuery('#flexi').hide();117 jQuery('#elastic').fadeIn();118 }119 if (selected_pos == 'flexi') {120 jQuery('#elastic').hide();121 jQuery('#flexi').fadeIn();122 }123 });124// Slider Category Type125 var selected_pos = jQuery("input[name='tie_cat[slider_type]']:checked").val();126 if (selected_pos == 'elastic') {jQuery('#elastic').show();}127 if (selected_pos == 'flexi') {jQuery('#flexi').show();}128 jQuery("input[name='tie_cat[slider_type]']").change(function(){129 var selected_pos = jQuery("input[name='tie_cat[slider_type]']:checked").val();130 if (selected_pos == 'elastic') {131 jQuery('#flexi').hide();132 jQuery('#elastic').fadeIn();133 }134 if (selected_pos == 'flexi') {135 jQuery('#elastic').hide();136 jQuery('#flexi').fadeIn();137 }138 });139// Slider Query Type140 var selected_type = jQuery("input[name='slider_query']:checked").val();141 if (selected_type == 'category') {jQuery('#slider_cat-item').show();}142 if (selected_type == 'tag') {jQuery('#slider_tag-item').show();}143 if (selected_type == 'post') {jQuery('#slider_posts-item').show();}144 if (selected_type == 'page') {jQuery('#slider_pages-item').show();}145 if (selected_type == 'custom') {jQuery('#slider_custom-item').show();}146 jQuery("input[name='slider_query']").change(function(){147 var selected_type = jQuery("input[name='slider_query']:checked").val();148 if (selected_type == 'category') {149 jQuery('#slider_tag-item ,#slider_posts-item ,#slider_pages-item,#slider_custom-item').hide();150 jQuery('#slider_cat-item').fadeIn();151 }152 if (selected_type == 'tag') {153 jQuery('#slider_cat-item ,#slider_posts-item ,#slider_pages-item,#slider_custom-item').hide();154 jQuery('#slider_tag-item').fadeIn();155 }156 if (selected_type == 'post') {157 jQuery('#slider_cat-item ,#slider_tag-item ,#slider_pages-item,#slider_custom-item').hide();158 jQuery('#slider_posts-item').fadeIn();159 }160 if (selected_type == 'page') {161 jQuery('#slider_cat-item ,#slider_posts-item ,#slider_tag-item,#slider_custom-item').hide();162 jQuery('#slider_pages-item').fadeIn();163 }164 if (selected_type == 'custom') {165 jQuery('#slider_cat-item ,#slider_posts-item ,#slider_tag-item,#slider_pages-item').hide();166 jQuery('#slider_custom-item').fadeIn();167 }168 });169// Featured Posts Query Type170 var selected_type = jQuery("input[name='featured_posts_query']:checked").val();171 if (selected_type == 'category') {jQuery('#featured_posts_cat-item').show();}172 if (selected_type == 'tag') {jQuery('#featured_posts_tag-item').show();}173 if (selected_type == 'post') {jQuery('#featured_posts_posts-item').show();}174 if (selected_type == 'page') {jQuery('#featured_posts_pages-item').show();}175 if (selected_type == 'custom') {jQuery('#featured_posts_custom-item').show();}176 jQuery("input[name='featured_posts_query']").change(function(){177 var selected_type = jQuery("input[name='featured_posts_query']:checked").val();178 if (selected_type == 'category') {179 jQuery('#featured_posts_tag-item ,#featured_posts_posts-item ,#featured_posts_pages-item,#featured_posts_custom-item').hide();180 jQuery('#featured_posts_cat-item').fadeIn();181 }182 if (selected_type == 'tag') {183 jQuery('#featured_posts_cat-item ,#featured_posts_posts-item ,#featured_posts_pages-item,#featured_posts_custom-item').hide();184 jQuery('#featured_posts_tag-item').fadeIn();185 }186 if (selected_type == 'post') {187 jQuery('#featured_posts_cat-item ,#featured_posts_tag-item ,#featured_posts_pages-item,#featured_posts_custom-item').hide();188 jQuery('#featured_posts_posts-item').fadeIn();189 }190 if (selected_type == 'page') {191 jQuery('#featured_posts_cat-item ,#featured_posts_posts-item ,#featured_posts_tag-item,#featured_posts_custom-item').hide();192 jQuery('#featured_posts_pages-item').fadeIn();193 }194 if (selected_type == 'custom') {195 jQuery('#featured_posts_cat-item ,#featured_posts_posts-item ,#featured_posts_tag-item,#featured_posts_pages-item').hide();196 jQuery('#featured_posts_custom-item').fadeIn();197 }198 });199// Save Settings Alert200 jQuery(".mpanel-save").click( function() {201 jQuery('#save-alert').fadeIn();202 });203/* Page Builder204-------------------------------------------------------------------------------- */205 //Enable/Disable the Builder For the page206 jQuery("#tie_page_builder").click( function() {207 if( jQuery(this).hasClass( 'builder_active' ) ){208 jQuery(this).removeClass( 'button-primary builder_active' );209 jQuery( '#postdivrich, #pageparentdiv, #postimagediv, #tie_post_head_options_box, #tie_ads_options_box, #tie_sidebar_position_full' ).fadeIn();210 jQuery( '#Home_Builder' ).hide();211 jQuery( '#tie_builder_active' ).val( '' );212 }else{213 jQuery(this).addClass( 'button-primary builder_active' );214 jQuery( '#Home_Builder' ).fadeIn();215 jQuery( '#postdivrich, #pageparentdiv, #postimagediv, #tie_post_head_options_box, #tie_ads_options_box, #tie-template-authors, #tie-template-blog, #tie_sidebar_position_full' ).hide();216 jQuery( '#tie_builder_active' ).val( 'yes' );217 //Sidebar218 jQuery( '#tie_sidebar_pos_full').attr("checked","")219 jQuery( "#tie_sidebar_position_full").removeClass("selected");220 jQuery( "#tie_sidebar_position_default").addClass("selected");221 jQuery( '#tie_sidebar_pos_default' ).attr("checked","checked");222 //Page templates223 jQuery( '#page_template option:first-child' ).attr("selected","selected");224 }225 return false;226 });227 //If Builder Active hide boxes228 if ( jQuery("#tie_builder_active").val() == 'yes') {229 jQuery('#postdivrich, #pageparentdiv, #postimagediv, #tie_post_head_options_box, #tie_ads_options_box, #tie-template-authors, #tie-template-blog, #tie_sidebar_position_full').hide();230 }231 // Build The Boxes232 var tieCategories = jQuery('#cats_default').html();233 var tieCategoriesTabs = jQuery('#cats_default_tabs').html();234 var tieProductsCategories = jQuery('#products_default').html();235 jQuery(".add-cat").click(function() {236 var style = jQuery( this ).data( 'style' );237 jQuery('#cat_sortable').append('\238 <li id="listItem_'+ nextCell +'" class="ui-state-default">\239 <div class="widget-head"><img src="'+ templatePath +'/framework/admin/images/'+style+'-small.png" />'+ tieLang.bulider_block +'<a style="display:none" class="toggle-open">+</a><a style="display:block" class="toggle-close">-</a></div>\240 <div style="display:block" class="widget-content">\241 <label><span>'+ tieLang.bulider_category +'</span>\242 <select name="tie_home_cats['+ nextCell +'][id]" id="tie_home_cats['+ nextCell +'][id]">'+tieCategories+'</select>\243 </label>\244 <label><span>'+ tieLang.bulider_order +'</span>\245 <select name="tie_home_cats['+ nextCell +'][order]" id="tie_home_cats['+ nextCell +'][order]">\246 <option value="latest" selected="selected">'+ tieLang.bulider_latest +'</option>\247 <option value="rand">'+ tieLang.bulider_random +'</option>\248 </select>\249 </label>\250 <label for="tie_home_cats['+ nextCell +'][number]">\251 <span>'+ tieLang.bulider_posts +'</span>\252 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][number]" name="tie_home_cats['+ nextCell +'][number]" value="5" type="text" />\253 </label>\254 <label for="tie_home_cats['+ nextCell +'][offset]">\255 <span>'+ tieLang.bulider_offset +'</span>\256 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][offset]" name="tie_home_cats['+ nextCell +'][offset]" value="" type="text" />\257 </label>\258 <label for="tie_home_cats['+ nextCell +'][thumb_first]">\259 <span>'+ tieLang.bulider_thumbnail +'</span>\260 <input class="on-of" type="checkbox" name="tie_home_cats['+ nextCell +'][thumb_first]" value="true" />\261 </label>\262 <label for="tie_home_cats['+ nextCell +'][thumb_small]">\263 <span>'+ tieLang.bulider_thumbnails +'</span>\264 <input class="on-of" type="checkbox" name="tie_home_cats['+ nextCell +'][thumb_small]" value="true" />\265 </label>\266 <input id="tie_home_cats['+ nextCell +'][style]" name="tie_home_cats['+ nextCell +'][style]" type="hidden" value="'+style+'" />\267 <input id="tie_home_cats['+ nextCell +'][type]" name="tie_home_cats['+ nextCell +'][type]" value="n" type="hidden" />\268 <a class="del-cat"></a>\269 </div>\270 </li>');271 jQuery('#listItem_'+ nextCell).find('.on-of').checkbox({empty: emptyImg });272 jQuery('#listItem_'+ nextCell).hide().fadeIn();273 nextCell ++ ;274 });275 jQuery("#add-slider").click(function() {276 jQuery('#cat_sortable').append('\277 <li id="listItem_'+ nextCell +'" class="ui-state-default">\278 <div class="widget-head"><img src="'+ templatePath +'/framework/admin/images/scrolling-small.png" />'+ tieLang.bulider_scrolling +'<a style="display:none" class="toggle-open">+</a><a style="display:block" class="toggle-close">-</a></div>\279 <div class="widget-content" style="display:block">\280 <label>\281 <span>'+ tieLang.bulider_category +'</span>\282 <select name="tie_home_cats['+ nextCell +'][id]" id="tie_home_cats['+ nextCell +'][id]">'+tieCategories+'</select>\283 </label>\284 <label for="tie_home_cats['+ nextCell +'][title]">\285 <span>'+ tieLang.bulider_title +'</span>\286 <input id="tie_home_cats['+ nextCell +'][title]" name="tie_home_cats['+ nextCell +'][title]" value="'+ tieLang.bulider_scrolling +'" type="text" />\287 </label>\288 <label for="tie_home_cats['+ nextCell +'][number]">\289 <span>'+ tieLang.bulider_posts +'</span>\290 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][number]" name="tie_home_cats['+ nextCell +'][number]" value="12" type="text" />\291 </label>\292 <label for="tie_home_cats['+ nextCell +'][offset]">\293 <span>'+ tieLang.bulider_offset +'</span>\294 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][offset]" name="tie_home_cats['+ nextCell +'][offset]" value="" type="text" />\295 </label>\296 <input id="tie_home_cats['+ nextCell +'][boxid]" name="tie_home_cats['+ nextCell +'][boxid]" value="s_'+ 1 + Math.floor(Math.random() * 1500)+'" type="hidden" />\297 <input id="tie_home_cats['+ nextCell +'][type]" name="tie_home_cats['+ nextCell +'][type]" value="s" type="hidden" />\298 <a class="del-cat"></a>\299 </div>\300 </li>');301 jQuery('#listItem_'+ nextCell).hide().fadeIn();302 nextCell ++ ;303 });304 jQuery(".add-news-picture").click(function() {305 var style = jQuery( this ).data( 'style' );306 jQuery('#cat_sortable').append('\307 <li id="listItem_'+ nextCell +'" class="ui-state-default">\308 <div class="widget-head"><img src="'+ templatePath +'/framework/admin/images/pic-'+style+'-small.png" />'+ tieLang.bulider_picture +'<a style="display:none" class="toggle-open">+</a><a style="display:block" class="toggle-close">-</a></div>\309 <div class="widget-content" style="display:block">\310 <label>\311 <span>'+ tieLang.bulider_category +'</span>\312 <select name="tie_home_cats['+ nextCell +'][id]" id="tie_home_cats['+ nextCell +'][id]">'+tieCategories+'</select>\313 </label>\314 <label for="tie_home_cats['+ nextCell +'][title]">\315 <span>'+ tieLang.bulider_title +'</span>\316 <input id="tie_home_cats['+ nextCell +'][title]" name="tie_home_cats['+ nextCell +'][title]" value="News In Picture" type="text" />\317 </label>\318 <label for="tie_home_cats['+ nextCell +'][offset]">\319 <span>'+ tieLang.bulider_offset +'</span>\320 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][offset]" name="tie_home_cats['+ nextCell +'][offset]" value="" type="text" />\321 </label>\322 <input id="tie_home_cats['+ nextCell +'][boxid]" name="tie_home_cats['+ nextCell +'][boxid]" value="news-pic_'+ 1 + Math.floor(Math.random() * 1500)+'" type="hidden" />\323 <input id="tie_home_cats['+ nextCell +'][type]" name="tie_home_cats['+ nextCell +'][type]" value="news-pic" type="hidden" />\324 <input id="tie_home_cats['+ nextCell +'][style]" name="tie_home_cats['+ nextCell +'][style]" type="hidden" value="'+style+'" />\325 <a class="del-cat"></a>\326 </div>\327 </li>');328 jQuery('#listItem_'+ nextCell).hide().fadeIn();329 nextCell ++ ;330 });331 jQuery("#add-news-videos").click(function() {332 jQuery('#cat_sortable').append('\333 <li id="listItem_'+ nextCell +'" class="ui-state-default">\334 <div class="widget-head"><img src="'+ templatePath +'/framework/admin/images/videos-small.png" />'+ tieLang.bulider_videos +'<a style="display:none" class="toggle-open">+</a><a style="display:block" class="toggle-close">-</a></div>\335 <div class="widget-content" style="display:block">\336 <label>\337 <span>'+ tieLang.bulider_category +'</span>\338 <select name="tie_home_cats['+ nextCell +'][id]" id="tie_home_cats['+ nextCell +'][id]">'+tieCategories+'</select>\339 </label>\340 <label for="tie_home_cats['+ nextCell +'][title]">\341 <span>'+ tieLang.bulider_title +'</span>\342 <input id="tie_home_cats['+ nextCell +'][title]" name="tie_home_cats['+ nextCell +'][title]" value="'+ tieLang.bulider_videos +'" type="text" />\343 </label>\344 <label for="tie_home_cats['+ nextCell +'][offset]">\345 <span>'+ tieLang.bulider_offset +'</span>\346 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][offset]" name="tie_home_cats['+ nextCell +'][offset]" value="" type="text" />\347 </label>\348 <label for="tie_home_cats['+ nextCell +'][lightbox]">\349 <span>'+ tieLang.bulider_lightbox +'</span>\350 <input class="on-of" type="checkbox" name="tie_home_cats['+ nextCell +'][lightbox]" value="true" checked="checked" />\351 </label>\352 <p class="tie_message_hint">'+ tieLang.bulider_videos_lightbox +'</p>\353 <input id="tie_home_cats['+ nextCell +'][boxid]" name="tie_home_cats['+ nextCell +'][boxid]" value="videos_'+ 1 + Math.floor(Math.random() * 1500)+'" type="hidden" />\354 <input id="tie_home_cats['+ nextCell +'][type]" name="tie_home_cats['+ nextCell +'][type]" value="videos" type="hidden" />\355 <a class="del-cat"></a>\356 </div>\357 </li>');358 jQuery('#listItem_'+ nextCell).find('.on-of').checkbox({empty: emptyImg });359 jQuery('#listItem_'+ nextCell).hide().fadeIn();360 nextCell ++ ;361 });362 jQuery(".add-recent").click(function() {363 var style = jQuery( this ).data( 'style' );364 var num = 15 ;365 if( style == 'default' ){366 num = 3;367 }368 var recentBox = '\369 <li id="listItem_'+ nextCell +'" class="ui-state-default">\370 <div class="widget-head"><img src="'+ templatePath +'/framework/admin/images/recent-'+style+'-small.png" />'+ tieLang.bulider_recent +'<a style="display:none" class="toggle-open">+</a><a style="display:block" class="toggle-close">-</a></div>\371 <div style="display:block" class="widget-content">\372 <label>\373 <span class="option-contents">'+ tieLang.bulider_exclude +'</span>\374 <select multiple="multiple" name="tie_home_cats['+ nextCell +'][exclude][]" id="tie_home_cats['+ nextCell +'][exclude][]">'+tieCategories+'</select>\375 </label>\376 <label for="tie_home_cats['+ nextCell +'][title]">\377 <span>'+ tieLang.bulider_title +'</span>\378 <input id="tie_home_cats['+ nextCell +'][title]" name="tie_home_cats['+ nextCell +'][title]" value="'+ tieLang.bulider_recent +'" type="text" />\379 </label>\380 <label for="tie_home_cats['+ nextCell +'][number]">\381 <span>'+ tieLang.bulider_posts +'</span>\382 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][number]" name="tie_home_cats['+ nextCell +'][number]" value="'+num+'" type="text" />\383 </label>\384 <label for="tie_home_cats['+ nextCell +'][offset]">\385 <span>'+ tieLang.bulider_offset +'</span>\386 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][offset]" name="tie_home_cats['+ nextCell +'][offset]" value="" type="text" />\387 </label>\388 <label for="tie_home_cats['+ nextCell +'][pagi]">\389 <span>'+ tieLang.bulider_pagination +'</span>\390 <input class="on-of" type="checkbox" name="tie_home_cats['+ nextCell +'][pagi]" value="true" />\391 </label>';392 if( style != 'default' ){393 recentBox += '\394 <label for="tie_home_cats['+ nextCell +'][share]">\395 <span>'+ tieLang.bulider_social +'</span>\396 <input class="on-of" type="checkbox" name="tie_home_cats['+ nextCell +'][share]" value="true" />\397 </label>';398 }399 recentBox += '\400 <input id="tie_home_cats['+ nextCell +'][display]" name="tie_home_cats['+ nextCell +'][display]" type="hidden" value="'+style+'" />\401 <p class="tie_message_hint">'+ tieLang.bulider_warning +'</p>\402 <input id="tie_home_cats['+ nextCell +'][boxid]" name="tie_home_cats['+ nextCell +'][boxid]" value="recent_'+ 1 + Math.floor(Math.random() * 1500)+'" type="hidden" />\403 <input id="tie_home_cats['+ nextCell +'][type]" name="tie_home_cats['+ nextCell +'][type]" value="recent" type="hidden" />\404 <a class="del-cat"></a>\405 </div>\406 </li>';407 jQuery('#cat_sortable').append( recentBox );408 jQuery('#listItem_'+ nextCell).find('.on-of').checkbox({empty: emptyImg });409 jQuery('#listItem_'+ nextCell).hide().fadeIn();410 nextCell ++ ;411 });412 jQuery("#add-tabs").click(function() {413 var tabsContent = '';414 jQuery.each( categoriesTabs, function( key, value ) {415 tabsContent = tabsContent+'<li>\416 <input name="tie_home_cats['+ nextCell +'][cat][]" type="checkbox" value="'+key+'">\417 <span>'+value+'</span>\418 </li>\419 ';420 });421 jQuery('#cat_sortable').append('\422 <li id="listItem_'+ nextCell +'" class="ui-state-default">\423 <div class="widget-head"><img src="'+ templatePath +'/framework/admin/images/tabs-small.png" />'+ tieLang.bulider_tabs +'<a style="display:none" class="toggle-open">+</a><a style="display:block" class="toggle-close">-</a></div>\424 <div style="display:block" class="widget-content">\425 <span class="label">'+ tieLang.bulider_categories +'</span>\426 <div class="clear"></div> <p></p>\427 <ul class="tabs_cats">\428 '+tabsContent+'\429 </ul>\430 <input id="tie_home_cats['+ nextCell +'][boxid]" name="tie_home_cats['+ nextCell +'][boxid]" value="tabs_'+ 1 + Math.floor(Math.random() * 1500)+'" type="hidden" />\431 <input id="tie_home_cats['+ nextCell +'][type]" name="tie_home_cats['+ nextCell +'][type]" value="tabs" type="hidden" />\432 <a class="del-cat"></a>\433 </div>\434 </li>');435 jQuery('#listItem_'+ nextCell).hide().fadeIn();436 nextCell ++ ;437 });438 jQuery("#add-products").click(function() {439 jQuery('#cat_sortable').append('\440 <li id="listItem_'+ nextCell +'" class="ui-state-default">\441 <div class="widget-head"><img src="'+ templatePath +'/framework/admin/images/woo-small.png" />'+ tieLang.bulider_woocommerce +'<a style="display:none" class="toggle-open">+</a><a style="display:block" class="toggle-close">-</a></div>\442 <div style="display:block" class="widget-content">\443 <label>\444 <span class="option-contents">'+ tieLang.bulider_categories +'</span>\445 <select multiple="multiple" name="tie_home_cats['+ nextCell +'][cats][]" id="tie_home_cats['+ nextCell +'][cats][]">'+tieProductsCategories+'</select>\446 </label>\447 <label for="tie_home_cats['+ nextCell +'][title]">\448 <span>'+ tieLang.bulider_title +'</span>\449 <input id="tie_home_cats['+ nextCell +'][title]" name="tie_home_cats['+ nextCell +'][title]" value="'+ tieLang.bulider_recent_products +'" type="text" />\450 </label>\451 <label for="tie_home_cats['+ nextCell +'][number]">\452 <span>'+ tieLang.bulider_products +'</span>\453 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][number]" name="tie_home_cats['+ nextCell +'][number]" value="3" type="text" />\454 </label>\455 <label for="tie_home_cats['+ nextCell +'][offset]">\456 <span>'+ tieLang.bulider_pro_offset +'</span>\457 <input style="width:50px;" id="tie_home_cats['+ nextCell +'][offset]" name="tie_home_cats['+ nextCell +'][offset]" value="" type="text" />\458 </label>\459 <label for="tie_home_cats['+ nextCell +'][display]">\460 <span>'+ tieLang.bulider_mode +'</span>\461 <select id="tie_home_cats['+ nextCell +'][display]" name="tie_home_cats['+ nextCell +'][display]">\462 <option value="default">'+ tieLang.bulider_default +'</option>\463 <option value="scrolling">'+ tieLang.bulider_scroll +'</option>\464 </select>\465 </label>\466 <input id="tie_home_cats['+ nextCell +'][boxid]" name="tie_home_cats['+ nextCell +'][boxid]" value="recent_'+ 1 + Math.floor(Math.random() * 1500)+'" type="hidden" />\467 <input id="tie_home_cats['+ nextCell +'][type]" name="tie_home_cats['+ nextCell +'][type]" value="woocommerce" type="hidden" />\468 <a class="del-cat"></a>\469 </div>\470 </li>');471 jQuery('#listItem_'+ nextCell).hide().fadeIn();472 nextCell ++ ;473 });474 jQuery("#add-ads").click(function() {475 jQuery('#cat_sortable').append('\476 <li id="listItem_'+ nextCell +'" class="ui-state-default">\477 <div class="widget-head"><img src="'+ templatePath +'/framework/admin/images/code-small.png" />'+ tieLang.bulider_text_html +'<a style="display:none" class="toggle-open">+</a><a style="display:block" class="toggle-close">-</a></div>\478 <div class="widget-content" style="display:block">\479 <textarea name="tie_home_cats['+ nextCell +'][text]" id="tie_home_cats['+ nextCell +'][text]"></textarea>\480 <small>'+ tieLang.bulider_supports +'</small>\481 <input id="tie_home_cats['+ nextCell +'][boxid]" name="tie_home_cats['+ nextCell +'][boxid]" value="ads_'+ 1 + Math.floor(Math.random() * 1500)+'" type="hidden" />\482 <input id="tie_home_cats['+ nextCell +'][type]" name="tie_home_cats['+ nextCell +'][type]" value="ads" type="hidden" />\483 <a class="del-cat"></a>\484 </div>\485 </li>');486 jQuery('#listItem_'+ nextCell).hide().fadeIn();487 nextCell ++ ;488 });489/*---------------------------------------------------------------------- END OF THE BUILDER */490// Toggle open/Close491 jQuery(document).on("click", ".toggle-open" , function(){492 jQuery(this).parent().parent().find(".widget-content").slideToggle(300);493 jQuery(this).hide();494 jQuery(this).parent().find(".toggle-close").show();495 });496 jQuery(document).on("click", ".toggle-close" , function(){497 jQuery(this).parent().parent().find(".widget-content").slideToggle("fast");498 jQuery(this).hide();499 jQuery(this).parent().find(".toggle-open").show();500 });501// Expand/collapse all502 jQuery(document).on("click", "#expand-all" , function(){503 jQuery("#cat_sortable .widget-content").slideDown(300);504 jQuery("#cat_sortable .toggle-close").show();505 jQuery("#cat_sortable .toggle-open").hide();506 });507 jQuery(document).on("click", "#collapse-all" , function(){508 jQuery("#cat_sortable .widget-content").slideUp(300);509 jQuery("#cat_sortable .toggle-close").hide();510 jQuery("#cat_sortable .toggle-open").show();511 });512// Del Cats513 jQuery(document).on("click", ".del-cat" , function(){514 jQuery(this).parent().parent().addClass('removered').fadeOut(function() {515 jQuery(this).remove();516 });517 });518// Delete Sidebars Icon519 jQuery(document).on("click", ".del-sidebar" , function(){520 var option = jQuery(this).parent().find('input').val();521 jQuery(this).parent().parent().addClass('removered').fadeOut(function() {522 jQuery(this).remove();523 jQuery('#custom-sidebars select').find('option[value="'+option+'"]').remove();524 });525 });526// Delete Custom Text Icon527 jQuery(document).on("click", ".del-custom-text" , function(){528 var option = jQuery(this).parent().find('input').val();529 jQuery(this).parent().parent().addClass('removered').fadeOut(function() {530 jQuery(this).remove();531 });532 });533// Sidebar Builder534 jQuery("#sidebarAdd").click(function() {535 var SidebarName = jQuery('#sidebarName').val();536 if( SidebarName.length > 0){537 jQuery('#sidebarsList').append('<li><div class="widget-head">'+SidebarName+' <input id="tie_sidebars" name="tie_options[sidebars][]" type="hidden" value="'+SidebarName+'" /><a class="del-sidebar"></a></div></li>');538 jQuery('#custom-sidebars select').append('<option value="'+SidebarName+'">'+SidebarName+'</option>');539 }540 jQuery('#sidebarName').val('');541 });542// Custom Breaking News Text543 jQuery("#TextAdd").click(function() {544 var customlink = jQuery('#custom_link').val();545 var customtext = jQuery('#custom_text').val();546 if( customtext.length > 0 && customlink.length > 0 ){547 jQuery('#customList').append('<li><div class="widget-head"><a href="'+customlink+'" target="_blank">'+customtext+'</a> <input name="tie_options[breaking_custom]['+customnext+'][link]" type="hidden" value="'+customlink+'" /> <input name="tie_options[breaking_custom]['+customnext+'][text]" type="hidden" value="'+customtext+'" /><a class="del-custom-text"></a></div></li>');548 }549 customnext ++ ;550 jQuery('#custom_link , #custom_text').val('');551 });552// Background Type553 var bg_selected_radio = jQuery("input[name='tie_options[background_type]']:checked").val();554 if (bg_selected_radio == 'custom') { jQuery('#pattern-settings').hide(); }555 if (bg_selected_radio == 'pattern') { jQuery('#bg_image_settings').hide(); }556 jQuery("input[name='tie_options[background_type]']").change(function(){557 var bg_selected_radio = jQuery("input[name='tie_options[background_type]']:checked").val();558 if (bg_selected_radio == 'pattern') {559 jQuery('#pattern-settings').fadeIn();560 jQuery('#bg_image_settings').hide();561 }else{562 jQuery('#bg_image_settings').fadeIn();563 jQuery('#pattern-settings').hide();564 }565 });566// Panel Tabs567 jQuery(".tabs-wrap").hide();568 jQuery(".mo-panel-tabs ul li:first").addClass("active").show();569 jQuery(".tabs-wrap:first").show();570 jQuery("li.tie-tabs:not(.tie-not-tab)").click(function() {571 jQuery(".mo-panel-tabs ul li").removeClass("active");572 jQuery(this).addClass("active");573 jQuery(".tabs-wrap").hide();574 var activeTab = jQuery(this).find("a").attr("href");575 jQuery(activeTab).fadeIn('fast');576 return false;577 });578// Ctageories options579 jQuery(".tie-cats-options input:checked").parent().addClass("selected");580 jQuery(document).on("click", ".tie-cats-options .checkbox-select" , function(event){581 event.preventDefault();582 jQuery(this).parent().parent().find("li").removeClass("selected");583 jQuery(this).parent().addClass("selected");584 jQuery(this).parent().find(":radio").attr("checked","checked");585 });586// Ctageories Tabs box587 jQuery(".tabs_cats input:checked").parent().addClass("selected");588 jQuery(document).on("click", ".tabs_cats span" , function( event ){589 if( jQuery(this).parent().find(":checkbox").is(':checked') ){590 event.preventDefault();591 jQuery(this).parent().removeClass("selected");592 jQuery(this).parent().find(":checkbox").removeAttr("checked");593 }else{594 jQuery(this).parent().addClass("selected");595 jQuery(this).parent().find(":checkbox").attr("checked","checked");596 }597 });598 var allPanels = jQuery('.tie-accordion > .tie-accordion-contnet').hide();599 jQuery('.tie-accordion > .accordion-head > a').click(function() {600 $this = jQuery(this);601 $target = $this.parent().next();602 if(!$target.hasClass('active')){603 allPanels.removeClass('active').slideUp();604 $target.addClass('active').slideDown();605 }606 return false;607 });608 jQuery( 'ul.tie-options:not(.tie-cats-options)' ).each(function( index ) {609 var boxID = jQuery( this ).attr( 'id' );610 //alert( boxID );611 jQuery( '#' + boxID ).find( "input:checked" ).parent().addClass("selected");612 jQuery( '#' + boxID ).find( ".checkbox-select" ).click(613 function(event) {614 event.preventDefault();615 jQuery( '#' + boxID ).find( "li" ).removeClass("selected");616 jQuery(this).parent().addClass("selected");617 jQuery(this).parent().find(":radio").attr("checked","checked");618 }619 );620 });621 /*622 //Yoast Seo Pluign623 if( jQuery( '#yoast_wpseo_metadesc').length && jQuery( '#content' ).length && jQuery('#tie_builder_active').length ){624 jQuery("#yoast_wpseo_metadesc").keyup(function(){625 if( jQuery( '#tie_builder_active' ).val() == 'yes' ){626 var contentVal = jQuery(this).val();627 if( contentVal.length ){628 contentVal = '[tie_yost_content] '+contentVal+' [/tie_yost_content]';629 }630 $geTheEditor = jQuery( '#content' );631 var geTheEditorContent = $geTheEditor.val().replace( /\[tie_yost_content\]([\s\S]*?)\[\/tie_yost_content\]/g, '');632 $geTheEditor.val( geTheEditorContent + contentVal );633 }634 });635 }636 */637});638// image Uploader Functions639 function tie_set_uploader(field, styling ) {640 var tie_bg_uploader;641 jQuery(document).on("click", "#upload_"+field+"_button" , function( event ){642 event.preventDefault();643 tie_bg_uploader = wp.media.frames.tie_bg_uploader = wp.media({644 title: 'Choose Image',645 library: {type: 'image'},646 button: {text: 'Select'},647 multiple: false648 });649 tie_bg_uploader.on( 'select', function() {650 var selection = tie_bg_uploader.state().get('selection');651 selection.map( function( attachment ) {652 attachment = attachment.toJSON();653 if( styling )654 jQuery('#'+field+'-img').val(attachment.url);655 else656 jQuery('#'+field).val(attachment.url);657 jQuery('#'+field+'-preview').show();658 jQuery('#'+field+'-preview img').attr("src", attachment.url );659 });660 });661 tie_bg_uploader.open();662 });663 }664function toggleVisibility(id) {665 var e = document.getElementById(id);666 if(e.style.display == 'block')667 e.style.display = 'none';668 else669 e.style.display = 'block';670}671(function($){var i=function(e){if(!e)var e=window.event;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation()};$.fn.checkbox=function(f){try{document.execCommand('BackgroundImageCache',false,true)}catch(e){}var g={cls:'jquery-checkbox',empty:'empty.png'};g=$.extend(g,f||{});var h=function(a){var b=a.checked;var c=a.disabled;var d=$(a);if(a.stateInterval)clearInterval(a.stateInterval);a.stateInterval=setInterval(function(){if(a.disabled!=c)d.trigger((c=!!a.disabled)?'disable':'enable');if(a.checked!=b)d.trigger((b=!!a.checked)?'check':'uncheck')},10);return d};return this.each(function(){var a=this;var b=h(a);if(a.wrapper)a.wrapper.remove();a.wrapper=$('<span class="'+g.cls+'"><span class="mark"><img src="'+g.empty+'" /></span></span>');a.wrapperInner=a.wrapper.children('span:eq(0)');a.wrapper.hover(function(e){a.wrapperInner.addClass(g.cls+'-hover');i(e)},function(e){a.wrapperInner.removeClass(g.cls+'-hover');i(e)});b.css({position:'absolute',zIndex:-1,visibility:'hidden'}).after(a.wrapper);var c=false;if(b.attr('id')){c=$('label[for='+b.attr('id')+']');if(!c.length)c=false}if(!c){c=b.closest?b.closest('label'):b.parents('label:eq(0)');if(!c.length)c=false}if(c){c.hover(function(e){a.wrapper.trigger('mouseover',[e])},function(e){a.wrapper.trigger('mouseout',[e])});c.click(function(e){b.trigger('click',[e]);i(e);return false})}a.wrapper.click(function(e){b.trigger('click',[e]);i(e);return false});b.click(function(e){i(e)});b.bind('disable',function(){a.wrapperInner.addClass(g.cls+'-disabled')}).bind('enable',function(){a.wrapperInner.removeClass(g.cls+'-disabled')});b.bind('check',function(){a.wrapper.addClass(g.cls+'-checked')}).bind('uncheck',function(){a.wrapper.removeClass(g.cls+'-checked')});$('img',a.wrapper).bind('dragstart',function(){return false}).bind('mousedown',function(){return false});if(window.getSelection)a.wrapper.css('MozUserSelect','none');if(a.checked)a.wrapper.addClass(g.cls+'-checked');if(a.disabled)a.wrapperInner.addClass(g.cls+'-disabled')})}})(jQuery);672// tipsy, version 1.0.0a...
mce.js
Source:mce.js
1(function() {2 tinymce.PluginManager.add('tie_mce_button', function( editor, url ) {3 editor.addButton( 'tie_mce_button', {4 icon: ' tie-shortcodes-icon ',5 tooltip: tieLang.shortcode_tielabs,6 type: 'menubutton',7 minWidth: 210,8 menu: [9 {10 text: tieLang.shortcode_box,11 onclick: function() {12 editor.windowManager.open( {13 title: tieLang.shortcode_box,14 body: [15 {16 type: 'listbox',17 name: 'typeOftheBox',18 label: tieLang.shortcode_style,19 'values': [20 {text: tieLang.shortcode_shadow, value: 'shadow'},21 {text: tieLang.shortcode_info, value: 'info'},22 {text: tieLang.shortcode_success, value: 'success'},23 {text: tieLang.shortcode_warning, value: 'warning'},24 {text: tieLang.shortcode_error, value: 'error'},25 {text: tieLang.shortcode_download, value: 'download'},26 {text: tieLang.shortcode_note, value: 'note'}27 ]28 },29 {30 type: 'listbox',31 name: 'boxAlignment',32 label: tieLang.shortcode_alignment,33 'values': [34 {text: '', value: ''},35 {text: tieLang.shortcode_right, value: 'alignright'},36 {text: tieLang.shortcode_left, value: 'alignleft'},37 {text: tieLang.shortcode_center, value: 'aligncenter'}38 ]39 },40 {41 type: 'textbox',42 name: 'CustomClass',43 label: tieLang.shortcode_class,44 value: ''45 },46 {47 type: 'textbox',48 name: 'BoxWidth',49 label: tieLang.shortcode_width,50 value: ''51 },52 {53 type: 'textbox',54 name: 'BoxContent',55 label: tieLang.shortcode_content,56 value: '',57 multiline: true,58 minWidth: 300,59 minHeight: 10060 }61 ],62 onsubmit: function( e ) {63 editor.insertContent( '[box type="' + e.data.typeOftheBox + '" align="' + e.data.boxAlignment + '" class="' + e.data.CustomClass + '" width="' + e.data.BoxWidth + '"]'+ e.data.BoxContent +'[/box]');64 }65 });66 }67 68 69 },70 {71 text: tieLang.shortcode_button,72 onclick: function() {73 editor.windowManager.open( {74 title: tieLang.shortcode_button,75 body: [76 {77 type: 'listbox',78 name: 'ButtonColor',79 label: tieLang.shortcode_color,80 'values': [81 {text: tieLang.shortcode_red, value: 'red'},82 {text: tieLang.shortcode_orange, value: 'orange'},83 {text: tieLang.shortcode_blue, value: 'blue'},84 {text: tieLang.shortcode_green, value: 'green'},85 {text: tieLang.shortcode_black, value: 'black'},86 {text: tieLang.shortcode_gray, value: 'gray'},87 {text: tieLang.shortcode_white, value: 'white'},88 {text: tieLang.shortcode_pink, value: 'pink'},89 {text: tieLang.shortcode_purple, value: 'purple '}90 ]91 },92 {93 type: 'listbox',94 name: 'ButtonSize',95 label: tieLang.shortcode_size,96 'values': [97 {text: tieLang.shortcode_small, value: 'small'},98 {text: tieLang.shortcode_medium, value: 'medium'},99 {text: tieLang.shortcode_big, value: 'big'}100 ]101 },102 {103 type: 'textbox',104 name: 'ButtonLink',105 label: tieLang.shortcode_link,106 minWidth: 300,107 value: 'http://'108 },109 {110 type: 'textbox',111 name: 'ButtonText',112 label: tieLang.shortcode_text,113 value: ''114 },115 {116 type: 'textbox',117 name: 'ButtonIcon',118 label: tieLang.shortcode_icon,119 value: ''120 },121 {122 type: 'checkbox',123 name: 'ButtonTarget',124 label: tieLang.shortcode_new_window,125 value: 'blank',126 }127 ],128 onsubmit: function( e ) {129 editor.insertContent( '[button color="' + e.data.ButtonColor + '" size="' + e.data.ButtonSize + '" link="' + e.data.ButtonLink + '" icon="' + e.data.ButtonIcon + '" target="' + e.data.ButtonTarget + '"]'+ e.data.ButtonText +'[/button]');130 }131 });132 }133 },134 {135 text: tieLang.shortcode_tabs,136 onclick: function() {137 editor.windowManager.open( {138 title: tieLang.shortcode_tabs,139 width: 300,140 height: 60,141 body: [142 {143 type: 'listbox',144 name: 'TabType',145 label: tieLang.shortcode_style,146 'values': [147 {text: tieLang.shortcode_horizontal, value: 'horizontal'},148 {text: tieLang.shortcode_vertical, value: 'vertical'}149 ]150 }, 151 ], 152 onsubmit: function( e ) {153 editor.insertContent( '\154 [tabs type="'+ e.data.TabType +'"]<br />\155 [tabs_head]<br />\156 [tab_title] '+ tieLang.shortcode_tab_title1 +' [/tab_title]<br />\157 [tab_title] '+ tieLang.shortcode_tab_title2 +' [/tab_title]<br />\158 [tab_title] '+ tieLang.shortcode_tab_title3 +' [/tab_title]<br />\159 [/tabs_head]<br />\160 [tab] '+ tieLang.shortcode_tab_content1 +' [/tab]<br />\161 [tab] '+ tieLang.shortcode_tab_content2 +' [/tab]<br />\162 [tab] '+ tieLang.shortcode_tab_content3 +' [/tab]<br />\163 [/tabs]');164 }165 },166 {167 plugin_url : url168 });169 }170 }, 171 {172 text: tieLang.shortcode_toggle,173 onclick: function() {174 editor.windowManager.open( {175 title: tieLang.shortcode_toggle,176 body: [177 {178 type: 'textbox',179 name: 'ToggleTitle',180 label: tieLang.shortcode_title,181 value: ''182 },183 {184 type: 'listbox',185 name: 'ToggleState',186 label: tieLang.shortcode_state,187 'values': [188 {text: tieLang.shortcode_opened, value: 'open'},189 {text: tieLang.shortcode_closed, value: 'close'},190 ]191 },192 {193 type: 'textbox',194 name: 'ToggleContent',195 label: tieLang.shortcode_content,196 value: '',197 multiline: true,198 minWidth: 300,199 minHeight: 100200 }201 ],202 onsubmit: function( e ) {203 editor.insertContent( '[toggle title="' + e.data.ToggleTitle + '" state="' + e.data.ToggleState + '"]'+ e.data.ToggleContent +'[/toggle]');204 }205 });206 }207 },208 {209 text: tieLang.shortcode_slideshow,210 onclick: function() {211 editor.insertContent( '\212 [tie_slideshow]<br /><br />\213 [tie_slide] '+ tieLang.shortcode_slide1 +' [/tie_slide]<br /><br />\214 [tie_slide] '+ tieLang.shortcode_slide2 +' [/tie_slide]<br /><br />\215 [tie_slide] '+ tieLang.shortcode_slide3 +' [/tie_slide]<br /><br />\216 [/tie_slideshow]');217 }218 },219 {220 text: tieLang.shortcode_bio,221 onclick: function() {222 editor.windowManager.open( {223 title: tieLang.shortcode_bio,224 body: [225 {226 type: 'textbox',227 name: 'AuthorTitle',228 label: tieLang.shortcode_title,229 value: ''230 },231 {232 type: 'textbox',233 name: 'AuthorImageURL',234 label: tieLang.shortcode_avatar,235 value: 'http://'236 },237 {238 type: 'textbox',239 name: 'AuthorContent',240 label: tieLang.shortcode_content,241 value: '',242 multiline: true,243 minWidth: 300,244 minHeight: 100245 }246 ],247 onsubmit: function( e ) {248 editor.insertContent( '[author title="' + e.data.AuthorTitle + '" image="' + e.data.AuthorImageURL + '"]'+ e.data.AuthorContent +'[/author]');249 }250 });251 }252 },253 {254 text: tieLang.shortcode_flickr,255 onclick: function() {256 editor.windowManager.open( {257 title: tieLang.shortcode_add_flickr,258 body: [259 {260 type: 'textbox',261 name: 'AccountID',262 label: tieLang.shortcode_flickr_id,263 value: ''264 },265 {266 type: 'textbox',267 name: 'NumberPhotos',268 label: tieLang.shortcode_flickr_num,269 value: '5'270 },271 {272 type: 'listbox',273 name: 'FlickrSorting',274 label: tieLang.shortcode_sorting,275 'values': [276 {text: tieLang.shortcode_recent, value: 'latest'},277 {text: tieLang.shortcode_random, value: 'random'},278 ]279 },280 ],281 onsubmit: function( e ) {282 editor.insertContent( '[flickr id="' + e.data.AccountID + '" number="' + e.data.NumberPhotos + '" orderby="' + e.data.FlickrSorting + '"]');283 }284 });285 }286 },287 {288 text: tieLang.shortcode_feed,289 onclick: function() {290 editor.windowManager.open( {291 title: tieLang.shortcode_feed,292 body: [293 {294 type: 'textbox',295 name: 'RSSurl',296 label: tieLang.shortcode_feed_url,297 minWidth: 300,298 value: 'http://'299 },300 {301 type: 'textbox',302 name: 'NumberFeeds',303 label: tieLang.shortcode_feeds_num,304 value: '5'305 },306 ],307 onsubmit: function( e ) {308 editor.insertContent( '[feed url="' + e.data.RSSurl + '" number="' + e.data.NumberFeeds + '"]');309 }310 });311 }312 },313 {314 text: tieLang.shortcode_map,315 onclick: function() {316 editor.windowManager.open( {317 title: tieLang.shortcode_map,318 body: [319 {320 type: 'textbox',321 name: 'MapURL',322 label: tieLang.shortcode_map_url,323 minWidth: 300,324 value: 'http://'325 },326 {327 type: 'listbox',328 name: 'MapAlignment',329 label: tieLang.shortcode_alignment,330 'values': [331 {text: '', value: ''},332 {text: tieLang.shortcode_right, value: 'alignright'},333 {text: tieLang.shortcode_left, value: 'alignleft'},334 {text: tieLang.shortcode_center, value: 'aligncenter'},335 ]336 },337 {338 type: 'textbox',339 name: 'MapWidth',340 label: tieLang.shortcode_width,341 value: ''342 },343 {344 type: 'textbox',345 name: 'Mapheight',346 label: tieLang.shortcode_height,347 value: ''348 },349 ],350 onsubmit: function( e ) {351 editor.insertContent( '[googlemap src="' + e.data.MapURL + '" width="' + e.data.MapWidth + '" height="' + e.data.Mapheight + '" align="' + e.data.MapAlignment + '"]');352 }353 });354 }355 },356 {357 text: tieLang.shortcode_video,358 onclick: function() {359 editor.windowManager.open( {360 title: tieLang.shortcode_video,361 body: [362 {363 type: 'textbox',364 name: 'VideoURL',365 label: tieLang.shortcode_video_url,366 value: 'http://',367 minWidth: 300,368 },369 {370 type: 'textbox',371 name: 'VideoWidth',372 label: tieLang.shortcode_width,373 value: ''374 },375 {376 type: 'textbox',377 name: 'Videoheight',378 label: tieLang.shortcode_height,379 value: ''380 },381 ],382 onsubmit: function( e ) {383 editor.insertContent( '[embed width="' + e.data.VideoWidth + '" height="' + e.data.Videoheight + '"]' + e.data.VideoURL + '[/embed]');384 }385 });386 }387 },388 {389 text: tieLang.shortcode_audio,390 onclick: function() {391 editor.windowManager.open( {392 title: tieLang.shortcode_audio,393 body: [394 {395 type: 'textbox',396 name: 'mp3URL',397 label: tieLang.shortcode_mp3,398 value: 'http://',399 minWidth: 300,400 },401 {402 type: 'textbox',403 name: 'm4aURL',404 label: tieLang.shortcode_m4a,405 value: 'http://',406 minWidth: 300,407 },408 {409 type: 'textbox',410 name: 'oggURL',411 label: tieLang.shortcode_ogg,412 value: 'http://',413 minWidth: 300,414 },415 416 ],417 onsubmit: function( e ) {418 editor.insertContent( '[audio mp3="' + e.data.mp3URL + '" m4a="' + e.data.m4aURL + '" ogg="' + e.data.oggURL + '"]');419 }420 });421 }422 },423 {424 text: tieLang.shortcode_lightbox,425 onclick: function() {426 editor.windowManager.open( {427 title: tieLang.shortcode_lightbox,428 body: [429 {430 type: 'textbox',431 name: 'lightBoxURL',432 label: tieLang.shortcode_lightbox_url,433 value: 'http://',434 minWidth: 300,435 },436 {437 type: 'textbox',438 name: 'lightBoxTitle',439 label: tieLang.shortcode_title,440 value: '',441 minWidth: 300,442 },443 {444 type: 'textbox',445 name: 'lightBoxContent',446 label: tieLang.shortcode_content,447 value: '',448 multiline: true,449 minWidth: 300,450 minHeight: 100451 }452 453 ],454 onsubmit: function( e ) {455 editor.insertContent( '[lightbox full="' + e.data.lightBoxURL + '" title="' + e.data.lightBoxTitle + '"]'+ e.data.lightBoxContent +'[/lightbox]');456 }457 });458 }459 },460 {461 text: tieLang.shortcode_tooltip,462 onclick: function() {463 editor.windowManager.open( {464 title: tieLang.shortcode_tooltip,465 body: [466 {467 type: 'textbox',468 name: 'ToolTipText',469 label: tieLang.shortcode_text,470 value: '',471 minWidth: 300,472 },473 {474 type: 'listbox',475 name: 'ToolTipGravities',476 label: tieLang.shortcode_direction,477 'values': [478 {value: 'nw', text: tieLang.shortcode_northwest},479 {value: 'n', text: tieLang.shortcode_north},480 {value: 'ne', text: tieLang.shortcode_northeast},481 {value: 'w', text: tieLang.shortcode_west},482 {value: 'e', text: tieLang.shortcode_east},483 {value: 'sw', text: tieLang.shortcode_southwest},484 {value: 's', text: tieLang.shortcode_south},485 {value: 'sw', text: tieLang.shortcode_southeast},486 ]487 },488 {489 type: 'textbox',490 name: 'ToolTipContent',491 label: tieLang.shortcode_content,492 value: '',493 multiline: true,494 minWidth: 300,495 minHeight: 100496 }497 498 ],499 onsubmit: function( e ) {500 editor.insertContent( '[tooltip text="' + e.data.ToolTipText + '" gravity="' + e.data.ToolTipGravities + '"]'+ e.data.ToolTipContent +'[/tooltip]');501 }502 });503 }504 },505 {506 text: tieLang.shortcode_share,507 onclick: function() {508 editor.windowManager.open( {509 title: tieLang.shortcode_share,510 body: [511 {512 type: 'checkbox',513 name: 'Facebook',514 label: tieLang.shortcode_facebook,515 },516 {517 type: 'checkbox',518 name: 'Tweet',519 label: tieLang.shortcode_tweet,520 },521 {522 type: 'checkbox',523 name: 'Digg',524 label: tieLang.shortcode_digg,525 },526 {527 type: 'checkbox',528 name: 'Stumble',529 label: tieLang.shortcode_stumble,530 },531 {532 type: 'checkbox',533 name: 'Google',534 label: tieLang.shortcode_google,535 },536 {537 type: 'checkbox',538 name: 'Pinterest',539 label: tieLang.shortcode_pinterest,540 },541 {542 type: 'label',543 name: 'TwitterFollowButton',544 onPostRender : function() {this.getEl().innerHTML = "<br /><strong>"+tieLang.shortcode_follow+"</strong>"}545 },546 {547 type: 'checkbox',548 name: 'Twitter',549 label: tieLang.shortcode_follow,550 },551 {552 type: 'textbox',553 name: 'TwitterUsername',554 label: tieLang.shortcode_username,555 value: '',556 minWidth: 200,557 },558 559 ],560 onsubmit: function( e ) {561 if( e.data.Facebook ) {562 editor.insertContent( '[facebook]');563 }564 if( e.data.Tweet ) {565 editor.insertContent( '[tweet]');566 }567 if( e.data.Digg ) {568 editor.insertContent( '[digg]');569 }570 if( e.data.Stumble ) {571 editor.insertContent( '[stumble]');572 }573 if( e.data.Google ) {574 editor.insertContent( '[Google]');575 }576 if( e.data.Pinterest ) {577 editor.insertContent( '[pinterest]');578 }579 if( e.data.Twitter ) {580 editor.insertContent( '[follow id="'+e.data.TwitterUsername+'" count="true" ]');581 }582 583 }584 });585 }586 },587 {588 text: tieLang.shortcode_dropcap,589 onclick: function() {590 editor.insertContent( '[dropcap]' + editor.selection.getContent() + '[/dropcap]' );591 }592 },593 {594 text: tieLang.shortcode_full_img,595 onclick: function() {596 editor.insertContent( '[tie_full_img]' + editor.selection.getContent() + '[/tie_full_img]' );597 }598 },599 {600 text: tieLang.shortcode_highlight,601 onclick: function() {602 editor.windowManager.open( {603 title: tieLang.shortcode_highlight,604 body: [605 {606 type: 'listbox',607 name: 'color',608 label: tieLang.shortcode_color,609 'values': [610 {text: tieLang.shortcode_yellow, value: 'yellow'},611 {text: tieLang.shortcode_red, value: 'red'},612 {text: tieLang.shortcode_blue, value: 'blue'},613 {text: tieLang.shortcode_orange, value: 'orange'},614 {text: tieLang.shortcode_green, value: 'green'},615 {text: tieLang.shortcode_gray, value: 'gray'},616 {text: tieLang.shortcode_black, value: 'black'},617 {text: tieLang.shortcode_pink, value: 'pink'},618 ]619 },620 {621 type: 'textbox',622 name: 'highlightedText',623 label: tieLang.shortcode_text,624 },625 ],626 onsubmit: function( e ) {627 editor.insertContent( '[highlight color="'+ e.data.color+ '"]' + e.data.highlightedText + '[/highlight]' );628 }629 });630 }631 },632 {633 text: tieLang.shortcode_padding,634 onclick: function() {635 editor.windowManager.open( {636 title: tieLang.shortcode_padding,637 body: [638 {639 type: 'textbox',640 name: 'left',641 label: tieLang.shortcode_padding_left,642 value: '10%',643 },644 {645 type: 'textbox',646 name: 'right',647 label: tieLang.shortcode_padding_right,648 value: '10%',649 },650 ],651 onsubmit: function( e ) {652 editor.insertContent( '[padding right="'+ e.data.right+ '" left="'+ e.data.left+ '"]' + editor.selection.getContent() + '[/padding]' );653 }654 });655 }656 },657 {658 text: tieLang.shortcode_divider,659 onclick: function() {660 editor.windowManager.open( {661 title: tieLang.shortcode_divider,662 body: [663 {664 type: 'listbox',665 name: 'style',666 label: tieLang.shortcode_style,667 'values': [668 {text: tieLang.shortcode_solid, value: 'solid'},669 {text: tieLang.shortcode_dashed, value: 'dashed'},670 {text: tieLang.shortcode_normal, value: 'normal'},671 {text: tieLang.shortcode_double, value: 'double'},672 {text: tieLang.shortcode_dotted, value: 'dotted'}673 ]674 },675 {676 type: 'textbox',677 name: 'MarginTop',678 label: tieLang.shortcode_margin_top,679 value: '20',680 },681 {682 type: 'textbox',683 name: 'MarginBottom',684 label: tieLang.shortcode_margin_bottom,685 value: '20',686 },687 ],688 onsubmit: function( e ) {689 editor.insertContent( '[divider style="'+ e.data.style+ '" top="'+ e.data.MarginTop+ '" bottom="'+ e.data.MarginBottom+ '"]' );690 }691 });692 }693 },694 {695 text: tieLang.shortcode_lists,696 menu: [697 {698 text: tieLang.shortcode_star,699 onclick: function() {700 editor.insertContent( '[tie_list type="starlist"]' + editor.selection.getContent() + '[/tie_list]' );701 }702 },703 {704 text: tieLang.shortcode_check,705 onclick: function() {706 editor.insertContent( '[tie_list type="checklist"]' + editor.selection.getContent() + '[/tie_list]' );707 }708 },709 {710 text: tieLang.shortcode_thumb_up,711 onclick: function() {712 editor.insertContent( '[tie_list type="thumbup"]' + editor.selection.getContent() + '[/tie_list]' );713 }714 },715 {716 text: tieLang.shortcode_thumb_down,717 onclick: function() {718 editor.insertContent( '[tie_list type="thumbdown"]' + editor.selection.getContent() + '[/tie_list]' );719 }720 },721 {722 text: tieLang.shortcode_plus,723 onclick: function() {724 editor.insertContent( '[tie_list type="plus"]' + editor.selection.getContent() + '[/tie_list]' );725 }726 },727 {728 text: tieLang.shortcode_minus,729 onclick: function() {730 editor.insertContent( '[tie_list type="minus"]' + editor.selection.getContent() + '[/tie_list]' );731 }732 },733 {734 text: tieLang.shortcode_heart,735 onclick: function() {736 editor.insertContent( '[tie_list type="heart"]' + editor.selection.getContent() + '[/tie_list]' );737 }738 },739 {740 text: tieLang.shortcode_light_bulb,741 onclick: function() {742 editor.insertContent( '[tie_list type="lightbulb"]' + editor.selection.getContent() + '[/tie_list]' );743 }744 },745 {746 text: tieLang.shortcode_cons,747 onclick: function() {748 editor.insertContent( '[tie_list type="cons"]' + editor.selection.getContent() + '[/tie_list]' );749 }750 },751 752 ]753 },754 {755 text: tieLang.shortcode_ads,756 menu: [757 {758 text: tieLang.shortcode_ads1,759 onclick: function() {760 editor.insertContent( '[ads1]' );761 }762 },763 {764 text: tieLang.shortcode_ads2,765 onclick: function() {766 editor.insertContent( '[ads2]' );767 }768 },769 ]770 },771 {772 text: tieLang.shortcode_Restrict,773 menu: [774 {775 text: tieLang.shortcode_registered,776 onclick: function() {777 editor.insertContent( '[is_logged_in]' + editor.selection.getContent() + '[/is_logged_in]' );778 }779 },780 {781 text: tieLang.shortcode_guests,782 onclick: function() {783 editor.insertContent( '[is_guest]' + editor.selection.getContent() + '[/is_guest]' );784 }785 },786 ]787 },788 {789 text: tieLang.shortcode_columns,790 menu: [791 {792 text: '[1/1]',793 onclick: function() {794 editor.insertContent( '[one_half]'+tieLang.shortcode_add_content+'[/one_half][one_half_last]'+tieLang.shortcode_add_content+'[/one_half_last]' );795 }796 },797 {798 text: '[1/1/1]',799 onclick: function() {800 editor.insertContent( '[one_third]'+tieLang.shortcode_add_content+'[/one_third][one_third]'+tieLang.shortcode_add_content+'[/one_third][one_third_last]'+tieLang.shortcode_add_content+'[/one_third_last]' );801 }802 },803 {804 text: '[1/1/1/1]',805 onclick: function() {806 editor.insertContent( '[one_fourth]'+tieLang.shortcode_add_content+'[/one_fourth][one_fourth]'+tieLang.shortcode_add_content+'[/one_fourth][one_fourth]'+tieLang.shortcode_add_content+'[/one_fourth][one_fourth_last]'+tieLang.shortcode_add_content+'[/one_fourth_last]' );807 }808 },809 {810 text: '[1/1/1/1/1]',811 onclick: function() {812 editor.insertContent( '[one_fifth]'+tieLang.shortcode_add_content+'[/one_fifth][one_fifth]'+tieLang.shortcode_add_content+'[/one_fifth][one_fifth]'+tieLang.shortcode_add_content+'[/one_fifth][one_fifth]'+tieLang.shortcode_add_content+'[/one_fifth][one_fifth_last]'+tieLang.shortcode_add_content+'[/one_fifth_last]' );813 }814 },815 {816 text: '[1/1/1/1/1/1]',817 onclick: function() {818 editor.insertContent( '[one_sixth]'+tieLang.shortcode_add_content+'[/one_sixth][one_sixth]'+tieLang.shortcode_add_content+'[/one_sixth][one_sixth]'+tieLang.shortcode_add_content+'[/one_sixth][one_sixth]'+tieLang.shortcode_add_content+'[/one_sixth][one_sixth]'+tieLang.shortcode_add_content+'[/one_sixth][one_sixth_last]'+tieLang.shortcode_add_content+'[/one_sixth_last]' );819 }820 },821 {822 text: '[1/3]',823 onclick: function() {824 editor.insertContent( '[one_fourth]'+tieLang.shortcode_add_content+'[/one_fourth][three_fourth_last]'+tieLang.shortcode_add_content+'[/three_fourth_last]' );825 }826 },827 {828 text: '[1/5]',829 onclick: function() {830 editor.insertContent( '[one_sixth]'+tieLang.shortcode_add_content+'[/one_sixth][five_sixth_last]'+tieLang.shortcode_add_content+'[/five_sixth_last]' );831 }832 },833 {834 text: '[2/1]',835 onclick: function() {836 editor.insertContent( '[two_third]'+tieLang.shortcode_add_content+'[/two_third][one_third_last]'+tieLang.shortcode_add_content+'[/one_third_last]' );837 }838 },839 {840 text: '[2/3]',841 onclick: function() {842 editor.insertContent( '[two_fifth]'+tieLang.shortcode_add_content+'[/two_fifth][three_fifth_last]'+tieLang.shortcode_add_content+'[/three_fifth_last]' );843 }844 },845 ]846 },847 ]848 });849 });...
170-174 Pattern 1- Straightforward implementations.js
Source:170-174 Pattern 1- Straightforward implementations.js
1// Page 1702function freeTieClip(cart) {3 var hasTie = false4 var hasTieClip = false;5 for(var i = 0; i < cart.length; i++) {6 var item = cart[i];7 if(item.name === "tie")8 hasTie = true;9 if(item.name === "tie clip")10 hasTieClip = true;11 }12 if(hasTie && !hasTieClip) {13 var tieClip = make_item("tie clip", 0);14 return add_item(cart, tieClip);15 }16 return cart;17}18// Page 17219/// Extracted20function freeTieClip(cart) {21 var hasTie = isInCart(cart, "tie");22 var hasTieClip = isInCart(cart, "tie clip");23 if(hasTie && !hasTieClip) {24 var tieClip = make_item("tie clip", 0);25 return add_item(cart, tieClip);26 }27 return cart;28}29function isInCart(cart, name) {30 for(var i = 0; i < cart.length; i++) {31 if(cart[i].name === name)32 return true;33 }34 return false;...
Using AI Code Generation
1const fc = require("fast-check");2const { tie } = require("fast-check");3const { tie2 } = require("fast-check");4const { tie3 } = require("fast-check");5const { tie4 } = require("fast-check");6const { tie5 } = require("fast-check");7const { tie6 } = require("fast-check");8const { tie7 } = require("fast-check");9const { tie8 } = require("fast-check");10const { tie9 } = require("fast-check");11const { tie10 } = require("fast-check");12const { tie11 } = require("fast-check");13const { tie12 } = require("fast-check");14const { tie13 } = require("fast-check");15const { tie14 } = require("fast-check");16const { tie15 } = require("fast-check");17const { tie16 } = require("fast-check");18const { tie17 } = require("fast-check");19const { tie18 } = require("fast-check");20const { tie19 } = require("fast-check");21const { tie20 } = require("fast-check");22const { tie21 } = require("fast-check");23const { tie22 } = require("fast-check");24const { tie23 } = require("fast-check");25const { tie24 } = require("fast-check");26const { tie25 } = require("fast-check");27const { tie26 } = require("fast-check");28const { tie27 } = require("fast-check");29const { tie28 } = require("fast-check");30const { tie29 } = require("fast-check");31const { tie30 } = require("fast-check");32const { tie31 } = require("fast-check");33const { tie32 } = require("fast-check");34const { tie33 } = require("fast-check");35const { tie34 } = require("fast-check");36const { tie35 } = require("fast-check");37const { tie36 } = require("fast-check");38const { tie37 } = require("fast-check");39const { tie38 } = require("fast-check");40const { tie39 } = require("fast-check");41const { tie40 } = require("fast-check");42const { tie41 } = require("fast-check");43const { tie42 } = require("fast-check");44const { tie43 } = require("fast-check");45const { tie44 } = require("fast-check");46const { tie45 } = require
Using AI Code Generation
1const fc = require("fast-check");2fc.assert(3 fc.property(fc.string(), fc.string(), (a, b) => {4 return a + b === b + a;5 })6);
Using AI Code Generation
1const fc = require('fast-check');2const { tie } = require('fast-check-monorepo');3const arb1 = fc.integer(0, 100);4const arb2 = fc.integer(0, 100);5fc.assert(6 fc.property(7 tie(arb1, arb2),8 ([a, b]) => a + b === 1009);10const fc = require('fast-check');11const { tie } = require('fast-check-monorepo');12const arb1 = fc.integer(0, 100);13const arb2 = fc.integer(0, 100);14fc.assert(15 fc.property(16 tie(arb1, arb2),17 ([a, b]) => a + b === 10018);19const fc = require('fast-check');20const { tie } = require('fast-check-monorepo');21const arb1 = fc.integer(0, 100);22const arb2 = fc.integer(0, 100);23fc.assert(24 fc.property(25 tie(arb1, arb2),26 ([a, b]) => a + b === 10027);28const fc = require('fast-check');29const { tie } = require('fast-check-monorepo');30const arb1 = fc.integer(0, 100);31const arb2 = fc.integer(0, 100);32fc.assert(33 fc.property(34 tie(arb1, arb2),35 ([a, b]) => a + b === 10036);37const fc = require('fast-check');38const { tie } = require('fast-check-monorepo');39const arb1 = fc.integer(0, 100);40const arb2 = fc.integer(0, 100);41fc.assert(42 fc.property(43 tie(arb1, arb2),44 ([a, b]) => a + b === 10045);46const fc = require('fast-check');
Using AI Code Generation
1const fc = require('fast-check');2const { tie } = require('fast-check-monorepo');3const { tie1 } = require('fast-check-monorepo');4fc.assert(5 fc.property(fc.integer(), fc.integer(), (a, b) => {6 tie1(a, b);7 })8);9tie1(1, 2);10const fc = require('fast-check');11const { tie } = require('fast-check-monorepo');12const { tie1 } = require('fast-check-monorepo');13fc.assert(14 fc.property(fc.integer(), fc.integer(), (a, b) => {15 tie(a, b);16 })17);18tie(1, 2);
Using AI Code Generation
1import { tie } from 'fast-check-monorepo'2const tieTest = tie(1, 2, 3)3console.log(tieTest)4import { tie } from 'fast-check-monorepo'5const tieTest = tie(1, 2, 3)6console.log(tieTest)7import { tie } from 'fast-check-monorepo'8const tieTest = tie(1, 2, 3)9console.log(tieTest)10import { tie } from 'fast-check-monorepo'11const tieTest = tie(1, 2, 3)12console.log(tieTest)13import { tie } from 'fast-check-monorepo'14const tieTest = tie(1, 2, 3)15console.log(tieTest)16import { tie } from 'fast-check-monorepo'17const tieTest = tie(1, 2, 3)18console.log(tieTest)19import { tie } from 'fast-check-monorepo'20const tieTest = tie(1, 2, 3)21console.log(tieTest)22import { tie } from 'fast-check-monorepo'23const tieTest = tie(1, 2, 3)24console.log(tieTest)25import { tie } from 'fast-check-monorepo'26const tieTest = tie(1, 2, 3)27console.log(tieTest)28import { tie } from 'fast-check-monorepo'29const tieTest = tie(1, 2, 3)30console.log(tie
Using AI Code Generation
1const { tie } = require('fast-check-monorepo')2const { fc } = require('fast-check')3const a = fc.integer(0, 1000)4const b = fc.integer(0, 1000)5const sum = (a, b) => a + b6tie(a, b, sum)
Using AI Code Generation
1const { check, property, tie } = require("fast-check");2const { add } = require("./test1");3const { multiply } = require("./test2");4const tieAddMultiply = tie(add, multiply);5check(6 property([tieAddMultiply], ([result, [a, b]]) => {7 return result === a + b * 2;8 })9);
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!