| 1 |
(function ($, undefined) { |
| 2 |
'use strict'; |
| 3 |
function isset(variable) { |
| 4 |
if (variable === "undefined") { |
| 5 |
return ''; |
| 6 |
} else if (variable === undefined) { |
| 7 |
|
| 8 |
return ''; |
| 9 |
} else if (variable === null) { |
| 10 |
return ''; |
| 11 |
} else if (variable === 0) { |
| 12 |
return 0; |
| 13 |
} else if (variable === '0') { |
| 14 |
return '0'; |
| 15 |
} else { |
| 16 |
return variable; |
| 17 |
} |
| 18 |
|
| 19 |
} |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
$.fn.vs_check_nubmer = function() { |
| 25 |
|
| 26 |
|
| 27 |
var val= $(this).val(); |
| 28 |
var val_max= parseFloat($(this).attr('max')); |
| 29 |
var val_min= parseFloat($(this).attr('min')); |
| 30 |
|
| 31 |
|
| 32 |
if( isset(val) ) { |
| 33 |
if($.isNumeric(val) ) { |
| 34 |
var num_val = parseFloat(val); |
| 35 |
if( val_max >= num_val && num_val >= val_min ){ |
| 36 |
$(this).removeClass('vs_bad'); |
| 37 |
}else{ |
| 38 |
$(this).addClass('vs_bad'); |
| 39 |
} |
| 40 |
}else{ |
| 41 |
$(this).addClass('vs_bad'); |
| 42 |
} |
| 43 |
}else{ |
| 44 |
|
| 45 |
$(this).removeClass('vs_bad'); |
| 46 |
} |
| 47 |
|
| 48 |
}; |
| 49 |
|
| 50 |
|
| 51 |
function left_right(value) { |
| 52 |
|
| 53 |
if( visualslider.is_rtl==='true'){ |
| 54 |
if(value==='left'){ |
| 55 |
return 'right'; |
| 56 |
}else if(value==='right'){ |
| 57 |
return 'left'; |
| 58 |
}else{ |
| 59 |
return value; |
| 60 |
} |
| 61 |
}else{ |
| 62 |
return value; |
| 63 |
|
| 64 |
} |
| 65 |
|
| 66 |
} |
| 67 |
|
| 68 |
$.fn.vs_perview_slide = function(background_image) { |
| 69 |
var slide_background_color= $(this).vs_background_gradient('sl-bg-cr','slide_background_color'); |
| 70 |
var slide_background_image= $(this).vs_background_image('sl','slide_background_image',background_image); |
| 71 |
var background_image_position= $(this).vs_background_position('sl-bg-pos','slide_background_image_position'); |
| 72 |
var tablet_background_image_position= $(this).vs_background_position('sl-tab-bg-pos','slide_tablet_background_image_position'); |
| 73 |
var mobile_background_image_position= $(this).vs_background_position('sl-mob-bg-pos','slide_mobile_background_image_position'); |
| 74 |
$('.vs_perview_slide .vs-slide').attr('style',slide_background_color+slide_background_image+background_image_position+tablet_background_image_position+mobile_background_image_position); |
| 75 |
}; |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
/************************************************************************************************************************************************************************* |
| 81 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 82 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 83 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 84 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 85 |
|
| 86 |
Perview Postion and Size |
| 87 |
|
| 88 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 89 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 90 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 91 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 92 |
**************************************************************************************************************************************************************************/ |
| 93 |
$.fn.vs_layer_postion_size = function() { |
| 94 |
var key =$(this).attr('data-key'); |
| 95 |
$(this).vs_horizontal_align(key,'layer','layer_align_horizontal','left'); |
| 96 |
$(this).vs_vertical_align(key,'layer','layer_align_vertical','top'); |
| 97 |
|
| 98 |
$(this).vs_horizontal_align(key,'layer-tablet','layer_tablet_align_horizontal'); |
| 99 |
$(this).vs_vertical_align(key,'layer-tablet','layer_tablet_align_vertical'); |
| 100 |
|
| 101 |
$(this).vs_horizontal_align(key,'layer-mobile','layer_mobile_align_horizontal'); |
| 102 |
$(this).vs_vertical_align(key,'layer-mobile','layer_mobile_align_vertical'); |
| 103 |
|
| 104 |
|
| 105 |
var horizontal = $(this).vs_size('lr-hor','layer_position_horizontal'); |
| 106 |
var vertical = $(this).vs_size('lr-ver','layer_position_vertical'); |
| 107 |
|
| 108 |
var width = $(this).vs_size('lr-wt','layer_size_width'); |
| 109 |
var height = $(this).vs_size('lr-ht','layer_size_height'); |
| 110 |
|
| 111 |
$('#vs_perview_layer_'+key).css(horizontal).css(vertical).css(width).css(height); |
| 112 |
|
| 113 |
var tablet_display = $(this).find('.vs_live_layer_tablet_display').find('input:checked').val(); |
| 114 |
if(tablet_display==='hide'){ |
| 115 |
$('#vs_perview_layer_'+key).addClass('vs_tablet_hide'); |
| 116 |
}else{ |
| 117 |
$('#vs_perview_layer_'+key).removeClass('vs_tablet_hide'); |
| 118 |
} |
| 119 |
|
| 120 |
|
| 121 |
var tablet_horizontal = $(this).vs_size('lr-tab-hor','layer_tablet_position_horizontal'); |
| 122 |
var tablet_vertical = $(this).vs_size('lr-tab-ver','layer_tablet_position_vertical'); |
| 123 |
var tablet_width = $(this).vs_size('lr-tab-wt','layer_tablet_size_width'); |
| 124 |
var tablet_height = $(this).vs_size('lr-tab-ht','layer_tablet_size_height'); |
| 125 |
|
| 126 |
$('#vs_perview_layer_'+key).css(tablet_horizontal).css(tablet_vertical).css(tablet_width).css(tablet_height); |
| 127 |
|
| 128 |
var mobile_display = $(this).find('.vs_live_layer_mobile_display').find('input:checked').val(); |
| 129 |
if(mobile_display==='hide'){ |
| 130 |
$('#vs_perview_layer_'+key).addClass('vs_mobile_hide'); |
| 131 |
}else{ |
| 132 |
$('#vs_perview_layer_'+key).removeClass('vs_mobile_hide'); |
| 133 |
} |
| 134 |
var mobile_horizontal = $(this).vs_size('lr-mob-hor','layer_mobile_position_horizontal'); |
| 135 |
var mobile_vertical = $(this).vs_size('lr-mob-ver','layer_mobile_position_vertical'); |
| 136 |
var mobile_width = $(this).vs_size('lr-mob-wt','layer_mobile_size_width'); |
| 137 |
var mobile_height = $(this).vs_size('lr-mob-ht','layer_mobile_size_height'); |
| 138 |
$('#vs_perview_layer_'+key).css(mobile_horizontal).css(mobile_vertical).css(mobile_width).css(mobile_height); |
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
}; |
| 145 |
|
| 146 |
/************************************************************************************************************************************************************************* |
| 147 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 148 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 149 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 150 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 151 |
|
| 152 |
Effect |
| 153 |
|
| 154 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 155 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 156 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 157 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 158 |
**************************************************************************************************************************************************************************/ |
| 159 |
$.fn.vs_layer_effectss = function() { |
| 160 |
var key =$(this).attr('data-key'); |
| 161 |
|
| 162 |
var layer =$('.vs_perview_slide_content div.vs-slide:last-child #vs_perview_layer_'+key); |
| 163 |
|
| 164 |
var layer_effect = $(this).find('.vs_live_layer_effect select').val() ; |
| 165 |
var layer_initial = $(this).find('.vs_live_layer_initial select').val() ; |
| 166 |
|
| 167 |
var effect_classs=''; |
| 168 |
if(layer_effect==='move'){ |
| 169 |
if(layer_initial==='top'){ |
| 170 |
effect_classs='vs-effect-move-top'; |
| 171 |
}else if(layer_initial==='left'){ |
| 172 |
effect_classs='vs-effect-move-'+left_right('left'); |
| 173 |
}else if(layer_initial==='right'){ |
| 174 |
effect_classs='vs-effect-move-'+left_right('right'); |
| 175 |
} else if(layer_initial==='bottom'){ |
| 176 |
effect_classs='vs-effect-move-bottom'; |
| 177 |
} |
| 178 |
}else if(layer_effect==='scale'){ |
| 179 |
effect_classs='vs-effect-scale'; |
| 180 |
|
| 181 |
}else if(layer_effect==='fade'){ |
| 182 |
effect_classs='vs-effect-fade'; |
| 183 |
} |
| 184 |
layer.addClass(effect_classs); |
| 185 |
|
| 186 |
var layer_time_start = parseInt($(this).find('.vs_live_layer_time_start .vs_form_number').val()); |
| 187 |
var layer_time_end = parseInt($(this).find('.vs_live_layer_time_end .vs_form_number').val()); |
| 188 |
var layer_scale = parseInt($(this).find('.vs_live_layer_scale .vs_form_number').val()); |
| 189 |
var css=''; |
| 190 |
|
| 191 |
if(isset(layer_effect)){ |
| 192 |
if(isset(layer_scale)){ |
| 193 |
css+="--vs-lr-ef-sc:"+layer_scale+";"; |
| 194 |
} |
| 195 |
css+="--vs-lr-ef-st:"+layer_time_start+"ms;"; |
| 196 |
css+="--vs-lr-ef-en:"+(layer_time_end - layer_time_start)+"ms;"; |
| 197 |
} |
| 198 |
|
| 199 |
|
| 200 |
layer.find('.vs-layer-style').append('<style>.vs-slide-item #vs_perview_layer_'+key+'{'+css+'}</style>'); |
| 201 |
|
| 202 |
|
| 203 |
}; |
| 204 |
|
| 205 |
/************************************************************************************************************************************************************************* |
| 206 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 207 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 208 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 209 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 210 |
|
| 211 |
Shadow |
| 212 |
|
| 213 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 214 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 215 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 216 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 217 |
**************************************************************************************************************************************************************************/ |
| 218 |
$.fn.vs_layer_text_perview = function(items) { |
| 219 |
var key =$(this).attr('data-key'); |
| 220 |
var id =$(this).attr('data-id'); |
| 221 |
if(id==='text'){ |
| 222 |
//Text |
| 223 |
// |
| 224 |
var text_textarea = $(this).find('.vs_live_layer_text textarea').val() ; |
| 225 |
$('#vs_perview_layer_'+key+' .vs-text').html(text_textarea); |
| 226 |
$('#vs_module_layer_'+key+' .vs_module_layer_name span').html(': '+text_textarea); |
| 227 |
|
| 228 |
var text_align= $(this).vs_text_align('txt','layer_text_align'); |
| 229 |
var tablet_text_align= $(this).vs_text_align('tab-txt','layer_tablet_text_align'); |
| 230 |
var mobile_text_align= $(this).vs_text_align('mob-txt','layer_mobile_text_align'); |
| 231 |
var text_color= $(this).vs_color('txt','layer_text_color_first'); |
| 232 |
|
| 233 |
var text_hover_color= $(this).vs_color('txt-hv','layer_text_hover_color_first'); |
| 234 |
var text_shadow= $(this).vs_text_shadow('txt','layer_text_shadow'); |
| 235 |
var text_hover_shadow= $(this).vs_text_shadow('txt-hv','layer_text_hover_shadow'); |
| 236 |
|
| 237 |
|
| 238 |
var icon = $(this).find('.vs_live_layer_icon input').val() ; |
| 239 |
$('#vs_perview_layer_'+key+' .vs-text i').remove(); |
| 240 |
$('#vs_perview_layer_'+key+' .vs-text').prepend('<i class="'+icon+'"></i>'); |
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
var icon_align=$(this).vs_align('icn','layer_icon_align'); |
| 245 |
if(icon_align==='left'){ |
| 246 |
$('#vs_perview_layer_'+key+' .vs-text').addClass('vs-icon-left'); |
| 247 |
}else{ |
| 248 |
$('#vs_perview_layer_'+key+' .vs-text').removeClass('vs-icon-left'); |
| 249 |
} |
| 250 |
|
| 251 |
var icon_color= $(this).vs_color('icn','layer_icon_color_first'); |
| 252 |
var icon_hover_color= $(this).vs_color('icn-hv','layer_icon_hover_color_first'); |
| 253 |
|
| 254 |
var text_boxed = $(this).find('.vs_live_layer_text_boxed select').val() ; |
| 255 |
|
| 256 |
if(text_boxed==='boxed'){ |
| 257 |
$('#vs_perview_layer_'+key+' .vs-text').addClass('vs-text-boxed').removeClass('vs-text-none'); |
| 258 |
|
| 259 |
var text_boxed_padding= $(this).vs_padding('txt-box','layer_text_boxed_padding'); |
| 260 |
var text_boxed_background= $(this).vs_background_gradient('txt-box-bg-cr','layer_text_boxed_background'); |
| 261 |
var text_boxed_border= $(this).vs_border('txt-box','layer_text_boxed_border'); |
| 262 |
var text_boxed_shadow= $(this).vs_shadow('txt-box','layer_text_boxed_shadow'); |
| 263 |
|
| 264 |
var text_boxed_hover_background= $(this).vs_background_gradient('txt-box-hv-bg-cr','layer_text_boxed_hover_background'); |
| 265 |
var text_boxed_hover_border= $(this).vs_border('txt-box-hv','layer_text_boxed_hover_border'); |
| 266 |
var text_boxed_hover_shadow= $(this).vs_shadow('txt-box-hv','layer_text_boxed_hover_shadow'); |
| 267 |
var text_boxed_radius= $(this).vs_radius('txt-box','layer_text_boxed_radius'); |
| 268 |
}else{ |
| 269 |
$('#vs_perview_layer_'+key+' .vs-text').addClass('vs-text-none').removeClass('vs-text-boxed'); |
| 270 |
|
| 271 |
var text_boxed_padding=''; |
| 272 |
var text_boxed_background=''; |
| 273 |
var text_boxed_border=''; |
| 274 |
var text_boxed_shadow=''; |
| 275 |
|
| 276 |
var text_boxed_hover_background=''; |
| 277 |
var text_boxed_hover_border=''; |
| 278 |
var text_boxed_hover_shadow=''; |
| 279 |
var text_boxed_radius=''; |
| 280 |
|
| 281 |
// var text_boxed_radius=''; |
| 282 |
|
| 283 |
} |
| 284 |
|
| 285 |
var text_fontfamily= $(this).vs_fontfamily('txt','layer_text_fontfamily'); |
| 286 |
var text_font_size= $(this).vs_font_size('txt','layer_text_font_size'); |
| 287 |
var text_line_height= $(this).vs_line_height('txt','layer_text_line_height'); |
| 288 |
|
| 289 |
var tablet_text_font_size= $(this).vs_font_size('tab-txt','layer_tablet_text_font_size'); |
| 290 |
var tablet_text_line_height= $(this).vs_line_height('tab-txt','layer_tablet_text_line_height'); |
| 291 |
|
| 292 |
var mobile_text_font_size= $(this).vs_font_size('mob-txt','layer_mobile_text_font_size'); |
| 293 |
var mobile_text_line_height= $(this).vs_line_height('mob-txt','layer_mobile_text_line_height'); |
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
var text_font_weight= $(this).vs_font_weight('txt','layer_text_font_weight'); |
| 300 |
var text_font_decoration= $(this).vs_font_decoration('txt','layer_text_font_decoration'); |
| 301 |
var text_font_transform= $(this).vs_font_transform('txt','layer_text_font_transform'); |
| 302 |
var text_spacing= $(this).vs_spacing('txt','layer_text_spacing'); |
| 303 |
var text_font_style= $(this).vs_font_style('txt','layer_text_font_style'); |
| 304 |
|
| 305 |
var fontfamily= $(this).vs_input_fontfamily('layer_text'); |
| 306 |
$(this).vs_link_fontfamily('layer_text',key); |
| 307 |
|
| 308 |
|
| 309 |
$('#vs_perview_layer_'+key).find('.vs-layer-style').html(''); |
| 310 |
$('#vs_perview_layer_'+key).find('.vs-layer-style').append('<style>#vs_perview_layer_'+key+'{'+ |
| 311 |
text_align+ |
| 312 |
tablet_text_align+ |
| 313 |
mobile_text_align+ |
| 314 |
text_color+ |
| 315 |
text_hover_color+ |
| 316 |
icon_color+ |
| 317 |
icon_hover_color+ |
| 318 |
text_shadow+ |
| 319 |
text_hover_shadow+ |
| 320 |
text_boxed_padding+ |
| 321 |
text_boxed_background+ |
| 322 |
text_boxed_hover_background+ |
| 323 |
text_boxed_border+ |
| 324 |
text_boxed_hover_border+ |
| 325 |
text_boxed_shadow+ |
| 326 |
text_boxed_hover_shadow+ |
| 327 |
text_boxed_radius+ |
| 328 |
text_fontfamily+ |
| 329 |
text_font_size+ |
| 330 |
text_line_height+ |
| 331 |
tablet_text_font_size+ |
| 332 |
tablet_text_line_height+ |
| 333 |
mobile_text_font_size+ |
| 334 |
mobile_text_line_height+ |
| 335 |
text_font_weight+ |
| 336 |
text_font_decoration+ |
| 337 |
text_font_transform+ |
| 338 |
text_font_style+ |
| 339 |
text_spacing+ |
| 340 |
'}'+fontfamily+'</style>' |
| 341 |
|
| 342 |
|
| 343 |
) ; |
| 344 |
} |
| 345 |
|
| 346 |
}; |
| 347 |
|
| 348 |
/************************************************************************************************************************************************************************* |
| 349 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 350 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 351 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 352 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 353 |
|
| 354 |
Shadow |
| 355 |
|
| 356 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 357 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 358 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 359 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 360 |
**************************************************************************************************************************************************************************/ |
| 361 |
$.fn.vs_layer_button_perview = function(items) { |
| 362 |
|
| 363 |
var key =$(this).attr('data-key'); |
| 364 |
var id =$(this).attr('data-id'); |
| 365 |
if(id==='button'){ |
| 366 |
//Text |
| 367 |
// |
| 368 |
var button_textarea = $(this).find('.vs_live_layer_button textarea').val() ; |
| 369 |
$('#vs_perview_layer_'+key+' .vs-button').html(button_textarea); |
| 370 |
$('#vs_module_layer_'+key+' .vs_module_layer_name span').html(': '+button_textarea); |
| 371 |
|
| 372 |
var button_align= $(this).vs_text_align('txt','layer_button_align'); |
| 373 |
var tablet_button_align= $(this).vs_text_align('tab-txt','layer_tablet_button_align'); |
| 374 |
var mobile_button_align= $(this).vs_text_align('mob-txt','layer_mobile_button_align'); |
| 375 |
|
| 376 |
|
| 377 |
var button_color= $(this).vs_color('btn','layer_button_color_first'); |
| 378 |
|
| 379 |
var button_hover_color= $(this).vs_color('btn-hv','layer_button_hover_color_first'); |
| 380 |
var button_shadow= $(this).vs_text_shadow('btn','layer_button_shadow'); |
| 381 |
var button_hover_shadow= $(this).vs_text_shadow('btn-hv','layer_button_hover_shadow'); |
| 382 |
|
| 383 |
|
| 384 |
var icon = $(this).find('.vs_live_layer_icon input').val() ; |
| 385 |
$('#vs_perview_layer_'+key+' .vs-button i').remove(); |
| 386 |
$('#vs_perview_layer_'+key+' .vs-button').prepend('<i class="'+icon+'"></i>'); |
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
var icon_align=$(this).vs_align('icn','layer_icon_align'); |
| 391 |
if(icon_align==='left'){ |
| 392 |
$('#vs_perview_layer_'+key+' .vs-button').addClass('vs-icon-left'); |
| 393 |
}else{ |
| 394 |
$('#vs_perview_layer_'+key+' .vs-button').removeClass('vs-icon-left'); |
| 395 |
} |
| 396 |
|
| 397 |
var icon_color= $(this).vs_color('icn','layer_icon_color_first'); |
| 398 |
var icon_hover_color= $(this).vs_color('icn-hv','layer_icon_hover_color_first'); |
| 399 |
|
| 400 |
var button_boxed = $(this).find('.vs_live_layer_button_boxed select').val() ; |
| 401 |
|
| 402 |
if(button_boxed=='boxed'){ |
| 403 |
$('#vs_perview_layer_'+key+' .vs-button').addClass('vs-button-boxed').removeClass('vs-button-none'); |
| 404 |
|
| 405 |
var button_boxed_padding= $(this).vs_padding('btn-box','layer_button_boxed_padding'); |
| 406 |
var button_boxed_background= $(this).vs_background_gradient('btn-box-bg-cr','layer_button_boxed_background'); |
| 407 |
var button_boxed_border= $(this).vs_border('btn-box','layer_button_boxed_border'); |
| 408 |
var button_boxed_shadow= $(this).vs_shadow('btn-box','layer_button_boxed_shadow'); |
| 409 |
|
| 410 |
var button_boxed_hover_background= $(this).vs_background_gradient('btn-box-hv-bg-cr','layer_button_boxed_hover_background'); |
| 411 |
var button_boxed_hover_border= $(this).vs_border('btn-box-hv','layer_button_boxed_hover_border'); |
| 412 |
var button_boxed_hover_shadow= $(this).vs_shadow('btn-box-hv','layer_button_boxed_hover_shadow'); |
| 413 |
var button_boxed_radius= $(this).vs_radius('btn-box','layer_button_boxed_radius'); |
| 414 |
}else{ |
| 415 |
$('#vs_perview_layer_'+key+' .vs-button').addClass('vs-button-none').removeClass('vs-button-boxed'); |
| 416 |
|
| 417 |
var button_boxed_padding=''; |
| 418 |
var button_boxed_background=''; |
| 419 |
var button_boxed_border=''; |
| 420 |
var button_boxed_shadow=''; |
| 421 |
|
| 422 |
var button_boxed_hover_background=''; |
| 423 |
var button_boxed_hover_border=''; |
| 424 |
var button_boxed_hover_shadow=''; |
| 425 |
var button_boxed_radius=''; |
| 426 |
|
| 427 |
// var button_boxed_radius=''; |
| 428 |
|
| 429 |
} |
| 430 |
|
| 431 |
var button_fontfamily= $(this).vs_fontfamily('btn','layer_button_fontfamily'); |
| 432 |
var button_font_size= $(this).vs_font_size('btn','layer_button_font_size'); |
| 433 |
|
| 434 |
var tablet_button_font_size= $(this).vs_font_size('tab-btn','layer_tablet_button_font_size'); |
| 435 |
var mobile_button_font_size= $(this).vs_font_size('mob-btn','layer_mobile_button_font_size'); |
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
var button_font_weight= $(this).vs_font_weight('btn','layer_button_font_weight'); |
| 442 |
var button_font_decoration= $(this).vs_font_decoration('btn','layer_button_font_decoration'); |
| 443 |
var button_font_transform= $(this).vs_font_transform('btn','layer_button_font_transform'); |
| 444 |
var button_spacing= $(this).vs_spacing('btn','layer_button_spacing'); |
| 445 |
var button_font_style= $(this).vs_font_style('btn','layer_button_font_style'); |
| 446 |
|
| 447 |
var fontfamily= $(this).vs_input_fontfamily('layer_button'); |
| 448 |
$('body').vs_link_fontfamily(key); |
| 449 |
|
| 450 |
$('#vs_perview_layer_'+key).find('.vs-layer-style').html('<style>#vs_perview_layer_'+key+'{'+ |
| 451 |
button_align+ |
| 452 |
tablet_button_align+ |
| 453 |
mobile_button_align+ |
| 454 |
button_color+ |
| 455 |
button_hover_color+ |
| 456 |
icon_color+ |
| 457 |
icon_hover_color+ |
| 458 |
button_shadow+ |
| 459 |
button_hover_shadow+ |
| 460 |
button_boxed_padding+ |
| 461 |
button_boxed_background+ |
| 462 |
button_boxed_hover_background+ |
| 463 |
button_boxed_border+ |
| 464 |
button_boxed_hover_border+ |
| 465 |
button_boxed_shadow+ |
| 466 |
button_boxed_hover_shadow+ |
| 467 |
button_boxed_radius+ |
| 468 |
button_fontfamily+ |
| 469 |
button_font_size+ |
| 470 |
tablet_button_font_size+ |
| 471 |
mobile_button_font_size+ |
| 472 |
|
| 473 |
button_font_weight+ |
| 474 |
button_font_decoration+ |
| 475 |
button_font_transform+ |
| 476 |
button_font_style+ |
| 477 |
button_spacing+ |
| 478 |
'}'+fontfamily+'</style>' |
| 479 |
|
| 480 |
|
| 481 |
) ; |
| 482 |
} |
| 483 |
}; |
| 484 |
/************************************************************************************************************************************************************************* |
| 485 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 486 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 487 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 488 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 489 |
|
| 490 |
Shadow |
| 491 |
|
| 492 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 493 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 494 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 495 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 496 |
**************************************************************************************************************************************************************************/ |
| 497 |
$.fn.vs_layer_icon_perview = function(items) { |
| 498 |
var key =$(this).attr('data-key'); |
| 499 |
var id =$(this).attr('data-id'); |
| 500 |
if(id==='icon'){ |
| 501 |
var icon = $(this).find('.vs_live_layer_icon input').val() ; |
| 502 |
$('#vs_perview_layer_'+key+' .vs-icon i').remove(); |
| 503 |
$('#vs_perview_layer_'+key+' .vs-icon').append('<i class="'+icon+'"></i>'); |
| 504 |
$('#vs_module_layer_'+key+' .vs_module_layer_name span').html(''); |
| 505 |
$('#vs_module_layer_'+key+' .vs_module_layer_name span').append(': <i class="'+icon+'"></i>'); |
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
var icon_align= $(this).vs_text_align('txt','layer_icon_align'); |
| 510 |
var tablet_icon_align= $(this).vs_text_align('tab-txt','layer_tablet_icon_align'); |
| 511 |
var mobile_icon_align= $(this).vs_text_align('mob-txt','layer_mobile_icon_align'); |
| 512 |
|
| 513 |
|
| 514 |
var icon_color= $(this).vs_color('icn','layer_icon_color_first'); |
| 515 |
|
| 516 |
|
| 517 |
var icon_hover_color= $(this).vs_color('icn-hv','layer_icon_hover_color_first'); |
| 518 |
var icon_shadow= $(this).vs_text_shadow('icn','layer_icon_shadow'); |
| 519 |
var icon_hover_shadow= $(this).vs_text_shadow('icn-hv','layer_icon_hover_shadow'); |
| 520 |
|
| 521 |
|
| 522 |
var icon_boxed = $(this).find('.vs_live_layer_icon_boxed select').val() ; |
| 523 |
|
| 524 |
if(icon_boxed=='boxed'){ |
| 525 |
$('#vs_perview_layer_'+key+' .vs-icon').addClass('vs-icon-boxed').removeClass('vs-icon-none'); |
| 526 |
var icon_boxed_padding= $(this).vs_padding('icn-box','layer_icon_boxed_padding'); |
| 527 |
var icon_boxed_background= $(this).vs_background_gradient('icn-box-bg-cr','layer_icon_boxed_background'); |
| 528 |
var icon_boxed_border= $(this).vs_border('icn-box','layer_icon_boxed_border'); |
| 529 |
var icon_boxed_shadow= $(this).vs_shadow('icn-box','layer_icon_boxed_shadow'); |
| 530 |
|
| 531 |
var icon_boxed_hover_background= $(this).vs_background_gradient('icn-box-hv-bg-cr','layer_icon_boxed_hover_background'); |
| 532 |
var icon_boxed_hover_border= $(this).vs_border('icn-box-hv','layer_icon_boxed_hover_border'); |
| 533 |
var icon_boxed_hover_shadow= $(this).vs_shadow('icn-box-hv','layer_icon_boxed_hover_shadow'); |
| 534 |
var icon_boxed_radius= $(this).vs_radius('icn-box','layer_icon_boxed_radius'); |
| 535 |
}else{ |
| 536 |
$('#vs_perview_layer_'+key+' .vs-icon').addClass('vs-boxed-none').removeClass('vs-boxed-none'); |
| 537 |
|
| 538 |
var icon_boxed_padding=''; |
| 539 |
var icon_boxed_background=''; |
| 540 |
var icon_boxed_border=''; |
| 541 |
var icon_boxed_shadow=''; |
| 542 |
|
| 543 |
var icon_boxed_hover_background=''; |
| 544 |
var icon_boxed_hover_border=''; |
| 545 |
var icon_boxed_hover_shadow=''; |
| 546 |
var icon_boxed_radius=''; |
| 547 |
|
| 548 |
// var icon_boxed_radius=''; |
| 549 |
|
| 550 |
} |
| 551 |
|
| 552 |
|
| 553 |
var icon_font_size= $(this).vs_font_size('icn','layer_icon_font_size'); |
| 554 |
var tablet_icon_font_size= $(this).vs_font_size('tab-icn','layer_tablet_icon_font_size'); |
| 555 |
var mobile_icon_font_size= $(this).vs_font_size('mob-icn','layer_mobile_icon_font_size'); |
| 556 |
|
| 557 |
$('#vs_perview_layer_'+key).find('.vs-layer-style').html('<style>#vs_perview_layer_'+key+'{'+ |
| 558 |
|
| 559 |
icon_align+ |
| 560 |
tablet_icon_align+ |
| 561 |
mobile_icon_align+ |
| 562 |
icon_color+ |
| 563 |
|
| 564 |
icon_hover_color+ |
| 565 |
icon_shadow+ |
| 566 |
icon_hover_shadow+ |
| 567 |
|
| 568 |
icon_boxed_padding+ |
| 569 |
icon_boxed_background+ |
| 570 |
icon_boxed_hover_background+ |
| 571 |
icon_boxed_border+ |
| 572 |
icon_boxed_hover_border+ |
| 573 |
icon_boxed_shadow+ |
| 574 |
icon_boxed_hover_shadow+ |
| 575 |
icon_boxed_radius+ |
| 576 |
|
| 577 |
icon_font_size+ |
| 578 |
tablet_icon_font_size+ |
| 579 |
mobile_icon_font_size+'}' |
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
) ; |
| 584 |
}} |
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
/************************************************************************************************************************************************************************* |
| 590 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 591 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 592 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 593 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 594 |
|
| 595 |
Shadow |
| 596 |
|
| 597 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 598 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 599 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 600 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 601 |
**************************************************************************************************************************************************************************/ |
| 602 |
$.fn.vs_layer_box_perview = function(items) { |
| 603 |
var key =$(this).attr('data-key'); |
| 604 |
var id =$(this).attr('data-id'); |
| 605 |
if(id==='box'){ |
| 606 |
var box_background= $(this).vs_background_gradient('box-bg-cr','layer_box_background'); |
| 607 |
var box_border= $(this).vs_border('box','layer_box_border'); |
| 608 |
var box_shadow= $(this).vs_shadow('box','layer_box_shadow'); |
| 609 |
|
| 610 |
var box_hover_background= $(this).vs_background_gradient('box-hv-bg-cr','layer_box_hover_background'); |
| 611 |
var box_hover_border= $(this).vs_border('box-hv','layer_box_hover_border'); |
| 612 |
var box_hover_shadow= $(this).vs_shadow('box-hv','layer_box_hover_shadow'); |
| 613 |
var box_radius= $(this).vs_radius('icn-box','layer_box_radius'); |
| 614 |
|
| 615 |
|
| 616 |
$('#vs_perview_layer_'+key).find('.vs-layer-style').html('<style>#vs_perview_layer_'+key+'{'+ |
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
box_background+ |
| 621 |
box_hover_background+ |
| 622 |
box_border+ |
| 623 |
box_hover_border+ |
| 624 |
box_shadow+ |
| 625 |
box_hover_shadow+ |
| 626 |
box_radius+ |
| 627 |
'}' |
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
) ; |
| 632 |
} |
| 633 |
}; |
| 634 |
|
| 635 |
|
| 636 |
/************************************************************************************************************************************************************************* |
| 637 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 638 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 639 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 640 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 641 |
|
| 642 |
Shadow |
| 643 |
|
| 644 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 645 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 646 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 647 |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 648 |
**************************************************************************************************************************************************************************/ |
| 649 |
|
| 650 |
$.fn.vs_layer_image_perview = function(items) { |
| 651 |
var key =$(this).attr('data-key'); |
| 652 |
var id =$(this).attr('data-id'); |
| 653 |
if(id==='image'){ |
| 654 |
//Text |
| 655 |
// |
| 656 |
var image_url = $(this).find('.vs_live_layer_image .vs_image_item img').attr('src'); |
| 657 |
|
| 658 |
if(isset(image_url) && image_url !=='undefined'){ |
| 659 |
$('#vs_perview_layer_'+key+' .vs-image').html(''); |
| 660 |
$('#vs_perview_layer_'+key+' .vs-image').append('<img src="'+image_url+'">'); |
| 661 |
$('#vs_module_layer_'+key+' .vs_module_layer_name span').html(''); |
| 662 |
$('#vs_module_layer_'+key+' .vs_module_layer_name span').append(': <img src="'+image_url+'">'); |
| 663 |
|
| 664 |
}else{ |
| 665 |
$('#vs_perview_layer_'+key+' .vs-image').html(''); |
| 666 |
} |
| 667 |
var image_align= $(this).vs_text_align('txt','layer_image_align'); |
| 668 |
var tablet_image_align= $(this).vs_text_align('tab-txt','layer_tablet_image_align'); |
| 669 |
var mobile_image_align= $(this).vs_text_align('mob-txt','layer_mobile_image_align'); |
| 670 |
$('#vs_perview_layer_'+key).find('.vs-layer-style').html('<style>#vs_perview_layer_'+key+'{'+ |
| 671 |
|
| 672 |
image_align+tablet_image_align+mobile_image_align+'}') ; |
| 673 |
|
| 674 |
} |
| 675 |
}; |
| 676 |
|
| 677 |
|
| 678 |
|
| 679 |
})(jQuery); |